@orangecheck/design 0.7.0 → 0.7.2

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.
@@ -263,19 +263,24 @@ interface BarProps {
263
263
  declare function Bar({ pct, accent, label, right, className }: BarProps): react_jsx_runtime.JSX.Element;
264
264
 
265
265
  type StatusTone = 'success' | 'warning' | 'destructive' | 'muted' | 'primary' | 'info';
266
+ type StatusPillVariant = 'plain' | 'bordered';
266
267
  interface StatusPillProps {
267
268
  label: string;
268
269
  tone?: StatusTone;
270
+ variant?: StatusPillVariant;
269
271
  icon?: ReactNode;
270
272
  className?: string;
271
273
  }
272
- declare function StatusPill({ label, tone, icon, className }: StatusPillProps): react_jsx_runtime.JSX.Element;
274
+ declare function StatusPill({ label, tone, variant, icon, className, }: StatusPillProps): react_jsx_runtime.JSX.Element;
273
275
  interface StatusPillSpec {
274
276
  tone: StatusTone;
275
277
  label?: string;
276
278
  icon?: ReactNode;
277
279
  }
278
- declare function makeStatusPill<S extends string>(map: Record<S, StatusPillSpec>): (props: {
280
+ declare function makeStatusPill<S extends string>(map: Record<S, StatusPillSpec>, options?: {
281
+ variant?: StatusPillVariant;
282
+ fallbackTone?: StatusTone;
283
+ }): (props: {
279
284
  status: S;
280
285
  className?: string;
281
286
  }) => ReactNode;
@@ -323,4 +328,4 @@ interface QrCodeProps {
323
328
  }
324
329
  declare function QrCode({ value, size, label, className }: QrCodeProps): react_jsx_runtime.JSX.Element;
325
330
 
326
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, type AlertWithActionProps, AlertWithCountdown, type AlertWithCountdownProps, Badge, Bar, type BarProps, BitcoinAddress, type BitcoinAddressProps, Button, Card, type CardProps, Checkbox, ConfirmHost, type ConfirmOptions, CopyButton, type CopyButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, type ModalProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, type PromptOptions, QrCode, type QrCodeProps, RadioGroup, RadioGroupItem, SatsAmount, type SatsAmountProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Sparkline, type SparklineProps, StatBlock, type StatBlockProps, StatusPill, type StatusPillProps, type StatusPillSpec, type StatusTone, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, type WorkingProps, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt };
331
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, type AlertWithActionProps, AlertWithCountdown, type AlertWithCountdownProps, Badge, Bar, type BarProps, BitcoinAddress, type BitcoinAddressProps, Button, Card, type CardProps, Checkbox, ConfirmHost, type ConfirmOptions, CopyButton, type CopyButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, type ModalProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, type PromptOptions, QrCode, type QrCodeProps, RadioGroup, RadioGroupItem, SatsAmount, type SatsAmountProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Sparkline, type SparklineProps, StatBlock, type StatBlockProps, StatusPill, type StatusPillProps, type StatusPillSpec, type StatusPillVariant, type StatusTone, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, type WorkingProps, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt };
@@ -263,19 +263,24 @@ interface BarProps {
263
263
  declare function Bar({ pct, accent, label, right, className }: BarProps): react_jsx_runtime.JSX.Element;
264
264
 
265
265
  type StatusTone = 'success' | 'warning' | 'destructive' | 'muted' | 'primary' | 'info';
266
+ type StatusPillVariant = 'plain' | 'bordered';
266
267
  interface StatusPillProps {
267
268
  label: string;
268
269
  tone?: StatusTone;
270
+ variant?: StatusPillVariant;
269
271
  icon?: ReactNode;
270
272
  className?: string;
271
273
  }
272
- declare function StatusPill({ label, tone, icon, className }: StatusPillProps): react_jsx_runtime.JSX.Element;
274
+ declare function StatusPill({ label, tone, variant, icon, className, }: StatusPillProps): react_jsx_runtime.JSX.Element;
273
275
  interface StatusPillSpec {
274
276
  tone: StatusTone;
275
277
  label?: string;
276
278
  icon?: ReactNode;
277
279
  }
278
- declare function makeStatusPill<S extends string>(map: Record<S, StatusPillSpec>): (props: {
280
+ declare function makeStatusPill<S extends string>(map: Record<S, StatusPillSpec>, options?: {
281
+ variant?: StatusPillVariant;
282
+ fallbackTone?: StatusTone;
283
+ }): (props: {
279
284
  status: S;
280
285
  className?: string;
281
286
  }) => ReactNode;
@@ -323,4 +328,4 @@ interface QrCodeProps {
323
328
  }
324
329
  declare function QrCode({ value, size, label, className }: QrCodeProps): react_jsx_runtime.JSX.Element;
325
330
 
326
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, type AlertWithActionProps, AlertWithCountdown, type AlertWithCountdownProps, Badge, Bar, type BarProps, BitcoinAddress, type BitcoinAddressProps, Button, Card, type CardProps, Checkbox, ConfirmHost, type ConfirmOptions, CopyButton, type CopyButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, type ModalProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, type PromptOptions, QrCode, type QrCodeProps, RadioGroup, RadioGroupItem, SatsAmount, type SatsAmountProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Sparkline, type SparklineProps, StatBlock, type StatBlockProps, StatusPill, type StatusPillProps, type StatusPillSpec, type StatusTone, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, type WorkingProps, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt };
331
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, type AlertWithActionProps, AlertWithCountdown, type AlertWithCountdownProps, Badge, Bar, type BarProps, BitcoinAddress, type BitcoinAddressProps, Button, Card, type CardProps, Checkbox, ConfirmHost, type ConfirmOptions, CopyButton, type CopyButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, type ModalProps, Pagination, type PaginationProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, type PromptOptions, QrCode, type QrCodeProps, RadioGroup, RadioGroupItem, SatsAmount, type SatsAmountProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Sparkline, type SparklineProps, StatBlock, type StatBlockProps, StatusPill, type StatusPillProps, type StatusPillSpec, type StatusPillVariant, type StatusTone, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, type WorkingProps, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt };
@@ -1445,7 +1445,37 @@ var TONE = {
1445
1445
  primary: "text-primary",
1446
1446
  info: "text-info"
1447
1447
  };
1448
- function StatusPill({ label, tone = "muted", icon, className }) {
1448
+ var BORDER_TONE = {
1449
+ success: "border-success/40 text-success",
1450
+ warning: "border-warning/40 text-warning",
1451
+ destructive: "border-destructive/40 text-destructive",
1452
+ muted: "border-muted-foreground/40 text-muted-foreground",
1453
+ primary: "border-primary/40 text-primary",
1454
+ info: "border-info/40 text-info"
1455
+ };
1456
+ function StatusPill({
1457
+ label,
1458
+ tone = "muted",
1459
+ variant = "plain",
1460
+ icon,
1461
+ className
1462
+ }) {
1463
+ if (variant === "bordered") {
1464
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1465
+ "span",
1466
+ {
1467
+ className: cn(
1468
+ "inline-flex items-center gap-1.5 border px-1.5 py-0.5 font-mono text-[9px] tracking-widest uppercase",
1469
+ BORDER_TONE[tone],
1470
+ className
1471
+ ),
1472
+ children: [
1473
+ icon,
1474
+ label
1475
+ ]
1476
+ }
1477
+ );
1478
+ }
1449
1479
  return /* @__PURE__ */ jsxRuntime.jsxs(
1450
1480
  "span",
1451
1481
  {
@@ -1461,15 +1491,18 @@ function StatusPill({ label, tone = "muted", icon, className }) {
1461
1491
  }
1462
1492
  );
1463
1493
  }
1464
- function makeStatusPill(map) {
1494
+ function makeStatusPill(map, options) {
1495
+ const variant = options?.variant ?? "plain";
1496
+ const fallbackTone = options?.fallbackTone ?? "muted";
1465
1497
  function DomainStatusPill({ status, className }) {
1466
1498
  const spec = map[status];
1467
1499
  return /* @__PURE__ */ jsxRuntime.jsx(
1468
1500
  StatusPill,
1469
1501
  {
1470
- tone: spec?.tone ?? "muted",
1502
+ tone: spec?.tone ?? fallbackTone,
1471
1503
  label: spec?.label ?? status,
1472
1504
  icon: spec?.icon,
1505
+ variant,
1473
1506
  className
1474
1507
  }
1475
1508
  );