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