@tidbcloud/uikit 2.3.2 → 2.4.0

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.
Files changed (102) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/biz/AppShell/AppPageShell.cjs +104 -0
  3. package/dist/biz/AppShell/AppPageShell.d.cts +20 -0
  4. package/dist/biz/AppShell/AppPageShell.d.mts +20 -0
  5. package/dist/biz/AppShell/AppPageShell.mjs +104 -0
  6. package/dist/biz/AppShell/AppShell.cjs +83 -0
  7. package/dist/biz/AppShell/AppShell.d.cts +45 -0
  8. package/dist/biz/AppShell/AppShell.d.mts +45 -0
  9. package/dist/biz/AppShell/AppShell.mjs +83 -0
  10. package/dist/biz/AppShell/container/AppShellBody.cjs +30 -0
  11. package/dist/biz/AppShell/container/AppShellBody.d.cts +5 -0
  12. package/dist/biz/AppShell/container/AppShellBody.d.mts +5 -0
  13. package/dist/biz/AppShell/container/AppShellBody.mjs +30 -0
  14. package/dist/biz/AppShell/container/AppShellMain.cjs +36 -0
  15. package/dist/biz/AppShell/container/AppShellMain.d.cts +5 -0
  16. package/dist/biz/AppShell/container/AppShellMain.d.mts +5 -0
  17. package/dist/biz/AppShell/container/AppShellMain.mjs +36 -0
  18. package/dist/biz/AppShell/container/AppShellRoot.cjs +13 -0
  19. package/dist/biz/AppShell/container/AppShellRoot.d.cts +1 -0
  20. package/dist/biz/AppShell/container/AppShellRoot.d.mts +1 -0
  21. package/dist/biz/AppShell/container/AppShellRoot.mjs +13 -0
  22. package/dist/biz/AppShell/index.d.cts +7 -0
  23. package/dist/biz/AppShell/index.d.mts +7 -0
  24. package/dist/biz/AppShell/navbar/ExpandNavbarButton.cjs +44 -0
  25. package/dist/biz/AppShell/navbar/ExpandNavbarButton.d.cts +6 -0
  26. package/dist/biz/AppShell/navbar/ExpandNavbarButton.d.mts +6 -0
  27. package/dist/biz/AppShell/navbar/ExpandNavbarButton.mjs +44 -0
  28. package/dist/biz/AppShell/navbar/ExpandNavbarButtonPlaceholder.cjs +32 -0
  29. package/dist/biz/AppShell/navbar/ExpandNavbarButtonPlaceholder.d.cts +1 -0
  30. package/dist/biz/AppShell/navbar/ExpandNavbarButtonPlaceholder.d.mts +1 -0
  31. package/dist/biz/AppShell/navbar/ExpandNavbarButtonPlaceholder.mjs +32 -0
  32. package/dist/biz/AppShell/navbar/FooterNavItemBase.cjs +8 -0
  33. package/dist/biz/AppShell/navbar/FooterNavItemBase.d.cts +7 -0
  34. package/dist/biz/AppShell/navbar/FooterNavItemBase.d.mts +7 -0
  35. package/dist/biz/AppShell/navbar/FooterNavItemBase.mjs +8 -0
  36. package/dist/biz/AppShell/navbar/NavItemBase.cjs +21 -0
  37. package/dist/biz/AppShell/navbar/NavItemBase.d.cts +12 -0
  38. package/dist/biz/AppShell/navbar/NavItemBase.d.mts +12 -0
  39. package/dist/biz/AppShell/navbar/NavItemBase.mjs +21 -0
  40. package/dist/biz/AppShell/navbar/Navbar.cjs +61 -0
  41. package/dist/biz/AppShell/navbar/Navbar.d.cts +11 -0
  42. package/dist/biz/AppShell/navbar/Navbar.d.mts +11 -0
  43. package/dist/biz/AppShell/navbar/Navbar.mjs +61 -0
  44. package/dist/biz/AppShell/navbar/NavbarHeader.cjs +58 -0
  45. package/dist/biz/AppShell/navbar/NavbarHeader.d.cts +8 -0
  46. package/dist/biz/AppShell/navbar/NavbarHeader.d.mts +8 -0
  47. package/dist/biz/AppShell/navbar/NavbarHeader.mjs +58 -0
  48. package/dist/biz/AppShell/navbar/NavbarSection.cjs +32 -0
  49. package/dist/biz/AppShell/navbar/NavbarSection.d.cts +16 -0
  50. package/dist/biz/AppShell/navbar/NavbarSection.d.mts +16 -0
  51. package/dist/biz/AppShell/navbar/NavbarSection.mjs +32 -0
  52. package/dist/biz/AppShell/navbar/SubNavItemBase.cjs +23 -0
  53. package/dist/biz/AppShell/navbar/SubNavItemBase.d.cts +7 -0
  54. package/dist/biz/AppShell/navbar/SubNavItemBase.d.mts +7 -0
  55. package/dist/biz/AppShell/navbar/SubNavItemBase.mjs +23 -0
  56. package/dist/biz/AppShell/navbar/context/NavMenuPortal.cjs +28 -0
  57. package/dist/biz/AppShell/navbar/context/NavMenuPortal.d.cts +1 -0
  58. package/dist/biz/AppShell/navbar/context/NavMenuPortal.d.mts +1 -0
  59. package/dist/biz/AppShell/navbar/context/NavMenuPortal.mjs +28 -0
  60. package/dist/biz/AppShell/navbar/context/nav-menu-ref-context.cjs +5 -0
  61. package/dist/biz/AppShell/navbar/context/nav-menu-ref-context.d.cts +1 -0
  62. package/dist/biz/AppShell/navbar/context/nav-menu-ref-context.d.mts +1 -0
  63. package/dist/biz/AppShell/navbar/context/nav-menu-ref-context.mjs +5 -0
  64. package/dist/biz/PageShell/{index.cjs → LegacyPageShell.cjs} +2 -2
  65. package/dist/biz/PageShell/LegacyPageShell.d.cts +85 -0
  66. package/dist/biz/PageShell/LegacyPageShell.d.mts +85 -0
  67. package/dist/biz/PageShell/{index.mjs → LegacyPageShell.mjs} +2 -2
  68. package/dist/biz/PageShell/index.d.cts +1 -85
  69. package/dist/biz/PageShell/index.d.mts +1 -85
  70. package/dist/biz/PageShellBase/PageShellBaseBackButton.cjs +32 -0
  71. package/dist/biz/PageShellBase/PageShellBaseBackButton.d.cts +5 -0
  72. package/dist/biz/PageShellBase/PageShellBaseBackButton.d.mts +5 -0
  73. package/dist/biz/PageShellBase/PageShellBaseBackButton.mjs +32 -0
  74. package/dist/biz/PageShellBase/PageShellBaseBody.cjs +30 -0
  75. package/dist/biz/PageShellBase/PageShellBaseBody.d.cts +4 -0
  76. package/dist/biz/PageShellBase/PageShellBaseBody.d.mts +4 -0
  77. package/dist/biz/PageShellBase/PageShellBaseBody.mjs +30 -0
  78. package/dist/biz/PageShellBase/PageShellBaseHeader.cjs +50 -0
  79. package/dist/biz/PageShellBase/PageShellBaseHeader.d.cts +17 -0
  80. package/dist/biz/PageShellBase/PageShellBaseHeader.d.mts +17 -0
  81. package/dist/biz/PageShellBase/PageShellBaseHeader.mjs +50 -0
  82. package/dist/biz/PageShellBase/PageShellBaseRoot.cjs +14 -0
  83. package/dist/biz/PageShellBase/PageShellBaseRoot.d.cts +4 -0
  84. package/dist/biz/PageShellBase/PageShellBaseRoot.d.mts +4 -0
  85. package/dist/biz/PageShellBase/PageShellBaseRoot.mjs +14 -0
  86. package/dist/biz/PageShellBase/PageShellBaseTitle.cjs +23 -0
  87. package/dist/biz/PageShellBase/PageShellBaseTitle.d.cts +4 -0
  88. package/dist/biz/PageShellBase/PageShellBaseTitle.d.mts +4 -0
  89. package/dist/biz/PageShellBase/PageShellBaseTitle.mjs +23 -0
  90. package/dist/biz/PageShellBase/page-shell-base.cjs +25 -0
  91. package/dist/biz/PageShellBase/page-shell-base.d.cts +14 -0
  92. package/dist/biz/PageShellBase/page-shell-base.d.mts +14 -0
  93. package/dist/biz/PageShellBase/page-shell-base.mjs +25 -0
  94. package/dist/biz/index.cjs +35 -9
  95. package/dist/biz/index.d.cts +2 -0
  96. package/dist/biz/index.d.mts +2 -0
  97. package/dist/biz/index.mjs +27 -1
  98. package/dist/primitive/index.d.cts +1 -1
  99. package/dist/primitive/index.d.mts +1 -1
  100. package/dist/theme/theme.cjs +42 -2
  101. package/dist/theme/theme.mjs +42 -2
  102. package/package.json +1 -1
