@deankwan/ui 0.1.0

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 (95) hide show
  1. package/dist/app/components/ui/accordion.mjs +64 -0
  2. package/dist/app/components/ui/alert-dialog.mjs +146 -0
  3. package/dist/app/components/ui/alert.mjs +66 -0
  4. package/dist/app/components/ui/aspect-ratio.mjs +10 -0
  5. package/dist/app/components/ui/avatar.mjs +53 -0
  6. package/dist/app/components/ui/badge.mjs +39 -0
  7. package/dist/app/components/ui/breadcrumb.mjs +102 -0
  8. package/dist/app/components/ui/button.mjs +49 -0
  9. package/dist/app/components/ui/calendar.mjs +61 -0
  10. package/dist/app/components/ui/card.mjs +90 -0
  11. package/dist/app/components/ui/carousel.mjs +177 -0
  12. package/dist/app/components/ui/chart.mjs +215 -0
  13. package/dist/app/components/ui/checkbox.mjs +31 -0
  14. package/dist/app/components/ui/collapsible.mjs +34 -0
  15. package/dist/app/components/ui/command.mjs +161 -0
  16. package/dist/app/components/ui/context-menu.mjs +223 -0
  17. package/dist/app/components/ui/dialog.mjs +128 -0
  18. package/dist/app/components/ui/drawer.mjs +125 -0
  19. package/dist/app/components/ui/dropdown-menu.mjs +231 -0
  20. package/dist/app/components/ui/form.mjs +101 -0
  21. package/dist/app/components/ui/hover-card.mjs +38 -0
  22. package/dist/app/components/ui/input-otp.mjs +65 -0
  23. package/dist/app/components/ui/input.mjs +21 -0
  24. package/dist/app/components/ui/label.mjs +22 -0
  25. package/dist/app/components/ui/menubar.mjs +251 -0
  26. package/dist/app/components/ui/navigation-menu.mjs +170 -0
  27. package/dist/app/components/ui/pagination.mjs +118 -0
  28. package/dist/app/components/ui/popover.mjs +44 -0
  29. package/dist/app/components/ui/progress.mjs +31 -0
  30. package/dist/app/components/ui/radio-group.mjs +45 -0
  31. package/dist/app/components/ui/resizable.mjs +48 -0
  32. package/dist/app/components/ui/scroll-area.mjs +60 -0
  33. package/dist/app/components/ui/select.mjs +169 -0
  34. package/dist/app/components/ui/separator.mjs +26 -0
  35. package/dist/app/components/ui/sheet.mjs +126 -0
  36. package/dist/app/components/ui/sidebar.mjs +593 -0
  37. package/dist/app/components/ui/skeleton.mjs +15 -0
  38. package/dist/app/components/ui/slider.mjs +63 -0
  39. package/dist/app/components/ui/sonner.mjs +22 -0
  40. package/dist/app/components/ui/switch.mjs +31 -0
  41. package/dist/app/components/ui/table.mjs +114 -0
  42. package/dist/app/components/ui/tabs.mjs +67 -0
  43. package/dist/app/components/ui/textarea.mjs +18 -0
  44. package/dist/app/components/ui/toggle-group.mjs +62 -0
  45. package/dist/app/components/ui/toggle.mjs +43 -0
  46. package/dist/app/components/ui/tooltip.mjs +55 -0
  47. package/dist/app/components/ui/use-mobile.mjs +16 -0
  48. package/dist/app/components/ui/utils.mjs +8 -0
  49. package/dist/index.mjs +297 -0
  50. package/dist/src/app/components/ui/accordion.d.ts +7 -0
  51. package/dist/src/app/components/ui/alert-dialog.d.ts +14 -0
  52. package/dist/src/app/components/ui/alert.d.ts +9 -0
  53. package/dist/src/app/components/ui/avatar.d.ts +6 -0
  54. package/dist/src/app/components/ui/badge.d.ts +9 -0
  55. package/dist/src/app/components/ui/breadcrumb.d.ts +11 -0
  56. package/dist/src/app/components/ui/button.d.ts +10 -0
  57. package/dist/src/app/components/ui/calendar.d.ts +4 -0
  58. package/dist/src/app/components/ui/card.d.ts +9 -0
  59. package/dist/src/app/components/ui/carousel.d.ts +19 -0
  60. package/dist/src/app/components/ui/chart.d.ts +40 -0
  61. package/dist/src/app/components/ui/checkbox.d.ts +4 -0
  62. package/dist/src/app/components/ui/command.d.ts +16 -0
  63. package/dist/src/app/components/ui/context-menu.d.ts +25 -0
  64. package/dist/src/app/components/ui/dialog.d.ts +13 -0
  65. package/dist/src/app/components/ui/drawer.d.ts +13 -0
  66. package/dist/src/app/components/ui/dropdown-menu.d.ts +25 -0
  67. package/dist/src/app/components/ui/hover-card.d.ts +6 -0
  68. package/dist/src/app/components/ui/input-otp.d.ts +11 -0
  69. package/dist/src/app/components/ui/input.d.ts +3 -0
  70. package/dist/src/app/components/ui/label.d.ts +4 -0
  71. package/dist/src/app/components/ui/menubar.d.ts +26 -0
  72. package/dist/src/app/components/ui/navigation-menu.d.ts +14 -0
  73. package/dist/src/app/components/ui/pagination.d.ts +13 -0
  74. package/dist/src/app/components/ui/popover.d.ts +7 -0
  75. package/dist/src/app/components/ui/progress.d.ts +4 -0
  76. package/dist/src/app/components/ui/radio-group.d.ts +5 -0
  77. package/dist/src/app/components/ui/resizable.d.ts +8 -0
  78. package/dist/src/app/components/ui/scroll-area.d.ts +5 -0
  79. package/dist/src/app/components/ui/select.d.ts +15 -0
  80. package/dist/src/app/components/ui/separator.d.ts +4 -0
  81. package/dist/src/app/components/ui/sheet.d.ts +13 -0
  82. package/dist/src/app/components/ui/sidebar.d.ts +60 -0
  83. package/dist/src/app/components/ui/slider.d.ts +4 -0
  84. package/dist/src/app/components/ui/switch.d.ts +4 -0
  85. package/dist/src/app/components/ui/table.d.ts +10 -0
  86. package/dist/src/app/components/ui/tabs.d.ts +7 -0
  87. package/dist/src/app/components/ui/textarea.d.ts +3 -0
  88. package/dist/src/app/components/ui/toggle-group.d.ts +7 -0
  89. package/dist/src/app/components/ui/toggle.d.ts +9 -0
  90. package/dist/src/app/components/ui/tooltip.d.ts +7 -0
  91. package/dist/src/app/components/ui/use-mobile.d.ts +1 -0
  92. package/dist/src/app/components/ui/utils.d.ts +2 -0
  93. package/dist/src/index.d.ts +48 -0
  94. package/dist/style.css +1 -0
  95. package/package.json +166 -0
