@orangecheck/design 0.5.3 → 0.6.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/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +102 -2
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +11 -1
- package/dist/primitives.d.ts +11 -1
- package/dist/primitives.js +103 -0
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +98 -2
- package/dist/primitives.mjs.map +1 -1
- package/package.json +5 -2
package/dist/index.mjs
CHANGED
|
@@ -4,10 +4,13 @@ import * as React2 from 'react';
|
|
|
4
4
|
import { createContext, useState, useRef, useEffect, useCallback, useMemo, useContext } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { useTheme } from 'next-themes';
|
|
7
|
-
import { ChevronDown, Palette, Check, Sun, Moon, Monitor, X, XIcon, AlertTriangle, Pencil, ChevronLeft, ChevronRight, ChevronDownIcon,
|
|
7
|
+
import { ChevronDown, Palette, Check, Sun, Moon, Monitor, CheckIcon, CircleIcon, X, XIcon, AlertTriangle, Pencil, ChevronLeft, ChevronRight, ChevronDownIcon, ChevronUpIcon, Maximize2, Copy } from 'lucide-react';
|
|
8
8
|
import { Slot } from '@radix-ui/react-slot';
|
|
9
9
|
import { cva } from 'class-variance-authority';
|
|
10
10
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
11
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
12
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
13
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
11
14
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
12
15
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
13
16
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
@@ -52,6 +55,7 @@ __export(src_exports, {
|
|
|
52
55
|
BitcoinAddress: () => BitcoinAddress,
|
|
53
56
|
Button: () => Button,
|
|
54
57
|
Card: () => Card,
|
|
58
|
+
Checkbox: () => Checkbox,
|
|
55
59
|
ConfirmHost: () => ConfirmHost,
|
|
56
60
|
CopyButton: () => CopyButton,
|
|
57
61
|
DEFAULT_OC_THEME: () => DEFAULT_OC_THEME,
|
|
@@ -84,6 +88,8 @@ __export(src_exports, {
|
|
|
84
88
|
PromptHost: () => PromptHost,
|
|
85
89
|
QrCode: () => QrCode,
|
|
86
90
|
REFERENCE_BTC_USD: () => REFERENCE_BTC_USD,
|
|
91
|
+
RadioGroup: () => RadioGroup,
|
|
92
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
87
93
|
SatsAmount: () => SatsAmount,
|
|
88
94
|
Select: () => Select,
|
|
89
95
|
SelectContent: () => SelectContent,
|
|
@@ -110,6 +116,7 @@ __export(src_exports, {
|
|
|
110
116
|
Sparkline: () => Sparkline,
|
|
111
117
|
StatBlock: () => StatBlock,
|
|
112
118
|
StatusPill: () => StatusPill,
|
|
119
|
+
Switch: () => Switch,
|
|
113
120
|
Textarea: () => Textarea,
|
|
114
121
|
ThemeToggle: () => ThemeToggle,
|
|
115
122
|
ThemeToggleLink: () => ThemeToggleLink,
|
|
@@ -605,6 +612,99 @@ function Label({ className, ...props }) {
|
|
|
605
612
|
}
|
|
606
613
|
);
|
|
607
614
|
}
|
|
615
|
+
function Checkbox({ className, ...props }) {
|
|
616
|
+
return /* @__PURE__ */ jsx(
|
|
617
|
+
CheckboxPrimitive.Root,
|
|
618
|
+
{
|
|
619
|
+
"data-slot": "checkbox",
|
|
620
|
+
className: cn(
|
|
621
|
+
"peer border-input bg-input/30 size-4 shrink-0 rounded-sm border shadow-xs transition-[color,box-shadow,background-color] outline-none",
|
|
622
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
623
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
624
|
+
"data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",
|
|
625
|
+
"aria-invalid:ring-brand/25 dark:aria-invalid:ring-brand/35 aria-invalid:border-brand",
|
|
626
|
+
className
|
|
627
|
+
),
|
|
628
|
+
...props,
|
|
629
|
+
children: /* @__PURE__ */ jsx(
|
|
630
|
+
CheckboxPrimitive.Indicator,
|
|
631
|
+
{
|
|
632
|
+
"data-slot": "checkbox-indicator",
|
|
633
|
+
className: "flex items-center justify-center text-current",
|
|
634
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5", strokeWidth: 3 })
|
|
635
|
+
}
|
|
636
|
+
)
|
|
637
|
+
}
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
function RadioGroup({
|
|
641
|
+
className,
|
|
642
|
+
...props
|
|
643
|
+
}) {
|
|
644
|
+
return /* @__PURE__ */ jsx(
|
|
645
|
+
RadioGroupPrimitive.Root,
|
|
646
|
+
{
|
|
647
|
+
"data-slot": "radio-group",
|
|
648
|
+
className: cn("grid gap-2", className),
|
|
649
|
+
...props
|
|
650
|
+
}
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
function RadioGroupItem({
|
|
654
|
+
className,
|
|
655
|
+
...props
|
|
656
|
+
}) {
|
|
657
|
+
return /* @__PURE__ */ jsx(
|
|
658
|
+
RadioGroupPrimitive.Item,
|
|
659
|
+
{
|
|
660
|
+
"data-slot": "radio-group-item",
|
|
661
|
+
className: cn(
|
|
662
|
+
"border-input bg-input/30 text-primary aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow,background-color] outline-none",
|
|
663
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
664
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
665
|
+
"data-[state=checked]:border-primary",
|
|
666
|
+
"aria-invalid:ring-brand/25 dark:aria-invalid:ring-brand/35 aria-invalid:border-brand",
|
|
667
|
+
className
|
|
668
|
+
),
|
|
669
|
+
...props,
|
|
670
|
+
children: /* @__PURE__ */ jsx(
|
|
671
|
+
RadioGroupPrimitive.Indicator,
|
|
672
|
+
{
|
|
673
|
+
"data-slot": "radio-group-indicator",
|
|
674
|
+
className: "relative flex items-center justify-center",
|
|
675
|
+
children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary text-primary absolute size-2" })
|
|
676
|
+
}
|
|
677
|
+
)
|
|
678
|
+
}
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
function Switch({ className, ...props }) {
|
|
682
|
+
return /* @__PURE__ */ jsx(
|
|
683
|
+
SwitchPrimitive.Root,
|
|
684
|
+
{
|
|
685
|
+
"data-slot": "switch",
|
|
686
|
+
className: cn(
|
|
687
|
+
"peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-[color,box-shadow,background-color] outline-none",
|
|
688
|
+
"data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
689
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
690
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
691
|
+
"aria-invalid:ring-brand/25 dark:aria-invalid:ring-brand/35",
|
|
692
|
+
className
|
|
693
|
+
),
|
|
694
|
+
...props,
|
|
695
|
+
children: /* @__PURE__ */ jsx(
|
|
696
|
+
SwitchPrimitive.Thumb,
|
|
697
|
+
{
|
|
698
|
+
"data-slot": "switch-thumb",
|
|
699
|
+
className: cn(
|
|
700
|
+
"bg-background pointer-events-none block size-4 rounded-full shadow-sm ring-0 transition-transform",
|
|
701
|
+
"data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5"
|
|
702
|
+
)
|
|
703
|
+
}
|
|
704
|
+
)
|
|
705
|
+
}
|
|
706
|
+
);
|
|
707
|
+
}
|
|
608
708
|
var alertVariants = cva(
|
|
609
709
|
"relative grid w-full grid-cols-[0_1fr] items-start gap-x-0 gap-y-0.5 rounded-md border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
610
710
|
{
|
|
@@ -1993,6 +2093,6 @@ __reExport(components_exports, ui_star);
|
|
|
1993
2093
|
// src/index.ts
|
|
1994
2094
|
__reExport(src_exports, components_exports);
|
|
1995
2095
|
|
|
1996
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithCountdown, Badge, Bar, BitcoinAddress, Button, Card, ConfirmHost, CopyButton, DEFAULT_OC_THEME, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, OC_DEFAULT_ACCENT, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, OcThemeBridge, OcThemePicker, OcThemeProvider, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, QrCode, REFERENCE_BTC_USD, 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, accentFor, badgeVariants, buttonVariants, cn, confirm, explorerUrl, formatSats, formatSatsCompact, getOcThemeInitScript, isKnownTheme, priceBoth, prompt, relativeTime, resolveTheme, satsToUsd, shortenAddress, usdToSats, useOcSkin };
|
|
2096
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithCountdown, Badge, Bar, BitcoinAddress, Button, Card, Checkbox, ConfirmHost, CopyButton, DEFAULT_OC_THEME, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, OC_DEFAULT_ACCENT, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, OcThemeBridge, OcThemePicker, OcThemeProvider, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, QrCode, REFERENCE_BTC_USD, 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, accentFor, badgeVariants, buttonVariants, cn, confirm, explorerUrl, formatSats, formatSatsCompact, getOcThemeInitScript, isKnownTheme, priceBoth, prompt, relativeTime, resolveTheme, satsToUsd, shortenAddress, usdToSats, useOcSkin };
|
|
1997
2097
|
//# sourceMappingURL=index.mjs.map
|
|
1998
2098
|
//# sourceMappingURL=index.mjs.map
|