@tidbcloud/uikit 2.4.6 → 2.4.8
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/CHANGELOG.md +12 -0
- package/dist/biz/AppShell/AppShell.cjs +2 -2
- package/dist/biz/AppShell/AppShell.d.cts +7 -1
- package/dist/biz/AppShell/AppShell.d.mts +7 -1
- package/dist/biz/AppShell/AppShell.mjs +2 -2
- package/dist/biz/AppShell/navbar/SubNavItemBase.cjs +1 -3
- package/dist/biz/AppShell/navbar/SubNavItemBase.mjs +1 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tidbcloud/uikit
|
|
2
2
|
|
|
3
|
+
## 2.4.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- refactor(AppShell): simplify SubNavItemBase spacing with consistent top margin ([#557](https://github.com/tidbcloud/tidbcloud-uikit/pull/557))
|
|
8
|
+
|
|
9
|
+
## 2.4.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- feat(AppShell): add headerLeftSection prop and make aboveMenu optional ([#555](https://github.com/tidbcloud/tidbcloud-uikit/pull/555))
|
|
14
|
+
|
|
3
15
|
## 2.4.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -60,14 +60,14 @@ const AppShell = ({ banner, navbar, children }) => {
|
|
|
60
60
|
/* @__PURE__ */ jsxRuntime.jsx(NavbarSection.NavbarSection, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
61
61
|
NavbarHeader.NavbarHeader,
|
|
62
62
|
{
|
|
63
|
-
logo: navbar.logo,
|
|
63
|
+
logo: navbar.headerLeftSection || navbar.logo,
|
|
64
64
|
onLogoClick: navbar.onLogoClick,
|
|
65
65
|
onToggleCollapse: handleNavbarCollapse,
|
|
66
66
|
px: "md",
|
|
67
67
|
py: 8
|
|
68
68
|
}
|
|
69
69
|
) }),
|
|
70
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavbarSection.NavbarSection, { children: /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { className: "tiui-app-shell-navbar-above-menu", px: "md", children: navbar.aboveMenu }) }),
|
|
70
|
+
navbar.aboveMenu && /* @__PURE__ */ jsxRuntime.jsx(NavbarSection.NavbarSection, { children: /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { className: "tiui-app-shell-navbar-above-menu", px: "md", children: navbar.aboveMenu }) }),
|
|
71
71
|
/* @__PURE__ */ jsxRuntime.jsx(NavbarSection.NavbarSection, { className: "tiui-app-shell-navbar-menu-section", grow: true, scrollable: true, py: 8, children: /* @__PURE__ */ jsxRuntime.jsx(Stack.Stack, { ref: navMenuRef, className: "tiui-app-shell-navbar-menu", gap: 8, px: "md" }) }),
|
|
72
72
|
/* @__PURE__ */ jsxRuntime.jsxs(NavbarSection.NavbarSection, { px: "md", pb: "8", children: [
|
|
73
73
|
/* @__PURE__ */ jsxRuntime.jsx(Divider.Divider, { mx: "-md", mb: 8 }),
|
|
@@ -15,10 +15,16 @@ interface AppShellProps {
|
|
|
15
15
|
* The logo to display in the navbar
|
|
16
16
|
*/
|
|
17
17
|
logo: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* The left section of the navbar header, which is usually the logo
|
|
20
|
+
* If not provided, the logo will be used as the left section
|
|
21
|
+
* @default undefined
|
|
22
|
+
*/
|
|
23
|
+
headerLeftSection?: React.ReactNode;
|
|
18
24
|
/**
|
|
19
25
|
* Custom content rendered in the navbar section between the header and the main menu.
|
|
20
26
|
*/
|
|
21
|
-
aboveMenu
|
|
27
|
+
aboveMenu?: React.ReactNode;
|
|
22
28
|
/**
|
|
23
29
|
* The footer section of the navbar
|
|
24
30
|
*/
|
|
@@ -15,10 +15,16 @@ interface AppShellProps {
|
|
|
15
15
|
* The logo to display in the navbar
|
|
16
16
|
*/
|
|
17
17
|
logo: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* The left section of the navbar header, which is usually the logo
|
|
20
|
+
* If not provided, the logo will be used as the left section
|
|
21
|
+
* @default undefined
|
|
22
|
+
*/
|
|
23
|
+
headerLeftSection?: React.ReactNode;
|
|
18
24
|
/**
|
|
19
25
|
* Custom content rendered in the navbar section between the header and the main menu.
|
|
20
26
|
*/
|
|
21
|
-
aboveMenu
|
|
27
|
+
aboveMenu?: React.ReactNode;
|
|
22
28
|
/**
|
|
23
29
|
* The footer section of the navbar
|
|
24
30
|
*/
|
|
@@ -58,14 +58,14 @@ const AppShell = ({ banner, navbar, children }) => {
|
|
|
58
58
|
/* @__PURE__ */ jsx(NavbarSection, { children: /* @__PURE__ */ jsx(
|
|
59
59
|
NavbarHeader,
|
|
60
60
|
{
|
|
61
|
-
logo: navbar.logo,
|
|
61
|
+
logo: navbar.headerLeftSection || navbar.logo,
|
|
62
62
|
onLogoClick: navbar.onLogoClick,
|
|
63
63
|
onToggleCollapse: handleNavbarCollapse,
|
|
64
64
|
px: "md",
|
|
65
65
|
py: 8
|
|
66
66
|
}
|
|
67
67
|
) }),
|
|
68
|
-
/* @__PURE__ */ jsx(NavbarSection, { children: /* @__PURE__ */ jsx(Box, { className: "tiui-app-shell-navbar-above-menu", px: "md", children: navbar.aboveMenu }) }),
|
|
68
|
+
navbar.aboveMenu && /* @__PURE__ */ jsx(NavbarSection, { children: /* @__PURE__ */ jsx(Box, { className: "tiui-app-shell-navbar-above-menu", px: "md", children: navbar.aboveMenu }) }),
|
|
69
69
|
/* @__PURE__ */ jsx(NavbarSection, { className: "tiui-app-shell-navbar-menu-section", grow: true, scrollable: true, py: 8, children: /* @__PURE__ */ jsx(Stack, { ref: navMenuRef, className: "tiui-app-shell-navbar-menu", gap: 8, px: "md" }) }),
|
|
70
70
|
/* @__PURE__ */ jsxs(NavbarSection, { px: "md", pb: "8", children: [
|
|
71
71
|
/* @__PURE__ */ jsx(Divider, { mx: "-md", mb: 8 }),
|