diff --git a/Dockerfile b/Dockerfile index a4da5e7..86014c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM node:22-alpine AS builder RUN apk add --no-cache git RUN corepack enable pnpm WORKDIR /app -COPY package.json ./ -RUN pnpm install +COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ +RUN pnpm install --frozen-lockfile COPY . . RUN pnpm build diff --git a/package.json b/package.json index b8792b0..2ca7b9d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@kleffio/sdk": "github:kleffio/plugin-sdk-js#v0.1.0", - "@kleffio/ui": "github:kleffio/ui#v0.1.0", + "@kleffio/ui": "github:kleffio/ui#v0.1.5", "@types/react": "^19.0.0", "lucide-react": "^0.577.0", "next": "^15.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ed8227..1fad797 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: github:kleffio/plugin-sdk-js#v0.1.0 version: https://codeload.github.com/kleffio/plugin-sdk-js/tar.gz/53dc62a3aa928ade5315f7105de72c455d617417(react@19.2.4) '@kleffio/ui': - specifier: github:kleffio/ui#v0.1.0 - version: https://codeload.github.com/kleffio/ui/tar.gz/ac5ab3ffe82630bafe7f8965f1510bbb9d629b01(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + specifier: github:kleffio/ui#v0.1.5 + version: https://codeload.github.com/kleffio/ui/tar.gz/d97d2e4dc24c24b30aedef8b8b8be3635b7dc5fb(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@types/react': specifier: ^19.0.0 version: 19.2.14 @@ -412,8 +412,8 @@ packages: peerDependencies: react: ^18.0.0 || ^19.0.0 - '@kleffio/ui@https://codeload.github.com/kleffio/ui/tar.gz/ac5ab3ffe82630bafe7f8965f1510bbb9d629b01': - resolution: {tarball: https://codeload.github.com/kleffio/ui/tar.gz/ac5ab3ffe82630bafe7f8965f1510bbb9d629b01} + '@kleffio/ui@https://codeload.github.com/kleffio/ui/tar.gz/d97d2e4dc24c24b30aedef8b8b8be3635b7dc5fb': + resolution: {tarball: https://codeload.github.com/kleffio/ui/tar.gz/d97d2e4dc24c24b30aedef8b8b8be3635b7dc5fb} version: 0.1.0 peerDependencies: react: ^19.0.0 @@ -2098,7 +2098,7 @@ snapshots: dependencies: react: 19.2.4 - '@kleffio/ui@https://codeload.github.com/kleffio/ui/tar.gz/ac5ab3ffe82630bafe7f8965f1510bbb9d629b01(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': + '@kleffio/ui@https://codeload.github.com/kleffio/ui/tar.gz/d97d2e4dc24c24b30aedef8b8b8be3635b7dc5fb(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': dependencies: '@base-ui/react': 1.3.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) class-variance-authority: 0.7.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..dd5be38 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,6 @@ +packages: + - . + +allowBuilds: + esbuild: true + sharp: true diff --git a/src/ComponentsPage.tsx b/src/ComponentsPage.tsx index 86a0e47..c989fa3 100644 --- a/src/ComponentsPage.tsx +++ b/src/ComponentsPage.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState, type ReactNode } from "react"; +import { useEffect, useState, type ReactNode } from "react"; import { toast } from "sonner"; import { Area, @@ -28,6 +28,10 @@ import { } from "lucide-react"; // UI Primitives +// Local fallback copies retained in ./glow-follow and ./progress for easy reversal. +// import { installGlowFollow } from "./glow-follow"; +// import { Progress } from "./progress"; +import { Progress } from "@kleffio/ui"; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@kleffio/ui"; import { Alert, AlertAction, AlertDescription, AlertTitle } from "@kleffio/ui"; import { @@ -64,7 +68,6 @@ import { Item } from "@kleffio/ui"; import { Label } from "@kleffio/ui"; import { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "@kleffio/ui"; import { Popover, PopoverContent, PopoverTrigger } from "@kleffio/ui"; -import { Progress } from "@kleffio/ui"; import { RadioGroup, RadioGroupItem } from "@kleffio/ui"; import { ScrollArea } from "@kleffio/ui"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@kleffio/ui"; @@ -178,20 +181,23 @@ const TABLE_ROWS = [ { id: "INV-003", date: "Jan 1, 2026", amount: "$14.00", status: "Paid" }, ]; +const PROGRESS_SPEEDS = [1, 3, 5] as const; +const PROGRESS_TICK_MS = 100; + // ─── Section wrapper ────────────────────────────────────────────────────────── function Section({ title, children }: { title: string; children: ReactNode }) { return ( -
-

{title}

- {children} +
+

{title}

+
{children}
); } function Row({ children, wrap = false }: { children: ReactNode; wrap?: boolean }) { return ( -
+
{children}
); @@ -201,735 +207,810 @@ function Row({ children, wrap = false }: { children: ReactNode; wrap?: boolean } export function ComponentsPage() { const [progress, setProgress] = useState(60); + const [progressSpeed, setProgressSpeed] = useState<0 | (typeof PROGRESS_SPEEDS)[number]>(0); const [sliderValue, setSliderValue] = useState([40]); const [checked, setChecked] = useState(true); const [switchOn, setSwitchOn] = useState(true); + const progressLabel = `${Math.round(progress)}%`; - return ( - -
- {/* Header */} -
-

Component Showcase

-

All UI primitives and domain components

-
+ useEffect(() => { + if (progressSpeed === 0) { + return; + } -
- - {/* ── Buttons ── */} -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - {/* ── Badges ── */} -
- - Default - Secondary - Outline - Destructive - Ghost - -
- - - - {/* ── Alerts ── */} -
- - - Scheduled maintenance - - Your servers will be unreachable on Mar 22 from 02:00–04:00 UTC while we apply infrastructure updates. - - - - - Deployment complete - - Minecraft Survival is now running on node node-07 in us-east-1. - - - - - High memory usage - - Valheim Viking Realm is using 89% of available memory. Consider upgrading to the Business plan. - - - - - - - - Server crashed - - Factorio World has stopped unexpectedly. Check the logs for more details. - - - - - -
- - - - {/* ── Toasts ── */} -
- - - - - - - - -
- - - - {/* ── Cards ── */} -
-
- - - Server Statistics - Last 30 days overview - - -

Uptime: 99.9% · Avg players: 12 · Peak: 18

-
- - - -
+ const interval = window.setInterval(() => { + setProgress((current) => { + const next = current + progressSpeed * (PROGRESS_TICK_MS / 1000); - - - Billing Summary - Current billing period - - -

$29.00

-

Due Apr 1, 2026

-
- - - -
-
-
+ return next >= 100 ? 0 : Number(next.toFixed(2)); + }); + }, PROGRESS_TICK_MS); - + return () => window.clearInterval(interval); + }, [progressSpeed]); - {/* ── Form Elements ── */} -
-
-
- - Server Name - - - - Description -