Skip to content

Commit e0d4ffc

Browse files
committed
refactor: expand shared-ui, deduplicate cross-package components
shared-ui: - Add Select, Tabs, Tooltip components (previously duplicated) - Add radix-ui, lucide-react dependencies - Export all new components from barrel index - Align tailwind-merge version to ^3.5.0 consent-app & dtr-app: - Add @proxy-smart/shared-ui workspace dependency - Import Select, Tabs, Tooltip from shared-ui instead of local copies - Import cn() from shared-ui instead of local utils.ts - Delete duplicate select.tsx, tabs.tsx, tooltip.tsx, utils.ts - Remaining local components (dialog, separator, etc.) use shared-ui cn() - Align @tailwindcss/vite, tailwindcss, vite versions to match UI package [skip northflank]
1 parent 24faf25 commit e0d4ffc

28 files changed

Lines changed: 42 additions & 377 deletions

bun.lock

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

consent-app/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Proxy Smart Consent App",
44
"description": "SMART on FHIR consent management app — manage FHIR Consent resources for linked Patient records.",
55
"private": true,
6-
"version": "0.0.2-alpha.202603220100.19d90ad5",
6+
"version": "0.0.2-alpha.202603220105.e7f67499",
77
"type": "module",
88
"scripts": {
99
"dev": "vite --port 5174",
@@ -15,12 +15,13 @@
1515
"dependencies": {
1616
"@babelfhir-ts/client-r4": "^0.2.0",
1717
"@fontsource-variable/geist": "^5.2.8",
18+
"@proxy-smart/shared-ui": "workspace:*",
1819
"@radix-ui/react-dialog": "^1.1.15",
1920
"@radix-ui/react-label": "^2.1.8",
2021
"@radix-ui/react-select": "^2.2.6",
2122
"@radix-ui/react-slot": "^1.2.4",
2223
"@radix-ui/react-tabs": "^1.1.13",
23-
"@tailwindcss/vite": "^4.2.1",
24+
"@tailwindcss/vite": "^4.2.2",
2425
"@types/fhir": "^0.0.41",
2526
"class-variance-authority": "^0.7.1",
2627
"clsx": "^2.1.1",
@@ -34,7 +35,7 @@
3435
"shadcn": "^4.0.8",
3536
"sonner": "^2.0.7",
3637
"tailwind-merge": "^3.5.0",
37-
"tailwindcss": "^4.2.1"
38+
"tailwindcss": "^4.2.2"
3839
},
3940
"devDependencies": {
4041
"@types/node": "^25.5.0",
@@ -43,6 +44,6 @@
4344
"@vitejs/plugin-react-swc": "^4.3.0",
4445
"tw-animate-css": "^1.4.0",
4546
"typescript": "5.9.3",
46-
"vite": "^8.0.0"
47+
"vite": "^8.0.1"
4748
}
4849
}

consent-app/src/components/ConsentFilters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
SelectItem,
66
SelectTrigger,
77
SelectValue,
8-
} from "@/components/ui/select"
8+
} from "@proxy-smart/shared-ui"
99
import { Search } from "lucide-react"
1010
import type { ConsentStatusFilter, ConsentSortKey } from "@/hooks/useConsents"
1111

consent-app/src/components/PatientDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from "react"
22
import type { Patient, Consent, Task } from "fhir/r4"
33
import { Card, CardContent, CardHeader, CardTitle, CardAction, Badge, Button, Spinner } from "@proxy-smart/shared-ui"
4-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
4+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@proxy-smart/shared-ui"
55
import {
66
Dialog,
77
DialogContent,

consent-app/src/components/PractitionerDashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from "react"
22
import type { Practitioner, Task } from "fhir/r4"
33
import { Card, CardContent, CardHeader, CardTitle, CardAction, Badge, Button, Spinner } from "@proxy-smart/shared-ui"
4-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
4+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@proxy-smart/shared-ui"
55
import { AccessRequestForm } from "@/components/AccessRequestForm"
66
import { formatHumanName } from "@/lib/fhir-client"
77
import { useAccessRequests } from "@/hooks/useAccessRequests"

consent-app/src/components/ui/dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from "react"
22
import * as DialogPrimitive from "@radix-ui/react-dialog"
33
import { X } from "lucide-react"
4-
import { cn } from "@/lib/utils"
4+
import { cn } from "@proxy-smart/shared-ui"
55

66
const Dialog = DialogPrimitive.Root
77
const DialogTrigger = DialogPrimitive.Trigger

consent-app/src/components/ui/dropdown-menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as React from "react"
44
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
55

6-
import { cn } from "@/lib/utils"
6+
import { cn } from "@proxy-smart/shared-ui"
77
import { CheckIcon, ChevronRightIcon } from "lucide-react"
88

99
function DropdownMenu({

consent-app/src/components/ui/scroll-area.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from "react"
22
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
33

4-
import { cn } from "@/lib/utils"
4+
import { cn } from "@proxy-smart/shared-ui"
55

66
function ScrollArea({
77
className,

consent-app/src/components/ui/separator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from "react"
22
import { Separator as SeparatorPrimitive } from "radix-ui"
33

4-
import { cn } from "@/lib/utils"
4+
import { cn } from "@proxy-smart/shared-ui"
55

66
function Separator({
77
className,

consent-app/src/components/ui/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react"
22

3-
import { cn } from "@/lib/utils"
3+
import { cn } from "@proxy-smart/shared-ui"
44

55
function Table({ className, ...props }: React.ComponentProps<"table">) {
66
return (

0 commit comments

Comments
 (0)