@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
package/dist/index.js ADDED
@@ -0,0 +1,1595 @@
1
+ 'use strict';
2
+
3
+ var reactSlot = require('@radix-ui/react-slot');
4
+ var classVarianceAuthority = require('class-variance-authority');
5
+ var react = require('react');
6
+ var clsx = require('clsx');
7
+ var tailwindMerge = require('tailwind-merge');
8
+ var SeparatorPrimitive = require('@radix-ui/react-separator');
9
+ var sonner = require('sonner');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
12
+ var LabelPrimitive = require('@radix-ui/react-label');
13
+ var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
14
+ var SelectPrimitive = require('@radix-ui/react-select');
15
+ var SwitchPrimitive = require('@radix-ui/react-switch');
16
+ var lucideReact = require('lucide-react');
17
+ var DialogPrimitive = require('@radix-ui/react-dialog');
18
+ var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
19
+ var PopoverPrimitive = require('@radix-ui/react-popover');
20
+ var TooltipPrimitive = require('@radix-ui/react-tooltip');
21
+ var TabsPrimitive = require('@radix-ui/react-tabs');
22
+ var Link2 = require('next/link');
23
+ var nextThemes = require('next-themes');
24
+
25
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
26
+
27
+ function _interopNamespace(e) {
28
+ if (e && e.__esModule) return e;
29
+ var n = Object.create(null);
30
+ if (e) {
31
+ Object.keys(e).forEach(function (k) {
32
+ if (k !== 'default') {
33
+ var d = Object.getOwnPropertyDescriptor(e, k);
34
+ Object.defineProperty(n, k, d.get ? d : {
35
+ enumerable: true,
36
+ get: function () { return e[k]; }
37
+ });
38
+ }
39
+ });
40
+ }
41
+ n.default = e;
42
+ return Object.freeze(n);
43
+ }
44
+
45
+ var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
46
+ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
47
+ var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
48
+ var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
49
+ var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
50
+ var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
51
+ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
52
+ var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
53
+ var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
54
+ var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
55
+ var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
56
+ var Link2__default = /*#__PURE__*/_interopDefault(Link2);
57
+
58
+ // src/tokens/index.ts
59
+ var APP_ATTRIBUTE = "data-oc-app";
60
+ var APP_ID = "ochk";
61
+ var appColors = {
62
+ light: {
63
+ background: "#FAFAFA",
64
+ foreground: "#0A0A0A",
65
+ card: "#FFFFFF",
66
+ muted: "#F2F2F2",
67
+ mutedForeground: "#54585E",
68
+ subtleForeground: "#686C72",
69
+ border: "#ECECEC",
70
+ hairlineStrong: "#DADADA",
71
+ accentDisplay: "#F55819",
72
+ accentInk: "#C73F09"
73
+ },
74
+ dark: {
75
+ background: "#0A0A0A",
76
+ foreground: "#FAFAFA",
77
+ card: "#161616",
78
+ muted: "#1E1E1E",
79
+ mutedForeground: "#A3A6AA",
80
+ subtleForeground: "#8B8E93",
81
+ border: "#262626",
82
+ hairlineStrong: "#333333",
83
+ accentDisplay: "#F66D36",
84
+ accentInk: "#F0835A"
85
+ },
86
+ brand: {
87
+ orange: "#F66D36",
88
+ orangeLight: "#FB933C",
89
+ orangeDeep: "#EA580B",
90
+ peach: "#FED8AB",
91
+ ink: "#0A0A0A",
92
+ inkCard: "#1E1E1E"
93
+ }
94
+ };
95
+ var appFonts = {
96
+ sans: "'OCA Inter', 'OCA Inter Fallback', ui-sans-serif, system-ui, sans-serif",
97
+ mono: "'OCA JetBrains Mono', 'OCA JetBrains Mono Fallback', ui-monospace, monospace"
98
+ };
99
+ var merge = tailwindMerge.extendTailwindMerge({
100
+ extend: {
101
+ classGroups: {
102
+ "oca-type": [
103
+ "oca-display-1",
104
+ "oca-display-2",
105
+ "oca-display-3",
106
+ "oca-title",
107
+ "oca-title-sm",
108
+ "oca-eyebrow",
109
+ "oca-lead",
110
+ "oca-body",
111
+ "oca-numeral"
112
+ ]
113
+ }
114
+ }
115
+ });
116
+ function cn(...inputs) {
117
+ return merge(clsx.clsx(inputs));
118
+ }
119
+ function Spinner({ className, label }) {
120
+ return /* @__PURE__ */ jsxRuntime.jsxs(
121
+ "svg",
122
+ {
123
+ viewBox: "0 0 24 24",
124
+ fill: "none",
125
+ role: label ? "status" : void 0,
126
+ "aria-label": label,
127
+ "aria-hidden": label ? void 0 : true,
128
+ className: cn("size-4 animate-spin", className),
129
+ children: [
130
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "2.5" }),
131
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
132
+ ]
133
+ }
134
+ );
135
+ }
136
+ function Skeleton({ className, ...props }) {
137
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-ui": "skeleton", className: cn("animate-pulse rounded-lg bg-muted", className), ...props });
138
+ }
139
+ var Separator = react.forwardRef(function Separator2({ className, orientation = "horizontal", decorative = true, ...props }, ref) {
140
+ return /* @__PURE__ */ jsxRuntime.jsx(
141
+ SeparatorPrimitive__namespace.Root,
142
+ {
143
+ ref,
144
+ decorative,
145
+ orientation,
146
+ className: cn(
147
+ "shrink-0 bg-border",
148
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
149
+ className
150
+ ),
151
+ ...props
152
+ }
153
+ );
154
+ });
155
+ function Kbd({ className, ...props }) {
156
+ return /* @__PURE__ */ jsxRuntime.jsx(
157
+ "kbd",
158
+ {
159
+ className: cn(
160
+ "inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-border bg-card px-1.5 font-mono text-[11px] text-muted-foreground",
161
+ className
162
+ ),
163
+ ...props
164
+ }
165
+ );
166
+ }
167
+ function StatusDot({
168
+ tone = "neutral",
169
+ pulse = false,
170
+ className
171
+ }) {
172
+ const color = {
173
+ neutral: "bg-oca-subtle",
174
+ success: "bg-success",
175
+ warning: "bg-warning",
176
+ danger: "bg-destructive",
177
+ brand: "bg-brand"
178
+ }[tone];
179
+ return /* @__PURE__ */ jsxRuntime.jsx(
180
+ "span",
181
+ {
182
+ "aria-hidden": true,
183
+ className: cn("inline-block size-2 shrink-0 rounded-full", color, pulse && "oca-animate-pulse-dot", className)
184
+ }
185
+ );
186
+ }
187
+ function Toaster(props) {
188
+ return /* @__PURE__ */ jsxRuntime.jsx(
189
+ sonner.Toaster,
190
+ {
191
+ position: "bottom-right",
192
+ toastOptions: {
193
+ classNames: {
194
+ toast: "oca-toast rounded-2xl border border-border bg-popover text-popover-foreground shadow-lg font-sans",
195
+ title: "text-[0.9375rem] font-medium",
196
+ description: "text-sm text-muted-foreground",
197
+ actionButton: "rounded-full bg-primary text-primary-foreground",
198
+ cancelButton: "rounded-full bg-muted text-foreground"
199
+ }
200
+ },
201
+ ...props
202
+ }
203
+ );
204
+ }
205
+ var buttonVariants = classVarianceAuthority.cva(
206
+ [
207
+ "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-full font-medium",
208
+ "transition-[background-color,border-color,color,box-shadow,transform] duration-150",
209
+ "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
210
+ "active:translate-y-px disabled:pointer-events-none disabled:opacity-45",
211
+ "[&_svg]:pointer-events-none [&_svg]:size-[1.1em] [&_svg]:shrink-0"
212
+ ],
213
+ {
214
+ variants: {
215
+ variant: {
216
+ primary: "bg-primary text-primary-foreground hover:bg-primary/85",
217
+ secondary: "border border-border bg-secondary text-secondary-foreground hover:border-oca-hairline-strong hover:bg-accent",
218
+ brand: "bg-brand text-brand-foreground hover:bg-oca-orange-deep",
219
+ ghost: "text-foreground hover:bg-accent",
220
+ danger: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
221
+ link: "h-auto rounded-none px-0 text-foreground underline decoration-border underline-offset-4 hover:decoration-foreground",
222
+ onInk: "bg-white text-oca-ink hover:bg-white/90",
223
+ onInkOutline: "border border-white/20 text-white hover:bg-white/10"
224
+ },
225
+ size: {
226
+ sm: "h-9 px-4 text-sm",
227
+ md: "h-11 px-5 text-[0.9375rem]",
228
+ lg: "h-14 px-7 text-[1.0625rem]",
229
+ icon: "size-10",
230
+ "icon-sm": "size-8"
231
+ }
232
+ },
233
+ compoundVariants: [{ variant: "link", className: "h-auto px-0" }],
234
+ defaultVariants: { variant: "primary", size: "md" }
235
+ }
236
+ );
237
+ var Button = react.forwardRef(function Button2({ className, variant, size, asChild = false, loading = false, disabled, children, type, ...props }, ref) {
238
+ const Comp = asChild ? reactSlot.Slot : "button";
239
+ return /* @__PURE__ */ jsxRuntime.jsx(
240
+ Comp,
241
+ {
242
+ ref,
243
+ "data-ui": "button",
244
+ className: cn(buttonVariants({ variant, size }), className),
245
+ disabled: asChild ? void 0 : disabled || loading,
246
+ "aria-busy": loading || void 0,
247
+ type: asChild ? void 0 : type ?? "button",
248
+ ...props,
249
+ children: asChild ? children : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
250
+ loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { className: "size-[1.1em]" }) : null,
251
+ children
252
+ ] })
253
+ }
254
+ );
255
+ });
256
+ var badgeVariants = classVarianceAuthority.cva(
257
+ "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",
258
+ {
259
+ variants: {
260
+ tone: {
261
+ neutral: "border-border bg-card text-foreground",
262
+ muted: "border-transparent bg-muted text-muted-foreground",
263
+ brand: "border-transparent bg-[color-mix(in_oklab,var(--oca-orange)_12%,var(--card))] text-oca-accent-ink",
264
+ success: "border-transparent bg-[color-mix(in_oklab,var(--success)_12%,var(--card))] text-success",
265
+ warning: "border-transparent bg-[color-mix(in_oklab,var(--warning)_14%,var(--card))] text-warning",
266
+ danger: "border-transparent bg-[color-mix(in_oklab,var(--destructive)_12%,var(--card))] text-destructive",
267
+ info: "border-transparent bg-[color-mix(in_oklab,var(--info)_12%,var(--card))] text-info",
268
+ ink: "border-transparent bg-oca-ink text-oca-ink-foreground",
269
+ onInk: "border-white/15 bg-white/5 text-white/90"
270
+ }
271
+ },
272
+ defaultVariants: { tone: "neutral" }
273
+ }
274
+ );
275
+ function Badge({ className, tone, ...props }) {
276
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-ui": "badge", className: cn(badgeVariants({ tone }), className), ...props });
277
+ }
278
+ var cardVariants = classVarianceAuthority.cva("relative rounded-[1.25rem] border", {
279
+ variants: {
280
+ tone: {
281
+ default: "border-border bg-card text-card-foreground",
282
+ sunken: "border-transparent bg-muted text-foreground",
283
+ ink: "border-oca-ink-line bg-oca-ink-card text-oca-ink-foreground",
284
+ outline: "border-border bg-transparent text-foreground"
285
+ },
286
+ padding: {
287
+ none: "",
288
+ sm: "p-5",
289
+ md: "p-6 md:p-8",
290
+ lg: "p-8 md:p-10"
291
+ },
292
+ interactive: {
293
+ true: "transition-colors hover:border-oca-hairline-strong focus-within:border-oca-hairline-strong",
294
+ false: ""
295
+ }
296
+ },
297
+ defaultVariants: { tone: "default", padding: "md", interactive: false }
298
+ });
299
+ var Card = react.forwardRef(function Card2({ className, tone, padding, interactive, ...props }, ref) {
300
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-ui": "card", className: cn(cardVariants({ tone, padding, interactive }), className), ...props });
301
+ });
302
+ function CardHeader({ className, ...props }) {
303
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-2", className), ...props });
304
+ }
305
+ function CardNumeral({ className, ...props }) {
306
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("oca-numeral block", className), ...props });
307
+ }
308
+ function CardTitle({ className, ...props }) {
309
+ return /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("oca-title flex flex-wrap items-center gap-2.5", className), ...props });
310
+ }
311
+ function CardDescription({ className, ...props }) {
312
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("oca-body", className), ...props });
313
+ }
314
+ function CardContent({ className, ...props }) {
315
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-5", className), ...props });
316
+ }
317
+ function CardFooter({ className, ...props }) {
318
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-6 flex flex-wrap items-center gap-3", className), ...props });
319
+ }
320
+ var fieldBase = [
321
+ "w-full rounded-xl border border-input bg-card text-foreground placeholder:text-oca-subtle",
322
+ "text-base md:text-[0.9375rem] outline-none transition-[border-color,box-shadow]",
323
+ "focus:border-foreground/35 focus:ring-4 focus:ring-[color-mix(in_oklab,var(--oca-orange)_16%,transparent)]",
324
+ "disabled:cursor-not-allowed disabled:opacity-55",
325
+ "aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:ring-[color-mix(in_oklab,var(--destructive)_14%,transparent)]"
326
+ ];
327
+ var Input = react.forwardRef(function Input2({ className, type = "text", ...props }, ref) {
328
+ return /* @__PURE__ */ jsxRuntime.jsx("input", { ref, type, "data-ui": "input", className: cn(fieldBase, "h-11 px-3.5", className), ...props });
329
+ });
330
+ var Textarea = react.forwardRef(
331
+ function Textarea2({ className, ...props }, ref) {
332
+ return /* @__PURE__ */ jsxRuntime.jsx(
333
+ "textarea",
334
+ {
335
+ ref,
336
+ "data-ui": "textarea",
337
+ className: cn(fieldBase, "min-h-28 px-3.5 py-3 leading-relaxed", className),
338
+ ...props
339
+ }
340
+ );
341
+ }
342
+ );
343
+ var Label = react.forwardRef(function Label2({ className, ...props }, ref) {
344
+ return /* @__PURE__ */ jsxRuntime.jsx(
345
+ LabelPrimitive__namespace.Root,
346
+ {
347
+ ref,
348
+ className: cn("text-sm font-medium leading-none text-foreground", className),
349
+ ...props
350
+ }
351
+ );
352
+ });
353
+ function Field({ label, hint, error, children, className, hideLabel }) {
354
+ const id = react.useId();
355
+ const hintId = hint ? `${id}-hint` : void 0;
356
+ const errorId = error ? `${id}-error` : void 0;
357
+ const describedBy = [hintId, errorId].filter(Boolean).join(" ") || void 0;
358
+ const control = react.isValidElement(children) ? react.cloneElement(children, {
359
+ id,
360
+ "aria-describedby": describedBy,
361
+ "aria-invalid": error ? true : void 0
362
+ }) : children;
363
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
364
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: id, className: hideLabel ? "sr-only" : void 0, children: label }),
365
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null,
366
+ control,
367
+ error ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: errorId, role: "alert", className: "text-[0.8125rem] leading-snug text-destructive", children: error }) : null
368
+ ] });
369
+ }
370
+ var Select = SelectPrimitive__namespace.Root;
371
+ var SelectGroup = SelectPrimitive__namespace.Group;
372
+ var SelectValue = SelectPrimitive__namespace.Value;
373
+ var SelectTrigger = react.forwardRef(function SelectTrigger2({ className, children, ...props }, ref) {
374
+ return /* @__PURE__ */ jsxRuntime.jsxs(
375
+ SelectPrimitive__namespace.Trigger,
376
+ {
377
+ ref,
378
+ className: cn(fieldBase, "flex h-11 items-center justify-between gap-2 px-3.5 text-left", className),
379
+ ...props,
380
+ children: [
381
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }),
382
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-4 shrink-0 text-muted-foreground" }) })
383
+ ]
384
+ }
385
+ );
386
+ });
387
+ var SelectContent = react.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
388
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
389
+ SelectPrimitive__namespace.Content,
390
+ {
391
+ ref,
392
+ position,
393
+ sideOffset: 6,
394
+ className: cn(
395
+ "oca-animate-fade z-50 max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg",
396
+ className
397
+ ),
398
+ ...props,
399
+ children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { children })
400
+ }
401
+ ) });
402
+ });
403
+ var SelectItem = react.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
404
+ return /* @__PURE__ */ jsxRuntime.jsxs(
405
+ SelectPrimitive__namespace.Item,
406
+ {
407
+ ref,
408
+ className: cn(
409
+ "relative flex h-10 cursor-default select-none items-center rounded-lg pl-3 pr-9 text-[0.9375rem] outline-none",
410
+ "data-[highlighted]:bg-accent data-[disabled]:opacity-50",
411
+ className
412
+ ),
413
+ ...props,
414
+ children: [
415
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children }),
416
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { className: "absolute right-3", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4" }) })
417
+ ]
418
+ }
419
+ );
420
+ });
421
+ var Checkbox = react.forwardRef(function Checkbox2({ className, ...props }, ref) {
422
+ return /* @__PURE__ */ jsxRuntime.jsx(
423
+ CheckboxPrimitive__namespace.Root,
424
+ {
425
+ ref,
426
+ className: cn(
427
+ "peer inline-flex size-5 shrink-0 items-center justify-center rounded-[6px] border border-input bg-card",
428
+ "outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
429
+ "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
430
+ "disabled:cursor-not-allowed disabled:opacity-50",
431
+ className
432
+ ),
433
+ ...props,
434
+ children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-3.5", strokeWidth: 3 }) })
435
+ }
436
+ );
437
+ });
438
+ var Switch = react.forwardRef(function Switch2({ className, ...props }, ref) {
439
+ return /* @__PURE__ */ jsxRuntime.jsx(
440
+ SwitchPrimitive__namespace.Root,
441
+ {
442
+ ref,
443
+ className: cn(
444
+ "peer inline-flex h-6 w-11 shrink-0 items-center rounded-full border border-transparent bg-input p-0.5",
445
+ "outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
446
+ "data-[state=checked]:bg-brand disabled:cursor-not-allowed disabled:opacity-50",
447
+ className
448
+ ),
449
+ ...props,
450
+ children: /* @__PURE__ */ jsxRuntime.jsx(SwitchPrimitive__namespace.Thumb, { className: "pointer-events-none block size-5 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-5" })
451
+ }
452
+ );
453
+ });
454
+ var RadioGroup = react.forwardRef(function RadioGroup2({ className, ...props }, ref) {
455
+ return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { ref, className: cn("grid gap-3", className), ...props });
456
+ });
457
+ var RadioGroupItem = react.forwardRef(function RadioGroupItem2({ className, ...props }, ref) {
458
+ return /* @__PURE__ */ jsxRuntime.jsx(
459
+ RadioGroupPrimitive__namespace.Item,
460
+ {
461
+ ref,
462
+ className: cn(
463
+ "inline-flex size-5 shrink-0 items-center justify-center rounded-full border border-input bg-card",
464
+ "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
465
+ "data-[state=checked]:border-primary disabled:cursor-not-allowed disabled:opacity-50",
466
+ className
467
+ ),
468
+ ...props,
469
+ children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: "block size-2.5 rounded-full bg-primary" })
470
+ }
471
+ );
472
+ });
473
+ var Dialog = DialogPrimitive__namespace.Root;
474
+ var DialogTrigger = DialogPrimitive__namespace.Trigger;
475
+ var DialogClose = DialogPrimitive__namespace.Close;
476
+ var overlayClass = "oca-animate-fade fixed inset-0 z-50 bg-[rgb(10_10_10/0.38)] backdrop-blur-[2px] data-[state=closed]:opacity-0";
477
+ var DialogContent = react.forwardRef(function DialogContent2({ className, children, hideClose, ...props }, ref) {
478
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, { children: [
479
+ /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { className: overlayClass }),
480
+ /* @__PURE__ */ jsxRuntime.jsxs(
481
+ DialogPrimitive__namespace.Content,
482
+ {
483
+ ref,
484
+ className: cn(
485
+ "oca-animate-rise fixed left-1/2 top-1/2 z-50 w-[min(92vw,34rem)] -translate-x-1/2 -translate-y-1/2",
486
+ "max-h-[88vh] overflow-y-auto rounded-[1.5rem] border border-border bg-popover p-6 text-popover-foreground shadow-xl md:p-8",
487
+ "outline-none",
488
+ className
489
+ ),
490
+ ...props,
491
+ children: [
492
+ children,
493
+ hideClose ? null : /* @__PURE__ */ jsxRuntime.jsx(
494
+ DialogPrimitive__namespace.Close,
495
+ {
496
+ className: "absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
497
+ "aria-label": "Close",
498
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" })
499
+ }
500
+ )
501
+ ]
502
+ }
503
+ )
504
+ ] });
505
+ });
506
+ function DialogHeader({ className, ...props }) {
507
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-5 flex flex-col gap-2 pr-8", className), ...props });
508
+ }
509
+ function DialogFooter({ className, ...props }) {
510
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-7 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end", className), ...props });
511
+ }
512
+ var DialogTitle = react.forwardRef(function DialogTitle2({ className, ...props }, ref) {
513
+ return /* @__PURE__ */ jsxRuntime.jsx(
514
+ DialogPrimitive__namespace.Title,
515
+ {
516
+ ref,
517
+ className: cn("text-[1.5rem] font-normal leading-tight tracking-[-0.02em]", className),
518
+ ...props
519
+ }
520
+ );
521
+ });
522
+ var DialogDescription = react.forwardRef(function DialogDescription2({ className, ...props }, ref) {
523
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { ref, className: cn("oca-body", className), ...props });
524
+ });
525
+ var Sheet = DialogPrimitive__namespace.Root;
526
+ var SheetTrigger = DialogPrimitive__namespace.Trigger;
527
+ var SheetClose = DialogPrimitive__namespace.Close;
528
+ var SheetTitle = DialogTitle;
529
+ var SheetDescription = DialogDescription;
530
+ var sheetSide = {
531
+ right: "inset-y-0 right-0 h-full w-[min(88vw,24rem)] border-l",
532
+ left: "inset-y-0 left-0 h-full w-[min(88vw,24rem)] border-r",
533
+ bottom: "inset-x-0 bottom-0 max-h-[88vh] rounded-t-[1.5rem] border-t"
534
+ };
535
+ var SheetContent = react.forwardRef(function SheetContent2({ className, children, side = "right", ...props }, ref) {
536
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, { children: [
537
+ /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, { className: overlayClass }),
538
+ /* @__PURE__ */ jsxRuntime.jsxs(
539
+ DialogPrimitive__namespace.Content,
540
+ {
541
+ ref,
542
+ className: cn(
543
+ "oca-animate-fade fixed z-50 flex flex-col gap-4 overflow-y-auto border-border bg-popover p-6 text-popover-foreground shadow-xl outline-none",
544
+ sheetSide[side],
545
+ className
546
+ ),
547
+ ...props,
548
+ children: [
549
+ children,
550
+ /* @__PURE__ */ jsxRuntime.jsx(
551
+ DialogPrimitive__namespace.Close,
552
+ {
553
+ className: "absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground hover:bg-accent hover:text-foreground",
554
+ "aria-label": "Close",
555
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" })
556
+ }
557
+ )
558
+ ]
559
+ }
560
+ )
561
+ ] });
562
+ });
563
+ var Popover = PopoverPrimitive__namespace.Root;
564
+ var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
565
+ var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
566
+ var PopoverContent = react.forwardRef(function PopoverContent2({ className, align = "center", sideOffset = 8, ...props }, ref) {
567
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
568
+ PopoverPrimitive__namespace.Content,
569
+ {
570
+ ref,
571
+ align,
572
+ sideOffset,
573
+ className: cn(
574
+ "oca-animate-fade z-50 w-72 rounded-2xl border border-border bg-popover p-4 text-popover-foreground shadow-lg outline-none",
575
+ className
576
+ ),
577
+ ...props
578
+ }
579
+ ) });
580
+ });
581
+ var TooltipProvider = TooltipPrimitive__namespace.Provider;
582
+ var Tooltip = TooltipPrimitive__namespace.Root;
583
+ var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
584
+ var TooltipContent = react.forwardRef(function TooltipContent2({ className, sideOffset = 6, ...props }, ref) {
585
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
586
+ TooltipPrimitive__namespace.Content,
587
+ {
588
+ ref,
589
+ sideOffset,
590
+ className: cn(
591
+ "oca-animate-fade z-50 max-w-xs rounded-lg bg-oca-ink px-2.5 py-1.5 text-[0.8125rem] leading-snug text-oca-ink-foreground",
592
+ className
593
+ ),
594
+ ...props
595
+ }
596
+ ) });
597
+ });
598
+ var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
599
+ var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
600
+ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
601
+ var DropdownMenuContent = react.forwardRef(function DropdownMenuContent2({ className, sideOffset = 8, ...props }, ref) {
602
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
603
+ DropdownMenuPrimitive__namespace.Content,
604
+ {
605
+ ref,
606
+ sideOffset,
607
+ className: cn(
608
+ "oca-animate-fade z-50 min-w-56 overflow-hidden rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-lg",
609
+ className
610
+ ),
611
+ ...props
612
+ }
613
+ ) });
614
+ });
615
+ var DropdownMenuItem = react.forwardRef(function DropdownMenuItem2({ className, destructive, ...props }, ref) {
616
+ return /* @__PURE__ */ jsxRuntime.jsx(
617
+ DropdownMenuPrimitive__namespace.Item,
618
+ {
619
+ ref,
620
+ className: cn(
621
+ "flex h-10 cursor-default select-none items-center gap-2.5 rounded-xl px-3 text-[0.9375rem] outline-none",
622
+ "data-[highlighted]:bg-accent data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:text-muted-foreground",
623
+ destructive && "text-destructive [&_svg]:text-destructive",
624
+ className
625
+ ),
626
+ ...props
627
+ }
628
+ );
629
+ });
630
+ var DropdownMenuLabel = react.forwardRef(function DropdownMenuLabel2({ className, ...props }, ref) {
631
+ return /* @__PURE__ */ jsxRuntime.jsx(
632
+ DropdownMenuPrimitive__namespace.Label,
633
+ {
634
+ ref,
635
+ className: cn("px-3 pb-1.5 pt-2 text-[0.8125rem] text-muted-foreground", className),
636
+ ...props
637
+ }
638
+ );
639
+ });
640
+ var DropdownMenuSeparator = react.forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
641
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator, { ref, className: cn("my-1.5 h-px bg-border", className), ...props });
642
+ });
643
+ var LookContext = react.createContext("pill");
644
+ var Tabs = react.forwardRef(function Tabs2({ look = "pill", ...props }, ref) {
645
+ return /* @__PURE__ */ jsxRuntime.jsx(LookContext.Provider, { value: look, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { ref, ...props }) });
646
+ });
647
+ var TabsList = react.forwardRef(function TabsList2({ className, ...props }, ref) {
648
+ const look = react.useContext(LookContext);
649
+ return /* @__PURE__ */ jsxRuntime.jsx(
650
+ TabsPrimitive__namespace.List,
651
+ {
652
+ ref,
653
+ className: cn(
654
+ look === "pill" ? "inline-flex max-w-full items-center gap-1 overflow-x-auto rounded-full bg-muted p-1" : "flex max-w-full items-center gap-6 overflow-x-auto border-b border-border",
655
+ className
656
+ ),
657
+ ...props
658
+ }
659
+ );
660
+ });
661
+ var TabsTrigger = react.forwardRef(function TabsTrigger2({ className, ...props }, ref) {
662
+ const look = react.useContext(LookContext);
663
+ return /* @__PURE__ */ jsxRuntime.jsx(
664
+ TabsPrimitive__namespace.Trigger,
665
+ {
666
+ ref,
667
+ className: cn(
668
+ "inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap text-[0.9375rem] outline-none transition-colors",
669
+ "focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
670
+ look === "pill" ? "h-9 rounded-full px-4 text-muted-foreground hover:text-foreground data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:shadow-sm" : "-mb-px h-11 border-b-2 border-transparent text-muted-foreground hover:text-foreground data-[state=active]:border-foreground data-[state=active]:text-foreground",
671
+ className
672
+ ),
673
+ ...props
674
+ }
675
+ );
676
+ });
677
+ var TabsContent = react.forwardRef(function TabsContent2({ className, ...props }, ref) {
678
+ return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Content, { ref, className: cn("mt-6 outline-none", className), ...props });
679
+ });
680
+ var TOP = "0,3 2,2 6,4 14,0 16,1 6,6";
681
+ var LEFT = "0,3 6,6 6,8 0,5";
682
+ var RIGHT = "6,6 16,1 16,3 6,8";
683
+ var MARK_FACES = { top: "#FED8AB", left: "#FB933C", right: "#EA580B" };
684
+ function Mark({ title, size, className, ...rest }) {
685
+ return /* @__PURE__ */ jsxRuntime.jsxs(
686
+ "svg",
687
+ {
688
+ viewBox: "0 0 16 8",
689
+ width: size,
690
+ height: size ? size / 2 : void 0,
691
+ role: title ? "img" : void 0,
692
+ "aria-hidden": title ? void 0 : true,
693
+ className: cn("shrink-0", className),
694
+ ...rest,
695
+ children: [
696
+ title ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: title }) : null,
697
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: LEFT, fill: MARK_FACES.left }),
698
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: RIGHT, fill: MARK_FACES.right }),
699
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: TOP, fill: MARK_FACES.top })
700
+ ]
701
+ }
702
+ );
703
+ }
704
+ function AppIcon({ title, size = 32, className, ...rest }) {
705
+ return /* @__PURE__ */ jsxRuntime.jsxs(
706
+ "svg",
707
+ {
708
+ viewBox: "0 0 24 24",
709
+ width: size,
710
+ height: size,
711
+ role: title ? "img" : void 0,
712
+ "aria-hidden": title ? void 0 : true,
713
+ className: cn("shrink-0", className),
714
+ ...rest,
715
+ children: [
716
+ title ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: title }) : null,
717
+ /* @__PURE__ */ jsxRuntime.jsx(
718
+ "rect",
719
+ {
720
+ width: "24",
721
+ height: "24",
722
+ rx: "6.25",
723
+ style: { fill: "var(--oca-icon-tile, #0A0A0A)", stroke: "var(--oca-icon-ring, transparent)" },
724
+ strokeWidth: "0.5"
725
+ }
726
+ ),
727
+ /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "translate(4.25 8.1) scale(0.97)", children: [
728
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: LEFT, fill: MARK_FACES.left }),
729
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: RIGHT, fill: MARK_FACES.right }),
730
+ /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: TOP, fill: MARK_FACES.top })
731
+ ] })
732
+ ]
733
+ }
734
+ );
735
+ }
736
+ function Lockup({ name = "orangecheck", size = 28, className }) {
737
+ return /* @__PURE__ */ jsxRuntime.jsxs(
738
+ "span",
739
+ {
740
+ className: cn("inline-flex items-center font-medium tracking-[-0.01em]", className),
741
+ style: { gap: size * 0.32, fontSize: size * 0.56 },
742
+ children: [
743
+ /* @__PURE__ */ jsxRuntime.jsx(AppIcon, { size }),
744
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: name })
745
+ ]
746
+ }
747
+ );
748
+ }
749
+ var SPHERE_GRADIENT = "radial-gradient(circle at 50% 42%, #fff8f3 0%, #ffe2d3 22%, #ffb48d 45%, #ff8a55 68%, #ff6a2c 100%)";
750
+ function HalftoneSphere({ src, alt, stadium = false, float = false, className, style }) {
751
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative aspect-square w-full", className), style, children: [
752
+ stadium ? (
753
+ // The deck's offset stadium on wide screens; centred and inside the
754
+ // gutter on phones, where the offset would push the page sideways.
755
+ /* @__PURE__ */ jsxRuntime.jsx(
756
+ "div",
757
+ {
758
+ "aria-hidden": true,
759
+ className: "oca-stadium pointer-events-none absolute inset-[-6%] md:[inset:-13%_10%_-13%_-27%]"
760
+ }
761
+ )
762
+ ) : null,
763
+ /* @__PURE__ */ jsxRuntime.jsx(
764
+ "div",
765
+ {
766
+ className: cn("relative size-full overflow-hidden rounded-full", float && "oca-animate-float"),
767
+ style: { background: SPHERE_GRADIENT },
768
+ children: /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className: "absolute inset-0 size-full select-none", draggable: false })
769
+ }
770
+ )
771
+ ] });
772
+ }
773
+ function IsoCheck({ size = 360, settle = false, shadow = true, title, className }) {
774
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative inline-block", settle && "oca-animate-settle", className), style: { width: size }, children: [
775
+ /* @__PURE__ */ jsxRuntime.jsx(Mark, { size, title, className: "relative z-10 block" }),
776
+ shadow ? /* @__PURE__ */ jsxRuntime.jsx(
777
+ "div",
778
+ {
779
+ "aria-hidden": true,
780
+ className: "absolute left-[8%] right-[8%] rounded-[50%] opacity-60 blur-xl",
781
+ style: { height: size * 0.08, bottom: -size * 0.04, background: "rgb(234 88 11 / 0.18)" }
782
+ }
783
+ ) : null
784
+ ] });
785
+ }
786
+ function Eyebrow({ className, onInk, ...props }) {
787
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("oca-eyebrow", onInk && "text-oca-ink-eyebrow", className), ...props });
788
+ }
789
+ function Display({ level = 2, as, className, ...props }) {
790
+ const tag = as ?? `h${level}`;
791
+ return react.createElement(tag, { className: cn(`oca-display-${level}`, className), ...props });
792
+ }
793
+ function Accent({ children, className }) {
794
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-oca-accent-display", className), children });
795
+ }
796
+ function Lead({ className, ...props }) {
797
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("oca-lead max-w-[40rem]", className), ...props });
798
+ }
799
+ function Footnote({ className, ...props }) {
800
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-[0.9375rem] text-muted-foreground", className), ...props });
801
+ }
802
+ function Prose({ className, ...props }) {
803
+ return /* @__PURE__ */ jsxRuntime.jsx(
804
+ "div",
805
+ {
806
+ className: cn(
807
+ "max-w-[42rem] text-[1.0625rem] leading-[1.7] text-muted-foreground",
808
+ "[&_h2]:oca-display-3 [&_h2]:mb-4 [&_h2]:mt-14 [&_h2]:text-foreground",
809
+ "[&_h3]:oca-title [&_h3]:mb-3 [&_h3]:mt-10 [&_h3]:text-foreground",
810
+ "[&_p]:my-4 [&_strong]:font-medium [&_strong]:text-foreground",
811
+ "[&_a]:text-foreground [&_a]:underline [&_a]:decoration-border [&_a]:underline-offset-4 hover:[&_a]:decoration-foreground",
812
+ "[&_ul]:my-4 [&_ul]:list-disc [&_ul]:pl-5 [&_li]:my-1.5 [&_code]:text-foreground",
813
+ className
814
+ ),
815
+ ...props
816
+ }
817
+ );
818
+ }
819
+ var sectionVariants = classVarianceAuthority.cva("relative w-full overflow-x-clip", {
820
+ variants: {
821
+ tone: {
822
+ canvas: "bg-background text-foreground",
823
+ card: "bg-card text-card-foreground",
824
+ ink: "bg-oca-ink text-oca-ink-foreground",
825
+ brand: "bg-brand text-brand-foreground"
826
+ },
827
+ space: {
828
+ none: "",
829
+ sm: "py-12 md:py-16",
830
+ md: "oca-section",
831
+ lg: "py-24 md:py-40"
832
+ }
833
+ },
834
+ defaultVariants: { tone: "canvas", space: "md" }
835
+ });
836
+ function Section({ tone, space, contained = true, className, children, ...props }) {
837
+ return /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn(sectionVariants({ tone, space }), className), ...props, children: contained ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-container", children }) : children });
838
+ }
839
+ function Container({ className, ...props }) {
840
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("oca-container", className), ...props });
841
+ }
842
+ function SectionIntro({
843
+ className,
844
+ align = "start",
845
+ ...props
846
+ }) {
847
+ return /* @__PURE__ */ jsxRuntime.jsx(
848
+ "div",
849
+ {
850
+ className: cn(
851
+ "flex flex-col gap-4 md:gap-5",
852
+ align === "center" && "mx-auto items-center text-center",
853
+ className
854
+ ),
855
+ ...props
856
+ }
857
+ );
858
+ }
859
+ var pad = (n) => String(n + 1).padStart(2, "0");
860
+ function StepGrid({ items, look = "cards", className }) {
861
+ const cols = items.length >= 3 ? "md:grid-cols-3" : items.length === 2 ? "md:grid-cols-2" : "";
862
+ return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("grid gap-4 md:gap-5", cols, className), children: items.map(
863
+ (it, i) => look === "plain" ? /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex flex-col gap-3 pr-4", children: [
864
+ /* @__PURE__ */ jsxRuntime.jsx(CardNumeral, { children: it.numeral ?? pad(i) }),
865
+ /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { className: "oca-title-sm", children: [
866
+ it.title,
867
+ it.badge ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { children: it.badge }) : null
868
+ ] }),
869
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-body text-[0.9375rem]", children: it.body })
870
+ ] }, i) : look === "ink" ? /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { tone: "ink", padding: "md", className: "h-full", children: [
871
+ /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { className: "text-oca-ink-title", children: [
872
+ it.title,
873
+ it.badge ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { tone: "onInk", children: it.badge }) : null
874
+ ] }),
875
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 text-[1rem] leading-relaxed text-oca-ink-muted", children: it.body })
876
+ ] }) }, i) : /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { padding: "md", className: "flex h-full flex-col gap-3", children: [
877
+ /* @__PURE__ */ jsxRuntime.jsx(CardNumeral, { children: it.numeral ?? pad(i) }),
878
+ /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { children: [
879
+ it.title,
880
+ it.badge ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { children: it.badge }) : null
881
+ ] }),
882
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-body", children: it.body })
883
+ ] }) }, i)
884
+ ) });
885
+ }
886
+ var KIND = {
887
+ package: "text-oca-code-package",
888
+ tag: "text-oca-code-tag",
889
+ link: "text-oca-code-link"
890
+ };
891
+ function PackageCard({ items, className }) {
892
+ return /* @__PURE__ */ jsxRuntime.jsx(
893
+ "div",
894
+ {
895
+ className: cn(
896
+ "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",
897
+ className
898
+ ),
899
+ children: items.map((it, i) => {
900
+ const code = /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[0.9375rem]", KIND[it.kind ?? "package"]), children: it.code });
901
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1.5", children: [
902
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-[1.125rem] font-semibold tracking-[-0.01em] text-oca-ink-title", children: it.title }),
903
+ it.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href, className: "w-fit underline decoration-transparent underline-offset-4 hover:decoration-current", children: code }) : code,
904
+ it.note ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[0.9375rem] leading-relaxed text-oca-ink-subtle", children: [
905
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, children: "// " }),
906
+ it.note
907
+ ] }) : null
908
+ ] }, i);
909
+ })
910
+ }
911
+ );
912
+ }
913
+ function CodeBlock({
914
+ code,
915
+ caption,
916
+ className
917
+ }) {
918
+ return /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: cn("overflow-hidden rounded-[1.25rem] border border-oca-ink-line bg-oca-ink-card", className), children: [
919
+ 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,
920
+ /* @__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 }) })
921
+ ] });
922
+ }
923
+ var LABEL = {
924
+ yes: "Yes",
925
+ testing: "In testing",
926
+ "not-yet": "Not yet",
927
+ no: "No"
928
+ };
929
+ var TONE = {
930
+ yes: "text-oca-accent-ink",
931
+ testing: "text-foreground",
932
+ "not-yet": "text-muted-foreground",
933
+ no: "text-muted-foreground"
934
+ };
935
+ function TruthTable({
936
+ rows,
937
+ statusHeading = "Status",
938
+ whatHeading = "What",
939
+ className
940
+ }) {
941
+ 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: [
942
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-oca-table-head", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
943
+ /* @__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 }),
944
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "border-b border-l border-oca-hairline-strong px-4 py-3 font-semibold", children: whatHeading })
945
+ ] }) }),
946
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "bg-card", children: rows.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "align-top", children: [
947
+ /* @__PURE__ */ jsxRuntime.jsx(
948
+ "td",
949
+ {
950
+ className: cn(
951
+ "border-t border-oca-hairline-strong px-4 py-3 font-medium",
952
+ i === 0 && "border-t-0",
953
+ TONE[r.status]
954
+ ),
955
+ children: LABEL[r.status]
956
+ }
957
+ ),
958
+ /* @__PURE__ */ jsxRuntime.jsx(
959
+ "td",
960
+ {
961
+ className: cn(
962
+ "border-l border-t border-oca-hairline-strong px-4 py-3 leading-relaxed",
963
+ i === 0 && "border-t-0"
964
+ ),
965
+ children: r.what
966
+ }
967
+ )
968
+ ] }, i)) })
969
+ ] }) });
970
+ }
971
+ var INT = new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 });
972
+ var COMPACT = new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 });
973
+ function satsText(value, opts = {}) {
974
+ if (value == null || !Number.isFinite(value)) return null;
975
+ const whole = Math.trunc(value);
976
+ const body = (opts.compact ? COMPACT : INT).format(Math.abs(whole));
977
+ const sign = whole < 0 ? "\u2212" : opts.signed && whole > 0 ? "+" : "";
978
+ const unit = opts.unit === "none" ? "" : whole === 1 || whole === -1 ? " sat" : " sats";
979
+ return `${sign}${body}${unit}`;
980
+ }
981
+ function Sats({ value, unit, compact, signed, unknown = "\u2014", className, ...props }) {
982
+ const text = satsText(value, { unit, compact, signed });
983
+ if (text === null) {
984
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("oca-tabular text-muted-foreground", className), ...props, children: [
985
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, children: unknown }),
986
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "unknown" })
987
+ ] });
988
+ }
989
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("oca-tabular whitespace-nowrap", className), ...props, children: text });
990
+ }
991
+ function UsdApprox({
992
+ sats,
993
+ usdPerBtc,
994
+ className
995
+ }) {
996
+ if (sats == null || usdPerBtc == null || !Number.isFinite(sats) || !Number.isFinite(usdPerBtc)) return null;
997
+ const usd = sats / 1e8 * usdPerBtc;
998
+ const text = new Intl.NumberFormat("en-US", {
999
+ style: "currency",
1000
+ currency: "USD",
1001
+ maximumFractionDigits: usd < 1 ? 4 : 2
1002
+ }).format(usd);
1003
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("oca-tabular text-muted-foreground", className), children: [
1004
+ "\u2248 ",
1005
+ text
1006
+ ] });
1007
+ }
1008
+ function SatsFigure({
1009
+ label,
1010
+ value,
1011
+ hint,
1012
+ className
1013
+ }) {
1014
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1.5", className), children: [
1015
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.9375rem] text-muted-foreground", children: label }),
1016
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "oca-display-3 oca-tabular", children: [
1017
+ /* @__PURE__ */ jsxRuntime.jsx(Sats, { value, unit: "none" }),
1018
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-[0.5em] tracking-normal text-muted-foreground", children: "sats" })
1019
+ ] }),
1020
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.875rem] text-muted-foreground", children: hint }) : null
1021
+ ] });
1022
+ }
1023
+ function PageHeader({
1024
+ eyebrow,
1025
+ title,
1026
+ description,
1027
+ actions,
1028
+ className
1029
+ }) {
1030
+ return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: cn("flex flex-col gap-5 md:flex-row md:items-end md:justify-between", className), children: [
1031
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex max-w-[44rem] flex-col gap-3", children: [
1032
+ eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oca-eyebrow", children: eyebrow }) : null,
1033
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "oca-display-3", children: title }),
1034
+ description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oca-body text-[1.0625rem]", children: description }) : null
1035
+ ] }),
1036
+ actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-3", children: actions }) : null
1037
+ ] });
1038
+ }
1039
+ function StatCard({
1040
+ label,
1041
+ value,
1042
+ hint,
1043
+ className
1044
+ }) {
1045
+ 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: [
1046
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.875rem] text-muted-foreground", children: label }),
1047
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oca-tabular text-[1.75rem] leading-tight tracking-[-0.02em]", children: value }),
1048
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null
1049
+ ] });
1050
+ }
1051
+ function StatGrid({ className, ...props }) {
1052
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-2 gap-3 md:grid-cols-4 md:gap-4", className), ...props });
1053
+ }
1054
+ function KeyValueList({ items, className }) {
1055
+ 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: [
1056
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "shrink-0 text-[0.875rem] text-muted-foreground sm:w-48", children: it.label }),
1057
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: cn("min-w-0 break-words text-[0.9375rem]", it.mono && "font-mono text-[0.875rem]"), children: it.value })
1058
+ ] }, i)) });
1059
+ }
1060
+ function DataTable({
1061
+ columns,
1062
+ rows,
1063
+ rowKey,
1064
+ empty,
1065
+ caption,
1066
+ className
1067
+ }) {
1068
+ if (rows.length === 0 && empty) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: empty });
1069
+ 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: [
1070
+ caption ? /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "sr-only", children: caption }) : null,
1071
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b border-border", children: columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
1072
+ "th",
1073
+ {
1074
+ scope: "col",
1075
+ className: cn(
1076
+ "whitespace-nowrap px-5 py-3 text-[0.8125rem] font-medium text-muted-foreground",
1077
+ c.align === "end" && "text-right",
1078
+ c.wide && "hidden md:table-cell"
1079
+ ),
1080
+ children: c.header
1081
+ },
1082
+ c.key
1083
+ )) }) }),
1084
+ /* @__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(
1085
+ "td",
1086
+ {
1087
+ className: cn(
1088
+ "px-5 py-3.5 align-middle",
1089
+ c.align === "end" && "text-right",
1090
+ c.wide && "hidden md:table-cell"
1091
+ ),
1092
+ children: c.cell(r)
1093
+ },
1094
+ c.key
1095
+ )) }, rowKey(r, i))) })
1096
+ ] }) });
1097
+ }
1098
+ function EmptyState({
1099
+ title,
1100
+ children,
1101
+ action,
1102
+ className
1103
+ }) {
1104
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1105
+ "div",
1106
+ {
1107
+ className: cn(
1108
+ "flex flex-col items-center gap-4 rounded-[1.25rem] border border-dashed border-oca-hairline-strong px-6 py-12 text-center",
1109
+ className
1110
+ ),
1111
+ children: [
1112
+ /* @__PURE__ */ jsxRuntime.jsx(Mark, { size: 56 }),
1113
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "oca-title-sm", children: title }),
1114
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-body max-w-md text-[0.9375rem]", children }) : null,
1115
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-wrap justify-center gap-3", children: action }) : null
1116
+ ]
1117
+ }
1118
+ );
1119
+ }
1120
+ var NOTICE = {
1121
+ neutral: "border-border bg-card",
1122
+ info: "border-[color-mix(in_oklab,var(--info)_30%,var(--border))] bg-[color-mix(in_oklab,var(--info)_6%,var(--card))]",
1123
+ success: "border-[color-mix(in_oklab,var(--success)_30%,var(--border))] bg-[color-mix(in_oklab,var(--success)_6%,var(--card))]",
1124
+ warning: "border-[color-mix(in_oklab,var(--warning)_35%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_7%,var(--card))]",
1125
+ danger: "border-[color-mix(in_oklab,var(--destructive)_32%,var(--border))] bg-[color-mix(in_oklab,var(--destructive)_6%,var(--card))]",
1126
+ brand: "border-[color-mix(in_oklab,var(--oca-orange)_35%,var(--border))] bg-[color-mix(in_oklab,var(--oca-orange)_7%,var(--card))]"
1127
+ };
1128
+ var NOTICE_TITLE = {
1129
+ neutral: "text-foreground",
1130
+ info: "text-info",
1131
+ success: "text-success",
1132
+ warning: "text-warning",
1133
+ danger: "text-destructive",
1134
+ brand: "text-oca-accent-ink"
1135
+ };
1136
+ function Notice({
1137
+ tone = "neutral",
1138
+ title,
1139
+ children,
1140
+ action,
1141
+ className
1142
+ }) {
1143
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1144
+ "div",
1145
+ {
1146
+ role: tone === "danger" || tone === "warning" ? "alert" : "note",
1147
+ className: cn(
1148
+ "flex flex-col gap-3 rounded-2xl border px-5 py-4 sm:flex-row sm:items-start sm:justify-between",
1149
+ NOTICE[tone],
1150
+ className
1151
+ ),
1152
+ children: [
1153
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
1154
+ title ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-[0.9375rem] font-medium", NOTICE_TITLE[tone]), children: title }) : null,
1155
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[0.9375rem] leading-relaxed text-foreground/85", children }) : null
1156
+ ] }),
1157
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: action }) : null
1158
+ ]
1159
+ }
1160
+ );
1161
+ }
1162
+ function middle(v, head, tail) {
1163
+ return v.length <= head + tail + 1 ? v : `${v.slice(0, head)}\u2026${v.slice(-tail)}`;
1164
+ }
1165
+ function useCopy(timeoutMs = 1600) {
1166
+ const [copied, setCopied] = react.useState(false);
1167
+ const t = react.useRef(null);
1168
+ react.useEffect(() => () => {
1169
+ if (t.current) clearTimeout(t.current);
1170
+ }, []);
1171
+ const copy = react.useCallback(
1172
+ async (text) => {
1173
+ try {
1174
+ await navigator.clipboard.writeText(text);
1175
+ setCopied(true);
1176
+ if (t.current) clearTimeout(t.current);
1177
+ t.current = setTimeout(() => setCopied(false), timeoutMs);
1178
+ } catch {
1179
+ setCopied(false);
1180
+ }
1181
+ },
1182
+ [timeoutMs]
1183
+ );
1184
+ return { copied, copy };
1185
+ }
1186
+ function CopyButton({ value, label = "Copy", className }) {
1187
+ const { copied, copy } = useCopy();
1188
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1189
+ "button",
1190
+ {
1191
+ type: "button",
1192
+ onClick: () => void copy(value),
1193
+ "aria-label": copied ? "Copied" : label,
1194
+ className: cn(
1195
+ "inline-flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
1196
+ className
1197
+ ),
1198
+ children: [
1199
+ copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4 text-success" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-4" }),
1200
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-live": "polite", className: "sr-only", children: copied ? "Copied" : "" })
1201
+ ]
1202
+ }
1203
+ );
1204
+ }
1205
+ function HashChip({
1206
+ value,
1207
+ head = 8,
1208
+ tail = 6,
1209
+ copy = true,
1210
+ href,
1211
+ className
1212
+ }) {
1213
+ const shown = middle(value, head, tail);
1214
+ const text = /* @__PURE__ */ jsxRuntime.jsx("span", { title: value, className: "font-mono text-[0.875rem]", children: shown });
1215
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("inline-flex max-w-full items-center gap-1", className), children: [
1216
+ href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: "underline decoration-border underline-offset-4 hover:decoration-foreground", children: text }) : text,
1217
+ copy ? /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { value, label: "Copy full value" }) : null
1218
+ ] });
1219
+ }
1220
+ function ProgressSteps({ steps, className }) {
1221
+ return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("flex flex-col gap-0", className), children: steps.map((s, i) => {
1222
+ const last = i === steps.length - 1;
1223
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "relative flex gap-4 pb-6 last:pb-0", "aria-current": s.state === "current" ? "step" : void 0, children: [
1224
+ !last ? /* @__PURE__ */ jsxRuntime.jsx(
1225
+ "span",
1226
+ {
1227
+ "aria-hidden": true,
1228
+ className: cn(
1229
+ "absolute left-[11px] top-7 h-[calc(100%-1.5rem)] w-px",
1230
+ s.state === "done" ? "bg-foreground/30" : "bg-border"
1231
+ )
1232
+ }
1233
+ ) : null,
1234
+ /* @__PURE__ */ jsxRuntime.jsx(
1235
+ "span",
1236
+ {
1237
+ className: cn(
1238
+ "relative z-10 mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full border text-[0.75rem] oca-tabular",
1239
+ s.state === "done" && "border-primary bg-primary text-primary-foreground",
1240
+ s.state === "current" && "border-brand bg-card text-oca-accent-ink",
1241
+ s.state === "upcoming" && "border-border bg-card text-muted-foreground",
1242
+ s.state === "blocked" && "border-destructive bg-card text-destructive"
1243
+ ),
1244
+ children: s.state === "done" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-3.5", strokeWidth: 3 }) : String(i + 1).padStart(2, "0")
1245
+ }
1246
+ ),
1247
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
1248
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[0.9375rem]", s.state === "upcoming" ? "text-muted-foreground" : "font-medium"), children: s.label }),
1249
+ s.hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.875rem] leading-snug text-muted-foreground", children: s.hint }) : null
1250
+ ] })
1251
+ ] }, i);
1252
+ }) });
1253
+ }
1254
+ function ActivityList({ items, empty, className }) {
1255
+ if (items.length === 0 && empty) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: empty });
1256
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("divide-y divide-border rounded-[1.25rem] border border-border bg-card", className), children: items.map((it) => {
1257
+ const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 px-5 py-4", children: [
1258
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
1259
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[0.9375rem]", children: it.title }),
1260
+ it.meta ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[0.8125rem] text-muted-foreground", children: it.meta }) : null
1261
+ ] }),
1262
+ it.trailing ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 text-right", children: it.trailing }) : null
1263
+ ] });
1264
+ 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);
1265
+ }) });
1266
+ }
1267
+ function NavLink({ item, className, onNavigate }) {
1268
+ const cls = cn(
1269
+ "rounded-full px-3 py-2 text-[0.9375rem] transition-colors",
1270
+ item.active ? "text-foreground" : "text-muted-foreground hover:text-foreground",
1271
+ className
1272
+ );
1273
+ if (item.external) {
1274
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: cls, rel: "noreferrer", onClick: onNavigate, children: item.label });
1275
+ }
1276
+ return /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: item.href, className: cls, "aria-current": item.active ? "page" : void 0, onClick: onNavigate, children: item.label });
1277
+ }
1278
+ function SiteHeader({
1279
+ home = "/",
1280
+ brand,
1281
+ nav = [],
1282
+ actions,
1283
+ className
1284
+ }) {
1285
+ const [open, setOpen] = react.useState(false);
1286
+ return /* @__PURE__ */ jsxRuntime.jsx(
1287
+ "header",
1288
+ {
1289
+ className: cn(
1290
+ "sticky top-0 z-40 w-full border-b border-transparent bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/70",
1291
+ className
1292
+ ),
1293
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oca-container flex h-16 items-center justify-between gap-4 md:h-[4.5rem]", children: [
1294
+ /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: home, className: "-ml-1 rounded-lg p-1", "aria-label": "Home", children: brand ?? /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 28 }) }),
1295
+ nav.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Main", className: "hidden items-center gap-1 md:flex", children: nav.map((n) => /* @__PURE__ */ jsxRuntime.jsx(NavLink, { item: n }, n.href)) }) : null,
1296
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1297
+ actions,
1298
+ nav.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
1299
+ /* @__PURE__ */ jsxRuntime.jsx(
1300
+ SheetTrigger,
1301
+ {
1302
+ className: "inline-flex size-10 items-center justify-center rounded-full text-foreground hover:bg-accent md:hidden",
1303
+ "aria-label": "Open menu",
1304
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "size-5" })
1305
+ }
1306
+ ),
1307
+ /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "pt-16", children: [
1308
+ /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "sr-only", children: "Menu" }),
1309
+ /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Main", className: "flex flex-col", children: nav.map((n) => /* @__PURE__ */ jsxRuntime.jsx(
1310
+ NavLink,
1311
+ {
1312
+ item: n,
1313
+ className: "rounded-xl px-3 py-3 text-[1.0625rem]",
1314
+ onNavigate: () => setOpen(false)
1315
+ },
1316
+ n.href
1317
+ )) })
1318
+ ] })
1319
+ ] }) : null
1320
+ ] })
1321
+ ] })
1322
+ }
1323
+ );
1324
+ }
1325
+ function SiteFooter({
1326
+ columns = [],
1327
+ fineprint,
1328
+ meta,
1329
+ className
1330
+ }) {
1331
+ return /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: cn("border-t border-border bg-background", className), children: [
1332
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oca-container grid gap-10 py-14 md:grid-cols-[1.3fr_repeat(3,1fr)] md:py-16", children: [
1333
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
1334
+ /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 26 }),
1335
+ fineprint ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs text-[0.9375rem] leading-relaxed text-muted-foreground", children: fineprint }) : null
1336
+ ] }),
1337
+ columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
1338
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[0.875rem] font-medium", children: col.heading }),
1339
+ col.links.map((l) => /* @__PURE__ */ jsxRuntime.jsx(
1340
+ NavLink,
1341
+ {
1342
+ item: l,
1343
+ className: "-mx-3 py-2.5 text-[0.9375rem] md:py-1.5"
1344
+ },
1345
+ l.href
1346
+ ))
1347
+ ] }, col.heading))
1348
+ ] }),
1349
+ meta ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-container border-t border-border py-6 text-[0.875rem] text-muted-foreground", children: meta }) : null
1350
+ ] });
1351
+ }
1352
+ function SideNav({ groups, onNavigate }) {
1353
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Sections", className: "flex flex-col gap-6", children: groups.map((g, gi) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5", children: [
1354
+ g.label ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1.5 text-[0.8125rem] text-muted-foreground", children: g.label }) : null,
1355
+ g.items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs(
1356
+ Link2__default.default,
1357
+ {
1358
+ href: it.href,
1359
+ onClick: onNavigate,
1360
+ "aria-current": it.active ? "page" : void 0,
1361
+ className: cn(
1362
+ "flex h-10 items-center gap-3 rounded-xl px-3 text-[0.9375rem] transition-colors",
1363
+ "[&_svg]:size-[1.125rem] [&_svg]:shrink-0",
1364
+ it.active ? "bg-card text-foreground shadow-sm ring-1 ring-border [&_svg]:text-foreground" : "text-muted-foreground hover:bg-accent hover:text-foreground"
1365
+ ),
1366
+ children: [
1367
+ it.icon,
1368
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", children: it.label }),
1369
+ it.badge ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: it.badge }) : null
1370
+ ]
1371
+ },
1372
+ it.href
1373
+ ))
1374
+ ] }, g.label ?? gi)) });
1375
+ }
1376
+ function AppShell({
1377
+ nav,
1378
+ home = "/",
1379
+ account,
1380
+ banner,
1381
+ footer,
1382
+ children,
1383
+ className
1384
+ }) {
1385
+ const [open, setOpen] = react.useState(false);
1386
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("min-h-dvh bg-background", className), children: [
1387
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-0 z-40 flex h-14 items-center justify-between border-b border-border bg-background/85 px-4 backdrop-blur-md lg:hidden", children: [
1388
+ /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
1389
+ /* @__PURE__ */ jsxRuntime.jsx(
1390
+ SheetTrigger,
1391
+ {
1392
+ className: "inline-flex size-10 items-center justify-center rounded-full hover:bg-accent",
1393
+ "aria-label": "Open navigation",
1394
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "size-5" })
1395
+ }
1396
+ ),
1397
+ /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "left", className: "p-4 pt-16", children: [
1398
+ /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "sr-only", children: "Navigation" }),
1399
+ /* @__PURE__ */ jsxRuntime.jsx(SideNav, { groups: nav, onNavigate: () => setOpen(false) })
1400
+ ] })
1401
+ ] }),
1402
+ /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: home, "aria-label": "Home", children: /* @__PURE__ */ jsxRuntime.jsx(AppIcon, { size: 28 }) }),
1403
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: account })
1404
+ ] }),
1405
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto flex w-full max-w-[90rem]", children: [
1406
+ /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "sticky top-0 hidden h-dvh w-64 shrink-0 flex-col gap-8 overflow-y-auto px-4 py-6 lg:flex", children: [
1407
+ /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: home, className: "px-2", "aria-label": "Home", children: /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 26 }) }),
1408
+ /* @__PURE__ */ jsxRuntime.jsx(SideNav, { groups: nav }),
1409
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-col gap-3", children: footer })
1410
+ ] }),
1411
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
1412
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden h-[4.5rem] items-center justify-end gap-3 px-8 lg:flex", children: account }),
1413
+ banner ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-2 pt-4 md:px-8 lg:pt-0", children: banner }) : null,
1414
+ /* @__PURE__ */ jsxRuntime.jsx("main", { id: "main-content", className: "flex-1 px-4 pb-16 pt-6 md:px-8 lg:pt-2", children })
1415
+ ] })
1416
+ ] })
1417
+ ] });
1418
+ }
1419
+ function AccountMenu({
1420
+ name,
1421
+ detail,
1422
+ items
1423
+ }) {
1424
+ const initial = name.trim().charAt(0).toUpperCase() || "\xB7";
1425
+ return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
1426
+ /* @__PURE__ */ jsxRuntime.jsxs(
1427
+ DropdownMenuTrigger,
1428
+ {
1429
+ className: "inline-flex h-10 items-center gap-2.5 rounded-full border border-border bg-card pl-1 pr-3.5 text-[0.9375rem] outline-none transition-colors hover:border-oca-hairline-strong focus-visible:ring-2 focus-visible:ring-ring",
1430
+ "aria-label": `Account: ${name}`,
1431
+ children: [
1432
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-8 items-center justify-center rounded-full bg-foreground text-[0.8125rem] font-medium text-background", children: initial }),
1433
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-[10rem] truncate", children: name })
1434
+ ]
1435
+ }
1436
+ ),
1437
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", className: "w-64", children: [
1438
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuLabel, { className: "flex flex-col gap-0.5", children: [
1439
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[0.9375rem] font-medium text-foreground", children: name }),
1440
+ detail ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-mono text-[0.75rem]", children: detail }) : null
1441
+ ] }),
1442
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
1443
+ items.map(
1444
+ (it, i) => it === "separator" ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}, `sep-${i}`) : it.href ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, destructive: it.destructive, children: /* @__PURE__ */ jsxRuntime.jsxs(Link2__default.default, { href: it.href, children: [
1445
+ it.icon,
1446
+ it.label
1447
+ ] }) }, it.label) : /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onSelect: it.onSelect, destructive: it.destructive, children: [
1448
+ it.icon,
1449
+ it.label
1450
+ ] }, it.label)
1451
+ )
1452
+ ] })
1453
+ ] });
1454
+ }
1455
+ function ThemeToggle({ className }) {
1456
+ const { theme, setTheme } = nextThemes.useTheme();
1457
+ const [mounted, setMounted] = react.useState(false);
1458
+ react.useEffect(() => setMounted(true), []);
1459
+ const current = mounted ? theme ?? "system" : "system";
1460
+ const next = current === "light" ? "dark" : current === "dark" ? "system" : "light";
1461
+ const Icon2 = current === "light" ? lucideReact.Sun : current === "dark" ? lucideReact.Moon : lucideReact.SunMoon;
1462
+ return /* @__PURE__ */ jsxRuntime.jsx(
1463
+ "button",
1464
+ {
1465
+ type: "button",
1466
+ onClick: () => setTheme(next),
1467
+ "aria-label": `Theme: ${current}. Switch to ${next}`,
1468
+ title: `Theme: ${current}`,
1469
+ className: cn(
1470
+ "inline-flex size-10 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
1471
+ className
1472
+ ),
1473
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-[1.125rem]" })
1474
+ }
1475
+ );
1476
+ }
1477
+
1478
+ Object.defineProperty(exports, "toast", {
1479
+ enumerable: true,
1480
+ get: function () { return sonner.toast; }
1481
+ });
1482
+ exports.APP_ATTRIBUTE = APP_ATTRIBUTE;
1483
+ exports.APP_ID = APP_ID;
1484
+ exports.Accent = Accent;
1485
+ exports.AccountMenu = AccountMenu;
1486
+ exports.ActivityList = ActivityList;
1487
+ exports.AppIcon = AppIcon;
1488
+ exports.AppShell = AppShell;
1489
+ exports.Badge = Badge;
1490
+ exports.Button = Button;
1491
+ exports.Card = Card;
1492
+ exports.CardContent = CardContent;
1493
+ exports.CardDescription = CardDescription;
1494
+ exports.CardFooter = CardFooter;
1495
+ exports.CardHeader = CardHeader;
1496
+ exports.CardNumeral = CardNumeral;
1497
+ exports.CardTitle = CardTitle;
1498
+ exports.Checkbox = Checkbox;
1499
+ exports.CodeBlock = CodeBlock;
1500
+ exports.Container = Container;
1501
+ exports.CopyButton = CopyButton;
1502
+ exports.DataTable = DataTable;
1503
+ exports.Dialog = Dialog;
1504
+ exports.DialogClose = DialogClose;
1505
+ exports.DialogContent = DialogContent;
1506
+ exports.DialogDescription = DialogDescription;
1507
+ exports.DialogFooter = DialogFooter;
1508
+ exports.DialogHeader = DialogHeader;
1509
+ exports.DialogTitle = DialogTitle;
1510
+ exports.DialogTrigger = DialogTrigger;
1511
+ exports.Display = Display;
1512
+ exports.DropdownMenu = DropdownMenu;
1513
+ exports.DropdownMenuContent = DropdownMenuContent;
1514
+ exports.DropdownMenuGroup = DropdownMenuGroup;
1515
+ exports.DropdownMenuItem = DropdownMenuItem;
1516
+ exports.DropdownMenuLabel = DropdownMenuLabel;
1517
+ exports.DropdownMenuSeparator = DropdownMenuSeparator;
1518
+ exports.DropdownMenuTrigger = DropdownMenuTrigger;
1519
+ exports.EmptyState = EmptyState;
1520
+ exports.Eyebrow = Eyebrow;
1521
+ exports.Field = Field;
1522
+ exports.Footnote = Footnote;
1523
+ exports.HalftoneSphere = HalftoneSphere;
1524
+ exports.HashChip = HashChip;
1525
+ exports.Input = Input;
1526
+ exports.IsoCheck = IsoCheck;
1527
+ exports.Kbd = Kbd;
1528
+ exports.KeyValueList = KeyValueList;
1529
+ exports.Label = Label;
1530
+ exports.Lead = Lead;
1531
+ exports.Lockup = Lockup;
1532
+ exports.MARK_FACES = MARK_FACES;
1533
+ exports.Mark = Mark;
1534
+ exports.Notice = Notice;
1535
+ exports.PackageCard = PackageCard;
1536
+ exports.PageHeader = PageHeader;
1537
+ exports.Popover = Popover;
1538
+ exports.PopoverAnchor = PopoverAnchor;
1539
+ exports.PopoverContent = PopoverContent;
1540
+ exports.PopoverTrigger = PopoverTrigger;
1541
+ exports.ProgressSteps = ProgressSteps;
1542
+ exports.Prose = Prose;
1543
+ exports.RadioGroup = RadioGroup;
1544
+ exports.RadioGroupItem = RadioGroupItem;
1545
+ exports.SPHERE_GRADIENT = SPHERE_GRADIENT;
1546
+ exports.Sats = Sats;
1547
+ exports.SatsFigure = SatsFigure;
1548
+ exports.Section = Section;
1549
+ exports.SectionIntro = SectionIntro;
1550
+ exports.Select = Select;
1551
+ exports.SelectContent = SelectContent;
1552
+ exports.SelectGroup = SelectGroup;
1553
+ exports.SelectItem = SelectItem;
1554
+ exports.SelectTrigger = SelectTrigger;
1555
+ exports.SelectValue = SelectValue;
1556
+ exports.Separator = Separator;
1557
+ exports.Sheet = Sheet;
1558
+ exports.SheetClose = SheetClose;
1559
+ exports.SheetContent = SheetContent;
1560
+ exports.SheetDescription = SheetDescription;
1561
+ exports.SheetTitle = SheetTitle;
1562
+ exports.SheetTrigger = SheetTrigger;
1563
+ exports.SiteFooter = SiteFooter;
1564
+ exports.SiteHeader = SiteHeader;
1565
+ exports.Skeleton = Skeleton;
1566
+ exports.Spinner = Spinner;
1567
+ exports.StatCard = StatCard;
1568
+ exports.StatGrid = StatGrid;
1569
+ exports.StatusDot = StatusDot;
1570
+ exports.StepGrid = StepGrid;
1571
+ exports.Switch = Switch;
1572
+ exports.Tabs = Tabs;
1573
+ exports.TabsContent = TabsContent;
1574
+ exports.TabsList = TabsList;
1575
+ exports.TabsTrigger = TabsTrigger;
1576
+ exports.Textarea = Textarea;
1577
+ exports.ThemeToggle = ThemeToggle;
1578
+ exports.Toaster = Toaster;
1579
+ exports.Tooltip = Tooltip;
1580
+ exports.TooltipContent = TooltipContent;
1581
+ exports.TooltipProvider = TooltipProvider;
1582
+ exports.TooltipTrigger = TooltipTrigger;
1583
+ exports.TruthTable = TruthTable;
1584
+ exports.UsdApprox = UsdApprox;
1585
+ exports.appColors = appColors;
1586
+ exports.appFonts = appFonts;
1587
+ exports.badgeVariants = badgeVariants;
1588
+ exports.buttonVariants = buttonVariants;
1589
+ exports.cardVariants = cardVariants;
1590
+ exports.cn = cn;
1591
+ exports.satsText = satsText;
1592
+ exports.sectionVariants = sectionVariants;
1593
+ exports.useCopy = useCopy;
1594
+ //# sourceMappingURL=index.js.map
1595
+ //# sourceMappingURL=index.js.map