@kawaiininja/ui 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,10 @@
1
1
  import React from "react";
2
2
  export interface GlassyStatusRowProps {
3
- data: {
4
- payload: {
5
- role: string;
6
- category: string;
7
- };
8
- status: string;
9
- createdAt: {
10
- $date: string;
11
- };
12
- };
3
+ icon?: React.ElementType;
4
+ label?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ children?: React.ReactNode;
7
+ onClick?: () => void;
8
+ className?: string;
13
9
  }
14
10
  export declare const GlassyStatusRow: React.FC<GlassyStatusRowProps>;
@@ -1,3 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ChevronRight, GitBranch, Link2 } from "lucide-react";
3
- export const GlassyStatusRow = ({ data }) => (_jsxs("div", { className: "flex items-center gap-4 p-4 bg-gradient-to-r from-white/[0.03] to-transparent rounded-2xl border-l-4 border-blue-500 hover:from-white/[0.05] transition-all mb-3 group", children: [_jsx("div", { className: "shrink-0 w-10 h-10 rounded-xl bg-black border border-white/5 flex items-center justify-center text-[#FF8A1F] group-hover:scale-110 transition-transform", children: _jsx(GitBranch, { size: 18 }) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsxs("div", { className: "flex items-center gap-2 mb-0.5", children: [_jsx("h4", { className: "text-xs font-bold text-white uppercase", children: data.payload.role }), _jsx("span", { className: "text-[8px] text-emerald-500 font-black uppercase tracking-widest", children: data.status })] }), _jsxs("div", { className: "flex items-center gap-3 text-[9px] text-gray-600 font-medium", children: [_jsxs("span", { className: "flex items-center gap-1", children: [_jsx(Link2, { size: 10 }), " ", data.payload.category] }), _jsx("span", { className: "w-1 h-1 bg-gray-800 rounded-full" }), _jsx("span", { children: new Date(data.createdAt.$date).toLocaleDateString() })] })] }), _jsx(ChevronRight, { size: 16, className: "text-gray-800 group-hover:text-white transition-colors" })] }));
2
+ import { GitBranch } from "lucide-react";
3
+ export const GlassyStatusRow = ({ icon: Icon = GitBranch, label, description, children, onClick, className = "", }) => {
4
+ return (_jsxs("div", { onClick: onClick, className: `flex items-center gap-4 p-4 bg-gradient-to-r from-white/[0.03] to-transparent rounded-2xl border-l-4 border-blue-500 hover:from-white/[0.05] transition-all mb-3 group ${onClick ? "cursor-pointer" : ""} ${className}`, children: [_jsx("div", { className: "shrink-0 w-10 h-10 rounded-xl bg-black border border-white/5 flex items-center justify-center text-[#FF8A1F] group-hover:scale-110 transition-transform", children: _jsx(Icon, { size: 18 }) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("div", { className: "flex items-center mb-0.5", children: _jsx("div", { className: "text-xs font-bold text-white uppercase", children: label }) }), _jsx("div", { className: "text-[9px] text-gray-600 font-medium", children: description })] }), children] }));
5
+ };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export interface VantaCardProps {
3
+ icon?: React.ElementType;
4
+ label?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ children?: React.ReactNode;
7
+ onClick?: () => void;
8
+ className?: string;
9
+ }
10
+ export declare const VantaCard: React.FC<VantaCardProps>;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { GitBranch } from "lucide-react";
3
+ export const VantaCard = ({ icon: Icon = GitBranch, label, description, children, onClick, className = "", }) => {
4
+ return (_jsxs("div", { onClick: onClick, className: `flex items-center gap-4 p-4 bg-gradient-to-r from-white/[0.03] to-transparent rounded-2xl border-l-4 border-blue-500 hover:from-white/[0.05] transition-all mb-3 group ${onClick ? "cursor-pointer" : ""} ${className}`, children: [_jsx("div", { className: "shrink-0 w-10 h-10 rounded-xl bg-black border border-white/5 flex items-center justify-center text-[#FF8A1F] group-hover:scale-110 transition-transform", children: _jsx(Icon, { size: 18 }) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("div", { className: "flex items-center mb-0.5", children: _jsx("div", { className: "text-xs font-bold text-white uppercase", children: label }) }), _jsx("div", { className: "text-[9px] text-gray-600 font-medium", children: description })] }), children] }));
5
+ };
@@ -1,4 +1,4 @@
1
1
  export * from "./AccentStrip";
2
2
  export * from "./Card";
3
3
  export * from "./GlassyRow";
4
- export * from "./GlassyStatusRow";
4
+ export * from "./VantaCard";
@@ -1,4 +1,4 @@
1
1
  export * from "./AccentStrip";
2
2
  export * from "./Card";
3
3
  export * from "./GlassyRow";
