@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/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ 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
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';
|
|
@@ -96,8 +96,10 @@ __export(src_exports, {
|
|
|
96
96
|
SelectValue: () => SelectValue,
|
|
97
97
|
Separator: () => Separator,
|
|
98
98
|
Sheet: () => Sheet,
|
|
99
|
+
SheetClose: () => SheetClose,
|
|
99
100
|
SheetContent: () => SheetContent,
|
|
100
101
|
SheetDescription: () => SheetDescription,
|
|
102
|
+
SheetFooter: () => SheetFooter,
|
|
101
103
|
SheetHeader: () => SheetHeader,
|
|
102
104
|
SheetOverlay: () => SheetOverlay,
|
|
103
105
|
SheetPortal: () => SheetPortal,
|
|
@@ -535,6 +537,7 @@ var badgeVariants = cva(
|
|
|
535
537
|
warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90 border-transparent",
|
|
536
538
|
success: "bg-success text-success-foreground [a&]:hover:bg-success/90 border-transparent",
|
|
537
539
|
info: "bg-info text-info-foreground [a&]:hover:bg-info/90 border-transparent",
|
|
540
|
+
brand: "bg-brand-soft text-brand border-brand-soft",
|
|
538
541
|
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
539
542
|
}
|
|
540
543
|
},
|
|
@@ -875,17 +878,20 @@ function Separator({
|
|
|
875
878
|
);
|
|
876
879
|
}
|
|
877
880
|
function Sheet(props) {
|
|
878
|
-
return /* @__PURE__ */ jsx(
|
|
881
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
879
882
|
}
|
|
880
883
|
function SheetTrigger(props) {
|
|
881
|
-
return /* @__PURE__ */ jsx(
|
|
884
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
885
|
+
}
|
|
886
|
+
function SheetClose(props) {
|
|
887
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
882
888
|
}
|
|
883
889
|
function SheetPortal(props) {
|
|
884
|
-
return /* @__PURE__ */ jsx(
|
|
890
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
885
891
|
}
|
|
886
892
|
function SheetOverlay({ className, ...props }) {
|
|
887
893
|
return /* @__PURE__ */ jsx(
|
|
888
|
-
|
|
894
|
+
SheetPrimitive.Overlay,
|
|
889
895
|
{
|
|
890
896
|
"data-slot": "sheet-overlay",
|
|
891
897
|
className: cn(
|
|
@@ -911,7 +917,7 @@ function SheetContent({
|
|
|
911
917
|
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
912
918
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
913
919
|
/* @__PURE__ */ jsxs(
|
|
914
|
-
|
|
920
|
+
SheetPrimitive.Content,
|
|
915
921
|
{
|
|
916
922
|
"data-slot": "sheet-content",
|
|
917
923
|
className: cn(
|
|
@@ -922,7 +928,7 @@ function SheetContent({
|
|
|
922
928
|
...props,
|
|
923
929
|
children: [
|
|
924
930
|
children,
|
|
925
|
-
/* @__PURE__ */ jsxs(
|
|
931
|
+
/* @__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: [
|
|
926
932
|
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
927
933
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
928
934
|
] })
|
|
@@ -934,9 +940,19 @@ function SheetContent({
|
|
|
934
940
|
function SheetHeader({ className, ...props }) {
|
|
935
941
|
return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props });
|
|
936
942
|
}
|
|
943
|
+
function SheetFooter({ className, ...props }) {
|
|
944
|
+
return /* @__PURE__ */ jsx(
|
|
945
|
+
"div",
|
|
946
|
+
{
|
|
947
|
+
"data-slot": "sheet-footer",
|
|
948
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
949
|
+
...props
|
|
950
|
+
}
|
|
951
|
+
);
|
|
952
|
+
}
|
|
937
953
|
function SheetTitle({ className, ...props }) {
|
|
938
954
|
return /* @__PURE__ */ jsx(
|
|
939
|
-
|
|
955
|
+
SheetPrimitive.Title,
|
|
940
956
|
{
|
|
941
957
|
"data-slot": "sheet-title",
|
|
942
958
|
className: cn("text-foreground font-semibold", className),
|
|
@@ -949,7 +965,7 @@ function SheetDescription({
|
|
|
949
965
|
...props
|
|
950
966
|
}) {
|
|
951
967
|
return /* @__PURE__ */ jsx(
|
|
952
|
-
|
|
968
|
+
SheetPrimitive.Description,
|
|
953
969
|
{
|
|
954
970
|
"data-slot": "sheet-description",
|
|
955
971
|
className: cn("text-muted-foreground text-sm", className),
|
|
@@ -958,23 +974,23 @@ function SheetDescription({
|
|
|
958
974
|
);
|
|
959
975
|
}
|
|
960
976
|
function Dialog({ ...props }) {
|
|
961
|
-
return /* @__PURE__ */ jsx(
|
|
977
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
962
978
|
}
|
|
963
979
|
function DialogTrigger({ ...props }) {
|
|
964
|
-
return /* @__PURE__ */ jsx(
|
|
980
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
965
981
|
}
|
|
966
982
|
function DialogPortal({ ...props }) {
|
|
967
|
-
return /* @__PURE__ */ jsx(
|
|
983
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
968
984
|
}
|
|
969
985
|
function DialogClose({ ...props }) {
|
|
970
|
-
return /* @__PURE__ */ jsx(
|
|
986
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
971
987
|
}
|
|
972
988
|
function DialogOverlay({
|
|
973
989
|
className,
|
|
974
990
|
...props
|
|
975
991
|
}) {
|
|
976
992
|
return /* @__PURE__ */ jsx(
|
|
977
|
-
|
|
993
|
+
SheetPrimitive.Overlay,
|
|
978
994
|
{
|
|
979
995
|
"data-slot": "dialog-overlay",
|
|
980
996
|
className: cn(
|
|
@@ -994,7 +1010,7 @@ function DialogContent({
|
|
|
994
1010
|
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
995
1011
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
996
1012
|
/* @__PURE__ */ jsxs(
|
|
997
|
-
|
|
1013
|
+
SheetPrimitive.Content,
|
|
998
1014
|
{
|
|
999
1015
|
"data-slot": "dialog-content",
|
|
1000
1016
|
className: cn(
|
|
@@ -1005,7 +1021,7 @@ function DialogContent({
|
|
|
1005
1021
|
children: [
|
|
1006
1022
|
children,
|
|
1007
1023
|
showCloseButton && /* @__PURE__ */ jsxs(
|
|
1008
|
-
|
|
1024
|
+
SheetPrimitive.Close,
|
|
1009
1025
|
{
|
|
1010
1026
|
"data-slot": "dialog-close",
|
|
1011
1027
|
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",
|
|
@@ -1042,7 +1058,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
1042
1058
|
}
|
|
1043
1059
|
function DialogTitle({ className, ...props }) {
|
|
1044
1060
|
return /* @__PURE__ */ jsx(
|
|
1045
|
-
|
|
1061
|
+
SheetPrimitive.Title,
|
|
1046
1062
|
{
|
|
1047
1063
|
"data-slot": "dialog-title",
|
|
1048
1064
|
className: cn("text-lg leading-none font-semibold", className),
|
|
@@ -1055,7 +1071,7 @@ function DialogDescription({
|
|
|
1055
1071
|
...props
|
|
1056
1072
|
}) {
|
|
1057
1073
|
return /* @__PURE__ */ jsx(
|
|
1058
|
-
|
|
1074
|
+
SheetPrimitive.Description,
|
|
1059
1075
|
{
|
|
1060
1076
|
"data-slot": "dialog-description",
|
|
1061
1077
|
className: cn("text-muted-foreground text-sm", className),
|
|
@@ -1108,9 +1124,9 @@ function ConfirmHost() {
|
|
|
1108
1124
|
[state]
|
|
1109
1125
|
);
|
|
1110
1126
|
if (!state) return null;
|
|
1111
|
-
return /* @__PURE__ */ jsx(
|
|
1112
|
-
/* @__PURE__ */ jsx(
|
|
1113
|
-
/* @__PURE__ */ jsxs(
|
|
1127
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { open: true, onOpenChange: (open) => !open && close(false), children: /* @__PURE__ */ jsxs(SheetPrimitive.Portal, { children: [
|
|
1128
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" }),
|
|
1129
|
+
/* @__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: [
|
|
1114
1130
|
/* @__PURE__ */ jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsxs(
|
|
1115
1131
|
"span",
|
|
1116
1132
|
{
|
|
@@ -1122,8 +1138,8 @@ function ConfirmHost() {
|
|
|
1122
1138
|
}
|
|
1123
1139
|
) }),
|
|
1124
1140
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
1125
|
-
/* @__PURE__ */ jsx(
|
|
1126
|
-
/* @__PURE__ */ jsx(
|
|
1141
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Title, { className: "sr-only", children: state.title }),
|
|
1142
|
+
/* @__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 }) }),
|
|
1127
1143
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [
|
|
1128
1144
|
/* @__PURE__ */ jsx(
|
|
1129
1145
|
Button,
|
|
@@ -1218,10 +1234,10 @@ function PromptHost() {
|
|
|
1218
1234
|
close(v);
|
|
1219
1235
|
}, [state, value, confirmValue, close]);
|
|
1220
1236
|
if (!state) return null;
|
|
1221
|
-
return /* @__PURE__ */ jsx(
|
|
1222
|
-
/* @__PURE__ */ jsx(
|
|
1237
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { open: true, onOpenChange: (open) => !open && close(null), children: /* @__PURE__ */ jsxs(SheetPrimitive.Portal, { children: [
|
|
1238
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" }),
|
|
1223
1239
|
/* @__PURE__ */ jsxs(
|
|
1224
|
-
|
|
1240
|
+
SheetPrimitive.Content,
|
|
1225
1241
|
{
|
|
1226
1242
|
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",
|
|
1227
1243
|
onKeyDown: (e) => {
|
|
@@ -1236,8 +1252,8 @@ function PromptHost() {
|
|
|
1236
1252
|
state.title
|
|
1237
1253
|
] }) }),
|
|
1238
1254
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
1239
|
-
/* @__PURE__ */ jsx(
|
|
1240
|
-
state.message && /* @__PURE__ */ jsx(
|
|
1255
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Title, { className: "sr-only", children: state.title }),
|
|
1256
|
+
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 }) }),
|
|
1241
1257
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1242
1258
|
state.label && /* @__PURE__ */ jsx(Label, { children: state.label }),
|
|
1243
1259
|
/* @__PURE__ */ jsx(
|
|
@@ -1295,10 +1311,10 @@ function PromptHost() {
|
|
|
1295
1311
|
] }) });
|
|
1296
1312
|
}
|
|
1297
1313
|
function Modal({ open, onOpenChange, title, subtitle, children, actions, width = "wide" }) {
|
|
1298
|
-
return /* @__PURE__ */ jsx(
|
|
1299
|
-
/* @__PURE__ */ jsx(
|
|
1314
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(SheetPrimitive.Portal, { children: [
|
|
1315
|
+
/* @__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" }),
|
|
1300
1316
|
/* @__PURE__ */ jsxs(
|
|
1301
|
-
|
|
1317
|
+
SheetPrimitive.Content,
|
|
1302
1318
|
{
|
|
1303
1319
|
className: cn(
|
|
1304
1320
|
"terminal fixed top-[5vh] left-1/2 z-[110] flex max-h-[90vh] -translate-x-1/2 flex-col overflow-hidden rounded-sm border",
|
|
@@ -1311,7 +1327,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
|
|
|
1311
1327
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot", "aria-hidden": true }),
|
|
1312
1328
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot opacity-70", "aria-hidden": true }),
|
|
1313
1329
|
/* @__PURE__ */ jsx("span", { className: "terminal-dot opacity-50", "aria-hidden": true }),
|
|
1314
|
-
/* @__PURE__ */ jsx(
|
|
1330
|
+
/* @__PURE__ */ jsx(SheetPrimitive.Title, { className: "ml-2 truncate", children: title }),
|
|
1315
1331
|
subtitle && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/70 ml-1 truncate text-[10px] normal-case tracking-normal", children: [
|
|
1316
1332
|
"\xB7 ",
|
|
1317
1333
|
subtitle
|
|
@@ -1320,7 +1336,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
|
|
|
1320
1336
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1321
1337
|
actions,
|
|
1322
1338
|
/* @__PURE__ */ jsx(
|
|
1323
|
-
|
|
1339
|
+
SheetPrimitive.Close,
|
|
1324
1340
|
{
|
|
1325
1341
|
"aria-label": "close",
|
|
1326
1342
|
className: "text-muted-foreground hover:text-foreground inline-flex h-6 w-6 items-center justify-center rounded-sm",
|
|
@@ -1951,6 +1967,6 @@ __reExport(components_exports, ui_star);
|
|
|
1951
1967
|
// src/index.ts
|
|
1952
1968
|
__reExport(src_exports, components_exports);
|
|
1953
1969
|
|
|
1954
|
-
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_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, SheetContent, SheetDescription, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Sparkline, StatBlock, StatusPill, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, badgeVariants, buttonVariants, cn, confirm, explorerUrl, formatSats, formatSatsCompact, getOcThemeInitScript, isKnownTheme, priceBoth, prompt, relativeTime, resolveTheme, satsToUsd, shortenAddress, usdToSats, useOcSkin };
|
|
1970
|
+
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_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, badgeVariants, buttonVariants, cn, confirm, explorerUrl, formatSats, formatSatsCompact, getOcThemeInitScript, isKnownTheme, priceBoth, prompt, relativeTime, resolveTheme, satsToUsd, shortenAddress, usdToSats, useOcSkin };
|
|
1955
1971
|
//# sourceMappingURL=index.mjs.map
|
|
1956
1972
|
//# sourceMappingURL=index.mjs.map
|