@runic-rpc/ui 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +42 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
- package/src/styles/global.css +1 -1
- package/tailwind.preset.js +3 -3
- package/LICENSE +0 -21
package/dist/index.d.mts
CHANGED
|
@@ -6,8 +6,10 @@ interface AppShellProps {
|
|
|
6
6
|
topbar?: React.ReactNode;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
className?: string;
|
|
9
|
+
mobileMenuOpen?: boolean;
|
|
10
|
+
onMobileMenuToggle?: () => void;
|
|
9
11
|
}
|
|
10
|
-
declare function AppShell({ sidebar, topbar, children, className }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare function AppShell({ sidebar, topbar, children, className, mobileMenuOpen, onMobileMenuToggle }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
11
13
|
|
|
12
14
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
13
15
|
variant?: 'primary' | 'secondary';
|
|
@@ -44,8 +46,9 @@ interface SidebarProps {
|
|
|
44
46
|
children: React.ReactNode;
|
|
45
47
|
footer?: React.ReactNode;
|
|
46
48
|
className?: string;
|
|
49
|
+
mobileOpen?: boolean;
|
|
47
50
|
}
|
|
48
|
-
declare function Sidebar({ logo, children, footer, className }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
51
|
+
declare function Sidebar({ logo, children, footer, className, mobileOpen }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
49
52
|
interface SidebarItemProps {
|
|
50
53
|
icon?: React.ReactNode;
|
|
51
54
|
label: string;
|
|
@@ -59,8 +62,9 @@ interface TopbarProps {
|
|
|
59
62
|
leftContent?: React.ReactNode;
|
|
60
63
|
rightContent?: React.ReactNode;
|
|
61
64
|
className?: string;
|
|
65
|
+
mobileMenuButton?: React.ReactNode;
|
|
62
66
|
}
|
|
63
|
-
declare function Topbar({ leftContent, rightContent, className }: TopbarProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare function Topbar({ leftContent, rightContent, className, mobileMenuButton }: TopbarProps): react_jsx_runtime.JSX.Element;
|
|
64
68
|
|
|
65
69
|
/**
|
|
66
70
|
* Lightweight class name merger (like clsx but simpler)
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,10 @@ interface AppShellProps {
|
|
|
6
6
|
topbar?: React.ReactNode;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
className?: string;
|
|
9
|
+
mobileMenuOpen?: boolean;
|
|
10
|
+
onMobileMenuToggle?: () => void;
|
|
9
11
|
}
|
|
10
|
-
declare function AppShell({ sidebar, topbar, children, className }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare function AppShell({ sidebar, topbar, children, className, mobileMenuOpen, onMobileMenuToggle }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
11
13
|
|
|
12
14
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
13
15
|
variant?: 'primary' | 'secondary';
|
|
@@ -44,8 +46,9 @@ interface SidebarProps {
|
|
|
44
46
|
children: React.ReactNode;
|
|
45
47
|
footer?: React.ReactNode;
|
|
46
48
|
className?: string;
|
|
49
|
+
mobileOpen?: boolean;
|
|
47
50
|
}
|
|
48
|
-
declare function Sidebar({ logo, children, footer, className }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
51
|
+
declare function Sidebar({ logo, children, footer, className, mobileOpen }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
49
52
|
interface SidebarItemProps {
|
|
50
53
|
icon?: React.ReactNode;
|
|
51
54
|
label: string;
|
|
@@ -59,8 +62,9 @@ interface TopbarProps {
|
|
|
59
62
|
leftContent?: React.ReactNode;
|
|
60
63
|
rightContent?: React.ReactNode;
|
|
61
64
|
className?: string;
|
|
65
|
+
mobileMenuButton?: React.ReactNode;
|
|
62
66
|
}
|
|
63
|
-
declare function Topbar({ leftContent, rightContent, className }: TopbarProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare function Topbar({ leftContent, rightContent, className, mobileMenuButton }: TopbarProps): react_jsx_runtime.JSX.Element;
|
|
64
68
|
|
|
65
69
|
/**
|
|
66
70
|
* Lightweight class name merger (like clsx but simpler)
|
package/dist/index.js
CHANGED
|
@@ -51,12 +51,19 @@ function cn(...inputs) {
|
|
|
51
51
|
|
|
52
52
|
// src/components/AppShell.tsx
|
|
53
53
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
54
|
-
function AppShell({ sidebar, topbar, children, className }) {
|
|
54
|
+
function AppShell({ sidebar, topbar, children, className, mobileMenuOpen, onMobileMenuToggle }) {
|
|
55
55
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cn("flex h-screen bg-dark-bg", className), children: [
|
|
56
|
+
mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: "fixed inset-0 bg-black/50 z-30 md:hidden",
|
|
60
|
+
onClick: onMobileMenuToggle
|
|
61
|
+
}
|
|
62
|
+
),
|
|
56
63
|
sidebar,
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 flex flex-col overflow-hidden md:ml-64", children: [
|
|
58
65
|
topbar,
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", { className: "flex-1 overflow-y-auto", children })
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", { className: "flex-1 overflow-y-auto p-3 sm:p-4 md:p-6", children })
|
|
60
67
|
] })
|
|
61
68
|
] });
|
|
62
69
|
}
|
|
@@ -157,7 +164,7 @@ function EmptyState({ icon, title, description, action, className }) {
|
|
|
157
164
|
className
|
|
158
165
|
),
|
|
159
166
|
style: {
|
|
160
|
-
background: "linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(
|
|
167
|
+
background: "linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 107, 102, 0.05) 100%)"
|
|
161
168
|
},
|
|
162
169
|
children: [
|
|
163
170
|
icon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-20 h-20 flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -166,8 +173,8 @@ function EmptyState({ icon, title, description, action, className }) {
|
|
|
166
173
|
className: "w-full h-full flex items-center justify-center",
|
|
167
174
|
style: {
|
|
168
175
|
clipPath: "polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)",
|
|
169
|
-
border: "2px solid #
|
|
170
|
-
boxShadow: "0 0 20px rgba(
|
|
176
|
+
border: "2px solid #FF3C35",
|
|
177
|
+
boxShadow: "0 0 20px rgba(255, 60, 53, 0.3)"
|
|
171
178
|
},
|
|
172
179
|
children: icon
|
|
173
180
|
}
|
|
@@ -210,13 +217,15 @@ IconButton.displayName = "IconButton";
|
|
|
210
217
|
|
|
211
218
|
// src/components/Sidebar.tsx
|
|
212
219
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
213
|
-
function Sidebar({ logo, children, footer, className }) {
|
|
220
|
+
function Sidebar({ logo, children, footer, className, mobileOpen }) {
|
|
214
221
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
215
222
|
"aside",
|
|
216
223
|
{
|
|
217
224
|
className: cn(
|
|
218
|
-
"w-64 h-screen bg-dark-surface border-r border-border-dark",
|
|
219
|
-
"flex flex-col",
|
|
225
|
+
"fixed top-0 left-0 w-64 h-screen bg-dark-surface border-r border-border-dark",
|
|
226
|
+
"flex flex-col z-40 transition-transform duration-300 ease-in-out",
|
|
227
|
+
// Hide sidebar on mobile by default, show when mobileOpen is true
|
|
228
|
+
mobileOpen ? "translate-x-0" : "-translate-x-full md:translate-x-0",
|
|
220
229
|
className
|
|
221
230
|
),
|
|
222
231
|
children: [
|
|
@@ -228,40 +237,43 @@ function Sidebar({ logo, children, footer, className }) {
|
|
|
228
237
|
);
|
|
229
238
|
}
|
|
230
239
|
function SidebarItem({ icon, label, active, href, onClick }) {
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
className: cn(
|
|
238
|
-
"w-full h-10 px-4 flex items-center gap-3 rounded-lg",
|
|
239
|
-
"text-sm font-medium transition-all duration-200",
|
|
240
|
-
active ? "bg-dark-elevated text-text-primary border-l-2 border-cyan-primary" : "text-text-secondary hover:bg-dark-elevated hover:text-text-primary",
|
|
241
|
-
"focus:outline-none focus:ring-2 focus:ring-cyan-primary"
|
|
242
|
-
),
|
|
243
|
-
children: [
|
|
244
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "w-5 h-5 flex-shrink-0", children: icon }),
|
|
245
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: label })
|
|
246
|
-
]
|
|
247
|
-
}
|
|
240
|
+
const baseClassName = cn(
|
|
241
|
+
"w-full h-10 px-4 flex items-center gap-3 rounded-lg",
|
|
242
|
+
"text-sm font-medium transition-all duration-200",
|
|
243
|
+
active ? "bg-dark-elevated text-text-primary border-l-2 border-cyan-primary" : "text-text-secondary hover:bg-dark-elevated hover:text-text-primary",
|
|
244
|
+
"focus:outline-none focus:ring-2 focus:ring-cyan-primary",
|
|
245
|
+
"cursor-pointer"
|
|
248
246
|
);
|
|
247
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
248
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "w-5 h-5 flex-shrink-0", children: icon }),
|
|
249
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: label })
|
|
250
|
+
] });
|
|
251
|
+
if (href) {
|
|
252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { href, className: baseClassName, children: content });
|
|
253
|
+
}
|
|
254
|
+
if (onClick) {
|
|
255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { onClick, className: baseClassName, children: content });
|
|
256
|
+
}
|
|
257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: baseClassName, children: content });
|
|
249
258
|
}
|
|
250
259
|
|
|
251
260
|
// src/components/Topbar.tsx
|
|
252
261
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
253
|
-
function Topbar({ leftContent, rightContent, className }) {
|
|
262
|
+
function Topbar({ leftContent, rightContent, className, mobileMenuButton }) {
|
|
254
263
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
255
264
|
"header",
|
|
256
265
|
{
|
|
257
266
|
className: cn(
|
|
258
267
|
"h-16 border-b border-border-dark bg-dark-bg",
|
|
259
|
-
"flex items-center justify-between px-6",
|
|
268
|
+
"flex items-center justify-between px-3 sm:px-4 md:px-6",
|
|
260
269
|
className
|
|
261
270
|
),
|
|
262
271
|
children: [
|
|
263
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
264
|
-
|
|
272
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-3 sm:gap-4", children: [
|
|
273
|
+
mobileMenuButton && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "md:hidden", children: mobileMenuButton }),
|
|
274
|
+
leftContent
|
|
275
|
+
] }),
|
|
276
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center gap-2 sm:gap-3", children: rightContent })
|
|
265
277
|
]
|
|
266
278
|
}
|
|
267
279
|
);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/lib/utils.ts","../src/components/AppShell.tsx","../src/components/Button.tsx","../src/components/DropdownMenu.tsx","../src/components/EmptyState.tsx","../src/components/IconButton.tsx","../src/components/Sidebar.tsx","../src/components/Topbar.tsx"],"sourcesContent":["export { AppShell } from './components/AppShell';\nexport type { AppShellProps } from './components/AppShell';\n\nexport { Button } from './components/Button';\nexport type { ButtonProps } from './components/Button';\n\nexport { DropdownMenu, DropdownMenuItem } from './components/DropdownMenu';\nexport type { DropdownMenuProps, DropdownMenuItemProps } from './components/DropdownMenu';\n\nexport { EmptyState } from './components/EmptyState';\nexport type { EmptyStateProps } from './components/EmptyState';\n\nexport { IconButton } from './components/IconButton';\nexport type { IconButtonProps } from './components/IconButton';\n\nexport { Sidebar, SidebarItem } from './components/Sidebar';\nexport type { SidebarProps, SidebarItemProps } from './components/Sidebar';\n\nexport { Topbar } from './components/Topbar';\nexport type { TopbarProps } from './components/Topbar';\n\nexport { cn } from './lib/utils';\n","/**\n * Lightweight class name merger (like clsx but simpler)\n */\nexport function cn(...inputs: (string | undefined | null | false)[]): string {\n return inputs.filter(Boolean).join(' ');\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface AppShellProps {\n sidebar: React.ReactNode;\n topbar?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n}\n\nexport function AppShell({ sidebar, topbar, children, className }: AppShellProps) {\n return (\n <div className={cn('flex h-screen bg-dark-bg', className)}>\n {sidebar}\n <div className=\"flex-1 flex flex-col overflow-hidden\">\n {topbar}\n <main className=\"flex-1 overflow-y-auto\">{children}</main>\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'primary' | 'secondary';\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = 'primary', ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'px-6 py-3 text-sm font-medium rounded-lg transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary focus:ring-offset-2 focus:ring-offset-dark-bg',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variant === 'primary' &&\n 'bg-dark-elevated border border-border-light text-text-primary hover:border-cyan-primary',\n variant === 'secondary' &&\n 'bg-transparent border border-border-dark text-text-secondary hover:bg-dark-elevated',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nButton.displayName = 'Button';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface DropdownMenuProps {\n trigger: React.ReactNode;\n children: React.ReactNode;\n align?: 'left' | 'right';\n}\n\nexport function DropdownMenu({ trigger, children, align = 'right' }: DropdownMenuProps) {\n const [open, setOpen] = React.useState(false);\n const dropdownRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n\n if (open) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [open]);\n\n return (\n <div className=\"relative\" ref={dropdownRef}>\n <div onClick={() => setOpen(!open)}>{trigger}</div>\n {open && (\n <div\n className={cn(\n 'absolute top-full mt-2 w-56 z-50',\n 'bg-dark-surface border border-border-dark rounded-xl shadow-lg p-2',\n align === 'right' ? 'right-0' : 'left-0'\n )}\n style={{ boxShadow: '0 10px 40px rgba(0, 0, 0, 0.5)' }}\n >\n {children}\n </div>\n )}\n </div>\n );\n}\n\nexport interface DropdownMenuItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n icon?: React.ReactNode;\n}\n\nexport const DropdownMenuItem = React.forwardRef<HTMLButtonElement, DropdownMenuItemProps>(\n ({ className, icon, children, ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'w-full h-10 px-3 flex items-center gap-3',\n 'text-sm font-medium text-text-secondary',\n 'hover:bg-dark-elevated hover:text-text-primary',\n 'rounded-lg transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary',\n className\n )}\n {...props}\n >\n {icon && <span className=\"w-5 h-5 flex-shrink-0\">{icon}</span>}\n <span>{children}</span>\n </button>\n );\n }\n);\n\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface EmptyStateProps {\n icon?: React.ReactNode;\n title: string;\n description?: string;\n action?: React.ReactNode;\n className?: string;\n}\n\nexport function EmptyState({ icon, title, description, action, className }: EmptyStateProps) {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center p-12 rounded-xl',\n 'glassmorphism border-2 border-cyan-primary/20',\n className\n )}\n style={{\n background:\n 'linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(77, 232, 255, 0.05) 100%)',\n }}\n >\n {icon && (\n <div className=\"w-20 h-20 flex items-center justify-center mb-4\">\n <div\n className=\"w-full h-full flex items-center justify-center\"\n style={{\n clipPath: 'polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)',\n border: '2px solid #00D9FF',\n boxShadow: '0 0 20px rgba(0, 217, 255, 0.3)',\n }}\n >\n {icon}\n </div>\n </div>\n )}\n <h3 className=\"text-xl font-semibold text-text-primary mb-2\">{title}</h3>\n {description && <p className=\"text-sm text-text-secondary text-center mb-6\">{description}</p>}\n {action}\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'circle' | 'rounded';\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ className, variant = 'circle', ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'w-10 h-10 flex items-center justify-center',\n 'bg-dark-elevated border border-border-dark',\n 'text-text-secondary hover:text-text-primary',\n 'hover:bg-dark-elevated hover:border-cyan-primary',\n 'transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary focus:ring-offset-2 focus:ring-offset-dark-bg',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variant === 'circle' && 'rounded-full',\n variant === 'rounded' && 'rounded-lg',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nIconButton.displayName = 'IconButton';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface SidebarProps {\n logo?: React.ReactNode;\n children: React.ReactNode;\n footer?: React.ReactNode;\n className?: string;\n}\n\nexport function Sidebar({ logo, children, footer, className }: SidebarProps) {\n return (\n <aside\n className={cn(\n 'w-64 h-screen bg-dark-surface border-r border-border-dark',\n 'flex flex-col',\n className\n )}\n >\n {logo && <div className=\"p-6 border-b border-border-dark\">{logo}</div>}\n <nav className=\"flex-1 overflow-y-auto p-4\">{children}</nav>\n {footer && <div className=\"p-4 border-t border-border-dark\">{footer}</div>}\n </aside>\n );\n}\n\nexport interface SidebarItemProps {\n icon?: React.ReactNode;\n label: string;\n active?: boolean;\n href?: string;\n onClick?: () => void;\n}\n\nexport function SidebarItem({ icon, label, active, href, onClick }: SidebarItemProps) {\n const Component = href ? 'a' : 'button';\n\n return (\n <Component\n href={href}\n onClick={onClick}\n className={cn(\n 'w-full h-10 px-4 flex items-center gap-3 rounded-lg',\n 'text-sm font-medium transition-all duration-200',\n active\n ? 'bg-dark-elevated text-text-primary border-l-2 border-cyan-primary'\n : 'text-text-secondary hover:bg-dark-elevated hover:text-text-primary',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary'\n )}\n >\n {icon && <span className=\"w-5 h-5 flex-shrink-0\">{icon}</span>}\n <span>{label}</span>\n </Component>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface TopbarProps {\n leftContent?: React.ReactNode;\n rightContent?: React.ReactNode;\n className?: string;\n}\n\nexport function Topbar({ leftContent, rightContent, className }: TopbarProps) {\n return (\n <header\n className={cn(\n 'h-16 border-b border-border-dark bg-dark-bg',\n 'flex items-center justify-between px-6',\n className\n )}\n >\n <div className=\"flex items-center gap-4\">{leftContent}</div>\n <div className=\"flex items-center gap-3\">{rightContent}</div>\n </header>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,SAAS,MAAM,QAAuD;AAC3E,SAAO,OAAO,OAAO,OAAO,EAAE,KAAK,GAAG;AACxC;;;ACSM;AAJC,SAAS,SAAS,EAAE,SAAS,QAAQ,UAAU,UAAU,GAAkB;AAChF,SACE,6CAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,GACrD;AAAA;AAAA,IACD,6CAAC,SAAI,WAAU,wCACZ;AAAA;AAAA,MACD,4CAAC,UAAK,WAAU,0BAA0B,UAAS;AAAA,OACrD;AAAA,KACF;AAEJ;;;ACpBA,YAAuB;AAUjB,IAAAA,sBAAA;AAHC,IAAM,SAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,WAAW,GAAG,MAAM,GAAG,QAAQ;AACrD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA,YAAY,aACV;AAAA,UACF,YAAY,eACV;AAAA,UACF;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;;;AC5BrB,IAAAC,SAAuB;AA8BnB,IAAAC,sBAAA;AArBG,SAAS,aAAa,EAAE,SAAS,UAAU,QAAQ,QAAQ,GAAsB;AACtF,QAAM,CAAC,MAAM,OAAO,IAAU,gBAAS,KAAK;AAC5C,QAAM,cAAoB,cAAuB,IAAI;AAErD,EAAM,iBAAU,MAA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AAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,SACI,sEACA;AAAA,QACJ;AAAA,MACF;AAAA,MAEC;AAAA,gBAAQ,6CAAC,UAAK,WAAU,yBAAyB,gBAAK;AAAA,QACvD,6CAAC,UAAM,iBAAM;AAAA;AAAA;AAAA,EACf;AAEJ;;;AC3CI,IAAAC,sBAAA;AAFG,SAAS,OAAO,EAAE,aAAa,cAAc,UAAU,GAAgB;AAC5E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,qDAAC,SAAI,WAAU,2BAA2B,uBAAY;AAAA,QACtD,6CAAC,SAAI,WAAU,2BAA2B,wBAAa;AAAA;AAAA;AAAA,EACzD;AAEJ;","names":["import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/lib/utils.ts","../src/components/AppShell.tsx","../src/components/Button.tsx","../src/components/DropdownMenu.tsx","../src/components/EmptyState.tsx","../src/components/IconButton.tsx","../src/components/Sidebar.tsx","../src/components/Topbar.tsx"],"sourcesContent":["export { AppShell } from './components/AppShell';\nexport type { AppShellProps } from './components/AppShell';\n\nexport { Button } from './components/Button';\nexport type { ButtonProps } from './components/Button';\n\nexport { DropdownMenu, DropdownMenuItem } from './components/DropdownMenu';\nexport type { DropdownMenuProps, DropdownMenuItemProps } from './components/DropdownMenu';\n\nexport { EmptyState } from './components/EmptyState';\nexport type { EmptyStateProps } from './components/EmptyState';\n\nexport { IconButton } from './components/IconButton';\nexport type { IconButtonProps } from './components/IconButton';\n\nexport { Sidebar, SidebarItem } from './components/Sidebar';\nexport type { SidebarProps, SidebarItemProps } from './components/Sidebar';\n\nexport { Topbar } from './components/Topbar';\nexport type { TopbarProps } from './components/Topbar';\n\nexport { cn } from './lib/utils';\n","/**\n * Lightweight class name merger (like clsx but simpler)\n */\nexport function cn(...inputs: (string | undefined | null | false)[]): string {\n return inputs.filter(Boolean).join(' ');\n}\n","'use client';\n\nimport * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface AppShellProps {\n sidebar: React.ReactNode;\n topbar?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n mobileMenuOpen?: boolean;\n onMobileMenuToggle?: () => void;\n}\n\nexport function AppShell({ sidebar, topbar, children, className, mobileMenuOpen, onMobileMenuToggle }: AppShellProps) {\n return (\n <div className={cn('flex h-screen bg-dark-bg', className)}>\n {/* Mobile overlay */}\n {mobileMenuOpen && (\n <div\n className=\"fixed inset-0 bg-black/50 z-30 md:hidden\"\n onClick={onMobileMenuToggle}\n />\n )}\n\n {sidebar}\n\n <div className=\"flex-1 flex flex-col overflow-hidden md:ml-64\">\n {topbar}\n <main className=\"flex-1 overflow-y-auto p-3 sm:p-4 md:p-6\">{children}</main>\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'primary' | 'secondary';\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = 'primary', ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'px-6 py-3 text-sm font-medium rounded-lg transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary focus:ring-offset-2 focus:ring-offset-dark-bg',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variant === 'primary' &&\n 'bg-dark-elevated border border-border-light text-text-primary hover:border-cyan-primary',\n variant === 'secondary' &&\n 'bg-transparent border border-border-dark text-text-secondary hover:bg-dark-elevated',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nButton.displayName = 'Button';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface DropdownMenuProps {\n trigger: React.ReactNode;\n children: React.ReactNode;\n align?: 'left' | 'right';\n}\n\nexport function DropdownMenu({ trigger, children, align = 'right' }: DropdownMenuProps) {\n const [open, setOpen] = React.useState(false);\n const dropdownRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n\n if (open) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [open]);\n\n return (\n <div className=\"relative\" ref={dropdownRef}>\n <div onClick={() => setOpen(!open)}>{trigger}</div>\n {open && (\n <div\n className={cn(\n 'absolute top-full mt-2 w-56 z-50',\n 'bg-dark-surface border border-border-dark rounded-xl shadow-lg p-2',\n align === 'right' ? 'right-0' : 'left-0'\n )}\n style={{ boxShadow: '0 10px 40px rgba(0, 0, 0, 0.5)' }}\n >\n {children}\n </div>\n )}\n </div>\n );\n}\n\nexport interface DropdownMenuItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n icon?: React.ReactNode;\n}\n\nexport const DropdownMenuItem = React.forwardRef<HTMLButtonElement, DropdownMenuItemProps>(\n ({ className, icon, children, ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'w-full h-10 px-3 flex items-center gap-3',\n 'text-sm font-medium text-text-secondary',\n 'hover:bg-dark-elevated hover:text-text-primary',\n 'rounded-lg transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary',\n className\n )}\n {...props}\n >\n {icon && <span className=\"w-5 h-5 flex-shrink-0\">{icon}</span>}\n <span>{children}</span>\n </button>\n );\n }\n);\n\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface EmptyStateProps {\n icon?: React.ReactNode;\n title: string;\n description?: string;\n action?: React.ReactNode;\n className?: string;\n}\n\nexport function EmptyState({ icon, title, description, action, className }: EmptyStateProps) {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center p-12 rounded-xl',\n 'glassmorphism border-2 border-cyan-primary/20',\n className\n )}\n style={{\n background:\n 'linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 107, 102, 0.05) 100%)',\n }}\n >\n {icon && (\n <div className=\"w-20 h-20 flex items-center justify-center mb-4\">\n <div\n className=\"w-full h-full flex items-center justify-center\"\n style={{\n clipPath: 'polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)',\n border: '2px solid #FF3C35',\n boxShadow: '0 0 20px rgba(255, 60, 53, 0.3)',\n }}\n >\n {icon}\n </div>\n </div>\n )}\n <h3 className=\"text-xl font-semibold text-text-primary mb-2\">{title}</h3>\n {description && <p className=\"text-sm text-text-secondary text-center mb-6\">{description}</p>}\n {action}\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'circle' | 'rounded';\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ className, variant = 'circle', ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'w-10 h-10 flex items-center justify-center',\n 'bg-dark-elevated border border-border-dark',\n 'text-text-secondary hover:text-text-primary',\n 'hover:bg-dark-elevated hover:border-cyan-primary',\n 'transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary focus:ring-offset-2 focus:ring-offset-dark-bg',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variant === 'circle' && 'rounded-full',\n variant === 'rounded' && 'rounded-lg',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nIconButton.displayName = 'IconButton';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface SidebarProps {\n logo?: React.ReactNode;\n children: React.ReactNode;\n footer?: React.ReactNode;\n className?: string;\n mobileOpen?: boolean;\n}\n\nexport function Sidebar({ logo, children, footer, className, mobileOpen }: SidebarProps) {\n return (\n <aside\n className={cn(\n 'fixed top-0 left-0 w-64 h-screen bg-dark-surface border-r border-border-dark',\n 'flex flex-col z-40 transition-transform duration-300 ease-in-out',\n // Hide sidebar on mobile by default, show when mobileOpen is true\n mobileOpen ? 'translate-x-0' : '-translate-x-full md:translate-x-0',\n className\n )}\n >\n {logo && <div className=\"p-6 border-b border-border-dark\">{logo}</div>}\n <nav className=\"flex-1 overflow-y-auto p-4\">{children}</nav>\n {footer && <div className=\"p-4 border-t border-border-dark\">{footer}</div>}\n </aside>\n );\n}\n\nexport interface SidebarItemProps {\n icon?: React.ReactNode;\n label: string;\n active?: boolean;\n href?: string;\n onClick?: () => void;\n}\n\nexport function SidebarItem({ icon, label, active, href, onClick }: SidebarItemProps) {\n const baseClassName = cn(\n 'w-full h-10 px-4 flex items-center gap-3 rounded-lg',\n 'text-sm font-medium transition-all duration-200',\n active\n ? 'bg-dark-elevated text-text-primary border-l-2 border-cyan-primary'\n : 'text-text-secondary hover:bg-dark-elevated hover:text-text-primary',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary',\n 'cursor-pointer'\n );\n\n const content = (\n <>\n {icon && <span className=\"w-5 h-5 flex-shrink-0\">{icon}</span>}\n <span>{label}</span>\n </>\n );\n\n // If href is provided, render as anchor (for standalone use)\n if (href) {\n return (\n <a href={href} className={baseClassName}>\n {content}\n </a>\n );\n }\n\n // If onClick is provided, render as button\n if (onClick) {\n return (\n <button onClick={onClick} className={baseClassName}>\n {content}\n </button>\n );\n }\n\n // Default: render as div (for use with Next.js Link wrapper)\n return (\n <div className={baseClassName}>\n {content}\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface TopbarProps {\n leftContent?: React.ReactNode;\n rightContent?: React.ReactNode;\n className?: string;\n mobileMenuButton?: React.ReactNode;\n}\n\nexport function Topbar({ leftContent, rightContent, className, mobileMenuButton }: TopbarProps) {\n return (\n <header\n className={cn(\n 'h-16 border-b border-border-dark bg-dark-bg',\n 'flex items-center justify-between px-3 sm:px-4 md:px-6',\n className\n )}\n >\n <div className=\"flex items-center gap-3 sm:gap-4\">\n {mobileMenuButton && (\n <div className=\"md:hidden\">{mobileMenuButton}</div>\n )}\n {leftContent}\n </div>\n <div className=\"flex items-center gap-2 sm:gap-3\">{rightContent}</div>\n </header>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,SAAS,MAAM,QAAuD;AAC3E,SAAO,OAAO,OAAO,OAAO,EAAE,KAAK,GAAG;AACxC;;;ACcQ;AALD,SAAS,SAAS,EAAE,SAAS,QAAQ,UAAU,WAAW,gBAAgB,mBAAmB,GAAkB;AACpH,SACE,6CAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,GAErD;AAAA,sBACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,SAAS;AAAA;AAAA,IACX;AAAA,IAGD;AAAA,IAED,6CAAC,SAAI,WAAU,iDACZ;AAAA;AAAA,MACD,4CAAC,UAAK,WAAU,4CAA4C,UAAS;AAAA,OACvE;AAAA,KACF;AAEJ;;;ACjCA,YAAuB;AAUjB,IAAAA,sBAAA;AAHC,IAAM,SAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,WAAW,GAAG,MAAM,GAAG,QAAQ;AACrD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA,YAAY,aACV;AAAA,UACF,YAAY,eACV;AAAA,UACF;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;;;AC5BrB,IAAAC,SAAuB;AA8BnB,IAAAC,sBAAA;AArBG,SAAS,aAAa,EAAE,SAAS,UAAU,QAAQ,Q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mCAAmC,kBAAO;AAAA;AAAA;AAAA,EACtE;AAEJ;AAUO,SAAS,YAAY,EAAE,MAAM,OAAO,QAAQ,MAAM,QAAQ,GAAqB;AACpF,QAAM,gBAAgB;AAAA,IACpB;AAAA,IACA;AAAA,IACA,SACI,sEACA;AAAA,IACJ;AAAA,IACA;AAAA,EACF;AAEA,QAAM,UACJ,8EACG;AAAA,YAAQ,6CAAC,UAAK,WAAU,yBAAyB,gBAAK;AAAA,IACvD,6CAAC,UAAM,iBAAM;AAAA,KACf;AAIF,MAAI,MAAM;AACR,WACE,6CAAC,OAAE,MAAY,WAAW,eACvB,mBACH;AAAA,EAEJ;AAGA,MAAI,SAAS;AACX,WACE,6CAAC,YAAO,SAAkB,WAAW,eAClC,mBACH;AAAA,EAEJ;AAGA,SACE,6CAAC,SAAI,WAAW,eACb,mBACH;AAEJ;;;AC5DM,IAAAC,sBAAA;AATC,SAAS,OAAO,EAAE,aAAa,cAAc,WAAW,iBAAiB,GAAgB;AAC9F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,sDAAC,SAAI,WAAU,oCACZ;AAAA,8BACC,6CAAC,SAAI,WAAU,aAAa,4BAAiB;AAAA,UAE9C;AAAA,WACH;AAAA,QACA,6CAAC,SAAI,WAAU,oCAAoC,wBAAa;AAAA;AAAA;AAAA,EAClE;AAEJ;","names":["import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
|
package/dist/index.mjs
CHANGED
|
@@ -7,12 +7,19 @@ function cn(...inputs) {
|
|
|
7
7
|
|
|
8
8
|
// src/components/AppShell.tsx
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
function AppShell({ sidebar, topbar, children, className }) {
|
|
10
|
+
function AppShell({ sidebar, topbar, children, className, mobileMenuOpen, onMobileMenuToggle }) {
|
|
11
11
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex h-screen bg-dark-bg", className), children: [
|
|
12
|
+
mobileMenuOpen && /* @__PURE__ */ jsx(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
className: "fixed inset-0 bg-black/50 z-30 md:hidden",
|
|
16
|
+
onClick: onMobileMenuToggle
|
|
17
|
+
}
|
|
18
|
+
),
|
|
12
19
|
sidebar,
|
|
13
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-hidden md:ml-64", children: [
|
|
14
21
|
topbar,
|
|
15
|
-
/* @__PURE__ */ jsx("main", { className: "flex-1 overflow-y-auto", children })
|
|
22
|
+
/* @__PURE__ */ jsx("main", { className: "flex-1 overflow-y-auto p-3 sm:p-4 md:p-6", children })
|
|
16
23
|
] })
|
|
17
24
|
] });
|
|
18
25
|
}
|
|
@@ -113,7 +120,7 @@ function EmptyState({ icon, title, description, action, className }) {
|
|
|
113
120
|
className
|
|
114
121
|
),
|
|
115
122
|
style: {
|
|
116
|
-
background: "linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(
|
|
123
|
+
background: "linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 107, 102, 0.05) 100%)"
|
|
117
124
|
},
|
|
118
125
|
children: [
|
|
119
126
|
icon && /* @__PURE__ */ jsx4("div", { className: "w-20 h-20 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx4(
|
|
@@ -122,8 +129,8 @@ function EmptyState({ icon, title, description, action, className }) {
|
|
|
122
129
|
className: "w-full h-full flex items-center justify-center",
|
|
123
130
|
style: {
|
|
124
131
|
clipPath: "polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)",
|
|
125
|
-
border: "2px solid #
|
|
126
|
-
boxShadow: "0 0 20px rgba(
|
|
132
|
+
border: "2px solid #FF3C35",
|
|
133
|
+
boxShadow: "0 0 20px rgba(255, 60, 53, 0.3)"
|
|
127
134
|
},
|
|
128
135
|
children: icon
|
|
129
136
|
}
|
|
@@ -165,14 +172,16 @@ var IconButton = React3.forwardRef(
|
|
|
165
172
|
IconButton.displayName = "IconButton";
|
|
166
173
|
|
|
167
174
|
// src/components/Sidebar.tsx
|
|
168
|
-
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
169
|
-
function Sidebar({ logo, children, footer, className }) {
|
|
175
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
176
|
+
function Sidebar({ logo, children, footer, className, mobileOpen }) {
|
|
170
177
|
return /* @__PURE__ */ jsxs4(
|
|
171
178
|
"aside",
|
|
172
179
|
{
|
|
173
180
|
className: cn(
|
|
174
|
-
"w-64 h-screen bg-dark-surface border-r border-border-dark",
|
|
175
|
-
"flex flex-col",
|
|
181
|
+
"fixed top-0 left-0 w-64 h-screen bg-dark-surface border-r border-border-dark",
|
|
182
|
+
"flex flex-col z-40 transition-transform duration-300 ease-in-out",
|
|
183
|
+
// Hide sidebar on mobile by default, show when mobileOpen is true
|
|
184
|
+
mobileOpen ? "translate-x-0" : "-translate-x-full md:translate-x-0",
|
|
176
185
|
className
|
|
177
186
|
),
|
|
178
187
|
children: [
|
|
@@ -184,40 +193,43 @@ function Sidebar({ logo, children, footer, className }) {
|
|
|
184
193
|
);
|
|
185
194
|
}
|
|
186
195
|
function SidebarItem({ icon, label, active, href, onClick }) {
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
className: cn(
|
|
194
|
-
"w-full h-10 px-4 flex items-center gap-3 rounded-lg",
|
|
195
|
-
"text-sm font-medium transition-all duration-200",
|
|
196
|
-
active ? "bg-dark-elevated text-text-primary border-l-2 border-cyan-primary" : "text-text-secondary hover:bg-dark-elevated hover:text-text-primary",
|
|
197
|
-
"focus:outline-none focus:ring-2 focus:ring-cyan-primary"
|
|
198
|
-
),
|
|
199
|
-
children: [
|
|
200
|
-
icon && /* @__PURE__ */ jsx6("span", { className: "w-5 h-5 flex-shrink-0", children: icon }),
|
|
201
|
-
/* @__PURE__ */ jsx6("span", { children: label })
|
|
202
|
-
]
|
|
203
|
-
}
|
|
196
|
+
const baseClassName = cn(
|
|
197
|
+
"w-full h-10 px-4 flex items-center gap-3 rounded-lg",
|
|
198
|
+
"text-sm font-medium transition-all duration-200",
|
|
199
|
+
active ? "bg-dark-elevated text-text-primary border-l-2 border-cyan-primary" : "text-text-secondary hover:bg-dark-elevated hover:text-text-primary",
|
|
200
|
+
"focus:outline-none focus:ring-2 focus:ring-cyan-primary",
|
|
201
|
+
"cursor-pointer"
|
|
204
202
|
);
|
|
203
|
+
const content = /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
204
|
+
icon && /* @__PURE__ */ jsx6("span", { className: "w-5 h-5 flex-shrink-0", children: icon }),
|
|
205
|
+
/* @__PURE__ */ jsx6("span", { children: label })
|
|
206
|
+
] });
|
|
207
|
+
if (href) {
|
|
208
|
+
return /* @__PURE__ */ jsx6("a", { href, className: baseClassName, children: content });
|
|
209
|
+
}
|
|
210
|
+
if (onClick) {
|
|
211
|
+
return /* @__PURE__ */ jsx6("button", { onClick, className: baseClassName, children: content });
|
|
212
|
+
}
|
|
213
|
+
return /* @__PURE__ */ jsx6("div", { className: baseClassName, children: content });
|
|
205
214
|
}
|
|
206
215
|
|
|
207
216
|
// src/components/Topbar.tsx
|
|
208
217
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
209
|
-
function Topbar({ leftContent, rightContent, className }) {
|
|
218
|
+
function Topbar({ leftContent, rightContent, className, mobileMenuButton }) {
|
|
210
219
|
return /* @__PURE__ */ jsxs5(
|
|
211
220
|
"header",
|
|
212
221
|
{
|
|
213
222
|
className: cn(
|
|
214
223
|
"h-16 border-b border-border-dark bg-dark-bg",
|
|
215
|
-
"flex items-center justify-between px-6",
|
|
224
|
+
"flex items-center justify-between px-3 sm:px-4 md:px-6",
|
|
216
225
|
className
|
|
217
226
|
),
|
|
218
227
|
children: [
|
|
219
|
-
/* @__PURE__ */
|
|
220
|
-
|
|
228
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-3 sm:gap-4", children: [
|
|
229
|
+
mobileMenuButton && /* @__PURE__ */ jsx7("div", { className: "md:hidden", children: mobileMenuButton }),
|
|
230
|
+
leftContent
|
|
231
|
+
] }),
|
|
232
|
+
/* @__PURE__ */ jsx7("div", { className: "flex items-center gap-2 sm:gap-3", children: rightContent })
|
|
221
233
|
]
|
|
222
234
|
}
|
|
223
235
|
);
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/utils.ts","../src/components/AppShell.tsx","../src/components/Button.tsx","../src/components/DropdownMenu.tsx","../src/components/EmptyState.tsx","../src/components/IconButton.tsx","../src/components/Sidebar.tsx","../src/components/Topbar.tsx"],"sourcesContent":["/**\n * Lightweight class name merger (like clsx but simpler)\n */\nexport function cn(...inputs: (string | undefined | null | false)[]): string {\n return inputs.filter(Boolean).join(' ');\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface AppShellProps {\n sidebar: React.ReactNode;\n topbar?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n}\n\nexport function AppShell({ sidebar, topbar, children, className }: AppShellProps) {\n return (\n <div className={cn('flex h-screen bg-dark-bg', className)}>\n {sidebar}\n <div className=\"flex-1 flex flex-col overflow-hidden\">\n {topbar}\n <main className=\"flex-1 overflow-y-auto\">{children}</main>\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'primary' | 'secondary';\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = 'primary', ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'px-6 py-3 text-sm font-medium rounded-lg transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary focus:ring-offset-2 focus:ring-offset-dark-bg',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variant === 'primary' &&\n 'bg-dark-elevated border border-border-light text-text-primary hover:border-cyan-primary',\n variant === 'secondary' &&\n 'bg-transparent border border-border-dark text-text-secondary hover:bg-dark-elevated',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nButton.displayName = 'Button';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface DropdownMenuProps {\n trigger: React.ReactNode;\n children: React.ReactNode;\n align?: 'left' | 'right';\n}\n\nexport function DropdownMenu({ trigger, children, align = 'right' }: DropdownMenuProps) {\n const [open, setOpen] = React.useState(false);\n const dropdownRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n\n if (open) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [open]);\n\n return (\n <div className=\"relative\" ref={dropdownRef}>\n <div onClick={() => setOpen(!open)}>{trigger}</div>\n {open && (\n <div\n className={cn(\n 'absolute top-full mt-2 w-56 z-50',\n 'bg-dark-surface border border-border-dark rounded-xl shadow-lg p-2',\n align === 'right' ? 'right-0' : 'left-0'\n )}\n style={{ boxShadow: '0 10px 40px rgba(0, 0, 0, 0.5)' }}\n >\n {children}\n </div>\n )}\n </div>\n );\n}\n\nexport interface DropdownMenuItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n icon?: React.ReactNode;\n}\n\nexport const DropdownMenuItem = React.forwardRef<HTMLButtonElement, DropdownMenuItemProps>(\n ({ className, icon, children, ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'w-full h-10 px-3 flex items-center gap-3',\n 'text-sm font-medium text-text-secondary',\n 'hover:bg-dark-elevated hover:text-text-primary',\n 'rounded-lg transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary',\n className\n )}\n {...props}\n >\n {icon && <span className=\"w-5 h-5 flex-shrink-0\">{icon}</span>}\n <span>{children}</span>\n </button>\n );\n }\n);\n\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface EmptyStateProps {\n icon?: React.ReactNode;\n title: string;\n description?: string;\n action?: React.ReactNode;\n className?: string;\n}\n\nexport function EmptyState({ icon, title, description, action, className }: EmptyStateProps) {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center p-12 rounded-xl',\n 'glassmorphism border-2 border-cyan-primary/20',\n className\n )}\n style={{\n background:\n 'linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(77, 232, 255, 0.05) 100%)',\n }}\n >\n {icon && (\n <div className=\"w-20 h-20 flex items-center justify-center mb-4\">\n <div\n className=\"w-full h-full flex items-center justify-center\"\n style={{\n clipPath: 'polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)',\n border: '2px solid #00D9FF',\n boxShadow: '0 0 20px rgba(0, 217, 255, 0.3)',\n }}\n >\n {icon}\n </div>\n </div>\n )}\n <h3 className=\"text-xl font-semibold text-text-primary mb-2\">{title}</h3>\n {description && <p className=\"text-sm text-text-secondary text-center mb-6\">{description}</p>}\n {action}\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'circle' | 'rounded';\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ className, variant = 'circle', ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'w-10 h-10 flex items-center justify-center',\n 'bg-dark-elevated border border-border-dark',\n 'text-text-secondary hover:text-text-primary',\n 'hover:bg-dark-elevated hover:border-cyan-primary',\n 'transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary focus:ring-offset-2 focus:ring-offset-dark-bg',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variant === 'circle' && 'rounded-full',\n variant === 'rounded' && 'rounded-lg',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nIconButton.displayName = 'IconButton';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface SidebarProps {\n logo?: React.ReactNode;\n children: React.ReactNode;\n footer?: React.ReactNode;\n className?: string;\n}\n\nexport function Sidebar({ logo, children, footer, className }: SidebarProps) {\n return (\n <aside\n className={cn(\n 'w-64 h-screen bg-dark-surface border-r border-border-dark',\n 'flex flex-col',\n className\n )}\n >\n {logo && <div className=\"p-6 border-b border-border-dark\">{logo}</div>}\n <nav className=\"flex-1 overflow-y-auto p-4\">{children}</nav>\n {footer && <div className=\"p-4 border-t border-border-dark\">{footer}</div>}\n </aside>\n );\n}\n\nexport interface SidebarItemProps {\n icon?: React.ReactNode;\n label: string;\n active?: boolean;\n href?: string;\n onClick?: () => void;\n}\n\nexport function SidebarItem({ icon, label, active, href, onClick }: SidebarItemProps) {\n const Component = href ? 'a' : 'button';\n\n return (\n <Component\n href={href}\n onClick={onClick}\n className={cn(\n 'w-full h-10 px-4 flex items-center gap-3 rounded-lg',\n 'text-sm font-medium transition-all duration-200',\n active\n ? 'bg-dark-elevated text-text-primary border-l-2 border-cyan-primary'\n : 'text-text-secondary hover:bg-dark-elevated hover:text-text-primary',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary'\n )}\n >\n {icon && <span className=\"w-5 h-5 flex-shrink-0\">{icon}</span>}\n <span>{label}</span>\n </Component>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface TopbarProps {\n leftContent?: React.ReactNode;\n rightContent?: React.ReactNode;\n className?: string;\n}\n\nexport function Topbar({ leftContent, rightContent, className }: TopbarProps) {\n return (\n <header\n className={cn(\n 'h-16 border-b border-border-dark bg-dark-bg',\n 'flex items-center justify-between px-6',\n className\n )}\n >\n <div className=\"flex items-center gap-4\">{leftContent}</div>\n <div className=\"flex items-center gap-3\">{rightContent}</div>\n </header>\n );\n}\n"],"mappings":";;;AAGO,SAAS,MAAM,QAAuD;AAC3E,SAAO,OAAO,OAAO,OAAO,EAAE,KAAK,GAAG;AACxC;;;ACSM,SAEE,KAFF;AAJC,SAAS,SAAS,EAAE,SAAS,QAAQ,UAAU,UAAU,GAAkB;AAChF,SACE,qBAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,GACrD;AAAA;AAAA,IACD,qBAAC,SAAI,WAAU,wCACZ;AAAA;AAAA,MACD,oBAAC,UAAK,WAAU,0BAA0B,UAAS;AAAA,OACrD;AAAA,KACF;AAEJ;;;ACpBA,YAAY,WAAW;AAUjB,gBAAAA,YAAA;AAHC,IAAM,SAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,WAAW,GAAG,MAAM,GAAG,QAAQ;AACrD,WACE,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA,YAAY,aACV;AAAA,UACF,YAAY,eACV;AAAA,UACF;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;;;AC5BrB,YAAYC,YAAW;AA8BnB,SACE,OAAAC,MADF,QAAAC,aAAA;AArBG,SAAS,aAAa,EAAE,SAAS,UAAU,QAAQ,QAAQ,GAAsB;AACtF,QAAM,CAAC,MAAM,OAAO,IAAU,gBAAS,KAAK;AAC5C,QAAM,cAAoB,cAAuB,IAAI;AAErD,EAAM,iBAAU,MAAM;AACpB,UAAM,qBAAqB,CAAC,UAAsB;AAChD,UAAI,YAAY,WAAW,CAAC,YAAY,QAAQ,SAAS,MAAM,MAAc,GAAG;AAC9E,gBAAQ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M,YAAY,OAAO,MAAM;AAE/B,SACE,gBAAAC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,SACI,sEACA;AAAA,QACJ;AAAA,MACF;AAAA,MAEC;AAAA,gBAAQ,gBAAAD,KAAC,UAAK,WAAU,yBAAyB,gBAAK;AAAA,QACvD,gBAAAA,KAAC,UAAM,iBAAM;AAAA;AAAA;AAAA,EACf;AAEJ;;;AC3CI,SAOE,OAAAE,MAPF,QAAAC,aAAA;AAFG,SAAS,OAAO,EAAE,aAAa,cAAc,UAAU,GAAgB;AAC5E,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,wBAAAD,KAAC,SAAI,WAAU,2BAA2B,uBAAY;AAAA,QACtD,gBAAAA,KAAC,SAAI,WAAU,2BAA2B,wBAAa;AAAA;AAAA;AAAA,EACzD;AAEJ;","names":["jsx","React","jsx","jsxs","jsx","jsxs","React","jsx","jsx","jsxs","jsx","jsxs"]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/AppShell.tsx","../src/components/Button.tsx","../src/components/DropdownMenu.tsx","../src/components/EmptyState.tsx","../src/components/IconButton.tsx","../src/components/Sidebar.tsx","../src/components/Topbar.tsx"],"sourcesContent":["/**\n * Lightweight class name merger (like clsx but simpler)\n */\nexport function cn(...inputs: (string | undefined | null | false)[]): string {\n return inputs.filter(Boolean).join(' ');\n}\n","'use client';\n\nimport * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface AppShellProps {\n sidebar: React.ReactNode;\n topbar?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n mobileMenuOpen?: boolean;\n onMobileMenuToggle?: () => void;\n}\n\nexport function AppShell({ sidebar, topbar, children, className, mobileMenuOpen, onMobileMenuToggle }: AppShellProps) {\n return (\n <div className={cn('flex h-screen bg-dark-bg', className)}>\n {/* Mobile overlay */}\n {mobileMenuOpen && (\n <div\n className=\"fixed inset-0 bg-black/50 z-30 md:hidden\"\n onClick={onMobileMenuToggle}\n />\n )}\n\n {sidebar}\n\n <div className=\"flex-1 flex flex-col overflow-hidden md:ml-64\">\n {topbar}\n <main className=\"flex-1 overflow-y-auto p-3 sm:p-4 md:p-6\">{children}</main>\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'primary' | 'secondary';\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = 'primary', ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'px-6 py-3 text-sm font-medium rounded-lg transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary focus:ring-offset-2 focus:ring-offset-dark-bg',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variant === 'primary' &&\n 'bg-dark-elevated border border-border-light text-text-primary hover:border-cyan-primary',\n variant === 'secondary' &&\n 'bg-transparent border border-border-dark text-text-secondary hover:bg-dark-elevated',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nButton.displayName = 'Button';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface DropdownMenuProps {\n trigger: React.ReactNode;\n children: React.ReactNode;\n align?: 'left' | 'right';\n}\n\nexport function DropdownMenu({ trigger, children, align = 'right' }: DropdownMenuProps) {\n const [open, setOpen] = React.useState(false);\n const dropdownRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n\n if (open) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [open]);\n\n return (\n <div className=\"relative\" ref={dropdownRef}>\n <div onClick={() => setOpen(!open)}>{trigger}</div>\n {open && (\n <div\n className={cn(\n 'absolute top-full mt-2 w-56 z-50',\n 'bg-dark-surface border border-border-dark rounded-xl shadow-lg p-2',\n align === 'right' ? 'right-0' : 'left-0'\n )}\n style={{ boxShadow: '0 10px 40px rgba(0, 0, 0, 0.5)' }}\n >\n {children}\n </div>\n )}\n </div>\n );\n}\n\nexport interface DropdownMenuItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n icon?: React.ReactNode;\n}\n\nexport const DropdownMenuItem = React.forwardRef<HTMLButtonElement, DropdownMenuItemProps>(\n ({ className, icon, children, ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'w-full h-10 px-3 flex items-center gap-3',\n 'text-sm font-medium text-text-secondary',\n 'hover:bg-dark-elevated hover:text-text-primary',\n 'rounded-lg transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary',\n className\n )}\n {...props}\n >\n {icon && <span className=\"w-5 h-5 flex-shrink-0\">{icon}</span>}\n <span>{children}</span>\n </button>\n );\n }\n);\n\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface EmptyStateProps {\n icon?: React.ReactNode;\n title: string;\n description?: string;\n action?: React.ReactNode;\n className?: string;\n}\n\nexport function EmptyState({ icon, title, description, action, className }: EmptyStateProps) {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center p-12 rounded-xl',\n 'glassmorphism border-2 border-cyan-primary/20',\n className\n )}\n style={{\n background:\n 'linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 107, 102, 0.05) 100%)',\n }}\n >\n {icon && (\n <div className=\"w-20 h-20 flex items-center justify-center mb-4\">\n <div\n className=\"w-full h-full flex items-center justify-center\"\n style={{\n clipPath: 'polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)',\n border: '2px solid #FF3C35',\n boxShadow: '0 0 20px rgba(255, 60, 53, 0.3)',\n }}\n >\n {icon}\n </div>\n </div>\n )}\n <h3 className=\"text-xl font-semibold text-text-primary mb-2\">{title}</h3>\n {description && <p className=\"text-sm text-text-secondary text-center mb-6\">{description}</p>}\n {action}\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'circle' | 'rounded';\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ className, variant = 'circle', ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'w-10 h-10 flex items-center justify-center',\n 'bg-dark-elevated border border-border-dark',\n 'text-text-secondary hover:text-text-primary',\n 'hover:bg-dark-elevated hover:border-cyan-primary',\n 'transition-all duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary focus:ring-offset-2 focus:ring-offset-dark-bg',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variant === 'circle' && 'rounded-full',\n variant === 'rounded' && 'rounded-lg',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nIconButton.displayName = 'IconButton';\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface SidebarProps {\n logo?: React.ReactNode;\n children: React.ReactNode;\n footer?: React.ReactNode;\n className?: string;\n mobileOpen?: boolean;\n}\n\nexport function Sidebar({ logo, children, footer, className, mobileOpen }: SidebarProps) {\n return (\n <aside\n className={cn(\n 'fixed top-0 left-0 w-64 h-screen bg-dark-surface border-r border-border-dark',\n 'flex flex-col z-40 transition-transform duration-300 ease-in-out',\n // Hide sidebar on mobile by default, show when mobileOpen is true\n mobileOpen ? 'translate-x-0' : '-translate-x-full md:translate-x-0',\n className\n )}\n >\n {logo && <div className=\"p-6 border-b border-border-dark\">{logo}</div>}\n <nav className=\"flex-1 overflow-y-auto p-4\">{children}</nav>\n {footer && <div className=\"p-4 border-t border-border-dark\">{footer}</div>}\n </aside>\n );\n}\n\nexport interface SidebarItemProps {\n icon?: React.ReactNode;\n label: string;\n active?: boolean;\n href?: string;\n onClick?: () => void;\n}\n\nexport function SidebarItem({ icon, label, active, href, onClick }: SidebarItemProps) {\n const baseClassName = cn(\n 'w-full h-10 px-4 flex items-center gap-3 rounded-lg',\n 'text-sm font-medium transition-all duration-200',\n active\n ? 'bg-dark-elevated text-text-primary border-l-2 border-cyan-primary'\n : 'text-text-secondary hover:bg-dark-elevated hover:text-text-primary',\n 'focus:outline-none focus:ring-2 focus:ring-cyan-primary',\n 'cursor-pointer'\n );\n\n const content = (\n <>\n {icon && <span className=\"w-5 h-5 flex-shrink-0\">{icon}</span>}\n <span>{label}</span>\n </>\n );\n\n // If href is provided, render as anchor (for standalone use)\n if (href) {\n return (\n <a href={href} className={baseClassName}>\n {content}\n </a>\n );\n }\n\n // If onClick is provided, render as button\n if (onClick) {\n return (\n <button onClick={onClick} className={baseClassName}>\n {content}\n </button>\n );\n }\n\n // Default: render as div (for use with Next.js Link wrapper)\n return (\n <div className={baseClassName}>\n {content}\n </div>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface TopbarProps {\n leftContent?: React.ReactNode;\n rightContent?: React.ReactNode;\n className?: string;\n mobileMenuButton?: React.ReactNode;\n}\n\nexport function Topbar({ leftContent, rightContent, className, mobileMenuButton }: TopbarProps) {\n return (\n <header\n className={cn(\n 'h-16 border-b border-border-dark bg-dark-bg',\n 'flex items-center justify-between px-3 sm:px-4 md:px-6',\n className\n )}\n >\n <div className=\"flex items-center gap-3 sm:gap-4\">\n {mobileMenuButton && (\n <div className=\"md:hidden\">{mobileMenuButton}</div>\n )}\n {leftContent}\n </div>\n <div className=\"flex items-center gap-2 sm:gap-3\">{rightContent}</div>\n </header>\n );\n}\n"],"mappings":";;;AAGO,SAAS,MAAM,QAAuD;AAC3E,SAAO,OAAO,OAAO,OAAO,EAAE,KAAK,GAAG;AACxC;;;ACcQ,cAQF,YARE;AALD,SAAS,SAAS,EAAE,SAAS,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BAAyB,gBAAK;AAAA,IACvD,gBAAAA,KAAC,UAAM,iBAAM;AAAA,KACf;AAIF,MAAI,MAAM;AACR,WACE,gBAAAA,KAAC,OAAE,MAAY,WAAW,eACvB,mBACH;AAAA,EAEJ;AAGA,MAAI,SAAS;AACX,WACE,gBAAAA,KAAC,YAAO,SAAkB,WAAW,eAClC,mBACH;AAAA,EAEJ;AAGA,SACE,gBAAAA,KAAC,SAAI,WAAW,eACb,mBACH;AAEJ;;;AC5DM,SAEI,OAAAE,MAFJ,QAAAC,aAAA;AATC,SAAS,OAAO,EAAE,aAAa,cAAc,WAAW,iBAAiB,GAAgB;AAC9F,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,wBAAAA,MAAC,SAAI,WAAU,oCACZ;AAAA,8BACC,gBAAAD,KAAC,SAAI,WAAU,aAAa,4BAAiB;AAAA,UAE9C;AAAA,WACH;AAAA,QACA,gBAAAA,KAAC,SAAI,WAAU,oCAAoC,wBAAa;AAAA;AAAA;AAAA,EAClE;AAEJ;","names":["jsx","React","jsx","jsxs","jsx","jsxs","React","jsx","jsx","jsxs","jsx","jsxs"]}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runic-rpc/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Shared UI components and design system for RunicRPC",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
10
11
|
"import": "./dist/index.mjs",
|
|
11
|
-
"require": "./dist/index.js"
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"./styles": "./src/styles/global.css",
|
|
15
15
|
"./tailwind-preset": "./tailwind.preset.js"
|
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
"src/styles",
|
|
20
20
|
"tailwind.preset.js"
|
|
21
21
|
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup",
|
|
24
|
+
"dev": "tsup --watch",
|
|
25
|
+
"lint": "eslint src",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"clean": "rm -rf dist"
|
|
28
|
+
},
|
|
22
29
|
"repository": {
|
|
23
30
|
"type": "git",
|
|
24
31
|
"url": "https://github.com/RunicRPC/runic-rpc.git",
|
|
@@ -52,12 +59,5 @@
|
|
|
52
59
|
"react-dom": "^19.0.0",
|
|
53
60
|
"tsup": "^8.0.1",
|
|
54
61
|
"typescript": "^5.3.3"
|
|
55
|
-
},
|
|
56
|
-
"scripts": {
|
|
57
|
-
"build": "tsup",
|
|
58
|
-
"dev": "tsup --watch",
|
|
59
|
-
"lint": "eslint src",
|
|
60
|
-
"typecheck": "tsc --noEmit",
|
|
61
|
-
"clean": "rm -rf dist"
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
}
|
package/src/styles/global.css
CHANGED
package/tailwind.preset.js
CHANGED
|
@@ -9,9 +9,9 @@ module.exports = {
|
|
|
9
9
|
elevated: '#242424',
|
|
10
10
|
},
|
|
11
11
|
cyan: {
|
|
12
|
-
primary: '#
|
|
13
|
-
light: '#
|
|
14
|
-
glow: 'rgba(
|
|
12
|
+
primary: '#FF3C35',
|
|
13
|
+
light: '#FF6B66',
|
|
14
|
+
glow: 'rgba(255, 60, 53, 0.15)',
|
|
15
15
|
},
|
|
16
16
|
text: {
|
|
17
17
|
primary: '#FFFFFF',
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 RunicRPC Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|