@alpic-ai/ui 0.0.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 (134) hide show
  1. package/dist/components/accordion-card.d.mts +41 -0
  2. package/dist/components/accordion-card.mjs +61 -0
  3. package/dist/components/accordion.d.mts +29 -0
  4. package/dist/components/accordion.mjs +48 -0
  5. package/dist/components/alert.d.mts +40 -0
  6. package/dist/components/alert.mjs +63 -0
  7. package/dist/components/attachment-tile.d.mts +26 -0
  8. package/dist/components/attachment-tile.mjs +35 -0
  9. package/dist/components/avatar.d.mts +52 -0
  10. package/dist/components/avatar.mjs +81 -0
  11. package/dist/components/badge.d.mts +20 -0
  12. package/dist/components/badge.mjs +36 -0
  13. package/dist/components/breadcrumb.d.mts +42 -0
  14. package/dist/components/breadcrumb.mjs +79 -0
  15. package/dist/components/button.d.mts +29 -0
  16. package/dist/components/button.mjs +67 -0
  17. package/dist/components/card.d.mts +37 -0
  18. package/dist/components/card.mjs +54 -0
  19. package/dist/components/checkbox.d.mts +11 -0
  20. package/dist/components/checkbox.mjs +26 -0
  21. package/dist/components/collapsible.d.mts +16 -0
  22. package/dist/components/collapsible.mjs +24 -0
  23. package/dist/components/combobox.d.mts +86 -0
  24. package/dist/components/combobox.mjs +207 -0
  25. package/dist/components/command.d.mts +38 -0
  26. package/dist/components/command.mjs +68 -0
  27. package/dist/components/copyable.d.mts +22 -0
  28. package/dist/components/copyable.mjs +33 -0
  29. package/dist/components/description-list.d.mts +22 -0
  30. package/dist/components/description-list.mjs +34 -0
  31. package/dist/components/dialog.d.mts +61 -0
  32. package/dist/components/dialog.mjs +110 -0
  33. package/dist/components/dropdown-menu.d.mts +72 -0
  34. package/dist/components/dropdown-menu.mjs +122 -0
  35. package/dist/components/input-group.d.mts +25 -0
  36. package/dist/components/input-group.mjs +43 -0
  37. package/dist/components/input.d.mts +27 -0
  38. package/dist/components/input.mjs +90 -0
  39. package/dist/components/label.d.mts +11 -0
  40. package/dist/components/label.mjs +14 -0
  41. package/dist/components/pagination.d.mts +18 -0
  42. package/dist/components/pagination.mjs +42 -0
  43. package/dist/components/popover.d.mts +22 -0
  44. package/dist/components/popover.mjs +34 -0
  45. package/dist/components/radio-group.d.mts +15 -0
  46. package/dist/components/radio-group.mjs +26 -0
  47. package/dist/components/scroll-area.d.mts +17 -0
  48. package/dist/components/scroll-area.mjs +35 -0
  49. package/dist/components/select-trigger-variants.d.mts +13 -0
  50. package/dist/components/select-trigger-variants.mjs +23 -0
  51. package/dist/components/select.d.mts +51 -0
  52. package/dist/components/select.mjs +95 -0
  53. package/dist/components/separator.d.mts +13 -0
  54. package/dist/components/separator.mjs +16 -0
  55. package/dist/components/sheet.d.mts +43 -0
  56. package/dist/components/sheet.mjs +74 -0
  57. package/dist/components/sidebar.d.mts +163 -0
  58. package/dist/components/sidebar.mjs +378 -0
  59. package/dist/components/skeleton.d.mts +16 -0
  60. package/dist/components/skeleton.mjs +21 -0
  61. package/dist/components/sonner.d.mts +29 -0
  62. package/dist/components/sonner.mjs +76 -0
  63. package/dist/components/spinner.d.mts +30 -0
  64. package/dist/components/spinner.mjs +46 -0
  65. package/dist/components/status-dot.d.mts +19 -0
  66. package/dist/components/status-dot.mjs +34 -0
  67. package/dist/components/switch.d.mts +11 -0
  68. package/dist/components/switch.mjs +18 -0
  69. package/dist/components/table.d.mts +38 -0
  70. package/dist/components/table.mjs +65 -0
  71. package/dist/components/tabs.d.mts +58 -0
  72. package/dist/components/tabs.mjs +119 -0
  73. package/dist/components/tag.d.mts +35 -0
  74. package/dist/components/tag.mjs +65 -0
  75. package/dist/components/textarea.d.mts +21 -0
  76. package/dist/components/textarea.mjs +44 -0
  77. package/dist/components/toggle-group.d.mts +28 -0
  78. package/dist/components/toggle-group.mjs +72 -0
  79. package/dist/components/tooltip-icon-button.d.mts +12 -0
  80. package/dist/components/tooltip-icon-button.mjs +27 -0
  81. package/dist/components/tooltip.d.mts +23 -0
  82. package/dist/components/tooltip.mjs +35 -0
  83. package/dist/hooks/use-copy-to-clipboard.d.mts +11 -0
  84. package/dist/hooks/use-copy-to-clipboard.mjs +24 -0
  85. package/dist/hooks/use-mobile.d.mts +4 -0
  86. package/dist/hooks/use-mobile.mjs +16 -0
  87. package/dist/lib/cn.d.mts +6 -0
  88. package/dist/lib/cn.mjs +8 -0
  89. package/package.json +88 -0
  90. package/src/components/accordion-card.tsx +103 -0
  91. package/src/components/accordion.tsx +63 -0
  92. package/src/components/alert.tsx +74 -0
  93. package/src/components/attachment-tile.tsx +68 -0
  94. package/src/components/avatar.tsx +127 -0
  95. package/src/components/badge.tsx +41 -0
  96. package/src/components/breadcrumb.tsx +98 -0
  97. package/src/components/button.tsx +106 -0
  98. package/src/components/card.tsx +62 -0
  99. package/src/components/checkbox.tsx +35 -0
  100. package/src/components/collapsible.tsx +18 -0
  101. package/src/components/combobox.tsx +393 -0
  102. package/src/components/command.tsx +112 -0
  103. package/src/components/copyable.tsx +47 -0
  104. package/src/components/description-list.tsx +36 -0
  105. package/src/components/dialog.tsx +161 -0
  106. package/src/components/dropdown-menu.tsx +234 -0
  107. package/src/components/input-group.tsx +97 -0
  108. package/src/components/input.tsx +145 -0
  109. package/src/components/label.tsx +20 -0
  110. package/src/components/pagination.tsx +53 -0
  111. package/src/components/popover.tsx +49 -0
  112. package/src/components/radio-group.tsx +33 -0
  113. package/src/components/scroll-area.tsx +48 -0
  114. package/src/components/select-trigger-variants.ts +28 -0
  115. package/src/components/select.tsx +186 -0
  116. package/src/components/separator.tsx +30 -0
  117. package/src/components/sheet.tsx +112 -0
  118. package/src/components/sidebar.tsx +682 -0
  119. package/src/components/skeleton.tsx +24 -0
  120. package/src/components/sonner.tsx +91 -0
  121. package/src/components/spinner.tsx +62 -0
  122. package/src/components/status-dot.tsx +33 -0
  123. package/src/components/switch.tsx +33 -0
  124. package/src/components/table.tsx +89 -0
  125. package/src/components/tabs.tsx +226 -0
  126. package/src/components/tag.tsx +82 -0
  127. package/src/components/textarea.tsx +70 -0
  128. package/src/components/toggle-group.tsx +96 -0
  129. package/src/components/tooltip-icon-button.tsx +33 -0
  130. package/src/components/tooltip.tsx +54 -0
  131. package/src/hooks/use-copy-to-clipboard.ts +27 -0
  132. package/src/hooks/use-mobile.ts +17 -0
  133. package/src/lib/cn.ts +6 -0
  134. package/src/styles/tokens.css +352 -0
