@rsdoctor/components 0.3.8 → 0.3.9
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/components/Layout/header.js +93 -42
- package/package.json +4 -4
|
@@ -2,10 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { TranslationOutlined } from "@ant-design/icons";
|
|
3
3
|
import { Col, Dropdown, Layout, Row, Typography } from "antd";
|
|
4
4
|
import { Language, Size } from "../../constants";
|
|
5
|
-
import {
|
|
6
|
-
useI18n,
|
|
7
|
-
useTheme
|
|
8
|
-
} from "../../utils";
|
|
5
|
+
import { useI18n, useTheme } from "../../utils";
|
|
9
6
|
import { OverlayAlertsWithButton } from "../Alerts";
|
|
10
7
|
import { BuilderSelect } from "./builder-select";
|
|
11
8
|
import { Menus } from "./menus";
|
|
@@ -40,44 +37,98 @@ const Header = () => {
|
|
|
40
37
|
backgroundColor: isLight ? "#fff" : "#141414",
|
|
41
38
|
transition: "none"
|
|
42
39
|
},
|
|
43
|
-
children: /* @__PURE__ */ jsxs(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
40
|
+
children: /* @__PURE__ */ jsxs(
|
|
41
|
+
Row,
|
|
42
|
+
{
|
|
43
|
+
justify: "space-between",
|
|
44
|
+
align: "middle",
|
|
45
|
+
style: { height: Size.NavBarHeight },
|
|
46
|
+
wrap: false,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
Col,
|
|
50
|
+
{
|
|
51
|
+
style: {
|
|
52
|
+
height: Size.NavBarHeight,
|
|
53
|
+
lineHeight: `${Size.NavBarHeight + 2}px`
|
|
54
|
+
},
|
|
55
|
+
children: /* @__PURE__ */ jsxs(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
style: {
|
|
59
|
+
display: "flex",
|
|
60
|
+
justifyContent: "space-between",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
height: "100%"
|
|
63
|
+
},
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
66
|
+
"img",
|
|
67
|
+
{
|
|
68
|
+
style: { height: 30 },
|
|
69
|
+
src: "https://assets.rspack.dev/rsdoctor/rsdoctor-logo-960x960.png",
|
|
70
|
+
className: "web-doctor-logo",
|
|
71
|
+
alt: "logo"
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
Typography.Text,
|
|
76
|
+
{
|
|
77
|
+
style: {
|
|
78
|
+
color: "inherit",
|
|
79
|
+
fontSize: 18,
|
|
80
|
+
marginLeft: 4,
|
|
81
|
+
marginTop: 8
|
|
82
|
+
},
|
|
83
|
+
children: "Rsdoctor"
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ jsx(BuilderSelect, {})
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ jsx(Col, { flex: 1, children: /* @__PURE__ */ jsxs(
|
|
93
|
+
Row,
|
|
94
|
+
{
|
|
95
|
+
align: "middle",
|
|
96
|
+
justify: "end",
|
|
97
|
+
style: { height: Size.NavBarHeight },
|
|
98
|
+
wrap: false,
|
|
99
|
+
gutter: [Size.BasePadding / 3, 0],
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(OverlayAlertsWithButton, {}) }),
|
|
102
|
+
/* @__PURE__ */ jsx(Menus, { style: { transition: "none" } }),
|
|
103
|
+
/* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(
|
|
104
|
+
Dropdown,
|
|
105
|
+
{
|
|
106
|
+
overlayStyle: { zIndex: 1e3 },
|
|
107
|
+
menu: {
|
|
108
|
+
items: languages.map((e) => ({
|
|
109
|
+
label: e.label,
|
|
110
|
+
key: e.value,
|
|
111
|
+
onClick() {
|
|
112
|
+
i18n.changeLanguage(e.value);
|
|
113
|
+
}
|
|
114
|
+
})),
|
|
115
|
+
selectedKeys: [i18n.language]
|
|
116
|
+
},
|
|
117
|
+
children: /* @__PURE__ */ jsx(
|
|
118
|
+
TranslationOutlined,
|
|
119
|
+
{
|
|
120
|
+
className: "header-icon",
|
|
121
|
+
style: iconStyle
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
) })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
) })
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
)
|
|
81
132
|
}
|
|
82
133
|
);
|
|
83
134
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"terser": "^5.26.0",
|
|
76
76
|
"typescript": "^5.2.2",
|
|
77
77
|
"url-parse": "1.5.10",
|
|
78
|
-
"@rsdoctor/graph": "0.3.
|
|
79
|
-
"@rsdoctor/types": "0.3.
|
|
80
|
-
"@rsdoctor/utils": "0.3.
|
|
78
|
+
"@rsdoctor/graph": "0.3.9",
|
|
79
|
+
"@rsdoctor/types": "0.3.9",
|
|
80
|
+
"@rsdoctor/utils": "0.3.9"
|
|
81
81
|
},
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public",
|