@orangecheck/design 0.5.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 +51 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -34
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +20 -18
- package/dist/primitives.d.ts +20 -18
- package/dist/primitives.js +49 -34
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +47 -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';
|
|
@@ -414,17 +414,20 @@ function Separator({
|
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
416
|
function Sheet(props) {
|
|
417
|
-
return /* @__PURE__ */ jsx(
|
|
417
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
418
418
|
}
|
|
419
419
|
function SheetTrigger(props) {
|
|
420
|
-
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 });
|
|
421
424
|
}
|
|
422
425
|
function SheetPortal(props) {
|
|
423
|
-
return /* @__PURE__ */ jsx(
|
|
426
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
424
427
|
}
|
|
425
428
|
function SheetOverlay({ className, ...props }) {
|
|
426
429
|
return /* @__PURE__ */ jsx(
|
|
427
|
-
|
|
430
|
+
SheetPrimitive.Overlay,
|
|
428
431
|
{
|
|
429
432
|
"data-slot": "sheet-overlay",
|
|
430
433
|
className: cn(
|
|
@@ -450,7 +453,7 @@ function SheetContent({
|
|
|
450
453
|
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
451
454
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
452
455
|
/* @__PURE__ */ jsxs(
|
|
453
|
-
|
|
456
|
+
SheetPrimitive.Content,
|
|
454
457
|
{
|
|
455
458
|
"data-slot": "sheet-content",
|
|
456
459
|
className: cn(
|
|
@@ -461,7 +464,7 @@ function SheetContent({
|
|
|
461
464
|
...props,
|
|
462
465
|
children: [
|
|
463
466
|
children,
|
|
464
|
-
/* @__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: [
|
|
465
468
|
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
466
469
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
467
470
|
] })
|
|
@@ -473,9 +476,19 @@ function SheetContent({
|
|
|
473
476
|
function SheetHeader({ className, ...props }) {
|
|
474
477
|
return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props });
|
|
475
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
|
+
}
|
|
476
489
|
function SheetTitle({ className, ...props }) {
|
|
477
490
|
return /* @__PURE__ */ jsx(
|
|
478
|
-
|
|
491
|
+
SheetPrimitive.Title,
|
|
479
492
|
{
|
|
480
493
|
"data-slot": "sheet-title",
|
|
481
494
|
className: cn("text-foreground font-semibold", className),
|
|
@@ -488,7 +501,7 @@ function SheetDescription({
|
|
|
488
501
|
...props
|
|
489
502
|
}) {
|
|
490
503
|
return /* @__PURE__ */ jsx(
|
|
491
|
-
|
|
504
|
+
SheetPrimitive.Description,
|
|
492
505
|
{
|
|
493
506
|
"data-slot": "sheet-description",
|
|
494
507
|
className: cn("text-muted-foreground text-sm", className),
|
|
@@ -497,23 +510,23 @@ function SheetDescription({
|
|
|
497
510
|
);
|
|
498
511
|
}
|
|
499
512
|
function Dialog({ ...props }) {
|
|
500
|
-
return /* @__PURE__ */ jsx(
|
|
513
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
501
514
|
}
|
|
502
515
|
function DialogTrigger({ ...props }) {
|
|
503
|
-
return /* @__PURE__ */ jsx(
|
|
516
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
504
517
|
}
|
|
505
518
|
function DialogPortal({ ...props }) {
|
|
506
|
-
return /* @__PURE__ */ jsx(
|
|
519
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
507
520
|
}
|
|
508
521
|
function DialogClose({ ...props }) {
|
|
509
|
-
return /* @__PURE__ */ jsx(
|
|
522
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
510
523
|
}
|
|
511
524
|
function DialogOverlay({
|
|
512
525
|
className,
|
|
513
526
|
...props
|
|
514
527
|
}) {
|
|
515
528
|
return /* @__PURE__ */ jsx(
|
|
516
|
-
|
|
529
|
+
SheetPrimitive.Overlay,
|
|
517
530
|
{
|
|
518
531
|
"data-slot": "dialog-overlay",
|
|
519
532
|
className: cn(
|
|
@@ -533,7 +546,7 @@ function DialogContent({
|
|
|
533
546
|
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
534
547
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
535
548
|
/* @__PURE__ */ jsxs(
|
|
536
|
-
|
|
549
|
+
SheetPrimitive.Content,
|
|
537
550
|
{
|
|
538
551
|
"data-slot": "dialog-content",
|
|
539
552
|
className: cn(
|
|
@@ -544,7 +557,7 @@ function DialogContent({
|
|
|
544
557
|
children: [
|
|
545
558
|
children,
|
|
546
559
|
showCloseButton && /* @__PURE__ */ jsxs(
|
|
547
|
-
|
|
560
|
+
SheetPrimitive.Close,
|
|
548
561
|
{
|
|
549
562
|
"data-slot": "dialog-close",
|
|
550
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",
|
|
@@ -581,7 +594,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
581
594
|
}
|
|
582
595
|
function DialogTitle({ className, ...props }) {
|
|
583
596
|
return /* @__PURE__ */ jsx(
|
|
584
|
-
|
|
597
|
+
SheetPrimitive.Title,
|
|
585
598
|
{
|
|
586
599
|
"data-slot": "dialog-title",
|
|
587
600
|
className: cn("text-lg leading-none font-semibold", className),
|
|
@@ -594,7 +607,7 @@ function DialogDescription({
|
|
|
594
607
|
...props
|
|
595
608
|
}) {
|
|
596
609
|
return /* @__PURE__ */ jsx(
|
|
597
|
-
|
|
610
|
+
SheetPrimitive.Description,
|
|
598
611
|
{
|
|
599
612
|
"data-slot": "dialog-description",
|
|
600
613
|
className: cn("text-muted-foreground text-sm", className),
|
|
@@ -647,9 +660,9 @@ function ConfirmHost() {
|
|
|
647
660
|
[state]
|
|
648
661
|
);
|
|
649
662
|
if (!state) return null;
|
|
650
|
-
return /* @__PURE__ */ jsx(
|
|
651
|
-
/* @__PURE__ */ jsx(
|
|
652
|
-
/* @__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: [
|
|
653
666
|
/* @__PURE__ */ jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsxs(
|
|
654
667
|
"span",
|
|
655
668
|
{
|
|
@@ -661,8 +674,8 @@ function ConfirmHost() {
|
|
|
661
674
|
}
|
|
662
675
|
) }),
|
|
663
676
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
664
|
-
/* @__PURE__ */ jsx(
|
|
665
|
-
/* @__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 }) }),
|
|
666
679
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [
|
|
667
680
|
/* @__PURE__ */ jsx(
|
|
668
681
|
Button,
|
|
@@ -757,10 +770,10 @@ function PromptHost() {
|
|
|
757
770
|
close(v);
|
|
758
771
|
}, [state, value, confirmValue, close]);
|
|
759
772
|
if (!state) return null;
|
|
760
|
-
return /* @__PURE__ */ jsx(
|
|
761
|
-
/* @__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" }),
|
|
762
775
|
/* @__PURE__ */ jsxs(
|
|
763
|
-
|
|
776
|
+
SheetPrimitive.Content,
|
|
764
777
|
{
|
|
765
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",
|
|
766
779
|
onKeyDown: (e) => {
|
|
@@ -775,8 +788,8 @@ function PromptHost() {
|
|
|
775
788
|
state.title
|
|
776
789
|
] }) }),
|
|
777
790
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
778
|
-
/* @__PURE__ */ jsx(
|
|
779
|
-
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 }) }),
|
|
780
793
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
781
794
|
state.label && /* @__PURE__ */ jsx(Label, { children: state.label }),
|
|
782
795
|
/* @__PURE__ */ jsx(
|
|
@@ -834,10 +847,10 @@ function PromptHost() {
|
|
|
834
847
|
] }) });
|
|
835
848
|
}
|
|
836
849
|
function Modal({ open, onOpenChange, title, subtitle, children, actions, width = "wide" }) {
|
|
837
|
-
return /* @__PURE__ */ jsx(
|
|
838
|
-
/* @__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" }),
|
|
839
852
|
/* @__PURE__ */ jsxs(
|
|
840
|
-
|
|
853
|
+
SheetPrimitive.Content,
|
|
841
854
|
{
|
|
842
855
|
className: cn(
|
|
843
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",
|
|
@@ -850,7 +863,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
|
|
|
850
863
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot", "aria-hidden": true }),
|
|
851
864
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot opacity-70", "aria-hidden": true }),
|
|
852
865
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot opacity-50", "aria-hidden": true }),
|
|
853
|
-
/* @__PURE__ */ jsx(
|
|
866
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Title, { className: "ml-2 truncate", children: title }),
|
|
854
867
|
subtitle && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/70 ml-1 truncate text-[10px] normal-case tracking-normal", children: [
|
|
855
868
|
"\xB7 ",
|
|
856
869
|
subtitle
|
|
@@ -859,7 +872,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
|
|
|
859
872
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
860
873
|
actions,
|
|
861
874
|
/* @__PURE__ */ jsx(
|
|
862
|
-
|
|
875
|
+
SheetPrimitive.Close,
|
|
863
876
|
{
|
|
864
877
|
"aria-label": "close",
|
|
865
878
|
className: "text-muted-foreground hover:text-foreground inline-flex h-6 w-6 items-center justify-center rounded-sm",
|
|
@@ -1450,6 +1463,6 @@ function QrCode({ value, size = 200, label, className }) {
|
|
|
1450
1463
|
);
|
|
1451
1464
|
}
|
|
1452
1465
|
|
|
1453
|
-
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 };
|
|
1454
1467
|
//# sourceMappingURL=primitives.mjs.map
|
|
1455
1468
|
//# sourceMappingURL=primitives.mjs.map
|