@dtjoy/dt-design 1.0.6 → 1.0.8

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 (222) hide show
  1. package/esm/_util/easings.d.ts +1 -0
  2. package/esm/_util/easings.js +9 -0
  3. package/esm/_util/extendsObject.d.ts +4 -0
  4. package/esm/_util/extendsObject.js +17 -0
  5. package/esm/_util/gapSize.d.ts +3 -3
  6. package/esm/_util/getScroll.d.ts +3 -0
  7. package/esm/_util/getScroll.js +32 -0
  8. package/esm/_util/hooks/index.d.ts +4 -1
  9. package/esm/_util/hooks/index.js +4 -1
  10. package/esm/_util/hooks/useForceUpdate.d.ts +2 -0
  11. package/esm/_util/hooks/useForceUpdate.js +6 -0
  12. package/esm/_util/hooks/useOrientation.d.ts +2 -2
  13. package/esm/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
  14. package/esm/_util/hooks/useProxyImperativeHandle.js +31 -0
  15. package/esm/_util/hooks/useSyncState.d.ts +3 -0
  16. package/esm/_util/hooks/useSyncState.js +20 -0
  17. package/esm/_util/index.d.ts +3 -3
  18. package/esm/_util/isNonNullable.d.ts +2 -2
  19. package/esm/_util/scrollTo.d.ts +10 -0
  20. package/esm/_util/scrollTo.js +38 -0
  21. package/esm/_util/type.d.ts +52 -52
  22. package/esm/_util/warning.d.ts +31 -31
  23. package/esm/_util/warning.js +5 -5
  24. package/esm/blockHeader/index.d.ts +50 -48
  25. package/esm/blockHeader/index.js +13 -15
  26. package/esm/blockHeader/style/index.d.ts +2 -2
  27. package/esm/blockHeader/style/index.less +143 -143
  28. package/esm/button/index.d.ts +10 -10
  29. package/esm/button/index.js +2 -2
  30. package/esm/button/style/index.d.ts +2 -2
  31. package/esm/collapsible/index.d.ts +102 -97
  32. package/esm/collapsible/index.js +53 -55
  33. package/esm/collapsible/style/index.d.ts +1 -1
  34. package/esm/collapsibleActionItems/index.d.ts +24 -24
  35. package/esm/collapsibleActionItems/index.js +2 -2
  36. package/esm/collapsibleActionItems/style/index.d.ts +2 -2
  37. package/esm/flex/index.d.ts +7 -7
  38. package/esm/flex/index.js +1 -1
  39. package/esm/flex/interface.d.ts +16 -16
  40. package/esm/flex/style/index.d.ts +2 -2
  41. package/esm/flex/style/index.less +76 -76
  42. package/esm/flex/utils.d.ts +7 -7
  43. package/esm/flex/utils.js +1 -1
  44. package/esm/formList/index.d.ts +78 -77
  45. package/esm/formList/index.js +13 -11
  46. package/esm/formList/style/index.d.ts +2 -2
  47. package/esm/formList/style/index.less +45 -45
  48. package/esm/index.d.ts +17 -14
  49. package/esm/index.js +3 -1
  50. package/esm/overflowList/index.d.ts +40 -39
  51. package/esm/overflowList/index.js +4 -3
  52. package/esm/overflowList/style/index.d.ts +2 -2
  53. package/esm/resize/index.d.ts +9 -8
  54. package/esm/resize/index.js +1 -1
  55. package/esm/resizeObserver/index.d.ts +45 -45
  56. package/esm/resizeObserver/index.js +3 -2
  57. package/esm/splitter/Panel.d.ts +7 -7
  58. package/esm/splitter/Panel.js +3 -3
  59. package/esm/splitter/SplitBar.d.ts +24 -24
  60. package/esm/splitter/SplitBar.js +8 -7
  61. package/esm/splitter/Splitter.d.ts +5 -5
  62. package/esm/splitter/Splitter.js +5 -4
  63. package/esm/splitter/hooks/sizeUtil.d.ts +3 -3
  64. package/esm/splitter/hooks/useItems.d.ts +14 -14
  65. package/esm/splitter/hooks/useItems.js +2 -2
  66. package/esm/splitter/hooks/useResizable.d.ts +10 -10
  67. package/esm/splitter/hooks/useResize.d.ts +6 -6
  68. package/esm/splitter/hooks/useResize.js +5 -5
  69. package/esm/splitter/hooks/useSizes.d.ts +4 -4
  70. package/esm/splitter/index.d.ts +8 -8
  71. package/esm/splitter/interface.d.ts +69 -69
  72. package/esm/splitter/style/index.d.ts +2 -2
  73. package/esm/statusTag/index.d.ts +29 -28
  74. package/esm/statusTag/index.js +8 -8
  75. package/esm/statusTag/style/index.d.ts +2 -2
  76. package/esm/style/index.d.ts +1 -1
  77. package/esm/style/index.less +1 -1
  78. package/esm/style/themes/index.less +2 -2
  79. package/esm/style/themes/variable.less +4 -0
  80. package/esm/table/InternalTable.d.ts +32 -0
  81. package/esm/table/InternalTable.js +429 -0
  82. package/esm/table/RcTable/VirtualTable.d.ts +2 -0
  83. package/esm/table/RcTable/VirtualTable.js +9 -0
  84. package/esm/table/RcTable/index.d.ts +2 -0
  85. package/esm/table/RcTable/index.js +9 -0
  86. package/esm/table/Table.d.ts +17 -0
  87. package/esm/table/Table.js +28 -0
  88. package/esm/table/TableMeasureRowContext.d.ts +3 -0
  89. package/esm/table/TableMeasureRowContext.js +3 -0
  90. package/esm/table/hooks/useContainerWidth.d.ts +1 -0
  91. package/esm/table/hooks/useContainerWidth.js +14 -0
  92. package/esm/table/index.d.ts +7 -0
  93. package/esm/table/index.js +2 -0
  94. package/esm/table/interface.d.ts +196 -0
  95. package/esm/table/interface.js +4 -0
  96. package/esm/table/style/bordered.less +141 -0
  97. package/esm/table/style/fixed.less +88 -0
  98. package/esm/table/style/index.d.ts +2 -0
  99. package/esm/table/style/index.js +2 -0
  100. package/esm/table/style/index.less +150 -0
  101. package/esm/table/style/selection.less +90 -0
  102. package/esm/table/style/sticky.less +55 -0
  103. package/esm/table/style/virtual.less +65 -0
  104. package/esm/table/util.d.ts +14 -0
  105. package/esm/table/util.js +33 -0
  106. package/lib/_util/easings.d.ts +1 -0
  107. package/lib/_util/easings.js +15 -0
  108. package/lib/_util/extendsObject.d.ts +4 -0
  109. package/lib/_util/extendsObject.js +20 -0
  110. package/lib/_util/gapSize.d.ts +3 -3
  111. package/lib/_util/getScroll.d.ts +3 -0
  112. package/lib/_util/getScroll.js +39 -0
  113. package/lib/_util/hooks/index.d.ts +4 -1
  114. package/lib/_util/hooks/index.js +33 -0
  115. package/lib/_util/hooks/useForceUpdate.d.ts +2 -0
  116. package/lib/_util/hooks/useForceUpdate.js +12 -0
  117. package/lib/_util/hooks/useOrientation.d.ts +2 -2
  118. package/lib/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
  119. package/lib/_util/hooks/useProxyImperativeHandle.js +40 -0
  120. package/lib/_util/hooks/useSyncState.d.ts +3 -0
  121. package/lib/_util/hooks/useSyncState.js +19 -0
  122. package/lib/_util/index.d.ts +3 -3
  123. package/lib/_util/isNonNullable.d.ts +2 -2
  124. package/lib/_util/scrollTo.d.ts +10 -0
  125. package/lib/_util/scrollTo.js +44 -0
  126. package/lib/_util/type.d.ts +52 -52
  127. package/lib/_util/warning.d.ts +31 -31
  128. package/lib/_util/warning.js +7 -8
  129. package/lib/blockHeader/index.d.ts +50 -48
  130. package/lib/blockHeader/index.js +13 -12
  131. package/lib/blockHeader/style/index.d.ts +2 -2
  132. package/lib/blockHeader/style/index.less +143 -143
  133. package/lib/button/index.d.ts +10 -10
  134. package/lib/button/index.js +2 -2
  135. package/lib/button/style/index.d.ts +2 -2
  136. package/lib/collapsible/index.d.ts +102 -97
  137. package/lib/collapsible/index.js +49 -49
  138. package/lib/collapsible/style/index.d.ts +1 -1
  139. package/lib/collapsibleActionItems/index.d.ts +24 -24
  140. package/lib/collapsibleActionItems/index.js +2 -2
  141. package/lib/collapsibleActionItems/style/index.d.ts +2 -2
  142. package/lib/flex/index.d.ts +7 -7
  143. package/lib/flex/index.js +2 -2
  144. package/lib/flex/interface.d.ts +16 -16
  145. package/lib/flex/style/index.d.ts +2 -2
  146. package/lib/flex/style/index.less +76 -76
  147. package/lib/flex/utils.d.ts +7 -7
  148. package/lib/flex/utils.js +2 -2
  149. package/lib/formList/index.d.ts +78 -77
  150. package/lib/formList/index.js +10 -10
  151. package/lib/formList/style/index.d.ts +2 -2
  152. package/lib/formList/style/index.less +45 -45
  153. package/lib/index.d.ts +17 -14
  154. package/lib/index.js +21 -2
  155. package/lib/overflowList/index.d.ts +40 -39
  156. package/lib/overflowList/index.js +4 -3
  157. package/lib/overflowList/style/index.d.ts +2 -2
  158. package/lib/resize/index.d.ts +9 -8
  159. package/lib/resize/index.js +1 -1
  160. package/lib/resizeObserver/index.d.ts +45 -45
  161. package/lib/resizeObserver/index.js +3 -2
  162. package/lib/splitter/Panel.d.ts +7 -7
  163. package/lib/splitter/Panel.js +3 -3
  164. package/lib/splitter/SplitBar.d.ts +24 -24
  165. package/lib/splitter/SplitBar.js +8 -7
  166. package/lib/splitter/Splitter.d.ts +5 -5
  167. package/lib/splitter/Splitter.js +5 -4
  168. package/lib/splitter/hooks/sizeUtil.d.ts +3 -3
  169. package/lib/splitter/hooks/useItems.d.ts +14 -14
  170. package/lib/splitter/hooks/useItems.js +2 -2
  171. package/lib/splitter/hooks/useResizable.d.ts +10 -10
  172. package/lib/splitter/hooks/useResize.d.ts +6 -6
  173. package/lib/splitter/hooks/useResize.js +5 -5
  174. package/lib/splitter/hooks/useSizes.d.ts +4 -4
  175. package/lib/splitter/index.d.ts +8 -8
  176. package/lib/splitter/interface.d.ts +69 -69
  177. package/lib/splitter/style/index.d.ts +2 -2
  178. package/lib/statusTag/index.d.ts +29 -28
  179. package/lib/statusTag/index.js +8 -8
  180. package/lib/statusTag/style/index.d.ts +2 -2
  181. package/lib/style/index.d.ts +1 -1
  182. package/lib/style/index.less +1 -1
  183. package/lib/style/themes/index.less +2 -2
  184. package/lib/style/themes/variable.less +4 -0
  185. package/lib/table/InternalTable.d.ts +32 -0
  186. package/lib/table/InternalTable.js +395 -0
  187. package/lib/table/RcTable/VirtualTable.d.ts +2 -0
  188. package/lib/table/RcTable/VirtualTable.js +17 -0
  189. package/lib/table/RcTable/index.d.ts +2 -0
  190. package/lib/table/RcTable/index.js +17 -0
  191. package/lib/table/Table.d.ts +17 -0
  192. package/lib/table/Table.js +37 -0
  193. package/lib/table/TableMeasureRowContext.d.ts +3 -0
  194. package/lib/{_util/zindexContext.js → table/TableMeasureRowContext.js} +2 -5
  195. package/lib/table/hooks/useContainerWidth.d.ts +1 -0
  196. package/lib/table/hooks/useContainerWidth.js +20 -0
  197. package/lib/table/index.d.ts +7 -0
  198. package/lib/table/index.js +9 -0
  199. package/lib/table/interface.d.ts +196 -0
  200. package/lib/table/interface.js +8 -0
  201. package/lib/table/style/bordered.less +141 -0
  202. package/lib/table/style/fixed.less +88 -0
  203. package/lib/table/style/index.d.ts +2 -0
  204. package/lib/table/style/index.js +4 -0
  205. package/lib/table/style/index.less +150 -0
  206. package/lib/table/style/selection.less +90 -0
  207. package/lib/table/style/sticky.less +55 -0
  208. package/lib/table/style/virtual.less +65 -0
  209. package/lib/table/util.d.ts +14 -0
  210. package/lib/table/util.js +44 -0
  211. package/package.json +82 -66
  212. package/esm/_util/convertToTooltipProps.d.ts +0 -4
  213. package/esm/_util/convertToTooltipProps.js +0 -15
  214. package/esm/_util/hooks/useZIndex.d.ts +0 -8
  215. package/esm/_util/hooks/useZIndex.js +0 -51
  216. package/esm/_util/zindexContext.d.ts +0 -3
  217. package/esm/_util/zindexContext.js +0 -6
  218. package/lib/_util/convertToTooltipProps.d.ts +0 -4
  219. package/lib/_util/convertToTooltipProps.js +0 -21
  220. package/lib/_util/hooks/useZIndex.d.ts +0 -8
  221. package/lib/_util/hooks/useZIndex.js +0 -59
  222. package/lib/_util/zindexContext.d.ts +0 -3
