@jiaozhiye/qm-design-react 1.10.11 → 1.10.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.
@@ -13,7 +13,7 @@
13
13
  &-disabled {
14
14
  .ant-select-selection-item,
15
15
  .ant-select-selection-item-content {
16
- color: @--text-color-secondary-dark;
16
+ color: @--text-color-secondary;
17
17
  }
18
18
  }
19
19
  }
@@ -1,4 +1,4 @@
1
- import React, { Component } from 'react';
1
+ import React from 'react';
2
2
  import type { CSSProperties, AnyObject, AnyFunction } from '../../_utils/types';
3
3
  type IProps = {
4
4
  src: string;
@@ -17,6 +17,7 @@ type IProps = {
17
17
  checkCrossOrigin?: boolean;
18
18
  checkOrientation?: boolean;
19
19
  crossorigin?: string;
20
+ modal?: boolean;
20
21
  guides?: boolean;
21
22
  center?: boolean;
22
23
  highlight?: boolean;
@@ -47,167 +48,5 @@ type IProps = {
47
48
  zoom?: AnyFunction<void>;
48
49
  };
49
50
  export type CropperProps = IProps;
50
- declare class QmCropper extends Component<IProps> {
51
- static defaultProps: {
52
- src: string;
53
- responsive: boolean;
54
- restore: boolean;
55
- checkCrossOrigin: boolean;
56
- checkOrientation: boolean;
57
- modal: boolean;
58
- guides: boolean;
59
- center: boolean;
60
- highlight: boolean;
61
- background: boolean;
62
- autoCrop: boolean;
63
- movable: boolean;
64
- rotatable: boolean;
65
- scalable: boolean;
66
- zoomable: boolean;
67
- zoomOnTouch: boolean;
68
- zoomOnWheel: boolean;
69
- cropBoxMovable: boolean;
70
- cropBoxResizable: boolean;
71
- toggleDragModeOnDblclick: boolean;
72
- };
73
- private imgRef;
74
- private cropper;
75
- componentDidMount(): void;
76
- componentWillUnmount(): void;
77
- reset(): any;
78
- clear(): any;
79
- initCrop(): any;
80
- /**
81
- * Replace the image's src and rebuild the cropper
82
- * @param {string} url - The new URL.
83
- * @param {boolean} [onlyColorChanged] - Indicate if the new image only changed color.
84
- * @returns {Object} this
85
- */
86
- replace(url: any, onlyColorChanged?: boolean): any;
87
- enable(): any;
88
- disable(): any;
89
- destroy(): any;
90
- /**
91
- * Move the canvas with relative offsets
92
- * @param {number} offsetX - The relative offset distance on the x-axis.
93
- * @param {number} offsetY - The relative offset distance on the y-axis.
94
- * @returns {Object} this
95
- */
96
- move(offsetX: any, offsetY: any): any;
97
- /**
98
- * Move the canvas to an absolute point
99
- * @param {number} x - The x-axis coordinate.
100
- * @param {number} [y=x] - The y-axis coordinate.
101
- * @returns {Object} this
102
- */
103
- moveTo(x: any, y?: any): any;
104
- /**
105
- * Zoom the canvas with a relative ratio
106
- * @param {number} ratio - The target ratio.
107
- * @param {Event} _originalEvent - The original event if any.
108
- * @returns {Object} this
109
- */
110
- relativeZoom(ratio: any, _originalEvent: any): any;
111
- /**
112
- * Zoom the canvas to an absolute ratio
113
- * @param {number} ratio - The target ratio.
114
- * @param {Event} _originalEvent - The original event if any.
115
- * @returns {Object} this
116
- */
117
- zoomTo(ratio: any, _originalEvent: any): any;
118
- /**
119
- * Rotate the canvas with a relative degree
120
- * @param {number} degree - The rotate degree.
121
- * @returns {Object} this
122
- */
123
- rotate(degree: any): any;
124
- /**
125
- * Rotate the canvas to an absolute degree
126
- * @param {number} degree - The rotate degree.
127
- * @returns {Object} this
128
- */
129
- rotateTo(degree: any): any;
130
- /**
131
- * Scale the image on the x-axis.
132
- * @param {number} scaleX - The scale ratio on the x-axis.
133
- * @returns {Object} this
134
- */
135
- scaleX(scaleX: any): any;
136
- /**
137
- * Scale the image on the y-axis.
138
- * @param {number} scaleY - The scale ratio on the y-axis.
139
- * @returns {Object} this
140
- */
141
- scaleY(scaleY: any): any;
142
- /**
143
- * Scale the image
144
- * @param {number} scaleX - The scale ratio on the x-axis.
145
- * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
146
- * @returns {Object} this
147
- */
148
- scale(scaleX: any, scaleY?: any): any;
149
- /**
150
- * Get the cropped area position and size data (base on the original image)
151
- * @param {boolean} [rounded=false] - Indicate if round the data values or not.
152
- * @returns {Object} The result cropped data.
153
- */
154
- getData(rounded?: boolean): any;
155
- /**
156
- * Set the cropped area position and size with new data
157
- * @param {Object} data - The new data.
158
- * @returns {Object} this
159
- */
160
- setData(data: any): any;
161
- /**
162
- * Get the container size data.
163
- * @returns {Object} The result container data.
164
- */
165
- getContainerData(): any;
166
- /**
167
- * Get the image position and size data.
168
- * @returns {Object} The result image data.
169
- */
170
- getImageData(): any;
171
- /**
172
- * Get the canvas position and size data.
173
- * @returns {Object} The result canvas data.
174
- */
175
- getCanvasData(): any;
176
- /**
177
- * Set the canvas position and size with new data.
178
- * @param {Object} data - The new canvas data.
179
- * @returns {Object} this
180
- */
181
- setCanvasData(data: any): any;
182
- /**
183
- * Get the crop box position and size data.
184
- * @returns {Object} The result crop box data.
185
- */
186
- getCropBoxData(): any;
187
- /**
188
- * Set the crop box position and size with new data.
189
- * @param {Object} data - The new crop box data.
190
- * @returns {Object} this
191
- */
192
- setCropBoxData(data: any): any;
193
- /**
194
- * Get a canvas drawn the cropped image.
195
- * @param {Object} [options={}] - The config options.
196
- * @returns {HTMLCanvasElement} - The result canvas.
197
- */
198
- getCroppedCanvas(options?: {}): any;
199
- /**
200
- * Change the aspect ratio of the crop box.
201
- * @param {number} aspectRatio - The new aspect ratio.
202
- * @returns {Object} this
203
- */
204
- setAspectRatio(aspectRatio: any): any;
205
- /**
206
- * Change the drag mode.
207
- * @param {string} mode - The new drag mode.
208
- * @returns {Object} this
209
- */
210
- setDragMode(mode: any): any;
211
- render(): React.JSX.Element;
212
- }
213
- export default QmCropper;
51
+ declare const Cropper: React.ForwardRefExoticComponent<IProps & React.RefAttributes<any>>;
52
+ export default Cropper;
@@ -17,7 +17,7 @@
17
17
  line-height: 1;
18
18
  border: 1px solid @--border-color-base;
19
19
  border-radius: @--border-radius-base;
20
- background-color: @--background-color-cecondary;
20
+ background-color: @--background-color-light;
21
21
  position: relative;
22
22
  &::before {
23
23
  content: ' ';
@@ -26,6 +26,8 @@
26
26
  left: -1px;
27
27
  top: -1px;
28
28
  bottom: -1px;
29
+ border-top-left-radius: @--border-radius-base;
30
+ border-bottom-left-radius: @--border-radius-base;
29
31
  background-color: @--primary-color;
30
32
  }
31
33
  &__title {
@@ -2,7 +2,7 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2021-07-23 19:05:57
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2022-11-26 20:25:11
5
+ * @Last Modified time: 2024-10-29 10:53:46
6
6
  */
7
7
  @import '../../style/common';
8
8
 
@@ -21,6 +21,9 @@
21
21
  top: 4px;
22
22
  right: 42px;
23
23
  }
24
+ .ant-drawer-extra {
25
+ display: none;
26
+ }
24
27
  }
25
28
  }