4
- export * from "./GlassyStatusRow";
4
+ export * from "./VantaCard";
@@ -1,6 +1,7 @@
1
1
  export * from "./card";
2
2
  export * from "./label";
3
3
  export * from "./page";
4
+ export * from "./searchbar";
4
5
  export * from "./section";
5
6
  export * from "./settings";
6
7
  export * from "./toggle";
@@ -1,6 +1,7 @@
1
1
  export * from "./card";
2
2
  export * from "./label";
3
3
  export * from "./page";
4
+ export * from "./searchbar";
4
5
  export * from "./section";
5
6
  export * from "./settings";
6
7
  export * from "./toggle";
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export interface StatusBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
3
+ children: React.ReactNode;
4
+ variant?: "success" | "warning" | "error" | "default";
5
+ }
6
+ export declare const StatusBadge: React.FC<StatusBadgeProps>;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+ function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+ export const StatusBadge = ({ children, variant = "success", className, ...props }) => {
8
+ const variants = {
9
+ success: "text-emerald-500",
10
+ warning: "text-amber-500",
11
+ error: "text-red-500",
12
+ default: "text-zinc-500",
13
+ };
14
+ return (_jsx("span", { className: cn("text-[8px] font-black uppercase tracking-widest ml-2", variants[variant], className), ...props, children: children }));
15
+ };
@@ -1 +1,2 @@
1
1
  export * from "./Label";
2
+ export * from "./StatusBadge";
@@ -1 +1,2 @@
1
1
  export * from "./Label";
