@turingpaper/ui 0.0.1-test.2 → 0.0.1-test.4

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 (74) hide show
  1. package/dist/accordion.mjs +44 -83
  2. package/dist/alert-dialog.mjs +108 -175
  3. package/dist/avatar.mjs +40 -104
  4. package/dist/badge.mjs +10 -27
  5. package/dist/breadcrumb.mjs +82 -109
  6. package/dist/button.mjs +26 -38
  7. package/dist/card.mjs +62 -96
  8. package/dist/chart.mjs +208 -0
  9. package/dist/checkbox.mjs +25 -32
  10. package/dist/collapsible.mjs +5 -32
  11. package/dist/command.mjs +101 -165
  12. package/dist/components/accordion.d.ts +4 -5
  13. package/dist/components/alert-dialog.d.ts +19 -17
  14. package/dist/components/avatar.d.ts +4 -10
  15. package/dist/components/badge.d.ts +4 -4
  16. package/dist/components/breadcrumb.d.ts +16 -8
  17. package/dist/components/button.d.ts +5 -4
  18. package/dist/components/card.d.ts +7 -10
  19. package/dist/components/chart.d.ts +49 -0
  20. package/dist/components/checkbox.d.ts +1 -2
  21. package/dist/components/collapsible.d.ts +3 -4
  22. package/dist/components/command.d.ts +78 -16
  23. package/dist/components/dialog.d.ts +18 -16
  24. package/dist/components/drawer.d.ts +19 -10
  25. package/dist/components/dropdown-menu.d.ts +21 -27
  26. package/dist/components/hover-card.d.ts +3 -4
  27. package/dist/components/input-group.d.ts +1 -1
  28. package/dist/components/input-otp.d.ts +34 -0
  29. package/dist/components/input.d.ts +1 -1
  30. package/dist/components/label.d.ts +1 -2
  31. package/dist/components/pagination.d.ts +24 -13
  32. package/dist/components/popover.d.ts +4 -9
  33. package/dist/components/progress.d.ts +1 -2
  34. package/dist/components/radio-group.d.ts +2 -3
  35. package/dist/components/scroll-area.d.ts +2 -3
  36. package/dist/components/select.d.ts +11 -14
  37. package/dist/components/separator.d.ts +1 -2
  38. package/dist/components/sheet.d.ts +24 -13
  39. package/dist/components/skeleton.d.ts +1 -1
  40. package/dist/components/slider.d.ts +1 -2
  41. package/dist/components/switch.d.ts +1 -4
  42. package/dist/components/table.d.ts +8 -8
  43. package/dist/components/tabs.d.ts +5 -10
  44. package/dist/components/textarea.d.ts +1 -1
  45. package/dist/components/toggle-group.d.ts +2 -8
  46. package/dist/components/toggle.d.ts +1 -3
  47. package/dist/components/tooltip.d.ts +5 -6
  48. package/dist/dialog.mjs +91 -147
  49. package/dist/drawer.mjs +89 -118
  50. package/dist/dropdown-menu.mjs +141 -249
  51. package/dist/hover-card.mjs +20 -35
  52. package/dist/input-otp.mjs +48 -0
  53. package/dist/input.mjs +15 -13
  54. package/dist/label.mjs +17 -20
  55. package/dist/pagination.mjs +103 -126
  56. package/dist/popover.mjs +19 -76
  57. package/dist/progress.mjs +23 -28
  58. package/dist/provider.mjs +1 -1
  59. package/dist/radio-group.mjs +29 -42
  60. package/dist/scroll-area.mjs +36 -57
  61. package/dist/select.mjs +117 -182
  62. package/dist/separator.mjs +16 -18
  63. package/dist/sheet.mjs +99 -128
  64. package/dist/skeleton.mjs +8 -6
  65. package/dist/slider.mjs +21 -57
  66. package/dist/styles.css +1 -1
  67. package/dist/switch.mjs +25 -29
  68. package/dist/table.mjs +83 -110
  69. package/dist/tabs.mjs +42 -86
  70. package/dist/textarea.mjs +16 -16
  71. package/dist/toggle-group.mjs +32 -67
  72. package/dist/toggle.mjs +22 -28
  73. package/dist/tooltip.mjs +20 -52
  74. package/package.json +11 -1
