@tidbcloud/uikit 2.3.3 → 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 +6 -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 +24 -2
  101. package/dist/theme/theme.mjs +24 -2
  102. package/package.json +1 -1
@@ -0,0 +1,36 @@
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 } from "clsx";
8
+ import { mergeSxList } from "../../../utils/styles.mjs";
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
+ const AppShellMain = ({ className, sx, ...rest }) => {
11
+ return /* @__PURE__ */ jsx(
12
+ Group,
13
+ {
14
+ gap: 0,
15
+ wrap: "nowrap",
16
+ align: "stretch",
17
+ ...rest,
18
+ className: clsx(className, "tiui-app-shell-main"),
19
+ sx: mergeSxList([
20
+ {
21
+ position: "relative",
22
+ height: "100%",
23
+ minHeight: 0,
24
+ overflow: "hidden",
25
+ "&:where([data-height-flex])": {
26
+ flex: 1
27
+ }
28
+ },
29
+ sx
30
+ ])
31
+ }
32
+ );
33
+ };
34
+ export {
35
+ AppShellMain
36
+ };
@@ -0,0 +1,13 @@
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
+ const Stack = 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/Stack/Stack.cjs");
10
+ const AppShellRoot = ({ children }) => {
11
+ return /* @__PURE__ */ jsxRuntime.jsx(Stack.Stack, { className: "tiui-app-shell-root", gap: 0, sx: { height: "100vh", overflow: "hidden" }, children });
12
+ };
13
+ exports.AppShellRoot = AppShellRoot;
@@ -0,0 +1 @@
1
+ export declare const AppShellRoot: ({ children }: React.PropsWithChildren) => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const AppShellRoot: ({ children }: React.PropsWithChildren) => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ 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";
8
+ const AppShellRoot = ({ children }) => {
9
+ return /* @__PURE__ */ jsx(Stack, { className: "tiui-app-shell-root", gap: 0, sx: { height: "100vh", overflow: "hidden" }, children });
10
+ };
11
+ export {
12
+ AppShellRoot
13
+ };
@@ -0,0 +1,7 @@
1
+ export { AppShell } from './AppShell.cjs';
2
+ export { AppPageShell, type AppPageShellProps } from './AppPageShell.cjs';
3
+ export { NavMenuPortal } from './navbar/context/NavMenuPortal.cjs';
4
+ export { NavItemBase, type NavItemBaseProps } from './navbar/NavItemBase.cjs';
5
+ export { SubNavItemBase, type SubNavItemBaseProps } from './navbar/SubNavItemBase.cjs';
6
+ export { FooterNavItemBase, type FooterNavItemBaseProps } from './navbar/FooterNavItemBase.cjs';
7
+ export { ExpandNavbarButtonPlaceholder } from './navbar/ExpandNavbarButtonPlaceholder.cjs';
@@ -0,0 +1,7 @@
1
+ export { AppShell } from './AppShell.mjs';
2
+ export { AppPageShell, type AppPageShellProps } from './AppPageShell.mjs';
3
+ export { NavMenuPortal } from './navbar/context/NavMenuPortal.mjs';
4
+ export { NavItemBase, type NavItemBaseProps } from './navbar/NavItemBase.mjs';
5
+ export { SubNavItemBase, type SubNavItemBaseProps } from './navbar/SubNavItemBase.mjs';
6
+ export { FooterNavItemBase, type FooterNavItemBaseProps } from './navbar/FooterNavItemBase.mjs';
7
+ export { ExpandNavbarButtonPlaceholder } from './navbar/ExpandNavbarButtonPlaceholder.mjs';
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const index$1 = require("../../../icons/index.cjs");
5
+ ;/* empty css */
6
+ ;/* empty css */
7
+ ;/* empty css */
8
+ ;/* empty css */
9
+ ;/* empty css */
10
+ const index = require("../../../primitive/Button/index.cjs");
11
+ const ExpandNavbarButton = ({ logo, onClick }) => /* @__PURE__ */ jsxRuntime.jsx(
12
+ index.Button,
13
+ {
14
+ className: "tiui-app-shell-navbar-expand-button",
15
+ variant: "default",
16
+ size: "sm",
17
+ leftSection: logo,
18
+ onClick,
19
+ style: {
20
+ "--button-justify": "space-between"
21
+ },
22
+ styles: {
23
+ root: {
24
+ position: "absolute",
25
+ top: 16,
26
+ left: 24,
27
+ zIndex: 15,
28
+ width: 64,
29
+ paddingLeft: 8,
30
+ paddingRight: 8
31
+ },
32
+ section: {
33
+ "&[data-position=left]": {
34
+ marginRight: 0,
35
+ width: 20,
36
+ height: 20
37
+ }
38
+ }
39
+ },
40
+ "aria-label": "Expand navbar",
41
+ children: /* @__PURE__ */ jsxRuntime.jsx(index$1.IconLayoutLeft, { size: 20 })
42
+ }
43
+ );
44
+ exports.ExpandNavbarButton = ExpandNavbarButton;
@@ -0,0 +1,6 @@
1
+ interface ExpandNavbarButtonProps {
2
+ logo: React.ReactNode;
3
+ onClick: () => void;
4
+ }
5
+ export declare const ExpandNavbarButton: ({ logo, onClick }: ExpandNavbarButtonProps) => import("react/jsx-runtime.js").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ interface ExpandNavbarButtonProps {
2
+ logo: React.ReactNode;
3
+ onClick: () => void;
4
+ }
5
+ export declare const ExpandNavbarButton: ({ logo, onClick }: ExpandNavbarButtonProps) => import("react/jsx-runtime.js").JSX.Element;
6
+ export {};
@@ -0,0 +1,44 @@
1
+ import { 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 { Button } from "../../../primitive/Button/index.mjs";
9
+ const ExpandNavbarButton = ({ logo, onClick }) => /* @__PURE__ */ jsx(
10
+ Button,
11
+ {
12
+ className: "tiui-app-shell-navbar-expand-button",
13
+ variant: "default",
14
+ size: "sm",
15
+ leftSection: logo,
16
+ onClick,
17
+ style: {
18
+ "--button-justify": "space-between"
19
+ },
20
+ styles: {
21
+ root: {
22
+ position: "absolute",
23
+ top: 16,
24
+ left: 24,
25
+ zIndex: 15,
26
+ width: 64,
27
+ paddingLeft: 8,
28
+ paddingRight: 8
29
+ },
30
+ section: {
31
+ "&[data-position=left]": {
32
+ marginRight: 0,
33
+ width: 20,
34
+ height: 20
35
+ }
36
+ }
37
+ },
38
+ "aria-label": "Expand navbar",
39
+ children: /* @__PURE__ */ jsx(IconLayoutLeft, { size: 20 })
40
+ }
41
+ );
42
+ export {
43
+ ExpandNavbarButton
44
+ };
@@ -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
+ 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");
10
+ const ExpandNavbarButtonPlaceholder = () => {
11
+ return /* @__PURE__ */ jsxRuntime.jsx(
12
+ Box.Box,
13
+ {
14
+ className: "tiui-app-shell-expand-navbar-button-placeholder",
15
+ display: "inline-block",
16
+ style: {
17
+ "--button-width": "64px",
18
+ "--button-height": "32px",
19
+ "--placeholder-max-width": "calc(var(--app-shell-navbar-collapsed, 0) * (var(--button-width) + 16px))"
20
+ },
21
+ sx: {
22
+ height: "var(--button-height)",
23
+ minWidth: 0,
24
+ maxWidth: "var(--placeholder-max-width)",
25
+ width: "calc(var(--placeholder-max-width) - (100vw - var(--app-shell-page-max-width, 100vw)) * 0.5)",
26
+ flexShrink: 0
27
+ },
28
+ "aria-hidden": "true"
29
+ }
30
+ );
31
+ };
32
+ exports.ExpandNavbarButtonPlaceholder = ExpandNavbarButtonPlaceholder;
@@ -0,0 +1 @@
1
+ export declare const ExpandNavbarButtonPlaceholder: () => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ExpandNavbarButtonPlaceholder: () => import("react/jsx-runtime.js").JSX.Element;
@@ -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 { 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";
8
+ const ExpandNavbarButtonPlaceholder = () => {
9
+ return /* @__PURE__ */ jsx(
10
+ Box,
11
+ {
12
+ className: "tiui-app-shell-expand-navbar-button-placeholder",
13
+ display: "inline-block",
14
+ style: {
15
+ "--button-width": "64px",
16
+ "--button-height": "32px",
17
+ "--placeholder-max-width": "calc(var(--app-shell-navbar-collapsed, 0) * (var(--button-width) + 16px))"
18
+ },
19
+ sx: {
20
+ height: "var(--button-height)",
21
+ minWidth: 0,
22
+ maxWidth: "var(--placeholder-max-width)",
23
+ width: "calc(var(--placeholder-max-width) - (100vw - var(--app-shell-page-max-width, 100vw)) * 0.5)",
24
+ flexShrink: 0
25
+ },
26
+ "aria-hidden": "true"
27
+ }
28
+ );
29
+ };
30
+ export {
31
+ ExpandNavbarButtonPlaceholder
32
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const NavItemBase = require("./NavItemBase.cjs");
5
+ const FooterNavItemBase = (props) => {
6
+ return /* @__PURE__ */ jsxRuntime.jsx(NavItemBase.NavItemBase, { ...props });
7
+ };
8
+ exports.FooterNavItemBase = FooterNavItemBase;
@@ -0,0 +1,7 @@
1
+ import { NavItemBaseProps } from './NavItemBase.cjs';
2
+ export type FooterNavItemBaseProps = Omit<NavItemBaseProps, 'defaultOpened' | 'children'>;
3
+ /**
4
+ * Base component for footer navigation items
5
+ * Handles only the styling aspects, no routing logic
6
+ */
7
+ export declare const FooterNavItemBase: (props: FooterNavItemBaseProps) => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { NavItemBaseProps } from './NavItemBase.mjs';
2
+ export type FooterNavItemBaseProps = Omit<NavItemBaseProps, 'defaultOpened' | 'children'>;
3
+ /**
4
+ * Base component for footer navigation items
5
+ * Handles only the styling aspects, no routing logic
6
+ */
7
+ export declare const FooterNavItemBase: (props: FooterNavItemBaseProps) => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { NavItemBase } from "./NavItemBase.mjs";
3
+ const FooterNavItemBase = (props) => {
4
+ return /* @__PURE__ */ jsx(NavItemBase, { ...props });
5
+ };
6
+ export {
7
+ FooterNavItemBase
8
+ };
@@ -0,0 +1,21 @@
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
+ const NavLink = 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/NavLink/NavLink.cjs");
10
+ const HoverCard = 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/HoverCard/HoverCard.cjs");
11
+ const NavItemBase = ({ tooltip, ...restProps }) => {
12
+ const navlink = /* @__PURE__ */ jsxRuntime.jsx(NavLink.NavLink, { ...restProps, noWrap: true, childrenOffset: "xl" });
13
+ if (tooltip) {
14
+ return /* @__PURE__ */ jsxRuntime.jsxs(HoverCard.HoverCard, { shadow: "md", width: 300, withArrow: true, withinPortal: true, children: [
15
+ /* @__PURE__ */ jsxRuntime.jsx(HoverCard.HoverCard.Target, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: navlink }) }),
16
+ /* @__PURE__ */ jsxRuntime.jsx(HoverCard.HoverCard.Dropdown, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: tooltip }) })
17
+ ] });
18
+ }
19
+ return navlink;
20
+ };
21
+ exports.NavItemBase = NavItemBase;
@@ -0,0 +1,12 @@
1
+ import { NavLinkProps } from '../../../primitive/index.cjs';
2
+ export interface NavItemBaseProps extends Pick<NavLinkProps, 'label' | 'leftSection' | 'rightSection' | 'active' | 'defaultOpened' | 'disabled' | 'onClick' | 'mod' | 'sx' | 'styles' | 'style' | 'children'> {
3
+ /**
4
+ * Tooltip content
5
+ */
6
+ tooltip?: React.ReactNode;
7
+ }
8
+ /**
9
+ * NavItemBase is a pure UI component for navigation items
10
+ * with no routing or navigation structure knowledge
11
+ */
12
+ export declare const NavItemBase: ({ tooltip, ...restProps }: NavItemBaseProps) => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { NavLinkProps } from '../../../primitive/index.mjs';
2
+ export interface NavItemBaseProps extends Pick<NavLinkProps, 'label' | 'leftSection' | 'rightSection' | 'active' | 'defaultOpened' | 'disabled' | 'onClick' | 'mod' | 'sx' | 'styles' | 'style' | 'children'> {
3
+ /**
4
+ * Tooltip content
5
+ */
6
+ tooltip?: React.ReactNode;
7
+ }
8
+ /**
9
+ * NavItemBase is a pure UI component for navigation items
10
+ * with no routing or navigation structure knowledge
11
+ */
12
+ export declare const NavItemBase: ({ tooltip, ...restProps }: NavItemBaseProps) => import("react/jsx-runtime.js").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ import { NavLink } 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/NavLink/NavLink.mjs";
8
+ import { HoverCard } 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/HoverCard/HoverCard.mjs";
9
+ const NavItemBase = ({ tooltip, ...restProps }) => {
10
+ const navlink = /* @__PURE__ */ jsx(NavLink, { ...restProps, noWrap: true, childrenOffset: "xl" });
11
+ if (tooltip) {
12
+ return /* @__PURE__ */ jsxs(HoverCard, { shadow: "md", width: 300, withArrow: true, withinPortal: true, children: [
13
+ /* @__PURE__ */ jsx(HoverCard.Target, { children: /* @__PURE__ */ jsx("span", { children: navlink }) }),
14
+ /* @__PURE__ */ jsx(HoverCard.Dropdown, { children: /* @__PURE__ */ jsx("span", { children: tooltip }) })
15
+ ] });
16
+ }
17
+ return navlink;
18
+ };
19
+ export {
20
+ NavItemBase
21
+ };
@@ -0,0 +1,61 @@
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
+ const clsx = 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 DEFAULT_NAVBAR_Z_INDEX = 10;
13
+ const Navbar = ({ withBorder, zIndex, hidden = false, className, mod, sx, ...rest }) => {
14
+ return /* @__PURE__ */ jsxRuntime.jsx(
15
+ Box.Box,
16
+ {
17
+ className: "tiui-app-shell-navbar-wrapper",
18
+ mod: [{ "navbar-hidden": hidden }],
19
+ sx: {
20
+ flexShrink: 0,
21
+ height: "100%",
22
+ position: "relative",
23
+ zIndex: zIndex ?? DEFAULT_NAVBAR_Z_INDEX,
24
+ width: `var(--app-shell-navbar-width)`,
25
+ transitionProperty: "width",
26
+ transitionDuration: "var(--app-shell-transition-duration, 200ms)",
27
+ transitionTimingFunction: "var(--app-shell-transition-timing-function, ease)",
28
+ "&:where([data-navbar-hidden])": {
29
+ width: 0
30
+ }
31
+ },
32
+ children: /* @__PURE__ */ jsxRuntime.jsx(
33
+ Box.Box,
34
+ {
35
+ component: "nav",
36
+ ...rest,
37
+ className: clsx.clsx(className, "tiui-app-shell-navbar"),
38
+ mod: [{ "with-border": withBorder }, mod],
39
+ sx: styles.mergeSxList([
40
+ (theme) => ({
41
+ backgroundColor: theme.colors.carbon[2],
42
+ display: "flex",
43
+ flexDirection: "column",
44
+ height: "100%",
45
+ width: `var(--app-shell-navbar-width)`,
46
+ transitionProperty: "transform",
47
+ transitionDuration: "var(--app-shell-transition-duration, 200ms)",
48
+ transitionTimingFunction: "var(--app-shell-transition-timing-function, ease)",
49
+ transform: hidden ? "translateX(-100%)" : "none",
50
+ "&:where([data-with-border])": {
51
+ borderRight: `1px solid ${theme.colors.carbon[3]}`
52
+ }
53
+ }),
54
+ sx
55
+ ])
56
+ }
57
+ )
58
+ }
59
+ );
60
+ };
61
+ exports.Navbar = Navbar;
@@ -0,0 +1,11 @@
1
+ import { BoxProps, ElementProps } from '../../../primitive/index.cjs';
2
+ interface NavbarProps extends BoxProps, ElementProps<'nav'> {
3
+ /** Determines whether the navbar should have a border */
4
+ withBorder?: boolean;
5
+ /** The `z-index` of the navbar */
6
+ zIndex?: React.CSSProperties['zIndex'];
7
+ /** Determines whether the navbar should be hidden */
8
+ hidden?: boolean;
9
+ }
10
+ export declare const Navbar: ({ withBorder, zIndex, hidden, className, mod, sx, ...rest }: NavbarProps) => import("react/jsx-runtime.js").JSX.Element;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { BoxProps, ElementProps } from '../../../primitive/index.mjs';
2
+ interface NavbarProps extends BoxProps, ElementProps<'nav'> {
3
+ /** Determines whether the navbar should have a border */
4
+ withBorder?: boolean;
5
+ /** The `z-index` of the navbar */
6
+ zIndex?: React.CSSProperties['zIndex'];
7
+ /** Determines whether the navbar should be hidden */
8
+ hidden?: boolean;
9
+ }
10
+ export declare const Navbar: ({ withBorder, zIndex, hidden, className, mod, sx, ...rest }: NavbarProps) => import("react/jsx-runtime.js").JSX.Element;
11
+ export {};
@@ -0,0 +1,61 @@
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 } from "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
+ const DEFAULT_NAVBAR_Z_INDEX = 10;
11
+ const Navbar = ({ withBorder, zIndex, hidden = false, className, mod, sx, ...rest }) => {
12
+ return /* @__PURE__ */ jsx(
13
+ Box,
14
+ {
15
+ className: "tiui-app-shell-navbar-wrapper",
16
+ mod: [{ "navbar-hidden": hidden }],
17
+ sx: {
18
+ flexShrink: 0,
19
+ height: "100%",
20
+ position: "relative",
21
+ zIndex: zIndex ?? DEFAULT_NAVBAR_Z_INDEX,
22
+ width: `var(--app-shell-navbar-width)`,
23
+ transitionProperty: "width",
24
+ transitionDuration: "var(--app-shell-transition-duration, 200ms)",
25
+ transitionTimingFunction: "var(--app-shell-transition-timing-function, ease)",
26
+ "&:where([data-navbar-hidden])": {
27
+ width: 0
28
+ }
29
+ },
30
+ children: /* @__PURE__ */ jsx(
31
+ Box,
32
+ {
33
+ component: "nav",
34
+ ...rest,
35
+ className: clsx(className, "tiui-app-shell-navbar"),
36
+ mod: [{ "with-border": withBorder }, mod],
37
+ sx: mergeSxList([
38
+ (theme) => ({
39
+ backgroundColor: theme.colors.carbon[2],
40
+ display: "flex",
41
+ flexDirection: "column",
42
+ height: "100%",
43
+ width: `var(--app-shell-navbar-width)`,
44
+ transitionProperty: "transform",
45
+ transitionDuration: "var(--app-shell-transition-duration, 200ms)",
46
+ transitionTimingFunction: "var(--app-shell-transition-timing-function, ease)",
47
+ transform: hidden ? "translateX(-100%)" : "none",
48
+ "&:where([data-with-border])": {
49
+ borderRight: `1px solid ${theme.colors.carbon[3]}`
50
+ }
51
+ }),
52
+ sx
53
+ ])
54
+ }
55
+ )
56
+ }
57
+ );
58
+ };
59
+ export {
60
+ Navbar
61
+ };
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const index = require("../../../icons/index.cjs");
5
+ ;/* empty css */
6
+ ;/* empty css */
7
+ ;/* empty css */
8
+ ;/* empty css */
9
+ ;/* empty css */
10
+ const clsx = require("clsx");
11
+ const Group = 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/Group/Group.cjs");
12
+ const Stack = 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/Stack/Stack.cjs");
13
+ const ActionIcon = 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/ActionIcon/ActionIcon.cjs");
14
+ const NavbarHeader = ({ logo, onLogoClick, onToggleCollapse, ...restProps }) => {
15
+ const handleLogoClick = () => {
16
+ if (onLogoClick) {
17
+ onLogoClick();
18
+ } else {
19
+ history.pushState({}, "", "/");
20
+ }
21
+ };
22
+ return /* @__PURE__ */ jsxRuntime.jsxs(
23
+ Group.Group,
24
+ {
25
+ justify: "space-between",
26
+ sx: { height: 64 },
27
+ ...restProps,
28
+ className: clsx.clsx(restProps.className, "tiui-app-shell-navbar-header"),
29
+ children: [
30
+ /* @__PURE__ */ jsxRuntime.jsx(
31
+ Stack.Stack,
32
+ {
33
+ justify: "center",
34
+ onClick: handleLogoClick,
35
+ sx: {
36
+ padding: 4,
37
+ cursor: "pointer"
38
+ },
39
+ "aria-label": "Logo",
40
+ children: logo
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsxRuntime.jsx(
44
+ ActionIcon.ActionIcon,
45
+ {
46
+ className: "tiui-app-shell-navbar-collapse-button",
47
+ variant: "white",
48
+ bg: "transparent",
49
+ onClick: onToggleCollapse,
50
+ "aria-label": "Collapse navbar",
51
+ children: /* @__PURE__ */ jsxRuntime.jsx(index.IconLayoutLeft, { size: 20 })
52
+ }
53
+ )
54
+ ]
55
+ }
56
+ );
57
+ };
58
+ exports.NavbarHeader = NavbarHeader;
@@ -0,0 +1,8 @@
1
+ import { GroupProps } from '../../../primitive/index.cjs';
2
+ interface NavbarHeaderProps extends GroupProps {
3
+ logo: React.ReactNode;
4
+ onLogoClick?: () => void;
5
+ onToggleCollapse?: () => void;
6
+ }
7
+ export declare const NavbarHeader: ({ logo, onLogoClick, onToggleCollapse, ...restProps }: NavbarHeaderProps) => import("react/jsx-runtime.js").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { GroupProps } from '../../../primitive/index.mjs';
2
+ interface NavbarHeaderProps extends GroupProps {
3
+ logo: React.ReactNode;
4
+ onLogoClick?: () => void;
5
+ onToggleCollapse?: () => void;
6
+ }
7
+ export declare const NavbarHeader: ({ logo, onLogoClick, onToggleCollapse, ...restProps }: NavbarHeaderProps) => import("react/jsx-runtime.js").JSX.Element;
8
+ export {};