@@ -0,0 +1,58 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { IconLayoutLeft } from "../../../icons/index.mjs";
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ import { clsx } from "clsx";
9
+ import { Group } from "../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Group/Group.mjs";
10
+ import { Stack } from "../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Stack/Stack.mjs";
11
+ import { ActionIcon } from "../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/ActionIcon/ActionIcon.mjs";
12
+ const NavbarHeader = ({ logo, onLogoClick, onToggleCollapse, ...restProps }) => {
13
+ const handleLogoClick = () => {
14
+ if (onLogoClick) {
15
+ onLogoClick();
16
+ } else {
17
+ history.pushState({}, "", "/");
18
+ }
19
+ };
20
+ return /* @__PURE__ */ jsxs(
21
+ Group,
22
+ {
23
+ justify: "space-between",
24
+ sx: { height: 64 },
25
+ ...restProps,
26
+ className: clsx(restProps.className, "tiui-app-shell-navbar-header"),
27
+ children: [
28
+ /* @__PURE__ */ jsx(
29
+ Stack,
30
+ {
31
+ justify: "center",
32
+ onClick: handleLogoClick,
33
+ sx: {
34
+ padding: 4,
35
+ cursor: "pointer"
36
+ },
37
+ "aria-label": "Logo",
38
+ children: logo
39
+ }
40
+ ),
41
+ /* @__PURE__ */ jsx(
42
+ ActionIcon,
43
+ {
44
+ className: "tiui-app-shell-navbar-collapse-button",
45
+ variant: "white",
46
+ bg: "transparent",
47
+ onClick: onToggleCollapse,
48
+ "aria-label": "Collapse navbar",
49
+ children: /* @__PURE__ */ jsx(IconLayoutLeft, { size: 20 })
50
+ }
51
+ )
52
+ ]
53
+ }
54
+ );
55
+ };
56
+ export {
57
+ NavbarHeader
58
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ ;/* empty css */
5
+ ;/* empty css */
6
+ ;/* empty css */
7
+ ;/* empty css */
8
+ ;/* empty css */
9
+ require("clsx");
10
+ const styles = require("../../../utils/styles.cjs");
11
+ const Box = require("../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/Box/Box.cjs");
12
+ const ScrollArea = require("../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/ScrollArea/ScrollArea.cjs");
13
+ const NavbarSection = ({ grow, scrollable, mod, sx, ...rest }) => {
14
+ return /* @__PURE__ */ jsxRuntime.jsx(
15
+ Box.Box,
16
+ {
17
+ component: scrollable ? ScrollArea.ScrollArea : void 0,
18
+ mod: [{ grow, scrollable }, mod],
19
+ sx: styles.mergeSxList([
20
+ {
21
+ flexGrow: 0,
22
+ "&:where([data-grow])": {
23
+ flexGrow: 1
24
+ }
25
+ },
26
+ sx
27
+ ]),
28
+ ...rest
29
+ }
30
+ );
31
+ };
32
+ exports.NavbarSection = NavbarSection;
@@ -0,0 +1,16 @@
1
+ import { BoxProps, ElementProps } from '../../../primitive/index.cjs';
2
+ interface NavbarSectionProps extends BoxProps, ElementProps<'div'> {
3
+ /**
4
+ * Determines whether the section should take all available space.
5
+ * `false` by default
6
+ */
7
+ grow?: boolean;
8
+ /**
9
+ * Determines whether the section should be scrollable.
10
+ * `false` by default
11
+ * It will be wrapped with `ScrollArea` if `true`
12
+ */
13
+ scrollable?: boolean;
14
+ }
15
+ export declare const NavbarSection: ({ grow, scrollable, mod, sx, ...rest }: NavbarSectionProps) => import("react/jsx-runtime.js").JSX.Element;
16
+ export {};
@@ -0,0 +1,16 @@
1
+ import { BoxProps, ElementProps } from '../../../primitive/index.mjs';
2
+ interface NavbarSectionProps extends BoxProps, ElementProps<'div'> {
3
+ /**
4
+ * Determines whether the section should take all available space.
5
+ * `false` by default
6
+ */
7
+ grow?: boolean;
8
+ /**
9
+ * Determines whether the section should be scrollable.
10
+ * `false` by default
11
+ * It will be wrapped with `ScrollArea` if `true`
12
+ */
13
+ scrollable?: boolean;
14
+ }
15
+ export declare const NavbarSection: ({ grow, scrollable, mod, sx, ...rest }: NavbarSectionProps) => import("react/jsx-runtime.js").JSX.Element;
16
+ export {};
@@ -0,0 +1,32 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ import "clsx";
8
+ import { mergeSxList } from "../../../utils/styles.mjs";
9
+ import { Box } from "../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/Box/Box.mjs";
10
+ import { ScrollArea } from "../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/ScrollArea/ScrollArea.mjs";
11
+ const NavbarSection = ({ grow, scrollable, mod, sx, ...rest }) => {
12
+ return /* @__PURE__ */ jsx(
13
+ Box,
14
+ {
15
+ component: scrollable ? ScrollArea : void 0,
16
+ mod: [{ grow, scrollable }, mod],
17
+ sx: mergeSxList([
18
+ {
19
+ flexGrow: 0,
20
+ "&:where([data-grow])": {
21
+ flexGrow: 1
22
+ }
23
+ },
24
+ sx
25
+ ]),
26
+ ...rest
27
+ }
28
+ );
29
+ };
30
+ export {
31
+ NavbarSection
32
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ require("clsx");
5
+ const styles = require("../../../utils/styles.cjs");
6
+ const NavItemBase = require("./NavItemBase.cjs");
7
+ const SubNavItemBase = (props) => {
8
+ return /* @__PURE__ */ jsxRuntime.jsx(
9
+ NavItemBase.NavItemBase,
10
+ {
11
+ ...props,
12
+ sx: styles.mergeSxList([
13
+ {
14
+ "&:not(:last-child)": {
15
+ marginBottom: 8
16
+ }
17
+ },
18
+ props.sx
19
+ ])
20
+ }
21
+ );
22
+ };
23
+ exports.SubNavItemBase = SubNavItemBase;
@@ -0,0 +1,7 @@
1
+ import { NavItemBaseProps } from './NavItemBase.cjs';
2
+ export type SubNavItemBaseProps = Omit<NavItemBaseProps, 'leftSection' | 'defaultOpened'>;
3
+ /**
4
+ * Base component for sub navigation items
5
+ * Handles only the styling aspects, no routing logic
6
+ */
7
+ export declare const SubNavItemBase: (props: SubNavItemBaseProps) => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { NavItemBaseProps } from './NavItemBase.mjs';
2
+ export type SubNavItemBaseProps = Omit<NavItemBaseProps, 'leftSection' | 'defaultOpened'>;
3
+ /**
4
+ * Base component for sub navigation items
5
+ * Handles only the styling aspects, no routing logic
6
+ */
7
+ export declare const SubNavItemBase: (props: SubNavItemBaseProps) => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "clsx";
3
+ import { mergeSxList } from "../../../utils/styles.mjs";
4
+ import { NavItemBase } from "./NavItemBase.mjs";
5
+ const SubNavItemBase = (props) => {
6
+ return /* @__PURE__ */ jsx(
7
+ NavItemBase,
8
+ {
9
+ ...props,
10
+ sx: mergeSxList([
11
+ {
12
+ "&:not(:last-child)": {
13
+ marginBottom: 8
14
+ }
15
+ },
16
+ props.sx
17
+ ])
18
+ }
19
+ );
20
+ };
21
+ export {
22
+ SubNavItemBase
23
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ ;/* empty css */
6
+ ;/* empty css */
7
+ ;/* empty css */
8
+ ;/* empty css */
9
+ ;/* empty css */
10
+ const navMenuRefContext = require("./nav-menu-ref-context.cjs");
11
+ const Portal = require("../../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Portal/Portal.cjs");
12
+ const NavMenuPortal = ({ children }) => {
13
+ const ctx = React.useContext(navMenuRefContext.NavMenuRefContext);
14
+ const [target, setTarget] = React.useState();
15
+ React.useEffect(() => {
16
+ if (ctx == null ? void 0 : ctx.current) {
17
+ setTarget(ctx.current);
18
+ }
19
+ }, [ctx]);
20
+ if (!ctx) {
21
+ return null;
22
+ }
23
+ if (!target) {
24
+ return null;
25
+ }
26
+ return /* @__PURE__ */ jsxRuntime.jsx(Portal.Portal, { target, children });
27
+ };
28
+ exports.NavMenuPortal = NavMenuPortal;
@@ -0,0 +1 @@
1
+ export declare const NavMenuPortal: ({ children }: React.PropsWithChildren) => import("react/jsx-runtime.js").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const NavMenuPortal: ({ children }: React.PropsWithChildren) => import("react/jsx-runtime.js").JSX.Element | null;
@@ -0,0 +1,28 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useContext, useState, useEffect } from "react";
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ import { NavMenuRefContext } from "./nav-menu-ref-context.mjs";
9
+ import { Portal } from "../../../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Portal/Portal.mjs";
10
+ const NavMenuPortal = ({ children }) => {
11
+ const ctx = useContext(NavMenuRefContext);
12
+ const [target, setTarget] = useState();
13
+ useEffect(() => {
14
+ if (ctx == null ? void 0 : ctx.current) {
15
+ setTarget(ctx.current);
16
+ }
17
+ }, [ctx]);
18
+ if (!ctx) {
19
+ return null;
20
+ }
21
+ if (!target) {
22
+ return null;
23
+ }
24
+ return /* @__PURE__ */ jsx(Portal, { target, children });
25
+ };
26
+ export {
27
+ NavMenuPortal
28
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const NavMenuRefContext = React.createContext(null);
5
+ exports.NavMenuRefContext = NavMenuRefContext;
@@ -0,0 +1 @@
1
+ export declare const NavMenuRefContext: import('react').Context<import('react').RefObject<HTMLDivElement> | null>;
@@ -0,0 +1 @@
1
+ export declare const NavMenuRefContext: import('react').Context<import('react').RefObject<HTMLDivElement> | null>;
@@ -0,0 +1,5 @@
1
+ import { createContext } from "react";
2
+ const NavMenuRefContext = createContext(null);
3
+ export {
4
+ NavMenuRefContext
5
+ };
@@ -27,7 +27,7 @@ const PageHeader = ({ sticky, leftSection, rightSection, children, ...restProps
27
27
  {
28
28
  paddingLeft: 24,
29
29
  paddingRight: 24,
30
- height: 56
30
+ height: 64
31
31
  },
32
32
  sticky ? (theme) => ({
33
33
  position: "sticky",
@@ -41,7 +41,7 @@ const PageHeader = ({ sticky, leftSection, rightSection, children, ...restProps
41
41
  children: [
42
42
  /* @__PURE__ */ jsxRuntime.jsxs(Group.Group, { wrap: "nowrap", children: [
43
43
  leftSection,
44
- /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "title-lg", sx: { flex: 1 }, children })
44
+ /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "headline-lg", component: "div", fw: 300, sx: { flex: 1 }, children })
45
45
  ] }),
46
46
  rightExisted && /* @__PURE__ */ jsxRuntime.jsx(Group.Group, { gap: 0, wrap: "nowrap", children: rightSection })
47
47
  ]
@@ -0,0 +1,85 @@
1
+ import { ReactNode } from 'react';
2
+ import { BoxProps, GroupProps } from '../../primitive/index.cjs';
3
+ export interface PageHeaderProps extends GroupProps {
4
+ /**
5
+ * Determines whether the header should be sticky
6
+ * Default: false
7
+ */
8
+ sticky?: boolean;
9
+ leftSection?: React.ReactNode;
10
+ rightSection?: React.ReactNode;
11
+ }
12
+ /**
13
+ * From https://github.com/tidbcloud/dbaas-ui/blob/427559c99458ccd2e8b0d6c77ed44baa603d5ef7/src/dbaas/layouts/v4/page/PageShell.tsx#L7
14
+ */
15
+ export interface PageShellProps {
16
+ /**
17
+ * @deprecated
18
+ * Use wrapperProps.className instead
19
+ */
20
+ className?: string;
21
+ /**
22
+ * @deprecated
23
+ * Use headerProps.className instead
24
+ */
25
+ headerClassName?: string;
26
+ /**
27
+ * @deprecated
28
+ * Use bodyProps.className instead
29
+ */
30
+ bodyClassName?: string;
31
+ /**
32
+ * @deprecated
33
+ * Use headerProps.sticky instead
34
+ *
35
+ * Determines whether the header should be sticky
36
+ * Default: false
37
+ */
38
+ headerSticky?: boolean;
39
+ /**
40
+ * @deprecated
41
+ * Use headerProps.rightSection instead
42
+ */
43
+ headerRightSection?: React.ReactNode;
44
+ /**
45
+ * @deprecated
46
+ * Use headerProps.withBack and headerProps.onBackClick instead
47
+ */
48
+ headerBack?: boolean | (() => void);
49
+ title?: React.ReactNode;
50
+ /**
51
+ * A `div` wrapper goes around header and body
52
+ * Default: false
53
+ */
54
+ wrapped?: boolean;
55
+ wrapperProps?: BoxProps & {
56
+ component?: any;
57
+ };
58
+ headerProps?: GroupProps & {
59
+ /**
60
+ * Determines whether the header should be sticky,
61
+ * Default: false
62
+ */
63
+ sticky?: boolean;
64
+ /**
65
+ * Right section of header
66
+ */
67
+ rightSection?: React.ReactNode;
68
+ /**
69
+ * Determines whether the back icon should be rendered
70
+ */
71
+ withBack?: boolean;
72
+ /**
73
+ * Called when the back icon is clicked
74
+ */
75
+ onBackClick?: () => void;
76
+ };
77
+ bodyProps?: BoxProps & {
78
+ component?: any;
79
+ };
80
+ children?: ReactNode;
81
+ }
82
+ export declare const PageShell: {
83
+ ({ className, headerClassName, bodyClassName, headerSticky, headerRightSection, headerBack, title, wrapped, wrapperProps, headerProps: { withBack, onBackClick, ...headerProps }, bodyProps, children }: PageShellProps): import("react/jsx-runtime.js").JSX.Element;
84
+ Header: ({ sticky, leftSection, rightSection, children, ...restProps }: PageHeaderProps) => import("react/jsx-runtime.js").JSX.Element;
85
+ };
@@ -0,0 +1,85 @@
1
+ import { ReactNode } from 'react';
2
+ import { BoxProps, GroupProps } from '../../primitive/index.mjs';
3
+ export interface PageHeaderProps extends GroupProps {
4
+ /**
5
+ * Determines whether the header should be sticky
6
+ * Default: false
7
+ */
8
+ sticky?: boolean;
9
+ leftSection?: React.ReactNode;
10
+ rightSection?: React.ReactNode;
11
+ }
12
+ /**
13
+ * From https://github.com/tidbcloud/dbaas-ui/blob/427559c99458ccd2e8b0d6c77ed44baa603d5ef7/src/dbaas/layouts/v4/page/PageShell.tsx#L7
14
+ */
15
+ export interface PageShellProps {
16
+ /**
17
+ * @deprecated
18
+ * Use wrapperProps.className instead
19
+ */
20
+ className?: string;
21
+ /**
22
+ * @deprecated
23
+ * Use headerProps.className instead
24
+ */
25
+ headerClassName?: string;
26
+ /**
27
+ * @deprecated
28
+ * Use bodyProps.className instead
29
+ */
30
+ bodyClassName?: string;
31
+ /**
32
+ * @deprecated
33
+ * Use headerProps.sticky instead
34
+ *
35
+ * Determines whether the header should be sticky
36
+ * Default: false
37
+ */
38
+ headerSticky?: boolean;
39
+ /**
40
+ * @deprecated
41
+ * Use headerProps.rightSection instead
42
+ */
43
+ headerRightSection?: React.ReactNode;
44
+ /**
45
+ * @deprecated
46
+ * Use headerProps.withBack and headerProps.onBackClick instead
47
+ */
48
+ headerBack?: boolean | (() => void);
49
+ title?: React.ReactNode;
50
+ /**
51
+ * A `div` wrapper goes around header and body
52
+ * Default: false
53
+ */
54
+ wrapped?: boolean;
55
+ wrapperProps?: BoxProps & {
56
+ component?: any;
57
+ };
58
+ headerProps?: GroupProps & {
59
+ /**
60
+ * Determines whether the header should be sticky,
61
+ * Default: false
62
+ */
63
+ sticky?: boolean;
64
+ /**
65
+ * Right section of header
66
+ */
67
+ rightSection?: React.ReactNode;
68
+ /**
69
+ * Determines whether the back icon should be rendered
70
+ */
71
+ withBack?: boolean;
72
+ /**
73
+ * Called when the back icon is clicked
74
+ */
75
+ onBackClick?: () => void;
76
+ };
77
+ bodyProps?: BoxProps & {
78
+ component?: any;
79
+ };
80
+ children?: ReactNode;
81
+ }
82
+ export declare const PageShell: {
83
+ ({ className, headerClassName, bodyClassName, headerSticky, headerRightSection, headerBack, title, wrapped, wrapperProps, headerProps: { withBack, onBackClick, ...headerProps }, bodyProps, children }: PageShellProps): import("react/jsx-runtime.js").JSX.Element;
84
+ Header: ({ sticky, leftSection, rightSection, children, ...restProps }: PageHeaderProps) => import("react/jsx-runtime.js").JSX.Element;
85
+ };
@@ -25,7 +25,7 @@ const PageHeader = ({ sticky, leftSection, rightSection, children, ...restProps
25
25
  {
26
26
  paddingLeft: 24,
27
27
  paddingRight: 24,
28
- height: 56
28
+ height: 64
29
29
  },
30
30
  sticky ? (theme) => ({
31
31
  position: "sticky",
@@ -39,7 +39,7 @@ const PageHeader = ({ sticky, leftSection, rightSection, children, ...restProps
39
39
  children: [
40
40
  /* @__PURE__ */ jsxs(Group, { wrap: "nowrap", children: [
41
41
  leftSection,
42
- /* @__PURE__ */ jsx(Typography, { variant: "title-lg", sx: { flex: 1 }, children })
42
+ /* @__PURE__ */ jsx(Typography, { variant: "headline-lg", component: "div", fw: 300, sx: { flex: 1 }, children })
43
43
  ] }),
44
44
  rightExisted && /* @__PURE__ */ jsx(Group, { gap: 0, wrap: "nowrap", children: rightSection })
45
45
  ]
@@ -1,85 +1 @@
1
- import { ReactNode } from 'react';
2
- import { BoxProps, GroupProps } from '../../primitive/index.cjs';
3
- export interface PageHeaderProps extends GroupProps {
4
- /**
5
- * Determines whether the header should be sticky
6
- * Default: false
7
- */
8
- sticky?: boolean;
9
- leftSection?: React.ReactNode;
10
- rightSection?: React.ReactNode;
11
- }
12
- /**
13
- * From https://github.com/tidbcloud/dbaas-ui/blob/427559c99458ccd2e8b0d6c77ed44baa603d5ef7/src/dbaas/layouts/v4/page/PageShell.tsx#L7
14
- */
15
- export interface PageShellProps {
16
- /**
17
- * @deprecated
18
- * Use wrapperProps.className instead
19
- */
20
- className?: string;
21
- /**
22
- * @deprecated
23
- * Use headerProps.className instead
24
- */
25
- headerClassName?: string;
26
- /**
27
- * @deprecated
28
- * Use bodyProps.className instead
29
- */
30
- bodyClassName?: string;
31
- /**
32
- * @deprecated
33
- * Use headerProps.sticky instead
34
- *
35
- * Determines whether the header should be sticky
36
- * Default: false
37
- */
38
- headerSticky?: boolean;
39
- /**
40
- * @deprecated
41
- * Use headerProps.rightSection instead
42
- */
43
- headerRightSection?: React.ReactNode;
44
- /**
45
- * @deprecated
46
- * Use headerProps.withBack and headerProps.onBackClick instead
47
- */
48
- headerBack?: boolean | (() => void);
49
- title?: React.ReactNode;
50
- /**
51
- * A `div` wrapper goes around header and body
52
- * Default: false
53
- */
54
- wrapped?: boolean;
55
- wrapperProps?: BoxProps & {
56
- component?: any;
57
- };
58
- headerProps?: GroupProps & {
59
- /**
60
- * Determines whether the header should be sticky,
61
- * Default: false
62
- */
63
- sticky?: boolean;
64
- /**
65
- * Right section of header
66
- */
67
- rightSection?: React.ReactNode;
68
- /**
69
- * Determines whether the back icon should be rendered
70
- */
71
- withBack?: boolean;
72
- /**
73
- * Called when the back icon is clicked
74
- */
75
- onBackClick?: () => void;
76
- };
77
- bodyProps?: BoxProps & {
78
- component?: any;
79
- };
80
- children?: ReactNode;
81
- }
82
- export declare const PageShell: {
83
- ({ className, headerClassName, bodyClassName, headerSticky, headerRightSection, headerBack, title, wrapped, wrapperProps, headerProps: { withBack, onBackClick, ...headerProps }, bodyProps, children }: PageShellProps): import("react/jsx-runtime.js").JSX.Element;
84
- Header: ({ sticky, leftSection, rightSection, children, ...restProps }: PageHeaderProps) => import("react/jsx-runtime.js").JSX.Element;
85
- };
1
+ export * from './LegacyPageShell.cjs';