26
29
  .ant-drawer-header {
@@ -51,7 +54,7 @@
51
54
  position: absolute;
52
55
  right: 34px;
53
56
  padding: @--padding-md 5px @--padding-md @--padding-md;
54
- color: @--text-color-secondary;
57
+ color: @--text-color-placeholder;
55
58
  line-height: 1;
56
59
  font-size: @--font-size-lg;
57
60
  transition: all 0.3s ease;
@@ -60,6 +63,9 @@
60
63
  color: @--text-color;
61
64
  }
62
65
  }
66
+ .ant-drawer-extra {
67
+ margin-right: 50px;
68
+ }
63
69
  }
64
70
  .ant-drawer-body {
65
71
  padding: @--padding-md;
@@ -1,29 +1,9 @@
1
- import React, { Component } from 'react';
2
- import ConfigContext from '../../config-provider/context';
1
+ import React from 'react';
3
2
  import type { IFormItem } from './types';
4
3
  type IProps = {
5
4
  uniqueKey?: string;
6
5
  items: IFormItem[];
7
6
  fieldsChange?: (items: IFormItem[]) => void;
8
7
  };
9
- type IState = {
10
- visible: boolean;
11
- };
12
- declare class FieldsFilter extends Component<IProps, IState> {
13
- static contextType: React.Context<import("../../config-provider/context").IConfig>;
14
- context: React.ContextType<typeof ConfigContext>;
15
- private linkRef;
16
- state: IState;
17
- get formUniqueKey(): string;
18
- componentDidMount(): void;
19
- getFormFieldsConfig: (key: string) => Promise<unknown[] | void>;
20
- saveFormFieldsConfig: (key: string, value: Partial<IFormItem>[]) => Promise<void>;
21
- getLocalFields(): Array<IFormItem> | void;
22
- setLocalFields(list: IFormItem[]): void;
23
- initLocalfields(): void;
24
- changeHandle(items: IFormItem[]): void;
25
- resetFieldsHandle: (items: IFormItem[]) => void;
26
- popupRender(): React.JSX.Element;
27
- render(): React.JSX.Element;
28
- }
8
+ declare const FieldsFilter: React.FC<IProps>;
29
9
  export default FieldsFilter;
@@ -2,7 +2,7 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2021-07-23 19:05:57
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2022-12-02 20:00:11
5
+ * @Last Modified time: 2024-10-29 13:39:17
6
6
  */
7
7
  @import '../../style/common';
8
8
 
@@ -55,6 +55,22 @@
55
55
  line-height: 1;
56
56
  }
