@orangecheck/design 0.19.0 → 0.20.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.
- package/dist/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +814 -178
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +764 -143
- package/dist/components.mjs.map +1 -1
- package/dist/composites.d.mts +142 -1
- package/dist/composites.d.ts +142 -1
- package/dist/composites.js +641 -3
- package/dist/composites.js.map +1 -1
- package/dist/composites.mjs +627 -4
- package/dist/composites.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +522 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +506 -13
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +24 -4
- package/dist/primitives.d.ts +24 -4
- package/dist/primitives.js +123 -11
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +121 -13
- package/dist/primitives.mjs.map +1 -1
- package/dist/styles/fonts/hanken-grotesk-latin-ext.woff2 +0 -0
- package/dist/styles/fonts/hanken-grotesk-latin.woff2 +0 -0
- package/dist/styles/fonts.css +29 -0
- package/dist/styles/theme.css +43 -5
- package/dist/styles/themes/ember.css +223 -0
- package/dist/styles/themes.css +1 -0
- package/dist/styles.css +1 -0
- package/dist/tokens.js +6 -0
- package/dist/tokens.js.map +1 -1
- package/dist/tokens.mjs +6 -0
- package/dist/tokens.mjs.map +1 -1
- package/package.json +1 -1
package/dist/composites.mjs
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import * as Popover from '@radix-ui/react-popover';
|
|
2
|
-
import { HelpCircle } from 'lucide-react';
|
|
2
|
+
import { ChevronDown, Plus, HelpCircle, X, Check } from 'lucide-react';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import {
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import Link from 'next/link';
|
|
7
|
+
import * as React3 from 'react';
|
|
7
8
|
import { Fragment } from 'react';
|
|
9
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
10
|
+
import { cva } from 'class-variance-authority';
|
|
11
|
+
import '@radix-ui/react-label';
|
|
12
|
+
import '@radix-ui/react-checkbox';
|
|
13
|
+
import '@radix-ui/react-radio-group';
|
|
14
|
+
import '@radix-ui/react-switch';
|
|
15
|
+
import 'next-themes';
|
|
16
|
+
import '@radix-ui/react-separator';
|
|
17
|
+
import '@radix-ui/react-dialog';
|
|
18
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
19
|
+
import '@radix-ui/react-select';
|
|
20
|
+
import 'sonner';
|
|
21
|
+
import '@radix-ui/react-tabs';
|
|
22
|
+
import 'qrcode';
|
|
8
23
|
|
|
9
24
|
// src/composites/help-hint.tsx
|
|
10
25
|
function cn(...inputs) {
|
|
@@ -161,7 +176,7 @@ function StatTile({ children, ...item }) {
|
|
|
161
176
|
function StatBlock({ label, value, sub, delta, tone = "default", className }) {
|
|
162
177
|
const toneClass = tone === "success" ? "text-success" : tone === "warning" ? "text-warning" : tone === "destructive" ? "text-destructive" : "text-foreground";
|
|
163
178
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
164
|
-
/* @__PURE__ */ jsx("span", { className: "label-mono text-[10px]", children: label }),
|
|
179
|
+
/* @__PURE__ */ jsx("span", { className: "label-mono text-muted-foreground text-[10px]", children: label }),
|
|
165
180
|
/* @__PURE__ */ jsx(
|
|
166
181
|
"span",
|
|
167
182
|
{
|
|
@@ -259,7 +274,615 @@ function DataRow({ children, meta, action, as, className }) {
|
|
|
259
274
|
}
|
|
260
275
|
);
|
|
261
276
|
}
|
|
277
|
+
function TwoToneHeading({
|
|
278
|
+
lead,
|
|
279
|
+
muted,
|
|
280
|
+
as,
|
|
281
|
+
tone = "default",
|
|
282
|
+
className
|
|
283
|
+
}) {
|
|
284
|
+
const Tag = as ?? "h2";
|
|
285
|
+
const leadColor = tone === "onBrand" ? "text-primary-foreground" : "text-foreground";
|
|
286
|
+
const mutedColor = tone === "onBrand" ? "text-primary-foreground/60" : "text-foreground/40";
|
|
287
|
+
return /* @__PURE__ */ jsxs(
|
|
288
|
+
Tag,
|
|
289
|
+
{
|
|
290
|
+
className: cn(
|
|
291
|
+
"font-extrabold tracking-[-0.02em] leading-[1.0] text-balance",
|
|
292
|
+
"text-3xl sm:text-4xl md:text-5xl",
|
|
293
|
+
leadColor,
|
|
294
|
+
className
|
|
295
|
+
),
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ jsx("span", { children: lead }),
|
|
298
|
+
muted ? /* @__PURE__ */ jsxs("span", { className: mutedColor, children: [
|
|
299
|
+
" ",
|
|
300
|
+
muted
|
|
301
|
+
] }) : null
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
function MarketingHeading({
|
|
307
|
+
eyebrow,
|
|
308
|
+
lead,
|
|
309
|
+
muted,
|
|
310
|
+
body,
|
|
311
|
+
align = "start",
|
|
312
|
+
tone = "default",
|
|
313
|
+
as,
|
|
314
|
+
className
|
|
315
|
+
}) {
|
|
316
|
+
const centered = align === "center";
|
|
317
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", centered && "items-center text-center", className), children: [
|
|
318
|
+
eyebrow && /* @__PURE__ */ jsx(
|
|
319
|
+
"p",
|
|
320
|
+
{
|
|
321
|
+
className: cn(
|
|
322
|
+
"label-mono mb-3",
|
|
323
|
+
tone === "onBrand" ? "text-primary-foreground/80" : "text-primary"
|
|
324
|
+
),
|
|
325
|
+
children: eyebrow
|
|
326
|
+
}
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ jsx(
|
|
329
|
+
TwoToneHeading,
|
|
330
|
+
{
|
|
331
|
+
lead,
|
|
332
|
+
muted,
|
|
333
|
+
as,
|
|
334
|
+
tone,
|
|
335
|
+
className: cn("max-w-4xl", centered && "mx-auto")
|
|
336
|
+
}
|
|
337
|
+
),
|
|
338
|
+
body && /* @__PURE__ */ jsx(
|
|
339
|
+
"p",
|
|
340
|
+
{
|
|
341
|
+
className: cn(
|
|
342
|
+
"mt-4 max-w-2xl text-base sm:text-lg",
|
|
343
|
+
tone === "onBrand" ? "text-primary-foreground/80" : "text-muted-foreground",
|
|
344
|
+
centered && "mx-auto"
|
|
345
|
+
),
|
|
346
|
+
children: body
|
|
347
|
+
}
|
|
348
|
+
)
|
|
349
|
+
] });
|
|
350
|
+
}
|
|
351
|
+
var buttonVariants = cva(
|
|
352
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
353
|
+
{
|
|
354
|
+
variants: {
|
|
355
|
+
variant: {
|
|
356
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
357
|
+
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white",
|
|
358
|
+
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
|
359
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
360
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
361
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
362
|
+
// For CTAs placed ON a saturated brand band or a dark section
|
|
363
|
+
// (e.g. a terracotta hero / footer / a forced-dark block) where
|
|
364
|
+
// the surface is dark+light-text in either mode. A neutral white
|
|
365
|
+
// pill + a translucent-white ghost read on any such surface;
|
|
366
|
+
// hardcoded white is deliberate (cf. destructive's text-white).
|
|
367
|
+
onBrand: "bg-white text-neutral-900 shadow-sm hover:bg-white/90",
|
|
368
|
+
onBrandOutline: "border border-white/40 bg-transparent text-white hover:bg-white/10"
|
|
369
|
+
},
|
|
370
|
+
size: {
|
|
371
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
372
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
373
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
374
|
+
icon: "size-9"
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
defaultVariants: {
|
|
378
|
+
variant: "default",
|
|
379
|
+
size: "default"
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
);
|
|
383
|
+
function Button({
|
|
384
|
+
className,
|
|
385
|
+
variant,
|
|
386
|
+
size,
|
|
387
|
+
asChild = false,
|
|
388
|
+
...props
|
|
389
|
+
}) {
|
|
390
|
+
const Comp = asChild ? Slot : "button";
|
|
391
|
+
return /* @__PURE__ */ jsx(
|
|
392
|
+
Comp,
|
|
393
|
+
{
|
|
394
|
+
"data-slot": "button",
|
|
395
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
396
|
+
...props
|
|
397
|
+
}
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
cva(
|
|
401
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
402
|
+
{
|
|
403
|
+
variants: {
|
|
404
|
+
variant: {
|
|
405
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
|
|
406
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
|
|
407
|
+
destructive: "bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 border-transparent",
|
|
408
|
+
warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90 border-transparent",
|
|
409
|
+
success: "bg-success text-success-foreground [a&]:hover:bg-success/90 border-transparent",
|
|
410
|
+
info: "bg-info text-info-foreground [a&]:hover:bg-info/90 border-transparent",
|
|
411
|
+
brand: "bg-brand-soft text-accent-foreground border-transparent",
|
|
412
|
+
neutral: "bg-foreground text-background [a&]:hover:bg-foreground/90 border-transparent",
|
|
413
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
defaultVariants: { variant: "default" }
|
|
417
|
+
}
|
|
418
|
+
);
|
|
419
|
+
function Input({ className, type, ...props }) {
|
|
420
|
+
return /* @__PURE__ */ jsx(
|
|
421
|
+
"input",
|
|
422
|
+
{
|
|
423
|
+
type,
|
|
424
|
+
"data-slot": "input",
|
|
425
|
+
className: cn(
|
|
426
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input bg-input/30 hover:bg-input/50 dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow,background-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
427
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
428
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
429
|
+
className
|
|
430
|
+
),
|
|
431
|
+
...props
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
cva(
|
|
436
|
+
"relative grid w-full grid-cols-[0_1fr] items-start gap-x-0 gap-y-0.5 rounded-md border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
437
|
+
{
|
|
438
|
+
variants: {
|
|
439
|
+
variant: {
|
|
440
|
+
default: "bg-card text-card-foreground",
|
|
441
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
|
|
442
|
+
success: "text-success bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-success/90",
|
|
443
|
+
warning: "text-warning bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-warning/90"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
defaultVariants: { variant: "default" }
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
globalThis.process?.env?.NODE_ENV;
|
|
450
|
+
globalThis.process?.env?.NODE_ENV;
|
|
451
|
+
var Accordion = AccordionPrimitive.Root;
|
|
452
|
+
var AccordionItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ref, className: cn("border-b", className), ...props }));
|
|
453
|
+
AccordionItem.displayName = "AccordionItem";
|
|
454
|
+
var AccordionTrigger = React3.forwardRef(({ className, children, icon = "chevron", ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
455
|
+
AccordionPrimitive.Trigger,
|
|
456
|
+
{
|
|
457
|
+
ref,
|
|
458
|
+
className: cn(
|
|
459
|
+
"flex flex-1 items-center justify-between gap-4 py-4 text-left font-medium transition-all hover:underline",
|
|
460
|
+
icon === "chevron" ? "[&[data-state=open]>svg]:rotate-180" : "[&[data-state=open]>svg]:rotate-45",
|
|
461
|
+
className
|
|
462
|
+
),
|
|
463
|
+
...props,
|
|
464
|
+
children: [
|
|
465
|
+
children,
|
|
466
|
+
icon === "chevron" ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" }) : /* @__PURE__ */ jsx(Plus, { className: "text-primary h-5 w-5 shrink-0 transition-transform duration-200" })
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
) }));
|
|
470
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
471
|
+
var AccordionContent = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
472
|
+
AccordionPrimitive.Content,
|
|
473
|
+
{
|
|
474
|
+
ref,
|
|
475
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all",
|
|
476
|
+
...props,
|
|
477
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
|
|
478
|
+
}
|
|
479
|
+
));
|
|
480
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
481
|
+
var surfaceVariants = cva("rounded-xl transition-colors", {
|
|
482
|
+
variants: {
|
|
483
|
+
tone: {
|
|
484
|
+
/* Crisp panel floating on the page — the default soft card. */
|
|
485
|
+
default: "bg-card text-card-foreground",
|
|
486
|
+
/* Warm-gray recessed panel. */
|
|
487
|
+
muted: "bg-muted text-foreground",
|
|
488
|
+
/* Solid brand fill — small terracotta panel; inverts child text. */
|
|
489
|
+
brand: "bg-brand text-brand-foreground",
|
|
490
|
+
/* High-contrast neutral panel (near-black in light, near-white in dark). */
|
|
491
|
+
contrast: "bg-foreground text-background",
|
|
492
|
+
/* Translucent lightened tile for cards sitting ON a brand band. */
|
|
493
|
+
onBrand: "text-brand-foreground [background:color-mix(in_oklch,white_16%,var(--brand))] [border-color:color-mix(in_oklch,white_24%,transparent)]",
|
|
494
|
+
/* Frame only, transparent fill. */
|
|
495
|
+
outline: "bg-transparent text-foreground"
|
|
496
|
+
},
|
|
497
|
+
elevation: {
|
|
498
|
+
none: "shadow-none",
|
|
499
|
+
sm: "shadow-sm",
|
|
500
|
+
md: "shadow-md",
|
|
501
|
+
lg: "shadow-lg",
|
|
502
|
+
xl: "shadow-xl"
|
|
503
|
+
},
|
|
504
|
+
bordered: {
|
|
505
|
+
true: "border",
|
|
506
|
+
false: ""
|
|
507
|
+
},
|
|
508
|
+
pad: {
|
|
509
|
+
none: "p-0",
|
|
510
|
+
sm: "p-4",
|
|
511
|
+
md: "p-5 sm:p-6",
|
|
512
|
+
lg: "p-6 sm:p-8"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
defaultVariants: {
|
|
516
|
+
tone: "default",
|
|
517
|
+
elevation: "sm",
|
|
518
|
+
bordered: true,
|
|
519
|
+
pad: "md"
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
function Surface({
|
|
523
|
+
className,
|
|
524
|
+
tone,
|
|
525
|
+
elevation,
|
|
526
|
+
bordered,
|
|
527
|
+
pad,
|
|
528
|
+
...props
|
|
529
|
+
}) {
|
|
530
|
+
return /* @__PURE__ */ jsx(
|
|
531
|
+
"div",
|
|
532
|
+
{
|
|
533
|
+
"data-slot": "surface",
|
|
534
|
+
className: cn(surfaceVariants({ tone, elevation, bordered, pad }), className),
|
|
535
|
+
...props
|
|
536
|
+
}
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
var iconBadgeVariants = cva(
|
|
540
|
+
"inline-flex shrink-0 items-center justify-center rounded-md font-semibold [&_svg]:pointer-events-none",
|
|
541
|
+
{
|
|
542
|
+
variants: {
|
|
543
|
+
tone: {
|
|
544
|
+
/* The signature peach tile — soft accent fill, terracotta glyph.
|
|
545
|
+
Auto-swaps to warm-dark + light-peach in dark mode via tokens. */
|
|
546
|
+
peach: "bg-accent text-accent-foreground",
|
|
547
|
+
/* Inverted near-black tile, light glyph ("never do" promises). */
|
|
548
|
+
dark: "bg-foreground text-background",
|
|
549
|
+
/* Solid brand tile. */
|
|
550
|
+
brand: "bg-primary text-primary-foreground",
|
|
551
|
+
/* White tile on a brand band, terracotta glyph (numbered steps). */
|
|
552
|
+
onBrand: "bg-brand-foreground text-primary",
|
|
553
|
+
/* Quiet neutral tile. */
|
|
554
|
+
muted: "bg-muted text-foreground",
|
|
555
|
+
/* Crisp white (card-colored) tile with a terracotta glyph and a
|
|
556
|
+
soft lift — the elevated icon chip on muted/colored cards. */
|
|
557
|
+
surface: "bg-card text-primary shadow-sm"
|
|
558
|
+
},
|
|
559
|
+
size: {
|
|
560
|
+
sm: "size-9 text-xs [&_svg]:size-4",
|
|
561
|
+
md: "size-11 text-sm [&_svg]:size-5",
|
|
562
|
+
lg: "size-12 text-base [&_svg]:size-6",
|
|
563
|
+
xl: "size-14 text-lg [&_svg]:size-7"
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
defaultVariants: { tone: "peach", size: "md" }
|
|
567
|
+
}
|
|
568
|
+
);
|
|
569
|
+
function IconBadge({ className, tone, size, children, ...props }) {
|
|
570
|
+
return /* @__PURE__ */ jsx(
|
|
571
|
+
"span",
|
|
572
|
+
{
|
|
573
|
+
"data-slot": "icon-badge",
|
|
574
|
+
className: cn(iconBadgeVariants({ tone, size }), className),
|
|
575
|
+
...props,
|
|
576
|
+
children
|
|
577
|
+
}
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
function FeatureCard({
|
|
581
|
+
icon,
|
|
582
|
+
iconTone = "peach",
|
|
583
|
+
title,
|
|
584
|
+
children,
|
|
585
|
+
orientation = "vertical",
|
|
586
|
+
align = "start",
|
|
587
|
+
tone = "default",
|
|
588
|
+
elevation = "sm",
|
|
589
|
+
className
|
|
590
|
+
}) {
|
|
591
|
+
const horizontal = orientation === "horizontal";
|
|
592
|
+
const centered = !horizontal && align === "center";
|
|
593
|
+
return /* @__PURE__ */ jsxs(
|
|
594
|
+
Surface,
|
|
595
|
+
{
|
|
596
|
+
tone,
|
|
597
|
+
elevation,
|
|
598
|
+
pad: horizontal ? "md" : "lg",
|
|
599
|
+
className: cn(
|
|
600
|
+
"flex h-full",
|
|
601
|
+
horizontal ? "flex-row gap-4" : "flex-col",
|
|
602
|
+
centered && "items-center text-center",
|
|
603
|
+
className
|
|
604
|
+
),
|
|
605
|
+
children: [
|
|
606
|
+
icon && /* @__PURE__ */ jsx(
|
|
607
|
+
IconBadge,
|
|
608
|
+
{
|
|
609
|
+
tone: iconTone,
|
|
610
|
+
size: "lg",
|
|
611
|
+
className: cn(horizontal ? "shrink-0" : "mb-4"),
|
|
612
|
+
children: icon
|
|
613
|
+
}
|
|
614
|
+
),
|
|
615
|
+
/* @__PURE__ */ jsxs("div", { className: cn(horizontal && "min-w-0"), children: [
|
|
616
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: title }),
|
|
617
|
+
children && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1.5 text-sm leading-relaxed", children })
|
|
618
|
+
] })
|
|
619
|
+
]
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
var TONE = {
|
|
624
|
+
default: "bg-background text-foreground",
|
|
625
|
+
muted: "bg-muted text-foreground",
|
|
626
|
+
brand: "bg-brand text-brand-foreground",
|
|
627
|
+
// `dark` activates the .dark variant locally so descendant package
|
|
628
|
+
// components render their dark arm even on an otherwise light page.
|
|
629
|
+
dark: "dark bg-background text-foreground"
|
|
630
|
+
};
|
|
631
|
+
var WIDTH = {
|
|
632
|
+
default: "container",
|
|
633
|
+
wide: "mx-auto w-full max-w-screen-2xl px-4 sm:px-6 lg:px-8",
|
|
634
|
+
full: ""
|
|
635
|
+
};
|
|
636
|
+
function Section({
|
|
637
|
+
tone = "default",
|
|
638
|
+
width = "default",
|
|
639
|
+
diagonal,
|
|
640
|
+
id,
|
|
641
|
+
className,
|
|
642
|
+
innerClassName,
|
|
643
|
+
children
|
|
644
|
+
}) {
|
|
645
|
+
const showDiagonal = diagonal ?? tone === "brand";
|
|
646
|
+
return /* @__PURE__ */ jsx(
|
|
647
|
+
"div",
|
|
648
|
+
{
|
|
649
|
+
id,
|
|
650
|
+
className: cn("w-full", TONE[tone], showDiagonal && "oc-diagonal", className),
|
|
651
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("py-16 sm:py-20 md:py-24", WIDTH[width], innerClassName), children })
|
|
652
|
+
}
|
|
653
|
+
);
|
|
654
|
+
}
|
|
655
|
+
function BrandBand(props) {
|
|
656
|
+
return /* @__PURE__ */ jsx(Section, { tone: "brand", ...props });
|
|
657
|
+
}
|
|
658
|
+
function ComparisonTable({ rows, columns, className }) {
|
|
659
|
+
const cols = { feature: "", theirs: "A normal login", ours: "OrangeCheck", ...columns };
|
|
660
|
+
return /* @__PURE__ */ jsx("div", { className: cn("overflow-hidden rounded-xl border", className), children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("div", { className: "min-w-[32rem]", children: [
|
|
661
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[1.4fr_1fr_1fr]", children: [
|
|
662
|
+
/* @__PURE__ */ jsx("div", { className: "label-mono text-muted-foreground px-4 py-3.5 sm:px-6", children: cols.feature }),
|
|
663
|
+
/* @__PURE__ */ jsx("div", { className: "px-4 py-3.5 font-semibold text-foreground sm:px-6", children: cols.theirs }),
|
|
664
|
+
/* @__PURE__ */ jsx("div", { className: "bg-accent/60 border-border/60 border-l px-4 py-3.5 font-semibold text-primary sm:px-6", children: cols.ours })
|
|
665
|
+
] }),
|
|
666
|
+
rows.map((row, i) => /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[1.4fr_1fr_1fr] border-t", children: [
|
|
667
|
+
/* @__PURE__ */ jsx("div", { className: "px-4 py-3.5 font-medium text-foreground sm:px-6", children: row.label }),
|
|
668
|
+
/* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-center gap-2 px-4 py-3.5 sm:px-6", children: [
|
|
669
|
+
/* @__PURE__ */ jsx(X, { className: "text-muted-foreground/70 size-4" }),
|
|
670
|
+
/* @__PURE__ */ jsx("span", { children: row.theirs })
|
|
671
|
+
] }),
|
|
672
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-accent/40 border-border/60 flex items-center gap-2 border-l px-4 py-3.5 text-foreground sm:px-6", children: [
|
|
673
|
+
/* @__PURE__ */ jsx(Check, { className: "size-4 text-primary" }),
|
|
674
|
+
/* @__PURE__ */ jsx("span", { children: row.ours })
|
|
675
|
+
] })
|
|
676
|
+
] }, i))
|
|
677
|
+
] }) }) });
|
|
678
|
+
}
|
|
679
|
+
function NumberedStep({
|
|
680
|
+
n,
|
|
681
|
+
title,
|
|
682
|
+
children,
|
|
683
|
+
tone = "default",
|
|
684
|
+
card = false,
|
|
685
|
+
className
|
|
686
|
+
}) {
|
|
687
|
+
const onBrand = tone === "onBrand";
|
|
688
|
+
const body = /* @__PURE__ */ jsxs("div", { className: cn(!card && className), children: [
|
|
689
|
+
/* @__PURE__ */ jsx(IconBadge, { tone: onBrand ? "onBrand" : "peach", size: "sm", children: n }),
|
|
690
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4 text-lg font-semibold", children: title }),
|
|
691
|
+
children && /* @__PURE__ */ jsx(
|
|
692
|
+
"div",
|
|
693
|
+
{
|
|
694
|
+
className: cn(
|
|
695
|
+
"mt-1.5 text-sm leading-relaxed",
|
|
696
|
+
onBrand ? "text-brand-foreground/80" : "text-muted-foreground"
|
|
697
|
+
),
|
|
698
|
+
children
|
|
699
|
+
}
|
|
700
|
+
)
|
|
701
|
+
] });
|
|
702
|
+
if (!card) return body;
|
|
703
|
+
return /* @__PURE__ */ jsx(
|
|
704
|
+
Surface,
|
|
705
|
+
{
|
|
706
|
+
tone: onBrand ? "onBrand" : "default",
|
|
707
|
+
elevation: onBrand ? "none" : "sm",
|
|
708
|
+
pad: "md",
|
|
709
|
+
className,
|
|
710
|
+
children: body
|
|
711
|
+
}
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
var COLUMNS = {
|
|
715
|
+
2: "md:grid-cols-2",
|
|
716
|
+
3: "md:grid-cols-3",
|
|
717
|
+
4: "md:grid-cols-4"
|
|
718
|
+
};
|
|
719
|
+
function StepList({
|
|
720
|
+
steps,
|
|
721
|
+
variant = "bare",
|
|
722
|
+
tone = "default",
|
|
723
|
+
columns = 3,
|
|
724
|
+
className
|
|
725
|
+
}) {
|
|
726
|
+
return /* @__PURE__ */ jsx("div", { className: cn("grid gap-6 sm:grid-cols-2 sm:gap-8", COLUMNS[columns], className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
727
|
+
NumberedStep,
|
|
728
|
+
{
|
|
729
|
+
n: index + 1,
|
|
730
|
+
title: step.title,
|
|
731
|
+
tone,
|
|
732
|
+
card: variant === "card",
|
|
733
|
+
children: step.children
|
|
734
|
+
},
|
|
735
|
+
index
|
|
736
|
+
)) });
|
|
737
|
+
}
|
|
738
|
+
function Faq({ items, defaultOpen, className }) {
|
|
739
|
+
return /* @__PURE__ */ jsx(
|
|
740
|
+
Accordion,
|
|
741
|
+
{
|
|
742
|
+
type: "single",
|
|
743
|
+
collapsible: true,
|
|
744
|
+
defaultValue: defaultOpen != null ? String(defaultOpen) : void 0,
|
|
745
|
+
className: cn("w-full", className),
|
|
746
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs(AccordionItem, { value: String(i), children: [
|
|
747
|
+
/* @__PURE__ */ jsx(
|
|
748
|
+
AccordionTrigger,
|
|
749
|
+
{
|
|
750
|
+
icon: "plusMinus",
|
|
751
|
+
className: "text-foreground text-base font-semibold",
|
|
752
|
+
children: item.q
|
|
753
|
+
}
|
|
754
|
+
),
|
|
755
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "text-muted-foreground leading-relaxed", children: item.a })
|
|
756
|
+
] }, i))
|
|
757
|
+
}
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
function EmailCapture({
|
|
761
|
+
action,
|
|
762
|
+
method,
|
|
763
|
+
onSubmit,
|
|
764
|
+
name = "email",
|
|
765
|
+
placeholder = "you@email.com",
|
|
766
|
+
cta = "Join the waitlist",
|
|
767
|
+
note,
|
|
768
|
+
tone = "default",
|
|
769
|
+
className
|
|
770
|
+
}) {
|
|
771
|
+
const onBrand = tone === "onBrand";
|
|
772
|
+
return /* @__PURE__ */ jsxs("form", { action, method, onSubmit, className: cn(className), children: [
|
|
773
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center", children: [
|
|
774
|
+
/* @__PURE__ */ jsx(
|
|
775
|
+
Input,
|
|
776
|
+
{
|
|
777
|
+
type: "email",
|
|
778
|
+
name,
|
|
779
|
+
required: true,
|
|
780
|
+
placeholder,
|
|
781
|
+
className: cn(
|
|
782
|
+
"rounded-full text-base md:text-sm",
|
|
783
|
+
onBrand && "[background:color-mix(in_oklch,white_18%,transparent)] placeholder:text-primary-foreground/60 border-transparent text-primary-foreground"
|
|
784
|
+
)
|
|
785
|
+
}
|
|
786
|
+
),
|
|
787
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", variant: onBrand ? "onBrand" : "default", className: "rounded-full", children: cta })
|
|
788
|
+
] }),
|
|
789
|
+
note && /* @__PURE__ */ jsx(
|
|
790
|
+
"p",
|
|
791
|
+
{
|
|
792
|
+
className: cn(
|
|
793
|
+
"mt-3 text-sm",
|
|
794
|
+
onBrand ? "text-primary-foreground/70" : "text-muted-foreground"
|
|
795
|
+
),
|
|
796
|
+
children: note
|
|
797
|
+
}
|
|
798
|
+
)
|
|
799
|
+
] });
|
|
800
|
+
}
|
|
801
|
+
function CheckList({
|
|
802
|
+
items,
|
|
803
|
+
orientation = "horizontal",
|
|
804
|
+
tone = "default",
|
|
805
|
+
className
|
|
806
|
+
}) {
|
|
807
|
+
const glyph = tone === "onBrand" ? "text-brand-foreground" : "text-primary";
|
|
808
|
+
const label = tone === "onBrand" ? "text-brand-foreground/90" : "text-foreground";
|
|
809
|
+
return /* @__PURE__ */ jsx(
|
|
810
|
+
"ul",
|
|
811
|
+
{
|
|
812
|
+
className: cn(
|
|
813
|
+
orientation === "horizontal" ? "flex flex-wrap gap-x-6 gap-y-2 text-sm" : "flex flex-col gap-2 text-sm",
|
|
814
|
+
className
|
|
815
|
+
),
|
|
816
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs("li", { className: cn("inline-flex items-center gap-2", label), children: [
|
|
817
|
+
/* @__PURE__ */ jsx(Check, { className: cn("size-4 shrink-0", glyph) }),
|
|
818
|
+
item
|
|
819
|
+
] }, i))
|
|
820
|
+
}
|
|
821
|
+
);
|
|
822
|
+
}
|
|
823
|
+
function AccentNote({ lead, children, tone = "default", className }) {
|
|
824
|
+
const onBrand = tone === "onBrand";
|
|
825
|
+
return /* @__PURE__ */ jsxs(
|
|
826
|
+
"div",
|
|
827
|
+
{
|
|
828
|
+
className: cn(
|
|
829
|
+
"border-l-2 pl-4 text-sm leading-relaxed",
|
|
830
|
+
onBrand ? "border-primary-foreground/60 text-primary-foreground/80" : "border-primary text-muted-foreground",
|
|
831
|
+
className
|
|
832
|
+
),
|
|
833
|
+
children: [
|
|
834
|
+
lead && /* @__PURE__ */ jsx(
|
|
835
|
+
"strong",
|
|
836
|
+
{
|
|
837
|
+
className: cn(
|
|
838
|
+
"mr-1.5 font-semibold",
|
|
839
|
+
onBrand ? "text-primary-foreground" : "text-foreground"
|
|
840
|
+
),
|
|
841
|
+
children: lead
|
|
842
|
+
}
|
|
843
|
+
),
|
|
844
|
+
children
|
|
845
|
+
]
|
|
846
|
+
}
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
function AccentList({ items, className }) {
|
|
850
|
+
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col", className), children: items.map((item, i) => /* @__PURE__ */ jsxs(
|
|
851
|
+
"div",
|
|
852
|
+
{
|
|
853
|
+
className: cn("border-l-2 py-2 pl-5", item.active ? "border-primary" : "border-border"),
|
|
854
|
+
children: [
|
|
855
|
+
/* @__PURE__ */ jsx(
|
|
856
|
+
"div",
|
|
857
|
+
{
|
|
858
|
+
className: cn(
|
|
859
|
+
"font-semibold",
|
|
860
|
+
item.active ? "text-foreground" : "text-muted-foreground"
|
|
861
|
+
),
|
|
862
|
+
children: item.title
|
|
863
|
+
}
|
|
864
|
+
),
|
|
865
|
+
item.active && item.children && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground mt-1 text-sm leading-relaxed", children: item.children })
|
|
866
|
+
]
|
|
867
|
+
},
|
|
868
|
+
i
|
|
869
|
+
)) });
|
|
870
|
+
}
|
|
871
|
+
function VerifiedChip({ icon, iconTone = "peach", label, className }) {
|
|
872
|
+
return /* @__PURE__ */ jsxs(
|
|
873
|
+
Surface,
|
|
874
|
+
{
|
|
875
|
+
elevation: "lg",
|
|
876
|
+
pad: "none",
|
|
877
|
+
className: cn("inline-flex items-center gap-3 rounded-full px-3 py-2", className),
|
|
878
|
+
children: [
|
|
879
|
+
/* @__PURE__ */ jsx(IconBadge, { tone: iconTone, size: "sm", children: icon ?? /* @__PURE__ */ jsx(Check, {}) }),
|
|
880
|
+
/* @__PURE__ */ jsx("span", { className: "pr-2 text-sm font-semibold text-foreground", children: label })
|
|
881
|
+
]
|
|
882
|
+
}
|
|
883
|
+
);
|
|
884
|
+
}
|
|
262
885
|
|
|
263
|
-
export { Callout, DataRow, DefinitionList, EmptyState, HelpHint, SectionHeader, StatCard, StatGrid, StatTile };
|
|
886
|
+
export { AccentList, AccentNote, BrandBand, Callout, CheckList, ComparisonTable, DataRow, DefinitionList, EmailCapture, EmptyState, Faq, FeatureCard, HelpHint, MarketingHeading, NumberedStep, Section, SectionHeader, StatCard, StatGrid, StatTile, StepList, TwoToneHeading, VerifiedChip };
|
|
264
887
|
//# sourceMappingURL=composites.mjs.map
|
|
265
888
|
//# sourceMappingURL=composites.mjs.map
|