2
+ export * from "./StatusBadge";
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ export interface FilterOption {
3
+ id: string;
4
+ label: string;
5
+ icon: React.ElementType;
6
+ }
7
+ export interface SortOption {
8
+ id: string;
9
+ label: string;
10
+ icon: React.ElementType;
11
+ }
12
+ export interface NexusSearchProps {
13
+ onSearch?: (query: string) => void;
14
+ onFilterChange?: (filters: string[]) => void;
15
+ onSortChange?: (sort: string) => void;
16
+ className?: string;
17
+ filters?: FilterOption[];
18
+ sortOptions?: SortOption[];
19
+ }
20
+ export declare const NexusSearch: React.FC<NexusSearchProps>;
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowUpDown, Calendar, Check, ChevronRight, Clock, Filter, Hash, Search, Settings2, Shield, SortAsc, X, } from "lucide-react";
3
+ import { useState } from "react";
4
+ export const NexusSearch = ({ onSearch, onFilterChange, onSortChange, className = "", filters = [
5
+ { id: "dev", label: "Development", icon: Hash },
6
+ { id: "adm", label: "Admin", icon: Shield },
7
+ { id: "new", label: "Latest", icon: Calendar },
8
+ ], sortOptions = [
9
+ { id: "newest", label: "Newest First", icon: Clock },
10
+ { id: "alpha", label: "Alphabetical", icon: SortAsc },
11
+ ], }) => {
12
+ const [view, setView] = useState("search");
13
+ const [activeFilters, setActiveFilters] = useState([]);
14
+ const [activeSort, setActiveSort] = useState("newest");
15
+ const toggleFilter = (id) => {
16
+ const newFilters = activeFilters.includes(id)
17
+ ? activeFilters.filter((f) => f !== id)
18
+ : [...activeFilters, id];
19
+ setActiveFilters(newFilters);
20
+ onFilterChange?.(newFilters);
21
+ };
22
+ const handleSortChange = (id) => {
23
+ setActiveSort(id);
24
+ onSortChange?.(id);
25
+ };
26
+ return (_jsxs("div", { className: `relative w-full max-w-md ${className}`, children: [_jsx("div", { className: `transition-all duration-500 ease-[cubic-bezier(0.23,1,0.32,1)] ${view === "search"
27
+ ? "opacity-100 scale-100 translate-y-0"
28
+ : "opacity-0 scale-95 -translate-y-4 pointer-events-none absolute inset-0"}`, children: _jsxs("div", { className: "bg-[#050505] border border-white/5 rounded-2xl p-2 flex items-center gap-2 shadow-2xl", children: [_jsxs("div", { className: "flex-1 flex items-center bg-black border border-white/5 rounded-xl px-4 py-3 group", children: [_jsx(Search, { size: 18, className: "text-blue-500 transition-transform group-focus-within:scale-110" }), _jsx("input", { type: "text", placeholder: "Scan archives...", onChange: (e) => onSearch?.(e.target.value), className: "bg-transparent border-none outline-none text-sm text-white px-4 w-full placeholder:text-gray-700 font-medium" })] }), _jsx("button", { onClick: () => setView("filter"), className: "w-12 h-12 bg-white/5 hover:bg-white/10 rounded-xl flex items-center justify-center text-gray-400 hover:text-[#FF8A1F] transition-all", children: _jsx(Settings2, { size: 20 }) })] }) }), _jsx("div", { className: `transition-all duration-500 ease-[cubic-bezier(0.23,1,0.32,1)] ${view === "filter"
29
+ ? "opacity-100 scale-100 translate-y-0"
30
+ : "opacity-0 scale-95 translate-y-4 pointer-events-none absolute inset-0"}`, children: _jsxs("div", { className: "bg-[#080808] border border-blue-500/20 rounded-[2rem] p-5 shadow-[0_0_50px_rgba(59,130,246,0.1)]", children: [_jsxs("div", { className: "flex items-center justify-between mb-6 px-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "w-2 h-2 rounded-full bg-blue-500 shadow-[0_0_8px_#3b82f6]" }), _jsx("span", { className: "text-[10px] font-black text-white uppercase tracking-[0.3em]", children: "System Parameters" })] }), _jsx("button", { onClick: () => setView("search"), className: "w-8 h-8 rounded-full bg-white/5 flex items-center justify-center text-gray-500 hover:text-white transition-colors", children: _jsx(X, { size: 14 }) })] }), _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex items-center gap-2 mb-3 px-1 text-gray-500", children: [_jsx(ArrowUpDown, { size: 12 }), _jsx("span", { className: "text-[9px] font-bold uppercase tracking-widest", children: "Sort Sequence" })] }), _jsx("div", { className: "grid grid-cols-2 gap-2", children: sortOptions.map((s) => {
31
+ const Icon = s.icon;
32
+ const active = activeSort === s.id;
33
+ return (_jsxs("button", { onClick: () => handleSortChange(s.id), className: `flex items-center gap-3 p-3 rounded-xl border transition-all ${active
34
+ ? "bg-blue-500/10 border-blue-500/40 text-white"
35
+ : "bg-black border-white/5 text-gray-500 hover:border-white/10"}`, children: [_jsx(Icon, { size: 14, className: active ? "text-blue-500" : "text-gray-600" }), _jsx("span", { className: "text-[10px] font-bold uppercase tracking-tight", children: s.label })] }, s.id));
36
+ }) })] }), _jsxs("div", { children: [_jsxs("div", { className: "flex items-center gap-2 mb-3 px-1 text-gray-500", children: [_jsx(Filter, { size: 12 }), _jsx("span", { className: "text-[9px] font-bold uppercase tracking-widest", children: "Filter Domain" })] }), _jsx("div", { className: "grid grid-cols-1 gap-2", children: filters.map((f) => {
37
+ const Icon = f.icon;
38
+ const active = activeFilters.includes(f.id);
39
+ return (_jsxs("button", { onClick: () => toggleFilter(f.id), className: `flex items-center justify-between p-3 rounded-xl border transition-all ${active
40
+ ? "bg-white/[0.03] border-blue-500/40 text-white shadow-[inset_0_0_10px_rgba(59,130,246,0.05)]"
41
+ : "bg-black border-white/5 text-gray-500 hover:border-white/10"}`, children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center ${active ? "bg-blue-500 text-black" : "bg-white/5"}`, children: _jsx(Icon, { size: 14 }) }), _jsx("span", { className: "text-xs font-bold uppercase tracking-tight", children: f.label })] }), active && _jsx(Check, { size: 14, className: "text-blue-500" })] }, f.id));
42
+ }) })] })] }), _jsxs("button", { onClick: () => setView("search"), className: "w-full mt-8 bg-[#FF8A1F] hover:bg-[#e67a1a] text-black font-black py-4 rounded-2xl uppercase text-[10px] tracking-[0.2em] transition-all active:scale-95 flex items-center justify-center gap-2 shadow-[0_10px_20px_rgba(255,138,31,0.2)]", children: ["Apply Changes ", _jsx(ChevronRight, { size: 14 })] })] }) }), _jsx("footer", { className: "mt-12 opacity-20 flex flex-col items-center gap-2", children: _jsxs("div", { className: "flex items-center gap-4 uppercase text-[9px] font-black tracking-[0.4em]", children: [_jsx("span", { className: view === "search" ? "text-white" : "text-gray-500", children: "Search" }), _jsx("div", { className: "w-12 h-[2px] bg-white/10 relative overflow-hidden rounded-full", children: _jsx("div", { className: `absolute inset-0 bg-blue-500 transition-all duration-500 ${view === "search" ? "-translate-x-full" : "translate-x-0"}` }) }), _jsx("span", { className: view === "filter" ? "text-white" : "text-gray-500", children: "Settings" })] }) })] }));
43
+ };
@@ -0,0 +1 @@
1
+ export * from "./NexusSearch";
@@ -0,0 +1 @@
1
+ export * from "./NexusSearch";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kawaiininja/ui",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A modern React component library with 45+ premium components for building beautiful web applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",