@cryptlex/web-components 1.2.0 → 1.2.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.
@@ -0,0 +1,21 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Toaster as r } from "sonner";
3
+ const s = ({ ...t }) => /* @__PURE__ */ o(
4
+ r,
5
+ {
6
+ className: "toaster group",
7
+ toastOptions: {
8
+ classNames: {
9
+ toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
10
+ description: "group-[.toast]:text-muted-foreground",
11
+ actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
12
+ cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
13
+ }
14
+ },
15
+ ...t
16
+ }
17
+ );
18
+ export {
19
+ s as Toaster
20
+ };
21
+ //# sourceMappingURL=sonner.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sonner.es.js","sources":["../../../lib/components/ui/sonner.tsx"],"sourcesContent":["import { Toaster as Sonner } from \"sonner\"\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n\n\n return (\n <Sonner\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n \"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg\",\n description: \"group-[.toast]:text-muted-foreground\",\n actionButton:\n \"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground\",\n cancelButton:\n \"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground\",\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster }\n"],"names":["Toaster","props","jsx","Sonner"],"mappings":";;AAIA,MAAMA,IAAU,CAAC,EAAE,GAAGC,QAIlB,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,cAAc;AAAA,MACZ,YAAY;AAAA,QACV,OACE;AAAA,QACF,aAAa;AAAA,QACb,cACE;AAAA,QACF,cACE;AAAA,MAAA;AAAA,IAEN;AAAA,IACC,GAAGF;AAAA,EAAA;AACN;"}
@@ -34,6 +34,7 @@ import * as SelectPrimitive from '@radix-ui/react-select';
34
34
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
35
35
  import { SeparatorProps } from '@radix-ui/react-separator';
36
36
  import { SlotProps } from '@radix-ui/react-slot';
37
+ import { Toaster as Toaster_2 } from 'sonner';
37
38
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
38
39
  import { UniqueOption } from 'recharts/types/util/payload/getUniqPayload';
39
40
  import { ValueType } from 'recharts/types/component/DefaultTooltipContent';
@@ -597,6 +598,10 @@ declare const THEMES: {
597
598
  readonly dark: ".dark";
598
599
  };
599
600
 
601
+ export declare const Toaster: ({ ...props }: ToasterProps) => JSX_2.Element;
602
+
603
+ declare type ToasterProps = React.ComponentProps<typeof Toaster_2>;
604
+
600
605
  export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
601
606
 
602
607
  export declare const TooltipContent: React_2.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
package/dist/index.es.js CHANGED
@@ -2,13 +2,13 @@ import { Badge as r, badgeVariants as t } from "./components/ui/badge.es.js";
2
2
  import { Breadcrumb as n, BreadcrumbEllipsis as i, BreadcrumbItem as d, BreadcrumbLink as p, BreadcrumbList as l, BreadcrumbPage as m, BreadcrumbSeparator as u } from "./components/ui/breadcrumb.es.js";
3
3
  import { Button as g, buttonVariants as b } from "./components/ui/button.es.js";
4
4
  import { Calendar as c } from "./components/ui/calendar.es.js";
5
- import { Card as x, CardContent as D, CardDescription as f, CardFooter as s, CardHeader as T, CardTitle as h } from "./components/ui/card.es.js";
5
+ import { Card as x, CardContent as f, CardDescription as D, CardFooter as s, CardHeader as T, CardTitle as h } from "./components/ui/card.es.js";
6
6
  import { ChartContainer as v, ChartLegend as w, ChartLegendContent as P, ChartStyle as B, ChartTooltip as F, ChartTooltipContent as L } from "./components/ui/chart.es.js";
7
7
  import { Checkbox as N } from "./components/ui/checkbox.es.js";
8
8
  import { Collapsible as A, CollapsibleContent as y, CollapsibleTrigger as H } from "./components/ui/collapsible.es.js";
