@tiny-codes/react-easy 1.1.1 → 1.1.3

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 (129) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/es/components/BreakLines/index.d.ts +13 -19
  3. package/es/components/BreakLines/index.js +2 -3
  4. package/es/components/BreakLines/index.js.map +1 -1
  5. package/es/components/ConfigProvider/context.d.ts +20 -26
  6. package/es/components/ConfigProvider/context.js.map +1 -1
  7. package/es/components/ConfigProvider/index.d.ts +5 -7
  8. package/es/components/ConfigProvider/index.js +2 -3
  9. package/es/components/ConfigProvider/index.js.map +1 -1
  10. package/es/components/ConfirmAction/index.d.ts +58 -89
  11. package/es/components/ConfirmAction/index.js +12 -18
  12. package/es/components/ConfirmAction/index.js.map +1 -1
  13. package/es/components/DeleteConfirmAction/index.d.ts +2 -3
  14. package/es/components/DeleteConfirmAction/index.js +8 -12
  15. package/es/components/DeleteConfirmAction/index.js.map +1 -1
  16. package/es/components/EditableText/form.d.ts +144 -0
  17. package/es/components/EditableText/form.js +309 -0
  18. package/es/components/EditableText/form.js.map +1 -0
  19. package/es/components/EditableText/index.d.ts +138 -0
  20. package/es/components/EditableText/index.js +216 -0
  21. package/es/components/EditableText/index.js.map +1 -0
  22. package/es/components/EditableText/style/index.d.ts +3 -0
  23. package/es/components/EditableText/style/index.js +76 -0
  24. package/es/components/EditableText/style/index.js.map +1 -0
  25. package/es/components/FloatDrawer/index.d.ts +89 -86
  26. package/es/components/FloatDrawer/index.js +43 -20
  27. package/es/components/FloatDrawer/index.js.map +1 -1
  28. package/es/components/FloatDrawer/style/index.js +42 -23
  29. package/es/components/FloatDrawer/style/index.js.map +1 -1
  30. package/es/components/Loading/index.d.ts +66 -0
  31. package/es/components/Loading/index.js +97 -0
  32. package/es/components/Loading/index.js.map +1 -0
  33. package/es/components/Loading/style/index.d.ts +3 -0
  34. package/es/components/Loading/style/index.js +27 -0
  35. package/es/components/Loading/style/index.js.map +1 -0
  36. package/es/components/ModalAction/index.d.ts +98 -139
  37. package/es/components/ModalAction/index.js +25 -37
  38. package/es/components/ModalAction/index.js.map +1 -1
  39. package/es/components/OverflowTags/index.d.ts +30 -8
  40. package/es/components/OverflowTags/index.js +26 -7
  41. package/es/components/OverflowTags/index.js.map +1 -1
  42. package/es/components/OverflowTags/style/index.js +1 -3
  43. package/es/components/OverflowTags/style/index.js.map +1 -1
  44. package/es/components/index.d.ts +4 -0
  45. package/es/components/index.js +2 -0
  46. package/es/components/index.js.map +1 -1
  47. package/es/hooks/useRefFunction.d.ts +4 -5
  48. package/es/hooks/useRefFunction.js +6 -7
  49. package/es/hooks/useRefFunction.js.map +1 -1
  50. package/es/hooks/useRefValue.d.ts +2 -3
  51. package/es/hooks/useRefValue.js +2 -3
  52. package/es/hooks/useRefValue.js.map +1 -1
  53. package/es/hooks/useT.js +1 -2
  54. package/es/hooks/useT.js.map +1 -1
  55. package/es/hooks/useValidator.d.ts +2 -3
  56. package/es/hooks/useValidator.js +2 -3
  57. package/es/hooks/useValidator.js.map +1 -1
  58. package/es/hooks/useValidatorBuilder.d.ts +41 -61
  59. package/es/hooks/useValidatorBuilder.js +4 -6
  60. package/es/hooks/useValidatorBuilder.js.map +1 -1
  61. package/es/hooks/useValidators.d.ts +62 -83
  62. package/es/hooks/useValidators.js +3 -4
  63. package/es/hooks/useValidators.js.map +1 -1
  64. package/es/locales/index.d.ts +15 -0
  65. package/es/locales/langs/en-US.d.ts +5 -0
  66. package/es/locales/langs/en-US.js +5 -0
  67. package/es/locales/langs/en-US.js.map +1 -1
  68. package/es/locales/langs/zh-CN.d.ts +5 -0
  69. package/es/locales/langs/zh-CN.js +5 -0
  70. package/es/locales/langs/zh-CN.js.map +1 -1
  71. package/lib/components/BreakLines/index.d.ts +13 -19
  72. package/lib/components/BreakLines/index.js.map +2 -2
  73. package/lib/components/ConfigProvider/context.d.ts +20 -26
  74. package/lib/components/ConfigProvider/context.js.map +2 -2
  75. package/lib/components/ConfigProvider/index.d.ts +5 -7
  76. package/lib/components/ConfigProvider/index.js.map +2 -2
  77. package/lib/components/ConfirmAction/index.d.ts +58 -89
  78. package/lib/components/ConfirmAction/index.js.map +2 -2
  79. package/lib/components/DeleteConfirmAction/index.d.ts +2 -3
  80. package/lib/components/DeleteConfirmAction/index.js.map +2 -2
  81. package/lib/components/EditableText/form.d.ts +144 -0
  82. package/lib/components/EditableText/form.js +223 -0
  83. package/lib/components/EditableText/form.js.map +7 -0
  84. package/lib/components/EditableText/index.d.ts +138 -0
  85. package/lib/components/EditableText/index.js +174 -0
  86. package/lib/components/EditableText/index.js.map +7 -0
  87. package/lib/components/EditableText/style/index.d.ts +3 -0
  88. package/lib/components/EditableText/style/index.js +118 -0
  89. package/lib/components/EditableText/style/index.js.map +7 -0
  90. package/lib/components/FloatDrawer/index.d.ts +89 -86
  91. package/lib/components/FloatDrawer/index.js +64 -39
  92. package/lib/components/FloatDrawer/index.js.map +2 -2
  93. package/lib/components/FloatDrawer/style/index.js +60 -23
  94. package/lib/components/FloatDrawer/style/index.js.map +2 -2
  95. package/lib/components/Loading/index.d.ts +66 -0
  96. package/lib/components/Loading/index.js +81 -0
  97. package/lib/components/Loading/index.js.map +7 -0
  98. package/lib/components/Loading/style/index.d.ts +3 -0
  99. package/lib/components/Loading/style/index.js +50 -0
  100. package/lib/components/Loading/style/index.js.map +7 -0
  101. package/lib/components/ModalAction/index.d.ts +98 -139
  102. package/lib/components/ModalAction/index.js.map +2 -2
  103. package/lib/components/OverflowTags/index.d.ts +30 -8
  104. package/lib/components/OverflowTags/index.js +7 -5
  105. package/lib/components/OverflowTags/index.js.map +2 -2
  106. package/lib/components/OverflowTags/style/index.js +1 -1
  107. package/lib/components/OverflowTags/style/index.js.map +2 -2
  108. package/lib/components/index.d.ts +4 -0
  109. package/lib/components/index.js +6 -0
  110. package/lib/components/index.js.map +2 -2
  111. package/lib/hooks/useRefFunction.d.ts +4 -5
  112. package/lib/hooks/useRefFunction.js.map +2 -2
  113. package/lib/hooks/useRefValue.d.ts +2 -3
  114. package/lib/hooks/useRefValue.js.map +2 -2
  115. package/lib/hooks/useT.js.map +2 -2
  116. package/lib/hooks/useValidator.d.ts +2 -3
  117. package/lib/hooks/useValidator.js.map +2 -2
  118. package/lib/hooks/useValidatorBuilder.d.ts +41 -61
  119. package/lib/hooks/useValidatorBuilder.js.map +2 -2
  120. package/lib/hooks/useValidators.d.ts +62 -83
  121. package/lib/hooks/useValidators.js.map +2 -2
  122. package/lib/locales/index.d.ts +15 -0
  123. package/lib/locales/langs/en-US.d.ts +5 -0
  124. package/lib/locales/langs/en-US.js +5 -0
  125. package/lib/locales/langs/en-US.js.map +2 -2
  126. package/lib/locales/langs/zh-CN.d.ts +5 -0
  127. package/lib/locales/langs/zh-CN.js +5 -0
  128. package/lib/locales/langs/zh-CN.js.map +2 -2
  129. package/package.json +1 -1
