@alifd/chat 0.2.0 → 0.3.0-beta.1

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 (156) hide show
  1. package/es/HTMLRenderer/index.d.ts +4 -0
  2. package/es/HTMLRenderer/index.js +138 -0
  3. package/es/HTMLRenderer/index.less +192 -0
  4. package/es/HTMLRenderer/main.scss +233 -0
  5. package/es/HTMLRenderer/style.d.ts +1 -0
  6. package/es/HTMLRenderer/style.js +1 -0
  7. package/es/HTMLRenderer/types.d.ts +46 -0
  8. package/es/HTMLRenderer/types.js +1 -0
  9. package/es/ImagePreview/index.d.ts +13 -0
  10. package/es/ImagePreview/index.js +72 -0
  11. package/es/ImagePreview/main.scss +15 -0
  12. package/es/ImagePreview/style.d.ts +1 -0
  13. package/es/ImagePreview/style.js +1 -0
  14. package/es/ImagePreview/types.d.ts +31 -0
  15. package/es/ImagePreview/types.js +1 -0
  16. package/es/balloon/index.d.ts +7 -0
  17. package/es/balloon/index.js +7 -0
  18. package/es/balloon/style.d.ts +1 -0
  19. package/es/balloon/style.js +1 -0
  20. package/es/balloon/types.d.ts +219 -0
  21. package/es/balloon/types.js +1 -0
  22. package/es/card-loading/index.d.ts +11 -0
  23. package/es/card-loading/index.js +18 -0
  24. package/es/card-loading/main.scss +5 -0
  25. package/es/card-loading/style.d.ts +2 -0
  26. package/es/card-loading/style.js +2 -0
  27. package/es/card-loading/types.d.ts +10 -0
  28. package/es/card-loading/types.js +1 -0
  29. package/es/feedback/types.d.ts +8 -0
  30. package/es/float-button/hooks/useAutoHide.d.ts +0 -1
  31. package/es/float-button/hooks/useDragable.d.ts +0 -1
  32. package/es/float-button/index.d.ts +0 -1
  33. package/es/icon/index.d.ts +12 -0
  34. package/es/icon/index.js +21 -0
  35. package/es/icon/main.scss +1 -0
  36. package/es/icon/style.d.ts +2 -0
  37. package/es/icon/style.js +2 -0
  38. package/es/icon/types.d.ts +43 -0
  39. package/es/icon/types.js +1 -0
  40. package/es/index.d.ts +8 -0
  41. package/es/index.js +9 -1
  42. package/es/input/index.d.ts +1 -2
  43. package/es/list/index.d.ts +8 -0
  44. package/es/list/index.js +8 -0
  45. package/es/list/style.d.ts +1 -0
  46. package/es/list/style.js +1 -0
  47. package/es/list/types.d.ts +93 -0
  48. package/es/list/types.js +1 -0
  49. package/es/markdown/index.d.ts +6 -0
  50. package/es/markdown/index.js +175 -0
  51. package/es/markdown/main.scss +153 -0
  52. package/es/markdown/style.d.ts +3 -0
  53. package/es/markdown/style.js +3 -0
  54. package/es/markdown/types.d.ts +21 -0
  55. package/es/markdown/types.js +1 -0
  56. package/es/message/index.d.ts +75 -0
  57. package/es/message/index.js +30 -0
  58. package/es/message/main.scss +2 -0
  59. package/es/message/style.d.ts +2 -0
  60. package/es/message/style.js +2 -0
  61. package/es/message/types.d.ts +195 -0
  62. package/es/message/types.js +1 -0
  63. package/es/person-picker/index.d.ts +377 -2
  64. package/es/person-picker/index.js +3 -3
  65. package/es/tab/main.scss +2 -3
  66. package/es/tag/index.d.ts +20 -20
  67. package/es/tag/index.js +2 -2
  68. package/es/tag/main.scss +1 -1
  69. package/es/utils/func.d.ts +1 -0
  70. package/es/utils/func.js +9 -0
  71. package/lib/HTMLRenderer/index.d.ts +4 -0
  72. package/lib/HTMLRenderer/index.js +141 -0
  73. package/lib/HTMLRenderer/index.less +192 -0
  74. package/lib/HTMLRenderer/main.scss +233 -0
  75. package/lib/HTMLRenderer/style.d.ts +1 -0
  76. package/lib/HTMLRenderer/style.js +3 -0
  77. package/lib/HTMLRenderer/types.d.ts +46 -0
  78. package/lib/HTMLRenderer/types.js +2 -0
  79. package/lib/ImagePreview/index.d.ts +13 -0
  80. package/lib/ImagePreview/index.js +75 -0
  81. package/lib/ImagePreview/main.scss +15 -0
  82. package/lib/ImagePreview/style.d.ts +1 -0
  83. package/lib/ImagePreview/style.js +3 -0
  84. package/lib/ImagePreview/types.d.ts +31 -0
  85. package/lib/ImagePreview/types.js +2 -0
  86. package/lib/balloon/index.d.ts +7 -0
  87. package/lib/balloon/index.js +11 -0
  88. package/lib/balloon/style.d.ts +1 -0
  89. package/lib/balloon/style.js +3 -0
  90. package/lib/balloon/types.d.ts +219 -0
  91. package/lib/balloon/types.js +2 -0
  92. package/lib/card/view/card.js +2 -3
  93. package/lib/card-loading/index.d.ts +11 -0
  94. package/lib/card-loading/index.js +21 -0
  95. package/lib/card-loading/main.scss +5 -0
  96. package/lib/card-loading/style.d.ts +2 -0
  97. package/lib/card-loading/style.js +4 -0
  98. package/lib/card-loading/types.d.ts +10 -0
  99. package/lib/card-loading/types.js +2 -0
  100. package/lib/feedback/types.d.ts +8 -0
  101. package/lib/float-button/hooks/useAutoAlign.js +1 -2
  102. package/lib/float-button/hooks/useAutoHide.d.ts +0 -1
  103. package/lib/float-button/hooks/useAutoHide.js +1 -2
  104. package/lib/float-button/hooks/useDragable.d.ts +0 -1
  105. package/lib/float-button/hooks/useDragable.js +1 -2
  106. package/lib/float-button/hooks/useNestleEdge.js +1 -2
  107. package/lib/float-button/hooks/useTriggerType.js +1 -2
  108. package/lib/float-button/index.d.ts +0 -1
  109. package/lib/float-button/util.js +4 -5
  110. package/lib/float-button/view/balloon.js +1 -2
  111. package/lib/float-button/view/drawer.js +1 -2
  112. package/lib/float-button/view/inner-drawer.js +1 -2
  113. package/lib/icon/index.d.ts +12 -0
  114. package/lib/icon/index.js +23 -0
  115. package/lib/icon/main.scss +1 -0
  116. package/lib/icon/style.d.ts +2 -0
  117. package/lib/icon/style.js +4 -0
  118. package/lib/icon/types.d.ts +43 -0
  119. package/lib/icon/types.js +2 -0
  120. package/lib/index.d.ts +8 -0
  121. package/lib/index.js +30 -16
  122. package/lib/input/index.d.ts +1 -2
  123. package/lib/list/index.d.ts +8 -0
  124. package/lib/list/index.js +12 -0
  125. package/lib/list/style.d.ts +1 -0
  126. package/lib/list/style.js +3 -0
  127. package/lib/list/types.d.ts +93 -0
  128. package/lib/list/types.js +2 -0
  129. package/lib/markdown/index.d.ts +6 -0
  130. package/lib/markdown/index.js +178 -0
  131. package/lib/markdown/main.scss +153 -0
  132. package/lib/markdown/style.d.ts +3 -0
  133. package/lib/markdown/style.js +5 -0
  134. package/lib/markdown/types.d.ts +21 -0
  135. package/lib/markdown/types.js +2 -0
  136. package/lib/message/index.d.ts +75 -0
  137. package/lib/message/index.js +32 -0
  138. package/lib/message/main.scss +2 -0
  139. package/lib/message/style.d.ts +2 -0
  140. package/lib/message/style.js +4 -0
  141. package/lib/message/types.d.ts +195 -0
  142. package/lib/message/types.js +2 -0
  143. package/lib/person-picker/index.d.ts +377 -2
  144. package/lib/person-picker/index.js +3 -3
  145. package/lib/tab/main.scss +2 -3
  146. package/lib/tag/index.d.ts +20 -20
  147. package/lib/tag/index.js +2 -2
  148. package/lib/tag/main.scss +1 -1
  149. package/lib/utils/common.js +1 -2
  150. package/lib/utils/dingtalk.js +3 -4
  151. package/lib/utils/func.d.ts +1 -0
  152. package/lib/utils/func.js +12 -3
  153. package/lib/utils/hooks/useControlable.js +1 -2
  154. package/lib/utils/hooks/useDebounce.js +1 -2
  155. package/lib/utils/hooks/useThrottle.js +1 -2
  156. package/package.json +127 -5
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /**
5
+ * @component 图片预览
6
+ * @en ImagePreview
7
+ * @type 通用 - General
8
+ * @remarks 图片预览组件用于在钉钉环境中显示和预览图片。 - Image preview component used to display and preview images in DingTalk environment.
9
+ * @when 需要展示图片并提供预览功能时使用。 - Use when you need to display images and provide preview functionality.
10
+
11
+ */
12
+ const react_1 = tslib_1.__importStar(require("react"));
13
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
14
+ const react_photo_view_1 = require("react-photo-view");
15
+ const utils_1 = require("../utils");
16
+ const next_1 = require("@alifd/next");
17
+ const utils_2 = require("../utils");
18
+ const dingtalk_jsapi_1 = require("dingtalk-jsapi");
19
+ function handleClick(e, src) {
20
+ if ((0, utils_1.findAncestor)(e.target, t => t.tagName === 'A' && !!t.href)) {
21
+ e.stopPropagation();
22
+ return;
23
+ }
24
+ if (src && dingtalk_jsapi_1.env.version) {
25
+ const a = document.createElement('a');
26
+ a.href = src;
27
+ e.stopPropagation();
28
+ dingtalk_jsapi_1.biz.util.previewImage({
29
+ urls: [a.href],
30
+ current: a.href,
31
+ });
32
+ }
33
+ }
34
+ function isInsideLink(e) {
35
+ return !!(0, utils_1.findAncestor)(e.target, (t) => t.tagName === 'A' && !!t.href);
36
+ }
37
+ const ImagePreview = (0, react_1.forwardRef)(({ className, src, children, width, height }, ref) => {
38
+ let child;
39
+ try {
40
+ child = react_1.default.Children.only(children);
41
+ }
42
+ catch (e) { }
43
+ if (child && child.props) {
44
+ const { onClick, onTouchEnd } = child.props;
45
+ child = react_1.default.cloneElement(child, {
46
+ onTouchEnd: (e) => {
47
+ if (isInsideLink(e)) {
48
+ e.stopPropagation();
49
+ }
50
+ handleClick(e, src);
51
+ onTouchEnd === null || onTouchEnd === void 0 ? void 0 : onTouchEnd(e);
52
+ },
53
+ onClick: (e) => {
54
+ if (isInsideLink(e)) {
55
+ e.stopPropagation();
56
+ }
57
+ handleClick(e, src);
58
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
59
+ }
60
+ });
61
+ }
62
+ return (react_1.default.createElement(react_photo_view_1.PhotoProvider, null,
63
+ react_1.default.createElement(react_photo_view_1.PhotoView, { src: src },
64
+ react_1.default.createElement("span", { className: (0, classnames_1.default)('box', className, {
65
+ 'hasWidth': !!width,
66
+ 'hasHeight': !!height,
67
+ }), style: { width } },
68
+ width && height ? (react_1.default.createElement("span", { className: "placeholder", style: { paddingBottom: `${(height / width) * 100}%` } })) : null,
69
+ child))));
70
+ });
71
+ const ImagePreviewWithSub = (0, utils_2.assignSubComponent)(ImagePreview, {
72
+ displayName: 'ImagePreview',
73
+ });
74
+ tslib_1.__exportStar(require("./types"), exports);
75
+ exports.default = next_1.ConfigProvider.config(ImagePreviewWithSub);
@@ -0,0 +1,15 @@
1
+ .box {
2
+ display: inline-block;
3
+ position: relative;
4
+ cursor: zoom-in;
5
+
6
+ a[href] & {
7
+ cursor: pointer;
8
+ }
9
+ }
10
+
11
+ :global {
12
+ .PhotoView__Photo {
13
+ background-color: #fff;
14
+ }
15
+ }
@@ -0,0 +1 @@
1
+ import './main.scss';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("./main.scss");
@@ -0,0 +1,31 @@
1
+ import type React from 'react';
2
+ /**
3
+ * @api ImagePreview
4
+ */
5
+ export interface ImagePreviewProps extends React.HTMLAttributes<HTMLElement> {
6
+ /**
7
+ * 自定义类名
8
+ * @en Custom class name
9
+ */
10
+ className?: string;
11
+ /**
12
+ * 图片的源地址
13
+ * @en Source URL of the image
14
+ */
15
+ src: string;
16
+ /**
17
+ * 子元素
18
+ * @en Child elements
19
+ */
20
+ children?: React.ReactElement;
21
+ /**
22
+ * 图片的宽度
23
+ * @en Width of the image
24
+ */
25
+ width?: number;
26
+ /**
27
+ * 图片的高度
28
+ * @en Height of the image
29
+ */
30
+ height?: number;
31
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @component 气泡提示
3
+ * @en Balloon
4
+ * @type 反馈 - Feedback
5
+ * @when 当用户与被说明对象(文字,图片,输入框等)发生交互行为的 action 开始时,即刻跟随动作出现一种辅助或帮助的提示信息。其中 Balloon.Tooltip 是简化版本,主要用于 hover 时显示简单文案。 - Balloon is used when you hope to show auxiliary or help message during users' interacting with the illustrated object (text, picture, input box, etc.). Particularly, Balloon.Tooltip is a simplified Balloon for displaying tip when hovered. If you want the content to be clickable, use `<Balloon.Tootip delay={100} />`
6
+ */
7
+ export { Balloon as default } from '@alifd/next';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * @component 气泡提示
4
+ * @en Balloon
5
+ * @type 反馈 - Feedback
6
+ * @when 当用户与被说明对象(文字,图片,输入框等)发生交互行为的 action 开始时,即刻跟随动作出现一种辅助或帮助的提示信息。其中 Balloon.Tooltip 是简化版本,主要用于 hover 时显示简单文案。 - Balloon is used when you hope to show auxiliary or help message during users' interacting with the illustrated object (text, picture, input box, etc.). Particularly, Balloon.Tooltip is a simplified Balloon for displaying tip when hovered. If you want the content to be clickable, use `<Balloon.Tootip delay={100} />`
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.default = void 0;
10
+ var next_1 = require("@alifd/next");
11
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return next_1.Balloon; } });
@@ -0,0 +1 @@
1
+ import '@alifd/next/lib/balloon/style2';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("@alifd/next/lib/balloon/style2");
@@ -0,0 +1,219 @@
1
+ import React from 'react';
2
+ import { type CommonProps } from '@alifd/next';
3
+ /**
4
+ * @api Balloon.Tooltip
5
+ * @order 1
6
+ */
7
+ export interface TooltipProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
8
+ /**
9
+ * 样式类名的品牌前缀
10
+ */
11
+ prefix?: string;
12
+ /**
13
+ * 自定义类名
14
+ */
15
+ className?: string;
16
+ /**
17
+ * 自定义内联样式
18
+ */
19
+ style?: React.CSSProperties;
20
+ /**
21
+ * tooltip 的内容
22
+ */
23
+ children?: any;
24
+ /**
25
+ * 弹出层位置
26
+ */
27
+ align?: 't' | 'r' | 'b' | 'l' | 'tl' | 'tr' | 'bl' | 'br' | 'lt' | 'lb' | 'rt' | 'rb';
28
+ /**
29
+ * 触发元素
30
+ */
31
+ trigger?: any;
32
+ /**
33
+ * 触发行为
34
+ * 鼠标悬浮,鼠标点击 ('hover', 'click') 或者它们组成的数组,如 ['hover', 'click'], 强烈不建议使用'focus',若有复杂交互,推荐使用 triggerType 为 click 的 Balloon 组件
35
+ */
36
+ triggerType?: string | Array<string>;
37
+ /**
38
+ * 弹层组件 style,透传给 Popup
39
+ */
40
+ popupStyle?: React.CSSProperties;
41
+ /**
42
+ * 弹层组件 className,透传给 Popup
43
+ */
44
+ popupClassName?: string;
45
+ /**
46
+ * 弹层在触发以后的延时显示,单位毫秒 ms
47
+ */
48
+ delay?: number;
49
+ /**
50
+ * 鼠标放置后的延时显示,单位毫秒 ms
51
+ */
52
+ mouseEnterDelay: number;
53
+ /**
54
+ * 鼠标离开后的延时显示,单位毫秒 ms
55
+ */
56
+ mouseLeaveDelay: number;
57
+ /**
58
+ * 是否 pure render
59
+ */
60
+ pure?: boolean;
61
+ /**
62
+ * 指定浮层渲染的父节点,可以为节点 id 的字符串,也可以返回节点的函数。
63
+ */
64
+ popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
65
+ /**
66
+ * 弹层 id, 传入值才会支持无障碍
67
+ */
68
+ id?: string;
69
+ followTrigger?: boolean;
70
+ /**
71
+ * 开启 v2
72
+ */
73
+ v2?: boolean;
74
+ /**
75
+ * [v2] 箭头是否指向目标元素的中心
76
+ */
77
+ arrowPointToCenter?: boolean;
78
+ }
79
+ interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
80
+ title?: any;
81
+ }
82
+ /**
83
+ * @api Balloon
84
+ * @order 0
85
+ */
86
+ export interface BalloonProps extends HTMLAttributesWeak, CommonProps {
87
+ /**
88
+ * 自定义类名
89
+ */
90
+ className?: string;
91
+ /**
92
+ * 自定义内敛样式
93
+ */
94
+ style?: React.CSSProperties;
95
+ /**
96
+ * 浮层的内容
97
+ */
98
+ children?: any;
99
+ title?: React.ReactNode;
100
+ /**
101
+ * 样式类型
102
+ */
103
+ type?: 'normal' | 'primary';
104
+ /**
105
+ * 弹层当前显示的状态
106
+ */
107
+ visible?: boolean;
108
+ /**
109
+ * 弹层默认显示的状态
110
+ */
111
+ defaultVisible?: boolean;
112
+ /**
113
+ * 弹层在显示和隐藏触发的事件
114
+ */
115
+ onVisibleChange?: (visible: boolean, type: string) => void;
116
+ /**
117
+ * 弹出层对齐方式
118
+ */
119
+ alignEdge?: boolean;
120
+ /**
121
+ * 是否显示关闭按钮
122
+ */
123
+ closable?: boolean;
124
+ /**
125
+ * 弹出层位置
126
+ */
127
+ align?: 't' | 'r' | 'b' | 'l' | 'tl' | 'tr' | 'bl' | 'br' | 'lt' | 'lb' | 'rt' | 'rb';
128
+ /**
129
+ * 弹层相对于 trigger 的定位的微调
130
+ */
131
+ offset?: Array<number>;
132
+ /**
133
+ * 触发元素
134
+ */
135
+ trigger?: any;
136
+ /**
137
+ * 触发行为
138
+ * 鼠标悬浮,鼠标点击 ('hover','click') 或者它们组成的数组,如 ['hover', 'click'], 强烈不建议使用'focus',若弹窗内容有复杂交互请使用 click
139
+ */
140
+ triggerType?: string | Array<string>;
141
+ /**
142
+ * 任何 visible 为 false 时会触发的事件
143
+ */
144
+ onClose?: () => void;
145
+ /**
146
+ * 是否进行自动位置调整
147
+ */
148
+ needAdjust?: boolean;
149
+ /**
150
+ * 弹层在触发以后的延时显示,单位毫秒 ms
151
+ */
152
+ delay?: number;
153
+ /**
154
+ * 鼠标放置后的延时显示,单位毫秒 ms
155
+ */
156
+ mouseEnterDelay: number;
157
+ /**
158
+ * 鼠标离开后的延时显示,单位毫秒 ms
159
+ */
160
+ mouseLeaveDelay: number;
161
+ /**
162
+ * 浮层关闭后触发的事件,如果有动画,则在动画结束后触发
163
+ */
164
+ afterClose?: () => void;
165
+ /**
166
+ * 强制更新定位信息
167
+ */
168
+ shouldUpdatePosition?: boolean;
169
+ /**
170
+ * 弹层出现后是否自动 focus 到内部第一个元素
171
+ */
172
+ autoFocus?: boolean;
173
+ /**
174
+ * 安全节点:对于 triggetType 为 click 的浮层,会在点击除了浮层外的其它区域时关闭浮层.safeNode 用于添加不触发关闭的节点,值可以是 dom 节点的 id 或者是节点的 dom 对象
175
+ */
176
+ safeNode?: any;
177
+ /**
178
+ * 用来指定 safeNode 节点的 id,和 safeNode 配合使用
179
+ */
180
+ safeId?: string;
181
+ /**
182
+ * 配置动画的播放方式
183
+ */
184
+ animation?: any | boolean;
185
+ /**
186
+ * 弹层的 dom 节点关闭时是否删除
187
+ */
188
+ cache?: boolean;
189
+ /**
190
+ * 指定浮层渲染的父节点,可以为节点 id 的字符串,也可以返回节点的函数。
191
+ */
192
+ popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
193
+ /**
194
+ * 弹层组件 style,透传给 Popup
195
+ */
196
+ popupStyle?: React.CSSProperties;
197
+ /**
198
+ * 弹层组件 className,透传给 Popup
199
+ */
200
+ popupClassName?: string;
201
+ /**
202
+ * 弹层 id, 传入值才会支持无障碍
203
+ */
204
+ id?: string;
205
+ followTrigger?: boolean;
206
+ /**
207
+ * 开启 v2
208
+ */
209
+ v2?: boolean;
210
+ /**
211
+ * [v2] 箭头是否指向目标元素的中心
212
+ */
213
+ arrowPointToCenter?: boolean;
214
+ /**
215
+ * [v2] 是否进行自动位置调整,默认自动开启
216
+ */
217
+ autoAdjust?: boolean;
218
+ }
219
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCardOuter = exports.useCardInner = void 0;
3
+ exports.useCardInner = useCardInner;
4
+ exports.useCardOuter = useCardOuter;
4
5
  const tslib_1 = require("tslib");
