@alauda/ui 6.0.2-beta.19 → 6.0.2-beta.22

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/ui",
3
- "version": "6.0.2-beta.19",
3
+ "version": "6.0.2-beta.22",
4
4
  "description": "Angular UI components by Alauda Frontend Team.",
5
5
  "repository": "git+https://github.com/alauda/alauda-ui.git",
6
6
  "author": "Alauda Frontend",
@@ -2,6 +2,7 @@ import { CdkCell } from '@angular/cdk/table';
2
2
  import { EventEmitter } from '@angular/core';
3
3
  export declare class TableCellComponent extends CdkCell {
4
4
  expand: boolean;
5
+ disabled: boolean;
5
6
  template: boolean;
6
7
  expandChange: EventEmitter<any>;
7
8
  get expanded(): string;
@@ -29,10 +29,6 @@
29
29
  @return rgba(var(--aui-color-#{$name}), $opacity);
30
30
  }
31
31
 
32
- @function get-neg-size($name) {
33
- @return calc(var(--aui-#{$name}) * -1);
34
- }
35
-
36
32
  $divider-line: 1px solid get-color(n-8);
37
33
 
38
34
  /**
@@ -1,74 +1,27 @@
1
- @import 'var.scss';
2
-
3
- @mixin table-card-header {
4
- display: flex;
5
- justify-content: space-between;
6
- align-items: center;
7
- margin-bottom: 12px;
8
- font-size: $font-size-larger;
9
- color: $color-text-main;
10
- }
11
-
12
- @mixin table-placeholder {
13
- padding: calc(#{get-size(spacing-xxl)} - 1px) 0;
14
- text-align: center;
15
- font-size: get-size(font-size-m);
16
- color: get-color(n-4);
17
- background: get-color(n-10);
18
- border: solid 1px get-color(n-8);
19
- border-radius: get-size(border-radius-l);
20
-
21
- aui-icon {
22
- margin-right: get-size(spacing-m);
23
- }
24
- }
1
+ @import 'var';
2
+ @import 'mixin';
25
3
 
26
4
  @mixin shadow-0 {
27
- border-radius: $border-radius;
28
- background-color: $color-white;
5
+ border-radius: get-size(border-radius-m);
6
+ background-color: get-color(n-10);
29
7
  }
30
8
 
31
9
  @mixin shadow-2 {
32
- border-radius: $border-radius;
33
- background-color: $color-white;
34
- box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.24);
10
+ border-radius: get-size(border-radius-m);
11
+ background-color: get-color(n-10);
12
+ box-shadow: 0 0 2px 0 get-rgba(n-1, 0.24);
35
13
  }
36
14
 
37
15
  @mixin shadow-8 {
38
- border-radius: $border-radius;
39
- background-color: $color-white;
40
- box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.16);
16
+ border-radius: get-size(border-radius-m);
17
+ background-color: get-color(n-10);
18
+ box-shadow: 0 2px 8px 0 get-rgba(n-1, 0.16);
41
19
  }
42
20
 
43
21
  @mixin shadow-16 {
44
- border-radius: $border-radius;
45
- background-color: $color-white;
46
- box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.16);
47
- }
48
-
49
- @mixin feat-stage-tag {
50
- display: inline-block;
51
- padding: 0 4px * 1.2;
52
- border-radius: 6px * 1.2;
53
- // stylelint-disable-next-line font-family-no-missing-generic-family-keyword
54
- font-family: Calibri;
55
- font-size: 12px;
56
- font-weight: bold;
57
- font-style: italic;
58
- line-height: 12px * 1.2;
59
- color: #333;
60
- background-color: #ffdf00;
61
- transform: scale(0.8333, 0.8333);
62
- }
63
-
64
- @mixin feat-stage-text {
65
- // stylelint-disable-next-line font-family-no-missing-generic-family-keyword
66
- font-family: Calibri;
67
- font-size: 12px;
68
- font-weight: bold;
69
- font-style: italic;
70
- color: #ffdf00;
71
- transform: scale(0.8333, 0.8333);
22
+ border-radius: get-size(border-radius-m);
23
+ background-color: get-color(n-10);
24
+ box-shadow: 0 4px 16px 0 get-rgba(n-1, 0.16);
72
25
  }
73
26
 
74
27
  @mixin zh-form-label-width($parent) {
@@ -83,29 +36,47 @@
83
36
  }
84
37
  }
85
38
 
86
- @mixin form-width($selector: '.aui-form') {
87
- #{$selector} {
88
- margin: auto;
89
- max-width: 960px;
39
+ @mixin table-placeholder($className) {
40
+ #{$className} {
41
+ box-sizing: border-box;
42
+ display: flex;
43
+ justify-content: center;
44
+ align-items: center;
45
+ padding: $table-cell-padding-v $table-cell-padding-h;
46
+ min-height: $table-row-min-height;
47
+ @include text-set(m, placeholder);
48
+
49
+ background-color: get-color(n-10);
50
+ border: solid 1px get-color(n-8);
51
+ border-radius: get-size(border-radius-l);
52
+ }
53
+
54
+ .aui-table .aui-table__row + #{$className} {
55
+ border-top-left-radius: 0;
56
+ border-top-right-radius: 0;
90
57
  }
91
58
  }
92
59
 
93
- @mixin with-detail($detailColumn: 'detail') {
94
- ::ng-deep .aui-table {
60
+ @mixin table-with-detail($detailColumn: 'detail') {
61
+ .aui-table {
95
62
  &__row {
96
63
  flex-wrap: wrap;
97
64
  }
65
+
98
66
  &__column-#{$detailColumn} {
99
67
  &.aui-table__header-cell {
100
68
  display: none;
101
69
  }
70
+
102
71
  &.aui-table__cell {
103
72
  width: 100%;
104
73
  flex-shrink: 0;
105
74
  flex-basis: 100%;
106
- padding: 0 calc(#{get-size(table-cell-padding-lr)} / 2);
75
+ padding: 0 $table-cell-padding-h;
107
76
  overflow: hidden;
77
+
108
78
  .aui-table__cell-expand-detail {
79
+ border-radius: get-size(border-radius-l);
109
80
  background-color: get-color(n-9);
110
81
  }
111
82
  }
@@ -113,31 +84,32 @@
113
84
  }
114
85
  }
115
86
 
116
- @mixin with-expand($expandColumn: 'expand') {
117
- ::ng-deep .aui-table {
87
+ @mixin table-with-expand($expandColumn: 'expand') {
88
+ .aui-table {
118
89
  &__cell,
119
90
  &__header-cell {
120
91
  &.aui-table__column-#{$expandColumn} {
121
- max-width: calc(
122
- var(--aui-table-cell-padding-lr) / 2 + var(--aui-font-size-l)
123
- );
124
- padding-right: 0;
125
- /* stylelint-disable function-calc-no-unspaced-operator */
126
- line-height: calc(
127
- #{get-size(table-row-min-height-m)} - 2 * #{get-size(
128
- table-cell-padding-tb-m
129
- )}
130
- );
131
- /* stylelint-enable function-calc-no-unspaced-operator */
92
+ display: flex;
93
+ align-items: center;
94
+ height: $table-row-min-height - 2px;
95
+ max-width: calc(#{$table-cell-padding-h} + #{get-size(icon-size-m)});
96
+ margin-right: -2px;
132
97
 
133
98
  .aui-table__cell-expand-button {
134
- width: get-size(font-size-l);
135
- height: get-size(font-size-l);
99
+ width: get-size(icon-size-m);
100
+ height: get-size(icon-size-m);
101
+
136
102
  &.collapsed {
137
- background-color: get-rgba(primary, 0.1);
138
- border-color: get-rgba(primary, 0.1);
103
+ background-color: get-color(p-6);
104
+ border-color: get-color(p-6);
139
105
  color: get-color(primary);
140
106
  }
107
+
108
+ &[disabled] {
109
+ background-color: get-color(n-8);
110
+ border-color: get-color(n-8);
111
+ color: get-color(n-6);
112
+ }
141
113
  }
142
114
  }
143
115
  }
package/theme/_var.scss CHANGED
@@ -35,18 +35,10 @@ $text-button-mini-height: 16px;
35
35
  $text-button-mini-font-size: 12px;
36
36
 
37
37
  // Table
38
- $table-border-width: 1px;
39
- $table-header-row-height: 42px;
40
- $table-cell-horizontal-padding: 8px;
41
- $table-row-vertical-padding: 12px;
42
-
43
- $table-header-row-bg: #fafafa;
44
- $table-header-row-border-color: #eee;
45
- $table-header-row-color: #333;
46
- $table-row-border-color: #eee;
47
- $table-row-bg: #fff;
48
- $table-row-color: #333;
49
- $table-font-size-base: 14px;
38
+ $table-padding: 12px;
39
+ $table-row-min-height: 60px;
40
+ $table-cell-padding-v: 15px;
41
+ $table-cell-padding-h: 10px;
50
42
 
51
43
  // Sort
52
44
  $sort-indicator-color: #ccc;
package/theme/style.css CHANGED
@@ -239,15 +239,6 @@ html[aui-color-mode=dark] {
239
239
  --aui-form-item-width-l: 732px;
240
240
  --aui-form-item-width-m: 436px;
241
241
  --aui-form-item-width-s: 140px;
242
- --aui-table-margin: 12px;
243
- --aui-table-cell-padding-lr: 20px;
244
- --aui-table-cell-padding-tb-s: 11px;
245
- --aui-table-cell-padding-tb-m: 15px;
246
- --aui-table-row-min-height-s: 50px;
247
- --aui-table-row-min-height-m: 58px;
248
- --aui-table-header-cell-padding-tb: 11px;
249
- --aui-table-header-height: 44px;
250
- --aui-table-border-width: 1px;
251
242
  --aui-color-primary: var(--aui-color-blue);
252
243
  --aui-color-p-0: var(--aui-color-b-0);
253
244
  --aui-color-p-1: var(--aui-color-b-1);