@enableai-base/grid-layout 1.0.0

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.
@@ -0,0 +1,667 @@
1
+ .dashboard-container {
2
+ position: relative;
3
+ height: 100%;
4
+ width: 100%;
5
+ overflow-x: hidden;
6
+ overflow-y: scroll;
7
+ }
8
+
9
+ /* ===== 滚动条样式 ===== */
10
+ .dashboard-container::-webkit-scrollbar {
11
+ width: 8px;
12
+ }
13
+
14
+ .dashboard-container::-webkit-scrollbar-track {
15
+ background: transparent;
16
+ }
17
+
18
+ .dashboard-container::-webkit-scrollbar-thumb {
19
+ background-color: transparent;
20
+ border-radius: 8px;
21
+ }
22
+
23
+ /* 当显示滚动条时(例如添加 .show-scroll 类) */
24
+ .dashboard-container.show-scroll::-webkit-scrollbar-thumb {
25
+ background-color: rgba(147, 145, 145, 0.5);
26
+ }
27
+
28
+ .dashboard-container::-webkit-scrollbar-thumb:hover {
29
+ background-color: rgba(125, 125, 125, 0.6);
30
+ }
31
+
32
+ /* ===== ReactGridLayout 样式 ===== */
33
+ .dashboard-container .dashboard-layout {
34
+ width: 100%;
35
+ opacity: 1;
36
+ /* padding-bottom: 40px; */
37
+ box-sizing: content-box;
38
+ min-height: 100%;
39
+ overflow-x: clip;
40
+ overflow-y: visible;
41
+ }
42
+
43
+ .dashboard-container .react-grid-layout {
44
+ position: relative;
45
+ transition: height 200ms ease;
46
+ }
47
+
48
+ .dashboard-container .react-grid-item {
49
+ transition: all 200ms ease;
50
+ transition-property: left, top, width, height;
51
+ }
52
+
53
+ /* ===== ReactGridLayout 占位与交互状态 ===== */
54
+ .dashboard-container .react-grid-item.react-grid-placeholder {
55
+ border-radius: 15px;
56
+ background: #b3b3b3;
57
+ opacity: 0.2;
58
+ transition-duration: 100ms;
59
+ z-index: 2;
60
+ user-select: none;
61
+ }
62
+
63
+ .dashboard-container .react-grid-item.react-grid-placeholder.placeholder-resizing {
64
+ transition: none;
65
+ }
66
+
67
+ .dashboard-container .react-grid-item.cssTransforms {
68
+ transition-property: transform, width, height;
69
+ }
70
+
71
+ .dashboard-container .react-grid-item.resizing {
72
+ transition: none;
73
+ z-index: 9;
74
+ will-change: width, height;
75
+ }
76
+
77
+ .dashboard-container .react-grid-item.react-draggable-dragging {
78
+ transition: none;
79
+ z-index: 9;
80
+ will-change: transform;
81
+ }
82
+
83
+ .dashboard-container .react-grid-item.dropping {
84
+ visibility: hidden;
85
+ }
86
+
87
+ .dashboard-item {
88
+ position: relative;
89
+ background: var(--ant-color-bg-container);
90
+ border-radius: 16px;
91
+ box-sizing: border-box;
92
+ word-break: break-all;
93
+ z-index: 9;
94
+ }
95
+
96
+ /* 边框发光层 */
97
+ .dashboard-container .dashboard-item-resizing .dashboard-item::before {
98
+ pointer-events: auto;
99
+ }
100
+ .dashboard-item::before {
101
+ pointer-events: none;
102
+ width: 100%;
103
+ height: 100%;
104
+ border: 2px solid transparent;
105
+ border-radius: 18px;
106
+ content: '';
107
+ position: absolute;
108
+ transition: all 0.3s ease;
109
+ border-color: var(--ant-color-primary);
110
+ opacity: 0;
111
+ box-sizing: border-box;
112
+ }
113
+
114
+ /* hover 时淡显边框 */
115
+ .dashboard-item:hover::before {
116
+ opacity: 0.4;
117
+ }
118
+
119
+ /* 激活状态时边框全亮 */
120
+ .dashboard-item.isActive::before {
121
+ opacity: 1;
122
+ }
123
+
124
+ /* hover 或激活时显示图标与菜单 */
125
+ .dashboard-item:hover .item-head .drag-icon,
126
+ .dashboard-item:hover .item-head .head-menu,
127
+ .dashboard-item.isActive .item-head .drag-icon,
128
+ .dashboard-item.isActive .item-head .head-menu {
129
+ display: flex;
130
+ }
131
+
132
+ /* hover 或激活时显示 resize 句柄 */
133
+ .dashboard-item:hover .resize-handle,
134
+ .dashboard-item.isActive .resize-handle {
135
+ display: block;
136
+ }
137
+
138
+ /* 头部区域 */
139
+ .dashboard-item .item-head {
140
+ border-radius: 16px;
141
+ box-sizing: border-box;
142
+ height: 50px;
143
+ max-height: 50px;
144
+ min-height: 18px;
145
+ overflow: hidden;
146
+ padding: 18px 15px 10px 15px;
147
+ position: relative;
148
+ z-index: 1;
149
+ color: var(--ant-color-text);
150
+ }
151
+
152
+ /* 拖拽手势 */
153
+ .editable.dashboard-item .item-head:hover {
154
+ cursor: grab;
155
+ }
156
+
157
+ /* 头部内部容器 */
158
+ .dashboard-item .item-head .head-inner {
159
+ height: 100%;
160
+ max-width: 100%;
161
+ min-width: 5px;
162
+ width: 100%;
163
+ }
164
+
165
+ /* 标题 */
166
+ .dashboard-item .item-head .head-inner .head-title {
167
+ box-sizing: content-box;
168
+ flex: 1;
169
+ font-size: 16px;
170
+ font-weight: 500;
171
+ height: 100%;
172
+ line-height: 18px;
173
+ min-width: 20px;
174
+ }
175
+
176
+ /* 标题文字 */
177
+ .dashboard-item .item-head .head-inner .head-title .title-text {
178
+ overflow: hidden;
179
+ text-overflow: ellipsis;
180
+ white-space: nowrap;
181
+ }
182
+
183
+ /* 右上角菜单 */
184
+ .dashboard-item .item-head .head-menu {
185
+ align-items: center;
186
+ justify-self: right;
187
+ margin-left: 12px;
188
+ pointer-events: auto;
189
+ display: none;
190
+ }
191
+
192
+ /* 拖拽图标 */
193
+ .dashboard-item .item-head .drag-icon {
194
+ color: #8f959e;
195
+ display: none;
196
+ flex-shrink: 0;
197
+ justify-content: center;
198
+ align-items: flex-end;
199
+ pointer-events: auto;
200
+ position: absolute;
201
+ height: 18px;
202
+ right: 0;
203
+ top: 0;
204
+ left: 0;
205
+ }
206
+
207
+ /* 右下角 resize 句柄 */
208
+ .dashboard-item .resize-handle {
209
+ position: absolute;
210
+ display: none;
211
+ box-sizing: border-box;
212
+ width: 16px;
213
+ height: 16px;
214
+ right: -4px;
215
+ bottom: -2px;
216
+ overflow: hidden;
217
+ background: var(--ant-color-primary);
218
+ border: 2px solid var(--ant-color-border-bg);
219
+ border-radius: 50%;
220
+ cursor: nwse-resize;
221
+ }
222
+
223
+ /* 内容区域 */
224
+ .dashboard-item .item-body {
225
+ height: 100%;
226
+ box-sizing: border-box;
227
+ margin-top: -50px;
228
+ overflow: hidden;
229
+ padding-top: 50px;
230
+ color: var(--ant-color-text);
231
+ }
232
+
233
+ /* 按钮容器 */
234
+ .text-btn-container {
235
+ /* 布局基础 */
236
+ display: flex;
237
+ align-items: flex-start;
238
+ gap: 4px; /* 图标与文字的间距 */
239
+ align-items: center;
240
+
241
+ /* 尺寸与限制 */
242
+ width: fit-content; /* 默认保持内容的最小宽度 */
243
+ padding: 4px 8px; /* 内边距 */
244
+ background: transparent;
245
+ border: none;
246
+ border-radius: 6px; /* 圆角 */
247
+ cursor: pointer;
248
+
249
+ /* 字体设置 */
250
+ line-height: 1.5;
251
+ text-align: left; /* 确保多行文字左对齐 */
252
+
253
+ /* 禁止文本被选中,防止点击时出现蓝色高亮背景,影响按钮效果 */
254
+ user-select: none;
255
+ -webkit-user-select: none;
256
+ }
257
+
258
+ /* Hover 效果 */
259
+ .text-btn-container:hover {
260
+ background-color: rgba(140, 140, 140, 0.15);
261
+ }
262
+
263
+ /* 2. 点击效果 (Active) - 这就是你要的“闪一下” */
264
+ .text-btn-container:active {
265
+ background-color: rgba(140, 140, 140, 0.24); /* 按下时颜色更深 */
266
+ }
267
+
268
+ /* 左侧图标 wrapper (用于微调位置) */
269
+ .title-container .icon-wrapper {
270
+ display: flex;
271
+ align-items: center;
272
+ justify-content: center;
273
+ flex-shrink: 0; /* 防止图标被挤压 */
274
+ }
275
+
276
+ /* 中间文字区域 */
277
+ .text-btn-container .text-content {
278
+ flex-grow: 1; /* 占据剩余空间 */
279
+ /* 处理长文本换行,复现图中乱码换行的效果 */
280
+ word-break: break-word;
281
+ overflow-wrap: break-word;
282
+ }
283
+
284
+ /* 右侧下拉箭头 */
285
+ .text-btn-container .arrow-icon {
286
+ opacity: 0;
287
+ flex-shrink: 0;
288
+ margin-top: 4px;
289
+ font-size: 12px;
290
+ }
291
+
292
+ .text-btn-container:hover .arrow-icon {
293
+ opacity: 1;
294
+ }
295
+
296
+ .custom-drawer {
297
+ width: 100%;
298
+ height: 100%;
299
+ }
300
+
301
+ .custom-drawer .ant-drawer-body {
302
+ height: 100%;
303
+ padding: 0;
304
+ overflow: hidden;
305
+ }
306
+
307
+ .custom-drawer .drawer-header-container {
308
+ height: 100%;
309
+ }
310
+
311
+ .custom-tabs {
312
+ height: 100%;
313
+ }
314
+
315
+ .custom-tabs .ant-tabs-content-holder {
316
+ height: 86%;
317
+ overflow: auto;
318
+ }
319
+
320
+ /* 顶部控制栏 (箭头和关闭按钮) */
321
+ /* .custom-drawer .ant-drawer-header {
322
+ padding: 0 !important;
323
+ } */
324
+
325
+ .drawer-title-container {
326
+ padding: 18px 20px !important;
327
+ }
328
+
329
+ /* 覆盖 Drawer 的默认内边距 */
330
+ .custom-drawer .ant-drawer-body {
331
+ padding: 0;
332
+ overflow: hidden;
333
+ }
334
+
335
+ /* 顶部区域容器 */
336
+ .custom-drawer .drawer-header-container {
337
+ margin: 16px 24px 0 24px;
338
+ border-bottom: 1px solid var(--ant-color-split);
339
+ flex-shrink: 0; /* 防止头部被压缩 */
340
+ }
341
+
342
+ /* 大标题 */
343
+ .custom-drawer .drawer-title {
344
+ display: inline-block;
345
+ max-width: 100%;
346
+ white-space: nowrap;
347
+ overflow: hidden;
348
+ text-overflow: ellipsis;
349
+ font-weight: 500;
350
+ margin-bottom: 16px;
351
+ }
352
+
353
+ /* 内容区域滚动容器 */
354
+ .custom-drawer .drawer-content-scroll {
355
+ flex: 1;
356
+ padding: 24px;
357
+ overflow-y: auto;
358
+ }
359
+
360
+ /* 白色信息卡片 */
361
+ .custom-drawer .info-card {
362
+ padding: 8px 0; /* 上下留白 */
363
+ }
364
+
365
+ .custom-drawer .ant-form-item-row {
366
+ align-items: flex-start;
367
+ gap: 4px;
368
+ }
369
+
370
+ /* 左侧标签区域 */
371
+ .custom-drawer .ant-form-item-label {
372
+ display: flex;
373
+ align-items: center;
374
+ width: 25%; /* 根据需要调整宽度 */
375
+ font-size: 14px;
376
+ white-space: wrap;
377
+ height: auto;
378
+ }
379
+ .custom-drawer .ant-form-item-label > label {
380
+ height: auto;
381
+ }
382
+
383
+ .custom-drawer .ant-form-item-label > label::after {
384
+ content: none;
385
+ }
386
+
387
+ .custom-drawer .ant-form-item {
388
+ margin-bottom: 0 !important;
389
+ }
390
+
391
+ .search-modal {
392
+ position: fixed !important;
393
+ inset: 0;
394
+ z-index: 1000;
395
+ }
396
+
397
+ .search-modal .draggable-modal {
398
+ box-shadow:
399
+ 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
400
+ 0px 6px 16px 0px rgba(0, 0, 0, 0.05),
401
+ 0px 3px 6px -4px rgba(0, 0, 0, 0.05);
402
+ }
403
+
404
+ .search-modal .header {
405
+ display: none;
406
+ }
407
+
408
+ .search-modal .search-modal-container {
409
+ width: 100%;
410
+ padding: 24px;
411
+ overflow: hidden;
412
+ max-height: 200px;
413
+ cursor: move;
414
+ background-color: var(--ant-color-bg-container);
415
+ box-shadow: 0 4px 8px rgba(31, 35, 41, 0.1);
416
+ border: 1px solid var(--ant-color-split);
417
+ border-radius: 6px;
418
+ display: flex;
419
+ box-sizing: border-box;
420
+ }
421
+
422
+ .search-modal .no-move {
423
+ cursor: auto;
424
+ }
425
+
426
+ .search-modal .no-move .search-suffix {
427
+ color: #d7d7d7;
428
+ }
429
+
430
+ .search-modal .no-move .arrow-icon {
431
+ width: 12px;
432
+ height: 12px;
433
+ display: inline-block;
434
+ font-style: normal;
435
+ line-height: 0;
436
+ text-align: center;
437
+ text-transform: none;
438
+ text-rendering: optimizeLegibility;
439
+ color: #7c7c7c;
440
+ cursor: pointer;
441
+ font-size: 12px;
442
+ vertical-align: middle;
443
+ }
444
+
445
+ .search-modal .no-move .suffix-number {
446
+ color: #7c7c7c;
447
+ display: inline-block;
448
+ margin: 0 6px;
449
+ user-select: none;
450
+ vertical-align: middle;
451
+ font-size: 14px;
452
+ }
453
+
454
+ .search-modal .no-move .search-close {
455
+ width: 24px;
456
+ height: 24px;
457
+ padding: 4px;
458
+ }
459
+
460
+ .filter-form {
461
+ width: 100%;
462
+ }
463
+
464
+ .filter-form .filter-title-wrap {
465
+ min-height: 24px;
466
+ padding: 0 24px;
467
+ margin-bottom: 8px;
468
+ color: var(--ant-color-text-secondary);
469
+ }
470
+
471
+ .filter-form .filter-title-wrap .filter-type-container {
472
+ flex: 1;
473
+ display: flex;
474
+ justify-content: flex-end;
475
+ white-space: nowrap;
476
+ height: 24px;
477
+ }
478
+
479
+ .filter-form .filter-title-wrap .filter-type-container .filter-type-item {
480
+ margin: 0;
481
+ }
482
+
483
+ .filter-form .filter-action-wrap {
484
+ padding: 0 24px;
485
+ margin-top: 16px;
486
+ line-height: 22px;
487
+ min-height: 22px;
488
+ }
489
+
490
+ .filter-form .filter-form-list {
491
+ width: 100%;
492
+ max-height: 308px;
493
+ overflow-x: hidden;
494
+ overflow-y: auto;
495
+ padding: 0 24px;
496
+ margin: 0;
497
+ }
498
+
499
+ /* ===== 滚动条样式 ===== */
500
+ .filter-form .filter-form-list::-webkit-scrollbar {
501
+ width: 6px;
502
+ }
503
+
504
+ .filter-form .filter-form-list::-webkit-scrollbar-track {
505
+ background: transparent;
506
+ }
507
+
508
+ .filter-form .filter-form-list::-webkit-scrollbar-thumb {
509
+ border-radius: 8px;
510
+ background-color: rgba(147, 145, 145, 0.5);
511
+ }
512
+
513
+ .filter-form .filter-form-list::-webkit-scrollbar-thumb:hover {
514
+ background-color: rgba(125, 125, 125, 0.6);
515
+ }
516
+
517
+ .filter-form-group {
518
+ width: 100%;
519
+ }
520
+
521
+ .filter-form .filter-add-condition {
522
+ cursor: pointer;
523
+ display: inline-flex;
524
+ line-height: 22px;
525
+ min-height: 22px;
526
+ padding-left: 20px;
527
+ position: relative;
528
+ }
529
+
530
+ .filter-form .filter-add-condition .filter-add-button {
531
+ min-width: auto;
532
+ padding: 4px;
533
+ }
534
+
535
+ .filter-form .ant-pro-form-list-item {
536
+ display: flex;
537
+ height: 32px;
538
+ margin-top: 8px;
539
+ align-items: center !important;
540
+ gap: 4px;
541
+ }
542
+
543
+ .filter-form .ant-pro-form-list-action {
544
+ margin: 0;
545
+ align-items: center;
546
+ justify-content: center;
547
+ }
548
+
549
+ .filter-form .ant-pro-form-list-action .ant-pro-form-list-action-icon {
550
+ margin: 0;
551
+ }
552
+
553
+ .filter-form .ant-pro-form-group-container {
554
+ width: 100%;
555
+ gap: 16px !important;
556
+ }
557
+
558
+ .filter-form .ant-pro-form-list-container {
559
+ flex: 1;
560
+ }
561
+
562
+ .filter-form .ant-pro-form-group-container .ant-space-item {
563
+ width: 100%;
564
+ }
565
+
566
+ .filter-form .ant-pro-form-group-container .filter-form-item {
567
+ width: 100%;
568
+ }
569
+
570
+ .filter-form .ant-pro-form-group-container .filter-form-item .filter-item-id {
571
+ flex: 2;
572
+ }
573
+
574
+ .filter-form .ant-pro-form-group-container .filter-form-item .filter-item-id .filter-item-id-select {
575
+ width: auto;
576
+ max-width: 140px;
577
+ }
578
+
579
+ .filter-form .ant-pro-form-group-container .filter-form-item .filter-item-config {
580
+ flex: 4;
581
+ }
582
+
583
+ .filter-form .ant-select.ant-select-in-form-item {
584
+ padding: 0;
585
+ margin: 0;
586
+ }
587
+
588
+ .filter-form .filter-value-box {
589
+ flex: 1;
590
+ }
591
+
592
+ .filter-form .filter-value-box .item-value {
593
+ flex: 1;
594
+ }
595
+
596
+ .filter-form .ant-select-selector {
597
+ padding: 0 8px !important;
598
+ }
599
+
600
+ .filter-form .ant-picker {
601
+ padding: 4px 8px !important;
602
+ border-radius: 2 !important;
603
+ }
604
+
605
+ .filter-form .ant-form-item .ant-form-item-control-input {
606
+ min-height: 0 !important;
607
+ }
608
+
609
+ .filter-form .ant-form-item {
610
+ margin: 0;
611
+ }
612
+ .filter-modal .draggable-modal {
613
+ /* border: 1px solid var(--ant-color-border); */
614
+ border-radius: 6px;
615
+ box-sizing: content-box;
616
+ box-shadow:
617
+ 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
618
+ 0px 6px 16px 0px rgba(0, 0, 0, 0.05),
619
+ 0px 3px 6px -4px rgba(0, 0, 0, 0.05);
620
+ }
621
+
622
+ .filter-modal {
623
+ position: fixed !important;
624
+ inset: 0;
625
+ z-index: 1000;
626
+ }
627
+
628
+ .filter-modal .header {
629
+ display: none;
630
+ }
631
+
632
+ .filter-modal .filter-container {
633
+ min-width: 520px;
634
+ padding: 24px 0px;
635
+ font-size: 14px;
636
+ }
637
+
638
+ .table-menu-modal .draggable-modal {
639
+ box-shadow:
640
+ 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
641
+ 0px 6px 16px 0px rgba(0, 0, 0, 0.05),
642
+ 0px 3px 6px -4px rgba(0, 0, 0, 0.05);
643
+ }
644
+
645
+ .table-menu-modal {
646
+ position: fixed;
647
+ top: 0;
648
+ left: 0;
649
+ bottom: 0;
650
+ right: 0;
651
+ z-index: 1000;
652
+ }
653
+
654
+ .table-menu-modal .header {
655
+ display: none;
656
+ }
657
+
658
+ .table-menu-modal .menu-container {
659
+ min-width: 180px;
660
+ min-height: 100px;
661
+ padding: 2px 0px;
662
+ }
663
+
664
+ .table-menu-modal .menu-container .ant-menu {
665
+ width: 100%;
666
+ border-inline-end: none;
667
+ }