@chlp-tech/rpa-ui 0.0.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 (116) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/dist/account-select/imgs/down.svg +24 -0
  4. package/dist/account-select/imgs/fb-disabled.svg +27 -0
  5. package/dist/account-select/imgs/fb.svg +20 -0
  6. package/dist/account-select/imgs/up.svg +20 -0
  7. package/dist/account-select/index.d.ts +39 -0
  8. package/dist/account-select/index.js +221 -0
  9. package/dist/account-select/index.module.less +58 -0
  10. package/dist/ai-empty/index.d.ts +3 -0
  11. package/dist/ai-empty/index.js +51 -0
  12. package/dist/ai-empty/index.module.less +60 -0
  13. package/dist/batch-label/index.d.ts +14 -0
  14. package/dist/batch-label/index.js +215 -0
  15. package/dist/batch-label/index.module.less +96 -0
  16. package/dist/card-scroll/index.d.ts +6 -0
  17. package/dist/card-scroll/index.js +75 -0
  18. package/dist/components/modal/index.d.ts +16 -0
  19. package/dist/components/modal/index.js +70 -0
  20. package/dist/cover-modal/boll.gif +0 -0
  21. package/dist/cover-modal/delete.svg +24 -0
  22. package/dist/cover-modal/index.d.ts +20 -0
  23. package/dist/cover-modal/index.js +410 -0
  24. package/dist/cover-modal/index.module.less +76 -0
  25. package/dist/cover-modal/question.svg +1 -0
  26. package/dist/cover-modal/upload.png +0 -0
  27. package/dist/custom.d.ts +10 -0
  28. package/dist/drawer-task/img/back.png +0 -0
  29. package/dist/drawer-task/img/close.svg +18 -0
  30. package/dist/drawer-task/img/icon.svg +20 -0
  31. package/dist/drawer-task/index.d.ts +24 -0
  32. package/dist/drawer-task/index.js +130 -0
  33. package/dist/drawer-task/index.module.less +85 -0
  34. package/dist/dynamic-form/index.d.ts +33 -0
  35. package/dist/dynamic-form/index.js +154 -0
  36. package/dist/excel-import/excel-import.module.less +32 -0
  37. package/dist/excel-import/index.d.ts +10 -0
  38. package/dist/excel-import/index.js +76 -0
  39. package/dist/form-item/index.d.ts +12 -0
  40. package/dist/form-item/index.js +34 -0
  41. package/dist/form-item/index.module.less +45 -0
  42. package/dist/index.d.ts +22 -0
  43. package/dist/index.js +22 -0
  44. package/dist/label-select/imgs/close.svg +24 -0
  45. package/dist/label-select/imgs/plus.svg +24 -0
  46. package/dist/label-select/index.d.ts +10 -0
  47. package/dist/label-select/index.js +173 -0
  48. package/dist/label-select/index.module.less +25 -0
  49. package/dist/layout/index.d.ts +3 -0
  50. package/dist/layout/index.js +10 -0
  51. package/dist/layout/index.module.less +6 -0
  52. package/dist/link-filter/index.d.ts +25 -0
  53. package/dist/link-filter/index.js +242 -0
  54. package/dist/link-filter/index.module.less +7 -0
  55. package/dist/media-play/close.svg +1 -0
  56. package/dist/media-play/index.d.ts +13 -0
  57. package/dist/media-play/index.js +245 -0
  58. package/dist/media-play/index.module.less +196 -0
  59. package/dist/media-play/play.svg +17 -0
  60. package/dist/modal-wrapper/index.d.ts +17 -0
  61. package/dist/modal-wrapper/index.js +66 -0
  62. package/dist/publish-account/imgs/close.svg +25 -0
  63. package/dist/publish-account/imgs/fb.svg +20 -0
  64. package/dist/publish-account/imgs/ins.svg +36 -0
  65. package/dist/publish-account/imgs/tk.svg +31 -0
  66. package/dist/publish-account/imgs/tt.svg +21 -0
  67. package/dist/publish-account/imgs/yt.svg +25 -0
  68. package/dist/publish-account/index.d.ts +31 -0
  69. package/dist/publish-account/index.js +118 -0
  70. package/dist/publish-account/index.module.less +70 -0
  71. package/dist/publish-status/imgs/fail.svg +22 -0
  72. package/dist/publish-status/imgs/process.svg +24 -0
  73. package/dist/publish-status/imgs/publish.svg +24 -0
  74. package/dist/publish-status/imgs/success.svg +22 -0
  75. package/dist/publish-status/imgs/wait.svg +22 -0
  76. package/dist/publish-status/index.d.ts +5 -0
  77. package/dist/publish-status/index.js +55 -0
  78. package/dist/publish-status/index.module.less +8 -0
  79. package/dist/release-manage/index.d.ts +6 -0
  80. package/dist/release-manage/index.js +5 -0
  81. package/dist/release-manage/release-title/index.d.ts +10 -0
  82. package/dist/release-manage/release-title/index.js +94 -0
  83. package/dist/release-manage/release-title/index.module.less +21 -0
  84. package/dist/release-manage/release-title/plus.svg +20 -0
  85. package/dist/release-video-card/imgs/detail.svg +21 -0
  86. package/dist/release-video-card/imgs/edit.svg +19 -0
  87. package/dist/release-video-card/imgs/fail.svg +22 -0
  88. package/dist/release-video-card/imgs/fb.svg +20 -0
  89. package/dist/release-video-card/imgs/ins.svg +34 -0
  90. package/dist/release-video-card/imgs/more.svg +18 -0
  91. package/dist/release-video-card/imgs/new.svg +22 -0
  92. package/dist/release-video-card/imgs/play.svg +17 -0
  93. package/dist/release-video-card/imgs/process.svg +24 -0
  94. package/dist/release-video-card/imgs/publish.svg +24 -0
  95. package/dist/release-video-card/imgs/success.svg +22 -0
  96. package/dist/release-video-card/imgs/tk.svg +29 -0
  97. package/dist/release-video-card/imgs/tw.svg +21 -0
  98. package/dist/release-video-card/imgs/wait.svg +22 -0
  99. package/dist/release-video-card/imgs/yt.svg +25 -0
  100. package/dist/release-video-card/imgs/ytb.svg +1 -0
  101. package/dist/release-video-card/index.d.ts +35 -0
  102. package/dist/release-video-card/index.js +221 -0
  103. package/dist/release-video-card/index.module.less +223 -0
  104. package/dist/sound-wave/index.d.ts +3 -0
  105. package/dist/sound-wave/index.js +22 -0
  106. package/dist/sound-wave/index.module.less +105 -0
  107. package/dist/text-ellipsis/index.d.ts +8 -0
  108. package/dist/text-ellipsis/index.js +57 -0
  109. package/dist/text-ellipsis/index.module.less +8 -0
  110. package/dist/utils/index.d.ts +8 -0
  111. package/dist/utils/index.js +101 -0
  112. package/dist/video-list/delete.svg +26 -0
  113. package/dist/video-list/index.d.ts +46 -0
  114. package/dist/video-list/index.js +219 -0
  115. package/dist/video-list/index.module.less +127 -0
  116. package/package.json +83 -0