@@ -1,14 +1,14 @@
1
- import * as React from 'react';
2
- import type { PanelProps } from '../interface';
3
- export declare type ItemType = Omit<PanelProps, 'collapsible'> & {
4
- collapsible: {
5
- start?: boolean;
6
- end?: boolean;
7
- showCollapsibleIcon: 'auto' | boolean;
8
- };
9
- };
10
- /**
11
- * Convert `children` into `items`.
12
- */
13
- declare function useItems(children: React.ReactNode): ItemType[];
14
- export default useItems;
1
+ import * as React from 'react';
2
+ import type { PanelProps } from '../interface';
3
+ export type ItemType = Omit<PanelProps, 'collapsible'> & {
4
+ collapsible: {
5
+ start?: boolean;
6
+ end?: boolean;
7
+ showCollapsibleIcon: 'auto' | boolean;
8
+ };
9
+ };
10
+ /**
11
+ * Convert `children` into `items`.
12
+ */
13
+ declare function useItems(children: React.ReactNode): ItemType[];
14
+ export default useItems;
@@ -23,8 +23,8 @@ function getCollapsible(collapsible) {
23
23
  };
24
24
  }
25
25
 
26
- /**
27
- * Convert `children` into `items`.
26
+ /**
27
+ * Convert `children` into `items`.
28
28
  */