9
9
  import { Command as V, CommandDialog as E, CommandEmpty as O, CommandGroup as U, CommandInput as j, CommandItem as q, CommandList as z, CommandSeparator as J, CommandShortcut as K } from "./components/ui/command.es.js";
10
10
  import { Dialog as W, DialogClose as X, DialogContent as Y, DialogDescription as Z, DialogFooter as _, DialogHeader as $, DialogOverlay as ee, DialogPortal as oe, DialogTitle as re, DialogTrigger as te } from "./components/ui/dialog.es.js";
11
- import { DropdownMenu as ne, DropdownMenuCheckboxItem as ie, DropdownMenuContent as de, DropdownMenuGroup as pe, DropdownMenuItem as le, DropdownMenuLabel as me, DropdownMenuPortal as ue, DropdownMenuRadioGroup as Se, DropdownMenuRadioItem as ge, DropdownMenuSeparator as be, DropdownMenuShortcut as Ce, DropdownMenuSub as ce, DropdownMenuSubContent as Me, DropdownMenuSubTrigger as xe, DropdownMenuTrigger as De } from "./components/ui/dropdown-menu.es.js";
11
+ import { DropdownMenu as ne, DropdownMenuCheckboxItem as ie, DropdownMenuContent as de, DropdownMenuGroup as pe, DropdownMenuItem as le, DropdownMenuLabel as me, DropdownMenuPortal as ue, DropdownMenuRadioGroup as Se, DropdownMenuRadioItem as ge, DropdownMenuSeparator as be, DropdownMenuShortcut as Ce, DropdownMenuSub as ce, DropdownMenuSubContent as Me, DropdownMenuSubTrigger as xe, DropdownMenuTrigger as fe } from "./components/ui/dropdown-menu.es.js";
12
12
  import { Form as se, FormControl as Te, FormDescription as he, FormField as Ie, FormItem as ve, FormLabel as we, FormMessage as Pe, useFormField as Be } from "./components/ui/form.es.js";
13
13
  import { Input as Le } from "./components/ui/input.es.js";
14
14
  import { Label as Ne } from "./components/ui/label.es.js";