@@ -0,0 +1,76 @@
1
+ "use client";
2
+ import { Button } from "./button.mjs";
3
+ import { CheckCircle2, Info, Loader2, TriangleAlert, X } from "lucide-react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Toaster as Toaster$1, toast } from "sonner";
6
+ //#region src/components/sonner.tsx
7
+ function Toaster(props) {
8
+ return /* @__PURE__ */ jsx(Toaster$1, {
9
+ className: "toaster group",
10
+ icons: {
11
+ success: /* @__PURE__ */ jsx(CheckCircle2, { className: "size-5 text-badge-success" }),
12
+ error: /* @__PURE__ */ jsx(TriangleAlert, { className: "size-5 text-destructive" }),
13
+ warning: /* @__PURE__ */ jsx(TriangleAlert, { className: "size-5 text-badge-warning" }),
14
+ info: /* @__PURE__ */ jsx(Info, { className: "size-5 text-foreground" }),
15
+ loading: /* @__PURE__ */ jsx(Loader2, { className: "size-5 text-muted-foreground motion-safe:animate-spin" }),
16
+ close: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
17
+ },
18
+ toastOptions: {
19
+ unstyled: true,
20
+ classNames: {
21
+ toast: [
22
+ "group toast w-full",
23
+ "flex items-start gap-3 rounded-lg border border-border bg-background p-4 shadow-md",
24
+ "type-text-sm text-foreground"
25
+ ].join(" "),
26
+ title: "font-semibold",
27
+ description: "text-muted-foreground type-text-sm mt-0.5",
28
+ closeButton: [
29
+ "!static !transform-none shrink-0 ml-auto -mr-1 -mt-1",
30
+ "flex items-center justify-center size-6 rounded-sm",
31
+ "text-muted-foreground",
32
+ "[@media(hover:hover)]:hover:text-foreground",
33
+ "transition-colors"
34
+ ].join(" ")
35
+ }
36
+ },
37
+ ...props
38
+ });
39
+ }
40
+ function ActionToast({ toastId, title, description, onDismiss, confirm }) {
41
+ const handleDismiss = () => {
42
+ onDismiss?.();
43
+ toast.dismiss(toastId);
44
+ };
45
+ return /* @__PURE__ */ jsxs("div", {
46
+ className: "flex flex-col gap-4",
47
+ children: [/* @__PURE__ */ jsxs("div", {
48
+ className: "flex flex-col gap-1",
49
+ children: [/* @__PURE__ */ jsx("p", {
50
+ className: "type-text-lg font-semibold leading-none",
51
+ children: title
52
+ }), /* @__PURE__ */ jsx("p", {
53
+ className: "type-text-sm text-muted-foreground",
54
+ children: description
55
+ })]
56
+ }), /* @__PURE__ */ jsxs("div", {
57
+ className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
58
+ children: [/* @__PURE__ */ jsx(Button, {
59
+ variant: "secondary",
60
+ disabled: confirm.loading,
61
+ onClick: handleDismiss,
62
+ icon: /* @__PURE__ */ jsx(X, {}),
63
+ children: "Dismiss"
64
+ }), /* @__PURE__ */ jsx(Button, {
65
+ variant: "primary",
66
+ loading: confirm.loading,
67
+ disabled: confirm.disabled,
68
+ onClick: confirm.onClick,
69
+ icon: confirm.icon,
70
+ children: confirm.label
71
+ })]
72
+ })]
73
+ });
74
+ }
75
+ //#endregion
76
+ export { ActionToast, Toaster, toast };
@@ -0,0 +1,30 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
4
+
5
+ //#region src/components/spinner.d.ts
6
+ declare const spinnerVariants: (props?: ({
7
+ variant?: "secondary" | "primary" | null | undefined;
8
+ size?: "sm" | "lg" | "md" | "xl" | null | undefined;
9
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
10
+ interface SpinnerProps extends Omit<React.ComponentProps<"svg">, "children">, VariantProps<typeof spinnerVariants> {}
11
+ declare function Spinner({
12
+ className,
13
+ variant,
14
+ size,
15
+ ...props
16
+ }: SpinnerProps): _$react_jsx_runtime0.JSX.Element;
17
+ interface SpinnerBlockProps extends VariantProps<typeof spinnerVariants> {
18
+ className?: string;
19
+ fullscreen?: boolean;
20
+ withLabel?: boolean;
21
+ }
22
+ declare function SpinnerBlock({
23
+ className,
24
+ variant,
25
+ size,
26
+ fullscreen,
27
+ withLabel
28
+ }: SpinnerBlockProps): _$react_jsx_runtime0.JSX.Element;
29
+ //#endregion
30
+ export { Spinner, SpinnerBlock, type SpinnerBlockProps, type SpinnerProps, spinnerVariants };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { Loader } from "lucide-react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { cva } from "class-variance-authority";
6
+ //#region src/components/spinner.tsx
7
+ const spinnerVariants = cva("motion-safe:animate-spin", {
8
+ variants: {
9
+ variant: {
10
+ primary: "text-primary",
11
+ secondary: "text-muted-foreground"
12
+ },
13
+ size: {
14
+ sm: "size-3.5",
15
+ md: "size-4",
16
+ lg: "size-5",
17
+ xl: "size-8"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ variant: "primary",
22
+ size: "md"
23
+ }
24
+ });
25
+ function Spinner({ className, variant, size, ...props }) {
26
+ return /* @__PURE__ */ jsx(Loader, {
27
+ role: "status",
28
+ "aria-label": "Loading",
29
+ className: cn(spinnerVariants({
30
+ variant,
31
+ size
32
+ }), className),
33
+ ...props
34
+ });
35
+ }
36
+ function SpinnerBlock({ className, variant, size, fullscreen, withLabel }) {
37
+ return /* @__PURE__ */ jsxs("div", {
38
+ className: cn("flex items-center justify-center", fullscreen ? "min-h-screen" : "py-6", withLabel && "gap-2 text-muted-foreground", className),
39
+ children: [/* @__PURE__ */ jsx(Spinner, {
40
+ variant,
41
+ size
42
+ }), withLabel && /* @__PURE__ */ jsx("span", { children: "Loading..." })]
43
+ });
44
+ }
45
+ //#endregion
46
+ export { Spinner, SpinnerBlock, spinnerVariants };
@@ -0,0 +1,19 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
4
+
5
+ //#region src/components/status-dot.d.ts
6
+ declare const statusDotVariants: (props?: ({
7
+ variant?: "success" | "warning" | "destructive" | "muted" | null | undefined;
8
+ pulse?: boolean | null | undefined;
9
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
10
+ interface StatusDotProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof statusDotVariants> {}
11
+ declare function StatusDot({
12
+ className,
13
+ variant,
14
+ pulse,
15
+ ...props
16
+ }: StatusDotProps): _$react_jsx_runtime0.JSX.Element;
17
+ type StatusDotVariantProps = Required<Pick<VariantProps<typeof statusDotVariants>, "variant" | "pulse">>;
18
+ //#endregion
19
+ export { StatusDot, type StatusDotVariantProps, statusDotVariants };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ //#region src/components/status-dot.tsx
6
+ const statusDotVariants = cva("size-2.5 rounded-full", {
7
+ variants: {
8
+ variant: {
9
+ success: "bg-success",
10
+ destructive: "bg-destructive",
11
+ warning: "bg-warning",
12
+ muted: "bg-muted-foreground"
13
+ },
14
+ pulse: {
15
+ true: "animate-pulse",
16
+ false: ""
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ variant: "muted",
21
+ pulse: false
22
+ }
23
+ });
24
+ function StatusDot({ className, variant, pulse, ...props }) {
25
+ return /* @__PURE__ */ jsx("div", {
26
+ className: cn(statusDotVariants({
27
+ variant,
28
+ pulse
29
+ }), className),
30
+ ...props
31
+ });
32
+ }
33
+ //#endregion
34
+ export { StatusDot, statusDotVariants };
@@ -0,0 +1,11 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
4
+
5
+ //#region src/components/switch.d.ts
6
+ declare function Switch({
7
+ className,
8
+ ...props
9
+ }: React.ComponentProps<typeof SwitchPrimitive.Root>): _$react_jsx_runtime0.JSX.Element;
10
+ //#endregion
11
+ export { Switch };
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
5
+ //#region src/components/switch.tsx
6
+ function Switch({ className, ...props }) {
7
+ return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
8
+ "data-slot": "switch",
9
+ className: cn("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full p-0.5", "bg-subtle data-[state=checked]:not-disabled:bg-primary", "transition-colors", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:pointer-events-none disabled:opacity-50", className),
10
+ ...props,
11
+ children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, {
12
+ "data-slot": "switch-thumb",
13
+ className: cn("pointer-events-none block size-4 rounded-full bg-primary-foreground shadow-xs", "transition-transform data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-4")
14
+ })
15
+ });
16
+ }
17
+ //#endregion
18
+ export { Switch };
@@ -0,0 +1,38 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/table.d.ts
5
+ declare function Table({
6
+ className,
7
+ ...props
8
+ }: React.ComponentProps<"table">): _$react_jsx_runtime0.JSX.Element;
9
+ declare function TableHeader({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<"thead">): _$react_jsx_runtime0.JSX.Element;
13
+ declare function TableBody({
14
+ className,
15
+ ...props
16
+ }: React.ComponentProps<"tbody">): _$react_jsx_runtime0.JSX.Element;
17
+ declare function TableFooter({
18
+ className,
19
+ ...props
20
+ }: React.ComponentProps<"tfoot">): _$react_jsx_runtime0.JSX.Element;
21
+ declare function TableRow({
22
+ className,
23
+ ...props
24
+ }: React.ComponentProps<"tr">): _$react_jsx_runtime0.JSX.Element;
25
+ declare function TableHead({
26
+ className,
27
+ ...props
28
+ }: React.ComponentProps<"th">): _$react_jsx_runtime0.JSX.Element;
29
+ declare function TableCell({
30
+ className,
31
+ ...props
32
+ }: React.ComponentProps<"td">): _$react_jsx_runtime0.JSX.Element;
33
+ declare function TableCaption({
34
+ className,
35
+ ...props
36
+ }: React.ComponentProps<"caption">): _$react_jsx_runtime0.JSX.Element;
37
+ //#endregion
38
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/components/table.tsx
5
+ function Table({ className, ...props }) {
6
+ return /* @__PURE__ */ jsx("div", {
7
+ className: "relative w-full overflow-auto rounded-xl border border-border-secondary bg-background",
8
+ children: /* @__PURE__ */ jsx("table", {
9
+ "data-slot": "table",
10
+ className: cn("w-full caption-bottom type-text-sm", className),
11
+ ...props
12
+ })
13
+ });
14
+ }
15
+ function TableHeader({ className, ...props }) {
16
+ return /* @__PURE__ */ jsx("thead", {
17
+ "data-slot": "table-header",
18
+ className: cn("[&_tr]:border-b [&_tr]:border-border-secondary", className),
19
+ ...props
20
+ });
21
+ }
22
+ function TableBody({ className, ...props }) {
23
+ return /* @__PURE__ */ jsx("tbody", {
24
+ "data-slot": "table-body",
25
+ className: cn("[&_tr:last-child]:border-0", className),
26
+ ...props
27
+ });
28
+ }
29
+ function TableFooter({ className, ...props }) {
30
+ return /* @__PURE__ */ jsx("tfoot", {
31
+ "data-slot": "table-footer",
32
+ className: cn("border-t border-border-secondary type-text-sm font-medium [&>tr]:last:border-b-0", className),
33
+ ...props
34
+ });
35
+ }
36
+ function TableRow({ className, ...props }) {
37
+ return /* @__PURE__ */ jsx("tr", {
38
+ "data-slot": "table-row",
39
+ className: cn("border-b border-border-secondary transition-colors", "data-[state=selected]:bg-muted", "[@media(hover:hover)]:hover:bg-background-hover dark:[@media(hover:hover)]:hover:bg-muted", "[@media(hover:hover)]:[&:hover_button:hover]:bg-subtle", className),
40
+ ...props
41
+ });
42
+ }
43
+ function TableHead({ className, ...props }) {
44
+ return /* @__PURE__ */ jsx("th", {
45
+ "data-slot": "table-head",
46
+ className: cn("h-11 px-6 py-3 bg-muted text-left align-middle type-text-xs font-semibold text-placeholder dark:text-subtle-foreground whitespace-nowrap", "[&:has([role=checkbox])]:w-px [&:has([role=checkbox])]:pr-3", className),
47
+ ...props
48
+ });
49
+ }
50
+ function TableCell({ className, ...props }) {
51
+ return /* @__PURE__ */ jsx("td", {
52
+ "data-slot": "table-cell",
53
+ className: cn("px-6 py-2 align-middle", "[&:has([role=checkbox])]:w-px [&:has([role=checkbox])]:pr-3", className),
54
+ ...props
55
+ });
56
+ }
57
+ function TableCaption({ className, ...props }) {
58
+ return /* @__PURE__ */ jsx("caption", {
59
+ "data-slot": "table-caption",
60
+ className: cn("mt-4 type-text-sm text-muted-foreground", className),
61
+ ...props
62
+ });
63
+ }
64
+ //#endregion
65
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -0,0 +1,58 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as React from "react";
4
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
5
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
6
+
7
+ //#region src/components/tabs.d.ts
8
+ declare const tabsTriggerVariants: (props?: ({
9
+ variant?: "default" | "line" | "pill" | null | undefined;
10
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
11
+ declare function Tabs({
12
+ className,
13
+ orientation,
14
+ ...props
15
+ }: React.ComponentProps<typeof TabsPrimitive.Root>): _$react_jsx_runtime0.JSX.Element;
16
+ declare const tabsListVariants: (props?: ({
17
+ variant?: "default" | "line" | null | undefined;
18
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
19
+ declare function TabsList({
20
+ className,
21
+ variant,
22
+ ...props
23
+ }: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>): _$react_jsx_runtime0.JSX.Element;
24
+ declare function TabsTrigger({
25
+ className,
26
+ ...props
27
+ }: React.ComponentProps<typeof TabsPrimitive.Trigger>): _$react_jsx_runtime0.JSX.Element;
28
+ declare function TabsContent({
29
+ className,
30
+ ...props
31
+ }: React.ComponentProps<typeof TabsPrimitive.Content>): _$react_jsx_runtime0.JSX.Element;
32
+ type TabsNavVariant = "line" | "pill";
33
+ type TabsNavOrientation = "horizontal" | "vertical";
34
+ declare function TabsNav({
35
+ orientation,
36
+ variant,
37
+ className,
38
+ ...props
39
+ }: React.ComponentProps<"nav"> & {
40
+ orientation?: TabsNavOrientation;
41
+ variant?: TabsNavVariant;
42
+ }): _$react_jsx_runtime0.JSX.Element;
43
+ declare function TabsNavList({
44
+ className,
45
+ ...props
46
+ }: React.ComponentProps<"ul">): _$react_jsx_runtime0.JSX.Element;
47
+ declare function TabsNavTrigger({
48
+ className,
49
+ active,
50
+ asChild,
51
+ children,
52
+ ...props
53
+ }: React.ComponentProps<"a"> & {
54
+ active?: boolean;
55
+ asChild?: boolean;
56
+ }): _$react_jsx_runtime0.JSX.Element;
57
+ //#endregion
58
+ export { Tabs, TabsContent, TabsList, TabsNav, TabsNavList, TabsNavTrigger, TabsTrigger, tabsListVariants, tabsTriggerVariants };
@@ -0,0 +1,119 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ import { createContext, use } from "react";
6
+ import { Slot } from "@radix-ui/react-slot";
7
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
8
+ //#region src/components/tabs.tsx
9
+ const tabsTriggerVariants = cva([
10
+ "type-text-sm items-center gap-1.5 font-medium",
11
+ "disabled:pointer-events-none disabled:opacity-50",
12
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
13
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
14
+ ], {
15
+ variants: { variant: {
16
+ default: ["rounded-md border border-transparent px-2 py-1", "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"],
17
+ line: [
18
+ "h-8 pb-3 px-1",
19
+ "text-quaternary-foreground",
20
+ "[@media(hover:hover)]:hover:text-muted-foreground-hover",
21
+ "data-[state=active]:border-b-2 data-[state=active]:border-foreground data-[state=active]:text-foreground"
22
+ ],
23
+ pill: [
24
+ "rounded-lg px-4 py-2",
25
+ "text-muted-foreground",
26
+ "[@media(hover:hover)]:hover:bg-accent [@media(hover:hover)]:hover:text-accent-foreground",
27
+ "data-[state=active]:bg-accent data-[state=active]:text-accent-foreground"
28
+ ]
29
+ } },
30
+ defaultVariants: { variant: "default" }
31
+ });
32
+ function Tabs({ className, orientation = "horizontal", ...props }) {
33
+ return /* @__PURE__ */ jsx(TabsPrimitive.Root, {
34
+ "data-slot": "tabs",
35
+ "data-orientation": orientation,
36
+ orientation,
37
+ className: cn("group/tabs flex gap-4", "data-[orientation=horizontal]:flex-col", "data-[orientation=vertical]:flex-row", className),
38
+ ...props
39
+ });
40
+ }
41
+ const TabsListVariantContext = createContext("default");
42
+ const tabsListVariants = cva("inline-flex w-fit items-center justify-center text-muted-foreground group-data-[orientation=vertical]/tabs:flex-col", {
43
+ variants: { variant: {
44
+ default: "rounded-lg bg-muted p-[3px] group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:bg-transparent group-data-[orientation=vertical]/tabs:p-0 group-data-[orientation=vertical]/tabs:rounded-none",
45
+ line: "gap-3 rounded-none bg-transparent border-b border-subtle group-data-[orientation=horizontal]/tabs:flex-wrap"
46
+ } },
47
+ defaultVariants: { variant: "default" }
48
+ });
49
+ function TabsList({ className, variant = "default", ...props }) {
50
+ return /* @__PURE__ */ jsx(TabsListVariantContext, {
51
+ value: variant ?? "default",
52
+ children: /* @__PURE__ */ jsx(TabsPrimitive.List, {
53
+ "data-slot": "tabs-list",
54
+ className: cn(tabsListVariants({ variant }), className),
55
+ ...props
56
+ })
57
+ });
58
+ }
59
+ function TabsTrigger({ className, ...props }) {
60
+ const variant = use(TabsListVariantContext);
61
+ return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
62
+ "data-slot": "tabs-trigger",
63
+ className: cn(tabsTriggerVariants({ variant }), "relative inline-flex flex-1 justify-center whitespace-nowrap transition-all", "group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start", variant === "default" && [
64
+ "h-[calc(100%-1px)]",
65
+ "group-data-[orientation=vertical]/tabs:data-[state=active]:bg-muted group-data-[orientation=vertical]/tabs:data-[state=active]:shadow-none dark:group-data-[orientation=vertical]/tabs:data-[state=active]:bg-subtle",
66
+ "group-data-[orientation=vertical]/tabs:p-2"
67
+ ], className),
68
+ ...props
69
+ });
70
+ }
71
+ function TabsContent({ className, ...props }) {
72
+ return /* @__PURE__ */ jsx(TabsPrimitive.Content, {
73
+ "data-slot": "tabs-content",
74
+ className: cn("flex-1 outline-none", className),
75
+ ...props
76
+ });
77
+ }
78
+ const TabsNavContext = createContext({
79
+ orientation: "horizontal",
80
+ variant: "line"
81
+ });
82
+ function TabsNav({ orientation = "horizontal", variant, className, ...props }) {
83
+ return /* @__PURE__ */ jsx(TabsNavContext, {
84
+ value: {
85
+ orientation,
86
+ variant: variant ?? (orientation === "vertical" ? "pill" : "line")
87
+ },
88
+ children: /* @__PURE__ */ jsx("nav", {
89
+ "data-slot": "tabs-nav",
90
+ "data-orientation": orientation,
91
+ className,
92
+ ...props
93
+ })
94
+ });
95
+ }
96
+ function TabsNavList({ className, ...props }) {
97
+ const { orientation, variant } = use(TabsNavContext);
98
+ return /* @__PURE__ */ jsx("ul", {
99
+ "data-slot": "tabs-nav-list",
100
+ className: cn(orientation === "vertical" ? "flex flex-col gap-1" : "flex flex-wrap", variant === "line" && orientation === "horizontal" && "gap-3 border-b border-subtle", className),
101
+ ...props
102
+ });
103
+ }
104
+ function TabsNavTrigger({ className, active = false, asChild = false, children, ...props }) {
105
+ const Comp = asChild ? Slot : "a";
106
+ const { variant } = use(TabsNavContext);
107
+ return /* @__PURE__ */ jsx("li", {
108
+ "data-slot": "tabs-nav-trigger-item",
109
+ children: /* @__PURE__ */ jsx(Comp, {
110
+ "data-state": active ? "active" : "inactive",
111
+ className: cn(tabsTriggerVariants({ variant }), "flex transition-colors", variant === "line" && "cursor-pointer", className),
112
+ "aria-current": active ? "page" : void 0,
113
+ ...props,
114
+ children
115
+ })
116
+ });
117
+ }
118
+ //#endregion
119
+ export { Tabs, TabsContent, TabsList, TabsNav, TabsNavList, TabsNavTrigger, TabsTrigger, tabsListVariants, tabsTriggerVariants };
@@ -0,0 +1,35 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/components/tag.d.ts
4
+ interface TagBaseProps {
5
+ icon?: React.ReactNode;
6
+ }
7
+ interface TagProps extends React.ComponentProps<"span">, TagBaseProps {}
8
+ declare function Tag({
9
+ className,
10
+ icon,
11
+ children,
12
+ ...props
13
+ }: TagProps): _$react_jsx_runtime0.JSX.Element;
14
+ interface TagDismissibleProps extends React.ComponentProps<"span">, TagBaseProps {
15
+ onDismiss?: () => void;
16
+ }
17
+ declare function TagDismissible({
18
+ className,
19
+ icon,
20
+ children,
21
+ onDismiss,
22
+ ...props
23
+ }: TagDismissibleProps): _$react_jsx_runtime0.JSX.Element;
24
+ interface TagCountProps extends React.ComponentProps<"span">, TagBaseProps {
25
+ count: number;
26
+ }
27
+ declare function TagCount({
28
+ className,
29
+ icon,
30
+ children,
31
+ count,
32
+ ...props
33
+ }: TagCountProps): _$react_jsx_runtime0.JSX.Element;
34
+ //#endregion
35
+ export { Tag, TagCount, TagDismissible };
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/components/tag.tsx
5
+ const tagBase = "inline-flex items-center justify-center rounded-sm border border-border bg-background py-0.5 type-text-sm font-medium text-muted-foreground";
6
+ function Tag({ className, icon, children, ...props }) {
7
+ return /* @__PURE__ */ jsxs("span", {
8
+ className: cn(tagBase, icon ? "gap-[5px] pl-1 pr-[9px]" : "px-[9px]", className),
9
+ ...props,
10
+ children: [icon && /* @__PURE__ */ jsx("span", {
11
+ className: "inline-flex shrink-0",
12
+ children: icon
13
+ }), /* @__PURE__ */ jsx("span", { children })]
14
+ });
15
+ }
16
+ function TagDismissible({ className, icon, children, onDismiss, ...props }) {
17
+ return /* @__PURE__ */ jsxs("span", {
18
+ className: cn(tagBase, "gap-[3px]", icon ? "px-1" : "pl-[9px] pr-1", className),
19
+ ...props,
20
+ children: [/* @__PURE__ */ jsxs("span", {
21
+ className: cn("inline-flex items-center", icon && "gap-[5px]"),
22
+ children: [icon && /* @__PURE__ */ jsx("span", {
23
+ className: "inline-flex shrink-0",
24
+ children: icon
25
+ }), /* @__PURE__ */ jsx("span", { children })]
26
+ }), /* @__PURE__ */ jsx("button", {
27
+ type: "button",
28
+ "aria-label": "Remove",
29
+ onClick: onDismiss,
30
+ className: "inline-flex items-center justify-center rounded-[3px] p-0.5 hover:bg-accent",
31
+ children: /* @__PURE__ */ jsxs("svg", {
32
+ xmlns: "http://www.w3.org/2000/svg",
33
+ width: "12",
34
+ height: "12",
35
+ viewBox: "0 0 24 24",
36
+ fill: "none",
37
+ stroke: "currentColor",
38
+ strokeWidth: "2",
39
+ strokeLinecap: "round",
40
+ strokeLinejoin: "round",
41
+ "aria-hidden": "true",
42
+ children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
43
+ })
44
+ })]
45
+ });
46
+ }
47
+ function TagCount({ className, icon, children, count, ...props }) {
48
+ return /* @__PURE__ */ jsxs("span", {
49
+ className: cn(tagBase, "gap-[5px]", icon ? "pl-1 pr-[3px]" : "pl-[9px] pr-[3px]", className),
50
+ ...props,
51
+ children: [
52
+ icon && /* @__PURE__ */ jsx("span", {
53
+ className: "inline-flex shrink-0",
54
+ children: icon
55
+ }),
56
+ /* @__PURE__ */ jsx("span", { children }),
57
+ /* @__PURE__ */ jsx("span", {
58
+ className: "inline-flex min-w-[18px] h-[18px] items-center justify-center rounded-[3px] bg-subtle px-[5px] type-text-xs font-medium text-muted-foreground",
59
+ children: count
60
+ })
61
+ ]
62
+ });
63
+ }
64
+ //#endregion
65
+ export { Tag, TagCount, TagDismissible };
@@ -0,0 +1,21 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/textarea.d.ts
5
+ interface TextareaProps extends React.ComponentProps<"textarea"> {
6
+ label?: string;
7
+ required?: boolean;
8
+ hint?: string;
9
+ error?: string;
10
+ }
11
+ declare function Textarea({
12
+ className,
13
+ id,
14
+ label,
15
+ required,
16
+ hint,
17
+ error,
18
+ ...props
19
+ }: TextareaProps): _$react_jsx_runtime0.JSX.Element;
20
+ //#endregion
21
+ export { Textarea, type TextareaProps };