5
6
  const next_1 = require("@alifd/next");
6
7
  const react_1 = tslib_1.__importDefault(require("react"));
@@ -28,14 +29,12 @@ function useCardInner({ prefix, innerClassName, title, titleAlign, titleLine, fo
28
29
  }) }, children),
29
30
  !!footer && (react_1.default.createElement(Footer, { prefix: `${cls}-footer`, className: (0, classnames_1.default)(`${cls}-footer`, { [`${cls}-footer--line`]: footerLine }), align: footerAlign }, footer))));
30
31
  }
31
- exports.useCardInner = useCardInner;
32
32
  function useCardOuter(props) {
33
33
  const { prefix, className, title, titleAlign, titleLine, footer, footerAlign, footerLine, size = 'medium', noPadding, components, children, innerClassName } = props, rests = tslib_1.__rest(props, ["prefix", "className", "title", "titleAlign", "titleLine", "footer", "footerAlign", "footerLine", "size", "noPadding", "components", "children", "innerClassName"]);
34
34
  const cls = prefix;
35
35
  const rootCls = (0, classnames_1.default)(cls, `${cls}--${size}`, { [`${cls}--no-padding`]: noPadding }, className);
36
36
  return (react_1.default.createElement("div", Object.assign({ className: rootCls }, rests), children));
37
37
  }