@@ -19,15 +19,16 @@ import { Popover as Ke, PopoverAnchor as Qe, PopoverContent as We, PopoverTrigge
19
19
  import { RadioGroup as Ze, RadioGroupItem as _e } from "./components/ui/radio-group.es.js";
20
20
  import { Select as eo, SelectContent as oo, SelectGroup as ro, SelectItem as to, SelectLabel as ao, SelectScrollDownButton as no, SelectScrollUpButton as io, SelectSeparator as po, SelectTrigger as lo, SelectValue as mo } from "./components/ui/select.es.js";
21
21
  import { Separator as So } from "./components/ui/separator.es.js";
22
- import { Sheet as bo, SheetClose as Co, SheetContent as co, SheetDescription as Mo, SheetFooter as xo, SheetHeader as Do, SheetOverlay as fo, SheetPortal as so, SheetTitle as To, SheetTrigger as ho } from "./components/ui/sheet.es.js";
22
+ import { Sheet as bo, SheetClose as Co, SheetContent as co, SheetDescription as Mo, SheetFooter as xo, SheetHeader as fo, SheetOverlay as Do, SheetPortal as so, SheetTitle as To, SheetTrigger as ho } from "./components/ui/sheet.es.js";
23
23
  import { Sidebar as vo, SidebarContent as wo, SidebarFooter as Po, SidebarGroup as Bo, SidebarGroupAction as Fo, SidebarGroupContent as Lo, SidebarGroupLabel as Go, SidebarHeader as No, SidebarInput as ko, SidebarInset as Ao, SidebarMenu as yo, SidebarMenuAction as Ho, SidebarMenuBadge as Ro, SidebarMenuButton as Vo, SidebarMenuItem as Eo, SidebarMenuSkeleton as Oo, SidebarMenuSub as Uo, SidebarMenuSubButton as jo, SidebarMenuSubItem as qo, SidebarProvider as zo, SidebarRail as Jo, SidebarSeparator as Ko, SidebarTrigger as Qo, useSidebar as Wo } from "./components/ui/sidebar.es.js";
24
24
  import { Skeleton as Yo } from "./components/ui/skeleton.es.js";
25
25
  import { Table as _o, TableBody as $o, TableCaption as er, TableCell as or, TableFooter as rr, TableHead as tr, TableHeader as ar, TableRow as nr } from "./components/ui/table.es.js";
26
26
  import { Tooltip as dr, TooltipContent as pr, TooltipProvider as lr, TooltipTrigger as mr } from "./components/ui/tooltip.es.js";
27
27
  import { Accordion as Sr, AccordionContent as gr, AccordionItem as br, AccordionTrigger as Cr } from "./components/ui/accordion.es.js";
28
- import { NavigationMenu as Mr, NavigationMenuContent as xr, NavigationMenuIndicator as Dr, NavigationMenuItem as fr, NavigationMenuLink as sr, NavigationMenuList as Tr, NavigationMenuListItem as hr, NavigationMenuTrigger as Ir, NavigationMenuViewport as vr, navigationMenuTriggerStyle as wr } from "./components/ui/navigation-menu.es.js";
29
- import { useIsMobile as Br } from "./hooks/use-mobile.es.js";
30
- import { cn as Lr } from "./utils/index.es.js";
28
+ import { NavigationMenu as Mr, NavigationMenuContent as xr, NavigationMenuIndicator as fr, NavigationMenuItem as Dr, NavigationMenuLink as sr, NavigationMenuList as Tr, NavigationMenuListItem as hr, NavigationMenuTrigger as Ir, NavigationMenuViewport as vr, navigationMenuTriggerStyle as wr } from "./components/ui/navigation-menu.es.js";
29
+ import { Toaster as Br } from "./components/ui/sonner.es.js";
30
+ import { useIsMobile as Lr } from "./hooks/use-mobile.es.js";
31
+ import { cn as Nr } from "./utils/index.es.js";
31
32
  export {
32
33
  Sr as Accordion,
33
34
  gr as AccordionContent,
@@ -44,8 +45,8 @@ export {
44
45
  g as Button,
45
46
  c as Calendar,
46
47
  x as Card,
47
- D as CardContent,
48
- f as CardDescription,
48
+ f as CardContent,
49
+ D as CardDescription,
49
50
  s as CardFooter,
50
51
  T as CardHeader,
51
52
  h as CardTitle,
@@ -92,7 +93,7 @@ export {
92
93
  ce as DropdownMenuSub,
93
94
  Me as DropdownMenuSubContent,
94
95
  xe as DropdownMenuSubTrigger,
95
- De as DropdownMenuTrigger,
96
+ fe as DropdownMenuTrigger,
96
97
  se as Form,
97
98
  Te as FormControl,
98
99
  he as FormDescription,
@@ -105,8 +106,8 @@ export {
105
106
  Ae as Loader,
106
107
  Mr as NavigationMenu,
107
108
  xr as NavigationMenuContent,
108
- Dr as NavigationMenuIndicator,
109
- fr as NavigationMenuItem,
109
+ fr as NavigationMenuIndicator,
110
+ Dr as NavigationMenuItem,
110
111
  sr as NavigationMenuLink,
111
112
  Tr as NavigationMenuList,
112
113
  hr as NavigationMenuListItem,
@@ -142,8 +143,8 @@ export {
142
143
  co as SheetContent,
143
144
  Mo as SheetDescription,
144
145
  xo as SheetFooter,
145
- Do as SheetHeader,
146
- fo as SheetOverlay,
146
+ fo as SheetHeader,
147
+ Do as SheetOverlay,
147
148
  so as SheetPortal,
148
149
  To as SheetTitle,
149
150
  ho as SheetTrigger,
@@ -179,16 +180,17 @@ export {
179
180
  tr as TableHead,
180
181
  ar as TableHeader,
181
182
  nr as TableRow,
183
+ Br as Toaster,
182
184
  dr as Tooltip,
183
185
  pr as TooltipContent,
184
186
  lr as TooltipProvider,
185
187
  mr as TooltipTrigger,
186
188
  t as badgeVariants,
187
189
  b as buttonVariants,
188
- Lr as cn,
190
+ Nr as cn,
189
191
  wr as navigationMenuTriggerStyle,
190
192
  Be as useFormField,
191
- Br as useIsMobile,
193
+ Lr as useIsMobile,
192
194
  Wo as useSidebar
193
195
  };
194
196
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.css CHANGED
@@ -61,6 +61,10 @@
61
61
  @apply border-border;
62
62
  }
63
63
 
64
+ a {
65
+ @apply link;
66
+ }
67
+
64
68
  h1 {
65
69
  @apply text-heading-1 my-v3;
66
70
  }
@@ -93,4 +97,10 @@
93
97
  @apply bg-background text-foreground;
94
98
  }
95
99
 
100
+ }
101
+
102
+ @layer components {
103
+ .link {
104
+ @apply text-primary underline hover:underline-offset-2 hover:text-primary/70;
105
+ }
96
106
  }
package/lib/tokens.css CHANGED
@@ -12,8 +12,8 @@
12
12
  --xprimary-6: 0.5 0.13 var(--primary-hue);
13
13
  --xprimary-7: 0.35 0.13 var(--primary-hue);
14
14
  --xprimary-8: 0.25 0.13 var(--primary-hue);
15
- --xprimary-9: 0.13 0.13 var(--primary-hue);
16
- --xprimary-10: 0.05 0.13 var(--primary-hue);
15
+ --xprimary-9: 0.20 0.09 var(--primary-hue);
16
+ --xprimary-10: 0.10 0.03 var(--primary-hue);
17
17
  --primary-1: var(--xprimary-1);
18
18
  --primary-2: var(--xprimary-2);
19
19
  --primary-3: var(--xprimary-3);
@@ -33,8 +33,8 @@
33
33
  --xsecondary-6: 0.5 0.13 var(--secondary-hue);
34
34
  --xsecondary-7: 0.35 0.13 var(--secondary-hue);
35
35
  --xsecondary-8: 0.25 0.13 var(--secondary-hue);
36
- --xsecondary-9: 0.13 0.13 var(--secondary-hue);
37
- --xsecondary-10: 0.05 0.13 var(--secondary-hue);
36
+ --xsecondary-9: 0.20 0.09 var(--secondary-hue);
37
+ --xsecondary-10: 0.10 0.03 var(--secondary-hue);
38
38
  --secondary-1: var(--xsecondary-1);
39
39
  --secondary-2: var(--xsecondary-2);
40
40
  --secondary-3: var(--xsecondary-3);
@@ -54,8 +54,8 @@
54
54
  --xdestructive-6: 0.5 0.13 var(--destructive-hue);
55
55
  --xdestructive-7: 0.35 0.13 var(--destructive-hue);
56
56
  --xdestructive-8: 0.25 0.13 var(--destructive-hue);
57
- --xdestructive-9: 0.13 0.13 var(--destructive-hue);
58
- --xdestructive-10: 0.05 0.13 var(--destructive-hue);
57
+ --xdestructive-9: 0.20 0.09 var(--destructive-hue);
58
+ --xdestructive-10: 0.10 0.03 var(--destructive-hue);
59
59
  --destructive-1: var(--xdestructive-1);
60
60
  --destructive-2: var(--xdestructive-2);
61
61
  --destructive-3: var(--xdestructive-3);
@@ -75,8 +75,8 @@
75
75
  --xsuccess-6: 0.5 0.13 var(--success-hue);
76
76
  --xsuccess-7: 0.35 0.13 var(--success-hue);
77
77
  --xsuccess-8: 0.25 0.13 var(--success-hue);
78
- --xsuccess-9: 0.13 0.13 var(--success-hue);
79
- --xsuccess-10: 0.05 0.13 var(--success-hue);
78
+ --xsuccess-9: 0.20 0.09 var(--success-hue);
79
+ --xsuccess-10: 0.10 0.03 var(--success-hue);
80
80
  --success-1: var(--xsuccess-1);
81
81
  --success-2: var(--xsuccess-2);
82
82
  --success-3: var(--xsuccess-3);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptlex/web-components",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "React component library for Cryptlex web applications",
5
5
  "author": "Cryptlex",
6
6
  "type": "module",
@@ -49,13 +49,14 @@
49
49
  "@radix-ui/react-dropdown-menu": "^2.1.2",
50
50
  "@radix-ui/react-icons": "^1.3.0",
51
51
  "@radix-ui/react-label": "^2.1.0",
52
+ "@radix-ui/react-navigation-menu": "^1.2.1",
52
53
  "@radix-ui/react-popover": "^1.1.2",
53
54
  "@radix-ui/react-radio-group": "^1.2.1",
54
55
  "@radix-ui/react-select": "^2.1.2",
55
56
  "@radix-ui/react-separator": "^1.1.0",
56
57
  "@radix-ui/react-slot": "^1.1.0",
57
58
  "@radix-ui/react-tooltip": "^1.1.3",
58
- "@radix-ui/react-navigation-menu": "^1.2.1",
59
+ "sonner": "^1.7.0",
59
60
  "@tanstack/react-table": "^8.20.5",
60
61
  "class-variance-authority": "^0.7.0",
61
62
  "clsx": "^2.1.1",
@@ -1,5 +1,12 @@
1
1
  import type { Config } from 'tailwindcss';
2
2
 
3
+ const tokenRamps = (paletteName: string) => {
4
+ const ramps = {};
5
+ for (let i = 1; i <= 10; i++) {
6
+ ramps[i] = `oklch(var(--${paletteName}-${i}) / <alpha-value>)`
7
+ }
8
+ return ramps;
9
+ }
3
10
  export default {
4
11
  // Enable dark mode based on class.
5
12
  darkMode: ['class'],
@@ -29,10 +36,15 @@ export default {
29
36
  primary: {
30
37
  DEFAULT: 'oklch(var(--primary) / <alpha-value>)',
31
38
  foreground: 'oklch(var(--primary-foreground) / <alpha-value>)',
39
+ ...tokenRamps('primary')
32
40
  },
33
41
  secondary: {
34
42
  DEFAULT: 'oklch(var(--secondary) / <alpha-value>)',
35
43
  foreground: 'oklch(var(--secondary-foreground) / <alpha-value>)',
44
+ ...tokenRamps('secondary')
45
+ },
46
+ neutral: {
47
+ ...tokenRamps('neutral')
36
48
  },
37
49
  muted: {
38
50
  DEFAULT: 'oklch(var(--muted) / <alpha-value>)',
@@ -45,10 +57,12 @@ export default {
45
57
  destructive: {
46
58
  DEFAULT: 'oklch(var(--destructive) / <alpha-value>)',
47
59
  foreground: 'oklch(var(--destructive-foreground) / <alpha-value>)',
60
+ ...tokenRamps('destructive')
48
61
  },
49
62
  success: {
50
63
  DEFAULT: 'oklch(var(--success) / <alpha-value>)',
51
64
  foreground: 'oklch(var(--success-foreground) / <alpha-value>)',
65
+ ...tokenRamps('success')
52
66
  },
53
67
  border: 'oklch(var(--border) / <alpha-value>)',
54
68
  input: 'oklch(var(--input) / <alpha-value>)',