@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
package/dist/command.mjs DELETED
@@ -1,170 +0,0 @@
1
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
- import { Command as n } from "cmdk";
3
- import { SearchIcon as i } from "lucide-react";
4
- import { c as a } from "./utils-B7J70Nno.js";
5
- import { Dialog as l, DialogHeader as u, DialogTitle as p, DialogDescription as g, DialogContent as f } from "./dialog.mjs";
6
- function h({
7
- className: e,
8
- ...t
9
- }) {
10
- return /* @__PURE__ */ o(
11
- n,
12
- {
13
- "data-slot": "command",
14
- className: a(
15
- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
16
- e
17
- ),
18
- ...t
19
- }
20
- );
21
- }
22
- function y({
23
- title: e = "Command Palette",
24
- description: t = "Search for a command to run...",
25
- children: r,
26
- className: m,
27
- showCloseButton: s = !0,
28
- ...c
29
- }) {
30
- return /* @__PURE__ */ d(l, { ...c, children: [
31
- /* @__PURE__ */ d(u, { className: "sr-only", children: [
32
- /* @__PURE__ */ o(p, { children: e }),
33
- /* @__PURE__ */ o(g, { children: t })
34
- ] }),
35
- /* @__PURE__ */ o(
36
- f,
37
- {
38
- className: a("overflow-hidden p-0", m),
39
- showCloseButton: s,
40
- children: /* @__PURE__ */ o(h, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: r })
41
- }
42
- )
43
- ] });
44
- }
45
- function C({
46
- className: e,
47
- ...t
48
- }) {
49
- return /* @__PURE__ */ d(
50
- "div",
51
- {
52
- "data-slot": "command-input-wrapper",
53
- className: "flex h-9 items-center gap-2 border-b px-3",
54
- children: [
55
- /* @__PURE__ */ o(i, { className: "size-4 shrink-0 opacity-50" }),
56
- /* @__PURE__ */ o(
57
- n.Input,
58
- {
59
- "data-slot": "command-input",
60
- className: a(
61
- "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
62
- e
63
- ),
64
- ...t
65
- }
66
- )
67
- ]
68
- }
69
- );
70
- }
71
- function N({
72
- className: e,
73
- ...t
74
- }) {
75
- return /* @__PURE__ */ o(
76
- n.List,
77
- {
78
- "data-slot": "command-list",
79
- className: a(
80
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
81
- e
82
- ),
83
- ...t
84
- }
85
- );
86
- }
87
- function b({
88
- ...e
89
- }) {
90
- return /* @__PURE__ */ o(
91
- n.Empty,
92
- {
93
- "data-slot": "command-empty",
94
- className: "py-6 text-center text-sm",
95
- ...e
96
- }
97
- );
98
- }
99
- function D({
100
- className: e,
101
- ...t
102
- }) {
103
- return /* @__PURE__ */ o(
104
- n.Group,
105
- {
106
- "data-slot": "command-group",
107
- className: a(
108
- "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
109
- e
110
- ),
111
- ...t
112
- }
113
- );
114
- }
115
- function I({
116
- className: e,
117
- ...t
118
- }) {
119
- return /* @__PURE__ */ o(
120
- n.Separator,
121
- {
122
- "data-slot": "command-separator",
123
- className: a("bg-border -mx-1 h-px", e),
124
- ...t
125
- }
126
- );
127
- }
128
- function S({
129
- className: e,
130
- ...t
131
- }) {
132
- return /* @__PURE__ */ o(
133
- n.Item,
134
- {
135
- "data-slot": "command-item",
136
- className: a(
137
- "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
138
- e
139
- ),
140
- ...t
141
- }
142
- );
143
- }
144
- function z({
145
- className: e,
146
- ...t
147
- }) {
148
- return /* @__PURE__ */ o(
149
- "span",
150
- {
151
- "data-slot": "command-shortcut",
152
- className: a(
153
- "text-muted-foreground ml-auto text-xs tracking-widest",
154
- e
155
- ),
156
- ...t
157
- }
158
- );
159
- }
160
- export {
161
- h as Command,
162
- y as CommandDialog,
163
- b as CommandEmpty,
164
- D as CommandGroup,
165
- C as CommandInput,
166
- S as CommandItem,
167
- N as CommandList,
168
- I as CommandSeparator,
169
- z as CommandShortcut
170
- };
@@ -1,223 +0,0 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import * as o from "@radix-ui/react-context-menu";
3
- import { CheckIcon as d, CircleIcon as c, ChevronRightIcon as u } from "lucide-react";
4
- import { c as s } from "./utils-B7J70Nno.js";
5
- function x({
6
- ...t
7
- }) {
8
- return /* @__PURE__ */ e(o.Root, { "data-slot": "context-menu", ...t });
9
- }
10
- function p({
11
- ...t
12
- }) {
13
- return /* @__PURE__ */ e(o.Trigger, { "data-slot": "context-menu-trigger", ...t });
14
- }
15
- function g({
16
- ...t
17
- }) {
18
- return /* @__PURE__ */ e(o.Group, { "data-slot": "context-menu-group", ...t });
19
- }
20
- function v({
21
- ...t
22
- }) {
23
- return /* @__PURE__ */ e(o.Portal, { "data-slot": "context-menu-portal", ...t });
24
- }
25
- function b({
26
- ...t
27
- }) {
28
- return /* @__PURE__ */ e(o.Sub, { "data-slot": "context-menu-sub", ...t });
29
- }
30
- function h({
31
- ...t
32
- }) {
33
- return /* @__PURE__ */ e(
34
- o.RadioGroup,
35
- {
36
- "data-slot": "context-menu-radio-group",
37
- ...t
38
- }
39
- );
40
- }
41
- function C({
42
- className: t,
43
- inset: n,
44
- children: a,
45
- ...r
46
- }) {
47
- return /* @__PURE__ */ i(
48
- o.SubTrigger,
49
- {
50
- "data-slot": "context-menu-sub-trigger",
51
- "data-inset": n,
52
- className: s(
53
- "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
54
- t
55
- ),
56
- ...r,
57
- children: [
58
- a,
59
- /* @__PURE__ */ e(u, { className: "ml-auto" })
60
- ]
61
- }
62
- );
63
- }
64
- function z({
65
- className: t,
66
- ...n
67
- }) {
68
- return /* @__PURE__ */ e(
69
- o.SubContent,
70
- {
71
- "data-slot": "context-menu-sub-content",
72
- className: s(
73
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
74
- t
75
- ),
76
- ...n
77
- }
78
- );
79
- }
80
- function M({
81
- className: t,
82
- ...n
83
- }) {
84
- return /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */ e(
85
- o.Content,
86
- {
87
- "data-slot": "context-menu-content",
88
- className: s(
89
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
90
- t
91
- ),
92
- ...n
93
- }
94
- ) });
95
- }
96
- function N({
97
- className: t,
98
- inset: n,
99
- variant: a = "default",
100
- ...r
101
- }) {
102
- return /* @__PURE__ */ e(
103
- o.Item,
104
- {
105
- "data-slot": "context-menu-item",
106
- "data-inset": n,
107
- "data-variant": a,
108
- className: s(
109
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
110
- t
111
- ),
112
- ...r
113
- }
114
- );
115
- }
116
- function I({
117
- className: t,
118
- children: n,
119
- checked: a,
120
- ...r
121
- }) {
122
- return /* @__PURE__ */ i(
123
- o.CheckboxItem,
124
- {
125
- "data-slot": "context-menu-checkbox-item",
126
- className: s(
127
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
128
- t
129
- ),
130
- checked: a,
131
- ...r,
132
- children: [
133
- /* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(d, { className: "size-4" }) }) }),
134
- n
135
- ]
136
- }
137
- );
138
- }
139
- function _({
140
- className: t,
141
- children: n,
142
- ...a
143
- }) {
144
- return /* @__PURE__ */ i(
145
- o.RadioItem,
146
- {
147
- "data-slot": "context-menu-radio-item",
148
- className: s(
149
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
150
- t
151
- ),
152
- ...a,
153
- children: [
154
- /* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(c, { className: "size-2 fill-current" }) }) }),
155
- n
156
- ]
157
- }
158
- );
159
- }
160
- function y({
161
- className: t,
162
- inset: n,
163
- ...a
164
- }) {
165
- return /* @__PURE__ */ e(
166
- o.Label,
167
- {
168
- "data-slot": "context-menu-label",
169
- "data-inset": n,
170
- className: s(
171
- "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
172
- t
173
- ),
174
- ...a
175
- }
176
- );
177
- }
178
- function k({
179
- className: t,
180
- ...n
181
- }) {
182
- return /* @__PURE__ */ e(
183
- o.Separator,
184
- {
185
- "data-slot": "context-menu-separator",
186
- className: s("bg-border -mx-1 my-1 h-px", t),
187
- ...n
188
- }
189
- );
190
- }
191
- function S({
192
- className: t,
193
- ...n
194
- }) {
195
- return /* @__PURE__ */ e(
196
- "span",
197
- {
198
- "data-slot": "context-menu-shortcut",
199
- className: s(
200
- "text-muted-foreground ml-auto text-xs tracking-widest",
201
- t
202
- ),
203
- ...n
204
- }
205
- );
206
- }
207
- export {
208
- x as ContextMenu,
209
- I as ContextMenuCheckboxItem,
210
- M as ContextMenuContent,
211
- g as ContextMenuGroup,
212
- N as ContextMenuItem,
213
- y as ContextMenuLabel,
214
- v as ContextMenuPortal,
215
- h as ContextMenuRadioGroup,
216
- _ as ContextMenuRadioItem,
217
- k as ContextMenuSeparator,
218
- S as ContextMenuShortcut,
219
- b as ContextMenuSub,
220
- z as ContextMenuSubContent,
221
- C as ContextMenuSubTrigger,
222
- p as ContextMenuTrigger
223
- };
package/dist/dialog.mjs DELETED
@@ -1,136 +0,0 @@
1
- import { jsx as a, jsxs as i } from "react/jsx-runtime";
2
- import * as o from "@radix-ui/react-dialog";
3
- import { XIcon as r } from "lucide-react";
4
- import { c as n } from "./utils-B7J70Nno.js";
5
- function m({
6
- ...t
7
- }) {
8
- return /* @__PURE__ */ a(o.Root, { "data-slot": "dialog", ...t });
9
- }
10
- function p({
11
- ...t
12
- }) {
13
- return /* @__PURE__ */ a(o.Trigger, { "data-slot": "dialog-trigger", ...t });
14
- }
15
- function d({
16
- ...t
17
- }) {
18
- return /* @__PURE__ */ a(o.Portal, { "data-slot": "dialog-portal", ...t });
19
- }
20
- function x({
21
- ...t
22
- }) {
23
- return /* @__PURE__ */ a(o.Close, { "data-slot": "dialog-close", ...t });
24
- }
25
- function c({
26
- className: t,
27
- ...e
28
- }) {
29
- return /* @__PURE__ */ a(
30
- o.Overlay,
31
- {
32
- "data-slot": "dialog-overlay",
33
- className: n(
34
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
35
- t
36
- ),
37
- ...e
38
- }
39
- );
40
- }
41
- function v({
42
- className: t,
43
- children: e,
44
- showCloseButton: l = !0,
45
- ...s
46
- }) {
47
- return /* @__PURE__ */ i(d, { "data-slot": "dialog-portal", children: [
48
- /* @__PURE__ */ a(c, {}),
49
- /* @__PURE__ */ i(
50
- o.Content,
51
- {
52
- "data-slot": "dialog-content",
53
- className: n(
54
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
55
- t
56
- ),
57
- ...s,
58
- children: [
59
- e,
60
- l && /* @__PURE__ */ i(
61
- o.Close,
62
- {
63
- "data-slot": "dialog-close",
64
- 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",
65
- children: [
66
- /* @__PURE__ */ a(r, {}),
67
- /* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
68
- ]
69
- }
70
- )
71
- ]
72
- }
73
- )
74
- ] });
75
- }
76
- function D({ className: t, ...e }) {
77
- return /* @__PURE__ */ a(
78
- "div",
79
- {
80
- "data-slot": "dialog-header",
81
- className: n("flex flex-col gap-2 text-center sm:text-left", t),
82
- ...e
83
- }
84
- );
85
- }
86
- function b({ className: t, ...e }) {
87
- return /* @__PURE__ */ a(
88
- "div",
89
- {
90
- "data-slot": "dialog-footer",
91
- className: n(
92
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
93
- t
94
- ),
95
- ...e
96
- }
97
- );
98
- }
99
- function h({
100
- className: t,
101
- ...e
102
- }) {
103
- return /* @__PURE__ */ a(
104
- o.Title,
105
- {
106
- "data-slot": "dialog-title",
107
- className: n("text-lg leading-none font-semibold", t),
108
- ...e
109
- }
110
- );
111
- }
112
- function y({
113
- className: t,
114
- ...e
115
- }) {
116
- return /* @__PURE__ */ a(
117
- o.Description,
118
- {
119
- "data-slot": "dialog-description",
120
- className: n("text-muted-foreground text-sm", t),
121
- ...e
122
- }
123
- );
124
- }
125
- export {
126
- m as Dialog,
127
- x as DialogClose,
128
- v as DialogContent,
129
- y as DialogDescription,
130
- b as DialogFooter,
131
- D as DialogHeader,
132
- c as DialogOverlay,
133
- d as DialogPortal,
134
- h as DialogTitle,
135
- p as DialogTrigger
136
- };