38
- exports.useCardOuter = useCardOuter;
39
38
  /**
40
39
  * @component 卡片
41
40
  * @en Card
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @component CardLoading
3
+ * @en CardLoading
4
+ * @type 通用 - General
5
+ * @when CardLoading
6
+ */
7
+ import React from 'react';
8
+ import type { CardLoadingRef, CardLoadingProps } from './types';
9
+ export * from './types';
10
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<CardLoadingProps & React.RefAttributes<CardLoadingRef>, "key" | keyof CardLoadingProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, CardLoadingRef, {}>;
11
+ export default _default;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * @component CardLoading
4
+ * @en CardLoading
5
+ * @type 通用 - General
6
+ * @when CardLoading
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ const tslib_1 = require("tslib");
10
+ const react_1 = tslib_1.__importStar(require("react"));
11
+ const next_1 = require("@alifd/next");
12
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
13
+ const utils_1 = require("../utils");
14
+ const CardLoading = (0, react_1.forwardRef)(({ className }, ref) => {
15
+ return (react_1.default.createElement("div", { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}card-loading`, className) }, "\u5361\u7247\u52A0\u8F7D\u4E2D"));
16
+ });
17
+ const CardLoadingWithSub = (0, utils_1.assignSubComponent)(CardLoading, {
18
+ displayName: 'CardLoading',
19
+ });
20
+ tslib_1.__exportStar(require("./types"), exports);
21
+ exports.default = next_1.ConfigProvider.config(CardLoadingWithSub);
@@ -0,0 +1,5 @@
1
+ @import "../core/variables.scss";
2
+
3
+ .#{$prefix}card-loading {
4
+
5
+ }
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/button/style2';
2
+ import './main.scss';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("@alifd/next/lib/button/style2");
4
+ require("./main.scss");
@@ -0,0 +1,10 @@
1
+ import type * as React from 'react';
2
+ import { type CommonProps } from '@alifd/next';
3
+ export interface CardLoadingRef {
4
+ }
5
+ /**
6
+ * @api CardLoading
7
+ */
8
+ export interface CardLoadingProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
9
+ className?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -47,6 +47,14 @@ export interface FeedbackProps extends HTMLAttributesWeek {
47
47
  * @defaultValue 'hoz'
48
48
  */
49
49
  direction?: 'ver' | 'hoz';
50
+ /**
51
+ * 是否需要分享按钮
52
+ */
53
+ needShare?: boolean;
54
+ /**
55
+ * 是否需要分享按钮
56
+ */
57
+ onShareClick?: () => void;
50
58
  }
51
59
  /**
52
60
  * @api Feedback.Good
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAutoAlign = void 0;
3
+ exports.useAutoAlign = useAutoAlign;
4
4
  const react_1 = require("react");
5
5
  const util_1 = require("../util");
6
6
  const utils_1 = require("../../utils");
@@ -46,4 +46,3 @@ function useAutoAlign(_dom, trigger, { enable, defaultAlign, }) {
46
46
  update: throttleUpdate,
47
47
  };
48
48
  }
49
- exports.useAutoAlign = useAutoAlign;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Edge, Position } from '../types';
3
2
  /**
4
3
  * 自动隐藏悬浮球逻辑
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAutoHide = void 0;
3
+ exports.useAutoHide = useAutoHide;
4
4
  const react_1 = require("react");
5
5
  const util_1 = require("../util");
6
6
  const utils_1 = require("../../utils");
@@ -158,4 +158,3 @@ function useAutoHide(dom, { enable, leftSize, interactiveEdges, }) {
158
158
  saveRestorePosition,
159
159
  };
160
160
  }
161
- exports.useAutoHide = useAutoHide;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { DragableOption } from '../types';
3
2
  /**
4
3
  * 拖拽逻辑
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useDragable = void 0;
3
+ exports.useDragable = useDragable;
4
4
  const react_1 = require("react");
5
5
  const util_1 = require("../util");
6
6
  function normalizePositionRatio(ratio) {
@@ -130,4 +130,3 @@ function useDragable(dom, options) {
130
130
  {},
131
131
  };
132
132
  }
133
- exports.useDragable = useDragable;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useNestleEdge = void 0;
3
+ exports.useNestleEdge = useNestleEdge;
4
4
  const react_1 = require("react");
5
5
  const utils_1 = require("../../utils");
6
6
  const util_1 = require("../util");
@@ -84,4 +84,3 @@ function useNestleEdge(dom, { enable, safeAreaMargin, interactiveEdges, onUpdate
84
84
  update: throttleUpdate,
85
85
  };
86
86
  }
87
- exports.useNestleEdge = useNestleEdge;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useTriggerType = void 0;
3
+ exports.useTriggerType = useTriggerType;
4
4
  const utils_1 = require("../../utils");
5
5
  function normalizeTriggerType(triggerType, defaultTriggerType) {
6
6
  if (!triggerType) {
@@ -32,4 +32,3 @@ function useTriggerType({ triggerType, visible, onVisibleChange, }) {
32
32
  }
33
33
  return triggerHandlerProps;
34
34
  }
35
- exports.useTriggerType = useTriggerType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const FloatButtonWithSub: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").FloatButtonProps & import("react").RefAttributes<import("./types").FloatButtonRef>, "key" | keyof import("./types").FloatButtonProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").FloatButtonRef, {}> & {
3
2
  Backtop: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef>, "key" | keyof import("./types").BacktopProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").BacktopRef, {}>;
4
3
  Drawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.adjustBySafeAreaMargin = exports.isInScreen = exports.getNearlyEdge = exports.getScreenSize = void 0;
3
+ exports.getScreenSize = getScreenSize;
4
+ exports.getNearlyEdge = getNearlyEdge;
5
+ exports.isInScreen = isInScreen;
6
+ exports.adjustBySafeAreaMargin = adjustBySafeAreaMargin;
4
7
  function getScreenSize() {
5
8
  return {
6
9
  width: document.documentElement.clientWidth,
7
10
  height: document.documentElement.clientHeight,
8
11
  };
9
12
  }
10
- exports.getScreenSize = getScreenSize;
11
13
  function getNearlyEdge(el, interactiveEdges, rect = el.getBoundingClientRect()) {
12
14
  if (!(interactiveEdges === null || interactiveEdges === void 0 ? void 0 : interactiveEdges.length)) {
13
15
  return [];
@@ -41,7 +43,6 @@ function getNearlyEdge(el, interactiveEdges, rect = el.getBoundingClientRect())
41
43
  .sort((a, b) => (a.size > b.size ? 1 : -1));
42
44
  return [closest.edge, subClosest === null || subClosest === void 0 ? void 0 : subClosest.edge];
43
45
  }
44
- exports.getNearlyEdge = getNearlyEdge;
45
46
  function isInScreen(dom) {
46
47
  const rect = dom.getBoundingClientRect();
47
48
  const { width, height } = getScreenSize();
@@ -50,7 +51,6 @@ function isInScreen(dom) {
50
51
  const bottom = height - rect.top - rect.height;
51
52
  return [left, top, right, bottom].every(n => n >= 0);
52
53
  }
53
- exports.isInScreen = isInScreen;
54
54
  function adjustBySafeAreaMargin(position, rect, safeAreaMargin) {
55
55
  if (!position || !rect || !safeAreaMargin) {
56
56
  return undefined;
@@ -71,4 +71,3 @@ function adjustBySafeAreaMargin(position, rect, safeAreaMargin) {
71
71
  top: makeInRange(position.top, Math.max(0, top), Math.min(height, height - rect.height - bottom)),
72
72
  };
73
73
  }
74
- exports.adjustBySafeAreaMargin = adjustBySafeAreaMargin;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Balloon = void 0;
3
+ exports.Balloon = Balloon;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const next_1 = require("@alifd/next");
@@ -13,4 +13,3 @@ function Balloon(props) {
13
13
  });
14
14
  return react_1.default.createElement(next_1.Balloon, Object.assign({}, rests, { align: currentAlign }));
15
15
  }
16
- exports.Balloon = Balloon;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Drawer = void 0;
3
+ exports.Drawer = Drawer;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const next_1 = require("@alifd/next");
@@ -15,7 +15,6 @@ function Drawer(_a) {
15
15
  onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(false, reason);
16
16
  }, v2: true }), children)));
17
17
  }
18
- exports.Drawer = Drawer;
19
18
  function FloatButtonDrawer(_a) {
20
19
  var { width, title, drawerClassName, cache = false, beforeOpen, afterOpen, beforeClose, afterClose } = _a, rests = tslib_1.__rest(_a, ["width", "title", "drawerClassName", "cache", "beforeOpen", "afterOpen", "beforeClose", "afterClose"]);
21
20
  return (react_1.default.createElement(float_button_1.default, Object.assign({}, rests, { _renderView: (prefix, { visible, onVisibleChange, trigger, triggerType, showClose, children }) => {