@0xchain/ui 1.1.0-beta.2 → 1.1.0-beta.21

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.
Files changed (76) hide show
  1. package/LICENSE +21 -0
  2. package/dist/accordion.js +64 -0
  3. package/dist/alert-dialog.js +146 -0
  4. package/dist/{alert.mjs → alert.js} +26 -26
  5. package/dist/aspect-ratio.js +10 -0
  6. package/dist/avatar.js +53 -0
  7. package/dist/{badge.mjs → badge.js} +17 -16
  8. package/dist/breadcrumb.js +103 -0
  9. package/dist/{button.mjs → button.js} +18 -17
  10. package/dist/calendar.js +186 -0
  11. package/dist/card.js +90 -0
  12. package/dist/carousel.js +198 -0
  13. package/dist/{checkbox.mjs → checkbox.js} +16 -16
  14. package/dist/collapsible.js +34 -0
  15. package/dist/command.js +170 -0
  16. package/dist/context-menu.js +223 -0
  17. package/dist/dialog.js +136 -0
  18. package/dist/dropdown-menu.js +231 -0
  19. package/dist/form.js +116 -0
  20. package/dist/hover-card.js +38 -0
  21. package/dist/{input.mjs → input.js} +9 -9
  22. package/dist/{label.mjs → label.js} +12 -12
  23. package/dist/menubar.js +251 -0
  24. package/dist/{navigation-menu.mjs → navigation-menu.js} +89 -89
  25. package/dist/pagination.js +116 -0
  26. package/dist/popover.js +44 -0
  27. package/dist/progress.js +31 -0
  28. package/dist/radio-group.js +45 -0
  29. package/dist/resizable.js +48 -0
  30. package/dist/scroll-area.js +60 -0
  31. package/dist/select.js +169 -0
  32. package/dist/separator.js +26 -0
  33. package/dist/sheet.js +126 -0
  34. package/dist/skeleton.js +15 -0
  35. package/dist/{slider.mjs → slider.js} +33 -33
  36. package/dist/sonner.js +22 -0
  37. package/dist/{switch.mjs → switch.js} +15 -15
  38. package/dist/table.js +114 -0
  39. package/dist/{tabs.mjs → tabs.js} +37 -37
  40. package/dist/{textarea.mjs → textarea.js} +8 -8
  41. package/dist/toggle-group.js +62 -0
  42. package/dist/{toggle.mjs → toggle.js} +16 -16
  43. package/dist/tooltip.js +55 -0
  44. package/dist/utils-CzDCF-Ah.js +8 -0
  45. package/package.json +138 -89
  46. package/dist/accordion.mjs +0 -64
  47. package/dist/alert-dialog.mjs +0 -146
  48. package/dist/aspect-ratio.mjs +0 -10
  49. package/dist/avatar.mjs +0 -53
  50. package/dist/breadcrumb.mjs +0 -102
  51. package/dist/calendar.mjs +0 -173
  52. package/dist/card.mjs +0 -90
  53. package/dist/carousel.mjs +0 -177
  54. package/dist/collapsible.mjs +0 -34
  55. package/dist/command.mjs +0 -170
  56. package/dist/context-menu.mjs +0 -223
  57. package/dist/dialog.mjs +0 -136
  58. package/dist/dropdown-menu.mjs +0 -231
  59. package/dist/form.mjs +0 -101
  60. package/dist/hover-card.mjs +0 -38
  61. package/dist/menubar.mjs +0 -251
  62. package/dist/pagination.mjs +0 -116
  63. package/dist/popover.mjs +0 -44
  64. package/dist/progress.mjs +0 -31
  65. package/dist/radio-group.mjs +0 -45
  66. package/dist/resizable.mjs +0 -48
  67. package/dist/scroll-area.mjs +0 -60
  68. package/dist/select.mjs +0 -169
  69. package/dist/separator.mjs +0 -26
  70. package/dist/sheet.mjs +0 -126
  71. package/dist/skeleton.mjs +0 -15
  72. package/dist/sonner.mjs +0 -22
  73. package/dist/table.mjs +0 -114
  74. package/dist/toggle-group.mjs +0 -62
  75. package/dist/tooltip.mjs +0 -55
  76. package/dist/utils-B7J70Nno.js +0 -8