29
29
  function useItems(children) {
30
30
  var items = React.useMemo(function () {
@@ -1,10 +1,10 @@
1
- import type { ShowCollapsibleIconMode } from '../SplitBar';
2
- import type { ItemType } from './useItems';
3
- export declare type ResizableInfo = {
4
- resizable: boolean;
5
- startCollapsible: boolean;
6
- endCollapsible: boolean;
7
- showStartCollapsibleIcon: ShowCollapsibleIconMode;
8
- showEndCollapsibleIcon: ShowCollapsibleIconMode;
9
- };
10
- export default function useResizable(items: ItemType[], pxSizes: number[], isRTL: boolean): ResizableInfo[];
1
+ import type { ShowCollapsibleIconMode } from '../SplitBar';
2
+ import type { ItemType } from './useItems';
3
+ export type ResizableInfo = {
4
+ resizable: boolean;
5
+ startCollapsible: boolean;
6
+ endCollapsible: boolean;
7
+ showStartCollapsibleIcon: ShowCollapsibleIconMode;
8
+ showEndCollapsibleIcon: ShowCollapsibleIconMode;
9
+ };
10
+ export default function useResizable(items: ItemType[], pxSizes: number[], isRTL: boolean): ResizableInfo[];
@@ -1,6 +1,6 @@
1
- import type { ItemType } from './useItems';
2
- import type { ResizableInfo } from './useResizable';
3
- /**
4
- * Handle user drag resize logic.
5
- */
6
- export default function useResize(items: ItemType[], resizableInfos: ResizableInfo[], percentSizes: number[], containerSize: number | undefined, updateSizes: (sizes: number[]) => void, isRTL: boolean): readonly [(index: number) => void, (index: number, offset: number) => number[], () => void, (index: number, type: 'start' | 'end') => number[], number | undefined];
1
+ import type { ItemType } from './useItems';
2
+ import type { ResizableInfo } from './useResizable';
3
+ /**
4
+ * Handle user drag resize logic.
5
+ */
6
+ export default function useResize(items: ItemType[], resizableInfos: ResizableInfo[], percentSizes: number[], containerSize: number | undefined, updateSizes: (sizes: number[]) => void, isRTL: boolean): readonly [(index: number) => void, (index: number, offset: number) => number[], () => void, (index: number, type: 'start' | 'end') => number[], number | undefined];
@@ -11,8 +11,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import * as React from 'react';
12
12
  import { getPtg } from "./useSizes";
13
13
 
14
- /**
15
- * Handle user drag resize logic.
14
+ /**
15
+ * Handle user drag resize logic.
16
16
  */
17
17
  export default function useResize(items, resizableInfos, percentSizes, containerSize, updateSizes, isRTL) {
18
18
  var limitSizes = items.map(function (item) {
@@ -38,9 +38,9 @@ export default function useResize(items, resizableInfos, percentSizes, container
38
38
  setCacheSizes = _React$useState2[1];
39
39
  var cacheCollapsedSize = React.useRef([]);
40
40
 
41
- /**
42
- * When start drag, check the direct is `start` or `end`.
43
- * This will handle when 2 splitter bar are in the same position.
41
+ /**
42
+ * When start drag, check the direct is `start` or `end`.
43
+ * This will handle when 2 splitter bar are in the same position.
44
44
  */
45
45
  var _React$useState3 = React.useState(null),
46
46
  _React$useState4 = _slicedToArray(_React$useState3, 2),
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { PanelProps } from '../interface';
3
- export declare function getPtg(str: string): number;
4
- export default function useSizes(items: PanelProps[], containerSize?: number): readonly [(string | number | undefined)[], number[], number[], number[], number[], React.Dispatch<React.SetStateAction<(string | number | undefined)[]>>];
1
+ import React from 'react';
2
+ import type { PanelProps } from '../interface';
3
+ export declare function getPtg(str: string): number;
4
+ export default function useSizes(items: PanelProps[], containerSize?: number): readonly [(string | number | undefined)[], number[], number[], number[], number[], React.Dispatch<React.SetStateAction<(string | number | undefined)[]>>];
@@ -1,8 +1,8 @@
1
- import Panel from './Panel';
2
- import SplitterComp from './Splitter';
3
- export type { SplitterProps } from './interface';
4
- declare type CompoundedComponent = typeof SplitterComp & {
5
- Panel: typeof Panel;
6
- };
7
- declare const Splitter: CompoundedComponent;
8
- export default Splitter;
1
+ import Panel from './Panel';
2
+ import SplitterComp from './Splitter';
3
+ export type { SplitterProps } from './interface';
4
+ type CompoundedComponent = typeof SplitterComp & {
5
+ Panel: typeof Panel;
6
+ };
7
+ declare const Splitter: CompoundedComponent;
8
+ export default Splitter;
@@ -1,69 +1,69 @@
1
- /// <reference types="react" />
2
- import { ShowCollapsibleIconMode } from './SplitBar';
3
- export interface SplitterProps {
4
- prefixCls?: string;
5
- className?: string;
6
- style?: React.CSSProperties;
7
- rootClassName?: string;
8
- layout?: 'horizontal' | 'vertical';
9
- onResizeStart?: (sizes: number[]) => void;
10
- onResize?: (sizes: number[]) => void;
11
- onResizeEnd?: (sizes: number[]) => void;
12
- onCollapse?: (collapsed: boolean[], sizes: number[]) => void;
13
- lazy?: boolean;
14
- }
15
- export interface PanelProps {
16
- className?: string;
17
- style?: React.CSSProperties;
18
- min?: number | string;
19
- max?: number | string;
20
- size?: number | string;
21
- collapsible?: boolean | {
22
- start?: boolean;
23
- end?: boolean;
24
- showCollapsibleIcon?: ShowCollapsibleIconMode;
25
- };
26
- resizable?: boolean;
27
- defaultSize?: number | string;
28
- }
29
- export interface InternalPanelProps extends PanelProps {
30
- className?: string;
31
- prefixCls?: string;
32
- }
33
- export interface UseResizeProps extends Pick<SplitterProps, 'onResize'> {
34
- basicsState: number[];
35
- items: PanelProps[];
36
- panelsRef: React.RefObject<(HTMLDivElement | null)[]>;
37
- reverse: boolean;
38
- setBasicsState: React.Dispatch<React.SetStateAction<number[]>>;
39
- }
40
- export interface UseResize {
41
- setSize: (data: {
42
- size: number;
43
- index: number;
44
- }[]) => void;
45
- setOffset: (offset: number, containerSize: number, index: number) => void;
46
- }
47
- export interface UseHandleProps extends Pick<SplitterProps, 'layout' | 'onResizeStart' | 'onResizeEnd'> {
48
- basicsState: number[];
49
- containerRef?: React.RefObject<HTMLDivElement | null>;
50
- setOffset: UseResize['setOffset'];
51
- setResizing: React.Dispatch<React.SetStateAction<boolean>>;
52
- }
53
- export interface UseHandle {
54
- onStart: (x: number, y: number, index: number) => void;
55
- }
56
- export interface UseCollapsibleProps {
57
- basicsState: number[];
58
- collapsible?: PanelProps['collapsible'];
59
- index: number;
60
- reverse: boolean;
61
- setSize?: UseResize['setSize'];
62
- }
63
- export interface UseCollapsible {
64
- nextIcon: boolean;
65
- overlap: boolean;
66
- previousIcon: boolean;
67
- onFold: (type: 'previous' | 'next') => void;
68
- setOldBasics: () => void;
69
- }
1
+ /// <reference types="react" />
2
+ import type { ShowCollapsibleIconMode } from './SplitBar';
3
+ export interface SplitterProps {
4
+ prefixCls?: string;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ rootClassName?: string;
8
+ layout?: 'horizontal' | 'vertical';
9
+ onResizeStart?: (sizes: number[]) => void;
10
+ onResize?: (sizes: number[]) => void;
11
+ onResizeEnd?: (sizes: number[]) => void;
12
+ onCollapse?: (collapsed: boolean[], sizes: number[]) => void;
13
+ lazy?: boolean;
14
+ }
15
+ export interface PanelProps {
16
+ className?: string;
17
+ style?: React.CSSProperties;
18
+ min?: number | string;
19
+ max?: number | string;
20
+ size?: number | string;
21
+ collapsible?: boolean | {
22
+ start?: boolean;
23
+ end?: boolean;
24
+ showCollapsibleIcon?: ShowCollapsibleIconMode;
25
+ };
26
+ resizable?: boolean;
27
+ defaultSize?: number | string;
28
+ }
29
+ export interface InternalPanelProps extends PanelProps {
30
+ className?: string;
31
+ prefixCls?: string;
32
+ }
33
+ export interface UseResizeProps extends Pick<SplitterProps, 'onResize'> {
34
+ basicsState: number[];
35
+ items: PanelProps[];
36
+ panelsRef: React.RefObject<(HTMLDivElement | null)[]>;
37
+ reverse: boolean;
38
+ setBasicsState: React.Dispatch<React.SetStateAction<number[]>>;
39
+ }
40
+ export interface UseResize {
41
+ setSize: (data: {
42
+ size: number;
43
+ index: number;
44
+ }[]) => void;
45
+ setOffset: (offset: number, containerSize: number, index: number) => void;
46
+ }
47
+ export interface UseHandleProps extends Pick<SplitterProps, 'layout' | 'onResizeStart' | 'onResizeEnd'> {
48
+ basicsState: number[];
49
+ containerRef?: React.RefObject<HTMLDivElement | null>;
50
+ setOffset: UseResize['setOffset'];
51
+ setResizing: React.Dispatch<React.SetStateAction<boolean>>;
52
+ }
53
+ export interface UseHandle {
54
+ onStart: (x: number, y: number, index: number) => void;
55
+ }
56
+ export interface UseCollapsibleProps {
57
+ basicsState: number[];
58
+ collapsible?: PanelProps['collapsible'];
59
+ index: number;
60
+ reverse: boolean;
61
+ setSize?: UseResize['setSize'];
62
+ }
63
+ export interface UseCollapsible {
64
+ nextIcon: boolean;
65
+ overlap: boolean;
66
+ previousIcon: boolean;
67
+ onFold: (type: 'previous' | 'next') => void;
68
+ setOldBasics: () => void;
69
+ }
@@ -1,2 +1,2 @@
1
- import '../../style';
2
- import './index.less';
1
+ import '../../style';
2
+ import './index.less';
@@ -1,28 +1,29 @@
1
- import React, { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
- import './style';
3
- export declare const PRESET_COLOR_TYPES: readonly ["blue", "yellow", "green", "gray", "red", "purple", "cyan", "pink"];
4
- export declare const STATUS_TAG_TYPES: readonly ["default", "outline", "fill"];
5
- export declare type PresetColorType = (typeof PRESET_COLOR_TYPES)[number] | (string & {});
6
- export declare type StatusTagType = (typeof STATUS_TAG_TYPES)[number];
7
- export interface IStatusTagProps extends HTMLAttributes<HTMLDivElement> {
8
- /** 状态类型 */
9
- type?: StatusTagType;
10
- /** 是否圆角 */
11
- rounded?: boolean;
12
- /** 状态颜色(支持预设值/自定义十六进制/RGB) */
13
- color?: PresetColorType;
14
- /** 是否加载中 */
15
- loading?: boolean;
16
- /** 自定义图标 */
17
- icon?: ReactNode;
18
- /** 背景颜色(仅fill类型生效),未设置时使用color的0.15透明度 */
19
- background?: string;
20
- /** 类名 */
21
- className?: string;
22
- /** 子节点 */
23
- children?: ReactNode;
24
- /** 自定义样式 */
25
- style?: CSSProperties;
26
- }
27
- declare const StatusTag: React.FC<IStatusTagProps>;
28
- export default StatusTag;
1
+ import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
+ import React from 'react';
3
+ import './style';
4
+ export declare const PRESET_COLOR_TYPES: readonly ["blue", "yellow", "green", "gray", "red", "purple", "cyan", "pink"];
5
+ export declare const STATUS_TAG_TYPES: readonly ["default", "outline", "fill"];
6
+ export type PresetColorType = (typeof PRESET_COLOR_TYPES)[number] | (string & {});
7
+ export type StatusTagType = (typeof STATUS_TAG_TYPES)[number];
8
+ export interface IStatusTagProps extends HTMLAttributes<HTMLDivElement> {
9
+ /** 状态类型 */
10
+ type?: StatusTagType;
11
+ /** 是否圆角 */
12
+ rounded?: boolean;
13
+ /** 状态颜色(支持预设值/自定义十六进制/RGB) */
14
+ color?: PresetColorType;
15
+ /** 是否加载中 */
16
+ loading?: boolean;
17
+ /** 自定义图标 */
18
+ icon?: ReactNode;
19
+ /** 背景颜色(仅fill类型生效),未设置时使用color的0.15透明度 */
20
+ background?: string;
21
+ /** 类名 */
22
+ className?: string;
23
+ /** 子节点 */
24
+ children?: ReactNode;
25
+ /** 自定义样式 */
26
+ style?: CSSProperties;
27
+ }
28
+ declare const StatusTag: React.FC<IStatusTagProps>;
29
+ export default StatusTag;
@@ -12,8 +12,8 @@ import React, { useMemo } from 'react';
12
12
  import { LoadingOutlined } from '@ant-design/icons';
13
13
  import { Spin } from 'antd';
14
14
  import { globalConfig } from 'antd/es/config-provider';
15
- import classNames from 'classnames';
16
15
  import "./style";
16
+ import clsx from 'clsx';
17
17
  export var PRESET_COLOR_TYPES = Object.freeze(['blue', 'yellow', 'green', 'gray', 'red', 'purple', 'cyan', 'pink']);
18
18
  export var STATUS_TAG_TYPES = Object.freeze(['default', 'outline', 'fill']);
19
19
  var DEFAULT_OPACITY = 0.15;
@@ -44,10 +44,10 @@ function calculateTransparentColor(color) {
44
44
  return char + char;
45
45
  }).join('');
46
46
  }
47
- if (!/^[0-9A-Fa-f]{6}$/.test(hex)) return 'rgba(0, 0, 0, 0.15)';
48
- var r = parseInt(hex.substring(0, 2), 16);
49
- var g = parseInt(hex.substring(2, 4), 16);
50
- var b = parseInt(hex.substring(4, 6), 16);
47
+ if (!/^[0-9A-F]{6}$/i.test(hex)) return 'rgba(0, 0, 0, 0.15)';
48
+ var r = Number.parseInt(hex.substring(0, 2), 16);
49
+ var g = Number.parseInt(hex.substring(2, 4), 16);
50
+ var b = Number.parseInt(hex.substring(4, 6), 16);
51
51
  return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
52
52
  }
53
53
  var StatusTag = /*#__PURE__*/React.memo(function (props) {
@@ -70,7 +70,7 @@ var StatusTag = /*#__PURE__*/React.memo(function (props) {
70
70
  return icon === undefined;
71
71
  }, [icon]);
72
72
  var containerClasses = useMemo(function () {
73
- return classNames(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "--border"), type === 'outline'), "".concat(prefixCls, "--fill"), type === 'fill'), "".concat(prefixCls, "--rounded"), rounded), "".concat(prefixCls, "__").concat(color, "--fill"), type === 'fill' && isPresetColor(color)));
73
+ return clsx(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "--border"), type === 'outline'), "".concat(prefixCls, "--fill"), type === 'fill'), "".concat(prefixCls, "--rounded"), rounded), "".concat(prefixCls, "__").concat(color, "--fill"), type === 'fill' && isPresetColor(color)));
74
74
  }, [className, type, color, rounded, prefixCls]);
