@oceanbase/ui 0.2.23 → 0.2.25
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/ui.min.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/Action/Group.js +3 -3
- package/es/Action/Item.js +1 -1
- package/es/BackgroundTaskManager/RefreshMan.js +1 -1
- package/es/BackgroundTaskManager/index.js +6 -6
- package/es/BasicLayout/Header.d.ts +1 -1
- package/es/BasicLayout/Header.js +57 -62
- package/es/BasicLayout/index.d.ts +0 -1
- package/es/BasicLayout/index.js +59 -69
- package/es/BasicLayout/style/Header.d.ts +9 -0
- package/es/BasicLayout/style/Header.js +95 -0
- package/es/BasicLayout/style/index.js +318 -7
- package/es/BatchOperationBar/index.js +5 -5
- package/es/Boundary/Components/Exception.js +1 -1
- package/es/ContentWithIcon/index.js +3 -3
- package/es/ContentWithQuestion/index.js +3 -3
- package/es/ContentWithQuestion/index.less +1 -2
- package/es/Dialog/Anchor.js +4 -4
- package/es/Dialog/EventProxy.js +1 -1
- package/es/Dialog/index.js +5 -5
- package/es/DocDialog/index.js +4 -4
- package/es/FullscreenBox/index.js +2 -2
- package/es/GraphToolbar/index.js +7 -7
- package/es/Highlight/DiffView/DiffCells.js +1 -1
- package/es/Highlight/DiffView/index.js +9 -9
- package/es/Highlight/JsonView.js +1 -1
- package/es/Highlight/index.d.ts +1 -1
- package/es/Highlight/index.js +4 -4
- package/es/Highlight/useKeyDownCopyEvent.js +1 -1
- package/es/IconFont/index.js +3 -3
- package/es/LocaleDropdown/index.js +3 -3
- package/es/Login/ActivateForm.js +4 -4
- package/es/Login/LoginForm.js +4 -4
- package/es/Login/RegisterForm.js +6 -6
- package/es/Login/index.js +4 -4
- package/es/Lottie/index.js +4 -4
- package/es/NavMenu/index.js +2 -2
- package/es/PageContainer/ItemRender.js +1 -1
- package/es/PageContainer/index.js +12 -7
- package/es/PageContainer/style/index.js +11 -6
- package/es/Password/index.js +7 -7
- package/es/Ranger/QuickPicker.d.ts +2 -2
- package/es/Ranger/QuickPicker.js +5 -5
- package/es/Ranger/Ranger.js +5 -5
- package/es/Ranger/constant/index.js +1 -1
- package/es/Ranger/index.d.ts +2 -0
- package/es/Ranger/index.js +2 -0
- package/es/SideTip/Dragger.js +3 -3
- package/es/SideTip/IconLoading.js +3 -3
- package/es/SideTip/index.js +4 -4
- package/es/TagSelect/Group.js +2 -2
- package/es/TagSelect/Item.js +4 -4
- package/es/TagSelect/style/index.js +3 -3
- package/es/TaskGraph/Graph.js +1 -1
- package/es/TaskGraph/index.js +6 -6
- package/es/TaskGraph/register.js +3 -3
- package/es/TreeSearch/index.d.ts +2 -2
- package/es/TreeSearch/index.js +2 -2
- package/es/TreeSearch/util.js +5 -5
- package/es/Welcome/index.js +4 -3
- package/es/Welcome/index.less +4 -5
- package/es/_util/genComponentStyleHook.js +3 -3
- package/es/locale/LocaleWrapper.js +3 -3
- package/es/locale/en-US.js +3 -3
- package/es/locale/zh-CN.js +3 -3
- package/es/locale/zh-TW.js +3 -3
- package/lib/BasicLayout/Header.d.ts +1 -1
- package/lib/BasicLayout/Header.js +51 -69
- package/lib/BasicLayout/index.d.ts +0 -1
- package/lib/BasicLayout/index.js +49 -44
- package/lib/BasicLayout/style/Header.d.ts +9 -0
- package/lib/BasicLayout/style/Header.js +139 -0
- package/lib/BasicLayout/style/index.js +415 -7
- package/lib/ContentWithQuestion/index.less +1 -2
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/PageContainer/index.js +8 -2
- package/lib/PageContainer/style/index.js +13 -4
- package/lib/Ranger/QuickPicker.d.ts +2 -2
- package/lib/Ranger/index.d.ts +2 -0
- package/lib/Ranger/index.js +8 -0
- package/lib/TreeSearch/index.d.ts +2 -2
- package/lib/Welcome/index.js +11 -1
- package/lib/Welcome/index.less +4 -5
- package/package.json +6 -6
- package/es/BasicLayout/Header.less +0 -134
- package/es/BasicLayout/index.less +0 -396
- package/es/assets/user.svg +0 -16
- package/lib/BasicLayout/Header.less +0 -134
- package/lib/BasicLayout/index.less +0 -396
- package/lib/assets/user.svg +0 -16
|
@@ -25,15 +25,423 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genBasicLayoutStyle = (token) => {
|
|
28
|
-
const {
|
|
28
|
+
const {
|
|
29
|
+
antCls,
|
|
30
|
+
componentCls,
|
|
31
|
+
proComponentsCls,
|
|
32
|
+
colorBgLayout,
|
|
33
|
+
colorText,
|
|
34
|
+
colorBorder,
|
|
35
|
+
colorPrimaryBorder,
|
|
36
|
+
colorPrimary,
|
|
37
|
+
motionDurationSlow
|
|
38
|
+
} = token;
|
|
39
|
+
const maxWidth = "8192px";
|
|
40
|
+
const siderWidthList = [0, 52, 52 * 2, 192, 208];
|
|
41
|
+
const footerBarStyle = {};
|
|
42
|
+
siderWidthList.forEach((width) => {
|
|
43
|
+
footerBarStyle[`${componentCls}${componentCls}-sider-${width}`] = {
|
|
44
|
+
[`${proComponentsCls}-footer-bar`]: {
|
|
45
|
+
// footer bar width adapt to sider width of BasicLayout
|
|
46
|
+
width: width === 0 ? "100%" : `calc(100% - ${width}px - 24px)`,
|
|
47
|
+
transition: `width ${motionDurationSlow}`
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
});
|
|
29
51
|
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
52
|
+
[`${componentCls}-banner-wrapper`]: {
|
|
53
|
+
position: "fixed",
|
|
54
|
+
top: 0,
|
|
55
|
+
zIndex: 20,
|
|
56
|
+
width: "100%"
|
|
57
|
+
},
|
|
58
|
+
// 对于 Alert 类型的 banner,自动增加上间距
|
|
59
|
+
// 对于其他类型的 banner,需要业务侧自行设置上间距
|
|
60
|
+
[`${componentCls}-with-banner`]: {
|
|
61
|
+
marginTop: "38px"
|
|
62
|
+
},
|
|
63
|
+
...footerBarStyle,
|
|
64
|
+
[`${componentCls}`]: {
|
|
65
|
+
height: "100%",
|
|
66
|
+
backgroundColor: colorBgLayout,
|
|
67
|
+
transition: "all 0.1s",
|
|
68
|
+
// Set style of PageContainer in BasicLayout
|
|
69
|
+
[`${proComponentsCls}-page-container`]: {
|
|
70
|
+
// 48px is the height of BasicLayout header
|
|
71
|
+
minHeight: "calc(100vh - 48px)"
|
|
72
|
+
},
|
|
73
|
+
[`${componentCls}-content-layout`]: {
|
|
74
|
+
maxWidth,
|
|
75
|
+
// 居中对齐
|
|
76
|
+
margin: "0 auto",
|
|
77
|
+
[`${componentCls}-sider`]: {
|
|
78
|
+
position: "fixed",
|
|
79
|
+
zIndex: 10,
|
|
80
|
+
padding: "16px 0 16px 16px",
|
|
81
|
+
backgroundColor: colorBgLayout,
|
|
82
|
+
transition: "all 0.3s",
|
|
83
|
+
[`${componentCls}-sider-border`]: {
|
|
84
|
+
position: "relative",
|
|
85
|
+
top: "-16px",
|
|
86
|
+
width: 1,
|
|
87
|
+
height: "100%",
|
|
88
|
+
backgroundColor: "#e2e8f3",
|
|
89
|
+
cursor: "pointer",
|
|
90
|
+
opacity: 0,
|
|
91
|
+
// 左右两侧扩大热区
|
|
92
|
+
["&::after"]: {
|
|
93
|
+
position: "absolute",
|
|
94
|
+
top: 0,
|
|
95
|
+
right: "-10px",
|
|
96
|
+
bottom: 0,
|
|
97
|
+
left: "-10px",
|
|
98
|
+
content: '""'
|
|
99
|
+
},
|
|
100
|
+
"&:hover": {
|
|
101
|
+
opacity: 1,
|
|
102
|
+
// 仅在 hover 时增加过渡动画,避免展开/收起时 border 和 collapse 没有及时消失、影响整体效果
|
|
103
|
+
transition: "opacity 0.3s",
|
|
104
|
+
[`${componentCls}-sider-collapse`]: {
|
|
105
|
+
opacity: 1,
|
|
106
|
+
transition: "opacity 0.3s"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
[`${componentCls}-sider-collapse`]: {
|
|
110
|
+
position: "relative",
|
|
111
|
+
top: "245px",
|
|
112
|
+
right: 10,
|
|
113
|
+
// 需要设置 z-index 以便叠加在分隔线上,否则点击的是分隔线的热区,无法触发 collapse 的点击事件
|
|
114
|
+
zIndex: 1,
|
|
115
|
+
width: "20px",
|
|
116
|
+
height: "42px",
|
|
117
|
+
lineHeight: "42px",
|
|
118
|
+
textAlign: "center",
|
|
119
|
+
backgroundColor: "#fff",
|
|
120
|
+
border: `1px solid ${colorBorder}`,
|
|
121
|
+
borderRadius: "10px",
|
|
122
|
+
cursor: "pointer",
|
|
123
|
+
opacity: 0,
|
|
124
|
+
// 设置展开/收起按钮中的图标大小
|
|
125
|
+
[".anticon"]: {
|
|
126
|
+
fontSize: "px",
|
|
127
|
+
display: "block",
|
|
128
|
+
lineHeight: "42px"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
[`${componentCls}-sider-wrapper`]: {
|
|
133
|
+
display: "flex",
|
|
134
|
+
height: "calc(100vh - 48px)",
|
|
135
|
+
// 菜单通用样式
|
|
136
|
+
[`${antCls}-menu`]: {
|
|
137
|
+
backgroundColor: "transparent",
|
|
138
|
+
borderRight: "none",
|
|
139
|
+
[`${antCls}-menu-item`]: {
|
|
140
|
+
width: "100%",
|
|
141
|
+
marginTop: 0,
|
|
142
|
+
marginRight: "auto",
|
|
143
|
+
marginLeft: "auto",
|
|
144
|
+
color: colorText,
|
|
145
|
+
backgroundColor: "transparent",
|
|
146
|
+
[`.anticon`]: {
|
|
147
|
+
// 图标尺寸设为 18px,因为设计侧给到的图标内侧有间距,需要适当加大尺寸
|
|
148
|
+
width: "18px",
|
|
149
|
+
height: "18px",
|
|
150
|
+
fontSize: "18px"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
[`${antCls}-menu-submenu`]: {
|
|
154
|
+
width: "100%",
|
|
155
|
+
marginTop: 0,
|
|
156
|
+
marginRight: "auto",
|
|
157
|
+
marginLeft: "auto",
|
|
158
|
+
color: colorText,
|
|
159
|
+
backgroundColor: "transparent",
|
|
160
|
+
[`.anticon`]: {
|
|
161
|
+
// 图标尺寸设为 18px,因为设计侧给到的图标内侧有间距,需要适当加大尺寸
|
|
162
|
+
width: "18px",
|
|
163
|
+
height: "18px",
|
|
164
|
+
fontSize: "18px"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
[`${antCls}-menu-submenu > ${antCls}-menu-submenu-title`]: {
|
|
168
|
+
width: "100%",
|
|
169
|
+
marginBottom: "4px !important",
|
|
170
|
+
marginInline: 0,
|
|
171
|
+
marginBlock: 0
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
// 内嵌菜单样式
|
|
175
|
+
[`${antCls}-menu-inline`]: {
|
|
176
|
+
// 菜单项间距
|
|
177
|
+
[`${antCls}-menu-item, ${antCls}-menu-submenu`]: {
|
|
178
|
+
"&:not(:last-child)": {
|
|
179
|
+
marginBottom: "16px",
|
|
180
|
+
// 子菜单展开时 marginBottom 会变小,为了避免效果突兀,增加过渡效果
|
|
181
|
+
transition: "marginBottom 0.2s"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
[`${antCls}-menu-submenu-open`]: {
|
|
185
|
+
"&:not(:last-childantCls)": {
|
|
186
|
+
// 子菜单展开时,减小 marginBottom
|
|
187
|
+
marginBottom: 4
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
// 子菜单项间距
|
|
191
|
+
[`${antCls}-menu-submenu`]: {
|
|
192
|
+
[`${antCls}-menu-item:not(:last-child)`]: {
|
|
193
|
+
marginBottom: 4
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
// 菜单项缩进
|
|
197
|
+
[`${antCls}-menu-item, ${antCls}-menu-submenu > ${antCls}-menu-submenu-title`]: {
|
|
198
|
+
paddingLeft: "16px !important",
|
|
199
|
+
[`${antCls}-menu-title-content`]: {
|
|
200
|
+
width: "108px"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
// 子菜单项缩进
|
|
204
|
+
[`${antCls}-menu-sub`]: {
|
|
205
|
+
[`${antCls}-menu-item`]: {
|
|
206
|
+
marginLeft: "16px",
|
|
207
|
+
paddingLeft: "28px !important"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
// 菜单项激活样式
|
|
211
|
+
[`${antCls}-menu-item-active, ${antCls}-menu-submenu-active > ${antCls}-menu-submenu-title`]: {
|
|
212
|
+
color: `${colorText} !important`,
|
|
213
|
+
fontWeight: 600,
|
|
214
|
+
animation: "activeGradientAnimation 0.1s",
|
|
215
|
+
// .border-gradient(linear-gradient(to right, #E9EDF6, @colorBgLayout), linear-gradient(90deg, #C6CDD9, @colorBgLayout), 0.5px, solid, 8px 0 0 8px),
|
|
216
|
+
backgroundImage: `linear-gradient(to right,#E9EDF6, ${colorBgLayout}),linear-gradient(90deg,#C6CDD9,${colorBgLayout})`,
|
|
217
|
+
backgroundClip: "padding-box,border-box",
|
|
218
|
+
backgroundOrigin: "padding-box,border-box",
|
|
219
|
+
border: ".5px solid transparent",
|
|
220
|
+
borderRadius: "8px 0 0 8px",
|
|
221
|
+
transition: "border-width .3s"
|
|
222
|
+
},
|
|
223
|
+
// 菜单项选中样式
|
|
224
|
+
[`${antCls}-menu-item-selected`]: {
|
|
225
|
+
color: `${colorPrimary} !important`,
|
|
226
|
+
fontWeight: 600,
|
|
227
|
+
animation: "selectedGradientAnimation 0.5s",
|
|
228
|
+
// .border-gradient(linear-gradient(to right, #E5EEFF, #F4F8FF), linear-gradient(90deg, @colorPrimaryBorder, @colorBgLayout), 0.5px, solid, 8px 0 0 8px),
|
|
229
|
+
backgroundImage: `linear-gradient(to right,#E5EEFF,#F4F8FF),linear-gradient(90deg,${colorPrimaryBorder},${colorBgLayout})`,
|
|
230
|
+
backgroundClip: "padding-box,border-box",
|
|
231
|
+
backgroundOrigin: "padding-box,border-box",
|
|
232
|
+
border: ".5px solid transparent",
|
|
233
|
+
borderRadius: "8px 0 0 8px",
|
|
234
|
+
transition: "border-width .3s",
|
|
235
|
+
"&::after": {
|
|
236
|
+
// content: '""',
|
|
237
|
+
// 去掉菜单项的选中标记
|
|
238
|
+
display: "none"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
[`${antCls}-menu-submenu-selected > ${antCls}-menu-submenu-title`]: {
|
|
242
|
+
color: `${colorPrimary} !important`
|
|
243
|
+
},
|
|
244
|
+
[`${antCls}-divider`]: {
|
|
245
|
+
margin: "0 0 16px 0"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
// 垂直菜单样式
|
|
249
|
+
[`${antCls}-menu-vertical`]: {
|
|
250
|
+
overflowX: "hidden",
|
|
251
|
+
overflowY: "auto",
|
|
252
|
+
borderRight: "none",
|
|
253
|
+
[`${antCls}-menu-item, ${antCls}-menu-submenu`]: {
|
|
254
|
+
"&:not(:last-child)": {
|
|
255
|
+
marginBottom: 4
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
[`${antCls}-menu-item, ${antCls}-menu-submenu > ${antCls}-menu-submenu-title`]: {
|
|
259
|
+
width: "52px",
|
|
260
|
+
height: "52px",
|
|
261
|
+
padding: 0,
|
|
262
|
+
lineHeight: "52px",
|
|
263
|
+
textAlign: "center",
|
|
264
|
+
[`${antCls}-menu-title-content`]: {
|
|
265
|
+
display: "inline-block",
|
|
266
|
+
width: "40px",
|
|
267
|
+
height: "40px",
|
|
268
|
+
lineHeight: "40px",
|
|
269
|
+
borderRadius: "8px"
|
|
270
|
+
},
|
|
271
|
+
[`${antCls}-menu-submenu-arrow`]: {
|
|
272
|
+
display: "none"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
[`${antCls}-menu-item-active, ${antCls}-menu-submenu-active > ${antCls}-menu-submenu-title`]: {
|
|
276
|
+
[`${antCls}-menu-title-content`]: {
|
|
277
|
+
backgroundColor: "#e9edf6",
|
|
278
|
+
border: "0.5px solid #c6cdd9"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
[`${antCls}-menu-item-selected, ${antCls}-menu-submenu-selected > ${antCls}-menu-submenu-title`]: {
|
|
282
|
+
[`${antCls}-menu-title-content`]: {
|
|
283
|
+
backgroundColor: "#e5eeff",
|
|
284
|
+
border: `0.5px solid ${colorPrimaryBorder}`
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
[`${componentCls}-sub-sider`]: {
|
|
289
|
+
borderRight: "1px solid #e2e8f3",
|
|
290
|
+
[`${antCls}-divider`]: {
|
|
291
|
+
margin: "0 0 4px 0"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
[`${componentCls}-sub-sider, ${componentCls}-menu-collapsed`]: {
|
|
295
|
+
width: "52px",
|
|
296
|
+
[`${antCls}-divider`]: {
|
|
297
|
+
margin: "0 0 4px 0"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
[`${componentCls}-sider-content`]: {
|
|
301
|
+
display: "flex",
|
|
302
|
+
flex: 1,
|
|
303
|
+
// 纵向排列
|
|
304
|
+
flexDirection: "column",
|
|
305
|
+
// 纵向两端对齐
|
|
306
|
+
justifyContent: "space-between",
|
|
307
|
+
height: "100%",
|
|
308
|
+
[`${componentCls}-sider-header`]: {
|
|
309
|
+
paddingTop: "16px"
|
|
310
|
+
},
|
|
311
|
+
[`${componentCls}-menu-wrapper`]: {
|
|
312
|
+
display: "flex",
|
|
313
|
+
flexDirection: "column",
|
|
314
|
+
// 保证垂直方向超出高度出现滚动
|
|
315
|
+
flexGrow: 1,
|
|
316
|
+
justifyContent: "space-between",
|
|
317
|
+
overflowX: "hidden",
|
|
318
|
+
overflowY: "auto",
|
|
319
|
+
[`${componentCls}-menu`]: {
|
|
320
|
+
backgroundColor: "transparent",
|
|
321
|
+
borderRight: "none",
|
|
322
|
+
marginBottom: "32px"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
[`${componentCls}-sider-collapsed`]: {
|
|
329
|
+
paddingLeft: 0
|
|
330
|
+
},
|
|
331
|
+
[`${componentCls}-sider-has-sub-sider`]: {
|
|
332
|
+
padding: 0,
|
|
333
|
+
// 包含子侧边栏的菜单不支持收起,直接隐藏侧边栏 border 和 collapse
|
|
334
|
+
[`${componentCls}-sider-border`]: {
|
|
335
|
+
display: "none",
|
|
336
|
+
[`${componentCls}-sider-collapse`]: {
|
|
337
|
+
display: "none"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
[`${antCls}-menu-inline`]: {
|
|
341
|
+
paddingTop: "16px",
|
|
342
|
+
[`${antCls}-menu-item, ${antCls}-menu-submenu`]: {
|
|
343
|
+
"&:not(:last-child)": {
|
|
344
|
+
marginBottom: "16px !important"
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
[`${antCls}-divider`]: {
|
|
348
|
+
width: "60%",
|
|
349
|
+
minWidth: "60%",
|
|
350
|
+
margin: "-8px 0 8px 16px !important"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
[`${antCls}-menu-vertical`]: {
|
|
354
|
+
paddingTop: "10px"
|
|
355
|
+
},
|
|
356
|
+
[`${componentCls}-sider-content`]: {
|
|
357
|
+
paddingLeft: "6px"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
[`${componentCls}-content`]: {
|
|
361
|
+
backgroundColor: colorBgLayout,
|
|
362
|
+
transition: "all 0.3s"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
[`@media (min-width: ${maxWidth})`]: {
|
|
367
|
+
[`${componentCls}`]: {
|
|
368
|
+
[`${componentCls}-content-layout`]: {
|
|
369
|
+
[`${componentCls}-sider`]: {
|
|
370
|
+
paddingLeft: 0
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
[`${proComponentsCls}-footer-bar`]: {
|
|
375
|
+
right: `calc((100% - ${maxWidth}) / 2 + 24px)`,
|
|
376
|
+
width: `calc(${maxWidth} - 192px - 24px - 24px)`,
|
|
377
|
+
maxWidth: `calc(${maxWidth} - 192px - 24px - 24px)`
|
|
378
|
+
}
|
|
34
379
|
},
|
|
35
|
-
|
|
36
|
-
|
|
380
|
+
// 弹出菜单样式
|
|
381
|
+
[`${antCls}-menu-submenu-popup`]: {
|
|
382
|
+
[`${antCls}-menu`]: {
|
|
383
|
+
paddingLeft: "6px !important",
|
|
384
|
+
backgroundColor: `${colorBgLayout} !important`,
|
|
385
|
+
[`${antCls}-menu-item`]: {
|
|
386
|
+
width: "100%",
|
|
387
|
+
backgroundColor: "transparent",
|
|
388
|
+
border: "none",
|
|
389
|
+
marginInline: 0,
|
|
390
|
+
"&:not(:last-child):": {
|
|
391
|
+
marginBottom: "8px !important"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
[`${antCls}-menu-submenu`]: {
|
|
395
|
+
width: "100%",
|
|
396
|
+
backgroundColor: "transparent",
|
|
397
|
+
border: "none",
|
|
398
|
+
marginInline: 0,
|
|
399
|
+
"&:not(:last-child):": {
|
|
400
|
+
marginBottom: "8px !important"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
[`${antCls}-menu-item-active`]: {
|
|
404
|
+
color: "colorText !important",
|
|
405
|
+
fontWeight: 600,
|
|
406
|
+
animation: "activeGradientAnimation 0.1s",
|
|
407
|
+
// .border-gradient(linear-gradient(to right, #E9EDF6, colorBgLayout), linear-gradient(90deg, #C6CDD9, colorBgLayout), 0.5px, solid, 8px 0 0 8px),
|
|
408
|
+
backgroundImage: `linear-gradient(to right, #E9EDF6, ${colorBgLayout}), linear-gradient(90deg, #C6CDD9, ${colorBgLayout})`,
|
|
409
|
+
backgroundClip: "padding-box,border-box",
|
|
410
|
+
backgroundOrigin: "padding-box,border-box",
|
|
411
|
+
border: ".5px solid transparent",
|
|
412
|
+
borderRadius: "8px 0 0 8px",
|
|
413
|
+
transition: "border-width .3s"
|
|
414
|
+
},
|
|
415
|
+
[`${antCls}-menu-submenu-active > & ${antCls}-menu-submenu-title`]: {
|
|
416
|
+
color: "colorText !important",
|
|
417
|
+
fontWeight: 600,
|
|
418
|
+
animation: "activeGradientAnimation 0.1s",
|
|
419
|
+
// .border-gradient(linear-gradient(to right, #E9EDF6, colorBgLayout), linear-gradient(90deg, #C6CDD9, colorBgLayout), 0.5px, solid, 8px 0 0 8px),
|
|
420
|
+
backgroundImage: `linear-gradient(to right, #E9EDF6, ${colorBgLayout}), linear-gradient(90deg, #C6CDD9, ${colorBgLayout})`,
|
|
421
|
+
backgroundClip: "padding-box,border-box",
|
|
422
|
+
backgroundOrigin: "padding-box,border-box",
|
|
423
|
+
border: ".5px solid transparent",
|
|
424
|
+
borderRadius: "8px 0 0 8px",
|
|
425
|
+
transition: "border-width .3s"
|
|
426
|
+
},
|
|
427
|
+
[`${antCls}-menu-item-selected`]: {
|
|
428
|
+
color: `${colorPrimary} !important`,
|
|
429
|
+
fontWeight: 600,
|
|
430
|
+
animation: "selectedGradientAnimation 0.1s",
|
|
431
|
+
// .border-gradient(linear-gradient(to right, #E5EEFF, #F4F8FF), linear-gradient(90deg, @colorPrimaryBorder, colorBgLayout), 0.5px, solid, 8px 0 0 8px),
|
|
432
|
+
backgroundImage: `linear-gradient(to right,#E5EEFF,#F4F8FF),linear-gradient(90deg,${colorPrimaryBorder},${colorBgLayout})`,
|
|
433
|
+
backgroundClip: "padding-box,border-box",
|
|
434
|
+
backgroundOrigin: "padding-box,border-box",
|
|
435
|
+
border: ".5px solid transparent",
|
|
436
|
+
borderRadius: "8px 0 0 8px",
|
|
437
|
+
transition: "border-width .3s"
|
|
438
|
+
},
|
|
439
|
+
[`${antCls}-divider`]: {
|
|
440
|
+
width: "'60%'",
|
|
441
|
+
minWidth: "60%",
|
|
442
|
+
margin: "0 0 8px 16px !important"
|
|
443
|
+
}
|
|
444
|
+
}
|
|
37
445
|
}
|
|
38
446
|
};
|
|
39
447
|
};
|
package/lib/Highlight/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "json" | "tsx" | "sql" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "cpp" | "http" | "markdown" | "nginx" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
|
@@ -50,6 +50,7 @@ var PageContainer = ({
|
|
|
50
50
|
extraContent,
|
|
51
51
|
tabList,
|
|
52
52
|
tabBarExtraContent,
|
|
53
|
+
footerToolBarProps,
|
|
53
54
|
locale,
|
|
54
55
|
...restProps
|
|
55
56
|
}) => {
|
|
@@ -63,7 +64,7 @@ var PageContainer = ({
|
|
|
63
64
|
`${rootPrefixCls}-page-header-heading-reload`,
|
|
64
65
|
reloadProps.className
|
|
65
66
|
);
|
|
66
|
-
const newSubTitle = subTitle && /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 12 }, reload && /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.reload }, (0, import_lodash.isObject)(reload) && import_react.default.isValidElement(reload) ? reload : /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, { ...reloadProps, className: reloadCls })), subTitle);
|
|
67
|
+
const newSubTitle = (reload || subTitle) && /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 12 }, reload && /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.reload }, (0, import_lodash.isObject)(reload) && import_react.default.isValidElement(reload) ? reload : /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, { ...reloadProps, className: reloadCls })), subTitle);
|
|
67
68
|
const newHeader = header && {
|
|
68
69
|
...header,
|
|
69
70
|
subTitle: newSubTitle,
|
|
@@ -72,7 +73,7 @@ var PageContainer = ({
|
|
|
72
73
|
...breadcrumb
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
|
-
const noHasHeader = ["title", "subTitle", "extra", "tags", "
|
|
76
|
+
const noHasHeader = ["title", "subTitle", "extra", "tags", "avatar", "backIcon", "breadcrumb"].every(
|
|
76
77
|
(item) => !(newHeader == null ? void 0 : newHeader[item])
|
|
77
78
|
) && !content && !extraContent && !tabList && !tabBarExtraContent;
|
|
78
79
|
const pageContainerCls = (0, import_classnames.default)(
|
|
@@ -92,6 +93,11 @@ var PageContainer = ({
|
|
|
92
93
|
extraContent,
|
|
93
94
|
tabList,
|
|
94
95
|
tabBarExtraContent,
|
|
96
|
+
footerToolBarProps: {
|
|
97
|
+
...footerToolBarProps,
|
|
98
|
+
// render footer as same level with PageContainer instead of under body
|
|
99
|
+
portalDom: false
|
|
100
|
+
},
|
|
95
101
|
...restProps
|
|
96
102
|
}
|
|
97
103
|
)
|
|
@@ -49,7 +49,8 @@ var genPageContainerStyle = (token) => {
|
|
|
49
49
|
},
|
|
50
50
|
[`${antCls}-page-header`]: {
|
|
51
51
|
[`${antCls}-page-header-breadcrumb`]: {
|
|
52
|
-
|
|
52
|
+
// overwritten pro-components style
|
|
53
|
+
paddingBlockStart: 0
|
|
53
54
|
},
|
|
54
55
|
[`${antCls}-page-header-heading-title`]: {
|
|
55
56
|
fontSize: fontSizeHeading3
|
|
@@ -79,14 +80,22 @@ var genPageContainerStyle = (token) => {
|
|
|
79
80
|
}
|
|
80
81
|
},
|
|
81
82
|
// 减小内容区左右两侧间距
|
|
82
|
-
[`${
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
[`${antCls}-page-header`]: {
|
|
84
|
+
paddingInlineStart: paddingLG,
|
|
85
|
+
paddingInlineEnd: paddingLG,
|
|
86
|
+
paddingBlockStart: padding,
|
|
87
|
+
paddingBlockEnd: padding
|
|
85
88
|
},
|
|
86
89
|
[`${componentCls}-children-container`]: {
|
|
87
90
|
paddingInline: paddingLG,
|
|
88
91
|
paddingBlockStart: 0,
|
|
89
92
|
paddingBlockEnd: paddingLG
|
|
93
|
+
},
|
|
94
|
+
// remove paddingBlockStart for page header without breadcrumb
|
|
95
|
+
[`${antCls}-page-header:not(${antCls}-page-header-has-breadcrumb)`]: {
|
|
96
|
+
[`${antCls}-page-header-heading`]: {
|
|
97
|
+
paddingBlockStart: 0
|
|
98
|
+
}
|
|
90
99
|
}
|
|
91
100
|
},
|
|
92
101
|
[`${componentCls}-no-page-header`]: {
|
|
@@ -2,7 +2,7 @@ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
|
|
|
2
2
|
import type { RangeValue } from './Ranger';
|
|
3
3
|
import type { RangeOption } from './typing';
|
|
4
4
|
export type QuickType = 'select' | 'dropdown';
|
|
5
|
-
interface
|
|
5
|
+
interface QuickPickerProps extends LocaleWrapperProps {
|
|
6
6
|
selects: RangeOption[];
|
|
7
7
|
type?: QuickType;
|
|
8
8
|
onChange: (range: RangeValue) => void;
|
|
@@ -13,5 +13,5 @@ interface IProps extends LocaleWrapperProps {
|
|
|
13
13
|
isMoment?: boolean;
|
|
14
14
|
size?: 'small' | 'large' | 'middle';
|
|
15
15
|
}
|
|
16
|
-
declare const _default: (props:
|
|
16
|
+
declare const _default: (props: QuickPickerProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
17
17
|
export default _default;
|
package/lib/Ranger/index.d.ts
CHANGED
package/lib/Ranger/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -35,6 +36,8 @@ module.exports = __toCommonJS(Ranger_exports);
|
|
|
35
36
|
var import_constant = require("./constant");
|
|
36
37
|
var import_QuickPicker = __toESM(require("./QuickPicker"));
|
|
37
38
|
var import_Ranger = __toESM(require("./Ranger"));
|
|
39
|
+
__reExport(Ranger_exports, require("./QuickPicker"), module.exports);
|
|
40
|
+
__reExport(Ranger_exports, require("./Ranger"), module.exports);
|
|
38
41
|
var Ranger = import_Ranger.default;
|
|
39
42
|
Ranger.NEAR_1_MINUTES = import_constant.NEAR_1_MINUTES;
|
|
40
43
|
Ranger.NEAR_5_MINUTES = import_constant.NEAR_5_MINUTES;
|
|
@@ -62,3 +65,8 @@ Ranger.LAST_YEAR = import_constant.LAST_YEAR;
|
|
|
62
65
|
Ranger.NEXT_YEAR = import_constant.NEXT_YEAR;
|
|
63
66
|
Ranger.QuickPicker = import_QuickPicker.default;
|
|
64
67
|
var Ranger_default = Ranger;
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
...require("./QuickPicker"),
|
|
71
|
+
...require("./Ranger")
|
|
72
|
+
});
|
|
@@ -17,7 +17,7 @@ export interface TreeSearchRef {
|
|
|
17
17
|
checkAll: () => void;
|
|
18
18
|
invertSelect: () => void;
|
|
19
19
|
}
|
|
20
|
-
interface
|
|
20
|
+
interface TreeSearchProps {
|
|
21
21
|
treeData: Node[];
|
|
22
22
|
titleRender?: (nodeData: DataNode) => React.ReactNode;
|
|
23
23
|
checkable?: boolean;
|
|
@@ -34,5 +34,5 @@ interface IProps {
|
|
|
34
34
|
loadData?: (data: unknown) => Promise<void>;
|
|
35
35
|
searchStyle?: {};
|
|
36
36
|
}
|
|
37
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
37
|
+
declare const _default: React.ForwardRefExoticComponent<TreeSearchProps & React.RefAttributes<TreeSearchRef>>;
|
|
38
38
|
export default _default;
|
package/lib/Welcome/index.js
CHANGED
|
@@ -80,7 +80,17 @@ var Welcome = ({
|
|
|
80
80
|
},
|
|
81
81
|
/* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 24, className: `${prefix}-title` }, /* @__PURE__ */ import_react.default.createElement("div", null, title)),
|
|
82
82
|
/* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 16, className: `${prefix}-description` }, /* @__PURE__ */ import_react.default.createElement("p", null, description))
|
|
83
|
-
), /* @__PURE__ */ import_react.default.createElement(import_design.Card, { bordered: false, className: `${prefix}-introduce` }, /* @__PURE__ */ import_react.default.createElement(import_design.Row, { gutter: 78 }, introduces.map((item) => /* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 8, key: item.image, className: `${prefix}-item`, "data-testid": "introduces" }, /* @__PURE__ */ import_react.default.createElement("img", { src: item.image, alt: "", height: 80 }), /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement("h3", { className: `${prefix}-title` }, item.title), /* @__PURE__ */ import_react.default.createElement("p", { className: `${prefix}-description` }, item.description)))))), /* @__PURE__ */ import_react.default.createElement(import_design.Row, { className: `${prefix}-content` }, /* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 14, className: isDefault ? `${prefix}-left` : `${prefix}-border-right` }, /* @__PURE__ */ import_react.default.createElement(import_design.Row, { justify: "space-around" }, steps.map((item, index) => renderStep(item, index)), isDefault && /* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-btn-wrapper` }, /* @__PURE__ */ import_react.default.createElement(
|
|
83
|
+
), /* @__PURE__ */ import_react.default.createElement(import_design.Card, { bordered: false, className: `${prefix}-introduce` }, /* @__PURE__ */ import_react.default.createElement(import_design.Row, { gutter: 78 }, introduces.map((item) => /* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 8, key: item.image, className: `${prefix}-item`, "data-testid": "introduces" }, /* @__PURE__ */ import_react.default.createElement("img", { src: item.image, alt: "", height: 80 }), /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement("h3", { className: `${prefix}-title` }, item.title), /* @__PURE__ */ import_react.default.createElement("p", { className: `${prefix}-description` }, item.description)))))), /* @__PURE__ */ import_react.default.createElement(import_design.Row, { className: `${prefix}-content` }, /* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 14, className: isDefault ? `${prefix}-left` : `${prefix}-border-right` }, /* @__PURE__ */ import_react.default.createElement(import_design.Row, { justify: "space-around" }, steps.map((item, index) => renderStep(item, index)), isDefault && /* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-btn-wrapper` }, /* @__PURE__ */ import_react.default.createElement(
|
|
84
|
+
import_design.Button,
|
|
85
|
+
{
|
|
86
|
+
size: "large",
|
|
87
|
+
type: "primary",
|
|
88
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.PlusOutlined, null),
|
|
89
|
+
block: true,
|
|
90
|
+
...buttonProps
|
|
91
|
+
},
|
|
92
|
+
buttonText
|
|
93
|
+
))))), /* @__PURE__ */ import_react.default.createElement(import_design.Col, { span: 10, className: `${prefix}-right` }, /* @__PURE__ */ import_react.default.createElement("h3", { className: `${prefix}-title` }, locale.helpTitle), helps.map((item) => /* @__PURE__ */ import_react.default.createElement(
|
|
84
94
|
import_design.Button,
|
|
85
95
|
{
|
|
86
96
|
key: item.title,
|
package/lib/Welcome/index.less
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
.@{prefix}-container {
|
|
6
6
|
height: 100%;
|
|
7
7
|
padding-bottom: 0 !important;
|
|
8
|
-
|
|
9
|
-
background-color: #fff;
|
|
8
|
+
background-color: @colorBgContainer;
|
|
10
9
|
|
|
11
10
|
.tech-page-container-content {
|
|
12
11
|
// 由于 umi 的本地开发和线上打包的 CSS 样式优先级不一致,导致下列样式在线上环境不生效,因此先加上 !important
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
height: 272px;
|
|
19
18
|
padding-top: 72px;
|
|
20
19
|
padding-left: 100px;
|
|
21
|
-
color:
|
|
20
|
+
color: @colorBgContainer;
|
|
22
21
|
background-repeat: no-repeat;
|
|
23
22
|
background-size: 100% 100%;
|
|
24
23
|
|
|
@@ -145,7 +144,7 @@
|
|
|
145
144
|
// margin-right: 30px;
|
|
146
145
|
margin-bottom: 30px;
|
|
147
146
|
padding: 20px 30px 20px 0;
|
|
148
|
-
background:
|
|
147
|
+
background: @colorBgContainer;
|
|
149
148
|
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
150
149
|
border-radius: 2px;
|
|
151
150
|
|
|
@@ -175,7 +174,7 @@
|
|
|
175
174
|
}
|
|
176
175
|
|
|
177
176
|
.@{prefix}-step-operations {
|
|
178
|
-
color:
|
|
177
|
+
color: @colorPrimary;
|
|
179
178
|
font-size: 14px;
|
|
180
179
|
line-height: 22px;
|
|
181
180
|
}
|