@cloud-app-dev/vidc 3.1.1 → 3.1.2

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.
@@ -1,7 +1,7 @@
1
- import { ModalProps } from './interface';
1
+ import { IModalProps } from './interface';
2
2
  import React from 'react';
3
3
  import './index.less';
4
- declare function Modal({ children, className, style, getContainer, ...props }: ModalProps): JSX.Element;
4
+ declare function Modal({ children, className, style, getContainer, ...props }: IModalProps): JSX.Element;
5
5
  declare namespace Modal {
6
6
  var defaultProps: {
7
7
  className: string;
package/es/Modal/index.js CHANGED
@@ -19,7 +19,6 @@ import { __rest } from "tslib";
19
19
  import React, { useContext, useEffect, useImperativeHandle, useMemo, useState } from 'react';
20
20
  import * as ReactDOMClient from 'react-dom/client';
21
21
  import CC from '../ConfigContext';
22
- import ConfigContext from '../ConfigContext';
23
22
  import "./index.css";
24
23
 
25
24
  function Modal(_a) {
@@ -88,7 +87,7 @@ function useModal() {
88
87
  }, /*#__PURE__*/React.createElement(Modal, {
89
88
  okText: "\u786E\u5B9A",
90
89
  cancelText: "\u53D6\u6D88",
91
- visible: state.visible,
90
+ open: state.visible,
92
91
  onOk: state.onOk,
93
92
  onCancel: close,
94
93
  destroyOnClose: true,
@@ -122,11 +121,6 @@ function useModal() {
122
121
  }
123
122
 
124
123
  var RefModal = /*#__PURE__*/React.forwardRef(function RefModal(_, ref) {
125
- var context = useContext(ConfigContext.Context);
126
- var root = useMemo(function () {
127
- return (context === null || context === void 0 ? void 0 : context.root) || document.body;
128
- }, [context === null || context === void 0 ? void 0 : context.root]);
129
-
130
124
  var _useState3 = useState({
131
125
  content: null,
132
126
  visible: false,
@@ -165,16 +159,13 @@ var RefModal = /*#__PURE__*/React.forwardRef(function RefModal(_, ref) {
165
159
  return /*#__PURE__*/React.createElement(Modal, {
166
160
  okText: "\u786E\u5B9A",
167
161
  cancelText: "\u53D6\u6D88",
168
- visible: state.visible,
162
+ open: state.visible,
169
163
  onOk: state.onOk,
170
164
  onCancel: close,
171
165
  destroyOnClose: true,
172
166
  title: state.title,
173
167
  width: state.width,
174
- className: state.className,
175
- getContainer: function getContainer() {
176
- return root;
177
- }
168
+ className: state.className
178
169
  }, state.content);
179
170
  });
180
171
  Modal.info = _Modal.info;
@@ -1,326 +1,10 @@
1
+ import { ModalProps, ModalFuncProps } from 'antd/lib/modal/Modal';
1
2
  import * as React from 'react';
2
3
 
3
4
  declare type getContainerFunc = () => HTMLElement;
4
5
 
5
- export interface ModalProps {
6
- /**
7
- * @description 对话框是否可见
8
- * @default -
9
- */
10
- visible?: boolean;
11
-
12
- /**
13
- * @description 确定按钮 loading
14
- * @default false
15
- */
16
- confirmLoading?: boolean;
17
-
18
- /**
19
- * @description 标题
20
- * @default -
21
- */
22
- title?: React.ReactNode | string;
23
-
24
- /**
25
- * @description 是否显示右上角的关闭按钮
26
- * @default true
27
- */
28
- closable?: boolean;
29
-
30
- /**
31
- * @description 点击确定回调
32
- * @type function(e: MouseEvent<HTMLElement>)
33
- * @default -
34
- */
35
- onOk?: (e: React.MouseEvent<HTMLElement>) => void;
36
-
37
- /**
38
- * @description 点击模态框右上角叉、取消按钮、Props.maskClosable 值为 true 时的遮罩层或键盘按下 Esc 时的回调
39
- * @type function(e: MouseEvent<HTMLElement>)
40
- * @default -
41
- */
42
- onCancel?: (e: React.MouseEvent<HTMLElement>) => void;
43
-
44
- /**
45
- * @description 点Modal 完全关闭后的回调
46
- * @type function
47
- * @default -
48
- */
49
- afterClose?: () => void;
50
-
51
- /**
52
- * @description 垂直居中展示 Modal
53
- * @default false
54
- */
55
- centered?: boolean;
56
-
57
- /**
58
- * @description 宽度
59
- * @default 416
60
- */
61
- width?: string | number;
62
-
63
- /**
64
- * @description 底部内容,当不需要默认底部按钮时,可以设为 footer={null}
65
- * @default (确定取消按钮)
66
- */
67
- footer?: React.ReactNode;
68
-
69
- /**
70
- * @description 确认按钮文字
71
- * @default 确定
72
- */
73
- okText?: React.ReactNode;
74
-
75
- /**
76
- * @description 确认按钮类型
77
- * @default primary
78
- */
79
- okType?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default';
80
-
81
- /**
82
- * @description 取消按钮文字
83
- * @default 取消
84
- */
85
- cancelText?: React.ReactNode;
86
-
87
- /**
88
- * @description 点击蒙层是否允许关闭
89
- * @default true
90
- */
91
- maskClosable?: boolean;
92
-
93
- /**
94
- * @description 强制渲染 Modal
95
- * @default false
96
- */
97
- forceRender?: boolean;
98
-
99
- /**
100
- * @description 确认按钮props
101
- * @type Object
102
- * @default -
103
- */
104
- okButtonProps?: any;
105
-
106
- /**
107
- * @description 取消按钮props
108
- * @type Object
109
- * @default -
110
- */
111
- cancelButtonProps?: any;
112
-
113
- /**
114
- * @description 关闭时销毁 Modal 里的子元素
115
- * @default false
116
- */
117
- destroyOnClose?: boolean;
118
-
119
- /**
120
- * @description 可用于设置浮层的样式,调整浮层位置等
121
- * @default -
122
- */
123
- style?: React.CSSProperties;
124
-
125
- /**
126
- * @description 对话框外层容器的类名
127
- * @default -
128
- */
129
- wrapClassName?: string;
130
-
131
- /**
132
- * @description mask动画
133
- * @default -
134
- */
135
- maskTransitionName?: string;
136
-
137
- /**
138
- * @description 动画
139
- * @default -
140
- */
141
- transitionName?: string;
142
-
143
- /**
144
- * @description 容器类名
145
- * @default -
146
- */
147
- className?: string;
148
-
149
- /**
150
- * @description 指定 Modal 挂载的 HTML 节点, false 为挂载在当前 dom
151
- * @default body
152
- */
153
- getContainer?: string | HTMLElement | getContainerFunc | false | null;
154
-
155
- /**
156
- * @description 设置 Modal 的 z-index
157
- * @default 1000
158
- */
159
- zIndex?: number;
160
-
161
- /**
162
- * @description Modal body 样式
163
- * @default -
164
- */
165
- bodyStyle?: React.CSSProperties;
166
-
167
- /**
168
- * @description 遮罩样式
169
- * @default -
170
- */
171
- maskStyle?: React.CSSProperties;
172
-
173
- /**
174
- * @description 是否展示遮罩
175
- * @default true
176
- */
177
- mask?: boolean;
178
-
179
- /**
180
- * @description 是否支持键盘 esc 关闭
181
- * @default true
182
- */
183
- keyboard?: boolean;
184
-
185
- /**
186
- * @description 自定义关闭图标
187
- * @default -
188
- */
189
- closeIcon?: React.ReactNode;
190
-
191
- children: React.ReactNode;
192
- }
193
- export interface ModalFuncProps {
194
- /**
195
- * @description 容器类名
196
- * @default -
197
- */
198
- className?: string;
199
-
200
- /**
201
- * @description 标题
202
- * @default -
203
- */
204
- title?: React.ReactNode;
205
-
206
- /**
207
- * @description 内容
208
- * @default -
209
- */
210
- content?: React.ReactNode;
211
-
212
- /**
213
- * @description 点击确定回调
214
- * @type function(e: MouseEvent<HTMLElement>)
215
- * @default -
216
- */
217
- onOk?: (...args: any[]) => any;
218
-
219
- /**
220
- * @description 点击模态框右上角叉、取消按钮、Props.maskClosable 值为 true 时的遮罩层或键盘按下 Esc 时的回调
221
- * @type function(e: MouseEvent<HTMLElement>)
222
- * @default -
223
- */
224
- onCancel?: (...args: any[]) => any;
225
-
226
- /**
227
- * @description 确认按钮props(antd ButtonProps)
228
- * @type Object
229
- * @default -
230
- */
231
- okButtonProps?: any;
232
-
233
- /**
234
- * @description 取消按钮props(antd ButtonProps)
235
- * @type Object
236
- * @default -
237
- */
238
- cancelButtonProps?: any;
239
-
240
- /**
241
- * @description 垂直居中展示 Modal
242
- * @default false
243
- */
244
- centered?: boolean;
245
-
246
- /**
247
- * @description 宽度
248
- * @default 416
249
- */
250
- width?: string | number;
251
-
252
- /**
253
- * @description 确认按钮文字
254
- * @default 确定
255
- */
256
- okText?: React.ReactNode;
257
-
258
- /**
259
- * @description 确认按钮类型
260
- * @default primary
261
- */
262
- okType?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default';
263
-
264
- /**
265
- * @description 取消按钮文字
266
- * @default 取消
267
- */
268
- cancelText?: React.ReactNode;
269
-
270
- /**
271
- * @description 自定义图标
272
- * @default <QuestionCircle />
273
- */
274
- icon?: React.ReactNode;
275
-
276
- /**
277
- * @description 是否展示遮罩
278
- * @default true
279
- */
280
- mask?: boolean;
281
-
282
- /**
283
- * @description 点击蒙层是否允许关闭
284
- * @default true
285
- */
286
- maskClosable?: boolean;
287
-
288
- /**
289
- * @description 设置 Modal 的 z-index
290
- * @default 1000
291
- */
292
- zIndex?: number;
293
-
294
- /**
295
- * @description 用于设置浮层的样式,调整浮层位置等
296
- * @default -
297
- */
298
- style?: React.CSSProperties;
299
-
300
- /**
301
- * @description 遮罩样式
302
- * @default -
303
- */
304
- maskStyle?: React.CSSProperties;
305
-
306
- /**
307
- * @description 是否支持键盘 esc 关闭
308
- * @default true
309
- */
310
- keyboard?: boolean;
311
-
312
- /**
313
- * @description 指定 Modal 挂载的 HTML 节点, false 为挂载在当前 dom
314
- * @default body
315
- */
316
- getContainer?: string | HTMLElement | getContainerFunc | false | null;
317
-
318
- /**
319
- * @description 指定自动获得焦点的按钮
320
- * @default ok
321
- */
322
- autoFocusButton?: null | 'ok' | 'cancel';
323
- }
6
+ export interface IModalProps extends ModalProps {}
7
+ export interface IModalFuncProps extends ModalFuncProps {}
324
8
  export declare type ModalFunc = (props: ModalFuncProps) => {
325
9
  destroy: () => void;
326
10
  update: (newConfig: ModalFuncProps) => void;
@@ -252,6 +252,18 @@ div .cloudapp-pagination-jump-prev .cloudapp-pagination-item-container .cloudapp
252
252
  div .cloudapp-pagination-jump-next .cloudapp-pagination-item-container .cloudapp-pagination-item-ellipsis {
253
253
  color: inherit;
254
254
  }
255
+ div .cloudapp-pagination-options-quick-jumper input {
256
+ background-color: var(--form-bg);
257
+ border-color: var(--form-bd);
258
+ }
259
+ div .cloudapp-pagination-options-quick-jumper input:hover {
260
+ border-color: var(--form-active-bg);
261
+ }
262
+ div .cloudapp-pagination-options-quick-jumper input:focus,
263
+ div .cloudapp-pagination-options-quick-jumper input-focused {
264
+ border-color: var(--form-active-bg);
265
+ box-shadow: none;
266
+ }
255
267
  div .cloudapp-picker {
256
268
  background-color: var(--form-bg);
257
269
  border-radius: var(--radius1);
@@ -424,23 +436,23 @@ div .cloudapp-radio-input:focus + .cloudapp-radio-inner {
424
436
  box-shadow: unset;
425
437
  }
426
438
  ::-webkit-scrollbar {
427
- width: 8px;
428
- height: 8px;
439
+ width: var(--scrollbar-width);
440
+ height: var(--scrollbar-width);
429
441
  }
430
442
  ::-webkit-scrollbar-track {
431
443
  -webkit-box-shadow: var(--scrollbar-track-shadow);
432
- border-radius: 8px;
444
+ border-radius: var(--scrollbar-width);
433
445
  }
434
446
  ::-webkit-scrollbar-thumb {
435
- border-radius: 8px;
436
- background: #ddd;
447
+ border-radius: var(--scrollbar-width);
448
+ background: var(--scrollbar-thumb-bg);
437
449
  -webkit-box-shadow: var(--scrollbar-thumb-shadow);
438
450
  }
439
451
  ::-webkit-scrollbar-thumb:hover {
440
452
  background: var(--scrollbar-thumb-hover-bg);
441
453
  }
442
454
  ::-webkit-scrollbar-thumb:active {
443
- background: #999;
455
+ background: var(--scrollbar-thumb-bg);
444
456
  }
445
457
  div .cloudapp-select-single:not(.cloudapp-select-customize-input) .cloudapp-select-selector {
446
458
  border-radius: var(--radius1);
@@ -504,6 +516,14 @@ div .cloudapp-tree {
504
516
  color: inherit;
505
517
  background: transparent;
506
518
  }
519
+ div .cloudapp-tree .cloudapp-tree-node-content-wrapper:hover {
520
+ background-color: transparent;
521
+ border-bottom: 1px solid var(--secondary2);
522
+ }
523
+ div .cloudapp .cloudapp-node-content-wrapper.cloudapp-node-selected {
524
+ background-color: transparent;
525
+ border-bottom: 1px solid var(--secondary2);
526
+ }
507
527
  div .cloudapp-table {
508
528
  background-color: var(--table-bg);
509
529
  color: inherit;
@@ -512,6 +532,10 @@ div .cloudapp-table {
512
532
  div .cloudapp-table-tbody > tr.cloudapp-table-row:hover > td {
513
533
  background: var(--table-row-hover-color);
514
534
  }
535
+ div .cloudapp-table-tbody > tr.cloudapp-table-row-selected > td {
536
+ background: var(--table-row-hover-color);
537
+ border-bottom-color: var(--table-bd);
538
+ }
515
539
  div .cloudapp-table-thead > tr > th:not(.cloudapp-table-cell-scrollbar) {
516
540
  background-color: var(--table-head-bg);
517
541
  border-bottom-color: var(--table-bd);
@@ -540,6 +564,9 @@ div .cloudapp-table-row-expand-icon:focus,
540
564
  div .cloudapp-table-row-expand-icon:hover {
541
565
  color: var(--primary-dark);
542
566
  }
567
+ div .cloudapp-empty-normal {
568
+ color: inherit;
569
+ }
543
570
  :root {
544
571
  color: var(--color);
545
572
  }
@@ -68,3 +68,15 @@ div .cloudapp-pagination-jump-prev .cloudapp-pagination-item-container .cloudapp
68
68
  div .cloudapp-pagination-jump-next .cloudapp-pagination-item-container .cloudapp-pagination-item-ellipsis {
69
69
  color: inherit;
70
70
  }
71
+ div .cloudapp-pagination-options-quick-jumper input {
72
+ background-color: var(--form-bg);
73
+ border-color: var(--form-bd);
74
+ }
75
+ div .cloudapp-pagination-options-quick-jumper input:hover {
76
+ border-color: var(--form-active-bg);
77
+ }
78
+ div .cloudapp-pagination-options-quick-jumper input:focus,
79
+ div .cloudapp-pagination-options-quick-jumper input-focused {
80
+ border-color: var(--form-active-bg);
81
+ box-shadow: none;
82
+ }
@@ -1,19 +1,19 @@
1
1
  ::-webkit-scrollbar {
2
- width: 8px;
3
- height: 8px;
2
+ width: var(--scrollbar-width);
3
+ height: var(--scrollbar-width);
4
4
  }
5
5
  ::-webkit-scrollbar-track {
6
6
  -webkit-box-shadow: var(--scrollbar-track-shadow);
7
- border-radius: 8px;
7
+ border-radius: var(--scrollbar-width);
8
8
  }
9
9
  ::-webkit-scrollbar-thumb {
10
- border-radius: 8px;
11
- background: #ddd;
10
+ border-radius: var(--scrollbar-width);
11
+ background: var(--scrollbar-thumb-bg);
12
12
  -webkit-box-shadow: var(--scrollbar-thumb-shadow);
13
13
  }
14
14
  ::-webkit-scrollbar-thumb:hover {
15
15
  background: var(--scrollbar-thumb-hover-bg);
16
16
  }
17
17
  ::-webkit-scrollbar-thumb:active {
18
- background: #999;
18
+ background: var(--scrollbar-thumb-bg);
19
19
  }
@@ -6,6 +6,10 @@ div .cloudapp-table {
6
6
  div .cloudapp-table-tbody > tr.cloudapp-table-row:hover > td {
7
7
  background: var(--table-row-hover-color);
8
8
  }
9
+ div .cloudapp-table-tbody > tr.cloudapp-table-row-selected > td {
10
+ background: var(--table-row-hover-color);
11
+ border-bottom-color: var(--table-bd);
12
+ }
9
13
  div .cloudapp-table-thead > tr > th:not(.cloudapp-table-cell-scrollbar) {
10
14
  background-color: var(--table-head-bg);
11
15
  border-bottom-color: var(--table-bd);
@@ -34,3 +38,6 @@ div .cloudapp-table-row-expand-icon:focus,
34
38
  div .cloudapp-table-row-expand-icon:hover {
35
39
  color: var(--primary-dark);
36
40
  }
41
+ div .cloudapp-empty-normal {
42
+ color: inherit;
43
+ }
@@ -2,3 +2,11 @@ div .cloudapp-tree {
2
2
  color: inherit;
3
3
  background: transparent;
4
4
  }
5
+ div .cloudapp-tree .cloudapp-tree-node-content-wrapper:hover {
6
+ background-color: transparent;
7
+ border-bottom: 1px solid var(--secondary2);
8
+ }
9
+ div .cloudapp .cloudapp-node-content-wrapper.cloudapp-node-selected {
10
+ background-color: transparent;
11
+ border-bottom: 1px solid var(--secondary2);
12
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "@cloud-app-dev/vidc",
4
4
  "description": "Video Image Data Componennts",
5
- "version": "3.1.1",
5
+ "version": "3.1.2",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",
package/theme-config.ts CHANGED
@@ -3,9 +3,9 @@ export const themeConfig = `
3
3
  --primary: #248FFA;
4
4
  --primary-light: #248FFA;
5
5
  --primary-dark: #227BD5;
6
- --secondary1: #6D8EFB;
7
- --secondary1-light: #86A2FF;
8
- --secondary1-dark: #5D7FF0;
6
+ --secondary1: #e8b127;
7
+ --secondary1-light: #e8b127;
8
+ --secondary1-dark: #e8b127;
9
9
  --secondary2: #33AAFF;
10
10
  --secondary2-light: #61BDFF;
11
11
  --secondary2-dark: #2194E5;
@@ -42,10 +42,15 @@ export const themeConfig = `
42
42
  --fs: 14px;
43
43
  --fs-small: 12px;
44
44
  --fs-large: 20px;
45
- --color: rgba(0,0,0,1);
46
- --color-dark: #000000;
47
- --color-light: rgba(255,255,255,1);
48
- --color-disabled: rgba(0,0,0,0.26);
45
+ --bd:rgba(255, 255, 255, 0.3);
46
+ --color:#ffffff;
47
+ --color1:#ffffff;
48
+ --color2:#fefefe;
49
+ --color3:#eeeeee;
50
+ --color4:#999999;
51
+ --color5:#666666;
52
+ --color6:#333333;
53
+ --color7:#000000;
49
54
  --shadow1: 2px 0 10px 0 rgba(0,0,0,0.06);
50
55
  --shadow2: 2px 0 10px 0 rgba(0,0,0,0.06);
51
56
  --shadow3: 2px 0 10px 0 rgba(0,0,0,0.06);