75
75
  var customColorStyle = useMemo(function () {
76
76
  if (type !== 'fill' || isPresetColor(color)) return {};
@@ -82,12 +82,12 @@ var StatusTag = /*#__PURE__*/React.memo(function (props) {
82
82
  var iconStyleConfig = useMemo(function () {
83
83
  if (isPresetColor(color)) {
84
84
  return {
85
- className: classNames('anticon', _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "__").concat(color, "--icon"), true), "".concat(prefixCls, "__icon--default"), !icon), "".concat(prefixCls, "__").concat(color, "--iconBg"), !icon)),
85
+ className: clsx('anticon', _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "__").concat(color, "--icon"), true), "".concat(prefixCls, "__icon--default"), !icon), "".concat(prefixCls, "__").concat(color, "--iconBg"), !icon)),
86
86
  style: {}
87
87
  };
88
88
  }
89
89
  return {
90
- className: classNames('anticon', _defineProperty({}, "".concat(prefixCls, "__icon--default"), !icon)),
90
+ className: clsx('anticon', _defineProperty({}, "".concat(prefixCls, "__icon--default"), !icon)),
91
91
  style: {
92
92
  color: icon ? color : undefined,
93
93
  background: !icon ? color : undefined
@@ -1,2 +1,2 @@
1
- import '../../style/index.less';
2
- import './index.less';
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -1 +1 @@
1
- import './index.less';
1
+ import './index.less';
@@ -1 +1 @@
1
- @import "./themes/index.less";
1
+ @import "./themes/index.less";
@@ -1,2 +1,2 @@
1
- @import '~antd/es/style/themes/default.less';
2
- @import './variable.less';
1
+ @import '~antd/es/style/themes/default.less';
2
+ @import './variable.less';
@@ -1 +1,5 @@
1
1
  @primary-color-disabled: #f3f3f3;
2
+
3
+ @motion-duration-fast: 0.1s;
4
+ @motion-duration-mid: 0.2s;
5
+ @motion-duration-slow: 0.3s;
@@ -0,0 +1,32 @@
1
+ import type { TableProps as RcTableProps } from '@rc-component/table';
2
+ import type { SpinProps, TooltipProps } from 'antd';
3
+ import type { SizeType } from 'antd/lib/config-provider/SizeContext';
4
+ import type { FilterValue } from 'antd/lib/table/interface';
5
+ import './style';
6
+ import type { AnyObject } from '../_util/type';
7
+ import type { ColumnsType, GetPopupContainer, RefInternalTable, SorterResult, SortOrder, TableCurrentDataSource, TableLocale, TablePaginationConfig, TableRowSelection } from './interface';
8
+ export type { ColumnsType, TablePaginationConfig };
9
+ export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, 'transformColumns' | 'internalHooks' | 'internalRefs' | 'data' | 'columns' | 'scroll' | 'emptyText'> {
10
+ dropdownPrefixCls?: string;
11
+ dataSource?: RcTableProps<RecordType>['data'];
12
+ columns?: ColumnsType<RecordType>;
13
+ pagination?: false | TablePaginationConfig;
14
+ loading?: boolean | SpinProps;
15
+ size?: SizeType;
16
+ bordered?: boolean;
17
+ locale?: TableLocale;
18
+ virtual?: boolean;
19
+ onChange?: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<RecordType> | SorterResult<RecordType>[], extra: TableCurrentDataSource<RecordType>) => void;
20
+ rowSelection?: TableRowSelection<RecordType>;
21
+ getPopupContainer?: GetPopupContainer;
22
+ scroll?: RcTableProps<RecordType>['scroll'] & {
23
+ scrollToFirstRowOnChange?: boolean;
24
+ };
25
+ sortDirections?: SortOrder[];
26
+ showSorterTooltip?: boolean | TooltipProps;
27
+ }
28
+ export interface InternalTableProps<RecordType = AnyObject> extends TableProps<RecordType> {
29
+ _renderTimes: number;
30
+ }
31
+ declare const _default: RefInternalTable;
32
+ export default _default;