@netless/telebox-insider 1.0.0-alpha.27 → 1.0.0-alpha.28
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/dist/TeleBoxCollector/index.d.ts +5 -7
- package/dist/TeleBoxManager/index.d.ts +8 -4
- package/dist/TeleBoxManager/typings.d.ts +38 -0
- package/dist/style.css +103 -76
- package/dist/telebox-insider.cjs.js +58 -40
- package/dist/telebox-insider.cjs.js.map +1 -1
- package/dist/telebox-insider.es.js +58 -40
- package/dist/telebox-insider.es.js.map +1 -1
- package/package.json +1 -1
- package/src/TeleBox/style.scss +5 -5
- package/src/TeleBox/style.shadow.scss +12 -36
- package/src/TeleBoxCollector/index.ts +27 -39
- package/src/TeleBoxCollector/style.scss +4 -8
- package/src/TeleBoxManager/MaxTitleBar/style.scss +8 -28
- package/src/TeleBoxManager/index.ts +77 -20
- package/src/TeleBoxManager/style.scss +24 -25
- package/src/TeleBoxManager/typings.ts +45 -0
- package/src/TeleTitleBar/DefaultTitleBar/index.ts +2 -2
- package/src/TeleTitleBar/DefaultTitleBar/style.scss +19 -58
- package/src/scss/mixins.scss +0 -5
- package/src/scss/variables.scss +62 -36
|
@@ -122,9 +122,9 @@ export class DefaultTitleBar implements TeleTitleBar {
|
|
|
122
122
|
|
|
123
123
|
this.sideEffect.addEventListener(
|
|
124
124
|
$buttonsContainer,
|
|
125
|
-
"
|
|
125
|
+
"click",
|
|
126
126
|
(ev) => {
|
|
127
|
-
if (
|
|
127
|
+
if (this.readonly$.value) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
const target = ev.target as HTMLElement;
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
user-select: none;
|
|
12
12
|
touch-action: manipulation;
|
|
13
13
|
|
|
14
|
-
@include
|
|
15
|
-
@include
|
|
16
|
-
@include
|
|
14
|
+
@include clr(color, titlebarColor);
|
|
15
|
+
@include clr(background-color, titlebarBackground);
|
|
16
|
+
@include clr(border-bottom, titlebarBorderBottom);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.#{$namespace}-title-area {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
.#{$namespace}-title {
|
|
30
30
|
@include no-user-select;
|
|
31
|
-
@include
|
|
31
|
+
@include clr(color, titlebarColor);
|
|
32
32
|
|
|
33
33
|
overflow: hidden;
|
|
34
34
|
margin: 0;
|
|
@@ -90,25 +90,25 @@
|
|
|
90
90
|
|
|
91
91
|
.#{$namespace}-titlebar-icon-minimize {
|
|
92
92
|
background: center / cover no-repeat;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
background-image: url("./icons/minimize.svg");
|
|
94
|
+
background-image: var(
|
|
95
|
+
--tele-titlebarIconMinimize,
|
|
96
96
|
url("./icons/minimize.svg")
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.#{$namespace}-titlebar-icon-maximize {
|
|
101
101
|
background: center / cover no-repeat;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
background-image: url("./icons/maximize.svg");
|
|
103
|
+
background-image: var(
|
|
104
|
+
--tele-titlebarIconMaximize,
|
|
105
105
|
url("./icons/maximize.svg")
|
|
106
106
|
);
|
|
107
107
|
|
|
108
108
|
&.is-active {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
background-image: url("./icons/maximize-active.svg");
|
|
110
|
+
background-image: var(
|
|
111
|
+
--tele-titlebarIconMaximizeActive,
|
|
112
112
|
url("./icons/maximize-active.svg")
|
|
113
113
|
);
|
|
114
114
|
}
|
|
@@ -116,59 +116,20 @@
|
|
|
116
116
|
|
|
117
117
|
.#{$namespace}-titlebar-icon-close {
|
|
118
118
|
background: center / cover no-repeat;
|
|
119
|
-
|
|
119
|
+
background-image: url("./icons/close.svg");
|
|
120
|
+
background-image: var(--tele-titlebarIconClose, url("./icons/close.svg"));
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
.#{$namespace}-color-scheme-dark {
|
|
123
124
|
color-scheme: dark;
|
|
124
125
|
|
|
125
126
|
.#{$namespace}-title {
|
|
126
|
-
@include
|
|
127
|
+
@include clr-dark(color, titlebarColor);
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
.#{$namespace}-titlebar {
|
|
130
|
-
@include
|
|
131
|
-
@include
|
|
132
|
-
|
|
133
|
-
titlebar-background-dark,
|
|
134
|
-
$titlebar-background-dark
|
|
135
|
-
);
|
|
136
|
-
@include v(
|
|
137
|
-
border-bottom,
|
|
138
|
-
titlebar-border-bottom-dark,
|
|
139
|
-
$titlebar-border-bottom-dark
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.#{$namespace}-titlebar-icon-minimize {
|
|
144
|
-
@include v(
|
|
145
|
-
background-image,
|
|
146
|
-
titlebar-icon-minimize-dark,
|
|
147
|
-
url("./icons/minimize.svg")
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.#{$namespace}-titlebar-icon-maximize {
|
|
152
|
-
@include v(
|
|
153
|
-
background-image,
|
|
154
|
-
titlebar-icon-maximize-dark,
|
|
155
|
-
url("./icons/maximize.svg")
|
|
156
|
-
);
|
|
157
|
-
|
|
158
|
-
&.is-active {
|
|
159
|
-
@include v(
|
|
160
|
-
background-image,
|
|
161
|
-
titlebar-icon-maximize-active-dark,
|
|
162
|
-
url("./icons/maximize-active.svg")
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.#{$namespace}-titlebar-icon-close {
|
|
168
|
-
@include v(
|
|
169
|
-
background-image,
|
|
170
|
-
titlebar-icon-close-dark,
|
|
171
|
-
url("./icons/close.svg")
|
|
172
|
-
);
|
|
131
|
+
@include clr-dark(color, titlebarColor);
|
|
132
|
+
@include clr-dark(background-color, titlebarBackground);
|
|
133
|
+
@include clr-dark(border-bottom, titlebarBorderBottom);
|
|
173
134
|
}
|
|
174
135
|
}
|
package/src/scss/mixins.scss
CHANGED
package/src/scss/variables.scss
CHANGED
|
@@ -5,44 +5,70 @@ $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
|
-
$
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
$tele-colors: (
|
|
9
|
+
managerContainerBackground: #f9f9f9,
|
|
10
|
+
managerStageBackground: #fff,
|
|
11
|
+
managerStageShadow: 0px 0px 16px rgba(0, 0, 0, 0.08),
|
|
12
|
+
boxContainerBackground: #f9f9f9,
|
|
13
|
+
boxStageBackground: #fff,
|
|
14
|
+
boxStageShadow: 0px 0px 16px rgba(0, 0, 0, 0.08),
|
|
15
|
+
boxColor: #191919,
|
|
16
|
+
boxBorder: 1px solid #e3e3ec,
|
|
17
|
+
boxShadow: 0px 4px 10px 0px rgba(47, 65, 146, 0.15),
|
|
18
|
+
boxFooterColor: #191919,
|
|
19
|
+
boxFooterBackground: #fff,
|
|
20
|
+
titlebarColor: #191919,
|
|
21
|
+
titlebarBackground: #fff,
|
|
22
|
+
titlebarBorderBottom: 1px solid #eeeef7,
|
|
23
|
+
titlebarTabColor: #7b88a0,
|
|
24
|
+
titlebarTabFocusColor: #357bf6,
|
|
25
|
+
titlebarTabBackground: transparent,
|
|
26
|
+
titlebarTabDividerColor: #e5e5f0,
|
|
27
|
+
collectorBackground: #fff,
|
|
28
|
+
collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, 0.15),
|
|
29
|
+
);
|
|
14
30
|
|
|
15
|
-
$
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
$tele-colors-dark: (
|
|
32
|
+
managerContainerBackground: #25282e,
|
|
33
|
+
managerStageBackground: #272a30,
|
|
34
|
+
managerStageShadow: 0px 0px 16px rgba(0, 0, 0, 0.24),
|
|
35
|
+
boxContainerBackground: #25282e,
|
|
36
|
+
boxStageBackground: #272a30,
|
|
37
|
+
boxStageShadow: 0px 0px 16px rgba(0, 0, 0, 0.24),
|
|
38
|
+
boxColor: #e9e9e9,
|
|
39
|
+
boxBorder: 1px solid #383b42,
|
|
40
|
+
boxShadow: 0px 4px 10px 0px rgba(56, 59, 66, 0.15),
|
|
41
|
+
boxFooterColor: #e9e9e9,
|
|
42
|
+
boxFooterBackground: #383b42,
|
|
43
|
+
titlebarColor: #e9e9e9,
|
|
44
|
+
titlebarBackground: #383b42,
|
|
45
|
+
titlebarBorderBottom: none,
|
|
46
|
+
titlebarTabColor: #e9e9e9,
|
|
47
|
+
titlebarTabFocusColor: #357bf6,
|
|
48
|
+
titlebarTabBackground: transparent,
|
|
49
|
+
titlebarTabDividerColor: #7b88a0,
|
|
50
|
+
collectorBackground: #383b42,
|
|
51
|
+
collectorShadow: 0px 2px 6px 0px rgba(47, 65, 146, 0.15),
|
|
52
|
+
);
|
|
21
53
|
|
|
22
|
-
$
|
|
23
|
-
$
|
|
24
|
-
$
|
|
25
|
-
|
|
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);
|
|
54
|
+
@mixin clr($property, $key) {
|
|
55
|
+
#{$property}: map-get($tele-colors, $key);
|
|
56
|
+
#{$property}: var(--tele-#{$key}, map-get($tele-colors, $key));
|
|
57
|
+
}
|
|
28
58
|
|
|
29
|
-
$
|
|
30
|
-
$
|
|
31
|
-
$
|
|
32
|
-
|
|
33
|
-
$titlebar-border-bottom: 1px solid #eeeef7;
|
|
34
|
-
$titlebar-border-bottom-dark: none;
|
|
59
|
+
@mixin clr-dark($property, $key) {
|
|
60
|
+
#{$property}: map-get($tele-colors-dark, $key);
|
|
61
|
+
#{$property}: var(--tele-#{$key}, map-get($tele-colors-dark, $key));
|
|
62
|
+
}
|
|
35
63
|
|
|
36
|
-
|
|
37
|
-
$
|
|
38
|
-
$
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
$titlebar-tab-background-dark: transparent;
|
|
42
|
-
$titlebar-tab-divider-color: #e5e5f0;
|
|
43
|
-
$titlebar-tab-divider-color-dark: #7b88a0;
|
|
64
|
+
@mixin clr-root() {
|
|
65
|
+
@each $key, $value in $tele-colors {
|
|
66
|
+
--tele-#{$key}: #{$value};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
44
69
|
|
|
45
|
-
|
|
46
|
-
$
|
|
47
|
-
$
|
|
48
|
-
|
|
70
|
+
@mixin clr-root-dark() {
|
|
71
|
+
@each $key, $value in $tele-colors-dark {
|
|
72
|
+
--tele-#{$key}: #{$value};
|
|
73
|
+
}
|
|
74
|
+
}
|