@@ -0,0 +1,221 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useState } from "react";
8
+ import { Spin, Space, Image, Dropdown, Popover } from "antd";
9
+ import { MediaPlay, TextEllipsis } from "./..";
10
+ import FB from "./imgs/fb.svg";
11
+ import INS from "./imgs/ins.svg";
12
+ import TK from "./imgs/tk.svg";
13
+ import TW from "./imgs/tw.svg";
14
+ import YT from "./imgs/yt.svg";
15
+ import Publish from "./imgs/publish.svg";
16
+ import More from "./imgs/more.svg";
17
+ import New from "./imgs/new.svg";
18
+ import Process from "./imgs/process.svg";
19
+ import Wait from "./imgs/wait.svg";
20
+ import Success from "./imgs/success.svg";
21
+ import Fail from "./imgs/fail.svg";
22
+ import styles from "./index.module.less";
23
+ var statusTag = {
24
+ 0: {
25
+ bgColor: '#ECEFF4',
26
+ textColor: '#3F5270',
27
+ text: '草稿',
28
+ icon: Process
29
+ },
30
+ 1: {
31
+ bgColor: '#FFF5E9',
32
+ textColor: '#FF8800',
33
+ text: '待发布',
34
+ icon: Wait
35
+ },
36
+ 2: {
37
+ bgColor: '#E0FFDD',
38
+ textColor: '#3BC92B',
39
+ text: '发布成功',
40
+ icon: Success
41
+ },
42
+ 3: {
43
+ bgColor: '#FEECEC',
44
+ textColor: '#FA4441',
45
+ text: '发布异常',
46
+ icon: Fail
47
+ },
48
+ 4: {
49
+ bgColor: '#E9F1FF',
50
+ textColor: '#004FD3',
51
+ text: '发布中',
52
+ icon: Publish
53
+ }
54
+ };
55
+ var mediaIcon = {
56
+ 'fb': FB,
57
+ 'ins': INS,
58
+ 'tk': TK,
59
+ 'tw': TW,
60
+ 'yt': YT
61
+ };
62
+ var StatusTag = function StatusTag(_ref) {
63
+ var _statusTag$status, _statusTag$status2, _statusTag$status3, _statusTag$status4;
64
+ var _ref$status = _ref.status,
65
+ status = _ref$status === void 0 ? 0 : _ref$status;
66
+ return /*#__PURE__*/React.createElement("div", {
67
+ className: styles['status-tag'],
68
+ style: {
69
+ backgroundColor: (_statusTag$status = statusTag[status]) === null || _statusTag$status === void 0 ? void 0 : _statusTag$status.bgColor,
70
+ color: (_statusTag$status2 = statusTag[status]) === null || _statusTag$status2 === void 0 ? void 0 : _statusTag$status2.textColor
71
+ }
72
+ }, /*#__PURE__*/React.createElement("img", {
73
+ src: (_statusTag$status3 = statusTag[status]) === null || _statusTag$status3 === void 0 ? void 0 : _statusTag$status3.icon,
74
+ alt: ''
75
+ }), /*#__PURE__*/React.createElement("div", null, (_statusTag$status4 = statusTag[status]) === null || _statusTag$status4 === void 0 ? void 0 : _statusTag$status4.text));
76
+ };
77
+ var MediaCardList = function MediaCardList(props) {
78
+ var _useState = useState(null),
79
+ _useState2 = _slicedToArray(_useState, 2),
80
+ activeItem = _useState2[0],
81
+ setActiveItem = _useState2[1];
82
+ return /*#__PURE__*/React.createElement(Space, {
83
+ size: 12
84
+ }, props.list.map(function (item, index) {
85
+ var _props$popoverContent;
86
+ return /*#__PURE__*/React.createElement(Popover, {
87
+ key: index,
88
+ content: activeItem ? (_props$popoverContent = props.popoverContent) === null || _props$popoverContent === void 0 ? void 0 : _props$popoverContent.call(props, activeItem) : /*#__PURE__*/React.createElement("div", null, "Default content"),
89
+ arrow: false,
90
+ onOpenChange: function onOpenChange(visible) {
91
+ if (visible) {
92
+ setActiveItem(item);
93
+ } else {
94
+ setActiveItem(null);
95
+ }
96
+ }
97
+ }, /*#__PURE__*/React.createElement("div", {
98
+ className: styles["media-wrap"],
99
+ style: {
100
+ cursor: 'pointer'
101
+ }
102
+ }, /*#__PURE__*/React.createElement(Image, {
103
+ src: mediaIcon[item.media],
104
+ preview: false,
105
+ width: 24
106
+ }), /*#__PURE__*/React.createElement("div", {
107
+ className: styles["media-round"]
108
+ }, item.count)));
109
+ }));
110
+ };
111
+ var ReleaseVideoCard = function ReleaseVideoCard(props) {
112
+ var _props$mediaInfo, _props$countData$view, _props$countData, _props$countData$like, _props$countData2, _props$countData$comm, _props$countData3, _ref2, _props$editComponent, _props$detailComponen;
113
+ return /*#__PURE__*/React.createElement("div", {
114
+ className: styles['card']
115
+ }, /*#__PURE__*/React.createElement("div", {
116
+ className: styles['card__body']
117
+ }, /*#__PURE__*/React.createElement("div", {
118
+ style: {
119
+ width: 120,
120
+ borderRadius: 8,
121
+ overflow: "hidden",
122
+ position: "relative"
123
+ }
124
+ }, /*#__PURE__*/React.createElement(MediaPlay, {
125
+ url: props.mediaInfo.url,
126
+ type: props.mediaInfo.type,
127
+ previewUrl: props.mediaInfo.previewUrl,
128
+ onPlayClick: props.mediaInfo.onPlayClick
129
+ }), /*#__PURE__*/React.createElement("div", {
130
+ className: styles.video_wrap_desc
131
+ }, props.lang && /*#__PURE__*/React.createElement("div", {
132
+ className: styles.circle_block,
133
+ style: {
134
+ background: "linear-gradient(90deg, #F42E47 0%, #6E3EE1 100%)"
135
+ }
136
+ }, props.lang), props.time && /*#__PURE__*/React.createElement("div", {
137
+ className: styles.circle_block,
138
+ style: {
139
+ background: "rgba(0, 0, 0, 0.5)"
140
+ }
141
+ }, props.time))), /*#__PURE__*/React.createElement(Space, {
142
+ direction: 'vertical',
143
+ size: 20,
144
+ className: styles['card__header']
145
+ }, /*#__PURE__*/React.createElement("div", {
146
+ style: ((_props$mediaInfo = props.mediaInfo) === null || _props$mediaInfo === void 0 ? void 0 : _props$mediaInfo.type) === 'video' ? {} : {
147
+ visibility: 'hidden'
148
+ }
149
+ }, /*#__PURE__*/React.createElement(TextEllipsis, {
150
+ lines: 1
151
+ }, "\u6807\u9898\uFF1A", props.title || '- -')), /*#__PURE__*/React.createElement("div", {
152
+ style: {
153
+ height: 72
154
+ }
155
+ }, /*#__PURE__*/React.createElement(TextEllipsis, {
156
+ lines: 3
157
+ }, "\u63CF\u8FF0\uFF1A", props.desc || '- -')), /*#__PURE__*/React.createElement("div", {
158
+ className: styles['card__header__block']
159
+ }, /*#__PURE__*/React.createElement("div", {
160
+ className: styles['center']
161
+ }, "\u6D4F\u89C8\u91CF ", /*#__PURE__*/React.createElement("span", {
162
+ className: styles['card__header__block__desc']
163
+ }, (_props$countData$view = (_props$countData = props.countData) === null || _props$countData === void 0 ? void 0 : _props$countData.views) !== null && _props$countData$view !== void 0 ? _props$countData$view : '- -')), /*#__PURE__*/React.createElement("div", {
164
+ className: styles['center']
165
+ }, "\u70B9\u8D5E\u6570 ", /*#__PURE__*/React.createElement("span", {
166
+ className: styles['card__header__block__desc']
167
+ }, (_props$countData$like = (_props$countData2 = props.countData) === null || _props$countData2 === void 0 ? void 0 : _props$countData2.likes) !== null && _props$countData$like !== void 0 ? _props$countData$like : '- -')), /*#__PURE__*/React.createElement("div", {
168
+ className: styles['center']
169
+ }, "\u8BC4\u8BBA\u6570 ", /*#__PURE__*/React.createElement("span", {
170
+ className: styles['card__header__block__desc']
171
+ }, (_props$countData$comm = (_props$countData3 = props.countData) === null || _props$countData3 === void 0 ? void 0 : _props$countData3.comments) !== null && _props$countData$comm !== void 0 ? _props$countData$comm : '- -'))), /*#__PURE__*/React.createElement("div", {
172
+ className: styles['card__header__status']
173
+ }, /*#__PURE__*/React.createElement("div", {
174
+ className: styles['card__header__status__flex']
175
+ }, /*#__PURE__*/React.createElement(StatusTag, {
176
+ status: props.status
177
+ }), /*#__PURE__*/React.createElement("div", {
178
+ className: styles['card__header__status__desc']
179
+ }, props.createTime)), props.status === 4 ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Spin, {
180
+ spinning: true
181
+ })) : null))), /*#__PURE__*/React.createElement("div", {
182
+ className: styles['card__line']
183
+ }), /*#__PURE__*/React.createElement("div", {
184
+ className: styles['foot-wrap']
185
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MediaCardList, {
186
+ list: (_ref2 = props.mediaList) !== null && _ref2 !== void 0 ? _ref2 : [],
187
+ popoverContent: props.popoverContent
188
+ })), /*#__PURE__*/React.createElement("div", {
189
+ className: styles['right-wrap']
190
+ }, /*#__PURE__*/React.createElement(Space, {
191
+ size: 8,
192
+ style: {
193
+ marginRight: 12,
194
+ cursor: 'pointer'
195
+ }
196
+ }, [0, 1].includes(props.status) ? /*#__PURE__*/React.createElement(React.Fragment, null, (_props$editComponent = props.editComponent) !== null && _props$editComponent !== void 0 ? _props$editComponent : /*#__PURE__*/React.createElement("span", null, "\u7F16\u8F91")) : [2, 3].includes(props.status) ? /*#__PURE__*/React.createElement(React.Fragment, null, (_props$detailComponen = props.detailComponent) !== null && _props$detailComponen !== void 0 ? _props$detailComponen : /*#__PURE__*/React.createElement("span", null, "\u8BE6\u60C5")) : null), /*#__PURE__*/React.createElement(Dropdown, {
197
+ trigger: ['click'],
198
+ menu: {
199
+ items: [{
200
+ label: '删除',
201
+ key: 'delete',
202
+ onClick: function onClick() {
203
+ return (props === null || props === void 0 ? void 0 : props.onDelete) && props.onDelete(props.id);
204
+ }
205
+ }]
206
+ }
207
+ }, /*#__PURE__*/React.createElement("div", {
208
+ style: {
209
+ cursor: "pointer"
210
+ }
211
+ }, /*#__PURE__*/React.createElement(Image, {
212
+ src: More,
213
+ preview: false
214
+ }))))), props.isNew && /*#__PURE__*/React.createElement("div", {
215
+ className: styles['new-position']
216
+ }, /*#__PURE__*/React.createElement(Image, {
217
+ src: New,
218
+ preview: false
219
+ })));
220
+ };
221
+ export default ReleaseVideoCard;
@@ -0,0 +1,223 @@
1
+ .card {
2
+ padding: 16px;
3
+ background: #FFFFFF;
4
+ border-radius: 8px;
5
+ border: 1px solid #D4DBE7;
6
+ position: relative;
7
+
8
+ &__body {
9
+ display: flex;
10
+ gap: 16px;
11
+ }
12
+
13
+ &__video {
14
+ width: 120px;
15
+ height: 100%;
16
+ object-fit: fill;
17
+ }
18
+
19
+ &__header {
20
+ font-weight: 500;
21
+ font-size: 16px;
22
+ color: #142A51;
23
+ line-height: 22px;
24
+ text-align: left;
25
+ font-style: normal;
26
+ flex: 1;
27
+ &__desc {
28
+ font-weight: 400;
29
+ font-size: 14px;
30
+ width: auto;
31
+ overflow: hidden;
32
+ display: -webkit-box;
33
+ -webkit-line-clamp: 3;
34
+ -webkit-box-orient: vertical;
35
+ word-break: break-all;
36
+ text-overflow: ellipsis;
37
+ line-height: 1.5;
38
+ max-height: calc(1.5em * 3);
39
+ }
40
+ &__block {
41
+ display: flex;
42
+ justify-content: space-between;
43
+ align-items: center;
44
+ font-weight: 400;
45
+ font-size: 12px;
46
+ color: #5E626C;
47
+ line-height: 17px;
48
+
49
+ &__desc {
50
+ font-weight: 500;
51
+ font-size: 18px;
52
+ color: #142A51;
53
+ line-height: 25px;
54
+ margin-left: 2px;
55
+ }
56
+ }
57
+
58
+ &__status {
59
+ display: flex;
60
+ justify-content: space-between;
61
+ align-items: center;
62
+ &__flex {
63
+ display: flex;
64
+ gap: 8px;
65
+ align-items: center;
66
+ }
67
+ &__desc {
68
+ font-weight: 400;
69
+ font-size: 14px;
70
+ color: #9EA7B5;
71
+ line-height: 20px;
72
+ }
73
+ }
74
+ }
75
+
76
+ &__line {
77
+ width: 100%;
78
+ height: 1px;
79
+ background: #ECEFF4;
80
+ margin: 24px 0;
81
+ }
82
+ }
83
+
84
+
85
+ .status-tag {
86
+ border-radius: 4px;
87
+ padding: 2px 8px;
88
+ display: flex;
89
+ align-items: center;
90
+ gap: 4px;
91
+ font-size: 14px;
92
+ }
93
+
94
+ .media-wrap {
95
+ background: #FFFFFF;
96
+ border-radius: 18px;
97
+ border: 1px solid #D4DBE7;
98
+ color: #004FD3;
99
+ padding: 2px;
100
+ display: flex;
101
+ justify-content: space-between;
102
+ align-items: center;
103
+ //min-width: 61px;
104
+ .media-round {
105
+ padding: 2px 7px;
106
+ margin-left: 10px;
107
+ background: #E9F1FF;
108
+ border-radius: 11px;
109
+ text-align: center;
110
+ }
111
+ }
112
+
113
+ .foot-wrap {
114
+ display: flex;
115
+ align-items: center;
116
+ justify-content: space-between;
117
+
118
+ .right-wrap {
119
+ display: flex;
120
+ }
121
+ }
122
+
123
+
124
+ .new-position {
125
+ position: absolute;
126
+ top: -12px;
127
+ right: 0;
128
+ z-index: 10;
129
+ }
130
+
131
+
132
+ .center {
133
+ display: flex;
134
+ align-items: center;
135
+ }
136
+
137
+ .desc_wrap {
138
+ display: -webkit-box;
139
+ -webkit-box-orient: vertical;
140
+ overflow: hidden;
141
+ -webkit-line-clamp: 3;
142
+ word-break: break-all;
143
+ max-height: 72px;
144
+ text-overflow: ellipsis;
145
+ }
146
+
147
+ .single-line-text {
148
+ width: auto;
149
+ white-space: nowrap;
150
+ overflow: hidden;
151
+ text-overflow: ellipsis;
152
+ }
153
+
154
+
155
+ .video_wrap {
156
+ position: relative;
157
+ border: 2px solid transparent;
158
+ border-radius: 8px;
159
+ overflow: hidden;
160
+ cursor: pointer;
161
+ box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
162
+ transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
163
+ will-change: transform;
164
+
165
+ &:hover {
166
+ transform: translateY(-10px);
167
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
168
+ }
169
+
170
+ &_check, &_delete {
171
+ opacity: 0;
172
+ visibility: hidden;
173
+ transition: opacity 0.3s ease, visibility 0.3s ease;
174
+ }
175
+
176
+ &:hover &_check, &:hover &_delete {
177
+ opacity: 1;
178
+ visibility: visible;
179
+ }
180
+
181
+ &_check {
182
+ position: absolute;
183
+ top: 8px;
184
+ left: 8px;
185
+ width: 24px;
186
+ height: 24px;
187
+ background: #FFFFFF;
188
+ text-align: center;
189
+ border-radius: 4px;
190
+ }
191
+
192
+ &_delete {
193
+ position: absolute;
194
+ top: 8px;
195
+ right: 8px;
196
+ width: 24px;
197
+ text-align: center;
198
+ display: flex;
199
+ justify-content: center;
200
+ align-items: center;
201
+ height: 24px;
202
+ background: #FFFFFF;
203
+ border-radius: 4px;
204
+ cursor: pointer;
205
+ }
206
+
207
+ &_desc {
208
+ position: absolute;
209
+ bottom: 12px;
210
+ right: 8px;
211
+ display: flex;
212
+ align-items: center;
213
+ gap: 8px;
214
+ }
215
+ }
216
+
217
+ .circle_block {
218
+ padding: 2px 8px;
219
+ background: rgba(0,0,0,0.5);
220
+ border-radius: 8px;
221
+ text-align: center;
222
+ color: #FFFFFF;
223
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SoundWave: () => React.JSX.Element;
3
+ export default SoundWave;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import styles from "./index.module.less";
3
+ var SoundWave = function SoundWave() {
4
+ return /*#__PURE__*/React.createElement("div", {
5
+ className: styles['sound-wave']
6
+ }, /*#__PURE__*/React.createElement("div", {
7
+ className: styles['sound-bar']
8
+ }), /*#__PURE__*/React.createElement("div", {
9
+ className: styles['sound-bar']
10
+ }), /*#__PURE__*/React.createElement("div", {
11
+ className: styles['sound-bar']
12
+ }), /*#__PURE__*/React.createElement("div", {
13
+ className: styles['sound-bar']
14
+ }), /*#__PURE__*/React.createElement("div", {
15
+ className: styles['sound-bar']
16
+ }), /*#__PURE__*/React.createElement("div", {
17
+ className: styles['sound-bar']
18
+ }), /*#__PURE__*/React.createElement("div", {
19
+ className: styles['sound-bar']
20
+ }));
21
+ };
22
+ export default SoundWave;
@@ -0,0 +1,105 @@
1
+ .sound-wave {
2
+ display: flex;
3
+ .sound-bar {
4
+ width: 8px;
5
+ height: 20px;
6
+ border-radius: 2px;
7
+ background: linear-gradient(180deg, #00edff 0%, #00b9ff 100%);
8
+ margin-right: 2px;
9
+ transform: scaleY(1);
10
+ animation-duration: 1s;
11
+ animation-iteration-count: infinite;
12
+ animation-direction: alternate;
13
+ animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
14
+ opacity: 0.8;
15
+ filter: blur(1);
16
+
17
+
18
+ &:nth-child(4n) {
19
+ animation-name: bar-scale-xl;
20
+ animation-duration: 0.8 + 0.2s;
21
+ --i: 1;
22
+ }
23
+ &:nth-child(4) {
24
+ animation-duration: 0.8 + 0.35s;
25
+ --i: 2;
26
+ }
27
+ &:nth-child(3) {
28
+ animation-name: bar-scale-lg;
29
+ animation-duration: 0.8 + 0s;
30
+ --i: 3;
31
+ }
32
+ &:nth-child(6) {
33
+ animation-name: bar-scale-md;
34
+ animation-duration: 0.8 + 0.05s;
35
+ --i: 6;
36
+ }
37
+
38
+ &:nth-child(1) {
39
+ animation-name: bar-scale-sm;
40
+ animation-duration: 0.9 + 0.15s;
41
+ }
42
+
43
+
44
+ &:nth-child(2),
45
+ &:nth-child(5),
46
+ &:nth-child(7),
47
+ &:nth-child(9) {
48
+ animation-name: bar-scale-sm;
49
+ animation-duration: 0.9s;
50
+ }
51
+ }
52
+
53
+ /* 定义不同跳动效果的动画 */
54
+ @keyframes bar-scale-sm {
55
+ 0%,
56
+ 50% {
57
+ transform: scaleY(1);
58
+ }
59
+ 25% {
60
+ transform: scaleY(6);
61
+ }
62
+ 75% {
63
+ transform: scaleY(4);
64
+ }
65
+ }
66
+
67
+ @keyframes bar-scale-md {
68
+ 0%,
69
+ 50% {
70
+ transform: scaleY(2);
71
+ }
72
+ 25% {
73
+ transform: scaleY(6);
74
+ }
75
+ 75% {
76
+ transform: scaleY(5);
77
+ }
78
+ }
79
+
80
+ @keyframes bar-scale-lg {
81
+ 0%,
82
+ 50% {
83
+ transform: scaleY(8);
84
+ }
85
+ 25% {
86
+ transform: scaleY(4);
87
+ }
88
+ 75% {
89
+ transform: scaleY(6);
90
+ }
91
+ }
92
+
93
+ @keyframes bar-scale-xl {
94
+ 0%,
95
+ 50% {
96
+ transform: scaleY(1);
97
+ }
98
+ 25% {
99
+ transform: scaleY(7);
100
+ }
101
+ 75% {
102
+ transform: scaleY(11);
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,8 @@
1
+ import React, { FC } from 'react';
2
+ interface TextEllipsisProps {
3
+ lines?: number;
4
+ showTooltip?: boolean;
5
+ children: React.ReactNode;
6
+ }
7
+ declare const TextEllipsis: FC<TextEllipsisProps>;
8
+ export default TextEllipsis;
@@ -0,0 +1,57 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useState, useEffect, useRef } from 'react';
8
+ import { Tooltip } from "antd";
9
+ // @ts-ignore
10
+ import styles from "./index.module.less";
11
+ var TextEllipsis = function TextEllipsis(_ref) {
12
+ var children = _ref.children,
13
+ _ref$lines = _ref.lines,
14
+ lines = _ref$lines === void 0 ? 3 : _ref$lines,
15
+ _ref$showTooltip = _ref.showTooltip,
16
+ showTooltip = _ref$showTooltip === void 0 ? true : _ref$showTooltip;
17
+ var textRef = useRef(null);
18
+ var parentRef = useRef(null);
19
+ var _useState = useState(false),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ isTruncated = _useState2[0],
22
+ setIsTruncated = _useState2[1];
23
+ useEffect(function () {
24
+ var checkTruncation = function checkTruncation() {
25
+ if (textRef.current && parentRef.current) {
26
+ var textElement = textRef.current;
27
+ var parentElement = parentRef.current;
28
+ var parentWidth = parentElement.clientWidth;
29
+ var textWidth = textElement.scrollWidth;
30
+ setIsTruncated(textWidth > parentWidth);
31
+ }
32
+ };
33
+ checkTruncation();
34
+ window.addEventListener('resize', checkTruncation);
35
+ return function () {
36
+ return window.removeEventListener('resize', checkTruncation);
37
+ };
38
+ }, [lines]);
39
+ return /*#__PURE__*/React.createElement(Tooltip, {
40
+ title: showTooltip || isTruncated ? children : ''
41
+ }, /*#__PURE__*/React.createElement("div", {
42
+ className: styles['text-ellipsis'],
43
+ ref: parentRef,
44
+ style: {
45
+ display: '-webkit-box',
46
+ WebkitBoxOrient: 'vertical',
47
+ WebkitLineClamp: lines,
48
+ overflow: 'hidden',
49
+ textOverflow: 'ellipsis',
50
+ width: '100%',
51
+ wordBreak: 'break-all'
52
+ }
53
+ }, /*#__PURE__*/React.createElement("div", {
54
+ ref: textRef
55
+ }, children)));
56
+ };
57
+ export default TextEllipsis;
@@ -0,0 +1,8 @@
1
+ .text-ellipsis {
2
+ display: -webkit-box;
3
+ -webkit-box-orient: vertical;
4
+ overflow: hidden;
5
+ text-overflow: ellipsis;
6
+ line-height: 1.5;
7
+ -webkit-line-clamp: 3;
8
+ }
@@ -0,0 +1,8 @@
1
+ export declare const call: (fn: ((...args: any[]) => any) | ((...args: any[]) => any[]) | undefined, ...args: any[]) => any;
2
+ export declare const normalizeToArray: (value: any) => any[];
3
+ export declare function transformDataToTreeData(apiResponse: any): ({
4
+ title: string;
5
+ value: string;
6
+ children: any;
7
+ } | null)[];
8
+ export declare const mapToMockData: (data: any[]) => any[];