@alauda-fe/dynamic-plugin-shared 0.0.3-alpha.3 → 0.0.4-alpha.10

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,504 +0,0 @@
1
- // stylelint-disable no-descending-specificity
2
- @use 'node_modules/@alauda/ui/theme/var' as *;
3
- @use 'node_modules/@alauda/ui/theme/mixin' as *;
4
- @use 'node_modules/@alauda/ui/theme/pattern' as *;
5
- @use 'libs/dynamic-plugin-sdk/styles/mixins' as *;
6
- @use './var' as shared-var;
7
-
8
- @mixin array-form-table {
9
- .acl-array-form-table {
10
- flex: 1;
11
- width: 100%;
12
- border-spacing: 0;
13
- border: 12px solid use-rgb(n-9);
14
- border-radius: use-var(border-radius-l);
15
- border-collapse: unset;
16
-
17
- thead {
18
- background-color: use-rgb(n-9);
19
-
20
- th,
21
- td {
22
- line-height: 20px;
23
- color: use-rgb(n-1);
24
- text-align: left;
25
- font-weight: 500;
26
- padding: 0 0 12px 8px;
27
-
28
- &[required]:before {
29
- content: '*';
30
- color: use-rgb(red);
31
- margin-right: 4px;
32
- }
33
- }
34
- }
35
-
36
- tbody {
37
- > tr {
38
- background-color: use-rgb(n-10);
39
- border-radius: 2px;
40
-
41
- &:first-child {
42
- > td {
43
- border-top: unset;
44
- }
45
- }
46
- }
47
-
48
- td {
49
- padding: 8px 0 8px 8px;
50
- vertical-align: middle;
51
-
52
- &:last-child {
53
- padding: 8px;
54
- }
55
- }
56
- }
57
-
58
- tr.acl-array-form-table__row-error:not(
59
- :has(+ .acl-array-form-table__row-error:empty)
60
- ) {
61
- background-color: rgb(var(--aui-color-r-6));
62
- }
63
-
64
- tr.acl-array-form-table--row-action {
65
- td {
66
- padding: unset;
67
- border-bottom: unset;
68
- padding-bottom: unset;
69
- border-top: 8px solid use-rgb(n-9);
70
- }
71
- }
72
-
73
- tr.acl-array-form-table__separator {
74
- td {
75
- padding: 0;
76
- background-color: use-rgb(n-9);
77
- }
78
- }
79
-
80
- th.acl-array-form-table__action-col {
81
- min-width: 48px;
82
- }
83
-
84
- /* We have a convention here that the last column is the action column */
85
- td.acl-array-form-table__action-col {
86
- padding: 8px;
87
- text-align: center;
88
- white-space: nowrap;
89
- vertical-align: middle;
90
- width: 24px;
91
-
92
- .aui-button--text.isPlain {
93
- font-size: 16px;
94
- }
95
-
96
- /* customized style */
97
- .action-col__vertical {
98
- display: flex;
99
- flex-direction: column;
100
- align-items: center;
101
- justify-content: center;
102
- }
103
- }
104
-
105
- /* customized style */
106
- tbody td.acl-table-form-error-hint {
107
- // 上一行 padding-bottom 为 8px,这里我们希望错误内容与控件间距为 4px
108
- margin-top: -4px;
109
- border-top: none;
110
- padding-top: 0;
111
- color: use-rgb(red);
112
- font-size: 12px;
113
-
114
- acl-errors-mapper .acl-error-hint {
115
- margin-top: 0;
116
- }
117
- }
118
-
119
- &__bottom-control-buttons {
120
- display: flex;
121
- width: 100%;
122
- background-color: use-rgb(n-9);
123
-
124
- .aui-button {
125
- flex: 1;
126
-
127
- &--default {
128
- color: use-text-color(secondary);
129
- }
130
-
131
- &:not([disabled]) {
132
- background-color: use-rgb(n-10);
133
-
134
- &:hover {
135
- background-color: use-rgb(p-6);
136
- }
137
-
138
- &:active {
139
- background-color: use-rgb(p-5);
140
- }
141
- }
142
-
143
- &.aui-button--primary.isPlain[disabled] {
144
- background-color: use-rgb(n-8);
145
- color: use-rgb(n-6);
146
- }
147
-
148
- border-style: unset;
149
- font-size: 14px;
150
- height: 28px;
151
- border-radius: 2px;
152
-
153
- aui-icon {
154
- font-size: 16px;
155
- }
156
- }
157
- }
158
-
159
- &__readonly-mode {
160
- border-radius: use-var(border-radius-l);
161
- border-collapse: separate;
162
-
163
- th,
164
- td {
165
- .aui-checkbox {
166
- margin: unset;
167
- }
168
- }
169
-
170
- thead {
171
- tr {
172
- th,
173
- td {
174
- padding: 0 10px 12px;
175
- border-top: none;
176
-
177
- &:first-child {
178
- padding-left: 20px;
179
- }
180
-
181
- &:last-child {
182
- padding-right: 20px;
183
- }
184
- }
185
- }
186
- }
187
-
188
- tbody {
189
- tr {
190
- height: 58px;
191
-
192
- td {
193
- padding: 15px 10px;
194
- border: 1px solid use-rgb(n-8);
195
- border-bottom-width: 0;
196
-
197
- &:not(:last-child) {
198
- border-right: none;
199
- }
200
-
201
- &:not(:first-child) {
202
- border-left: none;
203
- }
204
-
205
- &:first-child {
206
- padding-left: 19px;
207
- }
208
-
209
- &:last-child {
210
- padding: 15px 19px 15px 10px;
211
- }
212
- }
213
- }
214
-
215
- tr:last-child {
216
- td {
217
- border-bottom-width: 1px;
218
- }
219
-
220
- td:first-child {
221
- border-bottom-left-radius: use-var(border-radius-l);
222
- }
223
-
224
- td:last-child {
225
- border-bottom-right-radius: use-var(border-radius-l);
226
- }
227
- }
228
-
229
- tr:first-child {
230
- td {
231
- border-top: 1px solid use-rgb(n-8);
232
- }
233
-
234
- td:first-child {
235
- border-top-left-radius: use-var(border-radius-l);
236
- }
237
-
238
- td:last-child {
239
- border-top-right-radius: use-var(border-radius-l);
240
- }
241
- }
242
- }
243
- }
244
-
245
- &__action-col-divider {
246
- border-left: 1px solid use-rgb(n-8);
247
- }
248
- }
249
- }
250
-
251
- @mixin detail-page-fullheight($gap: 0) {
252
- display: block;
253
- height: calc(
254
- 100vh - (#{shared-var.$page-top}) - #{111px + 16px + 20px + $gap}
255
- );
256
-
257
- > .aui-card {
258
- height: 100%;
259
-
260
- .aui-card__content,
261
- aui-code-editor,
262
- .aui-code-editor {
263
- height: 100%;
264
- min-height: 100%;
265
- }
266
- }
267
- }
268
-
269
- // 通用创建/更新页,撑屏内容高度
270
- @mixin create-page-fullheight__card($hasSample: false) {
271
- $height: calc(
272
- 100vh - (#{shared-var.$page-top}) - #{20px + 32px + 16px + 1px + 16px + 20px +
273
- 20px + shared-var.$fixed-form-footer-height}
274
- );
275
- @if $hasSample == true {
276
- $height: calc(
277
- 100vh -
278
- (#{shared-var.$page-top}) -
279
- #{20px +
280
- 32px +
281
- 16px +
282
- 1px +
283
- 16px +
284
- 20px +
285
- 20px +
286
- 15px +
287
- shared-var.$fixed-form-footer-height}
288
- );
289
- }
290
-
291
- display: block;
292
- height: $height;
293
- min-height: $height;
294
-
295
- aui-code-editor,
296
- .aui-code-editor {
297
- height: 100%;
298
- min-height: 100%;
299
- }
300
- }
301
-
302
- // 创建页,无card-header时撑屏内容高度
303
- @mixin create-page-fullheight__content {
304
- height: calc(
305
- 100vh - (#{shared-var.$page-top}) - #{20px + 20px + 20px +
306
- shared-var.$fixed-form-footer-height}
307
- );
308
- }
309
-
310
- @mixin table-row-placeholder-extend {
311
- display: flex;
312
- justify-content: center;
313
- align-items: center;
314
- z-index: 1;
315
- @include text-set(m, help);
316
- }
317
-
318
- @mixin acl-select-prefix {
319
- aui-select .acl-select-prefix__wrapper {
320
- &.isOpened,
321
- &:hover:not(.isDisabled) {
322
- border-color: use-rgb(primary);
323
- }
324
-
325
- &.isOpened {
326
- @include outline-shadow(primary);
327
- }
328
-
329
- &.isDisabled {
330
- .acl-select-prefix__label {
331
- background-color: use-rgb(n-8);
332
- border-color: use-rgb(n-7);
333
- }
334
- }
335
-
336
- display: flex;
337
- border: 1px solid use-rgb(border);
338
- border-radius: use-var(border-radius-m);
339
- overflow-y: hidden;
340
-
341
- aui-input-group {
342
- flex: 1;
343
- margin-block: -1px;
344
- }
345
-
346
- .aui-input {
347
- box-shadow: none !important;
348
- border: none !important;
349
- }
350
-
351
- .acl-select-prefix__label {
352
- order: -1;
353
- display: inline-flex;
354
- align-items: center;
355
- background-color: use-rgb(n-9);
356
- padding-left: 8px;
357
- font-size: 14px;
358
- font-weight: use-var(font-weight-bold);
359
- color: use-rgb(n-4);
360
- white-space: nowrap;
361
- }
362
- }
363
-
364
- aui-multi-select {
365
- .acl-select-prefix__label {
366
- color: use-rgb(n-4);
367
- margin-right: 8px;
368
- }
369
- }
370
-
371
- aui-select.ng-invalid.ng-dirty,
372
- .ng-submitted aui-select.ng-invalid {
373
- .acl-select-prefix__wrapper {
374
- @include input-error;
375
-
376
- &.isOpened {
377
- @include outline-shadow(red);
378
- }
379
-
380
- &:hover:not(.isOpened) {
381
- box-shadow: none;
382
- }
383
- }
384
- }
385
- }
386
-
387
- @mixin acl-table-in-table {
388
- .acl-table-in-table {
389
- width: calc(100% + 16px);
390
- margin-left: -8px;
391
- margin-right: -8px;
392
-
393
- td,
394
- th {
395
- line-height: 20px;
396
- padding: 8px;
397
- border-bottom: 1px solid use-rgb(n-8);
398
- text-align: left;
399
- }
400
-
401
- thead {
402
- td,
403
- th {
404
- padding-top: 0;
405
- color: use-rgb(n-4);
406
- }
407
- }
408
-
409
- tbody,
410
- tfoot {
411
- td {
412
- color: use-rgb(n-1);
413
- }
414
-
415
- > tr:last-child {
416
- td {
417
- padding-bottom: 0;
418
- border-bottom: 0;
419
- }
420
- }
421
- }
422
- }
423
- }
424
-
425
- // 选中的产品和选中命名空间的背景颜色
426
- @mixin select-background {
427
- background-color: use-rgb(primary);
428
- border-color: use-rgb(primary);
429
- color: white;
430
- cursor: default;
431
-
432
- &:hover {
433
- box-shadow: none;
434
- }
435
- }
436
-
437
- @mixin co-line-clamp($lines: 3) {
438
- display: -webkit-box;
439
- overflow: hidden;
440
- -webkit-box-orient: vertical;
441
- -webkit-line-clamp: $lines;
442
- }
443
-
444
- @mixin lang-zh {
445
- $scope: &;
446
-
447
- @at-root {
448
- #{selector-nest('html[lang|=zh]', $scope)} {
449
- @content;
450
- }
451
- }
452
- }
453
-
454
- @mixin multi-line-textarea-wrapper {
455
- display: grid;
456
- align-items: stretch;
457
-
458
- &:after,
459
- textarea {
460
- grid-area: 1 / 1;
461
- width: auto;
462
- padding: 3px 5px; // aui mini textarea padding
463
- font: inherit;
464
- resize: none;
465
- max-height: 252px;
466
- }
467
-
468
- &:after {
469
- content: attr(data-value) ' ';
470
- visibility: hidden;
471
- white-space: pre-wrap;
472
- }
473
-
474
- textarea {
475
- overflow: auto;
476
- height: auto !important;
477
- }
478
-
479
- &:focus-within {
480
- textarea:focus {
481
- outline: none;
482
- }
483
- }
484
- }
485
-
486
- @mixin highlight-field-item() {
487
- :host {
488
- acl-field-set-item {
489
- ::ng-deep {
490
- .field-set-item__value,
491
- acl-status-icon {
492
- color: use-rgb(n-1) !important;
493
- font-weight: 500 !important;
494
- }
495
-
496
- label,
497
- .field-set-item__label:after {
498
- color: use-rgb(n-2) !important;
499
- font-weight: 400 !important;
500
- }
501
- }
502
- }
503
- }
504
- }
package/styles/var.scss DELETED
@@ -1,5 +0,0 @@
1
- $page-header-height: var(--acl-page-header-height);
2
- $page-toolbar-height: 44px;
3
- $page-top: $page-header-height + ' + ' + $page-toolbar-height;
4
- $page-padding-m: 20px;
5
- $fixed-form-footer-height: 64px;