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

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 +62 -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
@@ -1,128 +1,105 @@
1
- import { jsx as i, jsxs as o } from "react/jsx-runtime";
2
- import { cn as t } from "./utils.mjs";
3
- import { Button as l } from "./button.mjs";
4
- import { MoreHorizontalIcon as c, ChevronRightIcon as u, ChevronLeftIcon as d } from "lucide-react";
5
- function h({ className: a, ...n }) {
6
- return /* @__PURE__ */ i(
7
- "nav",
8
- {
9
- role: "navigation",
10
- "aria-label": "pagination",
11
- "data-slot": "pagination",
12
- className: t("mx-auto flex w-full justify-center", a),
13
- ...n
14
- }
15
- );
16
- }
17
- function N({
18
- className: a,
19
- ...n
20
- }) {
21
- return /* @__PURE__ */ i(
22
- "ul",
23
- {
24
- "data-slot": "pagination-content",
25
- className: t("flex items-center gap-1", a),
26
- ...n
27
- }
28
- );
29
- }
30
- function x({ ...a }) {
31
- return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...a });
32
- }
33
- function r({
34
- className: a,
35
- isActive: n,
36
- size: e = "icon",
37
- ...s
38
- }) {
39
- return /* @__PURE__ */ i(
40
- l,
41
- {
42
- asChild: !0,
43
- variant: n ? "outline" : "ghost",
44
- size: e,
45
- className: t(a),
46
- children: /* @__PURE__ */ i(
47
- "a",
48
- {
49
- "aria-current": n ? "page" : void 0,
50
- "data-slot": "pagination-link",
51
- "data-active": n,
52
- ...s
53
- }
54
- )
55
- }
56
- );
57
- }
58
- function v({
59
- className: a,
60
- text: n = "Previous",
61
- ...e
62
- }) {
63
- return /* @__PURE__ */ o(
64
- r,
65
- {
66
- "aria-label": "Go to previous page",
67
- size: "default",
68
- className: t("pl-2!", a),
69
- ...e,
70
- children: [
71
- /* @__PURE__ */ i(d, { "data-icon": "inline-start" }),
72
- /* @__PURE__ */ i("span", { className: "hidden sm:block", children: n })
73
- ]
74
- }
75
- );
76
- }
77
- function P({
78
- className: a,
79
- text: n = "Next",
80
- ...e
81
- }) {
82
- return /* @__PURE__ */ o(
83
- r,
84
- {
85
- "aria-label": "Go to next page",
86
- size: "default",
87
- className: t("pr-2!", a),
88
- ...e,
89
- children: [
90
- /* @__PURE__ */ i("span", { className: "hidden sm:block", children: n }),
91
- /* @__PURE__ */ i(u, { "data-icon": "inline-end" })
92
- ]
93
- }
94
- );
95
- }
96
- function z({
97
- className: a,
98
- ...n
99
- }) {
100
- return /* @__PURE__ */ o(
101
- "span",
102
- {
103
- "aria-hidden": !0,
104
- "data-slot": "pagination-ellipsis",
105
- className: t(
106
- "flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
107
- a
108
- ),
109
- ...n,
110
- children: [
111
- /* @__PURE__ */ i(
112
- c,
113
- {}
114
- ),
115
- /* @__PURE__ */ i("span", { className: "sr-only", children: "More pages" })
116
- ]
117
- }
118
- );
119
- }
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { MoreHorizontal as m, ChevronRight as c, ChevronLeft as p } from "lucide-react";
4
+ import { cn as n } from "./utils.mjs";
5
+ import { buttonVariants as g } from "./button.mjs";
6
+ const N = ({ className: i, ...a }) => /* @__PURE__ */ e(
7
+ "nav",
8
+ {
9
+ role: "navigation",
10
+ "aria-label": "pagination",
11
+ className: n("mx-auto flex w-full justify-center", i),
12
+ ...a
13
+ }
14
+ );
15
+ N.displayName = "Pagination";
16
+ const d = l.forwardRef(({ className: i, ...a }, t) => /* @__PURE__ */ e(
17
+ "ul",
18
+ {
19
+ ref: t,
20
+ className: n("flex flex-row items-center gap-1", i),
21
+ ...a
22
+ }
23
+ ));
24
+ d.displayName = "PaginationContent";
25
+ const f = l.forwardRef(({ className: i, ...a }, t) => /* @__PURE__ */ e("li", { ref: t, className: n("", i), ...a }));
26
+ f.displayName = "PaginationItem";
27
+ const s = ({
28
+ className: i,
29
+ isActive: a,
30
+ size: t = "icon",
31
+ ...r
32
+ }) => /* @__PURE__ */ e(
33
+ "a",
34
+ {
35
+ "aria-current": a ? "page" : void 0,
36
+ className: n(
37
+ g({
38
+ variant: a ? "outline" : "ghost",
39
+ size: t
40
+ }),
41
+ i
42
+ ),
43
+ ...r
44
+ }
45
+ );
46
+ s.displayName = "PaginationLink";
47
+ const P = ({
48
+ className: i,
49
+ ...a
50
+ }) => /* @__PURE__ */ o(
51
+ s,
52
+ {
53
+ "aria-label": "Go to previous page",
54
+ size: "default",
55
+ className: n("gap-1 pl-2.5", i),
56
+ ...a,
57
+ children: [
58
+ /* @__PURE__ */ e(p, { className: "h-4 w-4" }),
59
+ /* @__PURE__ */ e("span", { children: "Previous" })
60
+ ]
61
+ }
62
+ );
63
+ P.displayName = "PaginationPrevious";
64
+ const h = ({
65
+ className: i,
66
+ ...a
67
+ }) => /* @__PURE__ */ o(
68
+ s,
69
+ {
70
+ "aria-label": "Go to next page",
71
+ size: "default",
72
+ className: n("gap-1 pr-2.5", i),
73
+ ...a,
74
+ children: [
75
+ /* @__PURE__ */ e("span", { children: "Next" }),
76
+ /* @__PURE__ */ e(c, { className: "h-4 w-4" })
77
+ ]
78
+ }
79
+ );
80
+ h.displayName = "PaginationNext";
81
+ const u = ({
82
+ className: i,
83
+ ...a
84
+ }) => /* @__PURE__ */ o(
85
+ "span",
86
+ {
87
+ "aria-hidden": !0,
88
+ className: n("flex h-9 w-9 items-center justify-center", i),
89
+ ...a,
90
+ children: [
91
+ /* @__PURE__ */ e(m, { className: "h-4 w-4" }),
92
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "More pages" })
93
+ ]
94
+ }
95
+ );
96
+ u.displayName = "PaginationEllipsis";
120
97
  export {
121
- h as Pagination,
122
- N as PaginationContent,
123
- z as PaginationEllipsis,
124
- x as PaginationItem,
125
- r as PaginationLink,
126
- P as PaginationNext,
127
- v as PaginationPrevious
98
+ N as Pagination,
99
+ d as PaginationContent,
100
+ u as PaginationEllipsis,
101
+ f as PaginationItem,
102
+ s as PaginationLink,
103
+ h as PaginationNext,
104
+ P as PaginationPrevious
128
105
  };
