@open-elements/ui 0.1.0 → 0.3.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 (105) hide show
  1. package/README.md +30 -0
  2. package/dist/components/alert-dialog.d.ts +1 -1
  3. package/dist/components/alert-dialog.d.ts.map +1 -1
  4. package/dist/components/alert-dialog.js +2 -2
  5. package/dist/components/alert-dialog.js.map +1 -1
  6. package/dist/components/badge.js +1 -1
  7. package/dist/components/badge.js.map +1 -1
  8. package/dist/components/button.js +1 -1
  9. package/dist/components/button.js.map +1 -1
  10. package/dist/components/calendar.d.ts +1 -1
  11. package/dist/components/calendar.d.ts.map +1 -1
  12. package/dist/components/calendar.js +2 -2
  13. package/dist/components/calendar.js.map +1 -1
  14. package/dist/components/card.js +1 -1
  15. package/dist/components/card.js.map +1 -1
  16. package/dist/components/combobox.js +3 -3
  17. package/dist/components/combobox.js.map +1 -1
  18. package/dist/components/delete-confirm-dialog.d.ts +14 -0
  19. package/dist/components/delete-confirm-dialog.d.ts.map +1 -0
  20. package/dist/components/delete-confirm-dialog.js +22 -0
  21. package/dist/components/delete-confirm-dialog.js.map +1 -0
  22. package/dist/components/detail-field.d.ts +21 -0
  23. package/dist/components/detail-field.d.ts.map +1 -0
  24. package/dist/components/detail-field.js +47 -0
  25. package/dist/components/detail-field.js.map +1 -0
  26. package/dist/components/dialog.js +2 -2
  27. package/dist/components/dialog.js.map +1 -1
  28. package/dist/components/health-status.js +1 -1
  29. package/dist/components/health-status.js.map +1 -1
  30. package/dist/components/input-group.d.ts +1 -1
  31. package/dist/components/input-group.d.ts.map +1 -1
  32. package/dist/components/input-group.js +4 -4
  33. package/dist/components/input-group.js.map +1 -1
  34. package/dist/components/input.js +1 -1
  35. package/dist/components/input.js.map +1 -1
  36. package/dist/components/label.js +1 -1
  37. package/dist/components/label.js.map +1 -1
  38. package/dist/components/language-switch.js +2 -2
  39. package/dist/components/language-switch.js.map +1 -1
  40. package/dist/components/popover.js +1 -1
  41. package/dist/components/popover.js.map +1 -1
  42. package/dist/components/select.js +1 -1
  43. package/dist/components/select.js.map +1 -1
  44. package/dist/components/separator.js +1 -1
  45. package/dist/components/separator.js.map +1 -1
  46. package/dist/components/sheet.js +1 -1
  47. package/dist/components/sheet.js.map +1 -1
  48. package/dist/components/sidebar.js +5 -5
  49. package/dist/components/sidebar.js.map +1 -1
  50. package/dist/components/skeleton.js +1 -1
  51. package/dist/components/skeleton.js.map +1 -1
  52. package/dist/components/table.js +1 -1
  53. package/dist/components/table.js.map +1 -1
  54. package/dist/components/tag-chips.d.ts +1 -1
  55. package/dist/components/tag-chips.d.ts.map +1 -1
  56. package/dist/components/tag-form.d.ts +1 -1
  57. package/dist/components/tag-form.d.ts.map +1 -1
  58. package/dist/components/tag-form.js +6 -6
  59. package/dist/components/tag-form.js.map +1 -1
  60. package/dist/components/tag-multi-select.d.ts +1 -1
  61. package/dist/components/tag-multi-select.d.ts.map +1 -1
  62. package/dist/components/tag-multi-select.js +1 -1
  63. package/dist/components/tag-multi-select.js.map +1 -1
  64. package/dist/components/textarea.js +1 -1
  65. package/dist/components/textarea.js.map +1 -1
  66. package/dist/components/tooltip.js +1 -1
  67. package/dist/components/tooltip.js.map +1 -1
  68. package/dist/index.d.ts +39 -35
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +30 -28
  71. package/dist/index.js.map +1 -1
  72. package/dist/tsconfig.build.tsbuildinfo +1 -1
  73. package/package.json +2 -2
  74. package/src/components/__tests__/button.test.tsx +1 -1
  75. package/src/components/__tests__/input.test.tsx +1 -1
  76. package/src/components/__tests__/tag-multi-select.test.tsx +2 -2
  77. package/src/components/__tests__/textarea.test.tsx +1 -1
  78. package/src/components/alert-dialog.tsx +2 -2
  79. package/src/components/badge.tsx +1 -1
  80. package/src/components/button.tsx +1 -1
  81. package/src/components/calendar.tsx +2 -2
  82. package/src/components/card.tsx +1 -1
  83. package/src/components/combobox.tsx +3 -3
  84. package/src/components/delete-confirm-dialog.tsx +80 -0
  85. package/src/components/detail-field.tsx +156 -0
  86. package/src/components/dialog.tsx +2 -2
  87. package/src/components/health-status.tsx +1 -1
  88. package/src/components/input-group.tsx +4 -4
  89. package/src/components/input.tsx +1 -1
  90. package/src/components/label.tsx +1 -1
  91. package/src/components/language-switch.tsx +2 -2
  92. package/src/components/popover.tsx +1 -1
  93. package/src/components/select.tsx +1 -1
  94. package/src/components/separator.tsx +1 -1
  95. package/src/components/sheet.tsx +1 -1
  96. package/src/components/sidebar.tsx +5 -5
  97. package/src/components/skeleton.tsx +1 -1
  98. package/src/components/table.tsx +1 -1
  99. package/src/components/tag-chips.tsx +1 -1
  100. package/src/components/tag-form.tsx +7 -7
  101. package/src/components/tag-multi-select.tsx +2 -2
  102. package/src/components/textarea.tsx +1 -1
  103. package/src/components/tooltip.tsx +1 -1
  104. package/src/index.ts +39 -35
  105. package/src/lib/__tests__/utils.test.ts +1 -1
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@open-elements/ui",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Shared UI component library for Open Elements applications",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/open-elements/open-elements-ui.git"
8
+ "url": "https://github.com/OpenElementsLabs/open-elements-ui.git"
9
9
  },
