@orangecheck/design 0.6.0 → 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.
- package/dist/chrome.d.mts +150 -0
- package/dist/chrome.d.ts +150 -0
- package/dist/chrome.js +1633 -0
- package/dist/chrome.js.map +1 -0
- package/dist/chrome.mjs +1616 -0
- package/dist/chrome.mjs.map +1 -0
- package/dist/components.d.mts +5 -1
- package/dist/components.d.ts +5 -1
- package/dist/components.js +1874 -7
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +1835 -1
- package/dist/components.mjs.map +1 -1
- package/dist/composites.d.mts +88 -0
- package/dist/composites.d.ts +88 -0
- package/dist/composites.js +268 -0
- package/dist/composites.js.map +1 -0
- package/dist/composites.mjs +236 -0
- package/dist/composites.mjs.map +1 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +1879 -133
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1855 -135
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +19 -1
- package/dist/primitives.d.ts +19 -1
- package/dist/primitives.js +62 -3
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +57 -4
- package/dist/primitives.mjs.map +1 -1
- package/dist/styles.css +0 -1
- package/package.json +12 -2
package/dist/primitives.d.mts
CHANGED
|
@@ -14,6 +14,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
|
14
14
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
15
15
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
16
16
|
import { ToasterProps } from 'sonner';
|
|
17
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
17
18
|
|
|
18
19
|
declare const buttonVariants: (props?: ({
|
|
19
20
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
@@ -98,6 +99,9 @@ declare function WorkingPanel({ text, progress }: Pick<WorkingProps, 'text' | 'p
|
|
|
98
99
|
interface Props {
|
|
99
100
|
children: React.ReactNode;
|
|
100
101
|
fallback?: (error: Error, reset: () => void) => React.ReactNode;
|
|
102
|
+
title?: string;
|
|
103
|
+
message?: string;
|
|
104
|
+
onError?: (error: Error, info: React.ErrorInfo) => void;
|
|
101
105
|
}
|
|
102
106
|
interface State {
|
|
103
107
|
error: Error | null;
|
|
@@ -266,6 +270,20 @@ interface StatusPillProps {
|
|
|
266
270
|
className?: string;
|
|
267
271
|
}
|
|
268
272
|
declare function StatusPill({ label, tone, icon, className }: StatusPillProps): react_jsx_runtime.JSX.Element;
|
|
273
|
+
interface StatusPillSpec {
|
|
274
|
+
tone: StatusTone;
|
|
275
|
+
label?: string;
|
|
276
|
+
icon?: ReactNode;
|
|
277
|
+
}
|
|
278
|
+
declare function makeStatusPill<S extends string>(map: Record<S, StatusPillSpec>): (props: {
|
|
279
|
+
status: S;
|
|
280
|
+
className?: string;
|
|
281
|
+
}) => ReactNode;
|
|
282
|
+
|
|
283
|
+
declare function Tabs({ ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
284
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
|
|
285
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
286
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
269
287
|
|
|
270
288
|
interface SatsAmountProps {
|
|
271
289
|
sats: number;
|
|
@@ -305,4 +323,4 @@ interface QrCodeProps {
|
|
|
305
323
|
}
|
|
306
324
|
declare function QrCode({ value, size, label, className }: QrCodeProps): react_jsx_runtime.JSX.Element;
|
|
307
325
|
|
|
308
|
-
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 StatusTone, Switch, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, type WorkingProps, badgeVariants, buttonVariants, confirm, prompt };
|
|
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 };
|
package/dist/primitives.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
|
14
14
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
15
15
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
16
16
|
import { ToasterProps } from 'sonner';
|
|
17
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
17
18
|
|
|
18
19
|
declare const buttonVariants: (props?: ({
|
|
19
20
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
@@ -98,6 +99,9 @@ declare function WorkingPanel({ text, progress }: Pick<WorkingProps, 'text' | 'p
|
|
|
98
99
|
interface Props {
|
|
99
100
|
children: React.ReactNode;
|
|
100
101
|
fallback?: (error: Error, reset: () => void) => React.ReactNode;
|
|
102
|
+
title?: string;
|
|
103
|
+
message?: string;
|
|
104
|
+
onError?: (error: Error, info: React.ErrorInfo) => void;
|
|
101
105
|
}
|
|
102
106
|
interface State {
|
|
103
107
|
error: Error | null;
|
|
@@ -266,6 +270,20 @@ interface StatusPillProps {
|
|
|
266
270
|
className?: string;
|
|
267
271
|
}
|
|
268
272
|
declare function StatusPill({ label, tone, icon, className }: StatusPillProps): react_jsx_runtime.JSX.Element;
|
|
273
|
+
interface StatusPillSpec {
|
|
274
|
+
tone: StatusTone;
|
|
275
|
+
label?: string;
|
|
276
|
+
icon?: ReactNode;
|
|
277
|
+
}
|
|
278
|
+
declare function makeStatusPill<S extends string>(map: Record<S, StatusPillSpec>): (props: {
|
|
279
|
+
status: S;
|
|
280
|
+
className?: string;
|
|
281
|
+
}) => ReactNode;
|
|
282
|
+
|
|
283
|
+
declare function Tabs({ ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
284
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
|
|
285
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
286
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
269
287
|
|
|
270
288
|
interface SatsAmountProps {
|
|
271
289
|
sats: number;
|
|
@@ -305,4 +323,4 @@ interface QrCodeProps {
|
|
|
305
323
|
}
|
|
306
324
|
declare function QrCode({ value, size, label, className }: QrCodeProps): react_jsx_runtime.JSX.Element;
|
|
307
325
|
|
|
308
|
-
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 StatusTone, Switch, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, type WorkingProps, badgeVariants, buttonVariants, confirm, prompt };
|
|
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 };
|
package/dist/primitives.js
CHANGED
|
@@ -18,6 +18,7 @@ var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
|
18
18
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
19
19
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
20
20
|
var sonner = require('sonner');
|
|
21
|
+
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
21
22
|
var QRCode = require('qrcode');
|
|
22
23
|
|
|
23
24
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -50,6 +51,7 @@ var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
|
50
51
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
51
52
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
52
53
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
54
|
+
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
53
55
|
var QRCode__default = /*#__PURE__*/_interopDefault(QRCode);
|
|
54
56
|
|
|
55
57
|
// src/primitives/button.tsx
|
|
@@ -486,6 +488,7 @@ var ErrorBoundary = class extends React2__namespace.Component {
|
|
|
486
488
|
}
|
|
487
489
|
componentDidCatch(error, info) {
|
|
488
490
|
console.error("[ErrorBoundary]", error, info);
|
|
491
|
+
this.props.onError?.(error, info);
|
|
489
492
|
}
|
|
490
493
|
render() {
|
|
491
494
|
if (this.state.error) {
|
|
@@ -493,7 +496,7 @@ var ErrorBoundary = class extends React2__namespace.Component {
|
|
|
493
496
|
return this.props.fallback(this.state.error, this.reset);
|
|
494
497
|
}
|
|
495
498
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container py-16", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "terminal", children: [
|
|
496
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive flex items-center gap-1.5", children: "! fatal" }) }),
|
|
499
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive flex items-center gap-1.5", children: this.props.title ?? "! fatal" }) }),
|
|
497
500
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 p-5 font-mono text-xs leading-relaxed", children: [
|
|
498
501
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
499
502
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-destructive", children: [
|
|
@@ -505,7 +508,7 @@ var ErrorBoundary = class extends React2__namespace.Component {
|
|
|
505
508
|
] }),
|
|
506
509
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground", children: [
|
|
507
510
|
"> ",
|
|
508
|
-
"this page crashed. reload to recover."
|
|
511
|
+
this.props.message ?? "this page crashed. reload to recover."
|
|
509
512
|
] }),
|
|
510
513
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
511
514
|
"button",
|
|
@@ -807,7 +810,7 @@ function ConfirmHost() {
|
|
|
807
810
|
) }),
|
|
808
811
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
809
812
|
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Title, { className: "sr-only", children: state.title }),
|
|
810
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap", children: state.message }) }),
|
|
813
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap [overflow-wrap:anywhere]", children: state.message }) }),
|
|
811
814
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [
|
|
812
815
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
813
816
|
Button,
|
|
@@ -1458,6 +1461,57 @@ function StatusPill({ label, tone = "muted", icon, className }) {
|
|
|
1458
1461
|
}
|
|
1459
1462
|
);
|
|
1460
1463
|
}
|
|
1464
|
+
function makeStatusPill(map) {
|
|
1465
|
+
function DomainStatusPill({ status, className }) {
|
|
1466
|
+
const spec = map[status];
|
|
1467
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1468
|
+
StatusPill,
|
|
1469
|
+
{
|
|
1470
|
+
tone: spec?.tone ?? "muted",
|
|
1471
|
+
label: spec?.label ?? status,
|
|
1472
|
+
icon: spec?.icon,
|
|
1473
|
+
className
|
|
1474
|
+
}
|
|
1475
|
+
);
|
|
1476
|
+
}
|
|
1477
|
+
return DomainStatusPill;
|
|
1478
|
+
}
|
|
1479
|
+
function Tabs({ ...props }) {
|
|
1480
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { "data-slot": "tabs", ...props });
|
|
1481
|
+
}
|
|
1482
|
+
function TabsList({ className, ...props }) {
|
|
1483
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1484
|
+
TabsPrimitive__namespace.List,
|
|
1485
|
+
{
|
|
1486
|
+
"data-slot": "tabs-list",
|
|
1487
|
+
className: cn("border-border -mb-px flex items-center gap-6 border-b", className),
|
|
1488
|
+
...props
|
|
1489
|
+
}
|
|
1490
|
+
);
|
|
1491
|
+
}
|
|
1492
|
+
function TabsTrigger({ className, ...props }) {
|
|
1493
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1494
|
+
TabsPrimitive__namespace.Trigger,
|
|
1495
|
+
{
|
|
1496
|
+
"data-slot": "tabs-trigger",
|
|
1497
|
+
className: cn(
|
|
1498
|
+
"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",
|
|
1499
|
+
className
|
|
1500
|
+
),
|
|
1501
|
+
...props
|
|
1502
|
+
}
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
function TabsContent({ className, ...props }) {
|
|
1506
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1507
|
+
TabsPrimitive__namespace.Content,
|
|
1508
|
+
{
|
|
1509
|
+
"data-slot": "tabs-content",
|
|
1510
|
+
className: cn("mt-4 outline-none", className),
|
|
1511
|
+
...props
|
|
1512
|
+
}
|
|
1513
|
+
);
|
|
1514
|
+
}
|
|
1461
1515
|
|
|
1462
1516
|
// src/format/index.ts
|
|
1463
1517
|
var REFERENCE_BTC_USD = 95e3;
|
|
@@ -1662,6 +1716,10 @@ exports.Sparkline = Sparkline;
|
|
|
1662
1716
|
exports.StatBlock = StatBlock;
|
|
1663
1717
|
exports.StatusPill = StatusPill;
|
|
1664
1718
|
exports.Switch = Switch;
|
|
1719
|
+
exports.Tabs = Tabs;
|
|
1720
|
+
exports.TabsContent = TabsContent;
|
|
1721
|
+
exports.TabsList = TabsList;
|
|
1722
|
+
exports.TabsTrigger = TabsTrigger;
|
|
1665
1723
|
exports.Textarea = Textarea;
|
|
1666
1724
|
exports.ThemeToggle = ThemeToggle;
|
|
1667
1725
|
exports.ThemeToggleLink = ThemeToggleLink;
|
|
@@ -1671,6 +1729,7 @@ exports.WorkingPanel = WorkingPanel;
|
|
|
1671
1729
|
exports.badgeVariants = badgeVariants;
|
|
1672
1730
|
exports.buttonVariants = buttonVariants;
|
|
1673
1731
|
exports.confirm = confirm;
|
|
1732
|
+
exports.makeStatusPill = makeStatusPill;
|
|
1674
1733
|
exports.prompt = prompt;
|
|
1675
1734
|
//# sourceMappingURL=primitives.js.map
|
|
1676
1735
|
//# sourceMappingURL=primitives.js.map
|