package/dist/popover.mjs CHANGED
@@ -1,80 +1,23 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { Popover as r } from "radix-ui";
3
- import { cn as n } from "./utils.mjs";
4
- function l({
5
- ...o
6
- }) {
7
- return /* @__PURE__ */ t(r.Root, { "data-slot": "popover", ...o });
8
- }
9
- function f({
10
- ...o
11
- }) {
12
- return /* @__PURE__ */ t(r.Trigger, { "data-slot": "popover-trigger", ...o });
13
- }
14
- function c({
15
- className: o,
16
- align: e = "center",
17
- sideOffset: a = 4,
18
- ...i
19
- }) {
20
- return /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ t(
21
- r.Content,
22
- {
23
- "data-slot": "popover-content",
24
- align: e,
25
- sideOffset: a,
26
- className: n(
27
- "z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-4 rounded-2xl bg-popover p-4 text-sm text-popover-foreground shadow-2xl ring-1 ring-foreground/5 outline-hidden duration-100 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 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",
28
- o
29
- ),
30
- ...i
31
- }
32
- ) });
33
- }
34
- function m({
35
- ...o
36
- }) {
37
- return /* @__PURE__ */ t(r.Anchor, { "data-slot": "popover-anchor", ...o });
38
- }
39
- function u({ className: o, ...e }) {
40
- return /* @__PURE__ */ t(
41
- "div",
42
- {
43
- "data-slot": "popover-header",
44
- className: n("flex flex-col gap-1 text-sm", o),
45
- ...e
46
- }
47
- );
48
- }
49
- function v({ className: o, ...e }) {
50
- return /* @__PURE__ */ t(
51
- "div",
52
- {
53
- "data-slot": "popover-title",
54
- className: n("text-base font-medium", o),
55
- ...e
56
- }
57
- );
58
- }
59
- function g({
60
- className: o,
61
- ...e
62
- }) {
63
- return /* @__PURE__ */ t(
64
- "p",
65
- {
66
- "data-slot": "popover-description",
67
- className: n("text-muted-foreground", o),
68
- ...e
69
- }
70
- );
71
- }
2
+ import * as n from "react";
3
+ import * as o from "radix-ui";
4
+ import { cn as s } from "./utils.mjs";
5
+ const l = o.Root, c = o.Trigger, m = n.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...i }, d) => /* @__PURE__ */ t(o.Portal, { children: /* @__PURE__ */ t(
6
+ o.Content,
7
+ {
8
+ ref: d,
9
+ align: a,
10
+ sideOffset: r,
11
+ className: s(
12
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",
13
+ e
14
+ ),
15
+ ...i
16
+ }
17
+ ) }));
18
+ m.displayName = o.Content.displayName;
72
19
  export {
73
20
  l as Popover,
74
- m as PopoverAnchor,
75
- c as PopoverContent,
76
- g as PopoverDescription,
77
- u as PopoverHeader,
78
- v as PopoverTitle,
79
- f as PopoverTrigger
21
+ m as PopoverContent,
22
+ c as PopoverTrigger
80
23
  };