@@ -0,0 +1,118 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/EditableText/style/index.ts
20
+ var style_exports = {};
21
+ __export(style_exports, {
22
+ default: () => style_default
23
+ });
24
+ module.exports = __toCommonJS(style_exports);
25
+ var import_internal = require("antd/es/theme/internal");
26
+ var genStyle = (token) => {
27
+ const { componentCls, antCls, iconCls } = token;
28
+ return {
29
+ [componentCls]: {
30
+ width: "100%",
31
+ lineHeight: 1,
32
+ [`${componentCls}-view-mode`]: {
33
+ display: "inline-flex",
34
+ width: "auto",
35
+ maxWidth: "100%",
36
+ columnGap: 8,
37
+ "&-block": {
38
+ display: "flex"
39
+ },
40
+ [`${componentCls}-text-content`]: {
41
+ flex: "auto",
42
+ minWidth: 0
43
+ },
44
+ [`${componentCls}-edit-icon`]: {
45
+ display: "inline-flex",
46
+ alignItems: "center",
47
+ flex: "none",
48
+ color: token.colorTextSecondary,
49
+ fontSize: token.fontSize,
50
+ // lineHeight: token.lineHeight,
51
+ // height: token.fontSize * token.lineHeight, // The height of the button should match the line height of the text, so that when the button is at the bottom, it aligns with the text baseline
52
+ cursor: "pointer",
53
+ "&:hover": {
54
+ color: token.colorPrimary
55
+ }
56
+ }
57
+ // '&.${componentCls}-has-children': {
58
+ // '.edit-icon': {
59
+ // lineHeight: 0,
60
+ // height: 'auto', // When custom children are used, the height of the edit button should adapt automatically, rather than being set according to the Typography line height
61
+ // },
62
+ // },
63
+ },
64
+ [`${componentCls}-edit-mode`]: {
65
+ width: "100%",
66
+ [`${componentCls}-form`]: {
67
+ display: "flex",
68
+ [`${antCls}-form`]: {
69
+ display: "flex",
70
+ flexWrap: "nowrap",
71
+ width: "100%",
72
+ [`${antCls}-form-item`]: {
73
+ [`&${antCls}-form-item-block`]: {
74
+ flex: 1
75
+ },
76
+ [`input${antCls}-input`]: {
77
+ minWidth: 100,
78
+ transition: "all 0.2s, width 0s"
79
+ },
80
+ [`textarea${antCls}-input`]: {
81
+ minWidth: 100,
82
+ transition: "all 0.2s, width 0s"
83
+ }
84
+ },
85
+ [`${componentCls}-form-btns`]: {
86
+ flex: "none",
87
+ lineHeight: 0,
88
+ [`${componentCls}-form-btn`]: {
89
+ width: 20,
90
+ height: 20,
91
+ padding: 0,
92
+ fontSize: 20,
93
+ lineHeight: 1,
94
+ [iconCls]: {
95
+ fontSize: 20
96
+ },
97
+ [`&${componentCls}-form-btn-save:not(:disabled)`]: {
98
+ color: token.colorSuccess,
99
+ "&:hover": {
100
+ color: token.colorSuccessActive
101
+ }
102
+ },
103
+ [`&${componentCls}-form-btn-close:not(:disabled)`]: {
104
+ color: token.colorError,
105
+ "&:hover": {
106
+ color: token.colorErrorActive
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ };
116
+ };
117
+ var style_default = (0, import_internal.genStyleHooks)("EasyEditableText", genStyle);
118
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/EditableText/style/index.ts"],
4
+ "sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype EditableTextToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<EditableTextToken> = (token): CSSObject => {\n const { componentCls, antCls, iconCls } = token;\n return {\n [componentCls]: {\n width: '100%',\n lineHeight: 1,\n\n [`${componentCls}-view-mode`]: {\n display: 'inline-flex',\n width: 'auto',\n maxWidth: '100%',\n columnGap: 8,\n '&-block': {\n display: 'flex',\n },\n\n [`${componentCls}-text-content`]: {\n flex: 'auto',\n minWidth: 0,\n },\n\n [`${componentCls}-edit-icon`]: {\n display: 'inline-flex',\n alignItems: 'center',\n flex: 'none',\n color: token.colorTextSecondary,\n fontSize: token.fontSize,\n // lineHeight: token.lineHeight,\n // height: token.fontSize * token.lineHeight, // The height of the button should match the line height of the text, so that when the button is at the bottom, it aligns with the text baseline\n cursor: 'pointer',\n '&:hover': {\n color: token.colorPrimary,\n },\n },\n // '&.${componentCls}-has-children': {\n // '.edit-icon': {\n // lineHeight: 0,\n // height: 'auto', // When custom children are used, the height of the edit button should adapt automatically, rather than being set according to the Typography line height\n // },\n // },\n },\n\n [`${componentCls}-edit-mode`]: {\n width: '100%',\n\n [`${componentCls}-form`]: {\n display: 'flex',\n [`${antCls}-form`]: {\n display: 'flex',\n flexWrap: 'nowrap',\n width: '100%',\n\n [`${antCls}-form-item`]: {\n [`&${antCls}-form-item-block`]: {\n flex: 1,\n },\n [`input${antCls}-input`]: {\n minWidth: 100,\n transition: 'all 0.2s, width 0s',\n },\n [`textarea${antCls}-input`]: {\n minWidth: 100,\n transition: 'all 0.2s, width 0s',\n },\n },\n [`${componentCls}-form-btns`]: {\n flex: 'none',\n lineHeight: 0,\n\n [`${componentCls}-form-btn`]: {\n width: 20,\n height: 20,\n padding: 0,\n fontSize: 20,\n lineHeight: 1,\n\n [iconCls]: {\n fontSize: 20,\n },\n\n [`&${componentCls}-form-btn-save:not(:disabled)`]: {\n color: token.colorSuccess,\n\n '&:hover': {\n color: token.colorSuccessActive,\n },\n },\n\n [`&${componentCls}-form-btn-close:not(:disabled)`]: {\n color: token.colorError,\n\n '&:hover': {\n color: token.colorErrorActive,\n },\n },\n },\n },\n },\n },\n },\n },\n };\n};\n\nexport default genStyleHooks('EasyEditableText' as never, genStyle);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,cAAc,QAAQ,QAAQ,IAAI;AAC1C,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,OAAO;AAAA,MACP,YAAY;AAAA,MAEZ,CAAC,GAAG,wBAAwB,GAAG;AAAA,QAC7B,SAAS;AAAA,QACT,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WAAW;AAAA,QACX,WAAW;AAAA,UACT,SAAS;AAAA,QACX;AAAA,QAEA,CAAC,GAAG,2BAA2B,GAAG;AAAA,UAChC,MAAM;AAAA,UACN,UAAU;AAAA,QACZ;AAAA,QAEA,CAAC,GAAG,wBAAwB,GAAG;AAAA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AAM;AAAA,kBACf;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,oBAA6B,QAAQ;",
6
+ "names": []
7
+ }
@@ -1,179 +1,182 @@
1
1
  import type { CSSProperties, FC, ReactNode } from 'react';
2
2
  import type { CardProps } from 'antd';
3
3
  export interface FloatDrawerProps {
4
+ prefixCls?: string;
4
5
  /**
5
- * **EN:** Whether the drawer is open
6
- *
7
- * **CN:** 抽屉是否打开
6
+ * - **EN:** Whether the drawer is open
7
+ * - **CN:** 抽屉是否打开
8
8
  */
9
9
  open?: boolean;
10
10
  /**
11
- * **EN:** Position of the drawer
12
- *
13
- * **CN:** 抽屉的位置
11
+ * - **EN:** Position of the drawer
12
+ * - **CN:** 抽屉的位置
14
13
  *
15
14
  * @default 'right'
16
15
  */
17
16
  position?: 'left' | 'right' | 'top' | 'bottom';
18
17
  /**
19
- * **EN:** Default size of the drawer. If the drawer is placed on the left or right, this is the
20
- * width, otherwise it is the height.
21
- *
22
- * **CN:** 抽屉的默认宽度。如果抽屉放在左侧或右侧,则为宽度,否则为高度。
23
- *
24
- * @default 300
18
+ * - **EN:** Default size of the drawer. If the drawer is placed on the left or right, this is the
19
+ * width, otherwise it is the height. If not set, the drawer will adapt to the content size.
20
+ * - **CN:** 抽屉的默认宽度。如果抽屉放在左侧或右侧,则为宽度,否则为高度。不设置时,抽屉会根据内容自适应大小。
25
21
  */
26
22
  defaultSize?: number;
27
23
  /**
28
- * **EN:** Minimum size of the drawer
29
- *
30
- * **CN:** 抽屉的最小宽度
24
+ * - **EN:** Minimum size of the drawer
25
+ * - **CN:** 抽屉的最小宽度
31
26
  *
32
27
  * @default 0
33
28
  */
34
29
  minSize?: number;
35
30
  /**
36
- * **EN:** Maximum size of the drawer
37
- *
38
- * **CN:** 抽屉的最大宽度
31
+ * - **EN:** Maximum size of the drawer
32
+ * - **CN:** 抽屉的最大宽度
39
33
  *
40
34
  * @default Infinity
41
35
  */
42
36
  maxSize?: number;
43
37
  /**
44
- * **EN:** Cache key for storing the drawer size in localStorage. If not set, the size will not be
45
- * cached.
38
+ * - **EN:** Offset of the drawer from the edge of the screen, supports all CSS length units,
39
+ * default is `0`.
40
+ *
41
+ * > The drawer will be hidden outside the parent container's edge, but since the parent container
42
+ * > may have padding or border, the drawer may not be completely hidden. You can adjust the
43
+ * > `edgeOffset` to ensure the drawer is completely hidden outside the parent container.
46
44
  *
47
- * **CN:** 指定一个localStorage缓存键,用于记忆抽屉宽度。如果不设置,则不使用缓存。
45
+ * - **CN:** 抽屉距离屏幕边缘的偏移量,支持所有的CSS长度单位, 默认`0`。
46
+ *
47
+ * > 抽屉会隐藏在父容器的外边缘, 但由于父容器可能有padding或border, 导致抽屉不能完全隐藏, 因此可以通过设置 `edgeOffset` 来调整抽屉的偏移量,
48
+ * > 以确保抽屉完全隐藏在父容器之外。
49
+ *
50
+ * @default 0
51
+ */
52
+ edgeOffset?: CSSProperties['width'];
53
+ /**
54
+ * - **EN:** Whether to show the toggle button, default is `true`.
55
+ * - **CN:** 是否显示展开/收起按钮,默认`true`。
56
+ */
57
+ showToggle?: boolean;
58
+ /**
59
+ * - **EN:** Whether the drawer is resizable, default is `true`.
60
+ * - **CN:** 抽屉是否可调整大小, 默认`true`。
61
+ */
62
+ resizable?: boolean;
63
+ /**
64
+ * - **EN:** Cache key for storing the drawer size in localStorage. If not set, the size will not be
65
+ * cached.
66
+ * - **CN:** 指定一个localStorage缓存键,用于记忆抽屉宽度。如果不设置,则不使用缓存。
48
67
  */
49
68
  cacheKey?: string;
50
69
  /**
51
- * **EN:** Custom class name for the root element
52
- *
53
- * **CN:** 根元素的自定义类名
70
+ * - **EN:** Custom class name for the root element
71
+ * - **CN:** 根元素的自定义类名
54
72
  */
55
73
  className?: string;
56
74
  /**
57
- * **EN:** Custom class names for specific elements
58
- *
59
- * **CN:** 特定元素的自定义类名
75
+ * - **EN:** Custom class names for specific elements
76
+ * - **CN:** 特定元素的自定义类名
60
77
  */
61
78
  classNames?: {
62
79
  /**
63
- * **EN:** Class name for the drawer element
64
- *
65
- * **CN:** 抽屉元素的类名
80
+ * - **EN:** Class name for the drawer element
81
+ * - **CN:** 抽屉元素的类名
66
82
  */
67
83
  drawer?: string;
68
84
  /**
69
- * **EN:** Class name for the expand handle
70
- *
71
- * **CN:** 展开手柄的类名
85
+ * - **EN:** Class name for the expand handle
86
+ * - **CN:** 展开手柄的类名
72
87
  */
73
- expandHandle?: string;
88
+ toggle?: string;
74
89
  /**
75
- * **EN:** Class name for the resize handle
76
- *
77
- * **CN:** 调整大小手柄的类名
90
+ * - **EN:** Class name for the resize handle
91
+ * - **CN:** 调整大小手柄的类名
78
92
  */
79
93
  resizeHandle?: string;
80
94
  /**
81
- * **EN:** Class name for the handle icon
82
- *
83
- * **CN:** 手柄图标的类名
95
+ * - **EN:** Class name for the handle icon
96
+ * - **CN:** 手柄图标的类名
84
97
  */
85
98
  handleIcon?: string;
86
99
  /**
87
- * **EN:** Class name for the content area
88
- *
89
- * **CN:** 内容区域的类名
100
+ * - **EN:** Class name for the content area
101
+ * - **CN:** 内容区域的类名
90
102
  */
91
103
  content?: string;
92
104
  /**
93
- * **EN:** Class name for the card element
94
- *
95
- * **CN:** 卡片元素的类名
105
+ * - **EN:** Class name for the card element
106
+ * - **CN:** 卡片元素的类名
96
107
  */
97
108
  card?: string;
98
109
  };
99
110
  /**
100
- * **EN:** Custom styles for the root element
101
- *
102
- * **CN:** 根元素的自定义样式
111
+ * - **EN:** Custom styles for the root element
112
+ * - **CN:** 根元素的自定义样式
103
113
  */
104
114
  style?: CSSProperties;
105
115
  /**
106
- * **EN:** Custom styles for specific elements
107
- *
108
- * **CN:** 特定元素的自定义样式
116
+ * - **EN:** Custom styles for specific elements
117
+ * - **CN:** 特定元素的自定义样式
109
118
  */
110
119
  styles?: {
111
120
  /**
112
- * **EN:** Styles for the drawer element
113
- *
114
- * **CN:** 抽屉元素的样式
121
+ * - **EN:** Styles for the drawer element
122
+ * - **CN:** 抽屉元素的样式
115
123
  */
116
124
  drawer?: CSSProperties;
117
125
  /**
118
- * **EN:** Styles for the expand handle
119
- *
120
- * **CN:** 展开手柄的样式
126
+ * - **EN:** Styles for the expand handle
127
+ * - **CN:** 展开手柄的样式
121
128
  */
122
- expandHandle?: CSSProperties;
129
+ toggle?: CSSProperties;
123
130
  /**
124
- * **EN:** Styles for the resize handle
125
- *
126
- * **CN:** 调整大小手柄的样式
131
+ * - **EN:** Styles for the resize handle
132
+ * - **CN:** 调整大小手柄的样式
127
133
  */
128
134
  resizeHandle?: CSSProperties;
129
135
  /**
130
- * **EN:** Styles for the handle icon
131
- *
132
- * **CN:** 手柄图标的样式
136
+ * - **EN:** Styles for the handle icon
137
+ * - **CN:** 手柄图标的样式
133
138
  */
134
139
  handleIcon?: CSSProperties;
135
140
  /**
136
- * **EN:** Styles for the content area
137
- *
138
- * **CN:** 内容区域的样式
141
+ * - **EN:** Styles for the content area
142
+ * - **CN:** 内容区域的样式
139
143
  */
140
144
  content?: CSSProperties;
141
145
  /**
142
- * **EN:** Styles for the card element
143
- *
144
- * **CN:** 卡片元素的样式
146
+ * - **EN:** Styles for the card element
147
+ * - **CN:** 卡片元素的样式
145
148
  */
146
149
  card?: CSSProperties;
147
150
  };
148
151
  /**
149
- * **EN:** Custom properties for the card element
150
- *
151
- * **CN:** 卡片元素的自定义属性
152
+ * - **EN:** Custom properties for the card element
153
+ * - **CN:** 卡片元素的自定义属性
152
154
  */
153
155
  cardProps?: Omit<CardProps, 'children'>;
154
156
  /**
155
- * **EN:** Content to be rendered inside the drawer
156
- *
157
- * **CN:** 抽屉内容
157
+ * - **EN:** Content to be rendered inside the drawer
158
+ * - **CN:** 抽屉内容
158
159
  */
159
160
  children?: ReactNode;
160
161
  /**
161
- * **EN:** Callback function when the open state changes
162
- *
163
- * **CN:** 打开状态变化时的回调函数
162
+ * - **EN:** Callback function when the open state changes
163
+ * - **CN:** 打开状态变化时的回调函数
164
164
  */
165
165
  onOpenChange?: (open: boolean) => void;
166
166
  /**
167
- * **EN:** Callback function when the drawer is resized
168
- *
169
- * **CN:** 抽屉调整大小时的回调函数
167
+ * - **EN:** Callback function when the drawer is resized
168
+ * - **CN:** 抽屉调整大小时的回调函数
170
169
  */
171
170
  onResize?: (size: number) => void;
171
+ /**
172
+ * - **EN:** Event handler for click events on the drawer container and its internal elements
173
+ * - **CN:** 点击抽屉容器及内部元素时的事件
174
+ */
175
+ onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
172
176
  }
173
177
  /**
174
- * **EN:** FloatDrawer component for creating a draggable, resizable drawer
175
- *
176
- * **CN:** FloatDrawer组件,用于创建可拖动、可调整大小的抽屉
178
+ * - **EN:** FloatDrawer component for creating a draggable, resizable drawer
179
+ * - **CN:** FloatDrawer组件,用于创建可拖动、可调整大小的抽屉
177
180
  */
178
181
  declare const FloatDrawer: FC<FloatDrawerProps>;
179
182
  export default FloatDrawer;
@@ -40,6 +40,7 @@ var import_useRefFunction = __toESM(require("../../hooks/useRefFunction"));
40
40
  var import_style = __toESM(require("./style"));
41
41
  var FloatDrawer = (props) => {
42
42
  const {
43
+ prefixCls: prefixClsInProps,
43
44
  open,
44
45
  position = "right",
45
46
  cardProps,
@@ -49,16 +50,20 @@ var FloatDrawer = (props) => {
49
50
  style,
50
51
  styles,
51
52
  cacheKey,
52
- defaultSize = 300,
53
+ defaultSize,
53
54
  minSize = 0,
54
55
  maxSize = Infinity,
56
+ edgeOffset,
57
+ showToggle = true,
58
+ resizable = true,
55
59
  onOpenChange,
56
- onResize
60
+ onResize,
61
+ onClick
57
62
  } = props;
58
63
  const { getPrefixCls } = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
59
- const prefixCls = getPrefixCls("re-float-drawer");
64
+ const prefixCls = getPrefixCls("easy-float-drawer", prefixClsInProps);
60
65
  const [wrapCSSVar, hashId, cssVarCls] = (0, import_style.default)(prefixCls);
61
- const [isOpen, setIsOpen] = (0, import_react.useState)();
66
+ const [drawerRef, setDrawerRef] = (0, import_react.useState)(null);
62
67
  const [size, setSize] = (0, import_react.useState)(
63
68
  cacheKey && localStorage.getItem(cacheKey) ? Number(localStorage.getItem(cacheKey)) || defaultSize : defaultSize
64
69
  );
@@ -68,6 +73,7 @@ var FloatDrawer = (props) => {
68
73
  [type]: size
69
74
  };
70
75
  }, [position, size]);
76
+ const [isOpen, setIsOpen] = (0, import_react.useState)();
71
77
  const [isDragging, setIsDragging] = (0, import_react.useState)(false);
72
78
  const dragStartPos = (0, import_react.useRef)(0);
73
79
  const dragStartSize = (0, import_react.useRef)(size);
@@ -103,7 +109,7 @@ var FloatDrawer = (props) => {
103
109
  e.preventDefault();
104
110
  });
105
111
  const handleResize = (0, import_useRefFunction.default)((e) => {
106
- if (isDragging) {
112
+ if (isDragging && dragStartSize.current) {
107
113
  let newSize;
108
114
  if (position === "left") {
109
115
  newSize = dragStartSize.current - (dragStartPos.current - e.clientX);
@@ -126,6 +132,12 @@ var FloatDrawer = (props) => {
126
132
  const handleResizeEnd = (0, import_useRefFunction.default)(() => {
127
133
  setIsDragging(false);
128
134
  });
135
+ (0, import_react.useEffect)(() => {
136
+ if (drawerRef && size === void 0) {
137
+ const rect = drawerRef.getBoundingClientRect();
138
+ setSize(position === "left" || position === "right" ? rect.width : rect.height);
139
+ }
140
+ }, [drawerRef, position, size]);
129
141
  (0, import_react.useEffect)(() => {
130
142
  setIsOpen(open);
131
143
  }, [open]);
@@ -143,52 +155,65 @@ var FloatDrawer = (props) => {
143
155
  };
144
156
  }, [isDragging]);
145
157
  return wrapCSSVar(
146
- /* @__PURE__ */ React.createElement("div", { className: classString, style }, /* @__PURE__ */ React.createElement(
158
+ /* @__PURE__ */ React.createElement(
147
159
  "div",
148
160
  {
149
- className: (0, import_classnames.default)(`${prefixCls}-drawer`, classNamesInProps == null ? void 0 : classNamesInProps.drawer),
150
- style: { ...sizeMap, ...styles == null ? void 0 : styles.drawer }
151
- },
152
- /* @__PURE__ */ React.createElement(
153
- "div",
154
- {
155
- className: (0, import_classnames.default)(
156
- `${prefixCls}-resize-handle`,
157
- isDragging && `${prefixCls}-resize-handle-dragging`,
158
- classNamesInProps == null ? void 0 : classNamesInProps.resizeHandle
159
- ),
160
- style: styles == null ? void 0 : styles.resizeHandle,
161
- onMouseDown: handleResizeStart
162
- }
163
- ),
164
- /* @__PURE__ */ React.createElement("div", { className: (0, import_classnames.default)(`${prefixCls}-content`, classNamesInProps == null ? void 0 : classNamesInProps.content), style: styles == null ? void 0 : styles.content }, /* @__PURE__ */ React.createElement(
165
- import_antd.Card,
166
- {
167
- bordered: false,
168
- variant: "borderless",
169
- className: (0, import_classnames.default)(`${prefixCls}-card`, classNamesInProps == null ? void 0 : classNamesInProps.card),
170
- style: styles == null ? void 0 : styles.card,
171
- ...cardProps
161
+ className: classString,
162
+ style: {
163
+ // @ts-expect-error: because of dynamic CSS variables
164
+ "--edge-offset": typeof edgeOffset === "number" ? `${edgeOffset}px` : edgeOffset,
165
+ ...style
172
166
  },
173
- children
174
- )),
167
+ onClick
168
+ },
175
169
  /* @__PURE__ */ React.createElement(
176
170
  "div",
177
171
  {
178
- className: (0, import_classnames.default)(`${prefixCls}-expand-handle`, classNamesInProps == null ? void 0 : classNamesInProps.expandHandle),
179
- style: styles == null ? void 0 : styles.expandHandle,
180
- onClick: toggleDrawer
172
+ ref: setDrawerRef,
173
+ className: (0, import_classnames.default)(`${prefixCls}-drawer`, classNamesInProps == null ? void 0 : classNamesInProps.drawer),
174
+ style: { ...sizeMap, ...styles == null ? void 0 : styles.drawer }
181
175
  },
182
- /* @__PURE__ */ React.createElement(
176
+ resizable && /* @__PURE__ */ React.createElement(
177
+ "div",
178
+ {
179
+ className: (0, import_classnames.default)(
180
+ `${prefixCls}-resize-handle`,
181
+ isDragging && `${prefixCls}-resize-handle-dragging`,
182
+ classNamesInProps == null ? void 0 : classNamesInProps.resizeHandle
183
+ ),
184
+ style: styles == null ? void 0 : styles.resizeHandle,
185
+ onMouseDown: handleResizeStart
186
+ }
187
+ ),
188
+ /* @__PURE__ */ React.createElement("div", { className: (0, import_classnames.default)(`${prefixCls}-content`, classNamesInProps == null ? void 0 : classNamesInProps.content), style: styles == null ? void 0 : styles.content }, /* @__PURE__ */ React.createElement(
189
+ import_antd.Card,
190
+ {
191
+ bordered: false,
192
+ variant: "borderless",
193
+ className: (0, import_classnames.default)(`${prefixCls}-card`, classNamesInProps == null ? void 0 : classNamesInProps.card),
194
+ style: styles == null ? void 0 : styles.card,
195
+ ...cardProps
196
+ },
197
+ children
198
+ )),
199
+ showToggle && /* @__PURE__ */ React.createElement(
183
200
  "div",
184
201
  {
185
- className: (0, import_classnames.default)(`${prefixCls}-handle-icon`, classNamesInProps == null ? void 0 : classNamesInProps.handleIcon),
186
- style: styles == null ? void 0 : styles.handleIcon
202
+ className: (0, import_classnames.default)(`${prefixCls}-toggle`, classNamesInProps == null ? void 0 : classNamesInProps.toggle),
203
+ style: styles == null ? void 0 : styles.toggle,
204
+ onClick: toggleDrawer
187
205
  },
188
- isOpen ? openIcon : closeIcon
206
+ /* @__PURE__ */ React.createElement(
207
+ "div",
208
+ {
209
+ className: (0, import_classnames.default)(`${prefixCls}-handle-icon`, classNamesInProps == null ? void 0 : classNamesInProps.handleIcon),
210
+ style: styles == null ? void 0 : styles.handleIcon
211
+ },
212
+ isOpen ? openIcon : closeIcon
213
+ )
189
214
  )
190
215
  )
191
- ))
216
+ )
192
217
  );
193
218
  };
194
219
  var FloatDrawer_default = FloatDrawer;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/FloatDrawer/index.tsx"],
4
- "sourcesContent": ["import type { CSSProperties, FC, ReactNode } from 'react';\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport type { CardProps } from 'antd';\nimport { Card, ConfigProvider } from 'antd';\nimport classNames from 'classnames';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '@ant-design/icons';\nimport useRefFunction from '../../hooks/useRefFunction';\nimport useStyle from './style';\n\nexport interface FloatDrawerProps {\n /**\n * **EN:** Whether the drawer is open\n *\n * **CN:** 抽屉是否打开\n */\n open?: boolean;\n /**\n * **EN:** Position of the drawer\n *\n * **CN:** 抽屉的位置\n *\n * @default 'right'\n */\n position?: 'left' | 'right' | 'top' | 'bottom';\n /**\n * **EN:** Default size of the drawer. If the drawer is placed on the left or right, this is the\n * width, otherwise it is the height.\n *\n * **CN:** 抽屉的默认宽度。如果抽屉放在左侧或右侧,则为宽度,否则为高度。\n *\n * @default 300\n */\n defaultSize?: number;\n /**\n * **EN:** Minimum size of the drawer\n *\n * **CN:** 抽屉的最小宽度\n *\n * @default 0\n */\n minSize?: number;\n /**\n * **EN:** Maximum size of the drawer\n *\n * **CN:** 抽屉的最大宽度\n *\n * @default Infinity\n */\n maxSize?: number;\n /**\n * **EN:** Cache key for storing the drawer size in localStorage. If not set, the size will not be\n * cached.\n *\n * **CN:** 指定一个localStorage缓存键,用于记忆抽屉宽度。如果不设置,则不使用缓存。\n */\n cacheKey?: string;\n /**\n * **EN:** Custom class name for the root element\n *\n * **CN:** 根元素的自定义类名\n */\n className?: string;\n /**\n * **EN:** Custom class names for specific elements\n *\n * **CN:** 特定元素的自定义类名\n */\n classNames?: {\n /**\n * **EN:** Class name for the drawer element\n *\n * **CN:** 抽屉元素的类名\n */\n drawer?: string;\n /**\n * **EN:** Class name for the expand handle\n *\n * **CN:** 展开手柄的类名\n */\n expandHandle?: string;\n /**\n * **EN:** Class name for the resize handle\n *\n * **CN:** 调整大小手柄的类名\n */\n resizeHandle?: string;\n /**\n * **EN:** Class name for the handle icon\n *\n * **CN:** 手柄图标的类名\n */\n handleIcon?: string;\n /**\n * **EN:** Class name for the content area\n *\n * **CN:** 内容区域的类名\n */\n content?: string;\n /**\n * **EN:** Class name for the card element\n *\n * **CN:** 卡片元素的类名\n */\n card?: string;\n };\n /**\n * **EN:** Custom styles for the root element\n *\n * **CN:** 根元素的自定义样式\n */\n style?: CSSProperties;\n /**\n * **EN:** Custom styles for specific elements\n *\n * **CN:** 特定元素的自定义样式\n */\n styles?: {\n /**\n * **EN:** Styles for the drawer element\n *\n * **CN:** 抽屉元素的样式\n */\n drawer?: CSSProperties;\n /**\n * **EN:** Styles for the expand handle\n *\n * **CN:** 展开手柄的样式\n */\n expandHandle?: CSSProperties;\n /**\n * **EN:** Styles for the resize handle\n *\n * **CN:** 调整大小手柄的样式\n */\n resizeHandle?: CSSProperties;\n /**\n * **EN:** Styles for the handle icon\n *\n * **CN:** 手柄图标的样式\n */\n handleIcon?: CSSProperties;\n /**\n * **EN:** Styles for the content area\n *\n * **CN:** 内容区域的样式\n */\n content?: CSSProperties;\n /**\n * **EN:** Styles for the card element\n *\n * **CN:** 卡片元素的样式\n */\n card?: CSSProperties;\n };\n /**\n * **EN:** Custom properties for the card element\n *\n * **CN:** 卡片元素的自定义属性\n */\n cardProps?: Omit<CardProps, 'children'>;\n /**\n * **EN:** Content to be rendered inside the drawer\n *\n * **CN:** 抽屉内容\n */\n children?: ReactNode;\n /**\n * **EN:** Callback function when the open state changes\n *\n * **CN:** 打开状态变化时的回调函数\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * **EN:** Callback function when the drawer is resized\n *\n * **CN:** 抽屉调整大小时的回调函数\n */\n onResize?: (size: number) => void;\n}\n\n/**\n * **EN:** FloatDrawer component for creating a draggable, resizable drawer\n *\n * **CN:** FloatDrawer组件,用于创建可拖动、可调整大小的抽屉\n */\nconst FloatDrawer: FC<FloatDrawerProps> = (props) => {\n const {\n open,\n position = 'right',\n cardProps,\n children,\n className,\n classNames: classNamesInProps,\n style,\n styles,\n cacheKey,\n defaultSize = 300,\n minSize = 0,\n maxSize = +Infinity,\n onOpenChange,\n onResize,\n } = props;\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('re-float-drawer');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const [isOpen, setIsOpen] = useState<boolean>();\n const [size, setSize] = useState(\n cacheKey && localStorage.getItem(cacheKey) ? Number(localStorage.getItem(cacheKey)) || defaultSize : defaultSize\n );\n const sizeMap = useMemo(() => {\n const type = position === 'left' || position === 'right' ? 'width' : 'height';\n return {\n [type]: size,\n };\n }, [position, size]);\n const [isDragging, setIsDragging] = useState(false);\n const dragStartPos = useRef<number>(0);\n const dragStartSize = useRef<number>(size);\n const classString = classNames(\n prefixCls,\n className,\n {\n [`${prefixCls}-open`]: isOpen,\n [`${prefixCls}-closed`]: !isOpen,\n [`${prefixCls}-${position}`]: position,\n },\n hashId,\n cssVarCls\n );\n const closeIcon = useMemo(() => {\n return position === 'left' ? (\n <RightOutlined />\n ) : position === 'top' ? (\n <DownOutlined />\n ) : position === 'bottom' ? (\n <UpOutlined />\n ) : (\n <LeftOutlined />\n );\n }, [position]);\n const openIcon = useMemo(() => {\n return position === 'left' ? (\n <LeftOutlined />\n ) : position === 'top' ? (\n <UpOutlined />\n ) : position === 'bottom' ? (\n <DownOutlined />\n ) : (\n <RightOutlined />\n );\n }, [position]);\n\n // Handle drawer visibility\n const toggleDrawer = () => {\n setIsOpen(!isOpen);\n onOpenChange?.(!isOpen);\n };\n\n // Handle resize events\n const handleResizeStart = useRefFunction((e: React.MouseEvent) => {\n setIsDragging(true);\n if (position === 'top' || position === 'bottom') {\n dragStartPos.current = e.clientY;\n } else {\n dragStartPos.current = e.clientX;\n }\n dragStartSize.current = size;\n e.preventDefault();\n });\n const handleResize = useRefFunction((e: MouseEvent) => {\n if (isDragging) {\n let newSize: number;\n if (position === 'left') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientX);\n } else if (position === 'top') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientY);\n } else if (position === 'bottom') {\n newSize = dragStartSize.current - (e.clientY - dragStartPos.current);\n } else {\n newSize = dragStartSize.current - (e.clientX - dragStartPos.current);\n }\n if (newSize >= minSize && newSize <= maxSize) {\n setSize(newSize);\n if (cacheKey) {\n localStorage.setItem(cacheKey, String(newSize));\n }\n onResize?.(newSize);\n }\n }\n });\n const handleResizeEnd = useRefFunction(() => {\n setIsDragging(false);\n });\n\n // Controlled open state\n useEffect(() => {\n setIsOpen(open);\n }, [open]);\n\n // Handle global events\n useEffect(() => {\n if (isDragging) {\n window.addEventListener('mousemove', handleResize);\n window.addEventListener('mouseup', handleResizeEnd);\n } else {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n }\n return () => {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n };\n }, [isDragging]);\n\n return wrapCSSVar(\n <div className={classString} style={style}>\n <div\n className={classNames(`${prefixCls}-drawer`, classNamesInProps?.drawer)}\n style={{ ...sizeMap, ...styles?.drawer }}\n >\n <div\n className={classNames(\n `${prefixCls}-resize-handle`,\n isDragging && `${prefixCls}-resize-handle-dragging`,\n classNamesInProps?.resizeHandle\n )}\n style={styles?.resizeHandle}\n onMouseDown={handleResizeStart}\n />\n <div className={classNames(`${prefixCls}-content`, classNamesInProps?.content)} style={styles?.content}>\n <Card\n bordered={false}\n variant=\"borderless\"\n className={classNames(`${prefixCls}-card`, classNamesInProps?.card)}\n style={styles?.card}\n {...cardProps}\n >\n {children}\n </Card>\n </div>\n <div\n className={classNames(`${prefixCls}-expand-handle`, classNamesInProps?.expandHandle)}\n style={styles?.expandHandle}\n onClick={toggleDrawer}\n >\n <div\n className={classNames(`${prefixCls}-handle-icon`, classNamesInProps?.handleIcon)}\n style={styles?.handleIcon}\n >\n {isOpen ? openIcon : closeIcon}\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default FloatDrawer;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiE;AAEjE,kBAAqC;AACrC,wBAAuB;AACvB,mBAAsE;AACtE,4BAA2B;AAC3B,mBAAqB;AAkLrB,IAAM,cAAo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B,UAAU;AAAA,YAC/E,OAAO,iCAAQ;AAAA;AAAA,UAEd,SAAS,WAAW;AAAA,QACvB;AAAA,MACF;AAAA,IACF,CACF;AAAA,EACF;AACF;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import type { CSSProperties, FC, ReactNode } from 'react';\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport type { CardProps } from 'antd';\nimport { Card, ConfigProvider } from 'antd';\nimport classNames from 'classnames';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '@ant-design/icons';\nimport useRefFunction from '../../hooks/useRefFunction';\nimport useStyle from './style';\n\nexport interface FloatDrawerProps {\n prefixCls?: string;\n /**\n * - **EN:** Whether the drawer is open\n * - **CN:** 抽屉是否打开\n */\n open?: boolean;\n /**\n * - **EN:** Position of the drawer\n * - **CN:** 抽屉的位置\n *\n * @default 'right'\n */\n position?: 'left' | 'right' | 'top' | 'bottom';\n /**\n * - **EN:** Default size of the drawer. If the drawer is placed on the left or right, this is the\n * width, otherwise it is the height. If not set, the drawer will adapt to the content size.\n * - **CN:** 抽屉的默认宽度。如果抽屉放在左侧或右侧,则为宽度,否则为高度。不设置时,抽屉会根据内容自适应大小。\n */\n defaultSize?: number;\n /**\n * - **EN:** Minimum size of the drawer\n * - **CN:** 抽屉的最小宽度\n *\n * @default 0\n */\n minSize?: number;\n /**\n * - **EN:** Maximum size of the drawer\n * - **CN:** 抽屉的最大宽度\n *\n * @default Infinity\n */\n maxSize?: number;\n /**\n * - **EN:** Offset of the drawer from the edge of the screen, supports all CSS length units,\n * default is `0`.\n *\n * > The drawer will be hidden outside the parent container's edge, but since the parent container\n * > may have padding or border, the drawer may not be completely hidden. You can adjust the\n * > `edgeOffset` to ensure the drawer is completely hidden outside the parent container.\n *\n * - **CN:** 抽屉距离屏幕边缘的偏移量,支持所有的CSS长度单位, 默认`0`。\n *\n * > 抽屉会隐藏在父容器的外边缘, 但由于父容器可能有padding或border, 导致抽屉不能完全隐藏, 因此可以通过设置 `edgeOffset` 来调整抽屉的偏移量,\n * > 以确保抽屉完全隐藏在父容器之外。\n *\n * @default 0\n */\n edgeOffset?: CSSProperties['width'];\n /**\n * - **EN:** Whether to show the toggle button, default is `true`.\n * - **CN:** 是否显示展开/收起按钮,默认`true`。\n */\n showToggle?: boolean;\n /**\n * - **EN:** Whether the drawer is resizable, default is `true`.\n * - **CN:** 抽屉是否可调整大小, 默认`true`。\n */\n resizable?: boolean;\n /**\n * - **EN:** Cache key for storing the drawer size in localStorage. If not set, the size will not be\n * cached.\n * - **CN:** 指定一个localStorage缓存键,用于记忆抽屉宽度。如果不设置,则不使用缓存。\n */\n cacheKey?: string;\n /**\n * - **EN:** Custom class name for the root element\n * - **CN:** 根元素的自定义类名\n */\n className?: string;\n /**\n * - **EN:** Custom class names for specific elements\n * - **CN:** 特定元素的自定义类名\n */\n classNames?: {\n /**\n * - **EN:** Class name for the drawer element\n * - **CN:** 抽屉元素的类名\n */\n drawer?: string;\n /**\n * - **EN:** Class name for the expand handle\n * - **CN:** 展开手柄的类名\n */\n toggle?: string;\n /**\n * - **EN:** Class name for the resize handle\n * - **CN:** 调整大小手柄的类名\n */\n resizeHandle?: string;\n /**\n * - **EN:** Class name for the handle icon\n * - **CN:** 手柄图标的类名\n */\n handleIcon?: string;\n /**\n * - **EN:** Class name for the content area\n * - **CN:** 内容区域的类名\n */\n content?: string;\n /**\n * - **EN:** Class name for the card element\n * - **CN:** 卡片元素的类名\n */\n card?: string;\n };\n /**\n * - **EN:** Custom styles for the root element\n * - **CN:** 根元素的自定义样式\n */\n style?: CSSProperties;\n /**\n * - **EN:** Custom styles for specific elements\n * - **CN:** 特定元素的自定义样式\n */\n styles?: {\n /**\n * - **EN:** Styles for the drawer element\n * - **CN:** 抽屉元素的样式\n */\n drawer?: CSSProperties;\n /**\n * - **EN:** Styles for the expand handle\n * - **CN:** 展开手柄的样式\n */\n toggle?: CSSProperties;\n /**\n * - **EN:** Styles for the resize handle\n * - **CN:** 调整大小手柄的样式\n */\n resizeHandle?: CSSProperties;\n /**\n * - **EN:** Styles for the handle icon\n * - **CN:** 手柄图标的样式\n */\n handleIcon?: CSSProperties;\n /**\n * - **EN:** Styles for the content area\n * - **CN:** 内容区域的样式\n */\n content?: CSSProperties;\n /**\n * - **EN:** Styles for the card element\n * - **CN:** 卡片元素的样式\n */\n card?: CSSProperties;\n };\n /**\n * - **EN:** Custom properties for the card element\n * - **CN:** 卡片元素的自定义属性\n */\n cardProps?: Omit<CardProps, 'children'>;\n /**\n * - **EN:** Content to be rendered inside the drawer\n * - **CN:** 抽屉内容\n */\n children?: ReactNode;\n /**\n * - **EN:** Callback function when the open state changes\n * - **CN:** 打开状态变化时的回调函数\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * - **EN:** Callback function when the drawer is resized\n * - **CN:** 抽屉调整大小时的回调函数\n */\n onResize?: (size: number) => void;\n /**\n * - **EN:** Event handler for click events on the drawer container and its internal elements\n * - **CN:** 点击抽屉容器及内部元素时的事件\n */\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n}\n\n/**\n * - **EN:** FloatDrawer component for creating a draggable, resizable drawer\n * - **CN:** FloatDrawer组件,用于创建可拖动、可调整大小的抽屉\n */\nconst FloatDrawer: FC<FloatDrawerProps> = (props) => {\n const {\n prefixCls: prefixClsInProps,\n open,\n position = 'right',\n cardProps,\n children,\n className,\n classNames: classNamesInProps,\n style,\n styles,\n cacheKey,\n defaultSize,\n minSize = 0,\n maxSize = +Infinity,\n edgeOffset,\n showToggle = true,\n resizable = true,\n onOpenChange,\n onResize,\n onClick,\n } = props;\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-float-drawer', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const [drawerRef, setDrawerRef] = useState<HTMLDivElement | null>(null);\n const [size, setSize] = useState(\n cacheKey && localStorage.getItem(cacheKey) ? Number(localStorage.getItem(cacheKey)) || defaultSize : defaultSize\n );\n const sizeMap = useMemo(() => {\n const type = position === 'left' || position === 'right' ? 'width' : 'height';\n return {\n [type]: size,\n };\n }, [position, size]);\n const [isOpen, setIsOpen] = useState<boolean>();\n const [isDragging, setIsDragging] = useState(false);\n const dragStartPos = useRef<number>(0);\n const dragStartSize = useRef<number>(size);\n const classString = classNames(\n prefixCls,\n className,\n {\n [`${prefixCls}-open`]: isOpen,\n [`${prefixCls}-closed`]: !isOpen,\n [`${prefixCls}-${position}`]: position,\n },\n hashId,\n cssVarCls\n );\n const closeIcon = useMemo(() => {\n return position === 'left' ? (\n <RightOutlined />\n ) : position === 'top' ? (\n <DownOutlined />\n ) : position === 'bottom' ? (\n <UpOutlined />\n ) : (\n <LeftOutlined />\n );\n }, [position]);\n const openIcon = useMemo(() => {\n return position === 'left' ? (\n <LeftOutlined />\n ) : position === 'top' ? (\n <UpOutlined />\n ) : position === 'bottom' ? (\n <DownOutlined />\n ) : (\n <RightOutlined />\n );\n }, [position]);\n\n // Handle drawer visibility\n const toggleDrawer = () => {\n setIsOpen(!isOpen);\n onOpenChange?.(!isOpen);\n };\n\n // Handle resize events\n const handleResizeStart = useRefFunction((e: React.MouseEvent) => {\n setIsDragging(true);\n if (position === 'top' || position === 'bottom') {\n dragStartPos.current = e.clientY;\n } else {\n dragStartPos.current = e.clientX;\n }\n dragStartSize.current = size;\n e.preventDefault();\n });\n const handleResize = useRefFunction((e: MouseEvent) => {\n if (isDragging && dragStartSize.current) {\n let newSize: number;\n if (position === 'left') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientX);\n } else if (position === 'top') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientY);\n } else if (position === 'bottom') {\n newSize = dragStartSize.current - (e.clientY - dragStartPos.current);\n } else {\n newSize = dragStartSize.current - (e.clientX - dragStartPos.current);\n }\n if (newSize >= minSize && newSize <= maxSize) {\n setSize(newSize);\n if (cacheKey) {\n localStorage.setItem(cacheKey, String(newSize));\n }\n onResize?.(newSize);\n }\n }\n });\n const handleResizeEnd = useRefFunction(() => {\n setIsDragging(false);\n });\n\n // Monitor drawer ref, calculate size if not set\n // This is useful for initial rendering when size is not provided\n useEffect(() => {\n if (drawerRef && size === undefined) {\n const rect = drawerRef.getBoundingClientRect();\n setSize(position === 'left' || position === 'right' ? rect.width : rect.height);\n }\n }, [drawerRef, position, size]);\n\n // Controlled open state\n useEffect(() => {\n setIsOpen(open);\n }, [open]);\n\n // Handle global events\n useEffect(() => {\n if (isDragging) {\n window.addEventListener('mousemove', handleResize);\n window.addEventListener('mouseup', handleResizeEnd);\n } else {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n }\n return () => {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n };\n }, [isDragging]);\n\n return wrapCSSVar(\n <div\n className={classString}\n style={{\n // @ts-expect-error: because of dynamic CSS variables\n '--edge-offset': typeof edgeOffset === 'number' ? `${edgeOffset}px` : edgeOffset,\n ...style,\n }}\n onClick={onClick}\n >\n <div\n ref={setDrawerRef}\n className={classNames(`${prefixCls}-drawer`, classNamesInProps?.drawer)}\n style={{ ...sizeMap, ...styles?.drawer }}\n >\n {resizable && (\n <div\n className={classNames(\n `${prefixCls}-resize-handle`,\n isDragging && `${prefixCls}-resize-handle-dragging`,\n classNamesInProps?.resizeHandle\n )}\n style={styles?.resizeHandle}\n onMouseDown={handleResizeStart}\n />\n )}\n <div className={classNames(`${prefixCls}-content`, classNamesInProps?.content)} style={styles?.content}>\n <Card\n bordered={false}\n variant=\"borderless\"\n className={classNames(`${prefixCls}-card`, classNamesInProps?.card)}\n style={styles?.card}\n {...cardProps}\n >\n {children}\n </Card>\n </div>\n {showToggle && (\n <div\n className={classNames(`${prefixCls}-toggle`, classNamesInProps?.toggle)}\n style={styles?.toggle}\n onClick={toggleDrawer}\n >\n <div\n className={classNames(`${prefixCls}-handle-icon`, classNamesInProps?.handleIcon)}\n style={styles?.handleIcon}\n >\n {isOp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