@krizaka/ui 3.16.1 → 3.17.0

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.
@@ -0,0 +1,30 @@
1
+ "use client";
2
+
3
+ import { Badge } from "@krizaka/ui/badge";
4
+ import { DataTable, type DataTableColumn, DataTableFilters } from "@krizaka/ui/data-table";
5
+
6
+ type Model = { id: string; name: string; maker: string; does: string; where: string; status: string; licence: string; context: number; verified: string };
7
+ const L = "https://www.apache.org/licenses/LICENSE-2.0";
8
+ const models: Model[] = [
9
+ { id: "black-forest-labs/flux.1-schnell", name: "FLUX.1 schnell", maker: "Black Forest Labs", does: "Image", where: "Local", status: "Default", licence: "Apache-2.0", context: 0, verified: "2026-10-02" },
10
+ { id: "meta-llama/llama-3.3-70b-instruct", name: "Llama 3.3 70B Instruct", maker: "Meta", does: "Chat", where: "Local", status: "Default", licence: "Llama 3.3 Community Licence", context: 131072, verified: "2026-10-09" },
11
+ { id: "anthropic/claude-sonnet", name: "Claude Sonnet", maker: "Anthropic", does: "Chat", where: "Provider", status: "Available", licence: "Provider terms", context: 200000, verified: "2026-10-12" },
12
+ { id: "lightricks/ltx-video", name: "LTX-Video", maker: "Lightricks", does: "Video", where: "Local", status: "Planned", licence: "OpenRAIL-M", context: 0, verified: "" },
13
+ ];
14
+ const tone = { Default: "success", Available: "neutral", Planned: "warning" } as const;
15
+ // The model, its capability, where it runs and its status stay in the row; the rest leaves it as the table narrows.
16
+ const columns: DataTableColumn<Model>[] = [
17
+ { id: "name", header: "Model", type: "title", sortable: true, filter: "text", subtitle: (m) => m.id },
18
+ { id: "does", header: "Capability", type: "badge", sortable: true, filter: "facet", cell: (m) => <Badge size="sm">{m.does}</Badge> },
19
+ { id: "where", header: "Runs where", type: "badge", filter: "facet", priority: 2, cell: (m) => <Badge size="sm" tone={m.where === "Local" ? "accent" : "neutral"}>{m.where}</Badge> },
20
+ { id: "status", header: "Status", type: "status", sortable: true, filter: "facet", cell: (m) => <Badge size="sm" tone={tone[m.status as keyof typeof tone]}>{m.status}</Badge> },
21
+ { id: "maker", header: "Maker", type: "text", clamp: 1, priority: 3 },
22
+ { id: "licence", header: "Licence", type: "link", priority: 4, href: () => L },
23
+ { id: "context", header: "Context", type: "number", unit: "tokens", priority: 5, value: (m) => m.context, cell: (m) => (m.context ? m.context.toLocaleString("en") : "—") },
24
+ { id: "verified", header: "Verified", type: "date", priority: 5, cell: (m) => m.verified || "never" },
25
+ ];
26
+
27
+ // Eight columns, any width, no overflow: the chevron opens what left the row; under 36 rem each row is a card.
28
+ export default function DataTableCatalogue() {
29
+ return <DataTable caption="Models" rows={models} columns={columns} getRowId={(m) => m.id} rowLabel={(m) => m.name} density="compact" toolbar={<DataTableFilters />} />;
30
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ // registry/examples/data-table/invoices.tsx
4
+ import { Badge } from "@krizaka/ui/badge";
5
+ import { DataTable } from "@krizaka/ui/data-table";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var tone = { Paid: "success", Open: "accent", Overdue: "danger", Draft: "neutral" };
8
+ var invoices = [
9
+ { id: "INV-2026-0143", customer: "Harbour Labs", email: "finance@harbourlabs.example", issued: "2026-10-14", due: "2026-11-13", amount: 2200, status: "Draft" },
10
+ { id: "INV-2026-0142", customer: "Atelier Montr\xE9al Inc.", email: "billing@ateliermtl.example", issued: "2026-10-01", due: "2026-10-31", amount: 4280, status: "Open" },
11
+ { id: "INV-2026-0138", customer: "Nord & Fils", email: "ap@nordfils.example", issued: "2026-09-12", due: "2026-10-12", amount: 15900, status: "Overdue" },
12
+ { id: "INV-2026-0137", customer: "Lumen Collective", email: "hello@lumen.example", issued: "2026-09-10", due: "2026-10-10", amount: 640, status: "Paid" }
13
+ ];
14
+ var columns = [
15
+ { id: "id", header: "Invoice", type: "title", sortable: true, subtitle: (i) => i.customer },
16
+ { id: "status", header: "Status", type: "status", sortable: true, cell: (i) => /* @__PURE__ */ jsx(Badge, { size: "sm", tone: tone[i.status], children: i.status }) },
17
+ { id: "amount", header: "Amount", type: "number", sortable: true, cell: (i) => i.amount.toLocaleString("en", { style: "currency", currency: "USD" }) },
18
+ { id: "due", header: "Due", type: "date", sortable: true, priority: 2 },
19
+ { id: "issued", header: "Issued", type: "date", sortable: true, priority: 3 },
20
+ { id: "email", header: "Billing contact", type: "link", priority: 4, href: (i) => `mailto:${i.email}` }
21
+ ];
22
+ function DataTableInvoices() {
23
+ return /* @__PURE__ */ jsx(DataTable, { caption: "Invoices", rows: invoices, columns, getRowId: (i) => i.id, rowLabel: (i) => i.id, stickyHeader: true, striped: true, defaultSort: { column: "due", direction: "descending" } });
24
+ }
25
+ export {
26
+ DataTableInvoices as default
27
+ };
@@ -0,0 +1,26 @@
1
+ "use client";
2
+
3
+ import { Badge } from "@krizaka/ui/badge";
4
+ import { DataTable, type DataTableColumn } from "@krizaka/ui/data-table";
5
+
6
+ type Invoice = { id: string; customer: string; email: string; issued: string; due: string; amount: number; status: keyof typeof tone };
7
+ const tone = { Paid: "success", Open: "accent", Overdue: "danger", Draft: "neutral" } as const;
8
+ const invoices: Invoice[] = [
9
+ { id: "INV-2026-0143", customer: "Harbour Labs", email: "finance@harbourlabs.example", issued: "2026-10-14", due: "2026-11-13", amount: 2200, status: "Draft" },
10
+ { id: "INV-2026-0142", customer: "Atelier Montréal Inc.", email: "billing@ateliermtl.example", issued: "2026-10-01", due: "2026-10-31", amount: 4280, status: "Open" },
11
+ { id: "INV-2026-0138", customer: "Nord & Fils", email: "ap@nordfils.example", issued: "2026-09-12", due: "2026-10-12", amount: 15900, status: "Overdue" },
12
+ { id: "INV-2026-0137", customer: "Lumen Collective", email: "hello@lumen.example", issued: "2026-09-10", due: "2026-10-10", amount: 640, status: "Paid" },
13
+ ];
14
+ const columns: DataTableColumn<Invoice>[] = [
15
+ { id: "id", header: "Invoice", type: "title", sortable: true, subtitle: (i) => i.customer },
16
+ { id: "status", header: "Status", type: "status", sortable: true, cell: (i) => <Badge size="sm" tone={tone[i.status]}>{i.status}</Badge> },
17
+ { id: "amount", header: "Amount", type: "number", sortable: true, cell: (i) => i.amount.toLocaleString("en", { style: "currency", currency: "USD" }) },
18
+ { id: "due", header: "Due", type: "date", sortable: true, priority: 2 },
19
+ { id: "issued", header: "Issued", type: "date", sortable: true, priority: 3 },
20
+ { id: "email", header: "Billing contact", type: "link", priority: 4, href: (i) => `mailto:${i.email}` },
21
+ ];
22
+
23
+ // Number, status and amount always; dates and contact move into the detail as the screen narrows. Sticky header, zebra.
24
+ export default function DataTableInvoices() {
25
+ return <DataTable caption="Invoices" rows={invoices} columns={columns} getRowId={(i) => i.id} rowLabel={(i) => i.id} stickyHeader striped defaultSort={{ column: "due", direction: "descending" }} />;
26
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,35 @@
1
+ "use client";
2
+
3
+ // registry/examples/data-table/runs.tsx
4
+ import { Badge } from "@krizaka/ui/badge";
5
+ import { DataTable, DataTableColumnsMenu, DataTableExport, DataTableFilters } from "@krizaka/ui/data-table";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var tone = { succeeded: "success", running: "accent", failed: "danger", queued: "neutral" };
8
+ var runs = [
9
+ { id: "run_9f2c41ab", pack: "video.short", model: "ltx-video", worker: "-", status: "queued", seconds: 0, started: "2026-10-15 09:18" },
10
+ { id: "run_9f2c41a8", pack: "audio.transcribe", model: "whisper-large-v3", worker: "gpu-lyon-01", status: "running", seconds: 318, started: "2026-10-15 09:16" },
11
+ { id: "run_9f2c41a9", pack: "voice.clone", model: "xtts-v2", worker: "gpu-lyon-02", status: "failed", seconds: 7, started: "2026-10-15 09:02", error: "Out of memory (24 GB)" },
12
+ { id: "run_9f2c41aa", pack: "chat.summarise", model: "llama-3.3-70b-instruct", worker: "cpu-mtl-04", status: "succeeded", seconds: 96, started: "2026-10-15 08:51" }
13
+ ];
14
+ var columns = [
15
+ { id: "pack", header: "Run", type: "title", sortable: true, filter: "text", subtitle: (r) => r.id },
16
+ { id: "status", header: "Status", type: "status", sortable: true, filter: "facet", cell: (r) => /* @__PURE__ */ jsx(Badge, { size: "sm", tone: tone[r.status], children: r.status }) },
17
+ { id: "seconds", header: "Duration", type: "number", unit: "s", sortable: true, filter: "range" },
18
+ { id: "model", header: "Model", type: "text", clamp: 1, priority: 2 },
19
+ { id: "worker", header: "Worker", type: "text", clamp: 1, priority: 3 },
20
+ { id: "started", header: "Started", type: "date", sortable: true, priority: 4 },
21
+ { id: "error", header: "Error", type: "text", priority: 5, cell: (r) => r.error ?? "\u2014" }
22
+ ];
23
+ var bar = /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
24
+ /* @__PURE__ */ jsx(DataTableFilters, {}),
25
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
26
+ /* @__PURE__ */ jsx(DataTableColumnsMenu, {}),
27
+ /* @__PURE__ */ jsx(DataTableExport, { filename: "runs.csv" })
28
+ ] })
29
+ ] });
30
+ function DataTableRuns() {
31
+ return /* @__PURE__ */ jsx(DataTable, { caption: "Runs", rows: runs, columns, getRowId: (r) => r.id, rowLabel: (r) => r.id, selectable: true, density: "compact", stickyHeader: true, toolbar: bar });
32
+ }
33
+ export {
34
+ DataTableRuns as default
35
+ };
@@ -0,0 +1,28 @@
1
+ "use client";
2
+
3
+ import { Badge } from "@krizaka/ui/badge";
4
+ import { DataTable, type DataTableColumn, DataTableColumnsMenu, DataTableExport, DataTableFilters } from "@krizaka/ui/data-table";
5
+
6
+ type Run = { id: string; pack: string; model: string; worker: string; status: keyof typeof tone; seconds: number; started: string; error?: string };
7
+ const tone = { succeeded: "success", running: "accent", failed: "danger", queued: "neutral" } as const;
8
+ const runs: Run[] = [
9
+ { id: "run_9f2c41ab", pack: "video.short", model: "ltx-video", worker: "-", status: "queued", seconds: 0, started: "2026-10-15 09:18" },
10
+ { id: "run_9f2c41a8", pack: "audio.transcribe", model: "whisper-large-v3", worker: "gpu-lyon-01", status: "running", seconds: 318, started: "2026-10-15 09:16" },
11
+ { id: "run_9f2c41a9", pack: "voice.clone", model: "xtts-v2", worker: "gpu-lyon-02", status: "failed", seconds: 7, started: "2026-10-15 09:02", error: "Out of memory (24 GB)" },
12
+ { id: "run_9f2c41aa", pack: "chat.summarise", model: "llama-3.3-70b-instruct", worker: "cpu-mtl-04", status: "succeeded", seconds: 96, started: "2026-10-15 08:51" },
13
+ ];
14
+ const columns: DataTableColumn<Run>[] = [
15
+ { id: "pack", header: "Run", type: "title", sortable: true, filter: "text", subtitle: (r) => r.id },
16
+ { id: "status", header: "Status", type: "status", sortable: true, filter: "facet", cell: (r) => <Badge size="sm" tone={tone[r.status]}>{r.status}</Badge> },
17
+ { id: "seconds", header: "Duration", type: "number", unit: "s", sortable: true, filter: "range" },
18
+ { id: "model", header: "Model", type: "text", clamp: 1, priority: 2 },
19
+ { id: "worker", header: "Worker", type: "text", clamp: 1, priority: 3 },
20
+ { id: "started", header: "Started", type: "date", sortable: true, priority: 4 },
21
+ { id: "error", header: "Error", type: "text", priority: 5, cell: (r) => r.error ?? "—" },
22
+ ];
23
+ const bar = <div className="flex flex-col gap-3"><DataTableFilters /><div className="flex gap-2"><DataTableColumnsMenu /><DataTableExport filename="runs.csv" /></div></div>;
24
+
25
+ // An admin console: filters, columns menu and CSV export in the toolbar; selection; the error in the detail.
26
+ export default function DataTableRuns() {
27
+ return <DataTable caption="Runs" rows={runs} columns={columns} getRowId={(r) => r.id} rowLabel={(r) => r.id} selectable density="compact" stickyHeader toolbar={bar} />;
28
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krizaka/ui",
3
- "version": "3.16.1",
3
+ "version": "3.17.0",
4
4
  "templatePurposes": {
5
5
  "convince": {
6
6
  "title": "Convince",
@@ -1054,7 +1054,7 @@
1054
1054
  "category": "data-display",
1055
1055
  "platforms": "web",
1056
1056
  "examples": {
1057
- "web": 12,
1057
+ "web": 15,
1058
1058
  "native": 0
1059
1059
  },
1060
1060
  "dependencies": [
@@ -1064,6 +1064,7 @@
1064
1064
  "registryDependencies": [
1065
1065
  "button",
1066
1066
  "checkbox",
1067
+ "cn",
1067
1068
  "dropdown-menu",
1068
1069
  "field",
1069
1070
  "filter-bar",
@@ -1749,7 +1750,7 @@
1749
1750
  "native": 2
1750
1751
  },
1751
1752
  "dependencies": [
1752
- "@krizaka/tokens@^3.16.1",
1753
+ "@krizaka/tokens@^3.17.0",
1753
1754
  "@protomaps/basemaps@5.7.2",
1754
1755
  "tailwind-variants@^3.3.1"
1755
1756
  ],
@@ -1957,7 +1958,7 @@
1957
1958
  "native": 0
1958
1959
  },
1959
1960
  "dependencies": [
1960
- "@krizaka/tokens@^3.16.1",
1961
+ "@krizaka/tokens@^3.17.0",
1961
1962
  "radix-ui@^1.7.0",
1962
1963
  "tailwind-variants@^3.3.1"
1963
1964
  ],
@@ -2473,7 +2474,7 @@
2473
2474
  "native": 0
2474
2475
  },
2475
2476
  "dependencies": [
2476
- "@krizaka/tokens@^3.16.1",
2477
+ "@krizaka/tokens@^3.17.0",
2477
2478
  "radix-ui@^1.7.0",
2478
2479
  "tailwind-variants@^3.3.1"
2479
2480
  ],
package/registry/map.json CHANGED
@@ -930,7 +930,7 @@
930
930
  }
931
931
  ],
932
932
  "dependencies": [
933
- "@krizaka/tokens@^3.16.1",
933
+ "@krizaka/tokens@^3.17.0",
934
934
  "@protomaps/basemaps@5.7.2",
935
935
  "tailwind-variants@^3.3.1"
936
936
  ],
@@ -494,7 +494,7 @@
494
494
  }
495
495
  ],
496
496
  "dependencies": [
497
- "@krizaka/tokens@^3.16.1",
497
+ "@krizaka/tokens@^3.17.0",
498
498
  "radix-ui@^1.7.0",
499
499
  "tailwind-variants@^3.3.1"
500
500
  ],
@@ -291,7 +291,7 @@
291
291
  }
292
292
  ],
293
293
  "dependencies": [
294
- "@krizaka/tokens@^3.16.1",
294
+ "@krizaka/tokens@^3.17.0",
295
295
  "radix-ui@^1.7.0",
296
296
  "tailwind-variants@^3.3.1"
297
297
  ],