package/dist/progress.mjs CHANGED
@@ -1,31 +1,26 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { Progress as e } from "radix-ui";
3
- import { cn as a } from "./utils.mjs";
4
- function m({
5
- className: o,
6
- value: s,
7
- ...t
8
- }) {
9
- return /* @__PURE__ */ r(
10
- e.Root,
11
- {
12
- "data-slot": "progress",
13
- className: a(
14
- "relative flex h-3 w-full items-center overflow-x-hidden rounded-4xl bg-muted",
15
- o
16
- ),
17
- ...t,
18
- children: /* @__PURE__ */ r(
19
- e.Indicator,
20
- {
21
- "data-slot": "progress-indicator",
22
- className: "size-full flex-1 bg-primary transition-all",
23
- style: { transform: `translateX(-${100 - (s || 0)}%)` }
24
- }
25
- )
26
- }
27
- );
28
- }
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import * as r from "radix-ui";
4
+ import { cn as i } from "./utils.mjs";
5
+ const m = s.forwardRef(({ className: a, value: e, ...l }, t) => /* @__PURE__ */ o(
6
+ r.Root,
7
+ {
8
+ ref: t,
9
+ className: i(
10
+ "relative h-4 w-full overflow-hidden rounded-full bg-secondary",
11
+ a
12
+ ),
13
+ ...l,
14
+ children: /* @__PURE__ */ o(
15
+ r.Indicator,
16
+ {
17
+ className: "h-full w-full flex-1 bg-primary transition-all",
18
+ style: { transform: `translateX(-${100 - (e || 0)}%)` }
19
+ }
20
+ )
21
+ }
22
+ ));
23
+ m.displayName = r.Root.displayName;
29
24
  export {
30
25
  m as Progress
31
26
  };