@aloudata/aloudata-design 1.9.12 → 1.9.13

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.
@@ -2,3 +2,4 @@
2
2
  @import './variables.less';
3
3
  @import './type.less';
4
4
  @import './size.less';
5
+ @import './reset.less';
@@ -0,0 +1,9 @@
1
+ button {
2
+ border-width: 1px;
3
+ border-style: solid;
4
+ }
5
+
6
+ button::-moz-focus-inner {
7
+ border: 0;
8
+ padding: 0;
9
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export default function Mask({ onMouseMove, onMouseUp, }: {
3
+ onMouseMove: (e: MouseEvent) => void;
4
+ onMouseUp: (e: MouseEvent) => void;
5
+ }): React.JSX.Element;
@@ -0,0 +1,29 @@
1
+ import React, { useEffect } from 'react';
2
+ export default function Mask(_ref) {
3
+ var onMouseMove = _ref.onMouseMove,
4
+ onMouseUp = _ref.onMouseUp;
5
+ useEffect(function () {
6
+ var onMouseMoveEvent = function onMouseMoveEvent(event) {
7
+ onMouseMove(event);
8
+ };
9
+ var onMouseUpEvent = function onMouseUpEvent(event) {
10
+ onMouseUp(event);
11
+ };
12
+ document.addEventListener('mousemove', onMouseMoveEvent);
13
+ document.addEventListener('mouseup', onMouseUpEvent);
14
+ return function () {
15
+ document.removeEventListener('mousemove', onMouseMoveEvent);
16
+ document.removeEventListener('mouseup', onMouseUpEvent);
17
+ };
18
+ }, [onMouseMove, onMouseUp]);
19
+ return /*#__PURE__*/React.createElement("div", {
20
+ style: {
21
+ position: 'fixed',
22
+ left: 0,
23
+ top: 0,
24
+ zIndex: 1000,
25
+ width: '100vw',
26
+ height: '100vh'
27
+ }
28
+ });
29
+ }
@@ -12,6 +12,7 @@ import classNames from 'classnames';
12
12
  import React, { memo, useCallback, useRef, useState } from 'react';
13
13
  import { createPortal, flushSync } from 'react-dom';
14
14
  import { COLUMN_MIN_WIDTH } from "../../constant";
15
+ import Mask from "./Mask";
15
16
  function DragBar(props) {
16
17
  var wrapWidth = props.wrapWidth,
17
18
  columnId = props.columnId,
@@ -54,7 +55,7 @@ function DragBar(props) {
54
55
  right: dragBarLeft
55
56
  },
56
57
  className: classNames('ald-data-preview-header-drag-bar', _defineProperty({}, 'ald-data-preview-header-drag-bar-active', show))
57
- }, show ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
58
+ }, show ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Mask, {
58
59
  onMouseMove: function onMouseMove(event) {
59
60
  var mouseDownState = mouseDownRef.current;
60
61
  if (mouseDownState.down === false) return;
@@ -69,14 +70,6 @@ function DragBar(props) {
69
70
  var currentClientX = event.clientX;
70
71
  onChange(columnId, wrapWidth - getBarLeft(currentClientX));
71
72
  setDragBarLeft(0);
72
- },
73
- style: {
74
- position: 'fixed',
75
- left: 0,
76
- top: 0,
77
- zIndex: 1000,
78
- width: '100vw',
79
- height: '100vh'
80
73
  }
81
74
  }), document.body) : null);
82
75
  }
@@ -16,7 +16,8 @@
16
16
  .ald-empty-image {
17
17
  display: block;
18
18
  width: 100%;
19
- max-width: fit-content;
19
+ max-width: auto;
20
+ max-width: fit-content; //firefox75不支持
20
21
  height: auto;
21
22
  }
22
23
  }
@@ -61,7 +61,7 @@
61
61
  }
62
62
 
63
63
  &.ald-icon-button-dropdown {
64
- width: fit-content;
64
+ width: auto;
65
65
  word-spacing: 0;
66
66
  }
67
67
 
@@ -209,7 +209,8 @@
209
209
  gap: 4px;
210
210
  flex-wrap: nowrap;
211
211
  align-items: center;
212
- max-width: fit-content;
212
+ max-width: auto;
213
+ max-width: fit-content; //firefox75不支持
213
214
  overflow: hidden;
214
215
 