@@ -0,0 +1,31 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import * as t from "@radix-ui/react-switch";
3
+ import { cn as a } from "./utils.mjs";
4
+ function o({
5
+ className: r,
6
+ ...i
7
+ }) {
8
+ return /* @__PURE__ */ e(
9
+ t.Root,
10
+ {
11
+ "data-slot": "switch",
12
+ className: a(
13
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background 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 transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
14
+ r
15
+ ),
16
+ ...i,
17
+ children: /* @__PURE__ */ e(
18
+ t.Thumb,
19
+ {
20
+ "data-slot": "switch-thumb",
21
+ className: a(
22
+ "bg-card dark:data-[state=unchecked]:bg-card-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
+ )
24
+ }
25
+ )
26
+ }
27
+ );
28
+ }
29
+ export {
30
+ o as Switch
31
+ };
@@ -0,0 +1,114 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { cn as o } from "./utils.mjs";
3
+ function n({ className: t, ...e }) {
4
+ return /* @__PURE__ */ a(
5
+ "div",
6
+ {
7
+ "data-slot": "table-container",
8
+ className: "relative w-full overflow-x-auto",
9
+ children: /* @__PURE__ */ a(
10
+ "table",
11
+ {
12
+ "data-slot": "table",
13
+ className: o("w-full caption-bottom text-sm", t),
14
+ ...e
15
+ }
16
+ )
17
+ }
18
+ );
19
+ }
20
+ function s({ className: t, ...e }) {
21
+ return /* @__PURE__ */ a(
22
+ "thead",
23
+ {
24
+ "data-slot": "table-header",
25
+ className: o("[&_tr]:border-b", t),
26
+ ...e
27
+ }
28
+ );
29
+ }
30
+ function d({ className: t, ...e }) {
31
+ return /* @__PURE__ */ a(
32
+ "tbody",
33
+ {
34
+ "data-slot": "table-body",
35
+ className: o("[&_tr:last-child]:border-0", t),
36
+ ...e
37
+ }
38
+ );
39
+ }
40
+ function c({ className: t, ...e }) {
41
+ return /* @__PURE__ */ a(
42
+ "tfoot",
43
+ {
44
+ "data-slot": "table-footer",
45
+ className: o(
46
+ "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
47
+ t
48
+ ),
49
+ ...e
50
+ }
51
+ );
52
+ }
53
+ function b({ className: t, ...e }) {
54
+ return /* @__PURE__ */ a(
55
+ "tr",
56
+ {
57
+ "data-slot": "table-row",
58
+ className: o(
59
+ "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
60
+ t
61
+ ),
62
+ ...e
63
+ }
64
+ );
65
+ }
66
+ function i({ className: t, ...e }) {
67
+ return /* @__PURE__ */ a(
68
+ "th",
69
+ {
70
+ "data-slot": "table-head",
71
+ className: o(
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
+ t
74
+ ),
75
+ ...e
76
+ }
77
+ );
78
+ }
79
+ function m({ className: t, ...e }) {
80
+ return /* @__PURE__ */ a(
81
+ "td",
82
+ {
83
+ "data-slot": "table-cell",
84
+ className: o(
85
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
86
+ t
87
+ ),
88
+ ...e
89
+ }
90
+ );
91
+ }
92
+ function u({
93
+ className: t,
94
+ ...e
95
+ }) {
96
+ return /* @__PURE__ */ a(
97
+ "caption",
98
+ {
99
+ "data-slot": "table-caption",
100
+ className: o("text-muted-foreground mt-4 text-sm", t),
101
+ ...e
102
+ }
103
+ );
104
+ }
105
+ export {
106
+ n as Table,
107
+ d as TableBody,
108
+ u as TableCaption,
109
+ m as TableCell,
110
+ c as TableFooter,
111
+ i as TableHead,
112
+ s as TableHeader,
113
+ b as TableRow
114
+ };
@@ -0,0 +1,67 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import * as i from "@radix-ui/react-tabs";
3
+ import { cn as n } from "./utils.mjs";
4
+ function o({
5
+ className: t,
6
+ ...e
7
+ }) {
8
+ return /* @__PURE__ */ r(
9
+ i.Root,
10
+ {
11
+ "data-slot": "tabs",
12
+ className: n("flex flex-col gap-2", t),
13
+ ...e
14
+ }
15
+ );
16
+ }
17
+ function d({
18
+ className: t,
19
+ ...e
20
+ }) {
21
+ return /* @__PURE__ */ r(
22
+ i.List,
23
+ {
24
+ "data-slot": "tabs-list",
25
+ className: n(
26
+ "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",
27
+ t
28
+ ),
29
+ ...e
30
+ }
31
+ );
32
+ }
33
+ function l({
34
+ className: t,
35
+ ...e
36
+ }) {
37
+ return /* @__PURE__ */ r(
38
+ i.Trigger,
39
+ {
40
+ "data-slot": "tabs-trigger",
41
+ className: n(
42
+ "data-[state=active]:bg-card 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-xl 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
43
+ t
44
+ ),
45
+ ...e
46
+ }
47
+ );
48
+ }
49
+ function c({
50
+ className: t,
51
+ ...e
52
+ }) {
53
+ return /* @__PURE__ */ r(
54
+ i.Content,
55
+ {
56
+ "data-slot": "tabs-content",
57
+ className: n("flex-1 outline-none", t),
58
+ ...e
59
+ }
60
+ );
61
+ }
62
+ export {
63
+ o as Tabs,
64
+ c as TabsContent,
65
+ d as TabsList,
66
+ l as TabsTrigger
67
+ };
@@ -0,0 +1,18 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { cn as t } from "./utils.mjs";
3
+ function a({ className: e, ...r }) {
4
+ return /* @__PURE__ */ i(
5
+ "textarea",
6
+ {
7
+ "data-slot": "textarea",
8
+ className: t(
9
+ "resize-none 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-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
10
+ e
11
+ ),
12
+ ...r
13
+ }
14
+ );
15
+ }
16
+ export {
17
+ a as Textarea
18
+ };
@@ -0,0 +1,62 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import * as d from "react";
3
+ import * as s from "@radix-ui/react-toggle-group";
4
+ import { cn as l } from "./utils.mjs";
5
+ import { toggleVariants as m } from "./toggle.mjs";
6
+ const u = d.createContext({
7
+ size: "default",
8
+ variant: "default"
9
+ });
10
+ function p({
11
+ className: a,
12
+ variant: o,
13
+ size: t,
14
+ children: e,
15
+ ...i
16
+ }) {
17
+ return /* @__PURE__ */ n(
18
+ s.Root,
19
+ {
20
+ "data-slot": "toggle-group",
21
+ "data-variant": o,
22
+ "data-size": t,
23
+ className: l(
24
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
25
+ a
26
+ ),
27
+ ...i,
28
+ children: /* @__PURE__ */ n(u.Provider, { value: { variant: o, size: t }, children: e })
29
+ }
30
+ );
31
+ }
32
+ function v({
33
+ className: a,
34
+ children: o,
35
+ variant: t,
36
+ size: e,
37
+ ...i
38
+ }) {
39
+ const r = d.useContext(u);
40
+ return /* @__PURE__ */ n(
41
+ s.Item,
42
+ {
43
+ "data-slot": "toggle-group-item",
44
+ "data-variant": r.variant || t,
45
+ "data-size": r.size || e,
46
+ className: l(
47
+ m({
48
+ variant: r.variant || t,
49
+ size: r.size || e
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
+ a
53
+ ),
54
+ ...i,
55
+ children: o
56
+ }
57
+ );
58
+ }
59
+ export {
60
+ p as ToggleGroup,
61
+ v as ToggleGroupItem
62
+ };
@@ -0,0 +1,43 @@
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 { cn as s } from "./utils.mjs";
5
+ const d = o(
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
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-transparent",
11
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
12
+ },
13
+ size: {
14
+ default: "h-9 px-2 min-w-9",
15
+ sm: "h-8 px-1.5 min-w-8",
16
+ lg: "h-10 px-2.5 min-w-10"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ size: "default"
22
+ }
23
+ }
24
+ );
25
+ function u({
26
+ className: e,
27
+ variant: t,
28
+ size: i,
29
+ ...r
30
+ }) {
31
+ return /* @__PURE__ */ n(
32
+ a.Root,
33
+ {
34
+ "data-slot": "toggle",
35
+ className: s(d({ variant: t, size: i, className: e })),
36
+ ...r
37
+ }
38
+ );
39
+ }
40
+ export {
41
+ u as Toggle,
42
+ d as toggleVariants
43
+ };
@@ -0,0 +1,55 @@
1
+ import { jsx as i, jsxs as n } from "react/jsx-runtime";
2
+ import * as o from "@radix-ui/react-tooltip";
3
+ import { cn as d } from "./utils.mjs";
4
+ function l({
5
+ delayDuration: t = 0,
6
+ ...r
7
+ }) {
8
+ return /* @__PURE__ */ i(
9
+ o.Provider,
10
+ {
11
+ "data-slot": "tooltip-provider",
12
+ delayDuration: t,
13
+ ...r
14
+ }
15
+ );
16
+ }
17
+ function p({
18
+ ...t
19
+ }) {
20
+ return /* @__PURE__ */ i(l, { children: /* @__PURE__ */ i(o.Root, { "data-slot": "tooltip", ...t }) });
21
+ }
22
+ function f({
23
+ ...t
24
+ }) {
25
+ return /* @__PURE__ */ i(o.Trigger, { "data-slot": "tooltip-trigger", ...t });
26
+ }
27
+ function c({
28
+ className: t,
29
+ sideOffset: r = 0,
30
+ children: e,
31
+ ...a
32
+ }) {
33
+ return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ n(
34
+ o.Content,
35
+ {
36
+ "data-slot": "tooltip-content",
37
+ sideOffset: r,
38
+ className: d(
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
+ t
41
+ ),
42
+ ...a,
43
+ children: [
44
+ e,
45
+ /* @__PURE__ */ i(o.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
+ p as Tooltip,
52
+ c as TooltipContent,
53
+ l as TooltipProvider,
54
+ f as TooltipTrigger
55
+ };
@@ -0,0 +1,16 @@
1
+ import * as o from "react";
2
+ const e = 768;
3
+ function r() {
4
+ const [s, n] = o.useState(
5
+ void 0
6
+ );
7
+ return o.useEffect(() => {
8
+ const t = window.matchMedia(`(max-width: ${e - 1}px)`), i = () => {
9
+ n(window.innerWidth < e);
10
+ };
11
+ return t.addEventListener("change", i), n(window.innerWidth < e), () => t.removeEventListener("change", i);
12
+ }, []), !!s;
13
+ }
14
+ export {
15
+ r as useIsMobile
16
+ };
@@ -0,0 +1,8 @@
1
+ import { clsx as o } from "clsx";
2
+ import { twMerge as t } from "tailwind-merge";
3
+ function n(...r) {
4
+ return t(o(r));
5
+ }
6
+ export {
7
+ n as cn
8
+ };