10
10
  "type": "module",
11
11
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect } from "vitest";
2
2
  import { render, screen } from "@testing-library/react";
3
- import { Button } from "../button";
3
+ import { Button } from "../button.tsx";
4
4
 
5
5
  describe("Button", () => {
6
6
  it("renders with children", () => {
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect } from "vitest";
2
2
  import { render, screen } from "@testing-library/react";
3
- import { Input } from "../input";
3
+ import { Input } from "../input.tsx";
4
4
 
5
5
  describe("Input", () => {
6
6
  it("renders an input element", () => {
@@ -1,7 +1,7 @@
1
1
  import { describe, it, expect, vi } from "vitest";
2
2
  import { render, screen, waitFor } from "@testing-library/react";
3
- import { TagMultiSelect } from "../tag-multi-select";
4
- import type { TagOption, TagMultiSelectTranslations } from "../../types";
3
+ import { TagMultiSelect } from "../tag-multi-select.tsx";
4
+ import type { TagOption, TagMultiSelectTranslations } from "../../types/index.ts";
5
5
 
6
6
  const mockTranslations: TagMultiSelectTranslations = {
7
7
  placeholder: "Choose tags...",
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect } from "vitest";
2
2
  import { render, screen } from "@testing-library/react";
3
- import { Textarea } from "../textarea";
3
+ import { Textarea } from "../textarea.tsx";
4
4
 
5
5
  describe("Textarea", () => {
6
6
  it("renders a textarea element", () => {
@@ -3,8 +3,8 @@
3
3
  import * as React from "react";
4
4
  import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
5
5
 
6
- import { cn } from "../lib/utils";
7
- import { Button } from "./button";
6
+ import { cn } from "../lib/utils.ts";
7
+ import { Button } from "./button.tsx";
8
8
 
9
9
  function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
10
10
  return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { cva, type VariantProps } from "class-variance-authority";
3
3
  import { Slot } from "radix-ui";
4
4
 
5
- import { cn } from "../lib/utils";
5
+ import { cn } from "../lib/utils.ts";
6
6
 
7
7
  const badgeVariants = cva(
8
8
  "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { cva, type VariantProps } from "class-variance-authority";
3
3
  import { Slot } from "radix-ui";
4
4
 
5
- import { cn } from "../lib/utils";
5
+ import { cn } from "../lib/utils.ts";
6
6
 
7
7
  const buttonVariants = cva(
8
8
  "inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
@@ -4,8 +4,8 @@ import * as React from "react";
4
4
  import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
5
5
  import { DayPicker, getDefaultClassNames, type DayButton } from "react-day-picker";
6
6
 
7
- import { cn } from "../lib/utils";
8
- import { Button, buttonVariants } from "./button";
7
+ import { cn } from "../lib/utils.ts";
8
+ import { Button, buttonVariants } from "./button.tsx";
9
9
 
10
10
  function Calendar({
11
11
  className,
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- import { cn } from "../lib/utils";
3
+ import { cn } from "../lib/utils.ts";
4
4
 
5
5
  function Card({ className, ...props }: React.ComponentProps<"div">) {
6
6
  return (
@@ -4,9 +4,9 @@ import * as React from "react";
4
4
  import { Combobox as ComboboxPrimitive } from "@base-ui/react";
5
5
  import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
6
6
 
7
- import { cn } from "../lib/utils";
8
- import { Button } from "./button";
9
- import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group";
7
+ import { cn } from "../lib/utils.ts";
8
+ import { Button } from "./button.tsx";
9
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.tsx";
10
10
 
11
11
  const Combobox = ComboboxPrimitive.Root;
12
12
 
@@ -0,0 +1,80 @@
1
+ "use client";
2
+
3
+ import { useState } from "react";
4
+ import { Loader2 } from "lucide-react";
5
+ import {
6
+ AlertDialog,
7
+ AlertDialogCancel,
8
+ AlertDialogContent,
9
+ AlertDialogDescription,
10
+ AlertDialogFooter,
11
+ AlertDialogHeader,
12
+ AlertDialogTitle,
13
+ } from "./alert-dialog.tsx";
14
+ import { Button } from "./button.tsx";
15
+
16
+ interface DeleteConfirmDialogProps {
17
+ readonly open: boolean;
18
+ readonly onOpenChange: (open: boolean) => void;
19
+ readonly title: string;
20
+ readonly description: string;
21
+ readonly confirmLabel: string;
22
+ readonly cancelLabel: string;
23
+ readonly onConfirm: () => Promise<void>;
24
+ readonly error?: string | null;
25
+ readonly errorTitle?: string;
26
+ }
27
+
28
+ export function DeleteConfirmDialog({
29
+ open,
30
+ onOpenChange,
31
+ title,
32
+ description,
33
+ confirmLabel,
34
+ cancelLabel,
35
+ onConfirm,
36
+ error,
37
+ errorTitle,
38
+ }: DeleteConfirmDialogProps) {
39
+ const [loading, setLoading] = useState(false);
40
+
41
+ const handleConfirm = async () => {
42
+ if (loading) return;
43
+ setLoading(true);
44
+ try {
45
+ await onConfirm();
46
+ } finally {
47
+ setLoading(false);
48
+ }
49
+ };
50
+
51
+ return (
52
+ <AlertDialog open={open} onOpenChange={onOpenChange}>
53
+ <AlertDialogContent>
54
+ <AlertDialogHeader>
55
+ <AlertDialogTitle>{error ? (errorTitle ?? title) : title}</AlertDialogTitle>
56
+ <AlertDialogDescription>{error ?? description}</AlertDialogDescription>
57
+ </AlertDialogHeader>
58
+ <AlertDialogFooter>
59
+ {error ? (
60
+ <AlertDialogCancel>{cancelLabel}</AlertDialogCancel>
61
+ ) : (
62
+ <>
63
+ <AlertDialogCancel>{cancelLabel}</AlertDialogCancel>
64
+ <Button
65
+ onClick={handleConfirm}
66
+ disabled={loading}
67
+ className="bg-oe-red hover:bg-oe-red-dark text-white"
68
+ >
69
+ {loading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
70
+ {confirmLabel}
71
+ </Button>
72
+ </>
73
+ )}
74
+ </AlertDialogFooter>
75
+ </AlertDialogContent>
76
+ </AlertDialog>
77
+ );
78
+ }
79
+
80
+ export type { DeleteConfirmDialogProps };
@@ -0,0 +1,156 @@
1
+ "use client";
2
+
3
+ import { useState } from "react";
4
+ import { Copy, Check, ExternalLink, Mail, Phone } from "lucide-react";
5
+ import { Tooltip, TooltipTrigger, TooltipContent } from "./tooltip.tsx";
6
+
7
+ interface DetailFieldTranslations {
8
+ readonly copy: string;
9
+ readonly copied: string;
10
+ readonly open: string;
11
+ readonly email: string;
12
+ readonly call: string;
13
+ }
14
+
15
+ const defaultTranslations: DetailFieldTranslations = {
16
+ copy: "Copy",
17
+ copied: "Copied",
18
+ open: "Open",
19
+ email: "Email",
20
+ call: "Call",
21
+ };
22
+
23
+ interface DetailFieldProps {
24
+ readonly label: string;
25
+ readonly value: string | null;
26
+ readonly copyable?: boolean;
27
+ readonly linkable?: boolean;
28
+ readonly mailable?: boolean;
29
+ readonly callable?: boolean;
30
+ readonly multiline?: boolean;
31
+ readonly children?: React.ReactNode;
32
+ readonly translations?: DetailFieldTranslations;
33
+ }
34
+
35
+ function normalizeUrl(url: string): string {
36
+ if (url.startsWith("http://") || url.startsWith("https://")) {
37
+ return url;
38
+ }
39
+ return `https://${url}`;
40
+ }
41
+
42
+ export function DetailField({
43
+ label,
44
+ value,
45
+ copyable,
46
+ linkable,
47
+ mailable,
48
+ callable,
49
+ multiline,
50
+ children,
51
+ translations = defaultTranslations,
52
+ }: DetailFieldProps) {
53
+ const [copied, setCopied] = useState(false);
54
+
55
+ const hasValue = value !== null && value !== "";
56
+ const hasActions = hasValue && (copyable || linkable || mailable || callable);
57
+
58
+ const handleCopy = () => {
59
+ if (!value) return;
60
+ navigator.clipboard.writeText(value);
61
+ setCopied(true);
62
+ setTimeout(() => setCopied(false), 2000);
63
+ };
64
+
65
+ const handleOpenUrl = () => {
66
+ if (!value) return;
67
+ window.open(normalizeUrl(value), "_blank");
68
+ };
69
+
70
+ const handleMailto = () => {
71
+ if (!value) return;
72
+ window.location.href = `mailto:${value}`;
73
+ };
74
+
75
+ const handleTel = () => {
76
+ if (!value) return;
77
+ window.location.href = `tel:${value}`;
78
+ };
79
+
80
+ return (
81
+ <div>
82
+ <dt className="text-sm font-medium text-oe-gray-mid">{label}</dt>
83
+ <dd className="mt-1 text-sm text-oe-black flex items-start gap-1">
84
+ <span className={multiline ? "whitespace-pre-line" : ""}>
85
+ {children ?? (hasValue ? value : "—")}
86
+ </span>
87
+ {hasActions && (
88
+ <span className="inline-flex gap-0.5 shrink-0 mt-0.5">
89
+ {copyable && (
90
+ <Tooltip>
91
+ <TooltipTrigger asChild>
92
+ <button
93
+ type="button"
94
+ onClick={handleCopy}
95
+ className="text-oe-gray-light hover:text-oe-dark [@media(pointer:coarse)]:text-oe-dark"
96
+ >
97
+ {copied ? (
98
+ <Check className="h-3.5 w-3.5 text-oe-green" />
99
+ ) : (
100
+ <Copy className="h-3.5 w-3.5" />
101
+ )}
102
+ </button>
103
+ </TooltipTrigger>
104
+ <TooltipContent>{copied ? translations.copied : translations.copy}</TooltipContent>
105
+ </Tooltip>
106
+ )}
107
+ {linkable && (
108
+ <Tooltip>
109
+ <TooltipTrigger asChild>
110
+ <button
111
+ type="button"
112
+ onClick={handleOpenUrl}
113
+ className="text-oe-gray-light hover:text-oe-dark [@media(pointer:coarse)]:text-oe-dark"
114
+ >
115
+ <ExternalLink className="h-3.5 w-3.5" />
116
+ </button>
117
+ </TooltipTrigger>
118
+ <TooltipContent>{translations.open}</TooltipContent>
119
+ </Tooltip>
120
+ )}
121
+ {mailable && (
122
+ <Tooltip>
123
+ <TooltipTrigger asChild>
124
+ <button
125
+ type="button"
126
+ onClick={handleMailto}
127
+ className="text-oe-gray-light hover:text-oe-dark [@media(pointer:coarse)]:text-oe-dark"
128
+ >
129
+ <Mail className="h-3.5 w-3.5" />
130
+ </button>
131
+ </TooltipTrigger>
132
+ <TooltipContent>{translations.email}</TooltipContent>
133
+ </Tooltip>
134
+ )}
135
+ {callable && (
136
+ <Tooltip>
137
+ <TooltipTrigger asChild>
138
+ <button
139
+ type="button"
140
+ onClick={handleTel}
141
+ className="text-oe-gray-light hover:text-oe-dark [@media(pointer:coarse)]:text-oe-dark"
142
+ >
143
+ <Phone className="h-3.5 w-3.5" />
144
+ </button>
145
+ </TooltipTrigger>
146
+ <TooltipContent>{translations.call}</TooltipContent>
147
+ </Tooltip>
148
+ )}
149
+ </span>
150
+ )}
151
+ </dd>
152
+ </div>
153
+ );
154
+ }
155
+
156
+ export type { DetailFieldProps, DetailFieldTranslations };
@@ -4,8 +4,8 @@ import * as React from "react";
4
4
  import { XIcon } from "lucide-react";
5
5
  import { Dialog as DialogPrimitive } from "radix-ui";
6
6
 
7
- import { cn } from "../lib/utils";
8
- import { Button } from "./button";
7
+ import { cn } from "../lib/utils.ts";
8
+ import { Button } from "./button.tsx";
9
9
 
10
10
  function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
11
11
  return <DialogPrimitive.Root data-slot="dialog" {...props} />;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { Card, CardContent, CardHeader, CardTitle } from "./card";
3
+ import { Card, CardContent, CardHeader, CardTitle } from "./card.tsx";
4
4
 
5
5
  interface HealthStatusTranslations {
6
6
  readonly title: string;
@@ -3,10 +3,10 @@
3
3
  import * as React from "react";
4
4
  import { cva, type VariantProps } from "class-variance-authority";
5
5
 
6
- import { cn } from "../lib/utils";
7
- import { Button } from "./button";
8
- import { Input } from "./input";
9
- import { Textarea } from "./textarea";
6
+ import { cn } from "../lib/utils.ts";
7
+ import { Button } from "./button.tsx";
8
+ import { Input } from "./input.tsx";
9
+ import { Textarea } from "./textarea.tsx";
10
10
 
11
11
  function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
12
12
  return (
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- import { cn } from "../lib/utils";
3
+ import { cn } from "../lib/utils.ts";
4
4
 
5
5
  function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
6
  return (
@@ -3,7 +3,7 @@
3
3
  import * as React from "react";
4
4
  import { Label as LabelPrimitive } from "radix-ui";
5
5
 
6
- import { cn } from "../lib/utils";
6
+ import { cn } from "../lib/utils.ts";
7
7
 
8
8
  function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
9
9
  return (
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
- import { cn } from "../lib/utils";
4
- import { useLanguage } from "../i18n/language-context";
3
+ import { cn } from "../lib/utils.ts";
4
+ import { useLanguage } from "../i18n/language-context.tsx";
5
5
 
6
6
  export function LanguageSwitch() {
7
7
  const { language, setLanguage } = useLanguage();
@@ -3,7 +3,7 @@
3
3
  import * as React from "react";
4
4
  import { Popover as PopoverPrimitive } from "radix-ui";
5
5
 
6
- import { cn } from "../lib/utils";
6
+ import { cn } from "../lib/utils.ts";
7
7
 
8
8
  function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
9
9
  return <PopoverPrimitive.Root data-slot="popover" {...props} />;
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
5
5
  import { Select as SelectPrimitive } from "radix-ui";
6
6
 
7
- import { cn } from "../lib/utils";
7
+ import { cn } from "../lib/utils.ts";
8
8
 
9
9
  function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
10
10
  return <SelectPrimitive.Root data-slot="select" {...props} />;
@@ -3,7 +3,7 @@
3
3
  import * as React from "react";
4
4
  import { Separator as SeparatorPrimitive } from "radix-ui";
5
5
 
6
- import { cn } from "../lib/utils";
6
+ import { cn } from "../lib/utils.ts";
7
7
 
8
8
  function Separator({
9
9
  className,
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  import { XIcon } from "lucide-react";
5
5
  import { Dialog as SheetPrimitive } from "radix-ui";
6
6
 
7
- import { cn } from "../lib/utils";
7
+ import { cn } from "../lib/utils.ts";
8
8
 
9
9
  function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
10
10
  return <SheetPrimitive.Root data-slot="sheet" {...props} />;
@@ -3,11 +3,11 @@
3
3
  import * as React from "react";
4
4
  import { useState } from "react";
5
5
  import { ChevronDown, CircleUser, LayoutDashboard, LogOut, Menu } from "lucide-react";
6
- import { cn } from "../lib/utils";
7
- import { Button } from "./button";
8
- import { Tooltip, TooltipTrigger, TooltipContent } from "./tooltip";
9
- import { Sheet, SheetContent, SheetTrigger, SheetTitle } from "./sheet";
10
- import { LanguageSwitch } from "./language-switch";
6
+ import { cn } from "../lib/utils.ts";
7
+ import { Button } from "./button.tsx";
8
+ import { Tooltip, TooltipTrigger, TooltipContent } from "./tooltip.tsx";
9
+ import { Sheet, SheetContent, SheetTrigger, SheetTitle } from "./sheet.tsx";
10
+ import { LanguageSwitch } from "./language-switch.tsx";
11
11
 
12
12
  // --- NavItem ---
13
13
 
@@ -1,4 +1,4 @@
1
- import { cn } from "../lib/utils";
1
+ import { cn } from "../lib/utils.ts";
2
2
 
3
3
  function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
4
4
  return (
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from "react";
4
4
 
5
- import { cn } from "../lib/utils";
5
+ import { cn } from "../lib/utils.ts";
6
6
 
7
7
  function Table({ className, ...props }: React.ComponentProps<"table">) {
8
8
  return (
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import type { TagDto } from "../types";
3
+ import type { TagDto } from "../types/index.ts";
4
4
 
5
5
  function getContrastColor(hex: string): string {
6
6
  const r = parseInt(hex.slice(1, 3), 16);
@@ -2,13 +2,13 @@
2
2
 
3
3
  import { useState } from "react";
4
4
  import { Check } from "lucide-react";
5
- import { cn } from "../lib/utils";
6
- import { Button } from "./button";
7
- import { Input } from "./input";
8
- import { Textarea } from "./textarea";
9
- import { Label } from "./label";
10
- import { Card, CardContent, CardHeader, CardTitle } from "./card";
11
- import type { TagDto } from "../types";
5
+ import { cn } from "../lib/utils.ts";
6
+ import { Button } from "./button.tsx";
7
+ import { Input } from "./input.tsx";
8
+ import { Textarea } from "./textarea.tsx";
9
+ import { Label } from "./label.tsx";
10
+ import { Card, CardContent, CardHeader, CardTitle } from "./card.tsx";
11
+ import type { TagDto } from "../types/index.ts";
12
12
 
13
13
  const PALETTE_COLORS = [
14
14
  "#EF4444",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { useEffect, useState } from "react";
4
- import type { TagOption, TagMultiSelectProps, TagMultiSelectTranslations } from "../types";
4
+ import type { TagOption, TagMultiSelectProps, TagMultiSelectTranslations } from "../types/index.ts";
5
5
  import {
6
6
  Combobox,
7
7
  ComboboxChips,
@@ -11,7 +11,7 @@ import {
11
11
  ComboboxItem,
12
12
  ComboboxList,
13
13
  useComboboxAnchor,
14
- } from "./combobox";
14
+ } from "./combobox.tsx";
15
15
 
16
16
  function isValidHex(color: string): boolean {
17
17
  return /^#[0-9A-Fa-f]{6}$/.test(color);
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- import { cn } from "../lib/utils";
3
+ import { cn } from "../lib/utils.ts";
4
4
 
5
5
  function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
6
6
  return (
@@ -3,7 +3,7 @@
3
3
  import * as React from "react";
4
4
  import { Tooltip as TooltipPrimitive } from "radix-ui";
5
5
 
6
- import { cn } from "../lib/utils";
6
+ import { cn } from "../lib/utils.ts";
7
7
 
8
8
  const TooltipProvider = TooltipPrimitive.Provider;
9
9