215
216
  .ald-avatar {
@@ -1,5 +1,7 @@
1
1
  @import '../../style/index.less';
2
2
  @import '../../ScrollArea/style/index.less';
3
+ @import '../../Button/style/index.less';
4
+ @import './polyfill/index.less';
3
5
 
4
6
  .ald-modal.ald-modal {
5
7
  animation-duration: 10ms !important;
@@ -0,0 +1,244 @@
1
+ .ant-modal-root .ant-fade-enter,
2
+ .ant-modal-root .ant-fade-appear {
3
+ animation-duration: 0.2s;
4
+ animation-fill-mode: both;
5
+ animation-play-state: paused;
6
+ opacity: 0;
7
+ animation-timing-function: linear;
8
+ }
9
+
10
+ .ant-modal-root .ant-fade-leave {
11
+ animation-duration: 0.2s;
12
+ animation-fill-mode: both;
13
+ animation-play-state: paused;
14
+ animation-timing-function: linear;
15
+ }
16
+
17
+ .ant-modal-root .ant-fade-enter.ant-fade-enter-active,
18
+ .ant-modal-root .ant-fade-appear.ant-fade-appear-active {
19
+ animation-name: ald-fade-in;
20
+ animation-play-state: running;
21
+ }
22
+
23
+ .ant-modal-root .ant-fade-leave.ant-fade-leave-active {
24
+ animation-name: ald-fade-out;
25
+ animation-play-state: running;
26
+ pointer-events: none;
27
+ }
28
+
29
+ .ant-zoom-enter,
30
+ .ant-zoom-appear {
31
+ animation-duration: 0.2s;
32
+ animation-fill-mode: both;
33
+ animation-play-state: paused;
34
+ transform: scale(0);
35
+ opacity: 0;
36
+ animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
37
+ }
38
+
39
+ .ant-zoom-leave {
40
+ animation-duration: 0.2s;
41
+ animation-fill-mode: both;
42
+ animation-play-state: paused;
43
+ animation-timing-function: cubic-bezier(0.78, 0.14, 0.15, 0.86);
44
+ }
45
+
46
+ .ant-zoom-enter.ant-zoom-enter-active,
47
+ .ant-zoom-appear.ant-zoom-appear-active {
48
+ animation-name: ald-zoom-in;
49
+ animation-play-state: running;
50
+ }
51
+
52
+ .ant-zoom-leave.ant-zoom-leave-active {
53
+ animation-name: ald-zoom-out;
54
+ animation-play-state: running;
55
+ pointer-events: none;
56
+ }
57
+
58
+ .ant-zoom-enter-prepare,
59
+ .ant-zoom-appear-prepare {
60
+ transform: none;
61
+ }
62
+
63
+ @keyframes ald-fade-in {
64
+ 0% {
65
+ opacity: 0;
66
+ }
67
+
68
+ 100% {
69
+ opacity: 1;
70
+ }
71
+ }
72
+
73
+ /* fadeOut */
74
+ @keyframes ald-fade-out {
75
+ 0% {
76
+ opacity: 1;
77
+ }
78
+
79
+ 100% {
80
+ opacity: 0;
81
+ }
82
+ }
83
+
84
+ @keyframes ald-zoom-in {
85
+ 0% {
86
+ transform: scale(0.2);
87
+ opacity: 0;
88
+ }
89
+
90
+ 100% {
91
+ transform: 'scale(1)';
92
+ opacity: 1;
93
+ }
94
+ }
95
+
96
+ /* ald-zoom-out */
97
+ @keyframes ald-zoom-out {
98
+ 0% {
99
+ transform: scale(1);
100
+ }
101
+
102
+ 100% {
103
+ transform: scale(0.2);
104
+ opacity: 0;
105
+ }
106
+ }
107
+
108
+ // 以下内容暂时用不到,先注释掉
109
+ // /* zoom-big-in */
110
+ // @keyframes ald-zoom-big-in {
111
+ // 0% {
112
+ // transform: scale(0.8);
113
+ // opacity: 0;
114
+ // }
115
+
116
+ // 100% {
117
+ // transform: scale(1);
118
+ // opacity: 1;
119
+ // }
120
+ // }
121
+
122
+ // /* zoom-big-out */
123
+ // @keyframes ald-zoom-big-out {
124
+ // 0% {
125
+ // transform: scale(1);
126
+ // }
127
+
128
+ // 100% {
129
+ // transform: scale(0.8);
130
+ // opacity: 0;
131
+ // }
132
+ // }
133
+
134
+ // /* zoom-up-in */
135
+ // @keyframes ald-zoom-up-in {
136
+ // 0% {
137
+ // transform: scale(0.8);
138
+ // transform-origin: 50% 0%;
139
+ // opacity: 0;
140
+ // }
141
+
142
+ // 100% {
143
+ // transform: scale(1);
144
+ // transform-origin: 50% 0%;
145
+ // }
146
+ // }
147
+
148
+ // /* zoom-up-out */
149
+ // @keyframes ald-zoom-up-out {
150
+ // 0% {
151
+ // transform: scale(1);
152
+ // transform-origin: 50% 0%;
153
+ // }
154
+
155
+ // 100% {
156
+ // transform: scale(0.8);
157
+ // transform-origin: 50% 0%;
158
+ // opacity: 0;
159
+ // }
160
+ // }
161
+
162
+ // /* zoom-left-in */
163
+ // @keyframes ald-zoom-left-in {
164
+ // 0% {
165
+ // transform: scale(0.8);
166
+ // transform-origin: 0% 50%;
167
+ // opacity: 0;
168
+ // }
169
+
170
+ // 100% {
171
+ // transform: scale(1);
172
+ // transform-origin: 0% 50%;
173
+ // }
174
+ // }
175
+
176
+ // /* zoom-left-out */
177
+ // @keyframes ald-zoom-left-out {
178
+ // 0% {
179
+ // transform: scale(1);
180
+ // transform-origin: 0% 50%;
181
+ // }
182
+
183
+ // 100% {
184
+ // transform: scale(0.8);
185
+ // transform-origin: 0% 50%;
186
+ // opacity: 0;
187
+ // }
188
+ // }
189
+
190
+ // /* zoom-right-in */
191
+ // @keyframes ald-zoom-right-in {
192
+ // 0% {
193
+ // transform: scale(0.8);
194
+ // transform-origin: 100% 50%;
195
+ // opacity: 0;
196
+ // }
197
+
198
+ // 100% {
199
+ // transform: scale(1);
200
+ // transform-origin: 100% 50%;
201
+ // }
202
+ // }
203
+
204
+ // /* zoom-right-out */
205
+ // @keyframes ald-zoom-right-out {
206
+ // 0% {
207
+ // transform: scale(1);
208
+ // transform-origin: 100% 50%;
209
+ // }
210
+
211
+ // 100% {
212
+ // transform: scale(0.8);
213
+ // transform-origin: 100% 50%;
214
+ // opacity: 0;
215
+ // }
216
+ // }
217
+
218
+ // /* zoom-down-in */
219
+ // @keyframes ald-zoom-down-in {
220
+ // 0% {
221
+ // transform: scale(0.8);
222
+ // transform-origin: 50% 100%;
223
+ // opacity: 0;
224
+ // }
225
+
226
+ // 100% {
227
+ // transform: scale(1);
228
+ // transform-origin: 50% 100%;
229
+ // }
230
+ // }
231
+
232
+ // /* zoom-down-out */
233
+ // @keyframes ald-zoom-down-out {
234
+ // 0% {
235
+ // transform: scale(1);
236
+ // transform-origin: 50% 100%;
237
+ // }
238
+
239
+ // 100% {
240
+ // transform: scale(0.8);
241
+ // transform-origin: 50% 100%;
242
+ // opacity: 0;
243
+ // }
244
+ // }
@@ -0,0 +1,60 @@
1
+ @import './animate.less';
2
+
3
+ // 在Modal.confirm() 这样调用的时候,无法解决Modal样式降级的问题,这种情况下,不支持:where的浏览器会缺少样式,下面是补充
4
+ .ant-modal-mask {
5
+ position: fixed;
6
+ top: 0;
7
+ inset-inline-end: 0;
8
+ bottom: 0;
9
+ inset-inline-start: 0;
10
+ z-index: 1000;
11
+ height: 100%;
12
+ background-color: rgba(0, 0, 0, 0.45);
13
+ }
14
+
15
+ .ant-modal-wrap {
16
+ position: fixed;
17
+ inset: 0;
18
+ top: 0;
19
+ inset-inline-end: 0;
20
+ bottom: 0;
21
+ inset-inline-start: 0;
22
+ overflow: auto;
23
+ outline: 0;
24
+ z-index: 1000;
25
+ }
26
+
27
+ .ant-modal.ald-modal {
28
+ box-sizing: border-box;
29
+ margin: 0 auto;
30
+ padding: 0;
31
+ color: rgba(0, 0, 0, 0.88);
32
+ font-size: 14px;
33
+ line-height: 1.5714;
34
+ list-style: none;
35
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
36
+ 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
37
+ 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
38
+ pointer-events: none;
39
+ position: relative;
40
+ top: 100px;
41
+ width: auto;
42
+ max-width: calc(100vw - 32px);
43
+ padding-bottom: 24px;
44
+ }
45
+
46
+ .ant-modal-content {
47
+ position: relative;
48
+ background-color: #fff;
49
+ background-clip: padding-box;
50
+ pointer-events: auto;
51
+ }
52
+
53
+ .ant-modal-confirm-btns {
54
+ text-align: end;
55
+ }
56
+
57
+ .ant-modal-confirm .ant-modal-confirm-btns .ant-btn + .ant-btn {
58
+ margin-bottom: 0;
59
+ margin-inline-start: 8px;
60
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloudata/aloudata-design",
3
- "version": "1.9.12",
3
+ "version": "1.9.13",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",