@jiaozhiye/qm-design-react 1.4.0-beta.2 → 1.4.0-beta.21

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 (73) hide show
  1. package/lib/_utils/types.d.ts +7 -1
  2. package/lib/_utils/util.d.ts +0 -1
  3. package/lib/anchor/src/anchor-nav.d.ts +1 -1
  4. package/lib/anchor/src/anchor.d.ts +3 -1
  5. package/lib/anchor/style/index.less +61 -21
  6. package/lib/antd/compact.less +11 -0
  7. package/lib/antd/index.less +11 -1
  8. package/lib/button/src/button.d.ts +6 -5
  9. package/lib/collapse/src/collapse.d.ts +1 -0
  10. package/lib/countup/style/index.less +22 -22
  11. package/lib/divider/style/index.less +54 -54
  12. package/lib/drawer/style/index.less +2 -2
  13. package/lib/form/src/context.d.ts +4 -1
  14. package/lib/form/src/form-cascader.d.ts +1 -1
  15. package/lib/form/src/form-checkbox-group.d.ts +1 -1
  16. package/lib/form/src/form-multiple-tree-table-helper.d.ts +2 -2
  17. package/lib/form/src/form-radio.d.ts +1 -1
  18. package/lib/form/src/form-select.d.ts +1 -1
  19. package/lib/form/src/form-tree-select.d.ts +1 -1
  20. package/lib/form/src/form.d.ts +14 -14
  21. package/lib/form/src/types.d.ts +25 -15
  22. package/lib/form/src/utils.d.ts +7 -3
  23. package/lib/form/style/index.less +19 -8
  24. package/lib/hooks/useDebounce.d.ts +3 -0
  25. package/lib/index.esm.js +2 -2
  26. package/lib/index.full.js +1 -1
  27. package/lib/index.js +2 -2
  28. package/lib/locale/index.js +5 -5
  29. package/lib/locale/lang/en.d.ts +4 -0
  30. package/lib/locale/lang/en.js +6 -2
  31. package/lib/locale/lang/zh-cn.d.ts +4 -0
  32. package/lib/locale/lang/zh-cn.js +6 -2
  33. package/lib/modal/style/index.less +2 -2
  34. package/lib/print/src/LodopFuncs.d.ts +1 -1
  35. package/lib/print/src/preview.d.ts +1 -1
  36. package/lib/print/src/print.d.ts +1 -1
  37. package/lib/print/style/index.less +175 -175
  38. package/lib/range-table-helper/style/index.less +5 -1
  39. package/lib/search-helper/style/index.less +1 -1
  40. package/lib/search-tree/src/search-tree.d.ts +6 -0
  41. package/lib/search-tree/style/index.less +14 -1
  42. package/lib/spin/style/index.less +3 -5
  43. package/lib/split/style/index.less +1 -1
  44. package/lib/style/compact.css +645 -685
  45. package/lib/style/compact.less +4 -3
  46. package/lib/style/compact.min.css +1 -1
  47. package/lib/style/index.css +109 -58
  48. package/lib/style/index.less +36 -36
  49. package/lib/style/index.min.css +1 -1
  50. package/lib/style/mixins/reset.less +1 -2
  51. package/lib/style/themes/compact.less +3 -280
  52. package/lib/style/themes/default.less +2 -1
  53. package/lib/table/src/context/index.d.ts +3 -3
  54. package/lib/table/src/edit/InputNumber.d.ts +2 -0
  55. package/lib/table/src/hooks/useImperativeMethod.d.ts +2 -1
  56. package/lib/table/src/hooks/useTableCore.d.ts +1 -0
  57. package/lib/table/src/hooks/useTableEffect.d.ts +3 -0
  58. package/lib/table/src/hooks/useTableLayout.d.ts +2 -2
  59. package/lib/table/src/table/props.d.ts +15 -9
  60. package/lib/table/src/table/types.d.ts +28 -10
  61. package/lib/table/src/utils/index.d.ts +3 -2
  62. package/lib/table/style/clipboard.less +1 -0
  63. package/lib/table/style/export.less +1 -1
  64. package/lib/table/style/fast-search.less +3 -2
  65. package/lib/table/style/size.less +1 -0
  66. package/lib/table/style/table.less +374 -374
  67. package/lib/tabs/src/tab-pane.d.ts +1 -0
  68. package/lib/tabs/src/tabs.d.ts +6 -1
  69. package/lib/tree-helper/style/index.less +1 -1
  70. package/lib/tree-table-helper/style/index.less +1 -1
  71. package/lib/upload-file/src/upload-file.d.ts +4 -9
  72. package/package.json +6 -7
  73. package/lib/form/src/form-item-layout.d.ts +0 -3