@@ -1,24 +1,24 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-switch";
3
- import { c as a } from "./utils-B7J70Nno.js";
4
- function o({
5
- className: r,
6
- ...n
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
3
+ import { c as cn } from "./utils-CzDCF-Ah.js";
4
+ function Switch({
5
+ className,
6
+ ...props
7
7
  }) {
8
- return /* @__PURE__ */ e(
9
- t.Root,
8
+ return /* @__PURE__ */ jsx(
9
+ SwitchPrimitive.Root,
10
10
  {
11
11
  "data-slot": "switch",
12
- className: a(
12
+ className: cn(
13
13
  "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
14
- r
14
+ className
15
15
  ),
16
- ...n,
17
- children: /* @__PURE__ */ e(
18
- t.Thumb,
16
+ ...props,
17
+ children: /* @__PURE__ */ jsx(
18
+ SwitchPrimitive.Thumb,
19
19
  {
20
20
  "data-slot": "switch-thumb",
21
- className: a(
21
+ className: cn(
22
22
  "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
23
23
  )
24
24
  }
@@ -27,5 +27,5 @@ function o({
27
27
  );
28
28
  }
29
29
  export {
30
- o as Switch
30
+ Switch
31
31
  };
package/dist/table.js ADDED
@@ -0,0 +1,114 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { c as cn } from "./utils-CzDCF-Ah.js";
3
+ function Table({ className, ...props }) {
4
+ return /* @__PURE__ */ jsx(
5
+ "div",
6
+ {
7
+ "data-slot": "table-container",
8
+ className: "relative w-full overflow-x-auto",
9
+ children: /* @__PURE__ */ jsx(
10
+ "table",
11
+ {
12
+ "data-slot": "table",
13
+ className: cn("w-full caption-bottom text-sm", className),
14
+ ...props
15
+ }
16
+ )
17
+ }
18
+ );
19
+ }
20
+ function TableHeader({ className, ...props }) {
21
+ return /* @__PURE__ */ jsx(
22
+ "thead",
23
+ {
24
+ "data-slot": "table-header",
25
+ className: cn("[&_tr]:border-b", className),
26
+ ...props
27
+ }
28
+ );
29
+ }
30
+ function TableBody({ className, ...props }) {
31
+ return /* @__PURE__ */ jsx(
32
+ "tbody",
33
+ {
34
+ "data-slot": "table-body",
35
+ className: cn("[&_tr:last-child]:border-0", className),
36
+ ...props
37
+ }
38
+ );
39
+ }
40
+ function TableFooter({ className, ...props }) {
41
+ return /* @__PURE__ */ jsx(
42
+ "tfoot",
43
+ {
44
+ "data-slot": "table-footer",
45
+ className: cn(
46
+ "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
47
+ className
48
+ ),
49
+ ...props
50
+ }
51
+ );
52
+ }
53
+ function TableRow({ className, ...props }) {
54
+ return /* @__PURE__ */ jsx(
55
+ "tr",
56
+ {
57
+ "data-slot": "table-row",
58
+ className: cn(
59
+ "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
60
+ className
61
+ ),
62
+ ...props
63
+ }
64
+ );
65
+ }
66
+ function TableHead({ className, ...props }) {
67
+ return /* @__PURE__ */ jsx(
68
+ "th",
69
+ {
70
+ "data-slot": "table-head",
71
+ className: cn(
72
+ "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
73
+ className
74
+ ),
75
+ ...props
76
+ }
77
+ );
78
+ }
79
+ function TableCell({ className, ...props }) {
80
+ return /* @__PURE__ */ jsx(
81
+ "td",
82
+ {
83
+ "data-slot": "table-cell",
84
+ className: cn(
85
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
86
+ className
87
+ ),
88
+ ...props
89
+ }
90
+ );
91
+ }
92
+ function TableCaption({
93
+ className,
94
+ ...props
95
+ }) {
96
+ return /* @__PURE__ */ jsx(
97
+ "caption",
98
+ {
99
+ "data-slot": "table-caption",
100
+ className: cn("text-muted-foreground mt-4 text-sm", className),
101
+ ...props
102
+ }
103
+ );
104
+ }
105
+ export {
106
+ Table,
107
+ TableBody,
108
+ TableCaption,
109
+ TableCell,
110
+ TableFooter,
111
+ TableHead,
112
+ TableHeader,
113
+ TableRow
114
+ };
@@ -1,67 +1,67 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import * as s from "@radix-ui/react-tabs";
3
- import { c as i } from "./utils-B7J70Nno.js";
4
- function o({
5
- className: t,
6
- ...e
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ import { c as cn } from "./utils-CzDCF-Ah.js";
4
+ function Tabs({
5
+ className,
6
+ ...props
7
7
  }) {
8
- return /* @__PURE__ */ a(
9
- s.Root,
8
+ return /* @__PURE__ */ jsx(
9
+ TabsPrimitive.Root,
10
10
  {
11
11
  "data-slot": "tabs",
12
- className: i("flex flex-col gap-2", t),
13
- ...e
12
+ className: cn("flex flex-col gap-2", className),
13
+ ...props
14
14
  }
15
15
  );
16
16
  }
17
- function d({
18
- className: t,
19
- ...e
17
+ function TabsList({
18
+ className,
19
+ ...props
20
20
  }) {
21
- return /* @__PURE__ */ a(
22
- s.List,
21
+ return /* @__PURE__ */ jsx(
22
+ TabsPrimitive.List,
23
23
  {
24
24
  "data-slot": "tabs-list",
25
- className: i(
25
+ className: cn(
26
26
  "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
27
- t
27
+ className
28
28
  ),
29
- ...e
29
+ ...props
30
30
  }
31
31
  );
32
32
  }
33
- function c({
34
- className: t,
35
- ...e
33
+ function TabsTrigger({
34
+ className,
35
+ ...props
36
36
  }) {
37
- return /* @__PURE__ */ a(
38
- s.Trigger,
37
+ return /* @__PURE__ */ jsx(
38
+ TabsPrimitive.Trigger,
39
39
  {
40
40
  "data-slot": "tabs-trigger",
41
- className: i(
41
+ className: cn(
42
42
  "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
43
- t
43
+ className
44
44
  ),
45
- ...e
45
+ ...props
46
46
  }
47
47
  );
48
48
  }
49
- function l({
50
- className: t,
51
- ...e
49
+ function TabsContent({
50
+ className,
51
+ ...props
52
52
  }) {
53
- return /* @__PURE__ */ a(
54
- s.Content,
53
+ return /* @__PURE__ */ jsx(
54
+ TabsPrimitive.Content,
55
55
  {
56
56
  "data-slot": "tabs-content",
57
- className: i("flex-1 outline-none", t),
58
- ...e
57
+ className: cn("flex-1 outline-none", className),
58
+ ...props
59
59
  }
60
60
  );
61
61
  }
62
62
  export {
63
- o as Tabs,
64
- l as TabsContent,
65
- d as TabsList,
66
- c as TabsTrigger
63
+ Tabs,
64
+ TabsContent,
65
+ TabsList,
66
+ TabsTrigger
67
67
  };
@@ -1,18 +1,18 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { c as t } from "./utils-B7J70Nno.js";
3
- function n({ className: r, ...e }) {
4
- return /* @__PURE__ */ i(
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { c as cn } from "./utils-CzDCF-Ah.js";
3
+ function Textarea({ className, ...props }) {
4
+ return /* @__PURE__ */ jsx(
5
5
  "textarea",
6
6
  {
7
7
  "data-slot": "textarea",
8
- className: t(
8
+ className: cn(
9
9
  "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
10
- r
10
+ className
11
11
  ),
12
- ...e
12
+ ...props
13
13
  }
14
14
  );
15
15
  }
16
16
  export {
17
- n as Textarea
17
+ Textarea
18
18
  };
@@ -0,0 +1,62 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
4
+ import { c as cn } from "./utils-CzDCF-Ah.js";
5
+ import { toggleVariants } from "./toggle.js";
6
+ const ToggleGroupContext = React.createContext({
7
+ size: "default",
8
+ variant: "default"
9
+ });
10
+ function ToggleGroup({
11
+ className,
12
+ variant,
13
+ size,
14
+ children,
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsx(
18
+ ToggleGroupPrimitive.Root,
19
+ {
20
+ "data-slot": "toggle-group",
21
+ "data-variant": variant,
22
+ "data-size": size,
23
+ className: cn(
24
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
25
+ className
26
+ ),
27
+ ...props,
28
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
29
+ }
30
+ );
31
+ }
32
+ function ToggleGroupItem({
33
+ className,
34
+ children,
35
+ variant,
36
+ size,
37
+ ...props
38
+ }) {
39
+ const context = React.useContext(ToggleGroupContext);
40
+ return /* @__PURE__ */ jsx(
41
+ ToggleGroupPrimitive.Item,
42
+ {
43
+ "data-slot": "toggle-group-item",
44
+ "data-variant": context.variant || variant,
45
+ "data-size": context.size || size,
46
+ className: cn(
47
+ toggleVariants({
48
+ variant: context.variant || variant,
49
+ size: context.size || size
50
+ }),
51
+ "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
52
+ className
53
+ ),
54
+ ...props,
55
+ children
56
+ }
57
+ );
58
+ }
59
+ export {
60
+ ToggleGroup,
61
+ ToggleGroupItem
62
+ };
@@ -1,8 +1,8 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import * as a from "@radix-ui/react-toggle";
3
- import { cva as o } from "class-variance-authority";
4
- import { c as s } from "./utils-B7J70Nno.js";
5
- const d = o(
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
3
+ import { cva } from "class-variance-authority";
4
+ import { c as cn } from "./utils-CzDCF-Ah.js";
5
+ const toggleVariants = cva(
6
6
  "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
7
7
  {
8
8
  variants: {
@@ -22,22 +22,22 @@ const d = o(
22
22
  }
23
23
  }
24
24
  );
25
- function u({
26
- className: e,
27
- variant: t,
28
- size: i,
29
- ...r
25
+ function Toggle({
26
+ className,
27
+ variant,
28
+ size,
29
+ ...props
30
30
  }) {
31
- return /* @__PURE__ */ n(
32
- a.Root,
31
+ return /* @__PURE__ */ jsx(
32
+ TogglePrimitive.Root,
33
33
  {
34
34
  "data-slot": "toggle",
35
- className: s(d({ variant: t, size: i, className: e })),
36
- ...r
35
+ className: cn(toggleVariants({ variant, size, className })),
36
+ ...props
37
37
  }
38
38
  );
39
39
  }
40
40
  export {
41
- u as Toggle,
42
- d as toggleVariants
41
+ Toggle,
42
+ toggleVariants
43
43
  };
@@ -0,0 +1,55 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ import { c as cn } from "./utils-CzDCF-Ah.js";
4
+ function TooltipProvider({
5
+ delayDuration = 0,
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx(
9
+ TooltipPrimitive.Provider,
10
+ {
11
+ "data-slot": "tooltip-provider",
12
+ delayDuration,
13
+ ...props
14
+ }
15
+ );
16
+ }
17
+ function Tooltip({
18
+ ...props
19
+ }) {
20
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
21
+ }
22
+ function TooltipTrigger({
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
26
+ }
27
+ function TooltipContent({
28
+ className,
29
+ sideOffset = 0,
30
+ children,
31
+ ...props
32
+ }) {
33
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
34
+ TooltipPrimitive.Content,
35
+ {
36
+ "data-slot": "tooltip-content",
37
+ sideOffset,
38
+ className: cn(
39
+ "bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
40
+ className
41
+ ),
42
+ ...props,
43
+ children: [
44
+ children,
45
+ /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
46
+ ]
47
+ }
48
+ ) });
49
+ }
50
+ export {
51
+ Tooltip,
52
+ TooltipContent,
53
+ TooltipProvider,
54
+ TooltipTrigger
55
+ };
@@ -0,0 +1,8 @@
1
+ import clsx from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
6
+ export {
7
+ cn as c
8
+ };