@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,102 +0,0 @@
1
- import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
- import { Slot as o } from "@radix-ui/react-slot";
3
- import { ChevronRight as i, MoreHorizontal as l } from "lucide-react";
4
- import { c as t } from "./utils-B7J70Nno.js";
5
- function p({ ...r }) {
6
- return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...r });
7
- }
8
- function f({ className: r, ...e }) {
9
- return /* @__PURE__ */ a(
10
- "ol",
11
- {
12
- "data-slot": "breadcrumb-list",
13
- className: t(
14
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
15
- r
16
- ),
17
- ...e
18
- }
19
- );
20
- }
21
- function g({ className: r, ...e }) {
22
- return /* @__PURE__ */ a(
23
- "li",
24
- {
25
- "data-slot": "breadcrumb-item",
26
- className: t("inline-flex items-center gap-1.5", r),
27
- ...e
28
- }
29
- );
30
- }
31
- function x({
32
- asChild: r,
33
- className: e,
34
- ...n
35
- }) {
36
- return /* @__PURE__ */ a(
37
- r ? o : "a",
38
- {
39
- "data-slot": "breadcrumb-link",
40
- className: t("hover:text-foreground transition-colors", e),
41
- ...n
42
- }
43
- );
44
- }
45
- function h({ className: r, ...e }) {
46
- return /* @__PURE__ */ a(
47
- "span",
48
- {
49
- "data-slot": "breadcrumb-page",
50
- role: "link",
51
- "aria-disabled": "true",
52
- "aria-current": "page",
53
- className: t("text-foreground font-normal", r),
54
- ...e
55
- }
56
- );
57
- }
58
- function N({
59
- children: r,
60
- className: e,
61
- ...n
62
- }) {
63
- return /* @__PURE__ */ a(
64
- "li",
65
- {
66
- "data-slot": "breadcrumb-separator",
67
- role: "presentation",
68
- "aria-hidden": "true",
69
- className: t("[&>svg]:size-3.5", e),
70
- ...n,
71
- children: r ?? /* @__PURE__ */ a(i, {})
72
- }
73
- );
74
- }
75
- function B({
76
- className: r,
77
- ...e
78
- }) {
79
- return /* @__PURE__ */ s(
80
- "span",
81
- {
82
- "data-slot": "breadcrumb-ellipsis",
83
- role: "presentation",
84
- "aria-hidden": "true",
85
- className: t("flex size-9 items-center justify-center", r),
86
- ...e,
87
- children: [
88
- /* @__PURE__ */ a(l, { className: "size-4" }),
89
- /* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
90
- ]
91
- }
92
- );
93
- }
94
- export {
95
- p as Breadcrumb,
96
- B as BreadcrumbEllipsis,
97
- g as BreadcrumbItem,
98
- x as BreadcrumbLink,
99
- f as BreadcrumbList,
100
- h as BreadcrumbPage,
101
- N as BreadcrumbSeparator
102
- };
package/dist/calendar.mjs DELETED
@@ -1,173 +0,0 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import { ChevronLeftIcon as b, ChevronRightIcon as w, ChevronDownIcon as _ } from "lucide-react";
4
- import { getDefaultClassNames as p, DayPicker as h } from "react-day-picker";
5
- import { c as e } from "./utils-B7J70Nno.js";
6
- import { buttonVariants as f, Button as y } from "./button.mjs";
7
- function j({
8
- className: i,
9
- classNames: g,
10
- showOutsideDays: r = !0,
11
- captionLayout: s = "label",
12
- buttonVariant: l = "ghost",
13
- formatters: u,
14
- components: c,
15
- ...x
16
- }) {
17
- const t = p();
18
- return /* @__PURE__ */ n(
19
- h,
20
- {
21
- showOutsideDays: r,
22
- className: e(
23
- "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
24
- String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
25
- String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
26
- i
27
- ),
28
- captionLayout: s,
29
- formatters: {
30
- formatMonthDropdown: (a) => a.toLocaleString("default", { month: "short" }),
31
- ...u
32
- },
33
- classNames: {
34
- root: e("w-fit", t.root),
35
- months: e(
36
- "flex gap-4 flex-col md:flex-row relative",
37
- t.months
38
- ),
39
- month: e("flex flex-col w-full gap-4", t.month),
40
- nav: e(
41
- "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
42
- t.nav
43
- ),
44
- button_previous: e(
45
- f({ variant: l }),
46
- "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
47
- t.button_previous
48
- ),
49
- button_next: e(
50
- f({ variant: l }),
51
- "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
52
- t.button_next
53
- ),
54
- month_caption: e(
55
- "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
56
- t.month_caption
57
- ),
58
- dropdowns: e(
59
- "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
60
- t.dropdowns
61
- ),
62
- dropdown_root: e(
63
- "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
64
- t.dropdown_root
65
- ),
66
- dropdown: e(
67
- "absolute bg-popover inset-0 opacity-0",
68
- t.dropdown
69
- ),
70
- caption_label: e(
71
- "select-none font-medium",
72
- s === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
73
- t.caption_label
74
- ),
75
- table: "w-full border-collapse",
76
- weekdays: e("flex", t.weekdays),
77
- weekday: e(
78
- "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
79
- t.weekday
80
- ),
81
- week: e("flex w-full mt-2", t.week),
82
- week_number_header: e(
83
- "select-none w-(--cell-size)",
84
- t.week_number_header
85
- ),
86
- week_number: e(
87
- "text-[0.8rem] select-none text-muted-foreground",
88
- t.week_number
89
- ),
90
- day: e(
91
- "relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
92
- t.day
93
- ),
94
- range_start: e(
95
- "rounded-l-md bg-accent",
96
- t.range_start
97
- ),
98
- range_middle: e("rounded-none", t.range_middle),
99
- range_end: e("rounded-r-md bg-accent", t.range_end),
100
- today: e(
101
- "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
102
- t.today
103
- ),
104
- outside: e(
105
- "text-muted-foreground aria-selected:text-muted-foreground",
106
- t.outside
107
- ),
108
- disabled: e(
109
- "text-muted-foreground opacity-50",
110
- t.disabled
111
- ),
112
- hidden: e("invisible", t.hidden),
113
- ...g
114
- },
115
- components: {
116
- Root: ({ className: a, rootRef: d, ...o }) => /* @__PURE__ */ n(
117
- "div",
118
- {
119
- "data-slot": "calendar",
120
- ref: d,
121
- className: e(a),
122
- ...o
123
- }
124
- ),
125
- Chevron: ({ className: a, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ n(b, { className: e("size-4", a), ...o }) : d === "right" ? /* @__PURE__ */ n(
126
- w,
127
- {
128
- className: e("size-4", a),
129
- ...o
130
- }
131
- ) : /* @__PURE__ */ n(_, { className: e("size-4", a), ...o }),
132
- DayButton: v,
133
- WeekNumber: ({ children: a, ...d }) => /* @__PURE__ */ n("td", { ...d, children: /* @__PURE__ */ n("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: a }) }),
134
- ...c
135
- },
136
- ...x
137
- }
138
- );
139
- }
140
- function v({
141
- className: i,
142
- day: g,
143
- modifiers: r,
144
- ...s
145
- }) {
146
- const l = p(), u = m.useRef(null);
147
- return m.useEffect(() => {
148
- var c;
149
- r.focused && ((c = u.current) == null || c.focus());
150
- }, [r.focused]), /* @__PURE__ */ n(
151
- y,
152
- {
153
- ref: u,
154
- variant: "ghost",
155
- size: "icon",
156
- "data-day": g.date.toLocaleDateString(),
157
- "data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
158
- "data-range-start": r.range_start,
159
- "data-range-end": r.range_end,
160
- "data-range-middle": r.range_middle,
161
- className: e(
162
- "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
163
- l.day,
164
- i
165
- ),
166
- ...s
167
- }
168
- );
169
- }
170
- export {
171
- j as Calendar,
172
- v as CalendarDayButton
173
- };
package/dist/card.mjs DELETED
@@ -1,90 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { c as o } from "./utils-B7J70Nno.js";
3
- function n({ className: t, ...a }) {
4
- return /* @__PURE__ */ r(
5
- "div",
6
- {
7
- "data-slot": "card",
8
- className: o(
9
- "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
10
- t
11
- ),
12
- ...a
13
- }
14
- );
15
- }
16
- function s({ className: t, ...a }) {
17
- return /* @__PURE__ */ r(
18
- "div",
19
- {
20
- "data-slot": "card-header",
21
- className: o(
22
- "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
23
- t
24
- ),
25
- ...a
26
- }
27
- );
28
- }
29
- function c({ className: t, ...a }) {
30
- return /* @__PURE__ */ r(
31
- "div",
32
- {
33
- "data-slot": "card-title",
34
- className: o("leading-none font-semibold", t),
35
- ...a
36
- }
37
- );
38
- }
39
- function i({ className: t, ...a }) {
40
- return /* @__PURE__ */ r(
41
- "div",
42
- {
43
- "data-slot": "card-description",
44
- className: o("text-muted-foreground text-sm", t),
45
- ...a
46
- }
47
- );
48
- }
49
- function l({ className: t, ...a }) {
50
- return /* @__PURE__ */ r(
51
- "div",
52
- {
53
- "data-slot": "card-action",
54
- className: o(
55
- "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
56
- t
57
- ),
58
- ...a
59
- }
60
- );
61
- }
62
- function u({ className: t, ...a }) {
63
- return /* @__PURE__ */ r(
64
- "div",
65
- {
66
- "data-slot": "card-content",
67
- className: o("px-6", t),
68
- ...a
69
- }
70
- );
71
- }
72
- function f({ className: t, ...a }) {
73
- return /* @__PURE__ */ r(
74
- "div",
75
- {
76
- "data-slot": "card-footer",
77
- className: o("flex items-center px-6 [.border-t]:pt-6", t),
78
- ...a
79
- }
80
- );
81
- }
82
- export {
83
- n as Card,
84
- l as CardAction,
85
- u as CardContent,
86
- i as CardDescription,
87
- f as CardFooter,
88
- s as CardHeader,
89
- c as CardTitle
90
- };
package/dist/carousel.mjs DELETED
@@ -1,177 +0,0 @@
1
- import { jsx as n, jsxs as h } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import z from "embla-carousel-react";
4
- import { ArrowLeft as g, ArrowRight as p } from "lucide-react";
5
- import { c as d } from "./utils-B7J70Nno.js";
6
- import { Button as v } from "./button.mjs";
7
- const N = l.createContext(null);
8
- function m() {
9
- const o = l.useContext(N);
10
- if (!o)
11
- throw new Error("useCarousel must be used within a <Carousel />");
12
- return o;
13
- }
14
- function I({
15
- orientation: o = "horizontal",
16
- opts: r,
17
- setApi: t,
18
- plugins: s,
19
- className: c,
20
- children: i,
21
- ...u
22
- }) {
23
- const [b, e] = z(
24
- {
25
- ...r,
26
- axis: o === "horizontal" ? "x" : "y"
27
- },
28
- s
29
- ), [w, S] = l.useState(!1), [y, P] = l.useState(!1), f = l.useCallback((a) => {
30
- a && (S(a.canScrollPrev()), P(a.canScrollNext()));
31
- }, []), x = l.useCallback(() => {
32
- e == null || e.scrollPrev();
33
- }, [e]), C = l.useCallback(() => {
34
- e == null || e.scrollNext();
35
- }, [e]), k = l.useCallback(
36
- (a) => {
37
- a.key === "ArrowLeft" ? (a.preventDefault(), x()) : a.key === "ArrowRight" && (a.preventDefault(), C());
38
- },
39
- [x, C]
40
- );
41
- return l.useEffect(() => {
42
- !e || !t || t(e);
43
- }, [e, t]), l.useEffect(() => {
44
- if (e)
45
- return f(e), e.on("reInit", f), e.on("select", f), () => {
46
- e == null || e.off("select", f);
47
- };
48
- }, [e, f]), /* @__PURE__ */ n(
49
- N.Provider,
50
- {
51
- value: {
52
- carouselRef: b,
53
- api: e,
54
- opts: r,
55
- orientation: o || ((r == null ? void 0 : r.axis) === "y" ? "vertical" : "horizontal"),
56
- scrollPrev: x,
57
- scrollNext: C,
58
- canScrollPrev: w,
59
- canScrollNext: y
60
- },
61
- children: /* @__PURE__ */ n(
62
- "div",
63
- {
64
- onKeyDownCapture: k,
65
- className: d("relative", c),
66
- role: "region",
67
- "aria-roledescription": "carousel",
68
- "data-slot": "carousel",
69
- ...u,
70
- children: i
71
- }
72
- )
73
- }
74
- );
75
- }
76
- function K({ className: o, ...r }) {
77
- const { carouselRef: t, orientation: s } = m();
78
- return /* @__PURE__ */ n(
79
- "div",
80
- {
81
- ref: t,
82
- className: "overflow-hidden",
83
- "data-slot": "carousel-content",
84
- children: /* @__PURE__ */ n(
85
- "div",
86
- {
87
- className: d(
88
- "flex",
89
- s === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
90
- o
91
- ),
92
- ...r
93
- }
94
- )
95
- }
96
- );
97
- }
98
- function L({ className: o, ...r }) {
99
- const { orientation: t } = m();
100
- return /* @__PURE__ */ n(
101
- "div",
102
- {
103
- role: "group",
104
- "aria-roledescription": "slide",
105
- "data-slot": "carousel-item",
106
- className: d(
107
- "min-w-0 shrink-0 grow-0 basis-full",
108
- t === "horizontal" ? "pl-4" : "pt-4",
109
- o
110
- ),
111
- ...r
112
- }
113
- );
114
- }
115
- function B({
116
- className: o,
117
- variant: r = "outline",
118
- size: t = "icon",
119
- ...s
120
- }) {
121
- const { orientation: c, scrollPrev: i, canScrollPrev: u } = m();
122
- return /* @__PURE__ */ h(
123
- v,
124
- {
125
- "data-slot": "carousel-previous",
126
- variant: r,
127
- size: t,
128
- className: d(
129
- "absolute size-8 rounded-full",
130
- c === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
131
- o
132
- ),
133
- disabled: !u,
134
- onClick: i,
135
- ...s,
136
- children: [
137
- /* @__PURE__ */ n(g, {}),
138
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Previous slide" })
139
- ]
140
- }
141
- );
142
- }
143
- function q({
144
- className: o,
145
- variant: r = "outline",
146
- size: t = "icon",
147
- ...s
148
- }) {
149
- const { orientation: c, scrollNext: i, canScrollNext: u } = m();
150
- return /* @__PURE__ */ h(
151
- v,
152
- {
153
- "data-slot": "carousel-next",
154
- variant: r,
155
- size: t,
156
- className: d(
157
- "absolute size-8 rounded-full",
158
- c === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
159
- o
160
- ),
161
- disabled: !u,
162
- onClick: i,
163
- ...s,
164
- children: [
165
- /* @__PURE__ */ n(p, {}),
166
- /* @__PURE__ */ n("span", { className: "sr-only", children: "Next slide" })
167
- ]
168
- }
169
- );
170
- }
171
- export {
172
- I as Carousel,
173
- K as CarouselContent,
174
- L as CarouselItem,
175
- q as CarouselNext,
176
- B as CarouselPrevious
177
- };
@@ -1,34 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-collapsible";
3
- function i({
4
- ...l
5
- }) {
6
- return /* @__PURE__ */ o(t.Root, { "data-slot": "collapsible", ...l });
7
- }
8
- function r({
9
- ...l
10
- }) {
11
- return /* @__PURE__ */ o(
12
- t.CollapsibleTrigger,
13
- {
14
- "data-slot": "collapsible-trigger",
15
- ...l
16
- }
17
- );
18
- }
19
- function a({
20
- ...l
21
- }) {
22
- return /* @__PURE__ */ o(
23
- t.CollapsibleContent,
24
- {
25
- "data-slot": "collapsible-content",
26
- ...l
27
- }
28
- );
29
- }
30
- export {
31
- i as Collapsible,
32
- a as CollapsibleContent,
33
- r as CollapsibleTrigger
34
- };