@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.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 DialogPrimitive from '@radix-ui/react-dialog';
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,
@@ -876,17 +878,20 @@ function Separator({
876
878
  );
877
879
  }
878
880
  function Sheet(props) {
879
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
881
+ return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
880
882
  }
881
883
  function SheetTrigger(props) {
882
- return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
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 });
883
888
  }
884
889
  function SheetPortal(props) {
885
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
890
+ return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
886
891
  }
887
892
  function SheetOverlay({ className, ...props }) {
888
893
  return /* @__PURE__ */ jsx(
889
- DialogPrimitive.Overlay,
894
+ SheetPrimitive.Overlay,
890
895
  {
891
896
  "data-slot": "sheet-overlay",
892
897
  className: cn(
@@ -912,7 +917,7 @@ function SheetContent({
912
917
  return /* @__PURE__ */ jsxs(SheetPortal, { children: [
913
918
  /* @__PURE__ */ jsx(SheetOverlay, {}),
914
919
  /* @__PURE__ */ jsxs(
915
- DialogPrimitive.Content,
920
+ SheetPrimitive.Content,
916
921
  {
917
922
  "data-slot": "sheet-content",
918
923
  className: cn(
@@ -923,7 +928,7 @@ function SheetContent({
923
928
  ...props,
924
929
  children: [
925
930
  children,
926
- /* @__PURE__ */ jsxs(DialogPrimitive.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: [
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: [
927
932
  /* @__PURE__ */ jsx(X, { className: "size-4" }),
928
933
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
929
934
  ] })
@@ -935,9 +940,19 @@ function SheetContent({
935
940
  function SheetHeader({ className, ...props }) {
936
941
  return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props });
937
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
+ }
938
953
  function SheetTitle({ className, ...props }) {
939
954
  return /* @__PURE__ */ jsx(
940
- DialogPrimitive.Title,
955
+ SheetPrimitive.Title,
941
956
  {
942
957
  "data-slot": "sheet-title",
943
958
  className: cn("text-foreground font-semibold", className),
@@ -950,7 +965,7 @@ function SheetDescription({
950
965
  ...props
951
966
  }) {
952
967
  return /* @__PURE__ */ jsx(
953
- DialogPrimitive.Description,
968
+ SheetPrimitive.Description,
954
969
  {
955
970
  "data-slot": "sheet-description",
956
971
  className: cn("text-muted-foreground text-sm", className),
@@ -959,23 +974,23 @@ function SheetDescription({
959
974
  );
960
975
  }
961
976
  function Dialog({ ...props }) {
962
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
977
+ return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
963
978
  }
964
979
  function DialogTrigger({ ...props }) {
965
- return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
980
+ return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
966
981
  }
967
982
  function DialogPortal({ ...props }) {
968
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
983
+ return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
969
984
  }
970
985
  function DialogClose({ ...props }) {
971
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
986
+ return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "dialog-close", ...props });
972
987
  }
973
988
  function DialogOverlay({
974
989
  className,
975
990
  ...props
976
991
  }) {
977
992
  return /* @__PURE__ */ jsx(
978
- DialogPrimitive.Overlay,
993
+ SheetPrimitive.Overlay,
979
994
  {
980
995
  "data-slot": "dialog-overlay",
981
996
  className: cn(
@@ -995,7 +1010,7 @@ function DialogContent({
995
1010
  return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
996
1011
  /* @__PURE__ */ jsx(DialogOverlay, {}),
997
1012
  /* @__PURE__ */ jsxs(
998
- DialogPrimitive.Content,
1013
+ SheetPrimitive.Content,
999
1014
  {
1000
1015
  "data-slot": "dialog-content",
1001
1016
  className: cn(
@@ -1006,7 +1021,7 @@ function DialogContent({
1006
1021
  children: [
1007
1022
  children,
1008
1023
  showCloseButton && /* @__PURE__ */ jsxs(
1009
- DialogPrimitive.Close,
1024
+ SheetPrimitive.Close,
1010
1025
  {
1011
1026
  "data-slot": "dialog-close",
1012
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",
@@ -1043,7 +1058,7 @@ function DialogFooter({ className, ...props }) {
1043
1058
  }
1044
1059
  function DialogTitle({ className, ...props }) {
1045
1060
  return /* @__PURE__ */ jsx(
1046
- DialogPrimitive.Title,
1061
+ SheetPrimitive.Title,
1047
1062
  {
1048
1063
  "data-slot": "dialog-title",
1049
1064
  className: cn("text-lg leading-none font-semibold", className),
@@ -1056,7 +1071,7 @@ function DialogDescription({
1056
1071
  ...props
1057
1072
  }) {
1058
1073
  return /* @__PURE__ */ jsx(
1059
- DialogPrimitive.Description,
1074
+ SheetPrimitive.Description,
1060
1075
  {
1061
1076
  "data-slot": "dialog-description",
1062
1077
  className: cn("text-muted-foreground text-sm", className),
@@ -1109,9 +1124,9 @@ function ConfirmHost() {
1109
1124
  [state]
1110
1125
  );
1111
1126
  if (!state) return null;
1112
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: true, onOpenChange: (open) => !open && close(false), children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
1113
- /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" }),
1114
- /* @__PURE__ */ jsxs(DialogPrimitive.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: [
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: [
1115
1130
  /* @__PURE__ */ jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsxs(
1116
1131
  "span",
1117
1132
  {
@@ -1123,8 +1138,8 @@ function ConfirmHost() {
1123
1138
  }
1124
1139
  ) }),
1125
1140
  /* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
1126
- /* @__PURE__ */ jsx(DialogPrimitive.Title, { className: "sr-only", children: state.title }),
1127
- /* @__PURE__ */ jsx(DialogPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap", children: state.message }) }),
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 }) }),
1128
1143
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [
1129
1144
  /* @__PURE__ */ jsx(
1130
1145
  Button,
@@ -1219,10 +1234,10 @@ function PromptHost() {
1219
1234
  close(v);
1220
1235
  }, [state, value, confirmValue, close]);
1221
1236
  if (!state) return null;
1222
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: true, onOpenChange: (open) => !open && close(null), children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
1223
- /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" }),
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" }),
1224
1239
  /* @__PURE__ */ jsxs(
1225
- DialogPrimitive.Content,
1240
+ SheetPrimitive.Content,
1226
1241
  {
1227
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",
1228
1243
  onKeyDown: (e) => {
@@ -1237,8 +1252,8 @@ function PromptHost() {
1237
1252
  state.title
1238
1253
  ] }) }),
1239
1254
  /* @__PURE__ */ jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
1240
- /* @__PURE__ */ jsx(DialogPrimitive.Title, { className: "sr-only", children: state.title }),
1241
- state.message && /* @__PURE__ */ jsx(DialogPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap", children: state.message }) }),
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 }) }),
1242
1257
  /* @__PURE__ */ jsxs("div", { children: [
1243
1258
  state.label && /* @__PURE__ */ jsx(Label, { children: state.label }),
1244
1259
  /* @__PURE__ */ jsx(
@@ -1296,10 +1311,10 @@ function PromptHost() {
1296
1311
  ] }) });
1297
1312
  }
1298
1313
  function Modal({ open, onOpenChange, title, subtitle, children, actions, width = "wide" }) {
1299
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
1300
- /* @__PURE__ */ jsx(DialogPrimitive.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" }),
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" }),
1301
1316
  /* @__PURE__ */ jsxs(
1302
- DialogPrimitive.Content,
1317
+ SheetPrimitive.Content,
1303
1318
  {
1304
1319
  className: cn(
1305
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",
@@ -1312,7 +1327,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
1312
1327
  /* @__PURE__ */ jsx("span", { className: "terminal-dot", "aria-hidden": true }),
1313
1328
  /* @__PURE__ */ jsx("span", { className: "terminal-dot opacity-70", "aria-hidden": true }),
1314
1329
  /* @__PURE__ */ jsx("span", { className: "terminal-dot opacity-50", "aria-hidden": true }),
1315
- /* @__PURE__ */ jsx(DialogPrimitive.Title, { className: "ml-2 truncate", children: title }),
1330
+ /* @__PURE__ */ jsx(SheetPrimitive.Title, { className: "ml-2 truncate", children: title }),
1316
1331
  subtitle && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/70 ml-1 truncate text-[10px] normal-case tracking-normal", children: [
1317
1332
  "\xB7 ",
1318
1333
  subtitle
@@ -1321,7 +1336,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
1321
1336
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1322
1337
  actions,
1323
1338
  /* @__PURE__ */ jsx(
1324
- DialogPrimitive.Close,
1339
+ SheetPrimitive.Close,
1325
1340
  {
1326
1341
  "aria-label": "close",
1327
1342
  className: "text-muted-foreground hover:text-foreground inline-flex h-6 w-6 items-center justify-center rounded-sm",
@@ -1952,6 +1967,6 @@ __reExport(components_exports, ui_star);
1952
1967
  // src/index.ts
1953
1968
  __reExport(src_exports, components_exports);
1954
1969
 
1955
- 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 };
1956
1971
  //# sourceMappingURL=index.mjs.map
1957
1972
  //# sourceMappingURL=index.mjs.map