tamga-ui 0.3.0 → 0.3.2
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/CHANGELOG.md +55 -0
- package/dist/components/advanced-input.d.ts +9 -3
- package/dist/components/advanced-input.d.ts.map +1 -1
- package/dist/components/advanced-input.js +7 -6
- package/dist/components/appearance.d.ts +9 -3
- package/dist/components/appearance.d.ts.map +1 -1
- package/dist/components/appearance.js +7 -6
- package/dist/components/avatar.d.ts +6 -2
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +5 -4
- package/dist/components/badge.d.ts +9 -3
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +7 -6
- package/dist/components/bar.d.ts +3 -1
- package/dist/components/bar.d.ts.map +1 -1
- package/dist/components/bar.js +3 -2
- package/dist/components/chart.d.ts +3 -1
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +3 -2
- package/dist/components/checkbox.d.ts +3 -1
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +3 -2
- package/dist/components/chrome.d.ts +12 -4
- package/dist/components/chrome.d.ts.map +1 -1
- package/dist/components/chrome.js +9 -8
- package/dist/components/combobox.d.ts +3 -1
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +3 -2
- package/dist/components/data-table.d.ts +9 -3
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +7 -6
- package/dist/components/date-picker.d.ts +6 -2
- package/dist/components/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker.js +5 -4
- package/dist/components/disclosure.d.ts +5 -2
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +5 -4
- package/dist/components/display.d.ts +17 -6
- package/dist/components/display.d.ts.map +1 -1
- package/dist/components/display.js +16 -12
- package/dist/components/empty-state.d.ts +15 -5
- package/dist/components/empty-state.d.ts.map +1 -1
- package/dist/components/empty-state.js +11 -10
- package/dist/components/error-state.d.ts +3 -1
- package/dist/components/error-state.d.ts.map +1 -1
- package/dist/components/error-state.js +3 -2
- package/dist/components/file-upload.d.ts +3 -1
- package/dist/components/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload.js +3 -2
- package/dist/components/gauge.d.ts +4 -2
- package/dist/components/gauge.d.ts.map +1 -1
- package/dist/components/gauge.js +5 -4
- package/dist/components/layout.d.ts +24 -5
- package/dist/components/layout.d.ts.map +1 -1
- package/dist/components/layout.js +18 -8
- package/dist/components/log-view.d.ts +3 -1
- package/dist/components/log-view.d.ts.map +1 -1
- package/dist/components/log-view.js +3 -2
- package/dist/components/number-input.d.ts +3 -1
- package/dist/components/number-input.d.ts.map +1 -1
- package/dist/components/number-input.js +3 -2
- package/dist/components/overlay.d.ts +18 -6
- package/dist/components/overlay.d.ts.map +1 -1
- package/dist/components/overlay.js +13 -12
- package/dist/components/pagination.d.ts +3 -1
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +3 -2
- package/dist/components/pie.d.ts +3 -1
- package/dist/components/pie.d.ts.map +1 -1
- package/dist/components/pie.js +3 -2
- package/dist/components/primitives.d.ts +20 -7
- package/dist/components/primitives.d.ts.map +1 -1
- package/dist/components/primitives.js +15 -14
- package/dist/components/progress.d.ts +3 -6
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +3 -2
- package/dist/components/radio-group.d.ts +3 -1
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +3 -2
- package/dist/components/rich-text.d.ts +3 -1
- package/dist/components/rich-text.d.ts.map +1 -1
- package/dist/components/rich-text.js +3 -2
- package/dist/components/section.d.ts +3 -1
- package/dist/components/section.d.ts.map +1 -1
- package/dist/components/section.js +3 -2
- package/dist/components/segmented.d.ts +8 -2
- package/dist/components/segmented.d.ts.map +1 -1
- package/dist/components/segmented.js +1 -1
- package/dist/components/skeleton.d.ts +25 -14
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.js +24 -18
- package/dist/components/slider.d.ts +3 -1
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +3 -2
- package/dist/components/spinner.d.ts +2 -1
- package/dist/components/spinner.d.ts.map +1 -1
- package/dist/components/spinner.js +3 -2
- package/dist/components/square-picker.d.ts +3 -1
- package/dist/components/square-picker.d.ts.map +1 -1
- package/dist/components/square-picker.js +3 -2
- package/dist/components/stacked-bar.d.ts +3 -1
- package/dist/components/stacked-bar.d.ts.map +1 -1
- package/dist/components/stacked-bar.js +3 -2
- package/dist/components/surface.d.ts +19 -5
- package/dist/components/surface.d.ts.map +1 -1
- package/dist/components/surface.js +11 -10
- package/dist/components/switch.d.ts +3 -1
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +3 -2
- package/dist/components/tabs.d.ts +3 -1
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +3 -2
- package/dist/components/timeline-strip.d.ts +3 -1
- package/dist/components/timeline-strip.d.ts.map +1 -1
- package/dist/components/timeline-strip.js +3 -2
- package/dist/components/tree-select.d.ts +3 -1
- package/dist/components/tree-select.d.ts.map +1 -1
- package/dist/components/tree-select.js +3 -2
- package/dist/kit.css +1 -1
- package/dist/lib/data-props.d.ts +20 -0
- package/dist/lib/data-props.d.ts.map +1 -0
- package/dist/lib/data-props.js +25 -0
- package/dist/styles.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createElement as _createElement } from "react";
|
|
3
4
|
import { Children, useEffect, useRef, useState } from "react";
|
|
4
5
|
import { cn } from "../lib/cn.js";
|
|
6
|
+
import { dataProps } from "../lib/data-props.js";
|
|
5
7
|
import { Icon } from "./icon.js";
|
|
6
8
|
import { PlainLink as PlainAnchor } from "./link.js";
|
|
7
9
|
import { Check, Customize } from "./icons.js";
|
|
@@ -18,10 +20,12 @@ import { toneOf } from "./tone.js";
|
|
|
18
20
|
*
|
|
19
21
|
* Gerekçe: docs/gerekce/05-yuzey-ve-kabuk.md
|
|
20
22
|
*/
|
|
21
|
-
export function Descriptions({ items, layout = "wide", className, }) {
|
|
23
|
+
export function Descriptions({ items, layout = "wide", className, ...rest }) {
|
|
22
24
|
return (_jsx("dl", { className: cn("grid", layout === "wide"
|
|
23
25
|
? "gap-x-8 gap-y-4 sm:grid-cols-[minmax(0,14rem)_minmax(0,1fr)]"
|
|
24
|
-
: "gap-x-4 gap-y-2.5 sm:grid-cols-[minmax(0,8rem)_minmax(0,1fr)]", className), children: items.map((it) => (
|
|
26
|
+
: "gap-x-4 gap-y-2.5 sm:grid-cols-[minmax(0,8rem)_minmax(0,1fr)]", className), children: items.map((it) => (_createElement("div", { ...dataProps(rest), key: it.term, className: "contents" },
|
|
27
|
+
_jsx("dt", { className: "text-small text-ink-faint", children: it.term }),
|
|
28
|
+
_jsx("dd", { className: cn("min-w-0 text-body text-ink", it.mono && "font-mono tabular-nums"), children: it.value })))) }));
|
|
25
29
|
}
|
|
26
30
|
/**
|
|
27
31
|
* Tek bir sayı, büyük. Sektörde adı "stat" ya da "KPI kartı".
|
|
@@ -70,14 +74,14 @@ export function Descriptions({ items, layout = "wide", className, }) {
|
|
|
70
74
|
* görünüyordu. Tüketicisi olmayan bir prop, `SkeletonKpi`ın yıllarca yaşadığı
|
|
71
75
|
* boşluğun aynısı: duruyor, belgeleniyor, hiçbir şeyin yerini tutmuyor.
|
|
72
76
|
*/
|
|
73
|
-
export function Kpi({ label, value, unit, icon, note, delta, better = "up", chart, href, onClick, pressed, linkComponent: Link = PlainAnchor, className, }) {
|
|
77
|
+
export function Kpi({ label, value, unit, icon, note, delta, better = "up", chart, href, onClick, pressed, linkComponent: Link = PlainAnchor, className, ...rest }) {
|
|
74
78
|
const tone = delta === undefined || delta === 0
|
|
75
79
|
? "neutral"
|
|
76
80
|
: (delta > 0) === (better === "up")
|
|
77
81
|
? "positive"
|
|
78
82
|
: "danger";
|
|
79
83
|
const c = toneOf(tone);
|
|
80
|
-
const govde = (_jsxs(_Fragment, { children: [icon ? (_jsx("span", { className: "tamga-kpi-tile", "aria-hidden": true, children: _jsx(Icon, { icon: icon, size: "base" }) })) : null, _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "tamga-label", children: label }), _jsxs("span", { className: "mt-1 flex items-end gap-2", children: [_jsx("span", { className: "font-mono text-display-sm leading-none font-bold tabular-nums text-ink", children: value }), unit ? (_jsx("span", { className: "font-mono text-small font-medium text-ink-faint", children: unit })) : null, delta !== undefined ? (_jsxs("span", { className: "ml-auto font-mono text-small tabular-nums", style: { color: c.mark }, children: [delta > 0 ? "+" : "", delta, "%"] })) : null] }), note ? _jsx("span", { className: "mt-1 text-caption text-ink-faint", children: note }) : null, chart ? _jsx("span", { className: "mt-4 block", children: chart }) : null] })] }));
|
|
84
|
+
const govde = (_jsxs(_Fragment, { children: [icon ? (_jsx("span", { ...dataProps(rest), className: "tamga-kpi-tile", "aria-hidden": true, children: _jsx(Icon, { icon: icon, size: "base" }) })) : null, _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "tamga-label", children: label }), _jsxs("span", { className: "mt-1 flex items-end gap-2", children: [_jsx("span", { className: "font-mono text-display-sm leading-none font-bold tabular-nums text-ink", children: value }), unit ? (_jsx("span", { className: "font-mono text-small font-medium text-ink-faint", children: unit })) : null, delta !== undefined ? (_jsxs("span", { className: "ml-auto font-mono text-small tabular-nums", style: { color: c.mark }, children: [delta > 0 ? "+" : "", delta, "%"] })) : null] }), note ? _jsx("span", { className: "mt-1 text-caption text-ink-faint", children: note }) : null, chart ? _jsx("span", { className: "mt-4 block", children: chart }) : null] })] }));
|
|
81
85
|
const sinif = cn("tamga-kpi", (href || onClick) && "tamga-kpi-live", className);
|
|
82
86
|
if (href) {
|
|
83
87
|
return (_jsx(Link, { href: href, className: sinif, children: govde }));
|
|
@@ -99,9 +103,9 @@ export function Kpi({ label, value, unit, icon, note, delta, better = "up", char
|
|
|
99
103
|
* altı). Elle verilen bir sütun sayısı, karo eklenince yalnız o ekranda
|
|
100
104
|
* güncelleniyor ve tek başına kalan bir karo tam satırı kaplıyor.
|
|
101
105
|
*/
|
|
102
|
-
export function KpiGrid({ children, className }) {
|
|
106
|
+
export function KpiGrid({ children, className, ...rest }) {
|
|
103
107
|
const sayi = Math.min(Children.count(children), 6);
|
|
104
|
-
return (_jsx("div", { className: cn("tamga-kpi-grid", className), style: { "--tamga-kpi-cols": sayi }, children: children }));
|
|
108
|
+
return (_jsx("div", { ...dataProps(rest), className: cn("tamga-kpi-grid", className), style: { "--tamga-kpi-cols": sayi }, children: children }));
|
|
105
109
|
}
|
|
106
110
|
/**
|
|
107
111
|
* Kod bloğu, kopyalanabilir.
|
|
@@ -114,7 +118,7 @@ export function KpiGrid({ children, className }) {
|
|
|
114
118
|
* izin verilmemişse). Başarısızlık SESSİZ olmamalı: düğme metni değişmezse
|
|
115
119
|
* kullanıcı kopyalandığını sanır ve boş yapıştırır.
|
|
116
120
|
*/
|
|
117
|
-
export function Code({ children, labels, className, }) {
|
|
121
|
+
export function Code({ children, labels, className, ...rest }) {
|
|
118
122
|
const [state, setState] = useState("idle");
|
|
119
123
|
const timer = useRef(undefined);
|
|
120
124
|
/* Zamanlayıcı bir ref'te tutuluyor ve her tıklamada sıfırlanıyor.
|
|
@@ -135,7 +139,7 @@ export function Code({ children, labels, className, }) {
|
|
|
135
139
|
window.clearTimeout(timer.current);
|
|
136
140
|
timer.current = window.setTimeout(() => setState("idle"), 1600);
|
|
137
141
|
}
|
|
138
|
-
return (_jsxs("div", { className: cn("tamga-code-block tamga-surface relative overflow-hidden", className), children: [_jsx("pre", { className: "tamga-scroll-x px-4 py-3 font-mono text-caption text-ink", children: children }), _jsxs("button", { type: "button", onClick: copy, className: "tamga-mini-btn absolute top-2 right-2 w-auto gap-1 px-2", "aria-label": labels.copy, children: [_jsx(Icon, { icon: state === "done" ? Check : Customize, size: "xs" }), _jsx("span", { className: "text-caption", children: state === "done" ? labels.copied : state === "failed" ? labels.failed : labels.copy })] })] }));
|
|
142
|
+
return (_jsxs("div", { ...dataProps(rest), className: cn("tamga-code-block tamga-surface relative overflow-hidden", className), children: [_jsx("pre", { className: "tamga-scroll-x px-4 py-3 font-mono text-caption text-ink", children: children }), _jsxs("button", { type: "button", onClick: copy, className: "tamga-mini-btn absolute top-2 right-2 w-auto gap-1 px-2", "aria-label": labels.copy, children: [_jsx(Icon, { icon: state === "done" ? Check : Customize, size: "xs" }), _jsx("span", { className: "text-caption", children: state === "done" ? labels.copied : state === "failed" ? labels.failed : labels.copy })] })] }));
|
|
139
143
|
}
|
|
140
144
|
/**
|
|
141
145
|
* Klavye tuşu.
|
|
@@ -157,12 +161,12 @@ export function Kbd({ children, className }) {
|
|
|
157
161
|
*
|
|
158
162
|
* Sıfır GÖSTERİLMEZ: "0 bildirim" bir bilgi değil, gürültüdür.
|
|
159
163
|
*/
|
|
160
|
-
export function Badge({ count, max = 99, tone = "danger", label, className, children, }) {
|
|
164
|
+
export function Badge({ count, max = 99, tone = "danger", label, className, children, ...rest }) {
|
|
161
165
|
if (count <= 0)
|
|
162
166
|
return _jsx(_Fragment, { children: children });
|
|
163
167
|
const c = toneOf(tone);
|
|
164
168
|
const shown = count > max ? `${max}+` : String(count);
|
|
165
|
-
const dot = (_jsxs("span", { className: "inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 font-mono text-micro leading-none font-semibold tabular-nums", style: { background: c.mark, color: "var(--color-page)" }, children: [_jsx("span", { "aria-hidden": true, children: shown }), _jsxs("span", { className: "sr-only", children: [count, " ", label] })] }));
|
|
169
|
+
const dot = (_jsxs("span", { ...dataProps(rest), className: "inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 font-mono text-micro leading-none font-semibold tabular-nums", style: { background: c.mark, color: "var(--color-page)" }, children: [_jsx("span", { "aria-hidden": true, children: shown }), _jsxs("span", { className: "sr-only", children: [count, " ", label] })] }));
|
|
166
170
|
if (!children)
|
|
167
171
|
return dot;
|
|
168
172
|
return (_jsxs("span", { className: cn("relative inline-flex", className), children: [children, _jsx("span", { className: "absolute -top-1 -right-1", children: dot })] }));
|
|
@@ -181,8 +185,8 @@ export function Badge({ count, max = 99, tone = "danger", label, className, chil
|
|
|
181
185
|
* olan sönük. Üç durum üç ayrı görsel dil — çünkü "neredeyim" ve "ne kaldı"
|
|
182
186
|
* ayrı iki soru.
|
|
183
187
|
*/
|
|
184
|
-
export function Steps({ steps, current, className, }) {
|
|
185
|
-
return (_jsx("ol", { className: cn("flex flex-wrap items-center gap-x-3 gap-y-2", className), children: steps.map((s, i) => {
|
|
188
|
+
export function Steps({ steps, current, className, ...rest }) {
|
|
189
|
+
return (_jsx("ol", { ...dataProps(rest), className: cn("flex flex-wrap items-center gap-x-3 gap-y-2", className), children: steps.map((s, i) => {
|
|
186
190
|
const done = i < current;
|
|
187
191
|
const active = i === current;
|
|
188
192
|
return (_jsxs("li", { className: "flex items-center gap-3", children: [_jsx("span", { className: "tamga-step-mark font-mono text-caption", "data-state": done ? "done" : active ? "current" : "todo", "aria-hidden": true, children: done ? _jsx(Icon, { icon: Check, size: "xs", weight: "bold" }) : i + 1 }), _jsx("span", { className: cn("text-small", active ? "font-medium text-ink" : "text-ink-faint"), "aria-current": active ? "step" : undefined, children: s }), i < steps.length - 1 ? (_jsx("span", { "aria-hidden": true, className: "tamga-step-line", "data-done": done ? "true" : "false" })) : null] }, s));
|
|
@@ -23,12 +23,14 @@ export type Art = (opts: {
|
|
|
23
23
|
* The line is real text, not decoration, so it is readable. Keep it to one
|
|
24
24
|
* short sentence: the bubble is a voice, not a paragraph.
|
|
25
25
|
*/
|
|
26
|
-
export declare function SaysBubble({ children, art, size, float, className, }: {
|
|
26
|
+
export declare function SaysBubble({ children, art, size, float, className, ...rest }: {
|
|
27
27
|
children: React.ReactNode;
|
|
28
28
|
art: Art;
|
|
29
29
|
size?: number;
|
|
30
30
|
float?: boolean;
|
|
31
31
|
className?: string;
|
|
32
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
33
|
+
[k: `data-${string}`]: unknown;
|
|
32
34
|
}): import("react").JSX.Element;
|
|
33
35
|
/**
|
|
34
36
|
* A row that has nothing in it.
|
|
@@ -40,12 +42,14 @@ export declare function SaysBubble({ children, art, size, float, className, }: {
|
|
|
40
42
|
* No border of its own: it drops into a table body or a list that already has
|
|
41
43
|
* one, and it inherits that list's row rhythm.
|
|
42
44
|
*/
|
|
43
|
-
export declare function EmptyNote({ art, title, children, action, className, }: {
|
|
45
|
+
export declare function EmptyNote({ art, title, children, action, className, ...rest }: {
|
|
44
46
|
art: Art;
|
|
45
47
|
title: string;
|
|
46
48
|
children?: React.ReactNode;
|
|
47
49
|
action?: React.ReactNode;
|
|
48
50
|
className?: string;
|
|
51
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
52
|
+
[k: `data-${string}`]: unknown;
|
|
49
53
|
}): import("react").JSX.Element;
|
|
50
54
|
export type EmptyLayout = "banner" | "ticket" | "routes";
|
|
51
55
|
export type EmptyRoute = {
|
|
@@ -72,7 +76,7 @@ export type EmptyRoute = {
|
|
|
72
76
|
* drawing decides what the emptiness FEELS like, and those are two choices,
|
|
73
77
|
* not one.
|
|
74
78
|
*/
|
|
75
|
-
export declare function EmptyState({ layout, art, kicker, title, children, action, note, says, steps, routes, size, className, }: {
|
|
79
|
+
export declare function EmptyState({ layout, art, kicker, title, children, action, note, says, steps, routes, size, className, ...rest }: {
|
|
76
80
|
layout?: EmptyLayout;
|
|
77
81
|
art: Art;
|
|
78
82
|
/** what KIND of nothing this is: "no records", "no results" TR: bunun NE TÜR bir hiçlik olduğu: "kayıt yok", "sonuç yok" */
|
|
@@ -97,6 +101,8 @@ export declare function EmptyState({ layout, art, kicker, title, children, actio
|
|
|
97
101
|
routes?: EmptyRoute[];
|
|
98
102
|
size?: number;
|
|
99
103
|
className?: string;
|
|
104
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
105
|
+
[k: `data-${string}`]: unknown;
|
|
100
106
|
}): import("react").JSX.Element;
|
|
101
107
|
/**
|
|
102
108
|
* A whole body with nothing in it — and no box drawn around the nothing.
|
|
@@ -112,7 +118,7 @@ export declare function EmptyState({ layout, art, kicker, title, children, actio
|
|
|
112
118
|
* empty area INSIDE a working screen, use EmptyState instead: that one has a
|
|
113
119
|
* card around it because the rest of the screen does too.
|
|
114
120
|
*/
|
|
115
|
-
export declare function EmptyBlank({ art, kicker, title, children, action, says, size, className, }: {
|
|
121
|
+
export declare function EmptyBlank({ art, kicker, title, children, action, says, size, className, ...rest }: {
|
|
116
122
|
art: Art;
|
|
117
123
|
kicker?: string;
|
|
118
124
|
title: string;
|
|
@@ -121,6 +127,8 @@ export declare function EmptyBlank({ art, kicker, title, children, action, says,
|
|
|
121
127
|
says?: React.ReactNode;
|
|
122
128
|
size?: number;
|
|
123
129
|
className?: string;
|
|
130
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
131
|
+
[k: `data-${string}`]: unknown;
|
|
124
132
|
}): import("react").JSX.Element;
|
|
125
133
|
/**
|
|
126
134
|
* A choice you are offering — a template, a starting point, a preset.
|
|
@@ -133,7 +141,7 @@ export declare function EmptyBlank({ art, kicker, title, children, action, says,
|
|
|
133
141
|
* banner behind it. A wall of coloured banners would out-shout a real event
|
|
134
142
|
* (Yasa 3); a rule carries the same grouping and outranks nothing.
|
|
135
143
|
*/
|
|
136
|
-
export declare function EmptyTile({ art, kicker, title, children, tone, onClick, className, }: {
|
|
144
|
+
export declare function EmptyTile({ art, kicker, title, children, tone, onClick, className, ...rest }: {
|
|
137
145
|
art: Art;
|
|
138
146
|
/** the identifier-shaped line above the title TR: başlığın üstündeki tanımlayıcı biçimli satır */
|
|
139
147
|
kicker?: string;
|
|
@@ -146,5 +154,7 @@ export declare function EmptyTile({ art, kicker, title, children, tone, onClick,
|
|
|
146
154
|
tone?: 1 | 2 | 3 | 4 | 5;
|
|
147
155
|
onClick?: () => void;
|
|
148
156
|
className?: string;
|
|
157
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
158
|
+
[k: `data-${string}`]: unknown;
|
|
149
159
|
}): import("react").JSX.Element;
|
|
150
160
|
//# sourceMappingURL=empty-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/components/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/components/empty-state.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Icon } from "./icon.js";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { dataProps } from "../lib/data-props.js";
|
|
4
5
|
import { CaretRight } from "./icons.js";
|
|
5
6
|
/**
|
|
6
7
|
* The drawing standing on the ground.
|
|
@@ -24,8 +25,8 @@ function ArtFigure({ art, size, float, ground = true, }) {
|
|
|
24
25
|
* The line is real text, not decoration, so it is readable. Keep it to one
|
|
25
26
|
* short sentence: the bubble is a voice, not a paragraph.
|
|
26
27
|
*/
|
|
27
|
-
export function SaysBubble({ children, art, size = 168, float = true, className, }) {
|
|
28
|
-
return (_jsxs("div", { className: cn("relative shrink-0 pt-11", float && "tamga-float", className), children: [_jsxs("div", { className: "absolute top-0 left-1/2 z-10 -translate-x-1/2 whitespace-nowrap", children: [_jsx("div", { className: "px-3 py-1.5 text-small font-medium text-ink", style: {
|
|
28
|
+
export function SaysBubble({ children, art, size = 168, float = true, className, ...rest }) {
|
|
29
|
+
return (_jsxs("div", { ...dataProps(rest), className: cn("relative shrink-0 pt-11", float && "tamga-float", className), children: [_jsxs("div", { className: "absolute top-0 left-1/2 z-10 -translate-x-1/2 whitespace-nowrap", children: [_jsx("div", { className: "px-3 py-1.5 text-small font-medium text-ink", style: {
|
|
29
30
|
background: "var(--color-shell)",
|
|
30
31
|
border: "1px solid var(--color-edge)",
|
|
31
32
|
borderRadius: "var(--radius-card)",
|
|
@@ -46,8 +47,8 @@ export function SaysBubble({ children, art, size = 168, float = true, className,
|
|
|
46
47
|
* No border of its own: it drops into a table body or a list that already has
|
|
47
48
|
* one, and it inherits that list's row rhythm.
|
|
48
49
|
*/
|
|
49
|
-
export function EmptyNote({ art, title, children, action, className, }) {
|
|
50
|
-
return (_jsxs("div", { className: cn("tamga-gutter flex items-center gap-4 py-6", className), children: [_jsx("span", { className: "tamga-art-port tamga-art-well", children: _jsx(ArtFigure, { art: art, size: 56, ground: false }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-body font-medium text-ink", children: title }), children ? (_jsx("p", { className: "mt-1 max-w-[var(--measure)] text-small leading-relaxed text-ink-faint", children: children })) : null] }), action ? _jsx("div", { className: "shrink-0", children: action }) : null] }));
|
|
50
|
+
export function EmptyNote({ art, title, children, action, className, ...rest }) {
|
|
51
|
+
return (_jsxs("div", { ...dataProps(rest), className: cn("tamga-gutter flex items-center gap-4 py-6", className), children: [_jsx("span", { className: "tamga-art-port tamga-art-well", children: _jsx(ArtFigure, { art: art, size: 56, ground: false }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-body font-medium text-ink", children: title }), children ? (_jsx("p", { className: "mt-1 max-w-[var(--measure)] text-small leading-relaxed text-ink-faint", children: children })) : null] }), action ? _jsx("div", { className: "shrink-0", children: action }) : null] }));
|
|
51
52
|
}
|
|
52
53
|
/**
|
|
53
54
|
* A surface that has nothing in it.
|
|
@@ -68,9 +69,9 @@ export function EmptyNote({ art, title, children, action, className, }) {
|
|
|
68
69
|
* drawing decides what the emptiness FEELS like, and those are two choices,
|
|
69
70
|
* not one.
|
|
70
71
|
*/
|
|
71
|
-
export function EmptyState({ layout = "banner", art, kicker, title, children, action, note, says, steps, routes, size = 150, className, }) {
|
|
72
|
+
export function EmptyState({ layout = "banner", art, kicker, title, children, action, note, says, steps, routes, size = 150, className, ...rest }) {
|
|
72
73
|
const figure = says !== undefined ? (_jsx(SaysBubble, { art: art, size: size, children: says })) : (_jsx(ArtFigure, { art: art, size: size, float: true }));
|
|
73
|
-
const words = (_jsxs(_Fragment, { children: [kicker ? _jsx("p", { className: "tamga-kicker mb-2", children: kicker }) : null, _jsx("h3", { className: "text-display-sm font-semibold tracking-tight text-ink", children: title }), children ? (_jsx("p", { className: "mt-3 max-w-[var(--measure)] text-control leading-relaxed text-ink-soft", children: children })) : null, note ? (_jsx("p", { className: "mt-2 max-w-[var(--measure)] text-small leading-relaxed text-ink-faint", children: note })) : null] }));
|
|
74
|
+
const words = (_jsxs(_Fragment, { children: [kicker ? _jsx("p", { className: "tamga-kicker mb-2", children: kicker }) : null, _jsx("h3", { ...dataProps(rest), className: "text-display-sm font-semibold tracking-tight text-ink", children: title }), children ? (_jsx("p", { className: "mt-3 max-w-[var(--measure)] text-control leading-relaxed text-ink-soft", children: children })) : null, note ? (_jsx("p", { className: "mt-2 max-w-[var(--measure)] text-small leading-relaxed text-ink-faint", children: note })) : null] }));
|
|
74
75
|
if (layout === "banner") {
|
|
75
76
|
return (_jsxs("div", { className: cn("flex flex-col overflow-hidden", className), children: [_jsxs("div", { className: "flex flex-1 flex-col sm:flex-row sm:items-stretch", children: [_jsx("div", { className: "tamga-art-well tamga-art-stage tamga-art-floor sm:border-b-0", children: figure }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-7 px-6 py-7 sm:flex-row sm:items-center sm:justify-between sm:gap-10 sm:px-9 sm:py-9", children: [_jsx("div", { className: "min-w-0", children: words }), action ? (_jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-3", children: action })) : null] })] }), steps?.length ? (_jsx("ol", { className: "tamga-art-steps tamga-art-well", children: steps.map((step, i) => (_jsxs("li", { className: "tamga-art-step", children: [_jsx("span", { className: "tamga-art-step-n", children: String(i + 1).padStart(2, "0") }), _jsx("span", { className: "text-small leading-relaxed text-ink-soft", children: step })] }, step))) })) : null] }));
|
|
76
77
|
}
|
|
@@ -94,8 +95,8 @@ export function EmptyState({ layout = "banner", art, kicker, title, children, ac
|
|
|
94
95
|
* empty area INSIDE a working screen, use EmptyState instead: that one has a
|
|
95
96
|
* card around it because the rest of the screen does too.
|
|
96
97
|
*/
|
|
97
|
-
export function EmptyBlank({ art, kicker, title, children, action, says, size = 230, className, }) {
|
|
98
|
-
return (_jsxs("div", { className: cn("flex w-full flex-col items-center justify-center px-6 py-16 text-center", className), children: [says !== undefined ? (_jsx(SaysBubble, { art: art, size: size, children: says })) : (_jsx(ArtFigure, { art: art, size: size, float: true, ground: false })), _jsx("span", { className: "tamga-art-blank-floor mt-1 mb-8", style: { width: size * 0.72 } }), kicker ? _jsx("p", { className: "tamga-kicker mb-2", children: kicker }) : null, _jsx("h3", { className: "text-display-sm font-semibold tracking-tight text-ink", children: title }), children ? (_jsx("p", { className: "mt-3 max-w-[var(--measure)] text-control leading-relaxed text-ink-soft", children: children })) : null, action ? (_jsx("div", { className: "mt-8 flex flex-wrap items-center justify-center gap-3", children: action })) : null] }));
|
|
98
|
+
export function EmptyBlank({ art, kicker, title, children, action, says, size = 230, className, ...rest }) {
|
|
99
|
+
return (_jsxs("div", { ...dataProps(rest), className: cn("flex w-full flex-col items-center justify-center px-6 py-16 text-center", className), children: [says !== undefined ? (_jsx(SaysBubble, { art: art, size: size, children: says })) : (_jsx(ArtFigure, { art: art, size: size, float: true, ground: false })), _jsx("span", { className: "tamga-art-blank-floor mt-1 mb-8", style: { width: size * 0.72 } }), kicker ? _jsx("p", { className: "tamga-kicker mb-2", children: kicker }) : null, _jsx("h3", { className: "text-display-sm font-semibold tracking-tight text-ink", children: title }), children ? (_jsx("p", { className: "mt-3 max-w-[var(--measure)] text-control leading-relaxed text-ink-soft", children: children })) : null, action ? (_jsx("div", { className: "mt-8 flex flex-wrap items-center justify-center gap-3", children: action })) : null] }));
|
|
99
100
|
}
|
|
100
101
|
/**
|
|
101
102
|
* A choice you are offering — a template, a starting point, a preset.
|
|
@@ -108,6 +109,6 @@ export function EmptyBlank({ art, kicker, title, children, action, says, size =
|
|
|
108
109
|
* banner behind it. A wall of coloured banners would out-shout a real event
|
|
109
110
|
* (Yasa 3); a rule carries the same grouping and outranks nothing.
|
|
110
111
|
*/
|
|
111
|
-
export function EmptyTile({ art, kicker, title, children, tone = 1, onClick, className, }) {
|
|
112
|
-
return (_jsxs("button", { type: "button", onClick: onClick, className: cn("tamga-art-tile", className), children: [_jsx("span", { className: "tamga-art-well flex h-28 items-end justify-center pt-4", children: _jsx(ArtFigure, { art: art, size: 86 }) }), _jsx("span", { className: "tamga-art-spine", "data-tone": tone }), _jsxs("span", { className: "tamga-gutter flex min-w-0 flex-1 flex-col py-4", children: [kicker ? _jsx("span", { className: "tamga-kicker mb-1.5", children: kicker }) : null, _jsx("span", { className: "text-body font-semibold text-ink", children: title }), children ? (_jsx("span", { className: "mt-1 text-small leading-relaxed text-ink-faint", children: children })) : null] })] }));
|
|
112
|
+
export function EmptyTile({ art, kicker, title, children, tone = 1, onClick, className, ...rest }) {
|
|
113
|
+
return (_jsxs("button", { ...dataProps(rest), type: "button", onClick: onClick, className: cn("tamga-art-tile", className), children: [_jsx("span", { className: "tamga-art-well flex h-28 items-end justify-center pt-4", children: _jsx(ArtFigure, { art: art, size: 86 }) }), _jsx("span", { className: "tamga-art-spine", "data-tone": tone }), _jsxs("span", { className: "tamga-gutter flex min-w-0 flex-1 flex-col py-4", children: [kicker ? _jsx("span", { className: "tamga-kicker mb-1.5", children: kicker }) : null, _jsx("span", { className: "text-body font-semibold text-ink", children: title }), children ? (_jsx("span", { className: "mt-1 text-small leading-relaxed text-ink-faint", children: children })) : null] })] }));
|
|
113
114
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Gerekçe: docs/gerekce/04-bos-ve-hata.md
|
|
5
5
|
*/
|
|
6
|
-
export declare function ErrorState({ title, description, detail, onRetry, retryLabel, compact, }: {
|
|
6
|
+
export declare function ErrorState({ title, description, detail, onRetry, retryLabel, compact, ...rest }: {
|
|
7
7
|
title?: string;
|
|
8
8
|
/**
|
|
9
9
|
* plain words: what the person cannot do right now TR: düz sözcüklerle: kişinin şu an ne
|
|
@@ -27,5 +27,7 @@ export declare function ErrorState({ title, description, detail, onRetry, retryL
|
|
|
27
27
|
* da panelin içinde
|
|
28
28
|
*/
|
|
29
29
|
compact?: boolean;
|
|
30
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
31
|
+
[k: `data-${string}`]: unknown;
|
|
30
32
|
}): import("react").JSX.Element;
|
|
31
33
|
//# sourceMappingURL=error-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-state.d.ts","sourceRoot":"","sources":["../../src/components/error-state.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-state.d.ts","sourceRoot":"","sources":["../../src/components/error-state.tsx"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAA6B,EAC7B,WAAW,EACX,MAAM,EACN,OAAO,EACP,UAAwB,EACxB,OAAe,EACf,GAAG,IAAI,EACR,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAwCA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { dataProps } from "../lib/data-props.js";
|
|
2
3
|
import { Icon } from "./icon.js";
|
|
3
4
|
import { Refresh, Warning } from "./icons.js";
|
|
4
5
|
import { Button } from "./button.js";
|
|
@@ -7,8 +8,8 @@ import { Button } from "./button.js";
|
|
|
7
8
|
*
|
|
8
9
|
* Gerekçe: docs/gerekce/04-bos-ve-hata.md
|
|
9
10
|
*/
|
|
10
|
-
export function ErrorState({ title = "Could not load this", description, detail, onRetry, retryLabel = "Try again", compact = false, }) {
|
|
11
|
-
return (_jsxs("div", { role: "alert", "aria-live": "polite", className: `tamga-gutter flex flex-col items-start gap-4 ${compact ? "py-6" : "py-12"}`, children: [_jsx("span", { className: "flex size-10 items-center justify-center border", style: {
|
|
11
|
+
export function ErrorState({ title = "Could not load this", description, detail, onRetry, retryLabel = "Try again", compact = false, ...rest }) {
|
|
12
|
+
return (_jsxs("div", { ...dataProps(rest), role: "alert", "aria-live": "polite", className: `tamga-gutter flex flex-col items-start gap-4 ${compact ? "py-6" : "py-12"}`, children: [_jsx("span", { className: "flex size-10 items-center justify-center border", style: {
|
|
12
13
|
borderRadius: "var(--radius-ctl)",
|
|
13
14
|
borderColor: "var(--color-critical)",
|
|
14
15
|
color: "var(--color-critical)",
|
|
@@ -12,7 +12,7 @@ export type UploadItem = {
|
|
|
12
12
|
url: string;
|
|
13
13
|
name: string;
|
|
14
14
|
};
|
|
15
|
-
export declare function FileUpload({ items, onAdd, onRemove, onReorder, accept, multiple, disabled, labels, className, }: {
|
|
15
|
+
export declare function FileUpload({ items, onAdd, onRemove, onReorder, accept, multiple, disabled, labels, className, ...rest }: {
|
|
16
16
|
items: readonly UploadItem[];
|
|
17
17
|
onAdd?: (files: File[]) => void;
|
|
18
18
|
onRemove?: (id: string) => void;
|
|
@@ -30,5 +30,7 @@ export declare function FileUpload({ items, onAdd, onRemove, onReorder, accept,
|
|
|
30
30
|
primary: string;
|
|
31
31
|
};
|
|
32
32
|
className?: string;
|
|
33
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
34
|
+
[k: `data-${string}`]: unknown;
|
|
33
35
|
}): import("react").JSX.Element;
|
|
34
36
|
//# sourceMappingURL=file-upload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../src/components/file-upload.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../src/components/file-upload.tsx"],"names":[],"mappings":"AAQA;;;;GAIG;AAEH,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,SAAS,EACT,MAAkB,EAClB,QAAe,EACf,QAAgB,EAChB,MAAM,EACN,SAAS,EACT,GAAG,IAAI,EACR,EAAE;IACD,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,4GAA4G;QAC5G,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BA0GA"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useId, useRef, useState } from "react";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
|
+
import { dataProps } from "../lib/data-props.js";
|
|
5
6
|
import { Icon } from "./icon.js";
|
|
6
7
|
import { Upload, Close, CaretLeft, CaretRight } from "./icons.js";
|
|
7
|
-
export function FileUpload({ items, onAdd, onRemove, onReorder, accept = "image/*", multiple = true, disabled = false, labels, className, }) {
|
|
8
|
+
export function FileUpload({ items, onAdd, onRemove, onReorder, accept = "image/*", multiple = true, disabled = false, labels, className, ...rest }) {
|
|
8
9
|
const id = useId();
|
|
9
10
|
const input = useRef(null);
|
|
10
11
|
const [over, setOver] = useState(false);
|
|
@@ -18,7 +19,7 @@ export function FileUpload({ items, onAdd, onRemove, onReorder, accept = "image/
|
|
|
18
19
|
setOver(false);
|
|
19
20
|
take(e.dataTransfer.files);
|
|
20
21
|
}
|
|
21
|
-
return (_jsxs("div", { className: cn("flex flex-col gap-4", className), children: [_jsxs("div", { onDragOver: (e) => {
|
|
22
|
+
return (_jsxs("div", { ...dataProps(rest), className: cn("flex flex-col gap-4", className), children: [_jsxs("div", { onDragOver: (e) => {
|
|
22
23
|
e.preventDefault();
|
|
23
24
|
if (!disabled)
|
|
24
25
|
setOver(true);
|
|
@@ -35,13 +35,15 @@ export type ScoreProps = {
|
|
|
35
35
|
export declare function ScoreRing({ value, label, bandLabel, size, showLabel, segments, tone, }: ScoreProps & {
|
|
36
36
|
segments?: number;
|
|
37
37
|
}): import("react").JSX.Element;
|
|
38
|
-
export declare function ScoreMeter({ value, label, bandLabel, target, delta, segments, tone, }: ScoreProps & {
|
|
38
|
+
export declare function ScoreMeter({ value, label, bandLabel, target, delta, segments, tone, ...rest }: ScoreProps & {
|
|
39
39
|
target?: number;
|
|
40
40
|
delta?: number;
|
|
41
41
|
segments?: number;
|
|
42
|
+
[k: `data-${string}`]: unknown;
|
|
42
43
|
}): import("react").JSX.Element;
|
|
43
|
-
export declare function ScoreMatrix({ value, label, bandLabel, delta, size, }: ScoreProps & {
|
|
44
|
+
export declare function ScoreMatrix({ value, label, bandLabel, delta, size, ...rest }: ScoreProps & {
|
|
44
45
|
delta?: number;
|
|
46
|
+
[k: `data-${string}`]: unknown;
|
|
45
47
|
}): import("react").JSX.Element;
|
|
46
48
|
/** default export keeps the existing call sites working */
|
|
47
49
|
//# sourceMappingURL=gauge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gauge.d.ts","sourceRoot":"","sources":["../../src/components/gauge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gauge.d.ts","sourceRoot":"","sources":["../../src/components/gauge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAQvD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAyBF,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,SAAS,EACT,IAAU,EACV,SAAgB,EAChB,QAAa,EACb,IAAI,GACL,EAAE,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,+BA4EpC;AAID,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,SAAS,EACT,MAAW,EACX,KAAK,EACL,QAAa,EACb,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,UAAU,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAA;CAAE,+BA+CrG;AAID,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,IAAU,EACV,GAAG,IAAI,EACR,EAAE,UAAU,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAA;CAAE,+BAmCjE;AAED,2DAA2D"}
|
package/dist/components/gauge.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { dataProps } from "../lib/data-props.js";
|
|
2
3
|
import { toneOf, neutral } from "./tone.js";
|
|
3
4
|
/* Where the readout changes colour. The thresholds are a kit default; a product
|
|
4
5
|
that scores differently passes its own tone instead. Words are NOT decided
|
|
@@ -44,18 +45,18 @@ export function ScoreRing({ value, label, bandLabel, size = 168, showLabel = tru
|
|
|
44
45
|
}, children: Math.round(v) }), showLabel && labelReads ? (_jsx("text", { x: cx, y: cy + size * 0.26, textAnchor: "middle", shapeRendering: "auto", style: { fontSize: size * 0.065, fontWeight: 500, fill: c.fg }, children: bandLabel })) : null] }));
|
|
45
46
|
}
|
|
46
47
|
/* ---------- B · Linear meter — the same strip, left straight ---------- */
|
|
47
|
-
export function ScoreMeter({ value, label, bandLabel, target = 90, delta, segments = 40, tone, }) {
|
|
48
|
+
export function ScoreMeter({ value, label, bandLabel, target = 90, delta, segments = 40, tone, ...rest }) {
|
|
48
49
|
const v = Math.min(100, Math.max(0, value));
|
|
49
50
|
const c = toneOf(tone ?? band(v));
|
|
50
51
|
const filled = Math.round((v / 100) * segments);
|
|
51
|
-
return (_jsxs("div", { className: "w-full max-w-sm", role: "group", "aria-label": label, children: [_jsxs("div", { className: "flex items-end gap-4", children: [_jsx("span", { className: "font-mono text-display-lg font-bold leading-none tabular-nums text-ink", children: Math.round(v) }), _jsx("span", { className: "mb-1 font-mono text-body text-ink-faint", children: "/ 100" }), delta !== undefined ? (_jsx("span", { className: "mb-1 ml-auto", children: _jsx(Delta, { delta: delta }) })) : null] }), _jsx("p", { className: "mt-2 text-small", style: { color: c.fg }, children: bandLabel }), _jsxs("div", { className: "relative mt-4", children: [_jsx("div", { className: "flex items-end gap-[var(--mark-tick)]", children: Array.from({ length: segments }).map((_, i) => (_jsx("span", { className: "h-6 flex-1", style: { background: i < filled ? c.mark : neutral.line } }, i))) }), _jsx("span", { className: "absolute -top-1 bottom-[var(--dial-label-drop)] w-[var(--mark-tick)]", style: { left: `${target}%`, background: neutral.title } })] }), _jsxs("div", { className: "mt-2 flex justify-between font-mono text-micro text-ink-faint", children: [_jsx("span", { children: "0" }), _jsxs("span", { children: ["target ", target] }), _jsx("span", { children: "100" })] })] }));
|
|
52
|
+
return (_jsxs("div", { ...dataProps(rest), className: "w-full max-w-sm", role: "group", "aria-label": label, children: [_jsxs("div", { className: "flex items-end gap-4", children: [_jsx("span", { className: "font-mono text-display-lg font-bold leading-none tabular-nums text-ink", children: Math.round(v) }), _jsx("span", { className: "mb-1 font-mono text-body text-ink-faint", children: "/ 100" }), delta !== undefined ? (_jsx("span", { className: "mb-1 ml-auto", children: _jsx(Delta, { delta: delta }) })) : null] }), _jsx("p", { className: "mt-2 text-small", style: { color: c.fg }, children: bandLabel }), _jsxs("div", { className: "relative mt-4", children: [_jsx("div", { className: "flex items-end gap-[var(--mark-tick)]", children: Array.from({ length: segments }).map((_, i) => (_jsx("span", { className: "h-6 flex-1", style: { background: i < filled ? c.mark : neutral.line } }, i))) }), _jsx("span", { className: "absolute -top-1 bottom-[var(--dial-label-drop)] w-[var(--mark-tick)]", style: { left: `${target}%`, background: neutral.title } })] }), _jsxs("div", { className: "mt-2 flex justify-between font-mono text-micro text-ink-faint", children: [_jsx("span", { children: "0" }), _jsxs("span", { children: ["target ", target] }), _jsx("span", { children: "100" })] })] }));
|
|
52
53
|
}
|
|
53
54
|
/* ---------- C · Block matrix — one square is one point ---------- */
|
|
54
|
-
export function ScoreMatrix({ value, label, bandLabel, delta, size = 176, }) {
|
|
55
|
+
export function ScoreMatrix({ value, label, bandLabel, delta, size = 176, ...rest }) {
|
|
55
56
|
const v = Math.round(Math.min(100, Math.max(0, value)));
|
|
56
57
|
const c = toneOf(band(v));
|
|
57
58
|
const cell = (size - 9 * 2) / 10;
|
|
58
|
-
return (_jsxs("div", { style: { width: size }, role: "group", "aria-label": label, children: [_jsxs("div", { className: "flex items-end gap-2", children: [_jsx("span", { className: "font-mono text-display font-bold leading-none tabular-nums text-ink", children: v }), delta !== undefined ? (_jsx("span", { className: "mb-1 ml-auto", children: _jsx(Delta, { delta: delta }) })) : null] }), _jsx("p", { className: "mt-1 text-small", style: { color: c.fg }, children: bandLabel }), _jsx("div", { className: "mt-4 grid grid-cols-10 gap-[var(--mark-tick)]", children: Array.from({ length: 100 }).map((_, i) => {
|
|
59
|
+
return (_jsxs("div", { ...dataProps(rest), style: { width: size }, role: "group", "aria-label": label, children: [_jsxs("div", { className: "flex items-end gap-2", children: [_jsx("span", { className: "font-mono text-display font-bold leading-none tabular-nums text-ink", children: v }), delta !== undefined ? (_jsx("span", { className: "mb-1 ml-auto", children: _jsx(Delta, { delta: delta }) })) : null] }), _jsx("p", { className: "mt-1 text-small", style: { color: c.fg }, children: bandLabel }), _jsx("div", { className: "mt-4 grid grid-cols-10 gap-[var(--mark-tick)]", children: Array.from({ length: 100 }).map((_, i) => {
|
|
59
60
|
/* fill bottom-up so the block grows like a column of evidence */
|
|
60
61
|
const row = 9 - Math.floor(i / 10);
|
|
61
62
|
const index = row * 10 + (i % 10);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Sınıfı olan ama bileşeni olmayan şeyler.
|
|
4
4
|
*
|
|
@@ -53,12 +53,14 @@ export declare function Rise({ delay, className, children, ...props }: React.Com
|
|
|
53
53
|
* arka arkaya okurdu — "Kaydet Kaydediliyor" — ve hangisinin geçerli olduğu
|
|
54
54
|
* anlaşılmazdı.
|
|
55
55
|
*/
|
|
56
|
-
export declare function Swap({ showing, a, b, className, }: {
|
|
56
|
+
export declare function Swap({ showing, a, b, className, ...rest }: {
|
|
57
57
|
/** Which side is visible: `"a"` or `"b"`. TR: Hangi taraf görünür: `"a"` ya da `"b"`. */
|
|
58
58
|
showing: "a" | "b";
|
|
59
59
|
a: ReactNode;
|
|
60
60
|
b: ReactNode;
|
|
61
61
|
className?: string;
|
|
62
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
63
|
+
[k: `data-${string}`]: unknown;
|
|
62
64
|
}): import("react").JSX.Element;
|
|
63
65
|
/**
|
|
64
66
|
* Liste satırı — tablo olmayan listeler için.
|
|
@@ -71,12 +73,14 @@ export declare function Swap({ showing, a, b, className, }: {
|
|
|
71
73
|
* ikisi de yoksa düz bir satır kalır. Bu ayrım önemli: tıklanabilir bir
|
|
72
74
|
* `<div>` klavyeyle erişilemez ve ekran okuyucuya hiçbir şey söylemez.
|
|
73
75
|
*/
|
|
74
|
-
export declare function ListRow({ size, href, onClick, className, children, }: {
|
|
76
|
+
export declare function ListRow({ size, href, onClick, className, children, ...rest }: {
|
|
75
77
|
size?: "base" | "sm";
|
|
76
78
|
href?: string;
|
|
77
79
|
onClick?: () => void;
|
|
78
80
|
className?: string;
|
|
79
81
|
children: ReactNode;
|
|
82
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
83
|
+
[k: `data-${string}`]: unknown;
|
|
80
84
|
}): import("react").JSX.Element;
|
|
81
85
|
/**
|
|
82
86
|
* İçinde bir panel AÇILAN tablo hücresi.
|
|
@@ -105,11 +109,13 @@ export declare function CellActions({ className, children, align, ...props }: Om
|
|
|
105
109
|
* Eylem SAĞA yaslı ve başlığın taban çizgisinde. Başka yere koyan bir başlık
|
|
106
110
|
* altındaki listeden kopmuş görünüyor — bu bir tercih değil, ölçülmüş bir şey.
|
|
107
111
|
*/
|
|
108
|
-
export declare function PageBand({ title, subtitle, actions, className, }: {
|
|
112
|
+
export declare function PageBand({ title, subtitle, actions, className, ...rest }: {
|
|
109
113
|
title: string;
|
|
110
114
|
subtitle?: string;
|
|
111
115
|
actions?: ReactNode;
|
|
112
116
|
className?: string;
|
|
117
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
118
|
+
[k: `data-${string}`]: unknown;
|
|
113
119
|
}): import("react").JSX.Element;
|
|
114
120
|
/**
|
|
115
121
|
* Gezinen bağlantı.
|
|
@@ -127,7 +133,20 @@ export declare function PageBand({ title, subtitle, actions, className, }: {
|
|
|
127
133
|
* olmadan açılan sayfa `window.opener` üzerinden seninkini yönlendirebilir —
|
|
128
134
|
* eski ve hâlâ geçerli bir açık.
|
|
129
135
|
*/
|
|
130
|
-
export declare function Link({ external, className, children, ...props }: React.ComponentProps<"a"> & {
|
|
136
|
+
export declare function Link({ external, className, children, href, linkComponent: Router, ...props }: React.ComponentProps<"a"> & {
|
|
131
137
|
external?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* The router's link, so an in-app link does not reload the page. TR: Yönlendiricinin
|
|
140
|
+
* bağlantısı, uygulama içi bir bağlantı sayfayı yeniden yüklemesin diye.
|
|
141
|
+
*
|
|
142
|
+
* Verilmezse düz bir `<a>` çiziliyor. `external` ile birlikte yok sayılıyor: uygulamanın
|
|
143
|
+
* dışına çıkan bir adres istemci yönlendirmesiyle açılamaz.
|
|
144
|
+
*/
|
|
145
|
+
linkComponent?: ComponentType<{
|
|
146
|
+
href: string;
|
|
147
|
+
className?: string;
|
|
148
|
+
children?: ReactNode;
|
|
149
|
+
[k: string]: unknown;
|
|
150
|
+
}>;
|
|
132
151
|
}): import("react").JSX.Element;
|
|
133
152
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/components/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/components/layout.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { dataProps } from "../lib/data-props.js";
|
|
3
4
|
/**
|
|
4
5
|
* Sınıfı olan ama bileşeni olmayan şeyler.
|
|
5
6
|
*
|
|
@@ -54,8 +55,8 @@ export function Rise({ delay = 0, className, children, ...props }) {
|
|
|
54
55
|
* arka arkaya okurdu — "Kaydet Kaydediliyor" — ve hangisinin geçerli olduğu
|
|
55
56
|
* anlaşılmazdı.
|
|
56
57
|
*/
|
|
57
|
-
export function Swap({ showing, a, b, className, }) {
|
|
58
|
-
return (_jsxs("span", { className: cn("tamga-swap", className), children: [_jsx("span", { "data-hidden": showing !== "a", "aria-hidden": showing !== "a", children: a }), _jsx("span", { "data-hidden": showing !== "b", "aria-hidden": showing !== "b", children: b })] }));
|
|
58
|
+
export function Swap({ showing, a, b, className, ...rest }) {
|
|
59
|
+
return (_jsxs("span", { ...dataProps(rest), className: cn("tamga-swap", className), children: [_jsx("span", { "data-hidden": showing !== "a", "aria-hidden": showing !== "a", children: a }), _jsx("span", { "data-hidden": showing !== "b", "aria-hidden": showing !== "b", children: b })] }));
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
62
|
* Liste satırı — tablo olmayan listeler için.
|
|
@@ -68,10 +69,10 @@ export function Swap({ showing, a, b, className, }) {
|
|
|
68
69
|
* ikisi de yoksa düz bir satır kalır. Bu ayrım önemli: tıklanabilir bir
|
|
69
70
|
* `<div>` klavyeyle erişilemez ve ekran okuyucuya hiçbir şey söylemez.
|
|
70
71
|
*/
|
|
71
|
-
export function ListRow({ size = "base", href, onClick, className, children, }) {
|
|
72
|
+
export function ListRow({ size = "base", href, onClick, className, children, ...rest }) {
|
|
72
73
|
const cls = cn("tamga-list-row", size === "sm" && "tamga-list-row-sm", className);
|
|
73
74
|
if (href) {
|
|
74
|
-
return (_jsx("a", { href: href, className: cls, children: children }));
|
|
75
|
+
return (_jsx("a", { ...dataProps(rest), href: href, className: cls, children: children }));
|
|
75
76
|
}
|
|
76
77
|
if (onClick) {
|
|
77
78
|
return (_jsx("button", { type: "button", onClick: onClick, className: cn(cls, "w-full text-left"), children: children }));
|
|
@@ -108,8 +109,8 @@ export function CellActions({ className, children, align = "end", ...props
|
|
|
108
109
|
* Eylem SAĞA yaslı ve başlığın taban çizgisinde. Başka yere koyan bir başlık
|
|
109
110
|
* altındaki listeden kopmuş görünüyor — bu bir tercih değil, ölçülmüş bir şey.
|
|
110
111
|
*/
|
|
111
|
-
export function PageBand({ title, subtitle, actions, className, }) {
|
|
112
|
-
return (_jsxs("div", { className: cn("tamga-section tamga-gutter flex flex-wrap items-center gap-4 py-4", className), children: [_jsxs("div", { className: "min-w-0", children: [_jsx("h2", { className: "text-title font-semibold text-ink", children: title }), subtitle ? _jsx("p", { className: "text-small text-ink-faint", children: subtitle }) : null] }), actions ? _jsx("div", { className: "ml-auto flex flex-wrap items-center gap-2", children: actions }) : null] }));
|
|
112
|
+
export function PageBand({ title, subtitle, actions, className, ...rest }) {
|
|
113
|
+
return (_jsxs("div", { ...dataProps(rest), className: cn("tamga-section tamga-gutter flex flex-wrap items-center gap-4 py-4", className), children: [_jsxs("div", { className: "min-w-0", children: [_jsx("h2", { className: "text-title font-semibold text-ink", children: title }), subtitle ? _jsx("p", { className: "text-small text-ink-faint", children: subtitle }) : null] }), actions ? _jsx("div", { className: "ml-auto flex flex-wrap items-center gap-2", children: actions }) : null] }));
|
|
113
114
|
}
|
|
114
115
|
/**
|
|
115
116
|
* Gezinen bağlantı.
|
|
@@ -127,6 +128,15 @@ export function PageBand({ title, subtitle, actions, className, }) {
|
|
|
127
128
|
* olmadan açılan sayfa `window.opener` üzerinden seninkini yönlendirebilir —
|
|
128
129
|
* eski ve hâlâ geçerli bir açık.
|
|
129
130
|
*/
|
|
130
|
-
export function Link({ external = false, className, children, ...props }) {
|
|
131
|
-
|
|
131
|
+
export function Link({ external = false, className, children, href, linkComponent: Router, ...props }) {
|
|
132
|
+
const shared = {
|
|
133
|
+
className: cn("tamga-link", className),
|
|
134
|
+
target: external ? "_blank" : undefined,
|
|
135
|
+
rel: external ? "noopener noreferrer" : undefined,
|
|
136
|
+
...props,
|
|
137
|
+
};
|
|
138
|
+
/* YÖNLENDİRİCİ İKİ DURUMDA DEVREDE DEĞİL. Dış bağlantıda, çünkü uygulamanın dışına çıkan bir
|
|
139
|
+
adres istemci yönlendirmesiyle açılamaz ve denemek sessizce bir sekme kaybettirir. Ve adres
|
|
140
|
+
hiç yokken, çünkü yönlendiricinin bağlantısı adressiz çağrılamaz — `<a>` çağrılabilir. */
|
|
141
|
+
return Router && !external && href !== undefined ? (_jsx(Router, { ...shared, href: href, children: children })) : (_jsx("a", { ...shared, href: href, children: children }));
|
|
132
142
|
}
|
|
@@ -14,7 +14,7 @@ export type LogLine = {
|
|
|
14
14
|
text: string;
|
|
15
15
|
tone?: Tone;
|
|
16
16
|
};
|
|
17
|
-
export declare function LogView({ lines, label, height, follow, wrap, className, }: {
|
|
17
|
+
export declare function LogView({ lines, label, height, follow, wrap, className, ...rest }: {
|
|
18
18
|
lines: readonly LogLine[];
|
|
19
19
|
/**
|
|
20
20
|
* The region's name; it shows in the landmark list for keyboard navigation. TR: Bölgenin adı;
|
|
@@ -30,5 +30,7 @@ export declare function LogView({ lines, label, height, follow, wrap, className,
|
|
|
30
30
|
*/
|
|
31
31
|
wrap?: boolean;
|
|
32
32
|
className?: string;
|
|
33
|
+
/** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
|
|
34
|
+
[k: `data-${string}`]: unknown;
|
|
33
35
|
}): import("react").JSX.Element;
|
|
34
36
|
//# sourceMappingURL=log-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-view.d.ts","sourceRoot":"","sources":["../../src/components/log-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"log-view.d.ts","sourceRoot":"","sources":["../../src/components/log-view.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAE9C;;;;GAIG;AAEH,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,MAAY,EACZ,MAAa,EACb,IAAY,EACZ,SAAS,EACT,GAAG,IAAI,EACR,EAAE;IACD,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAoDA"}
|