@orangecheck/design 0.6.1 → 0.7.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.
@@ -17,6 +17,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
17
17
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
18
18
  import * as SelectPrimitive from '@radix-ui/react-select';
19
19
  import { Toaster as Toaster$1 } from 'sonner';
20
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
20
21
  import QRCode from 'qrcode';
21
22
 
22
23
  // src/primitives/button.tsx
@@ -453,6 +454,7 @@ var ErrorBoundary = class extends React2.Component {
453
454
  }
454
455
  componentDidCatch(error, info) {
455
456
  console.error("[ErrorBoundary]", error, info);
457
+ this.props.onError?.(error, info);
456
458
  }
457
459
  render() {
458
460
  if (this.state.error) {
@@ -460,7 +462,7 @@ var ErrorBoundary = class extends React2.Component {
460
462
  return this.props.fallback(this.state.error, this.reset);
461
463
  }
462
464
  return /* @__PURE__ */ jsx("div", { className: "container py-16", children: /* @__PURE__ */ jsxs("div", { className: "terminal", children: [
463
- /* @__PURE__ */ jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsx("span", { className: "text-destructive flex items-center gap-1.5", children: "! fatal" }) }),
465
+ /* @__PURE__ */ jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsx("span", { className: "text-destructive flex items-center gap-1.5", children: this.props.title ?? "! fatal" }) }),
464
466
  /* @__PURE__ */ jsxs("div", { className: "space-y-3 p-5 font-mono text-xs leading-relaxed", children: [
465
467
  /* @__PURE__ */ jsxs("p", { children: [
466
468
  /* @__PURE__ */ jsxs("span", { className: "text-destructive", children: [
@@ -472,7 +474,7 @@ var ErrorBoundary = class extends React2.Component {
472
474
  ] }),
473
475
  /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
474
476
  "> ",
475
- "this page crashed. reload to recover."
477
+ this.props.message ?? "this page crashed. reload to recover."
476
478
  ] }),
477
479
  /* @__PURE__ */ jsx(
478
480
  "button",
@@ -1425,6 +1427,57 @@ function StatusPill({ label, tone = "muted", icon, className }) {
1425
1427
  }
1426
1428
  );
1427
1429
  }
1430
+ function makeStatusPill(map) {
1431
+ function DomainStatusPill({ status, className }) {
1432
+ const spec = map[status];
1433
+ return /* @__PURE__ */ jsx(
1434
+ StatusPill,
1435
+ {
1436
+ tone: spec?.tone ?? "muted",
1437
+ label: spec?.label ?? status,
1438
+ icon: spec?.icon,
1439
+ className
1440
+ }
1441
+ );
1442
+ }
1443
+ return DomainStatusPill;
1444
+ }
1445
+ function Tabs({ ...props }) {
1446
+ return /* @__PURE__ */ jsx(TabsPrimitive.Root, { "data-slot": "tabs", ...props });
1447
+ }
1448
+ function TabsList({ className, ...props }) {
1449
+ return /* @__PURE__ */ jsx(
1450
+ TabsPrimitive.List,
1451
+ {
1452
+ "data-slot": "tabs-list",
1453
+ className: cn("border-border -mb-px flex items-center gap-6 border-b", className),
1454
+ ...props
1455
+ }
1456
+ );
1457
+ }
1458
+ function TabsTrigger({ className, ...props }) {
1459
+ return /* @__PURE__ */ jsx(
1460
+ TabsPrimitive.Trigger,
1461
+ {
1462
+ "data-slot": "tabs-trigger",
1463
+ className: cn(
1464
+ "text-muted-foreground hover:text-foreground data-[state=active]:text-primary data-[state=active]:border-primary -mb-px border-b-2 border-transparent py-2 font-mono text-[11px] tracking-widest uppercase transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
1465
+ className
1466
+ ),
1467
+ ...props
1468
+ }
1469
+ );
1470
+ }
1471
+ function TabsContent({ className, ...props }) {
1472
+ return /* @__PURE__ */ jsx(
1473
+ TabsPrimitive.Content,
1474
+ {
1475
+ "data-slot": "tabs-content",
1476
+ className: cn("mt-4 outline-none", className),
1477
+ ...props
1478
+ }
1479
+ );
1480
+ }
1428
1481
 
1429
1482
  // src/format/index.ts
1430
1483
  var REFERENCE_BTC_USD = 95e3;
@@ -1562,6 +1615,6 @@ function QrCode({ value, size = 200, label, className }) {
1562
1615
  );
1563
1616
  }
1564
1617
 
1565
- 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, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, badgeVariants, buttonVariants, confirm, prompt };
1618
+ 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, Working, WorkingPanel, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt };
1566
1619
  //# sourceMappingURL=primitives.mjs.map
1567
1620
  //# sourceMappingURL=primitives.mjs.map