@@ -1,374 +1,374 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2022-06-24 14:28:19
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-table: ~'@{qm-prefix}-table';
10
-
11
- // 外层容器
12
- .@{prefix-table}--wrapper {
13
- .reset-component();
14
- }
15
-
16
- /* 全屏 */
17
- .@{prefix-table}--maximize {
18
- position: fixed;
19
- top: 0;
20
- left: 0;
21
- right: 0;
22
- height: 100%;
23
- z-index: 100;
24
- overflow-y: auto;
25
- padding: @v-module-distance;
26
- padding-bottom: 0;
27
- background-color: @v-table-background-color;
28
- }
29
-
30
- /* table 样式 */
31
- .@{prefix-table} {
32
- position: relative;
33
- background-color: @v-table-background-color;
34
- &:before,
35
- &:after {
36
- content: '';
37
- position: absolute;
38
- left: 0;
39
- width: 100%;
40
- height: 0;
41
- z-index: 3;
42
- pointer-events: none;
43
- }
44
- &:before {
45
- top: 0;
46
- border-top: 1px solid @v-table-border-color;
47
- }
48
- &:after {
49
- bottom: -1px;
50
- border-bottom: 1px solid @v-table-border-color;
51
- }
52
-
53
- &--header,
54
- &--body,
55
- &--footer {
56
- border: 0;
57
- border-spacing: 0;
58
- border-collapse: separate;
59
- table-layout: fixed;
60
- }
61
-
62
- &--header-wrapper,
63
- &--footer-wrapper {
64
- overflow-x: hidden;
65
- overflow-y: hidden;
66
- }
67
-
68
- &--body-wrapper {
69
- overflow-y: auto;
70
- overflow-x: auto;
71
- & > .merge-cell-bar {
72
- position: absolute;
73
- display: none;
74
- border: 2px solid @v-primary-color;
75
- border-radius: @v-border-radius;
76
- background-color: rgba(255, 255, 255, 0.3);
77
- z-index: 9;
78
- .btn {
79
- position: absolute;
80
- right: -54px;
81
- bottom: 0;
82
- }
83
- .cancel {
84
- bottom: 30px;
85
- }
86
- }
87
- }
88
-
89
- &.c--resize {
90
- cursor: col-resize;
91
- .header--column {
92
- pointer-events: none;
93
- }
94
- }
95
-
96
- .header--column {
97
- background-color: @v-table-header-background-color;
98
- }
99
-
100
- .body--column {
101
- transition: background-color 0.3s ease;
102
- background-color: @v-table-background-color;
103
- }
104
-
105
- .footer--column {
106
- background-color: @v-table-footer-background-color;
107
- border-bottom: 0;
108
- }
109
-
110
- .body--row:hover {
111
- .body--column {
112
- background-color: @v-table-row-hover-background-color;
113
- }
114
- }
115
-
116
- .body--row-striped {
117
- .body--column {
118
- background-color: @v-table-header-background-color;
119
- }
120
- }
121
-
122
- .body--row-selected {
123
- .body--column {
124
- background-color: @v-table-row-selected-background-color;
125
- }
126
- }
127
-
128
- .body--row-current {
129
- .body--column {
130
- background-color: @v-table-row-current-background-color;
131
- }
132
- }
133
-
134
- .body--row-expanded {
135
- .body--column {
136
- background-color: @v-table-row-expanded-background-color;
137
- }
138
- }
139
-
140
- .body--row-group_1 {
141
- .body--column {
142
- background-color: @--primary-1;
143
- }
144
- }
145
-
146
- .body--row-group_2 {
147
- .body--column {
148
- background-color: @--primary-2;
149
- }
150
- }
151
-
152
- .body--row-group_3 {
153
- .body--column {
154
- background-color: @--primary-3;
155
- }
156
- }
157
-
158
- .header--column,
159
- .body--column,
160
- .footer--column {
161
- position: relative;
162
- text-align: left;
163
- // line-height: @v-table-row-line-height;
164
- &:not(.col--ellipsis) {
165
- padding: ceil(((@v-table-row-height - @v-table-row-line-height) / 2)) 0;
166
- .cell {
167
- line-height: 1.2;
168
- }
169
- }
170
- &.col--center:not(.header--column) {
171
- text-align: center;
172
- }
173
- &.col--right:not(.header--column) {
174
- text-align: right;
175
- }
176
- .cell {
177
- white-space: pre-wrap;
178
- word-break: break-all;
179
- padding: 0 @v-module-distance;
180
- .cell--indent {
181
- float: left;
182
- height: 1px;
183
- visibility: hidden;
184
- }
185
- .cell--sign {
186
- content: ' ';
187
- top: -5px;
188
- left: -5px;
189
- position: absolute;
190
- z-index: 1;
191
- border-width: 5px;
192
- border-style: solid;
193
- border-color: transparent @v-primary-color transparent transparent;
194
- transform: rotate(45deg);
195
- pointer-events: none;
196
- }
197
- .cell--copy {
198
- display: flex;
199
- flex-shrink: 0;
200
- align-items: center;
201
- justify-content: space-between;
202
- .text {
203
- flex: 1;
204
- .text-overflow-cut();
205
- }
206
- .icon {
207
- margin-right: -2px;
208
- color: @v-font-secondary-color;
209
- cursor: pointer;
210
- }
211
- }
212
- }
213
- }
214
-
215
- // 自定义
216
- &.is--fixed {
217
- .cell-fix-left,
218
- .cell-fix-right {
219
- position: sticky;
220
- z-index: 2;
221
- .gutter-overlay {
222
- content: '';
223
- position: absolute;
224
- top: 0;
225
- bottom: -1px;
226
- background-color: @v-table-background-color;
227
- }
228
- }
229
- .cell-fix-left-last {
230
- &::after {
231
- content: '';
232
- position: absolute;
233
- top: 0;
234
- right: 0;
235
- bottom: -1px;
236
- width: 20px;
237
- transform: translateX(100%);
238
- transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
239
- pointer-events: none;
240
- }
241
- }
242
- .cell-fix-right-first {
243
- &::after {
244
- content: '';
245
- position: absolute;
246
- top: 0;
247
- left: 0;
248
- bottom: -1px;
249
- width: 20px;
250
- transform: translateX(-100%);
251
- transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
252
- pointer-events: none;
253
- }
254
- }
255
- &.ping--left .cell-fix-left-last::after {
256
- box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
257
- }
258
- &.ping--right .cell-fix-right-first::after {
259
- box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
260
- }
261
- }
262
-
263
- &.is--sortable {
264
- .column-has-sorter {
265
- transition: background-color 0.3s ease;
266
- cursor: pointer;
267
- &:hover {
268
- background-color: @v-table-column-sort-hover-color;
269
- }
270
- &.column--sort {
271
- background-color: @v-table-column-sorted-color;
272
- }
273
- }
274
- .column--sort {
275
- background-color: @v-table-header-background-color;
276
- }
277
- }
278
-
279
- &.is--border {
280
- .header--column,
281
- .body--column,
282
- .footer--column {
283
- border-bottom: 1px solid @v-table-border-color;
284
- border-right: 1px solid @v-table-border-color;
285
- .box-sizing-content();
286
- }
287
- }
288
-
289
- &:not(.is--border) {
290
- &:before,
291
- &:after {
292
- border: 0;
293
- }
294
- .header--column,
295
- .body--column {
296
- border-bottom: 1px solid @v-table-border-color;
297
- }
298
- }
299
-
300
- &.is--merge-cell &--body-wrapper > table > tbody {
301
- pointer-events: none;
302
- }
303
-
304
- /* body 填充元素 */
305
- .body--x-space {
306
- height: 0;
307
- visibility: hidden;
308
- &::after {
309
- content: '.';
310
- }
311
- }
312
- .body--y-space {
313
- width: 0;
314
- float: left;
315
- visibility: hidden;
316
- }
317
-
318
- /* 列宽线 */
319
- &--resizable-bar {
320
- display: none;
321
- position: absolute;
322
- top: 0;
323
- left: 0;
324
- width: 1px;
325
- height: 100%;
326
- z-index: 4;
327
- &:before {
328
- content: '';
329
- display: block;
330
- height: 100%;
331
- background-color: @v-table-resizable-color;
332
- }
333
- }
334
-
335
- /* 边框线 */
336
- &--border-line {
337
- &:before,
338
- &:after {
339
- content: '';
340
- position: absolute;
341
- top: 0;
342
- width: 0;
343
- height: 100%;
344
- z-index: 3;
345
- pointer-events: none;
346
- }
347
- &:before {
348
- left: 0;
349
- border-left: 1px solid @v-table-border-color;
350
- }
351
- &:after {
352
- right: 0;
353
- border-right: 1px solid @v-table-border-color;
354
- }
355
- }
356
-
357
- /* 溢出列 */
358
- .header--column,
359
- .body--column,
360
- .footer--column {
361
- &.col--ellipsis {
362
- .cell {
363
- .text-overflow-cut();
364
- word-break: break-all;
365
- white-space: pre;
366
- }
367
- }
368
- }
369
-
370
- /* 弹出层 */
371
- &__popper {
372
- padding: @v-module-distance;
373
- }
374
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-06-24 14:28:19
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-table: ~'@{qm-prefix}-table';
10
+
11
+ // 外层容器
12
+ .@{prefix-table}--wrapper {
13
+ .reset-container();
14
+ }
15
+
16
+ /* 全屏 */
17
+ .@{prefix-table}--maximize {
18
+ position: fixed;
19
+ top: 0;
20
+ left: 0;
21
+ right: 0;
22
+ height: 100%;
23
+ z-index: 100;
24
+ overflow-y: auto;
25
+ padding: @v-module-distance;
26
+ padding-bottom: 0;
27
+ background-color: @v-table-background-color;
28
+ }
29
+
30
+ /* table 样式 */
31
+ .@{prefix-table} {
32
+ position: relative;
33
+ background-color: @v-table-background-color;
34
+ &:before,
35
+ &:after {
36
+ content: '';
37
+ position: absolute;
38
+ left: 0;
39
+ width: 100%;
40
+ height: 0;
41
+ z-index: 3;
42
+ pointer-events: none;
43
+ }
44
+ &:before {
45
+ top: 0;
46
+ border-top: 1px solid @v-table-border-color;
47
+ }
48
+ &:after {
49
+ bottom: -1px;
50
+ border-bottom: 1px solid @v-table-border-color;
51
+ }
52
+
53
+ &--header,
54
+ &--body,
55
+ &--footer {
56
+ border: 0;
57
+ border-spacing: 0;
58
+ border-collapse: separate;
59
+ table-layout: fixed;
60
+ }
61
+
62
+ &--header-wrapper,
63
+ &--footer-wrapper {
64
+ overflow-x: hidden;
65
+ overflow-y: hidden;
66
+ }
67
+
68
+ &--body-wrapper {
69
+ overflow-y: auto;
70
+ overflow-x: auto;
71
+ & > .merge-cell-bar {
72
+ position: absolute;
73
+ display: none;
74
+ border: 2px solid @v-primary-color;
75
+ border-radius: @v-border-radius;
76
+ background-color: rgba(255, 255, 255, 0.3);
77
+ z-index: 9;
78
+ .btn {
79
+ position: absolute;
80
+ right: -54px;
81
+ bottom: 0;
82
+ }
83
+ .cancel {
84
+ bottom: 30px;
85
+ }
86
+ }
87
+ }
88
+
89
+ &.c--resize {
90
+ cursor: col-resize;
91
+ .header--column {
92
+ pointer-events: none;
93
+ }
94
+ }
95
+
96
+ .header--column {
97
+ background-color: @v-table-header-background-color;
98
+ }
99
+
100
+ .body--column {
101
+ transition: background-color 0.3s ease;
102
+ background-color: @v-table-background-color;
103
+ }
104
+
105
+ .footer--column {
106
+ background-color: @v-table-footer-background-color;
107
+ border-bottom: 0;
108
+ }
109
+
110
+ .body--row:hover {
111
+ .body--column {
112
+ background-color: @v-table-row-hover-background-color;
113
+ }
114
+ }
115
+
116
+ .body--row-striped {
117
+ .body--column {
118
+ background-color: @v-table-header-background-color;
119
+ }
120
+ }
121
+
122
+ .body--row-selected {
123
+ .body--column {
124
+ background-color: @v-table-row-selected-background-color;
125
+ }
126
+ }
127
+
128
+ .body--row-current {
129
+ .body--column {
130
+ background-color: @v-table-row-current-background-color;
131
+ }
132
+ }
133
+
134
+ .body--row-expanded {
135
+ .body--column {
136
+ background-color: @v-table-row-expanded-background-color;
137
+ }
138
+ }
139
+
140
+ .body--row-group_1 {
141
+ .body--column {
142
+ background-color: @--primary-1;
143
+ }
144
+ }
145
+
146
+ .body--row-group_2 {
147
+ .body--column {
148
+ background-color: @--primary-2;
149
+ }
150
+ }
151
+
152
+ .body--row-group_3 {
153
+ .body--column {
154
+ background-color: @--primary-3;
155
+ }
156
+ }
157
+
158
+ .header--column,
159
+ .body--column,
160
+ .footer--column {
161
+ position: relative;
162
+ text-align: left;
163
+ // line-height: @v-table-row-line-height;
164
+ &:not(.col--ellipsis) {
165
+ padding: ceil(((@v-table-row-height - @v-table-row-line-height) / 2)) 0;
166
+ .cell {
167
+ line-height: 1.2;
168
+ }
169
+ }
170
+ &.col--center:not(.header--column) {
171
+ text-align: center;
172
+ }
173
+ &.col--right:not(.header--column) {
174
+ text-align: right;
175
+ }
176
+ .cell {
177
+ white-space: pre-wrap;
178
+ word-break: break-all;
179
+ padding: 0 @v-module-distance;
180
+ .cell--indent {
181
+ float: left;
182
+ height: 1px;
183
+ visibility: hidden;
184
+ }
185
+ .cell--sign {
186
+ content: ' ';
187
+ top: -5px;
188
+ left: -5px;
189
+ position: absolute;
190
+ z-index: 1;
191
+ border-width: 5px;
192
+ border-style: solid;
193
+ border-color: transparent @v-primary-color transparent transparent;
194
+ transform: rotate(45deg);
195
+ pointer-events: none;
196
+ }
197
+ .cell--copy {
198
+ display: flex;
199
+ flex-shrink: 0;
200
+ align-items: center;
201
+ justify-content: space-between;
202
+ .text {
203
+ flex: 1;
204
+ .text-overflow-cut();
205
+ }
206
+ .icon {
207
+ margin-right: -2px;
208
+ color: @v-font-secondary-color;
209
+ cursor: pointer;
210
+ }
211
+ }
212
+ }
213
+ }
214
+
215
+ // 自定义
216
+ &.is--fixed {
217
+ .cell-fix-left,
218
+ .cell-fix-right {
219
+ position: sticky;
220
+ z-index: 2;
221
+ .gutter-overlay {
222
+ content: '';
223
+ position: absolute;
224
+ top: 0;
225
+ bottom: -1px;
226
+ background-color: @v-table-background-color;
227
+ }
228
+ }
229
+ .cell-fix-left-last {
230
+ &::after {
231
+ content: '';
232
+ position: absolute;
233
+ top: 0;
234
+ right: 0;
235
+ bottom: -1px;
236
+ width: 20px;
237
+ transform: translateX(100%);
238
+ transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
239
+ pointer-events: none;
240
+ }
241
+ }
242
+ .cell-fix-right-first {
243
+ &::after {
244
+ content: '';
245
+ position: absolute;
246
+ top: 0;
247
+ left: 0;
248
+ bottom: -1px;
249
+ width: 20px;
250
+ transform: translateX(-100%);
251
+ transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
252
+ pointer-events: none;
253
+ }
254
+ }
255
+ &.ping--left .cell-fix-left-last::after {
256
+ box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
257
+ }
258
+ &.ping--right .cell-fix-right-first::after {
259
+ box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
260
+ }
261
+ }
262
+
263
+ &.is--sortable {
264
+ .column-has-sorter {
265
+ transition: background-color 0.3s ease;
266
+ cursor: pointer;
267
+ &:hover {
268
+ background-color: @v-table-column-sort-hover-color;
269
+ }
270
+ &.column--sort {
271
+ background-color: @v-table-column-sorted-color;
272
+ }
273
+ }
274
+ .column--sort {
275
+ background-color: @v-table-header-background-color;
276
+ }
277
+ }
278
+
279
+ &.is--border {
280
+ .header--column,
281
+ .body--column,
282
+ .footer--column {
283
+ border-bottom: 1px solid @v-table-border-color;
284
+ border-right: 1px solid @v-table-border-color;
285
+ .box-sizing-content();
286
+ }
287
+ }
288
+
289
+ &:not(.is--border) {
290
+ &:before,
291
+ &:after {
292
+ border: 0;
293
+ }
294
+ .header--column,
295
+ .body--column {
296
+ border-bottom: 1px solid @v-table-border-color;
297
+ }
298
+ }
299
+
300
+ &.is--merge-cell &--body-wrapper > table > tbody {
301
+ pointer-events: none;
302
+ }
303
+
304
+ /* body 填充元素 */
305
+ .body--x-space {
306
+ height: 0;
307
+ visibility: hidden;
308
+ &::after {
309
+ content: '.';
310
+ }
311
+ }
312
+ .body--y-space {
313
+ width: 0;
314
+ float: left;
315
+ visibility: hidden;
316
+ }
317
+
318
+ /* 列宽线 */
319
+ &--resizable-bar {
320
+ display: none;
321
+ position: absolute;
322
+ top: 0;
323
+ left: 0;
324
+ width: 1px;
325
+ height: 100%;
326
+ z-index: 4;
327
+ &:before {
328
+ content: '';
329
+ display: block;
330
+ height: 100%;
331
+ background-color: @v-table-resizable-color;
332
+ }
333
+ }
334
+
335
+ /* 边框线 */
336
+ &--border-line {
337
+ &:before,
338
+ &:after {
339
+ content: '';
340
+ position: absolute;
341
+ top: 0;
342
+ width: 0;
343
+ height: 100%;
344
+ z-index: 3;
345
+ pointer-events: none;
346
+ }
347
+ &:before {
348
+ left: 0;
349
+ border-left: 1px solid @v-table-border-color;
350
+ }
351
+ &:after {
352
+ right: 0;
353
+ border-right: 1px solid @v-table-border-color;
354
+ }
355
+ }
356
+
357
+ /* 溢出列 */
358
+ .header--column,
359
+ .body--column,
360
+ .footer--column {
361
+ &.col--ellipsis {
362
+ .cell {
363
+ .text-overflow-cut();
364
+ word-break: break-all;
365
+ white-space: pre;
366
+ }
367
+ }
368
+ }
369
+
370
+ /* 弹出层 */
371
+ &__popper {
372
+ padding: @v-module-distance;
373
+ }
374
+ }