bmj-ui 1.0.2 → 1.0.4
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.js +75 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/components/ThemeToggle.tsx +1 -1
- package/src/components/bmj-ui/AppSidebar.tsx +1 -1
- package/src/components/bmj-ui/ChartCard.tsx +3 -3
- package/src/components/bmj-ui/DashboardLayout.tsx +3 -3
- package/src/components/bmj-ui/StatCard.tsx +3 -3
- package/src/components/bmj-ui/Topbar.tsx +5 -5
- package/src/components/bmj-ui/index.ts +5 -5
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/dialog.tsx +2 -2
- package/src/components/ui/dropdown-menu.tsx +1 -3
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/scroll-area.tsx +1 -1
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +2 -2
- package/src/components/ui/sidebar.tsx +8 -8
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/table.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/index.ts +5 -5
- package/tsconfig.json +2 -1
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bmj-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Headless component library meticulously crafted for rapid dashboard development. Professional, polished, and ready for production.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.mjs",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
|
+
"type": "module",
|
|
10
11
|
"scripts": {
|
|
11
12
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
13
|
"rollup": "rollup -c --bundleConfigAsCjs"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Moon, Sun } from "lucide-react";
|
|
3
|
-
import { Button } from "./ui/button";
|
|
3
|
+
import { Button } from "./ui/button.tsx";
|
|
4
4
|
|
|
5
5
|
export function ThemeToggle({ className }: { className?: string }) {
|
|
6
6
|
const [theme, setTheme] = React.useState<"light" | "dark">(() => {
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
CardHeader,
|
|
5
5
|
CardTitle,
|
|
6
6
|
CardDescription,
|
|
7
|
-
} from "../ui/card";
|
|
8
|
-
import { Skeleton } from "../ui/skeleton";
|
|
7
|
+
} from "../ui/card.js";
|
|
8
|
+
import { Skeleton } from "../ui/skeleton.tsx";
|
|
9
9
|
import {
|
|
10
10
|
ResponsiveContainer,
|
|
11
11
|
AreaChart,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
Tooltip,
|
|
22
22
|
CartesianGrid,
|
|
23
23
|
} from "recharts";
|
|
24
|
-
import { cn } from "../../lib/utils";
|
|
24
|
+
import { cn } from "../../lib/utils.tsx";
|
|
25
25
|
|
|
26
26
|
interface ChartCardProps {
|
|
27
27
|
title: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { SidebarProvider, SidebarInset } from "../ui/sidebar";
|
|
3
|
-
import { AppSidebar, SidebarItem } from "./AppSidebar";
|
|
4
|
-
import { Topbar } from "./Topbar";
|
|
2
|
+
import { SidebarProvider, SidebarInset } from "../ui/sidebar.tsx";
|
|
3
|
+
import { AppSidebar, SidebarItem } from "./AppSidebar.tsx";
|
|
4
|
+
import { Topbar } from "./Topbar.tsx";
|
|
5
5
|
|
|
6
6
|
interface DashboardLayoutProps {
|
|
7
7
|
children: React.ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";
|
|
2
|
-
import { Skeleton } from "../ui/skeleton";
|
|
1
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../ui/card.tsx";
|
|
2
|
+
import { Skeleton } from "../ui/skeleton.tsx";
|
|
3
3
|
import { TrendingUp, TrendingDown, LucideIcon } from "lucide-react";
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.tsx";
|
|
5
5
|
import { motion } from "motion/react";
|
|
6
6
|
|
|
7
7
|
interface StatCardProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SidebarTrigger } from "../ui/sidebar";
|
|
2
|
-
import { ThemeToggle } from "../ThemeToggle";
|
|
1
|
+
import { SidebarTrigger } from "../ui/sidebar.tsx";
|
|
2
|
+
import { ThemeToggle } from "../ThemeToggle.tsx";
|
|
3
3
|
import {
|
|
4
4
|
Search,
|
|
5
5
|
Bell,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
Zap,
|
|
10
10
|
LogOut,
|
|
11
11
|
} from "lucide-react";
|
|
12
|
-
import { Input } from "../ui/input";
|
|
13
|
-
import { Button } from "../ui/button";
|
|
12
|
+
import { Input } from "../ui/input.tsx";
|
|
13
|
+
import { Button } from "../ui/button.tsx";
|
|
14
14
|
import { toast } from "sonner";
|
|
15
15
|
import {
|
|
16
16
|
DropdownMenu,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
DropdownMenuLabel,
|
|
21
21
|
DropdownMenuSeparator,
|
|
22
22
|
DropdownMenuTrigger,
|
|
23
|
-
} from "../ui/dropdown-menu";
|
|
23
|
+
} from "../ui/dropdown-menu.tsx";
|
|
24
24
|
|
|
25
25
|
export function Topbar() {
|
|
26
26
|
const handleItemClick = (label: string) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./DashboardLayout";
|
|
2
|
-
export * from "./StatCard";
|
|
3
|
-
export * from "./ChartCard";
|
|
4
|
-
export * from "./AppSidebar";
|
|
5
|
-
export * from "./Topbar";
|
|
1
|
+
export * from "./DashboardLayout.tsx";
|
|
2
|
+
export * from "./StatCard.tsx";
|
|
3
|
+
export * from "./ChartCard.tsx";
|
|
4
|
+
export * from "./AppSidebar.tsx";
|
|
5
|
+
export * from "./Topbar.tsx";
|
|
@@ -2,7 +2,7 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.tsx";
|
|
6
6
|
|
|
7
7
|
const badgeVariants = cva(
|
|
8
8
|
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
2
2
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.tsx";
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva(
|
|
7
7
|
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
5
5
|
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
7
|
-
import { Button } from "./button";
|
|
6
|
+
import { cn } from "../../lib/utils.tsx";
|
|
7
|
+
import { Button } from "./button.tsx";
|
|
8
8
|
import { XIcon } from "lucide-react";
|
|
9
9
|
|
|
10
10
|
function Dialog({ ...props }: DialogPrimitive.Root.Props) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
5
3
|
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.tsx";
|
|
7
5
|
import { ChevronRightIcon, CheckIcon } from "lucide-react";
|
|
8
6
|
|
|
9
7
|
function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.tsx";
|
|
5
5
|
|
|
6
6
|
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
7
7
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.tsx";
|
|
5
5
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
6
6
|
|
|
7
7
|
const Select = SelectPrimitive.Root;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
3
3
|
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
import { Button } from "./button";
|
|
4
|
+
import { cn } from "../../lib/utils.tsx";
|
|
5
|
+
import { Button } from "./button.tsx";
|
|
6
6
|
import { XIcon } from "lucide-react";
|
|
7
7
|
|
|
8
8
|
function Sheet({ ...props }: SheetPrimitive.Root.Props) {
|
|
@@ -5,20 +5,20 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
7
7
|
|
|
8
|
-
import { useIsMobile } from "../../hooks/use-mobile";
|
|
9
|
-
import { cn } from "../../lib/utils";
|
|
10
|
-
import { Button } from "./button";
|
|
11
|
-
import { Input } from "./input";
|
|
12
|
-
import { Separator } from "./separator";
|
|
8
|
+
import { useIsMobile } from "../../hooks/use-mobile.tsx";
|
|
9
|
+
import { cn } from "../../lib/utils.tsx";
|
|
10
|
+
import { Button } from "./button.tsx";
|
|
11
|
+
import { Input } from "./input.tsx";
|
|
12
|
+
import { Separator } from "./separator.tsx";
|
|
13
13
|
import {
|
|
14
14
|
Sheet,
|
|
15
15
|
SheetContent,
|
|
16
16
|
SheetDescription,
|
|
17
17
|
SheetHeader,
|
|
18
18
|
SheetTitle,
|
|
19
|
-
} from "./sheet";
|
|
20
|
-
import { Skeleton } from "./skeleton";
|
|
21
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip";
|
|
19
|
+
} from "./sheet.tsx";
|
|
20
|
+
import { Skeleton } from "./skeleton.tsx";
|
|
21
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.tsx";
|
|
22
22
|
import { PanelLeftIcon } from "lucide-react";
|
|
23
23
|
|
|
24
24
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AppSidebar } from "./components/bmj-ui/AppSidebar";
|
|
2
|
-
import { ChartCard } from "./components/bmj-ui/ChartCard";
|
|
3
|
-
import { DashboardLayout } from "./components/bmj-ui/DashboardLayout";
|
|
4
|
-
import { StatCard } from "./components/bmj-ui/StatCard";
|
|
5
|
-
import { Topbar } from "./components/bmj-ui/Topbar";
|
|
1
|
+
import { AppSidebar } from "./components/bmj-ui/AppSidebar.tsx";
|
|
2
|
+
import { ChartCard } from "./components/bmj-ui/ChartCard.tsx";
|
|
3
|
+
import { DashboardLayout } from "./components/bmj-ui/DashboardLayout.tsx";
|
|
4
|
+
import { StatCard } from "./components/bmj-ui/StatCard.tsx";
|
|
5
|
+
import { Topbar } from "./components/bmj-ui/Topbar.tsx";
|
|
6
6
|
|
|
7
7
|
export { AppSidebar, ChartCard, DashboardLayout, StatCard, Topbar };
|