@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.
@@ -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(Row, { justify: "space-between", align: "middle", style: { height: Size.NavBarHeight }, wrap: false, children: [
44
- /* @__PURE__ */ jsx(Col, { style: { height: Size.NavBarHeight, lineHeight: `${Size.NavBarHeight + 2}px` }, children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", height: "100%" }, children: [
45
- /* @__PURE__ */ jsx("img", { style: { height: 30 }, src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/logo/rsdoctor.png", className: "web-doctor-logo", alt: "logo" }),
46
- /* @__PURE__ */ jsx(Typography.Text, { style: { color: "inherit", fontSize: 18, marginLeft: 4, marginTop: 8 }, children: "Rsdoctor" }),
47
- /* @__PURE__ */ jsx(BuilderSelect, {})
48
- ] }) }),
49
- /* @__PURE__ */ jsx(Col, { flex: 1, children: /* @__PURE__ */ jsxs(
50
- Row,
51
- {
52
- align: "middle",
53
- justify: "end",
54
- style: { height: Size.NavBarHeight },
55
- wrap: false,
56
- gutter: [Size.BasePadding / 3, 0],
57
- children: [
58
- /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(OverlayAlertsWithButton, {}) }),
59
- /* @__PURE__ */ jsx(Menus, { style: { transition: "none" } }),
60
- /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(
61
- Dropdown,
62
- {
63
- overlayStyle: { zIndex: 1e3 },
64
- menu: {
65
- items: languages.map((e) => ({
66
- label: e.label,
67
- key: e.value,
68
- onClick() {
69
- i18n.changeLanguage(e.value);
70
- }
71
- })),
72
- selectedKeys: [i18n.language]
73
- },
74
- children: /* @__PURE__ */ jsx(TranslationOutlined, { className: "header-icon", style: iconStyle })
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.8",
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.8",
79
- "@rsdoctor/types": "0.3.8",
80
- "@rsdoctor/utils": "0.3.8"
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",