@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/primitives.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
7
7
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
8
|
-
import { ChevronDown, CheckIcon, CircleIcon, Sun, Moon, X, XIcon, AlertTriangle, Pencil, ChevronLeft, ChevronRight, ChevronDownIcon, ChevronUpIcon, Maximize2, Check, Copy } from 'lucide-react';
|
|
8
|
+
import { ChevronDown, Plus, CheckIcon, CircleIcon, Sun, Moon, X, XIcon, AlertTriangle, Pencil, ChevronLeft, ChevronRight, ChevronDownIcon, ChevronUpIcon, Maximize2, Check, Copy } from 'lucide-react';
|
|
9
9
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
10
10
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
11
11
|
import { useTheme } from 'next-themes';
|
|
@@ -34,7 +34,14 @@ var buttonVariants = cva(
|
|
|
34
34
|
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",
|
|
35
35
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
36
36
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
37
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
37
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
38
|
+
// For CTAs placed ON a saturated brand band or a dark section
|
|
39
|
+
// (e.g. a terracotta hero / footer / a forced-dark block) where
|
|
40
|
+
// the surface is dark+light-text in either mode. A neutral white
|
|
41
|
+
// pill + a translucent-white ghost read on any such surface;
|
|
42
|
+
// hardcoded white is deliberate (cf. destructive's text-white).
|
|
43
|
+
onBrand: "bg-white text-neutral-900 shadow-sm hover:bg-white/90",
|
|
44
|
+
onBrandOutline: "border border-white/40 bg-transparent text-white hover:bg-white/10"
|
|
38
45
|
},
|
|
39
46
|
size: {
|
|
40
47
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
@@ -77,7 +84,8 @@ var badgeVariants = cva(
|
|
|
77
84
|
warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90 border-transparent",
|
|
78
85
|
success: "bg-success text-success-foreground [a&]:hover:bg-success/90 border-transparent",
|
|
79
86
|
info: "bg-info text-info-foreground [a&]:hover:bg-info/90 border-transparent",
|
|
80
|
-
brand: "bg-brand-soft text-
|
|
87
|
+
brand: "bg-brand-soft text-accent-foreground border-transparent",
|
|
88
|
+
neutral: "bg-foreground text-background [a&]:hover:bg-foreground/90 border-transparent",
|
|
81
89
|
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
82
90
|
}
|
|
83
91
|
},
|
|
@@ -102,7 +110,7 @@ function Input({ className, type, ...props }) {
|
|
|
102
110
|
className: cn(
|
|
103
111
|
"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",
|
|
104
112
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
105
|
-
"aria-invalid:ring-
|
|
113
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
106
114
|
className
|
|
107
115
|
),
|
|
108
116
|
...props
|
|
@@ -132,7 +140,7 @@ function Checkbox({ className, ...props }) {
|
|
|
132
140
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
133
141
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
134
142
|
"data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",
|
|
135
|
-
"aria-invalid:ring-
|
|
143
|
+
"aria-invalid:ring-2 aria-invalid:ring-destructive/50 aria-invalid:border-destructive",
|
|
136
144
|
className
|
|
137
145
|
),
|
|
138
146
|
...props,
|
|
@@ -173,7 +181,7 @@ function RadioGroupItem({
|
|
|
173
181
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
174
182
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
175
183
|
"data-[state=checked]:border-primary",
|
|
176
|
-
"aria-invalid:ring-
|
|
184
|
+
"aria-invalid:ring-2 aria-invalid:ring-destructive/50 aria-invalid:border-destructive",
|
|
177
185
|
className
|
|
178
186
|
),
|
|
179
187
|
...props,
|
|
@@ -198,7 +206,7 @@ function Switch({ className, ...props }) {
|
|
|
198
206
|
"data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
199
207
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
200
208
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
201
|
-
"aria-invalid:ring-
|
|
209
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
202
210
|
className
|
|
203
211
|
),
|
|
204
212
|
...props,
|
|
@@ -356,7 +364,7 @@ function Textarea({ className, ...props }) {
|
|
|
356
364
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
357
365
|
// aria-invalid parity with Input — error styling when a consumer
|
|
358
366
|
// marks the field invalid.
|
|
359
|
-
"aria-invalid:ring-
|
|
367
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
360
368
|
className
|
|
361
369
|
),
|
|
362
370
|
...props
|
|
@@ -1188,18 +1196,19 @@ function Tooltip({
|
|
|
1188
1196
|
var Accordion = AccordionPrimitive.Root;
|
|
1189
1197
|
var AccordionItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ref, className: cn("border-b", className), ...props }));
|
|
1190
1198
|
AccordionItem.displayName = "AccordionItem";
|
|
1191
|
-
var AccordionTrigger = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
1199
|
+
var AccordionTrigger = React2.forwardRef(({ className, children, icon = "chevron", ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
1192
1200
|
AccordionPrimitive.Trigger,
|
|
1193
1201
|
{
|
|
1194
1202
|
ref,
|
|
1195
1203
|
className: cn(
|
|
1196
|
-
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline
|
|
1204
|
+
"flex flex-1 items-center justify-between gap-4 py-4 text-left font-medium transition-all hover:underline",
|
|
1205
|
+
icon === "chevron" ? "[&[data-state=open]>svg]:rotate-180" : "[&[data-state=open]>svg]:rotate-45",
|
|
1197
1206
|
className
|
|
1198
1207
|
),
|
|
1199
1208
|
...props,
|
|
1200
1209
|
children: [
|
|
1201
1210
|
children,
|
|
1202
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
1211
|
+
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" })
|
|
1203
1212
|
]
|
|
1204
1213
|
}
|
|
1205
1214
|
) }));
|
|
@@ -1392,6 +1401,105 @@ var Toaster = ({ ...props }) => {
|
|
|
1392
1401
|
}
|
|
1393
1402
|
);
|
|
1394
1403
|
};
|
|
1404
|
+
var surfaceVariants = cva("rounded-xl transition-colors", {
|
|
1405
|
+
variants: {
|
|
1406
|
+
tone: {
|
|
1407
|
+
/* Crisp panel floating on the page — the default soft card. */
|
|
1408
|
+
default: "bg-card text-card-foreground",
|
|
1409
|
+
/* Warm-gray recessed panel. */
|
|
1410
|
+
muted: "bg-muted text-foreground",
|
|
1411
|
+
/* Solid brand fill — small terracotta panel; inverts child text. */
|
|
1412
|
+
brand: "bg-brand text-brand-foreground",
|
|
1413
|
+
/* High-contrast neutral panel (near-black in light, near-white in dark). */
|
|
1414
|
+
contrast: "bg-foreground text-background",
|
|
1415
|
+
/* Translucent lightened tile for cards sitting ON a brand band. */
|
|
1416
|
+
onBrand: "text-brand-foreground [background:color-mix(in_oklch,white_16%,var(--brand))] [border-color:color-mix(in_oklch,white_24%,transparent)]",
|
|
1417
|
+
/* Frame only, transparent fill. */
|
|
1418
|
+
outline: "bg-transparent text-foreground"
|
|
1419
|
+
},
|
|
1420
|
+
elevation: {
|
|
1421
|
+
none: "shadow-none",
|
|
1422
|
+
sm: "shadow-sm",
|
|
1423
|
+
md: "shadow-md",
|
|
1424
|
+
lg: "shadow-lg",
|
|
1425
|
+
xl: "shadow-xl"
|
|
1426
|
+
},
|
|
1427
|
+
bordered: {
|
|
1428
|
+
true: "border",
|
|
1429
|
+
false: ""
|
|
1430
|
+
},
|
|
1431
|
+
pad: {
|
|
1432
|
+
none: "p-0",
|
|
1433
|
+
sm: "p-4",
|
|
1434
|
+
md: "p-5 sm:p-6",
|
|
1435
|
+
lg: "p-6 sm:p-8"
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1438
|
+
defaultVariants: {
|
|
1439
|
+
tone: "default",
|
|
1440
|
+
elevation: "sm",
|
|
1441
|
+
bordered: true,
|
|
1442
|
+
pad: "md"
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
function Surface({
|
|
1446
|
+
className,
|
|
1447
|
+
tone,
|
|
1448
|
+
elevation,
|
|
1449
|
+
bordered,
|
|
1450
|
+
pad,
|
|
1451
|
+
...props
|
|
1452
|
+
}) {
|
|
1453
|
+
return /* @__PURE__ */ jsx(
|
|
1454
|
+
"div",
|
|
1455
|
+
{
|
|
1456
|
+
"data-slot": "surface",
|
|
1457
|
+
className: cn(surfaceVariants({ tone, elevation, bordered, pad }), className),
|
|
1458
|
+
...props
|
|
1459
|
+
}
|
|
1460
|
+
);
|
|
1461
|
+
}
|
|
1462
|
+
var iconBadgeVariants = cva(
|
|
1463
|
+
"inline-flex shrink-0 items-center justify-center rounded-md font-semibold [&_svg]:pointer-events-none",
|
|
1464
|
+
{
|
|
1465
|
+
variants: {
|
|
1466
|
+
tone: {
|
|
1467
|
+
/* The signature peach tile — soft accent fill, terracotta glyph.
|
|
1468
|
+
Auto-swaps to warm-dark + light-peach in dark mode via tokens. */
|
|
1469
|
+
peach: "bg-accent text-accent-foreground",
|
|
1470
|
+
/* Inverted near-black tile, light glyph ("never do" promises). */
|
|
1471
|
+
dark: "bg-foreground text-background",
|
|
1472
|
+
/* Solid brand tile. */
|
|
1473
|
+
brand: "bg-primary text-primary-foreground",
|
|
1474
|
+
/* White tile on a brand band, terracotta glyph (numbered steps). */
|
|
1475
|
+
onBrand: "bg-brand-foreground text-primary",
|
|
1476
|
+
/* Quiet neutral tile. */
|
|
1477
|
+
muted: "bg-muted text-foreground",
|
|
1478
|
+
/* Crisp white (card-colored) tile with a terracotta glyph and a
|
|
1479
|
+
soft lift — the elevated icon chip on muted/colored cards. */
|
|
1480
|
+
surface: "bg-card text-primary shadow-sm"
|
|
1481
|
+
},
|
|
1482
|
+
size: {
|
|
1483
|
+
sm: "size-9 text-xs [&_svg]:size-4",
|
|
1484
|
+
md: "size-11 text-sm [&_svg]:size-5",
|
|
1485
|
+
lg: "size-12 text-base [&_svg]:size-6",
|
|
1486
|
+
xl: "size-14 text-lg [&_svg]:size-7"
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
defaultVariants: { tone: "peach", size: "md" }
|
|
1490
|
+
}
|
|
1491
|
+
);
|
|
1492
|
+
function IconBadge({ className, tone, size, children, ...props }) {
|
|
1493
|
+
return /* @__PURE__ */ jsx(
|
|
1494
|
+
"span",
|
|
1495
|
+
{
|
|
1496
|
+
"data-slot": "icon-badge",
|
|
1497
|
+
className: cn(iconBadgeVariants({ tone, size }), className),
|
|
1498
|
+
...props,
|
|
1499
|
+
children
|
|
1500
|
+
}
|
|
1501
|
+
);
|
|
1502
|
+
}
|
|
1395
1503
|
function Card({
|
|
1396
1504
|
id,
|
|
1397
1505
|
title,
|
|
@@ -1504,7 +1612,7 @@ function Sparkline({ data, width = 96, height = 24, area = false, className }) {
|
|
|
1504
1612
|
function StatBlock({ label, value, sub, delta, tone = "default", className }) {
|
|
1505
1613
|
const toneClass = tone === "success" ? "text-success" : tone === "warning" ? "text-warning" : tone === "destructive" ? "text-destructive" : "text-foreground";
|
|
1506
1614
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
1507
|
-
/* @__PURE__ */ jsx("span", { className: "label-mono text-[10px]", children: label }),
|
|
1615
|
+
/* @__PURE__ */ jsx("span", { className: "label-mono text-muted-foreground text-[10px]", children: label }),
|
|
1508
1616
|
/* @__PURE__ */ jsx(
|
|
1509
1617
|
"span",
|
|
1510
1618
|
{
|
|
@@ -1808,6 +1916,6 @@ function QrCode({ value, size = 200, label, className }) {
|
|
|
1808
1916
|
);
|
|
1809
1917
|
}
|
|
1810
1918
|
|
|
1811
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithCountdown, Badge, Bar, BitcoinAddress, Button, Card, Checkbox, ConfirmHost, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, QrCode, RadioGroup, RadioGroupItem, SatsAmount, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Sparkline, StatBlock, StatusPill, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Tooltip, Working, WorkingPanel, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt };
|
|
1919
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithCountdown, Badge, Bar, BitcoinAddress, Button, Card, Checkbox, ConfirmHost, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, IconBadge, Input, Label, Modal, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, QrCode, RadioGroup, RadioGroupItem, SatsAmount, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Sparkline, StatBlock, StatusPill, Surface, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Tooltip, Working, WorkingPanel, badgeVariants, buttonVariants, confirm, iconBadgeVariants, makeStatusPill, prompt, surfaceVariants };
|
|
1812
1920
|
//# sourceMappingURL=primitives.mjs.map
|
|
1813
1921
|
//# sourceMappingURL=primitives.mjs.map
|