@orangecheck/app-design 0.0.0-stage → 0.1.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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -2
  3. package/dist/brand.d.mts +46 -0
  4. package/dist/brand.d.ts +46 -0
  5. package/dist/brand.js +142 -0
  6. package/dist/brand.js.map +1 -0
  7. package/dist/brand.mjs +134 -0
  8. package/dist/brand.mjs.map +1 -0
  9. package/dist/chrome.d.mts +64 -0
  10. package/dist/chrome.d.ts +64 -0
  11. package/dist/chrome.js +479 -0
  12. package/dist/chrome.js.map +1 -0
  13. package/dist/chrome.mjs +447 -0
  14. package/dist/chrome.mjs.map +1 -0
  15. package/dist/components.d.mts +474 -0
  16. package/dist/components.d.ts +474 -0
  17. package/dist/components.js +619 -0
  18. package/dist/components.js.map +1 -0
  19. package/dist/components.mjs +588 -0
  20. package/dist/components.mjs.map +1 -0
  21. package/dist/index.d.mts +21 -0
  22. package/dist/index.d.ts +21 -0
  23. package/dist/index.js +1595 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/index.mjs +1446 -0
  26. package/dist/index.mjs.map +1 -0
  27. package/dist/primitives.d.mts +140 -0
  28. package/dist/primitives.d.ts +140 -0
  29. package/dist/primitives.js +706 -0
  30. package/dist/primitives.js.map +1 -0
  31. package/dist/primitives.mjs +606 -0
  32. package/dist/primitives.mjs.map +1 -0
  33. package/dist/styles/fonts/inter-latin-ext.woff2 +0 -0
  34. package/dist/styles/fonts/inter-latin.woff2 +0 -0
  35. package/dist/styles/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
  36. package/dist/styles/fonts/jetbrains-mono-latin.woff2 +0 -0
  37. package/dist/styles/fonts.css +74 -0
  38. package/dist/styles/motion.css +80 -0
  39. package/dist/styles/theme.css +226 -0
  40. package/dist/styles/tokens.css +152 -0
  41. package/dist/styles.css +14 -0
  42. package/dist/tokens.d.mts +42 -0
  43. package/dist/tokens.d.ts +42 -0
  44. package/dist/tokens.js +50 -0
  45. package/dist/tokens.js.map +1 -0
  46. package/dist/tokens.mjs +45 -0
  47. package/dist/tokens.mjs.map +1 -0
  48. package/package.json +114 -4
