@bouku/next 0.0.2

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 (68) hide show
  1. package/dist/assets/icons/bars.svg +6 -0
  2. package/dist/assets/icons/camera.svg +6 -0
  3. package/dist/assets/icons/login.svg +6 -0
  4. package/dist/assets/icons/user-circle.svg +6 -0
  5. package/dist/assets/images/placeholder.png +0 -0
  6. package/dist/components/image/_.d.ts +3 -0
  7. package/dist/components/image/_.js +8 -0
  8. package/dist/components/image/normal.d.ts +11 -0
  9. package/dist/components/image/normal.js +16 -0
  10. package/dist/components/index.d.ts +2 -0
  11. package/dist/components/index.js +18 -0
  12. package/dist/components/link/_.d.ts +4 -0
  13. package/dist/components/link/_.js +14 -0
  14. package/dist/components/link/button.d.ts +14 -0
  15. package/dist/components/link/button.js +15 -0
  16. package/dist/components/link/dropdown-nav.d.ts +9 -0
  17. package/dist/components/link/dropdown-nav.js +17 -0
  18. package/dist/components/link/normal.d.ts +11 -0
  19. package/dist/components/link/normal.js +26 -0
  20. package/dist/components/link/tab.d.ts +7 -0
  21. package/dist/components/link/tab.js +21 -0
  22. package/dist/components/link/tabs.d.ts +12 -0
  23. package/dist/components/link/tabs.js +20 -0
  24. package/dist/image/_.d.ts +3 -0
  25. package/dist/image/_.js +8 -0
  26. package/dist/image/normal.d.ts +11 -0
  27. package/dist/image/normal.js +16 -0
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.js +18 -0
  30. package/dist/layouts/_.d.ts +3 -0
  31. package/dist/layouts/_.js +12 -0
  32. package/dist/layouts/dashboard.d.ts +25 -0
  33. package/dist/layouts/dashboard.js +28 -0
  34. package/dist/layouts/locked.d.ts +35 -0
  35. package/dist/layouts/locked.js +32 -0
  36. package/dist/layouts/normal.d.ts +35 -0
  37. package/dist/layouts/normal.js +32 -0
  38. package/dist/link/_.d.ts +4 -0
  39. package/dist/link/_.js +14 -0
  40. package/dist/link/button.d.ts +14 -0
  41. package/dist/link/button.js +15 -0
  42. package/dist/link/dropdown-nav.d.ts +9 -0
  43. package/dist/link/dropdown-nav.js +17 -0
  44. package/dist/link/normal.d.ts +11 -0
  45. package/dist/link/normal.js +26 -0
  46. package/dist/link/tab.d.ts +7 -0
  47. package/dist/link/tab.js +21 -0
  48. package/dist/link/tabs.d.ts +12 -0
  49. package/dist/link/tabs.js +20 -0
  50. package/dist/pages/index.d.ts +2 -0
  51. package/dist/pages/index.js +18 -0
  52. package/dist/pages/layouts/_.d.ts +3 -0
  53. package/dist/pages/layouts/_.js +12 -0
  54. package/dist/pages/layouts/dashboard.d.ts +25 -0
  55. package/dist/pages/layouts/dashboard.js +28 -0
  56. package/dist/pages/layouts/locked.d.ts +35 -0
  57. package/dist/pages/layouts/locked.js +32 -0
  58. package/dist/pages/layouts/normal.d.ts +35 -0
  59. package/dist/pages/layouts/normal.js +32 -0
  60. package/dist/pages/templates/_.d.ts +1 -0
  61. package/dist/pages/templates/_.js +8 -0
  62. package/dist/pages/templates/dashboard.d.ts +19 -0
  63. package/dist/pages/templates/dashboard.js +24 -0
  64. package/dist/templates/_.d.ts +1 -0
  65. package/dist/templates/_.js +8 -0
  66. package/dist/templates/dashboard.d.ts +6 -0
  67. package/dist/templates/dashboard.js +11 -0
  68. package/package.json +31 -0
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" width="1em" height="1em">
2
+ <path
3
+ d="M96 160C96 142.3 110.3 128 128 128L512 128C529.7 128 544 142.3 544 160C544 177.7 529.7 192 512 192L128 192C110.3 192 96 177.7 96 160zM96 320C96 302.3 110.3 288 128 288L512 288C529.7 288 544 302.3 544 320C544 337.7 529.7 352 512 352L128 352C110.3 352 96 337.7 96 320zM544 480C544 497.7 529.7 512 512 512L128 512C110.3 512 96 497.7 96 480C96 462.3 110.3 448 128 448L512 448C529.7 448 544 462.3 544 480z"
4
+ fill="currentColor"
5
+ />
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em">
2
+ <path
3
+ d="M220.6 121.2L271.1 96 448 96l0 96-114.8 0c-21.9-15.1-48.5-24-77.2-24s-55.2 8.9-77.2 24L64 192l0-64 128 0c9.9 0 19.7-2.3 28.6-6.8zM0 128L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L271.1 32c-9.9 0-19.7 2.3-28.6 6.8L192 64l-32 0 0-16c0-8.8-7.2-16-16-16L80 32c-8.8 0-16 7.2-16 16l0 16C28.7 64 0 92.7 0 128zM168 304a88 88 0 1 1 176 0 88 88 0 1 1 -176 0z"
4
+ fill="currentColor"
5
+ />
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em">
2
+ <path
3
+ d="M345 273c9.4-9.4 9.4-24.6 0-33.9L201 95c-6.9-6.9-17.2-8.9-26.2-5.2S160 102.3 160 112l0 80-112 0c-26.5 0-48 21.5-48 48l0 32c0 26.5 21.5 48 48 48l112 0 0 80c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2L345 273zm7 143c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c53 0 96-43 96-96l0-256c0-53-43-96-96-96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32l-64 0z"
4
+ fill="currentColor"
5
+ />
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em">
2
+ <path
3
+ d="M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2 35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z"
4
+ fill="currentColor"
5
+ />
6
+ </svg>
@@ -0,0 +1,3 @@
1
+ import { StaticImageData } from "next/image";
2
+ export { default as Image } from "./normal";
3
+ export type ImageSrc = StaticImageData | string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Image = void 0;
7
+ var normal_1 = require("./normal");
8
+ Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return __importDefault(normal_1).default; } });
@@ -0,0 +1,11 @@
1
+ import { ImageProps } from "next/image";
2
+ type Props = {
3
+ src: ImageProps["src"];
4
+ style?: string;
5
+ link?: string;
6
+ width?: number;
7
+ height?: number;
8
+ alt?: string;
9
+ };
10
+ export declare function Image({ src, link, style, width, height, alt, }: Props): import("react").JSX.Element;
11
+ export default Image;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Image = Image;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const image_1 = __importDefault(require("next/image"));
9
+ const link_1 = __importDefault(require("next/link"));
10
+ const style_1 = require("@bouko/style");
11
+ function Image({ src, link, style, width = 100, height = 100, alt = "Image", }) {
12
+ if (link)
13
+ return ((0, jsx_runtime_1.jsx)(link_1.default, { href: link, passHref: true, children: (0, jsx_runtime_1.jsx)(image_1.default, { src: src, className: (0, style_1.cn)("w-auto h-auto", style), width: width, height: height, alt: alt }) }));
14
+ return ((0, jsx_runtime_1.jsx)(image_1.default, { src: src, className: (0, style_1.cn)("w-auto h-auto", style), width: width, height: height, alt: alt }));
15
+ }
16
+ exports.default = Image;
@@ -0,0 +1,2 @@
1
+ export * from "./image/_";
2
+ export * from "./link/_";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./image/_"), exports);
18
+ __exportStar(require("./link/_"), exports);
@@ -0,0 +1,4 @@
1
+ export { default as Link } from "./normal";
2
+ export { default as LinkButton } from "./button";
3
+ export { default as DropdownNav } from "./dropdown-nav";
4
+ export { default as NavTabs } from "./tabs";
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NavTabs = exports.DropdownNav = exports.LinkButton = exports.Link = void 0;
7
+ var normal_1 = require("./normal");
8
+ Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return __importDefault(normal_1).default; } });
9
+ var button_1 = require("./button");
10
+ Object.defineProperty(exports, "LinkButton", { enumerable: true, get: function () { return __importDefault(button_1).default; } });
11
+ var dropdown_nav_1 = require("./dropdown-nav");
12
+ Object.defineProperty(exports, "DropdownNav", { enumerable: true, get: function () { return __importDefault(dropdown_nav_1).default; } });
13
+ var tabs_1 = require("./tabs");
14
+ Object.defineProperty(exports, "NavTabs", { enumerable: true, get: function () { return __importDefault(tabs_1).default; } });
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from "react";
2
+ import { Component } from "@bouku/core";
3
+ type ButtonProps = Component & {
4
+ variant?: "surface" | "outline" | "ghost" | "error";
5
+ size?: "xs" | "sm" | "md" | "lg";
6
+ icon?: ReactNode;
7
+ disabled?: boolean;
8
+ };
9
+ type Props = ButtonProps & {
10
+ href: string;
11
+ download?: string;
12
+ };
13
+ export declare function LinkButton({ href, download, disabled, ...props }: Props): import("react").JSX.Element;
14
+ export default LinkButton;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LinkButton = LinkButton;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const link_1 = __importDefault(require("next/link"));
9
+ const core_1 = require("@bouku/core");
10
+ function LinkButton({ href, download, disabled, ...props }) {
11
+ if (disabled)
12
+ return (0, jsx_runtime_1.jsx)(core_1.Button, { ...props, disabled: true });
13
+ return ((0, jsx_runtime_1.jsx)(link_1.default, { href: href, download: download, children: (0, jsx_runtime_1.jsx)(core_1.Button, { ...props }) }));
14
+ }
15
+ exports.default = LinkButton;
@@ -0,0 +1,9 @@
1
+ type TabRoute = {
2
+ icon?: React.ReactNode;
3
+ label: string;
4
+ to: string;
5
+ };
6
+ export declare function DropdownNav({ items }: {
7
+ items: TabRoute[];
8
+ }): import("react").JSX.Element;
9
+ export default DropdownNav;
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.DropdownNav = DropdownNav;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const navigation_1 = require("next/navigation");
10
+ const core_1 = require("@bouku/core");
11
+ const bars_svg_1 = __importDefault(require("../assets/icons/bars.svg"));
12
+ function DropdownNav({ items }) {
13
+ const router = (0, navigation_1.useRouter)();
14
+ const tabs = items.map(x => ({ ...x, action: () => router.push(x.to) }));
15
+ return ((0, jsx_runtime_1.jsx)(core_1.Dropdown, { options: tabs, children: (0, jsx_runtime_1.jsx)(bars_svg_1.default, {}) }));
16
+ }
17
+ exports.default = DropdownNav;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from "react";
2
+ type Props = {
3
+ style?: string;
4
+ to?: string;
5
+ underline?: boolean;
6
+ download?: string;
7
+ disabled?: boolean;
8
+ children: ReactNode;
9
+ };
10
+ export declare function Link({ style, to, download, underline, disabled, ...props }: Props): import("react").JSX.Element;
11
+ export default Link;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Link = Link;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const link_1 = __importDefault(require("next/link"));
9
+ const style_1 = require("@bouko/style");
10
+ const tailwind_variants_1 = require("tailwind-variants");
11
+ function Link({ style, to = "/", download, underline = false, disabled, ...props }) {
12
+ if (disabled)
13
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)(styles({ underline }), style, "cursor-not-allowed"), ...props }));
14
+ if (to.includes("https"))
15
+ return ((0, jsx_runtime_1.jsx)("a", { className: (0, style_1.cn)(styles({ underline }), style), href: to, target: "_blank", rel: "noopener noreferrer", ...props }));
16
+ return ((0, jsx_runtime_1.jsx)(link_1.default, { className: (0, style_1.cn)(styles({ underline }), style), href: to, download: download, passHref: true, ...props }));
17
+ }
18
+ const styles = (0, tailwind_variants_1.tv)({
19
+ base: "text-accent hover:text-accent-light duration-200",
20
+ variants: {
21
+ underline: {
22
+ true: "text-primary-dark hover:text-primary underline underline-offset-4 decoration-border-light hover:decoration-accent"
23
+ }
24
+ }
25
+ });
26
+ exports.default = Link;
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ id: string;
3
+ icon?: React.ReactNode;
4
+ label?: string;
5
+ };
6
+ export declare function Tab({ id, icon, label }: Props): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Tab = Tab;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const navigation_1 = require("next/navigation");
7
+ const style_1 = require("@bouko/style");
8
+ const normal_1 = require("./normal");
9
+ function Tab({ id, icon, label }) {
10
+ const path = (0, navigation_1.usePathname)();
11
+ const isActive = path === ("/" + id) || (path === "/" && id === "root");
12
+ if (isActive)
13
+ return ((0, jsx_runtime_1.jsxs)("span", { className: (0, style_1.cn)(styles.tab, "!text-accent font-medium bg-accent-dark/20 border-accent/10 cursor-not-allowed"), children: [icon, label ?? id] }, id));
14
+ return ((0, jsx_runtime_1.jsxs)(normal_1.Link, { style: styles.tab, to: id === "root" ? "/" : ("/" + id), children: [icon, label ?? id] }, id));
15
+ }
16
+ const styles = {
17
+ container: "items-center gap-12 w-72 h-full px-3 py-6 bg-background-light border-r-2 border-border shadow",
18
+ logo: "w-2/3 h-auto",
19
+ nav: "gap-6 w-full",
20
+ tab: "flex items-center gap-2 w-full border border-transparent rounded px-3 py-2 text-sm uppercase text-primary-dark hover:text-primary duration-200"
21
+ };
@@ -0,0 +1,12 @@
1
+ type Props = {
2
+ style?: string;
3
+ pages: Page[];
4
+ };
5
+ type Page = {
6
+ id: string;
7
+ route: string;
8
+ label: string;
9
+ disabled?: boolean;
10
+ };
11
+ export default function Tabs({ style, pages }: Props): import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = Tabs;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const navigation_1 = require("next/navigation");
10
+ const normal_1 = __importDefault(require("./normal"));
11
+ const core_1 = require("@bouku/core");
12
+ const style_1 = require("@bouko/style");
13
+ function Tabs({ style, pages }) {
14
+ const pathname = (0, navigation_1.usePathname)();
15
+ return ((0, jsx_runtime_1.jsx)(core_1.RowBox, { style: (0, style_1.cn)(styles.container, style), children: pages.map((item) => ((0, jsx_runtime_1.jsx)(normal_1.default, { style: (0, style_1.cn)(styles.tab, pathname === item.route && "!border-accent !text-primary !cursor-default", item.disabled && "pointer-events-none !cursor-not-allowed"), to: item.route, disabled: item.disabled, children: item.label ?? item.id }, item.id))) }));
16
+ }
17
+ const styles = {
18
+ container: "gap-5 sm:gap-8",
19
+ tab: "flex items-center gap-2 py-1 border-b-2 border-slate-700/60 hover:border-slate-600/50 duration-200 text-slate-300 hover:text-primary-dark font-roboto text-xs sm:text-sm uppercase tracking-wide"
20
+ };
@@ -0,0 +1,3 @@
1
+ import { StaticImageData } from "next/image";
2
+ export { default as Image } from "./normal";
3
+ export type ImageSrc = StaticImageData | string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Image = void 0;
7
+ var normal_1 = require("./normal");
8
+ Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return __importDefault(normal_1).default; } });
@@ -0,0 +1,11 @@
1
+ import { ImageProps } from "next/image";
2
+ type Props = {
3
+ src: ImageProps["src"];
4
+ style?: string;
5
+ link?: string;
6
+ width?: number;
7
+ height?: number;
8
+ alt?: string;
9
+ };
10
+ export declare function Image({ src, link, style, width, height, alt, }: Props): import("react").JSX.Element;
11
+ export default Image;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Image = Image;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const image_1 = __importDefault(require("next/image"));
9
+ const link_1 = __importDefault(require("next/link"));
10
+ const style_1 = require("@bouko/style");
11
+ function Image({ src, link, style, width = 100, height = 100, alt = "Image", }) {
12
+ if (link)
13
+ return ((0, jsx_runtime_1.jsx)(link_1.default, { href: link, passHref: true, children: (0, jsx_runtime_1.jsx)(image_1.default, { src: src, className: (0, style_1.cn)("w-auto h-auto", style), width: width, height: height, alt: alt }) }));
14
+ return ((0, jsx_runtime_1.jsx)(image_1.default, { src: src, className: (0, style_1.cn)("w-auto h-auto", style), width: width, height: height, alt: alt }));
15
+ }
16
+ exports.default = Image;
@@ -0,0 +1,2 @@
1
+ export * from "./components";
2
+ export * from "./pages";
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components"), exports);
18
+ __exportStar(require("./pages"), exports);
@@ -0,0 +1,3 @@
1
+ export { default as NormalLayout } from "./normal";
2
+ export { default as LockedLayout } from "./locked";
3
+ export { default as DashboardLayout } from "./dashboard";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DashboardLayout = exports.LockedLayout = exports.NormalLayout = void 0;
7
+ var normal_1 = require("./normal");
8
+ Object.defineProperty(exports, "NormalLayout", { enumerable: true, get: function () { return __importDefault(normal_1).default; } });
9
+ var locked_1 = require("./locked");
10
+ Object.defineProperty(exports, "LockedLayout", { enumerable: true, get: function () { return __importDefault(locked_1).default; } });
11
+ var dashboard_1 = require("./dashboard");
12
+ Object.defineProperty(exports, "DashboardLayout", { enumerable: true, get: function () { return __importDefault(dashboard_1).default; } });
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from "react";
2
+ import type { StaticImageData } from "next/image";
3
+ type Props = {
4
+ logo: StaticImageData;
5
+ fonts: string[];
6
+ pages: Record<string, {
7
+ id: string;
8
+ icon?: ReactNode;
9
+ label?: string;
10
+ }[]>;
11
+ providers: ReactNode[];
12
+ children: ReactNode;
13
+ };
14
+ export declare const DashboardLayout: ({ logo, fonts, pages, providers, children }: Props) => import("react").JSX.Element;
15
+ type Item = {
16
+ id: string;
17
+ icon?: ReactNode;
18
+ label?: string;
19
+ };
20
+ type SidebarProps = {
21
+ logo: StaticImageData;
22
+ tabs: Record<string, Item[]>;
23
+ };
24
+ export declare function Sidebar({ logo, tabs }: SidebarProps): import("react").JSX.Element;
25
+ export default DashboardLayout;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DashboardLayout = void 0;
4
+ exports.Sidebar = Sidebar;
5
+ const react_1 = require("react");
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const core_1 = require("@bouku/core");
8
+ const _1 = require("../link/_");
9
+ const _2 = require("../image/_");
10
+ const tab_1 = require("../link/tab");
11
+ const style_1 = require("@bouko/style");
12
+ const DashboardLayout = ({ logo, fonts, pages, providers, children }) => ((0, jsx_runtime_1.jsx)("html", { lang: "en", className: (0, style_1.cn)(...fonts, "scroll-smooth"), children: (0, jsx_runtime_1.jsx)("body", { className: s.page, children: (0, jsx_runtime_1.jsxs)("main", { className: s.container, children: [(0, jsx_runtime_1.jsx)(Sidebar, { logo: logo, tabs: pages }), (0, jsx_runtime_1.jsx)(core_1.ColumnBox, { style: s.content, children: children }), providers] }) }) }));
13
+ exports.DashboardLayout = DashboardLayout;
14
+ const s = {
15
+ page: "h-[100dvh] bg-background font-sans text-primary select-none overflow-hidden antialiased",
16
+ container: "flex w-full h-full overflow-hidden",
17
+ content: "grow justify-center items-start w-full p-8"
18
+ };
19
+ function Sidebar({ logo, tabs }) {
20
+ return ((0, jsx_runtime_1.jsxs)(core_1.ColumnBox, { style: styles.container, children: [(0, jsx_runtime_1.jsx)(_1.Link, { style: styles.logo, to: "/", children: (0, jsx_runtime_1.jsx)(_2.Image, { src: logo, style: "w-full h-full", width: 100, height: 50, alt: "Logo" }) }), (0, jsx_runtime_1.jsx)(core_1.ColumnBox, { style: styles.nav, children: Object.entries(tabs).map(([section, routes], i) => ((0, jsx_runtime_1.jsxs)(core_1.ColumnBox, { style: "gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-3 tracking-wider font-mono text-xs uppercase font-light text-primary-dark/80", children: section }), (0, jsx_runtime_1.jsx)(core_1.ColumnBox, { style: "gap-1", children: routes.map((opts, i) => ((0, react_1.createElement)(tab_1.Tab, { ...opts, key: i }))) })] }, i))) })] }));
21
+ }
22
+ const styles = {
23
+ container: "items-center gap-12 w-72 h-full px-3 py-6 bg-background-light border-r-2 border-border shadow",
24
+ logo: "w-2/3 h-auto",
25
+ nav: "gap-6 w-full",
26
+ tab: "flex items-center gap-2 w-full border border-transparent rounded px-3 py-2 text-sm uppercase text-primary-dark hover:text-primary duration-200"
27
+ };
28
+ exports.default = exports.DashboardLayout;
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from "react";
2
+ export declare const Header: ({ children }: {
3
+ children: React.ReactNode;
4
+ }) => import("react").JSX.Element;
5
+ /**
6
+ * Application footer component containing copyright and legal links
7
+ *
8
+ * Layout:
9
+ * - Desktop: Horizontal layout with copyright on left, links on right
10
+ * - Mobile: Vertical stacked layout with copyright above links
11
+ *
12
+ * Used in the main layout to provide persistent footer across all pages
13
+ **/
14
+ export declare const Footer: ({ company }: {
15
+ company?: string;
16
+ }) => import("react").JSX.Element;
17
+ /**
18
+ * Problems:
19
+ *
20
+ * 1. Move to `@bouko/next` or `@bouku/core`
21
+ * 2. Wrong link component for external
22
+ **/
23
+ type Props = {
24
+ variant?: "normal" | "locked";
25
+ company?: string;
26
+ header?: ReactNode[];
27
+ fonts: string[];
28
+ Providers?: ({ children }: {
29
+ children: ReactNode;
30
+ }) => React.JSX.Element;
31
+ authed?: boolean;
32
+ children: ReactNode;
33
+ };
34
+ declare const LockedLayout: ({ company, header, fonts, children }: Props) => import("react").JSX.Element;
35
+ export default LockedLayout;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Footer = exports.Header = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const core_1 = require("@bouku/core");
6
+ const _1 = require("../link/_");
7
+ const style_1 = require("@bouko/style");
8
+ const Header = ({ children }) => ((0, jsx_runtime_1.jsx)(core_1.RowBox, { style: "justify-between items-center gap-6 w-full p-5", children: children }));
9
+ exports.Header = Header;
10
+ /**
11
+ * Application footer component containing copyright and legal links
12
+ *
13
+ * Layout:
14
+ * - Desktop: Horizontal layout with copyright on left, links on right
15
+ * - Mobile: Vertical stacked layout with copyright above links
16
+ *
17
+ * Used in the main layout to provide persistent footer across all pages
18
+ **/
19
+ const Footer = ({ company }) => ((0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: (0, style_1.cn)(footerStyles.container, footerStyles.text), children: [(0, jsx_runtime_1.jsxs)("span", { children: ["Copyright \u00A9 2025 ", company] }), (0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: footerStyles.links, children: [(0, jsx_runtime_1.jsx)(_1.Link, { to: "/legal/terms", underline: true, children: "Terms of Service" }), (0, jsx_runtime_1.jsx)(_1.Link, { to: "/legal/privacy", underline: true, children: "Privacy Policy" })] })] }));
20
+ exports.Footer = Footer;
21
+ const footerStyles = {
22
+ container: "max-sm:flex-col justify-between sm:items-center gap-3 sm:gap-6 w-full p-6",
23
+ text: "text-sm text-primary-dark",
24
+ links: "items-center gap-4"
25
+ };
26
+ const LockedLayout = ({ company, header, fonts, children }) => ((0, jsx_runtime_1.jsx)("html", { lang: "en", className: (0, style_1.cn)(...fonts, "scroll-smooth"), children: (0, jsx_runtime_1.jsx)("body", { className: s.page, children: (0, jsx_runtime_1.jsxs)("main", { className: s.container, children: [header && (0, jsx_runtime_1.jsx)(exports.Header, { children: header }), (0, jsx_runtime_1.jsx)("div", { className: s.content, children: children }), (0, jsx_runtime_1.jsx)(exports.Footer, { company: company })] }) }) }));
27
+ const s = {
28
+ page: "h-[100dvh] bg-background font-sans text-primary select-none antialiased overflow-hidden",
29
+ container: "flex flex-col w-full h-full mx-auto max-w-[82rem] overflow-hidden",
30
+ content: "flex grow justify-center items-start w-full p-8overflow-x-hidden overflow-y-auto no-scrollbar"
31
+ };
32
+ exports.default = LockedLayout;
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from "react";
2
+ export declare const Header: ({ children }: {
3
+ children: React.ReactNode;
4
+ }) => import("react").JSX.Element;
5
+ /**
6
+ * Application footer component containing copyright and legal links
7
+ *
8
+ * Layout:
9
+ * - Desktop: Horizontal layout with copyright on left, links on right
10
+ * - Mobile: Vertical stacked layout with copyright above links
11
+ *
12
+ * Used in the main layout to provide persistent footer across all pages
13
+ **/
14
+ export declare const Footer: ({ company }: {
15
+ company?: string;
16
+ }) => import("react").JSX.Element;
17
+ /**
18
+ * Problems:
19
+ *
20
+ * 1. Move to `@bouko/next` or `@bouku/core`
21
+ * 2. Wrong link component for external
22
+ **/
23
+ type Props = {
24
+ variant?: "normal" | "locked";
25
+ company?: string;
26
+ header?: ReactNode[];
27
+ fonts: string[];
28
+ Providers?: ({ children }: {
29
+ children: ReactNode;
30
+ }) => React.JSX.Element;
31
+ authed?: boolean;
32
+ children: ReactNode;
33
+ };
34
+ declare const NormalLayout: ({ company, header, fonts, children }: Props) => import("react").JSX.Element;
35
+ export default NormalLayout;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Footer = exports.Header = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const core_1 = require("@bouku/core");
6
+ const _1 = require("../link/_");
7
+ const style_1 = require("@bouko/style");
8
+ const Header = ({ children }) => ((0, jsx_runtime_1.jsx)(core_1.RowBox, { style: "justify-between items-center gap-6 w-full p-5", children: children }));
9
+ exports.Header = Header;
10
+ /**
11
+ * Application footer component containing copyright and legal links
12
+ *
13
+ * Layout:
14
+ * - Desktop: Horizontal layout with copyright on left, links on right
15
+ * - Mobile: Vertical stacked layout with copyright above links
16
+ *
17
+ * Used in the main layout to provide persistent footer across all pages
18
+ **/
19
+ const Footer = ({ company }) => ((0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: (0, style_1.cn)(footerStyles.container, footerStyles.text), children: [(0, jsx_runtime_1.jsxs)("span", { children: ["Copyright \u00A9 2025 ", company] }), (0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: footerStyles.links, children: [(0, jsx_runtime_1.jsx)(_1.Link, { to: "/legal/terms", underline: true, children: "Terms of Service" }), (0, jsx_runtime_1.jsx)(_1.Link, { to: "/legal/privacy", underline: true, children: "Privacy Policy" })] })] }));
20
+ exports.Footer = Footer;
21
+ const footerStyles = {
22
+ container: "max-sm:flex-col justify-between sm:items-center gap-3 sm:gap-6 w-full p-6",
23
+ text: "text-sm text-primary-dark",
24
+ links: "items-center gap-4"
25
+ };
26
+ const NormalLayout = ({ company, header, fonts, children }) => ((0, jsx_runtime_1.jsx)("html", { lang: "en", className: (0, style_1.cn)(...fonts, "scroll-smooth"), children: (0, jsx_runtime_1.jsx)("body", { className: s.page, children: (0, jsx_runtime_1.jsxs)("main", { className: s.container, children: [(0, jsx_runtime_1.jsx)(exports.Header, { children: header }), (0, jsx_runtime_1.jsx)("div", { className: s.content, children: children }), (0, jsx_runtime_1.jsx)(exports.Footer, { company: company })] }) }) }));
27
+ const s = {
28
+ page: "h-[100dvh] bg-background font-sans text-primary select-none overflow-auto antialiased",
29
+ container: "flex flex-col w-full h-full mx-auto max-w-[82rem]",
30
+ content: "flex grow justify-center items-start w-full p-8"
31
+ };
32
+ exports.default = NormalLayout;
@@ -0,0 +1,4 @@
1
+ export { default as Link } from "./normal";
2
+ export { default as LinkButton } from "./button";
3
+ export { default as DropdownNav } from "./dropdown-nav";
4
+ export { default as NavTabs } from "./tabs";
package/dist/link/_.js ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NavTabs = exports.DropdownNav = exports.LinkButton = exports.Link = void 0;
7
+ var normal_1 = require("./normal");
8
+ Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return __importDefault(normal_1).default; } });
9
+ var button_1 = require("./button");
10
+ Object.defineProperty(exports, "LinkButton", { enumerable: true, get: function () { return __importDefault(button_1).default; } });
11
+ var dropdown_nav_1 = require("./dropdown-nav");
12
+ Object.defineProperty(exports, "DropdownNav", { enumerable: true, get: function () { return __importDefault(dropdown_nav_1).default; } });
13
+ var tabs_1 = require("./tabs");
14
+ Object.defineProperty(exports, "NavTabs", { enumerable: true, get: function () { return __importDefault(tabs_1).default; } });
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from "react";
2
+ import { Component } from "@bouku/core";
3
+ type ButtonProps = Component & {
4
+ variant?: "surface" | "outline" | "ghost" | "error";
5
+ size?: "xs" | "sm" | "md" | "lg";
6
+ icon?: ReactNode;
7
+ disabled?: boolean;
8
+ };
9
+ type Props = ButtonProps & {
10
+ href: string;
11
+ download?: string;
12
+ };
13
+ export declare function LinkButton({ href, download, disabled, ...props }: Props): import("react").JSX.Element;
14
+ export default LinkButton;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LinkButton = LinkButton;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const link_1 = __importDefault(require("next/link"));
9
+ const core_1 = require("@bouku/core");
10
+ function LinkButton({ href, download, disabled, ...props }) {
11
+ if (disabled)
12
+ return (0, jsx_runtime_1.jsx)(core_1.Button, { ...props, disabled: true });
13
+ return ((0, jsx_runtime_1.jsx)(link_1.default, { href: href, download: download, children: (0, jsx_runtime_1.jsx)(core_1.Button, { ...props }) }));
14
+ }
15
+ exports.default = LinkButton;
@@ -0,0 +1,9 @@
1
+ type TabRoute = {
2
+ icon?: React.ReactNode;
3
+ label: string;
4
+ to: string;
5
+ };
6
+ export declare function DropdownNav({ items }: {
7
+ items: TabRoute[];
8
+ }): import("react").JSX.Element;
9
+ export default DropdownNav;
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.DropdownNav = DropdownNav;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const navigation_1 = require("next/navigation");
10
+ const core_1 = require("@bouku/core");
11
+ const bars_svg_1 = __importDefault(require("../assets/icons/bars.svg"));
12
+ function DropdownNav({ items }) {
13
+ const router = (0, navigation_1.useRouter)();
14
+ const tabs = items.map(x => ({ ...x, action: () => router.push(x.to) }));
15
+ return ((0, jsx_runtime_1.jsx)(core_1.Dropdown, { options: tabs, children: (0, jsx_runtime_1.jsx)(bars_svg_1.default, {}) }));
16
+ }
17
+ exports.default = DropdownNav;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from "react";
2
+ type Props = {
3
+ style?: string;
4
+ to?: string;
5
+ underline?: boolean;
6
+ download?: string;
7
+ disabled?: boolean;
8
+ children: ReactNode;
9
+ };
10
+ export declare function Link({ style, to, download, underline, disabled, ...props }: Props): import("react").JSX.Element;
11
+ export default Link;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Link = Link;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const link_1 = __importDefault(require("next/link"));
9
+ const style_1 = require("@bouko/style");
10
+ const tailwind_variants_1 = require("tailwind-variants");
11
+ function Link({ style, to = "/", download, underline = false, disabled, ...props }) {
12
+ if (disabled)
13
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.cn)(styles({ underline }), style, "cursor-not-allowed"), ...props }));
14
+ if (to.includes("https"))
15
+ return ((0, jsx_runtime_1.jsx)("a", { className: (0, style_1.cn)(styles({ underline }), style), href: to, target: "_blank", rel: "noopener noreferrer", ...props }));
16
+ return ((0, jsx_runtime_1.jsx)(link_1.default, { className: (0, style_1.cn)(styles({ underline }), style), href: to, download: download, passHref: true, ...props }));
17
+ }
18
+ const styles = (0, tailwind_variants_1.tv)({
19
+ base: "text-accent hover:text-accent-light duration-200",
20
+ variants: {
21
+ underline: {
22
+ true: "text-primary-dark hover:text-primary underline underline-offset-4 decoration-border-light hover:decoration-accent"
23
+ }
24
+ }
25
+ });
26
+ exports.default = Link;
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ id: string;
3
+ icon?: React.ReactNode;
4
+ label?: string;
5
+ };
6
+ export declare function Tab({ id, icon, label }: Props): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Tab = Tab;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const navigation_1 = require("next/navigation");
7
+ const style_1 = require("@bouko/style");
8
+ const normal_1 = require("./normal");
9
+ function Tab({ id, icon, label }) {
10
+ const path = (0, navigation_1.usePathname)();
11
+ const isActive = path === ("/" + id) || (path === "/" && id === "root");
12
+ if (isActive)
13
+ return ((0, jsx_runtime_1.jsxs)("span", { className: (0, style_1.cn)(styles.tab, "!text-accent font-medium bg-accent-dark/20 border-accent/10 cursor-not-allowed"), children: [icon, label ?? id] }, id));
14
+ return ((0, jsx_runtime_1.jsxs)(normal_1.Link, { style: styles.tab, to: id === "root" ? "/" : ("/" + id), children: [icon, label ?? id] }, id));
15
+ }
16
+ const styles = {
17
+ container: "items-center gap-12 w-72 h-full px-3 py-6 bg-background-light border-r-2 border-border shadow",
18
+ logo: "w-2/3 h-auto",
19
+ nav: "gap-6 w-full",
20
+ tab: "flex items-center gap-2 w-full border border-transparent rounded px-3 py-2 text-sm uppercase text-primary-dark hover:text-primary duration-200"
21
+ };
@@ -0,0 +1,12 @@
1
+ type Props = {
2
+ style?: string;
3
+ pages: Page[];
4
+ };
5
+ type Page = {
6
+ id: string;
7
+ route: string;
8
+ label: string;
9
+ disabled?: boolean;
10
+ };
11
+ export default function Tabs({ style, pages }: Props): import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = Tabs;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const navigation_1 = require("next/navigation");
10
+ const normal_1 = __importDefault(require("./normal"));
11
+ const core_1 = require("@bouku/core");
12
+ const style_1 = require("@bouko/style");
13
+ function Tabs({ style, pages }) {
14
+ const pathname = (0, navigation_1.usePathname)();
15
+ return ((0, jsx_runtime_1.jsx)(core_1.RowBox, { style: (0, style_1.cn)(styles.container, style), children: pages.map((item) => ((0, jsx_runtime_1.jsx)(normal_1.default, { style: (0, style_1.cn)(styles.tab, pathname === item.route && "!border-accent !text-primary !cursor-default", item.disabled && "pointer-events-none !cursor-not-allowed"), to: item.route, disabled: item.disabled, children: item.label ?? item.id }, item.id))) }));
16
+ }
17
+ const styles = {
18
+ container: "gap-5 sm:gap-8",
19
+ tab: "flex items-center gap-2 py-1 border-b-2 border-slate-700/60 hover:border-slate-600/50 duration-200 text-slate-300 hover:text-primary-dark font-roboto text-xs sm:text-sm uppercase tracking-wide"
20
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./layouts/_";
2
+ export * from "./templates/_";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./layouts/_"), exports);
18
+ __exportStar(require("./templates/_"), exports);
@@ -0,0 +1,3 @@
1
+ export { default as NormalLayout } from "./normal";
2
+ export { default as LockedLayout } from "./locked";
3
+ export { default as DashboardLayout } from "./dashboard";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DashboardLayout = exports.LockedLayout = exports.NormalLayout = void 0;
7
+ var normal_1 = require("./normal");
8
+ Object.defineProperty(exports, "NormalLayout", { enumerable: true, get: function () { return __importDefault(normal_1).default; } });
9
+ var locked_1 = require("./locked");
10
+ Object.defineProperty(exports, "LockedLayout", { enumerable: true, get: function () { return __importDefault(locked_1).default; } });
11
+ var dashboard_1 = require("./dashboard");
12
+ Object.defineProperty(exports, "DashboardLayout", { enumerable: true, get: function () { return __importDefault(dashboard_1).default; } });
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from "react";
2
+ import type { StaticImageData } from "next/image";
3
+ type Props = {
4
+ logo: StaticImageData;
5
+ fonts: string[];
6
+ pages: Record<string, {
7
+ id: string;
8
+ icon?: ReactNode;
9
+ label?: string;
10
+ }[]>;
11
+ providers: ReactNode[];
12
+ children: ReactNode;
13
+ };
14
+ export declare const DashboardLayout: ({ logo, fonts, pages, providers, children }: Props) => import("react").JSX.Element;
15
+ type Item = {
16
+ id: string;
17
+ icon?: ReactNode;
18
+ label?: string;
19
+ };
20
+ type SidebarProps = {
21
+ logo: StaticImageData;
22
+ tabs: Record<string, Item[]>;
23
+ };
24
+ export declare function Sidebar({ logo, tabs }: SidebarProps): import("react").JSX.Element;
25
+ export default DashboardLayout;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DashboardLayout = void 0;
4
+ exports.Sidebar = Sidebar;
5
+ const react_1 = require("react");
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const core_1 = require("@bouku/core");
8
+ const _1 = require("../../components/link/_");
9
+ const _2 = require("../../components/image/_");
10
+ const tab_1 = require("../../components/link/tab");
11
+ const style_1 = require("@bouko/style");
12
+ const DashboardLayout = ({ logo, fonts, pages, providers, children }) => ((0, jsx_runtime_1.jsx)("html", { lang: "en", className: (0, style_1.cn)(...fonts, "scroll-smooth"), children: (0, jsx_runtime_1.jsx)("body", { className: s.page, children: (0, jsx_runtime_1.jsxs)("main", { className: s.container, children: [(0, jsx_runtime_1.jsx)(Sidebar, { logo: logo, tabs: pages }), (0, jsx_runtime_1.jsx)(core_1.ColumnBox, { style: s.content, children: children }), providers] }) }) }));
13
+ exports.DashboardLayout = DashboardLayout;
14
+ const s = {
15
+ page: "h-[100dvh] bg-background font-sans text-primary select-none overflow-hidden antialiased",
16
+ container: "flex w-full h-full overflow-hidden",
17
+ content: "grow justify-center items-start w-full p-8"
18
+ };
19
+ function Sidebar({ logo, tabs }) {
20
+ return ((0, jsx_runtime_1.jsxs)(core_1.ColumnBox, { style: styles.container, children: [(0, jsx_runtime_1.jsx)(_1.Link, { style: styles.logo, to: "/", children: (0, jsx_runtime_1.jsx)(_2.Image, { src: logo, style: "w-full h-full", width: 100, height: 50, alt: "Logo" }) }), (0, jsx_runtime_1.jsx)(core_1.ColumnBox, { style: styles.nav, children: Object.entries(tabs).map(([section, routes], i) => ((0, jsx_runtime_1.jsxs)(core_1.ColumnBox, { style: "gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-3 tracking-wider font-mono text-xs uppercase font-light text-primary-dark/80", children: section }), (0, jsx_runtime_1.jsx)(core_1.ColumnBox, { style: "gap-1", children: routes.map((opts, i) => ((0, react_1.createElement)(tab_1.Tab, { ...opts, key: i }))) })] }, i))) })] }));
21
+ }
22
+ const styles = {
23
+ container: "items-center gap-12 w-72 h-full px-3 py-6 bg-background-light border-r-2 border-border shadow",
24
+ logo: "w-2/3 h-auto",
25
+ nav: "gap-6 w-full",
26
+ tab: "flex items-center gap-2 w-full border border-transparent rounded px-3 py-2 text-sm uppercase text-primary-dark hover:text-primary duration-200"
27
+ };
28
+ exports.default = exports.DashboardLayout;
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from "react";
2
+ export declare const Header: ({ children }: {
3
+ children: React.ReactNode;
4
+ }) => import("react").JSX.Element;
5
+ /**
6
+ * Application footer component containing copyright and legal links
7
+ *
8
+ * Layout:
9
+ * - Desktop: Horizontal layout with copyright on left, links on right
10
+ * - Mobile: Vertical stacked layout with copyright above links
11
+ *
12
+ * Used in the main layout to provide persistent footer across all pages
13
+ **/
14
+ export declare const Footer: ({ company }: {
15
+ company?: string;
16
+ }) => import("react").JSX.Element;
17
+ /**
18
+ * Problems:
19
+ *
20
+ * 1. Move to `@bouko/next` or `@bouku/core`
21
+ * 2. Wrong link component for external
22
+ **/
23
+ type Props = {
24
+ variant?: "normal" | "locked";
25
+ company?: string;
26
+ header?: ReactNode[];
27
+ fonts: string[];
28
+ Providers?: ({ children }: {
29
+ children: ReactNode;
30
+ }) => React.JSX.Element;
31
+ authed?: boolean;
32
+ children: ReactNode;
33
+ };
34
+ declare const LockedLayout: ({ company, header, fonts, children }: Props) => import("react").JSX.Element;
35
+ export default LockedLayout;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Footer = exports.Header = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const core_1 = require("@bouku/core");
6
+ const _1 = require("../../components/link/_");
7
+ const style_1 = require("@bouko/style");
8
+ const Header = ({ children }) => ((0, jsx_runtime_1.jsx)(core_1.RowBox, { style: "justify-between items-center gap-6 w-full p-5", children: children }));
9
+ exports.Header = Header;
10
+ /**
11
+ * Application footer component containing copyright and legal links
12
+ *
13
+ * Layout:
14
+ * - Desktop: Horizontal layout with copyright on left, links on right
15
+ * - Mobile: Vertical stacked layout with copyright above links
16
+ *
17
+ * Used in the main layout to provide persistent footer across all pages
18
+ **/
19
+ const Footer = ({ company }) => ((0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: (0, style_1.cn)(footerStyles.container, footerStyles.text), children: [(0, jsx_runtime_1.jsxs)("span", { children: ["Copyright \u00A9 2025 ", company] }), (0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: footerStyles.links, children: [(0, jsx_runtime_1.jsx)(_1.Link, { to: "/legal/terms", underline: true, children: "Terms of Service" }), (0, jsx_runtime_1.jsx)(_1.Link, { to: "/legal/privacy", underline: true, children: "Privacy Policy" })] })] }));
20
+ exports.Footer = Footer;
21
+ const footerStyles = {
22
+ container: "max-sm:flex-col justify-between sm:items-center gap-3 sm:gap-6 w-full p-6",
23
+ text: "text-sm text-primary-dark",
24
+ links: "items-center gap-4"
25
+ };
26
+ const LockedLayout = ({ company, header, fonts, children }) => ((0, jsx_runtime_1.jsx)("html", { lang: "en", className: (0, style_1.cn)(...fonts, "scroll-smooth"), children: (0, jsx_runtime_1.jsx)("body", { className: s.page, children: (0, jsx_runtime_1.jsxs)("main", { className: s.container, children: [header && (0, jsx_runtime_1.jsx)(exports.Header, { children: header }), (0, jsx_runtime_1.jsx)("div", { className: s.content, children: children }), (0, jsx_runtime_1.jsx)(exports.Footer, { company: company })] }) }) }));
27
+ const s = {
28
+ page: "h-[100dvh] bg-background font-sans text-primary select-none antialiased overflow-hidden",
29
+ container: "flex flex-col w-full h-full mx-auto max-w-[82rem] overflow-hidden",
30
+ content: "flex grow justify-center items-start w-full p-8overflow-x-hidden overflow-y-auto no-scrollbar"
31
+ };
32
+ exports.default = LockedLayout;
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from "react";
2
+ export declare const Header: ({ children }: {
3
+ children: React.ReactNode;
4
+ }) => import("react").JSX.Element;
5
+ /**
6
+ * Application footer component containing copyright and legal links
7
+ *
8
+ * Layout:
9
+ * - Desktop: Horizontal layout with copyright on left, links on right
10
+ * - Mobile: Vertical stacked layout with copyright above links
11
+ *
12
+ * Used in the main layout to provide persistent footer across all pages
13
+ **/
14
+ export declare const Footer: ({ company }: {
15
+ company?: string;
16
+ }) => import("react").JSX.Element;
17
+ /**
18
+ * Problems:
19
+ *
20
+ * 1. Move to `@bouko/next` or `@bouku/core`
21
+ * 2. Wrong link component for external
22
+ **/
23
+ type Props = {
24
+ variant?: "normal" | "locked";
25
+ company?: string;
26
+ header?: ReactNode[];
27
+ fonts: string[];
28
+ Providers?: ({ children }: {
29
+ children: ReactNode;
30
+ }) => React.JSX.Element;
31
+ authed?: boolean;
32
+ children: ReactNode;
33
+ };
34
+ declare const NormalLayout: ({ company, header, fonts, children }: Props) => import("react").JSX.Element;
35
+ export default NormalLayout;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Footer = exports.Header = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const core_1 = require("@bouku/core");
6
+ const _1 = require("../../components/link/_");
7
+ const style_1 = require("@bouko/style");
8
+ const Header = ({ children }) => ((0, jsx_runtime_1.jsx)(core_1.RowBox, { style: "justify-between items-center gap-6 w-full p-5", children: children }));
9
+ exports.Header = Header;
10
+ /**
11
+ * Application footer component containing copyright and legal links
12
+ *
13
+ * Layout:
14
+ * - Desktop: Horizontal layout with copyright on left, links on right
15
+ * - Mobile: Vertical stacked layout with copyright above links
16
+ *
17
+ * Used in the main layout to provide persistent footer across all pages
18
+ **/
19
+ const Footer = ({ company }) => ((0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: (0, style_1.cn)(footerStyles.container, footerStyles.text), children: [(0, jsx_runtime_1.jsxs)("span", { children: ["Copyright \u00A9 2025 ", company] }), (0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: footerStyles.links, children: [(0, jsx_runtime_1.jsx)(_1.Link, { to: "/legal/terms", underline: true, children: "Terms of Service" }), (0, jsx_runtime_1.jsx)(_1.Link, { to: "/legal/privacy", underline: true, children: "Privacy Policy" })] })] }));
20
+ exports.Footer = Footer;
21
+ const footerStyles = {
22
+ container: "max-sm:flex-col justify-between sm:items-center gap-3 sm:gap-6 w-full p-6",
23
+ text: "text-sm text-primary-dark",
24
+ links: "items-center gap-4"
25
+ };
26
+ const NormalLayout = ({ company, header, fonts, children }) => ((0, jsx_runtime_1.jsx)("html", { lang: "en", className: (0, style_1.cn)(...fonts, "scroll-smooth"), children: (0, jsx_runtime_1.jsx)("body", { className: s.page, children: (0, jsx_runtime_1.jsxs)("main", { className: s.container, children: [(0, jsx_runtime_1.jsx)(exports.Header, { children: header }), (0, jsx_runtime_1.jsx)("div", { className: s.content, children: children }), (0, jsx_runtime_1.jsx)(exports.Footer, { company: company })] }) }) }));
27
+ const s = {
28
+ page: "h-[100dvh] bg-background font-sans text-primary select-none overflow-auto antialiased",
29
+ container: "flex flex-col w-full h-full mx-auto max-w-[82rem]",
30
+ content: "flex grow justify-center items-start w-full p-8"
31
+ };
32
+ exports.default = NormalLayout;
@@ -0,0 +1 @@
1
+ export { default as DashboardTemplate } from "./dashboard";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DashboardTemplate = void 0;
7
+ var dashboard_1 = require("./dashboard");
8
+ Object.defineProperty(exports, "DashboardTemplate", { enumerable: true, get: function () { return __importDefault(dashboard_1).default; } });
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from "react";
2
+ interface Props {
3
+ title: string;
4
+ actions?: ReactNode[];
5
+ children: ReactNode;
6
+ }
7
+ /**
8
+ * Dashboard Page Template.
9
+ *
10
+ * Displays a header with a tile in the top left and row
11
+ * of buttons (global page actions) in the top right.
12
+ * Below is a scroll-constrained content area.
13
+ *
14
+ * @param title - Text displayed as the page heading.
15
+ * @param actions - Global page action buttons displayed in top right.
16
+ * @param children - Main dashboard content.
17
+ **/
18
+ declare const DashboardTemplate: ({ title, actions, children }: Props) => import("react").JSX.Element;
19
+ export default DashboardTemplate;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const core_1 = require("@bouku/core");
5
+ ;
6
+ /**
7
+ * Dashboard Page Template.
8
+ *
9
+ * Displays a header with a tile in the top left and row
10
+ * of buttons (global page actions) in the top right.
11
+ * Below is a scroll-constrained content area.
12
+ *
13
+ * @param title - Text displayed as the page heading.
14
+ * @param actions - Global page action buttons displayed in top right.
15
+ * @param children - Main dashboard content.
16
+ **/
17
+ const DashboardTemplate = ({ title, actions = [], children }) => ((0, jsx_runtime_1.jsxs)(core_1.ColumnBox, { style: s.page, children: [(0, jsx_runtime_1.jsxs)(core_1.RowBox, { style: s.header, children: [(0, jsx_runtime_1.jsx)("span", { className: s.title, children: title }), (0, jsx_runtime_1.jsx)(core_1.RowBox, { style: "gap-2", children: actions })] }), (0, jsx_runtime_1.jsx)(core_1.ColumnBox, { style: s.content, children: children })] }));
18
+ const s = {
19
+ page: "gap-5 w-full h-full overflow-hidden",
20
+ header: "justify-between items-center gap-2",
21
+ title: "text-3xl font-bold",
22
+ content: "gap-6 grow w-full overflow-hidden"
23
+ };
24
+ exports.default = DashboardTemplate;
@@ -0,0 +1 @@
1
+ export { default as DashboardTemplate } from "./dashboard";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DashboardTemplate = void 0;
7
+ var dashboard_1 = require("./dashboard");
8
+ Object.defineProperty(exports, "DashboardTemplate", { enumerable: true, get: function () { return __importDefault(dashboard_1).default; } });
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ declare const DashboardTemplate: ({ title, children }: {
3
+ title: string;
4
+ children: ReactNode;
5
+ }) => import("react").JSX.Element;
6
+ export default DashboardTemplate;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const core_1 = require("@bouku/core");
5
+ const DashboardTemplate = ({ title, children }) => ((0, jsx_runtime_1.jsxs)(core_1.ColumnBox, { style: s.page, children: [(0, jsx_runtime_1.jsx)("span", { className: s.title, children: title }), (0, jsx_runtime_1.jsx)(core_1.ColumnBox, { style: s.content, children: children })] }));
6
+ const s = {
7
+ page: "gap-5 w-full h-full overflow-hidden",
8
+ title: "text-3xl font-bold",
9
+ content: "gap-6 grow w-full overflow-hidden"
10
+ };
11
+ exports.default = DashboardTemplate;
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@bouku/next",
3
+ "version": "0.0.2",
4
+ "main": "./dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
+ "license": "MIT",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "engines": {},
14
+ "scripts": {
15
+ "build": "tsc"
16
+ },
17
+ "peerDependencies": {
18
+ "next": "^15.4.6"
19
+ },
20
+ "dependencies": {
21
+ "@bouko/style": "^0.2.1",
22
+ "@bouku/core": "^0.0.1",
23
+ "tailwind-variants": "^3.2.2"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^24.3.0",
27
+ "@types/react": "^19.1.10",
28
+ "next": "^15.4.6",
29
+ "typescript": "^5.9.2"
30
+ }
31
+ }