57
57
  }
58
+ // radio-group checkbox-group
59
+ .ant-radio-group,
60
+ .ant-checkbox-group {
61
+ display: inline-flex;
62
+ justify-content: flex-start;
63
+ flex-wrap: wrap;
64
+ row-gap: 4px;
65
+ .ant-radio-wrapper,
66
+ .ant-checkbox-wrapper {
67
+ margin: 0;
68
+ margin-right: 20px;
69
+ &:last-of-type {
70
+ margin-right: 0;
71
+ }
72
+ }
73
+ }
58
74
  // textarea
59
75
  .ant-input-textarea-show-count {
60
76
  position: relative;
@@ -67,7 +83,7 @@
67
83
  }
68
84
  // input extra
69
85
  .extra-tooltip {
70
- color: @--text-color-secondary-dark;
86
+ color: @--text-color-secondary;
71
87
  vertical-align: -0.4em;
72
88
  transform: scale(1.2);
73
89
  }
@@ -248,7 +264,7 @@
248
264
  padding: 0 8px;
249
265
  margin: 0 4px 4px 0;
250
266
  border: 1px solid @--border-color-secondary;
251
- border-radius: @--border-radius-base;
267
+ border-radius: 2px;
252
268
  cursor: pointer;
253
269
  &.actived {
254
270
  color: @--white;
@@ -346,7 +362,7 @@
346
362
  .text-overflow-cut();
347
363
  .handle {
348
364
  padding: 2px;
349
- color: @--text-color-secondary;
365
+ color: @--text-color-placeholder;
350
366
  cursor: s-resize;
351
367
  transform: scale(0.9);
352
368
  }
@@ -53,7 +53,7 @@
53
53
  position: absolute;
54
54
  top: 10px;
55
55
  inset-inline-end: 10px;
56
- color: @--text-color-secondary;
56
+ color: @--text-color-placeholder;
57
57
  width: 22px;
58
58
  height: 22px;
59
59
  display: flex;
@@ -160,7 +160,7 @@
160
160
  }
161
161
  .handle {
162
162
  padding: 2px;
163
- color: @--text-color-secondary;
163
+ color: @--text-color-placeholder;
164
164
  cursor: s-resize;
165
165
  transform: scale(0.9);
166
166
  }
@@ -176,7 +176,7 @@
176
176
  .close-icon {
177
177
  padding: 2px;
178
178
  font-size: 12px;
179
- color: @--text-color-secondary;
179
+ color: @--text-color-placeholder;
180
180
  border-radius: 4px;
181
181
  cursor: pointer;
182
182
  display: none;