@@ -0,0 +1,619 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+ var clsx = require('clsx');
5
+ var tailwindMerge = require('tailwind-merge');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var classVarianceAuthority = require('class-variance-authority');
8
+ var lucideReact = require('lucide-react');
9
+
10
+ var merge = tailwindMerge.extendTailwindMerge({
11
+ extend: {
12
+ classGroups: {
13
+ "oca-type": [
14
+ "oca-display-1",
15
+ "oca-display-2",
16
+ "oca-display-3",
17
+ "oca-title",
18
+ "oca-title-sm",
19
+ "oca-eyebrow",
20
+ "oca-lead",
21
+ "oca-body",
22
+ "oca-numeral"
23
+ ]
24
+ }
25
+ }
26
+ });
27
+ function cn(...inputs) {
28
+ return merge(clsx.clsx(inputs));
29
+ }
30
+ function Eyebrow({ className, onInk, ...props }) {
31
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("oca-eyebrow", onInk && "text-oca-ink-eyebrow", className), ...props });
32
+ }
33
+ function Display({ level = 2, as, className, ...props }) {
34
+ const tag = as ?? `h${level}`;
35
+ return react.createElement(tag, { className: cn(`oca-display-${level}`, className), ...props });
36
+ }
37
+ function Accent({ children, className }) {
38
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-oca-accent-display", className), children });
39
+ }
40
+ function Lead({ className, ...props }) {
41
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("oca-lead max-w-[40rem]", className), ...props });
42
+ }
43
+ function Footnote({ className, ...props }) {
44
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-[0.9375rem] text-muted-foreground", className), ...props });
45
+ }
46
+ function Prose({ className, ...props }) {
47
+ return /* @__PURE__ */ jsxRuntime.jsx(
48
+ "div",
49
+ {
50
+ className: cn(
51
+ "max-w-[42rem] text-[1.0625rem] leading-[1.7] text-muted-foreground",
52
+ "[&_h2]:oca-display-3 [&_h2]:mb-4 [&_h2]:mt-14 [&_h2]:text-foreground",
53
+ "[&_h3]:oca-title [&_h3]:mb-3 [&_h3]:mt-10 [&_h3]:text-foreground",
54
+ "[&_p]:my-4 [&_strong]:font-medium [&_strong]:text-foreground",
55
+ "[&_a]:text-foreground [&_a]:underline [&_a]:decoration-border [&_a]:underline-offset-4 hover:[&_a]:decoration-foreground",
56
+ "[&_ul]:my-4 [&_ul]:list-disc [&_ul]:pl-5 [&_li]:my-1.5 [&_code]:text-foreground",
57
+ className
58
+ ),
59
+ ...props
60
+ }
61
+ );
62
+ }
63
+ var sectionVariants = classVarianceAuthority.cva("relative w-full overflow-x-clip", {
64
+ variants: {
65
+ tone: {
66
+ canvas: "bg-background text-foreground",
67
+ card: "bg-card text-card-foreground",
68
+ ink: "bg-oca-ink text-oca-ink-foreground",
69
+ brand: "bg-brand text-brand-foreground"
70
+ },
71
+ space: {
72
+ none: "",
73
+ sm: "py-12 md:py-16",
74
+ md: "oca-section",
75
+ lg: "py-24 md:py-40"
76
+ }
77
+ },
78
+ defaultVariants: { tone: "canvas", space: "md" }
79
+ });
80
+ function Section({ tone, space, contained = true, className, children, ...props }) {
81
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn(sectionVariants({ tone, space }), className), ...props, children: contained ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-container", children }) : children });
82
+ }
83
+ function Container({ className, ...props }) {
84
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("oca-container", className), ...props });
85
+ }
86
+ function SectionIntro({
87
+ className,
88
+ align = "start",
89
+ ...props
90
+ }) {
91
+ return /* @__PURE__ */ jsxRuntime.jsx(
92
+ "div",
93
+ {
94
+ className: cn(
95
+ "flex flex-col gap-4 md:gap-5",
96
+ align === "center" && "mx-auto items-center text-center",
97
+ className
98
+ ),
99
+ ...props
100
+ }
101
+ );
102
+ }
103
+ var badgeVariants = classVarianceAuthority.cva(
104
+ "inline-flex h-6 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 text-[0.8125rem] font-medium leading-none",
105
+ {
106
+ variants: {
107
+ tone: {
108
+ neutral: "border-border bg-card text-foreground",
109
+ muted: "border-transparent bg-muted text-muted-foreground",
110
+ brand: "border-transparent bg-[color-mix(in_oklab,var(--oca-orange)_12%,var(--card))] text-oca-accent-ink",
111
+ success: "border-transparent bg-[color-mix(in_oklab,var(--success)_12%,var(--card))] text-success",
112
+ warning: "border-transparent bg-[color-mix(in_oklab,var(--warning)_14%,var(--card))] text-warning",
113
+ danger: "border-transparent bg-[color-mix(in_oklab,var(--destructive)_12%,var(--card))] text-destructive",
114
+ info: "border-transparent bg-[color-mix(in_oklab,var(--info)_12%,var(--card))] text-info",
115
+ ink: "border-transparent bg-oca-ink text-oca-ink-foreground",
116
+ onInk: "border-white/15 bg-white/5 text-white/90"
117
+ }
118
+ },
119
+ defaultVariants: { tone: "neutral" }
120
+ }
121
+ );
122
+ function Badge({ className, tone, ...props }) {
123
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-ui": "badge", className: cn(badgeVariants({ tone }), className), ...props });
124
+ }
125
+ var cardVariants = classVarianceAuthority.cva("relative rounded-[1.25rem] border", {
126
+ variants: {
127
+ tone: {
128
+ default: "border-border bg-card text-card-foreground",
129
+ sunken: "border-transparent bg-muted text-foreground",
130
+ ink: "border-oca-ink-line bg-oca-ink-card text-oca-ink-foreground",
131
+ outline: "border-border bg-transparent text-foreground"
132
+ },
133
+ padding: {
134
+ none: "",
135
+ sm: "p-5",
136
+ md: "p-6 md:p-8",
137
+ lg: "p-8 md:p-10"
138
+ },
139
+ interactive: {
140
+ true: "transition-colors hover:border-oca-hairline-strong focus-within:border-oca-hairline-strong",
141
+ false: ""
142
+ }
143
+ },
144
+ defaultVariants: { tone: "default", padding: "md", interactive: false }
145
+ });
146
+ var Card = react.forwardRef(function Card2({ className, tone, padding, interactive, ...props }, ref) {
147
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-ui": "card", className: cn(cardVariants({ tone, padding, interactive }), className), ...props });
148
+ });
149
+ function CardNumeral({ className, ...props }) {
150
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("oca-numeral block", className), ...props });
151
+ }
152
+ function CardTitle({ className, ...props }) {
153
+ return /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("oca-title flex flex-wrap items-center gap-2.5", className), ...props });
154
+ }
155
+ var pad = (n) => String(n + 1).padStart(2, "0");
156
+ function StepGrid({ items, look = "cards", className }) {
157
+ const cols = items.length >= 3 ? "md:grid-cols-3" : items.length === 2 ? "md:grid-cols-2" : "";
158
+ return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("grid gap-4 md:gap-5", cols, className), children: items.map(
159
+ (it, i) => look === "plain" ? /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex flex-col gap-3 pr-4", children: [
160
+ /* @__PURE__ */ jsxRuntime.jsx(CardNumeral, { children: it.numeral ?? pad(i) }),
161
+ /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { className: "oca-title-sm", children: [
162
+ it.title,
163
+ it.badge ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { children: it.badge }) : null
164
+ ] }),
165
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-body text-[0.9375rem]", children: it.body })
166
+ ] }, i) : look === "ink" ? /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { tone: "ink", padding: "md", className: "h-full", children: [
167
+ /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { className: "text-oca-ink-title", children: [
168
+ it.title,
169
+ it.badge ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { tone: "onInk", children: it.badge }) : null
170
+ ] }),
171
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 text-[1rem] leading-relaxed text-oca-ink-muted", children: it.body })
172
+ ] }) }, i) : /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { padding: "md", className: "flex h-full flex-col gap-3", children: [
173
+ /* @__PURE__ */ jsxRuntime.jsx(CardNumeral, { children: it.numeral ?? pad(i) }),
174
+ /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { children: [
175
+ it.title,
176
+ it.badge ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { children: it.badge }) : null
177
+ ] }),
178
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-body", children: it.body })
179
+ ] }) }, i)
180
+ ) });
181
+ }
182
+ var KIND = {
183
+ package: "text-oca-code-package",
184
+ tag: "text-oca-code-tag",
185
+ link: "text-oca-code-link"
186
+ };
187
+ function PackageCard({ items, className }) {
188
+ return /* @__PURE__ */ jsxRuntime.jsx(
189
+ "div",
190
+ {
191
+ className: cn(
192
+ "grid gap-x-10 gap-y-7 rounded-[1.25rem] border border-oca-ink-line bg-oca-ink-card p-6 text-oca-ink-foreground md:grid-cols-2 md:p-9",
193
+ className
194
+ ),
195
+ children: items.map((it, i) => {
196
+ const code = /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[0.9375rem]", KIND[it.kind ?? "package"]), children: it.code });
197
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1.5", children: [
198
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-[1.125rem] font-semibold tracking-[-0.01em] text-oca-ink-title", children: it.title }),
199
+ it.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href, className: "w-fit underline decoration-transparent underline-offset-4 hover:decoration-current", children: code }) : code,
200
+ it.note ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[0.9375rem] leading-relaxed text-oca-ink-subtle", children: [
201
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, children: "// " }),
202
+ it.note
203
+ ] }) : null
204
+ ] }, i);
205
+ })
206
+ }
207
+ );
208
+ }
209
+ function CodeBlock({
210
+ code,
211
+ caption,
212
+ className
213
+ }) {
214
+ return /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: cn("overflow-hidden rounded-[1.25rem] border border-oca-ink-line bg-oca-ink-card", className), children: [
215
+ caption ? /* @__PURE__ */ jsxRuntime.jsx("figcaption", { className: "border-b border-oca-ink-line px-5 py-3 text-[0.8125rem] text-oca-ink-subtle", children: caption }) : null,
216
+ /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "overflow-x-auto p-5 font-mono text-[0.875rem] leading-relaxed text-oca-ink-muted", children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: code }) })
217
+ ] });
218
+ }
219
+ var LABEL = {
220
+ yes: "Yes",
221
+ testing: "In testing",
222
+ "not-yet": "Not yet",
223
+ no: "No"
224
+ };
225
+ var TONE = {
226
+ yes: "text-oca-accent-ink",
227
+ testing: "text-foreground",
228
+ "not-yet": "text-muted-foreground",
229
+ no: "text-muted-foreground"
230
+ };
231
+ function TruthTable({
232
+ rows,
233
+ statusHeading = "Status",
234
+ whatHeading = "What",
235
+ className
236
+ }) {
237
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("overflow-hidden rounded-xl border border-oca-hairline-strong", className), children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full border-collapse text-left text-[0.9375rem] md:text-[1rem]", children: [
238
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-oca-table-head", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
239
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "w-[30%] border-b border-oca-hairline-strong px-4 py-3 font-semibold md:w-[22%]", children: statusHeading }),
240
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "border-b border-l border-oca-hairline-strong px-4 py-3 font-semibold", children: whatHeading })
241
+ ] }) }),
242
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "bg-card", children: rows.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "align-top", children: [
243
+ /* @__PURE__ */ jsxRuntime.jsx(
244
+ "td",
245
+ {
246
+ className: cn(
247
+ "border-t border-oca-hairline-strong px-4 py-3 font-medium",
248
+ i === 0 && "border-t-0",
249
+ TONE[r.status]
250
+ ),
251
+ children: LABEL[r.status]
252
+ }
253
+ ),
254
+ /* @__PURE__ */ jsxRuntime.jsx(
255
+ "td",
256
+ {
257
+ className: cn(
258
+ "border-l border-t border-oca-hairline-strong px-4 py-3 leading-relaxed",
259
+ i === 0 && "border-t-0"
260
+ ),
261
+ children: r.what
262
+ }
263
+ )
264
+ ] }, i)) })
265
+ ] }) });
266
+ }
267
+ var INT = new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 });
268
+ var COMPACT = new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 });
269
+ function satsText(value, opts = {}) {
270
+ if (value == null || !Number.isFinite(value)) return null;
271
+ const whole = Math.trunc(value);
272
+ const body = (opts.compact ? COMPACT : INT).format(Math.abs(whole));
273
+ const sign = whole < 0 ? "\u2212" : opts.signed && whole > 0 ? "+" : "";
274
+ const unit = opts.unit === "none" ? "" : whole === 1 || whole === -1 ? " sat" : " sats";
275
+ return `${sign}${body}${unit}`;
276
+ }
277
+ function Sats({ value, unit, compact, signed, unknown = "\u2014", className, ...props }) {
278
+ const text = satsText(value, { unit, compact, signed });
279
+ if (text === null) {
280
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("oca-tabular text-muted-foreground", className), ...props, children: [
281
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, children: unknown }),
282
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "unknown" })
283
+ ] });
284
+ }
285
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("oca-tabular whitespace-nowrap", className), ...props, children: text });
286
+ }
287
+ function UsdApprox({
288
+ sats,
289
+ usdPerBtc,
290
+ className
291
+ }) {
292
+ if (sats == null || usdPerBtc == null || !Number.isFinite(sats) || !Number.isFinite(usdPerBtc)) return null;
293
+ const usd = sats / 1e8 * usdPerBtc;
294
+ const text = new Intl.NumberFormat("en-US", {
295
+ style: "currency",
296
+ currency: "USD",
297
+ maximumFractionDigits: usd < 1 ? 4 : 2
298
+ }).format(usd);
299
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("oca-tabular text-muted-foreground", className), children: [
300
+ "\u2248 ",
301
+ text
302
+ ] });
303
+ }
304
+ function SatsFigure({
305
+ label,
306
+ value,
307
+ hint,
308
+ className
309
+ }) {
310
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1.5", className), children: [
311
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.9375rem] text-muted-foreground", children: label }),
312
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "oca-display-3 oca-tabular", children: [
313
+ /* @__PURE__ */ jsxRuntime.jsx(Sats, { value, unit: "none" }),
314
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-[0.5em] tracking-normal text-muted-foreground", children: "sats" })
315
+ ] }),
316
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.875rem] text-muted-foreground", children: hint }) : null
317
+ ] });
318
+ }
319
+ var TOP = "0,3 2,2 6,4 14,0 16,1 6,6";
320
+ var LEFT = "0,3 6,6 6,8 0,5";
321
+ var RIGHT = "6,6 16,1 16,3 6,8";
322
+ var MARK_FACES = { top: "#FED8AB", left: "#FB933C", right: "#EA580B" };
323
+ function Mark({ title, size, className, ...rest }) {
324
+ return /* @__PURE__ */ jsxRuntime.jsxs(
325
+ "svg",
326
+ {
327
+ viewBox: "0 0 16 8",
328
+ width: size,
329
+ height: size ? size / 2 : void 0,
330
+ role: title ? "img" : void 0,
331
+ "aria-hidden": title ? void 0 : true,
332
+ className: cn("shrink-0", className),
333
+ ...rest,
334
+ children: [
335
+ title ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: title }) : null,
336
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: LEFT, fill: MARK_FACES.left }),
337
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: RIGHT, fill: MARK_FACES.right }),
338
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: TOP, fill: MARK_FACES.top })
339
+ ]
340
+ }
341
+ );
342
+ }
343
+ function PageHeader({
344
+ eyebrow,
345
+ title,
346
+ description,
347
+ actions,
348
+ className
349
+ }) {
350
+ return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: cn("flex flex-col gap-5 md:flex-row md:items-end md:justify-between", className), children: [
351
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex max-w-[44rem] flex-col gap-3", children: [
352
+ eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oca-eyebrow", children: eyebrow }) : null,
353
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "oca-display-3", children: title }),
354
+ description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oca-body text-[1.0625rem]", children: description }) : null
355
+ ] }),
356
+ actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-3", children: actions }) : null
357
+ ] });
358
+ }
359
+ function StatCard({
360
+ label,
361
+ value,
362
+ hint,
363
+ className
364
+ }) {
365
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2 rounded-[1.25rem] border border-border bg-card p-5 md:p-6", className), children: [
366
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.875rem] text-muted-foreground", children: label }),
367
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oca-tabular text-[1.75rem] leading-tight tracking-[-0.02em]", children: value }),
368
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null
369
+ ] });
370
+ }
371
+ function StatGrid({ className, ...props }) {
372
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-2 gap-3 md:grid-cols-4 md:gap-4", className), ...props });
373
+ }
374
+ function KeyValueList({ items, className }) {
375
+ return /* @__PURE__ */ jsxRuntime.jsx("dl", { className: cn("divide-y divide-border rounded-[1.25rem] border border-border bg-card", className), children: items.map((it, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 px-5 py-3.5 sm:flex-row sm:items-baseline sm:gap-6", children: [
376
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "shrink-0 text-[0.875rem] text-muted-foreground sm:w-48", children: it.label }),
377
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: cn("min-w-0 break-words text-[0.9375rem]", it.mono && "font-mono text-[0.875rem]"), children: it.value })
378
+ ] }, i)) });
379
+ }
380
+ function DataTable({
381
+ columns,
382
+ rows,
383
+ rowKey,
384
+ empty,
385
+ caption,
386
+ className
387
+ }) {
388
+ if (rows.length === 0 && empty) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: empty });
389
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("overflow-x-auto rounded-[1.25rem] border border-border bg-card", className), children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full border-collapse text-left text-[0.9375rem]", children: [
390
+ caption ? /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "sr-only", children: caption }) : null,
391
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b border-border", children: columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
392
+ "th",
393
+ {
394
+ scope: "col",
395
+ className: cn(
396
+ "whitespace-nowrap px-5 py-3 text-[0.8125rem] font-medium text-muted-foreground",
397
+ c.align === "end" && "text-right",
398
+ c.wide && "hidden md:table-cell"
399
+ ),
400
+ children: c.header
401
+ },
402
+ c.key
403
+ )) }) }),
404
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-border", children: rows.map((r, i) => /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "transition-colors hover:bg-accent/60", children: columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
405
+ "td",
406
+ {
407
+ className: cn(
408
+ "px-5 py-3.5 align-middle",
409
+ c.align === "end" && "text-right",
410
+ c.wide && "hidden md:table-cell"
411
+ ),
412
+ children: c.cell(r)
413
+ },
414
+ c.key
415
+ )) }, rowKey(r, i))) })
416
+ ] }) });
417
+ }
418
+ function EmptyState({
419
+ title,
420
+ children,
421
+ action,
422
+ className
423
+ }) {
424
+ return /* @__PURE__ */ jsxRuntime.jsxs(
425
+ "div",
426
+ {
427
+ className: cn(
428
+ "flex flex-col items-center gap-4 rounded-[1.25rem] border border-dashed border-oca-hairline-strong px-6 py-12 text-center",
429
+ className
430
+ ),
431
+ children: [
432
+ /* @__PURE__ */ jsxRuntime.jsx(Mark, { size: 56 }),
433
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "oca-title-sm", children: title }),
434
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-body max-w-md text-[0.9375rem]", children }) : null,
435
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-wrap justify-center gap-3", children: action }) : null
436
+ ]
437
+ }
438
+ );
439
+ }
440
+ var NOTICE = {
441
+ neutral: "border-border bg-card",
442
+ info: "border-[color-mix(in_oklab,var(--info)_30%,var(--border))] bg-[color-mix(in_oklab,var(--info)_6%,var(--card))]",
443
+ success: "border-[color-mix(in_oklab,var(--success)_30%,var(--border))] bg-[color-mix(in_oklab,var(--success)_6%,var(--card))]",
444
+ warning: "border-[color-mix(in_oklab,var(--warning)_35%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_7%,var(--card))]",
445
+ danger: "border-[color-mix(in_oklab,var(--destructive)_32%,var(--border))] bg-[color-mix(in_oklab,var(--destructive)_6%,var(--card))]",
446
+ brand: "border-[color-mix(in_oklab,var(--oca-orange)_35%,var(--border))] bg-[color-mix(in_oklab,var(--oca-orange)_7%,var(--card))]"
447
+ };
448
+ var NOTICE_TITLE = {
449
+ neutral: "text-foreground",
450
+ info: "text-info",
451
+ success: "text-success",
452
+ warning: "text-warning",
453
+ danger: "text-destructive",
454
+ brand: "text-oca-accent-ink"
455
+ };
456
+ function Notice({
457
+ tone = "neutral",
458
+ title,
459
+ children,
460
+ action,
461
+ className
462
+ }) {
463
+ return /* @__PURE__ */ jsxRuntime.jsxs(
464
+ "div",
465
+ {
466
+ role: tone === "danger" || tone === "warning" ? "alert" : "note",
467
+ className: cn(
468
+ "flex flex-col gap-3 rounded-2xl border px-5 py-4 sm:flex-row sm:items-start sm:justify-between",
469
+ NOTICE[tone],
470
+ className
471
+ ),
472
+ children: [
473
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
474
+ title ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-[0.9375rem] font-medium", NOTICE_TITLE[tone]), children: title }) : null,
475
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[0.9375rem] leading-relaxed text-foreground/85", children }) : null
476
+ ] }),
477
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: action }) : null
478
+ ]
479
+ }
480
+ );
481
+ }
482
+ function middle(v, head, tail) {
483
+ return v.length <= head + tail + 1 ? v : `${v.slice(0, head)}\u2026${v.slice(-tail)}`;
484
+ }
485
+ function useCopy(timeoutMs = 1600) {
486
+ const [copied, setCopied] = react.useState(false);
487
+ const t = react.useRef(null);
488
+ react.useEffect(() => () => {
489
+ if (t.current) clearTimeout(t.current);
490
+ }, []);
491
+ const copy = react.useCallback(
492
+ async (text) => {
493
+ try {
494
+ await navigator.clipboard.writeText(text);
495
+ setCopied(true);
496
+ if (t.current) clearTimeout(t.current);
497
+ t.current = setTimeout(() => setCopied(false), timeoutMs);
498
+ } catch {
499
+ setCopied(false);
500
+ }
501
+ },
502
+ [timeoutMs]
503
+ );
504
+ return { copied, copy };
505
+ }
506
+ function CopyButton({ value, label = "Copy", className }) {
507
+ const { copied, copy } = useCopy();
508
+ return /* @__PURE__ */ jsxRuntime.jsxs(
509
+ "button",
510
+ {
511
+ type: "button",
512
+ onClick: () => void copy(value),
513
+ "aria-label": copied ? "Copied" : label,
514
+ className: cn(
515
+ "inline-flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
516
+ className
517
+ ),
518
+ children: [
519
+ copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-4" }),
520
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-live": "polite", className: "sr-only", children: copied ? "Copied" : "" })
521
+ ]
522
+ }
523
+ );
524
+ }
525
+ function HashChip({
526
+ value,
527
+ head = 8,
528
+ tail = 6,
529
+ copy = true,
530
+ href,
531
+ className
532
+ }) {
533
+ const shown = middle(value, head, tail);
534
+ const text = /* @__PURE__ */ jsxRuntime.jsx("span", { title: value, className: "font-mono text-[0.875rem]", children: shown });
535
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("inline-flex max-w-full items-center gap-1", className), children: [
536
+ href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: "underline decoration-border underline-offset-4 hover:decoration-foreground", children: text }) : text,
537
+ copy ? /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { value, label: "Copy full value" }) : null
538
+ ] });
539
+ }
540
+ function ProgressSteps({ steps, className }) {
541
+ return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("flex flex-col gap-0", className), children: steps.map((s, i) => {
542
+ const last = i === steps.length - 1;
543
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "relative flex gap-4 pb-6 last:pb-0", "aria-current": s.state === "current" ? "step" : void 0, children: [
544
+ !last ? /* @__PURE__ */ jsxRuntime.jsx(
545
+ "span",
546
+ {
547
+ "aria-hidden": true,
548
+ className: cn(
549
+ "absolute left-[11px] top-7 h-[calc(100%-1.5rem)] w-px",
550
+ s.state === "done" ? "bg-foreground/30" : "bg-border"
551
+ )
552
+ }
553
+ ) : null,
554
+ /* @__PURE__ */ jsxRuntime.jsx(
555
+ "span",
556
+ {
557
+ className: cn(
558
+ "relative z-10 mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full border text-[0.75rem] oca-tabular",
559
+ s.state === "done" && "border-primary bg-primary text-primary-foreground",
560
+ s.state === "current" && "border-brand bg-card text-oca-accent-ink",
561
+ s.state === "upcoming" && "border-border bg-card text-muted-foreground",
562
+ s.state === "blocked" && "border-destructive bg-card text-destructive"
563
+ ),
564
+ children: s.state === "done" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-3.5", strokeWidth: 3 }) : String(i + 1).padStart(2, "0")
565
+ }
566
+ ),
567
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
568
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[0.9375rem]", s.state === "upcoming" ? "text-muted-foreground" : "font-medium"), children: s.label }),
569
+ s.hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.875rem] leading-snug text-muted-foreground", children: s.hint }) : null
570
+ ] })
571
+ ] }, i);
572
+ }) });
573
+ }
574
+ function ActivityList({ items, empty, className }) {
575
+ if (items.length === 0 && empty) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: empty });
576
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("divide-y divide-border rounded-[1.25rem] border border-border bg-card", className), children: items.map((it) => {
577
+ const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 px-5 py-4", children: [
578
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
579
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[0.9375rem]", children: it.title }),
580
+ it.meta ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[0.8125rem] text-muted-foreground", children: it.meta }) : null
581
+ ] }),
582
+ it.trailing ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 text-right", children: it.trailing }) : null
583
+ ] });
584
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: it.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href, className: "block transition-colors hover:bg-accent/60", children: body }) : body }, it.id);
585
+ }) });
586
+ }
587
+
588
+ exports.Accent = Accent;
589
+ exports.ActivityList = ActivityList;
590
+ exports.CodeBlock = CodeBlock;
591
+ exports.Container = Container;
592
+ exports.CopyButton = CopyButton;
593
+ exports.DataTable = DataTable;
594
+ exports.Display = Display;
595
+ exports.EmptyState = EmptyState;
596
+ exports.Eyebrow = Eyebrow;
597
+ exports.Footnote = Footnote;
598
+ exports.HashChip = HashChip;
599
+ exports.KeyValueList = KeyValueList;
600
+ exports.Lead = Lead;
601
+ exports.Notice = Notice;
602
+ exports.PackageCard = PackageCard;
603
+ exports.PageHeader = PageHeader;
604
+ exports.ProgressSteps = ProgressSteps;
605
+ exports.Prose = Prose;
606
+ exports.Sats = Sats;
607
+ exports.SatsFigure = SatsFigure;
608
+ exports.Section = Section;
609
+ exports.SectionIntro = SectionIntro;
610
+ exports.StatCard = StatCard;
611
+ exports.StatGrid = StatGrid;
612
+ exports.StepGrid = StepGrid;
613
+ exports.TruthTable = TruthTable;
614
+ exports.UsdApprox = UsdApprox;
615
+ exports.satsText = satsText;
616
+ exports.sectionVariants = sectionVariants;
617
+ exports.useCopy = useCopy;
618
+ //# sourceMappingURL=components.js.map
619
+ //# sourceMappingURL=components.js.map