@netless/telebox-insider 1.0.0-alpha.20 → 1.0.0-alpha.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.
@@ -1,4 +1,5 @@
1
1
  @import "../scss/variables.scss";
2
+ @import "../scss/mixins.scss";
2
3
 
3
4
  .#{$namespace}-manager-container {
4
5
  position: relative;
@@ -8,7 +9,11 @@
8
9
  display: flex;
9
10
  justify-content: center;
10
11
  align-items: center;
11
- background: $color-container-background;
12
+ @include v(
13
+ background,
14
+ manager-container-background,
15
+ $manager-container-background
16
+ );
12
17
 
13
18
  &.is-maximized,
14
19
  &.is-minimized {
@@ -21,19 +26,31 @@
21
26
  .#{$namespace}-manager-stage {
22
27
  position: relative;
23
28
  overflow: hidden;
24
- background: $color-stage-background;
25
- box-shadow: $color-stage-shadow;
29
+ @include v(background, manager-stage-background, $manager-stage-background);
30
+ @include v(box-shadow, manager-stage-shadow, $manager-stage-shadow);
26
31
  }
27
32
 
28
33
  .#{$namespace}-color-scheme-dark {
29
34
  color-scheme: dark;
30
35
 
31
36
  &.#{$namespace}-manager-container {
32
- background: $color-container-background-dark;
37
+ @include v(
38
+ background,
39
+ manager-container-background-dark,
40
+ $manager-container-background-dark
41
+ );
33
42
 
34
43
  & > .#{$namespace}-manager-stage {
35
- background: $color-stage-background-dark;
36
- box-shadow: $color-stage-shadow-dark;
44
+ @include v(
45
+ background,
46
+ manager-stage-background-dark,
47
+ $manager-stage-background-dark
48
+ );
49
+ @include v(
50
+ box-shadow,
51
+ manager-stage-shadow-dark,
52
+ $manager-stage-shadow-dark
53
+ );
37
54
  }
38
55
  }
39
56
  }
@@ -52,8 +52,12 @@ export type TeleBoxManagerCreateConfig = Pick<
52
52
  | "content"
53
53
  | "stage"
54
54
  | "footer"
55
+ | "styles"
56
+ | "bodyStyle"
57
+ | "stageStyle"
55
58
  | "id"
56
59
  | "focus"
60
+ | "enableShadowDOM"
57
61
  >;
58
62
 
59
63
  export type TeleBoxManagerQueryConfig = Pick<
@@ -8,10 +8,12 @@
8
8
  height: 26px;
9
9
  display: flex;
10
10
  align-items: center;
11
- background: #fff;
12
11
  user-select: none;
13
- border-bottom: 1px solid #eeeef7;
14
12
  touch-action: manipulation;
13
+
14
+ @include v(color, titlebar-color, $titlebar-color);
15
+ @include v(background-color, titlebar-background, $titlebar-background);
16
+ @include v(border-bottom, titlebar-border-bottom, $titlebar-border-bottom);
15
17
  }
16
18
 
17
19
  .#{$namespace}-title-area {
@@ -26,6 +28,7 @@
26
28
 
27
29
  .#{$namespace}-title {
28
30
  @include no-user-select;
31
+ @include v(color, titlebar-color, $titlebar-color);
29
32
 
30
33
  overflow: hidden;
31
34
  margin: 0;
@@ -36,7 +39,6 @@
36
39
  white-space: nowrap;
37
40
  word-break: keep-all;
38
41
  text-overflow: ellipsis;
39
- color: #191919;
40
42
  }
41
43
 
42
44
  .#{$namespace}-drag-area {
@@ -85,31 +87,86 @@
85
87
  }
86
88
 
87
89
  .#{$namespace}-titlebar-icon-minimize {
88
- background: center / cover no-repeat url("./icons/minimize.svg");
90
+ background: center / cover no-repeat;
91
+ @include v(
92
+ background-image,
93
+ titlebar-icon-minimize,
94
+ url("./icons/minimize.svg")
95
+ );
89
96
  }
90
97
 
91
98
  .#{$namespace}-titlebar-icon-maximize {
92
- background: center / cover no-repeat url("./icons/maximize.svg");
99
+ background: center / cover no-repeat;
100
+ @include v(
101
+ background-image,
102
+ titlebar-icon-maximize,
103
+ url("./icons/maximize.svg")
104
+ );
93
105
 
94
106
  &.is-active {
95
- background-image: url("./icons/maximize-active.svg");
107
+ @include v(
108
+ background-image,
109
+ titlebar-icon-maximize-active,
110
+ url("./icons/maximize-active.svg")
111
+ );
96
112
  }
97
113
  }
98
114
 
99
115
  .#{$namespace}-titlebar-icon-close {
100
- background: center / cover no-repeat url("./icons/close.svg");
116
+ background: center / cover no-repeat;
117
+ @include v(background-image, titlebar-icon-close, url("./icons/close.svg"));
101
118
  }
102
119
 
103
120
  .#{$namespace}-color-scheme-dark {
104
121
  color-scheme: dark;
