@orangecheck/design 0.4.0 → 0.5.1
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +52 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -34
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +21 -19
- package/dist/primitives.d.ts +21 -19
- package/dist/primitives.js +50 -34
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +48 -34
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/primitives.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { useTheme } from 'next-themes';
|
|
|
9
9
|
import * as React2 from 'react';
|
|
10
10
|
import { useState, useEffect, useRef, useCallback } from 'react';
|
|
11
11
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
12
|
-
import * as
|
|
12
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
13
13
|
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';
|
|
@@ -73,6 +73,7 @@ var badgeVariants = cva(
|
|
|
73
73
|
warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90 border-transparent",
|
|
74
74
|
success: "bg-success text-success-foreground [a&]:hover:bg-success/90 border-transparent",
|
|
75
75
|
info: "bg-info text-info-foreground [a&]:hover:bg-info/90 border-transparent",
|
|
76
|
+
brand: "bg-brand-soft text-brand border-brand-soft",
|
|
76
77
|
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
77
78
|
}
|
|
78
79
|
},
|
|
@@ -413,17 +414,20 @@ function Separator({
|
|
|
413
414
|
);
|
|
414
415
|
}
|
|
415
416
|
function Sheet(props) {
|
|
416
|
-
return /* @__PURE__ */ jsx(
|
|
417
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
417
418
|
}
|
|
418
419
|
function SheetTrigger(props) {
|
|
419
|
-
return /* @__PURE__ */ jsx(
|
|
420
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
421
|
+
}
|
|
422
|
+
function SheetClose(props) {
|
|
423
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
420
424
|
}
|
|
421
425
|
function SheetPortal(props) {
|
|
422
|
-
return /* @__PURE__ */ jsx(
|
|
426
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
423
427
|
}
|
|
424
428
|
function SheetOverlay({ className, ...props }) {
|
|
425
429
|
return /* @__PURE__ */ jsx(
|
|
426
|
-
|
|
430
|
+
SheetPrimitive.Overlay,
|
|
427
431
|
{
|
|
428
432
|
"data-slot": "sheet-overlay",
|
|
429
433
|
className: cn(
|
|
@@ -449,7 +453,7 @@ function SheetContent({
|
|
|
449
453
|
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
450
454
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
451
455
|
/* @__PURE__ */ jsxs(
|
|
452
|
-
|
|
456
|
+
SheetPrimitive.Content,
|
|
453
457
|
{
|
|
454
458
|
"data-slot": "sheet-content",
|
|
455
459
|
className: cn(
|
|
@@ -460,7 +464,7 @@ function SheetContent({
|
|
|
460
464
|
...props,
|
|
461
465
|
children: [
|
|
462
466
|
children,
|
|
463
|
-
/* @__PURE__ */ jsxs(
|
|
467
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
464
468
|
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
465
469
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
466
470
|
] })
|
|
@@ -472,9 +476,19 @@ function SheetContent({
|
|
|
472
476
|
function SheetHeader({ className, ...props }) {
|
|
473
477
|
return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props });
|
|
474
478
|
}
|
|
479
|
+
function SheetFooter({ className, ...props }) {
|
|
480
|
+
return /* @__PURE__ */ jsx(
|
|
481
|
+
"div",
|
|
482
|
+
{
|
|
483
|
+
"data-slot": "sheet-footer",
|
|
484
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
485
|
+
...props
|
|
486
|
+
}
|
|
487
|
+
);
|
|
488
|
+
}
|
|
475
489
|
function SheetTitle({ className, ...props }) {
|
|
476
490
|
return /* @__PURE__ */ jsx(
|
|
477
|
-
|
|
491
|
+
SheetPrimitive.Title,
|
|
478
492
|
{
|
|
479
493
|
"data-slot": "sheet-title",
|
|
480
494
|
className: cn("text-foreground font-semibold", className),
|
|
@@ -487,7 +501,7 @@ function SheetDescription({
|
|
|
487
501
|
...props
|
|
488
502
|
}) {
|
|
489
503
|
return /* @__PURE__ */ jsx(
|
|
490
|
-
|
|
504
|
+
SheetPrimitive.Description,
|
|
491
505
|
{
|
|
492
506
|
"data-slot": "sheet-description",
|
|
493
507
|
className: cn("text-muted-foreground text-sm", className),
|
|
@@ -496,23 +510,23 @@ function SheetDescription({
|
|
|
496
510
|
);
|
|
497
511
|
}
|
|
498
512
|
function Dialog({ ...props }) {
|
|
499
|
-
return /* @__PURE__ */ jsx(
|
|
513
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
500
514
|
}
|
|
501
515
|
function DialogTrigger({ ...props }) {
|
|
502
|
-
return /* @__PURE__ */ jsx(
|
|
516
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
503
517
|
}
|
|
504
518
|
function DialogPortal({ ...props }) {
|
|
505
|
-
return /* @__PURE__ */ jsx(
|
|
519
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
506
520
|
}
|
|
507
521
|
function DialogClose({ ...props }) {
|
|
508
|
-
return /* @__PURE__ */ jsx(
|
|
522
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
509
523
|
}
|
|
510
524
|
function DialogOverlay({
|
|
511
525
|
className,
|
|
512
526
|
...props
|
|
513
527
|
}) {
|
|
514
528
|
return /* @__PURE__ */ jsx(
|
|
515
|
-
|
|
529
|
+
SheetPrimitive.Overlay,
|
|
516
530
|
{
|
|
517
531
|
"data-slot": "dialog-overlay",
|
|
518
532
|
className: cn(
|
|
@@ -532,7 +546,7 @@ function DialogContent({
|
|
|
532
546
|
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
533
547
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
534
548
|
/* @__PURE__ */ jsxs(
|
|
535
|
-
|
|
549
|
+
SheetPrimitive.Content,
|
|
536
550
|
{
|
|
537
551
|
"data-slot": "dialog-content",
|
|
538
552
|
className: cn(
|
|
@@ -543,7 +557,7 @@ function DialogContent({
|
|
|
543
557
|
children: [
|
|
544
558
|
children,
|
|
545
559
|
showCloseButton && /* @__PURE__ */ jsxs(
|
|
546
|
-
|
|
560
|
+
SheetPrimitive.Close,
|
|
547
561
|
{
|
|
548
562
|
"data-slot": "dialog-close",
|
|
549
563
|
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -580,7 +594,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
580
594
|
}
|
|
581
595
|
function DialogTitle({ className, ...props }) {
|
|
582
596
|
return /* @__PURE__ */ jsx(
|
|
583
|
-
|
|
597
|
+
SheetPrimitive.Title,
|
|
584
598
|
{
|
|
585
599
|
"data-slot": "dialog-title",
|
|
586
600
|
className: cn("text-lg leading-none font-semibold", className),
|
|
@@ -593,7 +607,7 @@ function DialogDescription({
|
|
|
593
607
|
...props
|
|
594
608
|
}) {
|
|
595
609
|
return /* @__PURE__ */ jsx(
|
|
596
|
-
|
|
610
|
+
SheetPrimitive.Description,
|
|
597
611
|
{
|
|
598
612
|
"data-slot": "dialog-description",
|
|
599
613
|
className: cn("text-muted-foreground text-sm", className),
|
|
@@ -646,9 +660,9 @@ function ConfirmHost() {
|
|
|
646
660
|
[state]
|
|
647
661
|
);
|
|
648
662
|
if (!state) return null;
|
|
649
|
-
return /* @__PURE__ */ jsx(
|
|
650
|
-
/* @__PURE__ */ jsx(
|
|
651
|
-
/* @__PURE__ */ jsxs(
|
|
663
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { open: true, onOpenChange: (open) => !open && close(false), children: /* @__PURE__ */ jsxs(SheetPrimitive.Portal, { children: [
|
|
664
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" }),
|
|
665
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Content, { className: "bg-card border-border fixed top-1/2 left-1/2 z-50 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 border shadow-lg outline-none", children: [
|
|
652
666
|
/* @__PURE__ */ jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsxs(
|
|
653
667
|
"span",
|
|
654
668
|
{
|
|
@@ -660,8 +674,8 @@ function ConfirmHost() {
|
|
|
660
674
|
}
|
|
661
675
|
) }),
|
|
662
676
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
663
|
-
/* @__PURE__ */ jsx(
|
|
664
|
-
/* @__PURE__ */ jsx(
|
|
677
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Title, { className: "sr-only", children: state.title }),
|
|
678
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap", children: state.message }) }),
|
|
665
679
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [
|
|
666
680
|
/* @__PURE__ */ jsx(
|
|
667
681
|
Button,
|
|
@@ -756,10 +770,10 @@ function PromptHost() {
|
|
|
756
770
|
close(v);
|
|
757
771
|
}, [state, value, confirmValue, close]);
|
|
758
772
|
if (!state) return null;
|
|
759
|
-
return /* @__PURE__ */ jsx(
|
|
760
|
-
/* @__PURE__ */ jsx(
|
|
773
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { open: true, onOpenChange: (open) => !open && close(null), children: /* @__PURE__ */ jsxs(SheetPrimitive.Portal, { children: [
|
|
774
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" }),
|
|
761
775
|
/* @__PURE__ */ jsxs(
|
|
762
|
-
|
|
776
|
+
SheetPrimitive.Content,
|
|
763
777
|
{
|
|
764
778
|
className: "bg-card border-border fixed top-1/2 left-1/2 z-50 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 border shadow-lg outline-none",
|
|
765
779
|
onKeyDown: (e) => {
|
|
@@ -774,8 +788,8 @@ function PromptHost() {
|
|
|
774
788
|
state.title
|
|
775
789
|
] }) }),
|
|
776
790
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
777
|
-
/* @__PURE__ */ jsx(
|
|
778
|
-
state.message && /* @__PURE__ */ jsx(
|
|
791
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Title, { className: "sr-only", children: state.title }),
|
|
792
|
+
state.message && /* @__PURE__ */ jsx(SheetPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap", children: state.message }) }),
|
|
779
793
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
780
794
|
state.label && /* @__PURE__ */ jsx(Label, { children: state.label }),
|
|
781
795
|
/* @__PURE__ */ jsx(
|
|
@@ -833,10 +847,10 @@ function PromptHost() {
|
|
|
833
847
|
] }) });
|
|
834
848
|
}
|
|
835
849
|
function Modal({ open, onOpenChange, title, subtitle, children, actions, width = "wide" }) {
|
|
836
|
-
return /* @__PURE__ */ jsx(
|
|
837
|
-
/* @__PURE__ */ jsx(
|
|
850
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(SheetPrimitive.Portal, { children: [
|
|
851
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Overlay, { className: "bg-background/80 fixed inset-0 z-[100] backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
|
|
838
852
|
/* @__PURE__ */ jsxs(
|
|
839
|
-
|
|
853
|
+
SheetPrimitive.Content,
|
|
840
854
|
{
|
|
841
855
|
className: cn(
|
|
842
856
|
"terminal fixed top-[5vh] left-1/2 z-[110] flex max-h-[90vh] -translate-x-1/2 flex-col overflow-hidden rounded-sm border",
|
|
@@ -849,7 +863,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
|
|
|
849
863
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot", "aria-hidden": true }),
|
|
850
864
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot opacity-70", "aria-hidden": true }),
|
|
851
865
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot opacity-50", "aria-hidden": true }),
|
|
852
|
-
/* @__PURE__ */ jsx(
|
|
866
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Title, { className: "ml-2 truncate", children: title }),
|
|
853
867
|
subtitle && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/70 ml-1 truncate text-[10px] normal-case tracking-normal", children: [
|
|
854
868
|
"\xB7 ",
|
|
855
869
|
subtitle
|
|
@@ -858,7 +872,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
|
|
|
858
872
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
859
873
|
actions,
|
|
860
874
|
/* @__PURE__ */ jsx(
|
|
861
|
-
|
|
875
|
+
SheetPrimitive.Close,
|
|
862
876
|
{
|
|
863
877
|
"aria-label": "close",
|
|
864
878
|
className: "text-muted-foreground hover:text-foreground inline-flex h-6 w-6 items-center justify-center rounded-sm",
|
|
@@ -1449,6 +1463,6 @@ function QrCode({ value, size = 200, label, className }) {
|
|
|
1449
1463
|
);
|
|
1450
1464
|
}
|
|
1451
1465
|
|
|
1452
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithCountdown, Badge, Bar, BitcoinAddress, Button, Card, ConfirmHost, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, QrCode, SatsAmount, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Sparkline, StatBlock, StatusPill, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, badgeVariants, buttonVariants, confirm, prompt };
|
|
1466
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithCountdown, Badge, Bar, BitcoinAddress, Button, Card, ConfirmHost, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, QrCode, 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, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, badgeVariants, buttonVariants, confirm, prompt };
|
|
1453
1467
|
//# sourceMappingURL=primitives.mjs.map
|
|
1454
1468
|
//# sourceMappingURL=primitives.mjs.map
|