package/dist/dialog.mjs CHANGED
@@ -1,156 +1,100 @@
1
- import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
- import { Dialog as e } from "radix-ui";
3
- import { cn as l } from "./utils.mjs";
4
- import { Button as d } from "./button.mjs";
5
- import { XIcon as s } from "lucide-react";
6
- function h({
7
- ...o
8
- }) {
9
- return /* @__PURE__ */ a(e.Root, { "data-slot": "dialog", ...o });
10
- }
11
- function D({
12
- ...o
13
- }) {
14
- return /* @__PURE__ */ a(e.Trigger, { "data-slot": "dialog-trigger", ...o });
15
- }
16
- function c({
17
- ...o
18
- }) {
19
- return /* @__PURE__ */ a(e.Portal, { "data-slot": "dialog-portal", ...o });
20
- }
21
- function v({
22
- ...o
23
- }) {
24
- return /* @__PURE__ */ a(e.Close, { "data-slot": "dialog-close", ...o });
25
- }
26
- function u({
27
- className: o,
28
- ...t
29
- }) {
30
- return /* @__PURE__ */ a(
31
- e.Overlay,
32
- {
33
- "data-slot": "dialog-overlay",
34
- className: l(
35
- "fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
36
- o
37
- ),
38
- ...t
39
- }
40
- );
41
- }
42
- function C({
43
- className: o,
44
- children: t,
45
- showCloseButton: n = !0,
46
- ...i
47
- }) {
48
- return /* @__PURE__ */ r(c, { children: [
49
- /* @__PURE__ */ a(u, {}),
50
- /* @__PURE__ */ r(
51
- e.Content,
52
- {
53
- "data-slot": "dialog-content",
54
- className: l(
55
- "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
56
- o
57
- ),
58
- ...i,
59
- children: [
60
- t,
61
- n && /* @__PURE__ */ a(e.Close, { "data-slot": "dialog-close", asChild: !0, children: /* @__PURE__ */ r(
62
- d,
63
- {
64
- variant: "ghost",
65
- className: "absolute top-4 right-4",
66
- size: "icon-sm",
67
- children: [
68
- /* @__PURE__ */ a(
69
- s,
70
- {}
71
- ),
72
- /* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
73
- ]
74
- }
75
- ) })
76
- ]
77
- }
78
- )
79
- ] });
80
- }
81
- function b({ className: o, ...t }) {
82
- return /* @__PURE__ */ a(
83
- "div",
84
- {
85
- "data-slot": "dialog-header",
86
- className: l("flex flex-col gap-2", o),
87
- ...t
88
- }
89
- );
90
- }
91
- function N({
92
- className: o,
93
- showCloseButton: t = !1,
94
- children: n,
95
- ...i
96
- }) {
97
- return /* @__PURE__ */ r(
98
- "div",
1
+ import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import * as e from "radix-ui";
4
+ import { X as c } from "lucide-react";
5
+ import { cn as i } from "./utils.mjs";
6
+ const b = e.Root, w = e.Trigger, m = e.Portal, h = e.Close, d = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
7
+ e.Overlay,
8
+ {
9
+ ref: s,
10
+ className: i(
11
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
12
+ a
13
+ ),
14
+ ...t
15
+ }
16
+ ));
17
+ d.displayName = e.Overlay.displayName;
18
+ const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */ n(m, { children: [
19
+ /* @__PURE__ */ o(d, {}),
20
+ /* @__PURE__ */ n(
21
+ e.Content,
99
22
  {
100
- "data-slot": "dialog-footer",
101
- className: l(
102
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
103
- o
23
+ ref: r,
24
+ className: i(
25
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
26
+ a
104
27
  ),
105
- ...i,
28
+ ...s,
106
29
  children: [
107
- n,
108
- t && /* @__PURE__ */ a(e.Close, { asChild: !0, children: /* @__PURE__ */ a(d, { variant: "outline", children: "Close" }) })
30
+ t,
31
+ /* @__PURE__ */ n(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
32
+ /* @__PURE__ */ o(c, { className: "h-4 w-4" }),
33
+ /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
34
+ ] })
109
35
  ]
110
36
  }
111
- );
112
- }
113
- function y({
114
- className: o,
37
+ )
38
+ ] }));
39
+ f.displayName = e.Content.displayName;
40
+ const p = ({
41
+ className: a,
115
42
  ...t
116
- }) {
117
- return /* @__PURE__ */ a(
118
- e.Title,
119
- {
120
- "data-slot": "dialog-title",
121
- className: l(
122
- "text-base leading-none font-medium",
123
- o
124
- ),
125
- ...t
126
- }
127
- );
128
- }
129
- function z({
130
- className: o,
43
+ }) => /* @__PURE__ */ o(
44
+ "div",
45
+ {
46
+ className: i(
47
+ "flex flex-col space-y-1.5 text-center sm:text-left",
48
+ a
49
+ ),
50
+ ...t
51
+ }
52
+ );
53
+ p.displayName = "DialogHeader";
54
+ const g = ({
55
+ className: a,
131
56
  ...t
132
- }) {
133
- return /* @__PURE__ */ a(
134
- e.Description,
135
- {
136
- "data-slot": "dialog-description",
137
- className: l(
138
- "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
139
- o
140
- ),
141
- ...t
142
- }
143
- );
144
- }
57
+ }) => /* @__PURE__ */ o(
58
+ "div",
59
+ {
60
+ className: i(
61
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
62
+ a
63
+ ),
64
+ ...t
65
+ }
66
+ );
67
+ g.displayName = "DialogFooter";
68
+ const u = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
69
+ e.Title,
70
+ {
71
+ ref: s,
72
+ className: i(
73
+ "text-lg font-semibold leading-none tracking-tight",
74
+ a
75
+ ),
76
+ ...t
77
+ }
78
+ ));
79
+ u.displayName = e.Title.displayName;
80
+ const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
81
+ e.Description,
82
+ {
83
+ ref: s,
84
+ className: i("text-sm text-muted-foreground", a),
85
+ ...t
86
+ }
87
+ ));
88
+ y.displayName = e.Description.displayName;
145
89
  export {
146
- h as Dialog,
147
- v as DialogClose,
148
- C as DialogContent,
149
- z as DialogDescription,
150
- N as DialogFooter,
151
- b as DialogHeader,
152
- u as DialogOverlay,
153
- c as DialogPortal,
154
- y as DialogTitle,
155
- D as DialogTrigger
90
+ b as Dialog,
91
+ h as DialogClose,
92
+ f as DialogContent,
93
+ y as DialogDescription,
94
+ g as DialogFooter,
95
+ p as DialogHeader,
96
+ d as DialogOverlay,
97
+ m as DialogPortal,
98
+ u as DialogTitle,
99
+ w as DialogTrigger
156
100
  };
package/dist/drawer.mjs CHANGED
@@ -1,127 +1,98 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import * as l from "react";
2
3
  import { Drawer as a } from "vaul";
3
- import { cn as o } from "./utils.mjs";
4
- function w({
4
+ import { cn as s } from "./utils.mjs";
5
+ const n = ({
6
+ shouldScaleBackground: e = !0,
5
7
  ...r
6
- }) {
7
- return /* @__PURE__ */ e(a.Root, { "data-slot": "drawer", ...r });
8
- }
9
- function f({
10
- ...r
11
- }) {
12
- return /* @__PURE__ */ e(a.Trigger, { "data-slot": "drawer-trigger", ...r });
13
- }
14
- function i({
15
- ...r
16
- }) {
17
- return /* @__PURE__ */ e(a.Portal, { "data-slot": "drawer-portal", ...r });
18
- }
19
- function m({
20
- ...r
21
- }) {
22
- return /* @__PURE__ */ e(a.Close, { "data-slot": "drawer-close", ...r });
23
- }
24
- function l({
25
- className: r,
26
- ...t
27
- }) {
28
- return /* @__PURE__ */ e(
29
- a.Overlay,
8
+ }) => /* @__PURE__ */ t(
9
+ a.Root,
10
+ {
11
+ shouldScaleBackground: e,
12
+ ...r
13
+ }
14
+ );
15
+ n.displayName = "Drawer";
16
+ const u = a.Trigger, c = a.Portal, b = a.Close, d = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
17
+ a.Overlay,
18
+ {
19
+ ref: o,
20
+ className: s("fixed inset-0 z-50 bg-black/80", e),
21
+ ...r
22
+ }
23
+ ));
24
+ d.displayName = a.Overlay.displayName;
25
+ const p = l.forwardRef(({ className: e, children: r, ...o }, m) => /* @__PURE__ */ i(c, { children: [
26
+ /* @__PURE__ */ t(d, {}),
27
+ /* @__PURE__ */ i(
28
+ a.Content,
30
29
  {
31
- "data-slot": "drawer-overlay",
32
- className: o(
33
- "fixed inset-0 z-50 bg-black/80 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
34
- r
30
+ ref: m,
31
+ className: s(
32
+ "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
33
+ e
35
34
  ),
36
- ...t
37
- }
38
- );
39
- }
40
- function p({
41
- className: r,
42
- children: t,
43
- ...n
44
- }) {
45
- return /* @__PURE__ */ d(i, { "data-slot": "drawer-portal", children: [
46
- /* @__PURE__ */ e(l, {}),
47
- /* @__PURE__ */ d(
48
- a.Content,
49
- {
50
- "data-slot": "drawer-content",
51
- className: o(
52
- "group/drawer-content fixed z-50 flex h-auto flex-col bg-transparent p-4 text-sm text-popover-foreground before:absolute before:inset-2 before:-z-10 before:rounded-4xl before:border before:border-border before:bg-popover data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
53
- r
54
- ),
55
- ...n,
56
- children: [
57
- /* @__PURE__ */ e("div", { className: "mx-auto mt-4 hidden h-1.5 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
58
- t
59
- ]
60
- }
61
- )
62
- ] });
63
- }
64
- function x({ className: r, ...t }) {
65
- return /* @__PURE__ */ e(
66
- "div",
67
- {
68
- "data-slot": "drawer-header",
69
- className: o(
70
- "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
35
+ ...o,
36
+ children: [
37
+ /* @__PURE__ */ t("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
71
38
  r
72
- ),
73
- ...t
74
- }
75
- );
76
- }
77
- function b({ className: r, ...t }) {
78
- return /* @__PURE__ */ e(
79
- "div",
80
- {
81
- "data-slot": "drawer-footer",
82
- className: o("mt-auto flex flex-col gap-2 p-4", r),
83
- ...t
39
+ ]
84
40
  }
85
- );
86
- }
87
- function v({
88
- className: r,
89
- ...t
90
- }) {
91
- return /* @__PURE__ */ e(
92
- a.Title,
93
- {
94
- "data-slot": "drawer-title",
95
- className: o(
96
- "text-base font-medium text-foreground",
97
- r
98
- ),
99
- ...t
100
- }
101
- );
102
- }
103
- function g({
104
- className: r,
105
- ...t
106
- }) {
107
- return /* @__PURE__ */ e(
108
- a.Description,
109
- {
110
- "data-slot": "drawer-description",
111
- className: o("text-sm text-muted-foreground", r),
112
- ...t
113
- }
114
- );
115
- }
41
+ )
42
+ ] }));
43
+ p.displayName = "DrawerContent";
44
+ const f = ({
45
+ className: e,
46
+ ...r
47
+ }) => /* @__PURE__ */ t(
48
+ "div",
49
+ {
50
+ className: s("grid gap-1.5 p-4 text-center sm:text-left", e),
51
+ ...r
52
+ }
53
+ );
54
+ f.displayName = "DrawerHeader";
55
+ const w = ({
56
+ className: e,
57
+ ...r
58
+ }) => /* @__PURE__ */ t(
59
+ "div",
60
+ {
61
+ className: s("mt-auto flex flex-col gap-2 p-4", e),
62
+ ...r
63
+ }
64
+ );
65
+ w.displayName = "DrawerFooter";
66
+ const D = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
67
+ a.Title,
68
+ {
69
+ ref: o,
70
+ className: s(
71
+ "text-lg font-semibold leading-none tracking-tight",
72
+ e
73
+ ),
74
+ ...r
75
+ }
76
+ ));
77
+ D.displayName = a.Title.displayName;
78
+ const x = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
79
+ a.Description,
80
+ {
81
+ ref: o,
82
+ className: s("text-sm text-muted-foreground", e),
83
+ ...r
84
+ }
85
+ ));
86
+ x.displayName = a.Description.displayName;
116
87
  export {
117
- w as Drawer,
118
- m as DrawerClose,
88
+ n as Drawer,
89
+ b as DrawerClose,
119
90
  p as DrawerContent,
120
- g as DrawerDescription,
121
- b as DrawerFooter,
122
- x as DrawerHeader,
123
- l as DrawerOverlay,
124
- i as DrawerPortal,
125
- v as DrawerTitle,
126
- f as DrawerTrigger
91
+ x as DrawerDescription,
92
+ w as DrawerFooter,
93
+ f as DrawerHeader,
94
+ d as DrawerOverlay,
95
+ c as DrawerPortal,
96
+ D as DrawerTitle,
97
+ u as DrawerTrigger
127
98
  };