105
122
 
106
123
  .#{$namespace}-title {
107
- color: #e9e9e9;
124
+ @include v(color, titlebar-color-dark, $titlebar-color-dark);
108
125
  }
109
126
 
110
127
  .#{$namespace}-titlebar {
111
- color: #e9e9e9;
112
- background: #43434d;
113
- border-bottom: none;
128
+ @include v(color, titlebar-color-dark, $titlebar-color-dark);
129
+ @include v(
130
+ background-color,
131
+ titlebar-background-dark,
132
+ $titlebar-background-dark
133
+ );
134
+ @include v(
135
+ border-bottom,
136
+ titlebar-border-bottom-dark,
137
+ $titlebar-border-bottom-dark
138
+ );
139
+ }
140
+
141
+ .#{$namespace}-titlebar-icon-minimize {
142
+ @include v(
143
+ background-image,
144
+ titlebar-icon-minimize-dark,
145
+ url("./icons/minimize.svg")
146
+ );
147
+ }
148
+
149
+ .#{$namespace}-titlebar-icon-maximize {
150
+ @include v(
151
+ background-image,
152
+ titlebar-icon-maximize-dark,
153
+ url("./icons/maximize.svg")
154
+ );
155
+
156
+ &.is-active {
157
+ @include v(
158
+ background-image,
159
+ titlebar-icon-maximize-active-dark,
160
+ url("./icons/maximize-active.svg")
161
+ );
162
+ }
163
+ }
164
+
165
+ .#{$namespace}-titlebar-icon-close {
166
+ @include v(
167
+ background-image,
168
+ titlebar-icon-close-dark,
169
+ url("./icons/close.svg")
170
+ );
114
171
  }
115
172
  }
@@ -5,3 +5,8 @@
5
5
  // iOS Safari
6
6
  -webkit-user-select: none;
7
7
  }
8
+
9
+ @mixin v($property, $varName, $val) {
10
+ #{$property}: $val;
11
+ #{$property}: var(--tele-#{$varName}, $val);
12
+ }
@@ -5,10 +5,44 @@ $max-titlebar-z-index: $base-z-index + 5000;
5
5
  $stage-z-index: $max-titlebar-z-index + 10;
6
6
  $collector-z-index: $stage-z-index + 10;
7
7
 
8
- $color-container-background: #f9f9f9;
9
- $color-stage-background: #fff;
10
- $color-stage-shadow: 0px 0px 16px rgba(0, 0, 0, 0.08);
8
+ $manager-container-background: #f9f9f9;
9
+ $manager-container-background-dark: #25282e;
10
+ $manager-stage-background: #fff;
11
+ $manager-stage-background-dark: #272a30;
12
+ $manager-stage-shadow: 0px 0px 16px rgba(0, 0, 0, 0.08);
13
+ $manager-stage-shadow-dark: 0px 0px 16px rgba(0, 0, 0, 0.24);
11
14
 
12
- $color-container-background-dark: #25282e;
13
- $color-stage-background-dark: #272a30;
14
- $color-stage-shadow-dark: 0px 0px 16px rgba(0, 0, 0, 0.24);
15
+ $box-container-background: $manager-container-background;
16
+ $box-container-background-dark: $manager-container-background-dark;
17
+ $box-stage-background: $manager-stage-background;
18
+ $box-stage-background-dark: $manager-stage-background-dark;
19
+ $box-stage-shadow: $manager-stage-shadow;
20
+ $box-stage-shadow-dark: $manager-stage-shadow-dark;
21
+
22
+ $box-color: #191919;
23
+ $box-color-dark: #e9e9e9;
24
+ $box-border: 1px solid #e3e3ec;
25
+ $box-border-dark: 1px solid #383b42;
26
+ $box-shadow: 0px 4px 10px 0px rgba(47, 65, 146, 0.15);
27
+ $box-shadow-dark: 0px 4px 10px 0px rgba(56, 59, 66, 0.15);
28
+
29
+ $titlebar-color: #191919;
30
+ $titlebar-color-dark: #e9e9e9;
31
+ $titlebar-background: #fff;
32
+ $titlebar-background-dark: #383b42;
33
+ $titlebar-border-bottom: 1px solid #eeeef7;
34
+ $titlebar-border-bottom-dark: none;
35
+
36
+ $titlebar-tab-color: #7b88a0;
37
+ $titlebar-tab-color-dark: #e9e9e9;
38
+ $titlebar-tab-focus-color: #357bf6;
39
+ $titlebar-tab-focus-color-dark: #357bf6;
40
+ $titlebar-tab-background: transparent;
41
+ $titlebar-tab-background-dark: transparent;
42
+ $titlebar-tab-divider-color: #e5e5f0;
43
+ $titlebar-tab-divider-color-dark: #7b88a0;
44
+
45
+ $collector-background: #fff;
46
+ $collector-background-dark: #383b42;
47
+ $collector-shadow: 0px 2px 6px 0px rgba(47, 65, 146, 0.15);
48
+ $collector-shadow-dark: $collector-shadow;