diff --git a/package-lock.json b/package-lock.json index 6198408..96f9349 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@hookform/resolvers": "^3.6.0", "@prisma/client": "^5.15.0", "@radix-ui/react-checkbox": "^1.0.4", + "@radix-ui/react-dialog": "^1.1.0", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-icons": "^1.3.0", "@radix-ui/react-label": "^2.0.2", @@ -691,6 +692,325 @@ } } }, + "node_modules/@radix-ui/react-dialog": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.0.tgz", + "integrity": "sha512-oiSJcsjbdC8JqbXrOuhOd7oaEaPp3x2L2zn6V7ie6SSpEjrAha/WabDX4po6laGwbhAu9DT0XxHL0DmcIXrR0A==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.0", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "aria-hidden": "^1.1.1", + "react-remove-scroll": "2.5.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz", + "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==" + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", + "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz", + "integrity": "sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz", + "integrity": "sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz", + "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.0.tgz", + "integrity": "sha512-0tXZ5O6qAVvuN9SWP0X+zadHf9hzHiMf/vxOU+kXO+fbtS8lS57MXa6EmikDxk9s/Bmkk80+dcxgbvisIyeqxg==", + "dependencies": { + "@radix-ui/react-primitive": "2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.0.tgz", + "integrity": "sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "dependencies": { + "@radix-ui/react-slot": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-escape-keydown": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", + "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", + "dependencies": { + "react-remove-scroll-bar": "^2.3.4", + "react-style-singleton": "^2.2.1", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.0", + "use-sidecar": "^1.1.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-direction": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.1.tgz", diff --git a/prisma/dev.db b/prisma/dev.db index 1261947..b9b835d 100644 Binary files a/prisma/dev.db and b/prisma/dev.db differ diff --git a/src/app/lib/del.ts b/src/app/lib/del.ts index b084877..47f456d 100644 --- a/src/app/lib/del.ts +++ b/src/app/lib/del.ts @@ -11,3 +11,11 @@ export async function deleteStory(id: number) { revalidatePath("/story") redirect("/story") } +export async function deletePub(id: number) { + const res = await prisma.pub.delete({ + where: { id } + }) + console.log(`deleted: ${res}`) + revalidatePath("/publication") + redirect("/publication") +} diff --git a/src/app/lib/get.ts b/src/app/lib/get.ts index 85acb76..93db8d6 100644 --- a/src/app/lib/get.ts +++ b/src/app/lib/get.ts @@ -16,6 +16,11 @@ export async function getStoriesWithGenres() { export async function getPubs() { return prisma.pub.findMany() } +export async function getPubsWithGenres() { + return prisma.pub.findMany({ + include: { genres: true } + }) +} export async function getGenres() { return prisma.genre.findMany() } diff --git a/src/app/publication/columns.tsx b/src/app/publication/columns.tsx new file mode 100644 index 0000000..1c9d081 --- /dev/null +++ b/src/app/publication/columns.tsx @@ -0,0 +1,83 @@ +"use client" +import { ColumnDef, createColumnHelper } from "@tanstack/react-table" +import { ArrowUpDown, MoreHorizontal } from "lucide-react" +import { Button } from "@/components/ui/button" +import { Badge } from "@/components/ui/badge" +import { Trash2, Search } from "lucide-react" +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog" +import { deletePub } from "app/lib/del" +import Link from "next/link" +import { PubsWithGenres } from "./page" + + +const columnHelper = createColumnHelper() + +export const columns: ColumnDef[] = [ + { + accessorKey: "title", + header: ({ column }) => { + return ( + + ) + }, + + }, + { + accessorKey: "link", + header: "Link", + }, + columnHelper.accessor("genres", { + cell: props => { + const genres = props.getValue() + .map(e => {e.name}) + return genres + }, + filterFn: "arrIncludes" + //TODO - write custom filter function, to account for an array of objects + }), + { + id: "actions", + // header: "Actions", + cell: ({ row }) => { + return
+ + + + + + + + Are you sure? + + Deleting a publication cannot be undone! + + + + + + + +
+ } + } + +] + diff --git a/src/app/publication/page.tsx b/src/app/publication/page.tsx new file mode 100644 index 0000000..3e0bc65 --- /dev/null +++ b/src/app/publication/page.tsx @@ -0,0 +1,16 @@ +import { Genre, Pub } from "@prisma/client"; +import { getPubsWithGenres } from "app/lib/get"; +import { columns } from "./columns"; +import { DataTable } from "app/ui/tables/data-table"; + +export type PubsWithGenres = Pub & { genres: Array } + +export default async function Page() { + const pubs = await getPubsWithGenres() + return ( +
+ + +
+ ) +} diff --git a/src/app/story/page.tsx b/src/app/story/page.tsx index d236a71..6f8a9b4 100644 --- a/src/app/story/page.tsx +++ b/src/app/story/page.tsx @@ -1,5 +1,5 @@ import { Story } from "@prisma/client"; -import { DataTable } from "./data-table"; +import { DataTable } from "app/ui/tables/data-table"; import { columns } from "./columns"; import { getStoriesWithGenres } from "app/lib/get"; import { Genre } from "@prisma/client"; diff --git a/src/app/tailwind.css b/src/app/tailwind.css index 76868f7..83babc0 100644 --- a/src/app/tailwind.css +++ b/src/app/tailwind.css @@ -644,6 +644,10 @@ body { left: 0.5rem; } +.left-\[50\%\] { + left: 50%; +} + .right-1 { right: 0.25rem; } @@ -652,6 +656,10 @@ body { right: 0.5rem; } +.right-4 { + right: 1rem; +} + .top-0 { top: 0px; } @@ -660,14 +668,6 @@ body { top: 0.5rem; } -.left-\[50\%\] { - left: 50%; -} - -.right-4 { - right: 1rem; -} - .top-4 { top: 1rem; } @@ -869,6 +869,10 @@ body { min-width: fit-content; } +.max-w-lg { + max-width: 32rem; +} + .max-w-screen-sm { max-width: 640px; } @@ -877,10 +881,6 @@ body { max-width: 24rem; } -.max-w-lg { - max-width: 32rem; -} - .shrink-0 { flex-shrink: 0; } @@ -929,10 +929,6 @@ body { flex-direction: column-reverse; } -.content-center { - align-content: center; -} - .items-start { align-items: flex-start; } @@ -957,10 +953,6 @@ body { justify-content: space-around; } -.justify-items-center { - justify-items: center; -} - .gap-1 { gap: 0.25rem; } @@ -1009,6 +1001,12 @@ body { margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); } +.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); +} + .space-y-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); @@ -1033,24 +1031,10 @@ body { margin-bottom: calc(2rem * var(--tw-space-y-reverse)); } -.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); -} - -.justify-self-start { - justify-self: start; -} - .justify-self-end { justify-self: end; } -.justify-self-center { - justify-self: center; -} - .overflow-auto { overflow: auto; } @@ -1063,6 +1047,10 @@ body { white-space: nowrap; } +.rounded-full { + border-radius: 9999px; +} + .rounded-md { border-radius: calc(var(--radius) - 2px); } @@ -1071,10 +1059,6 @@ body { border-radius: calc(var(--radius) - 4px); } -.rounded-full { - border-radius: 9999px; -} - .border { border-width: 1px; } @@ -1111,6 +1095,10 @@ body { background-color: hsl(var(--background)); } +.bg-black\/80 { + background-color: rgb(0 0 0 / 0.8); +} + .bg-destructive { background-color: hsl(var(--destructive)); } @@ -1144,10 +1132,6 @@ body { background-color: transparent; } -.bg-black\/80 { - background-color: rgb(0 0 0 / 0.8); -} - .fill-current { fill: currentColor; } @@ -1177,6 +1161,11 @@ body { padding-right: 0.5rem; } +.px-2\.5 { + padding-left: 0.625rem; + padding-right: 0.625rem; +} + .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; @@ -1192,6 +1181,16 @@ body { padding-right: 2rem; } +.py-0 { + padding-top: 0px; + padding-bottom: 0px; +} + +.py-0\.5 { + padding-top: 0.125rem; + padding-bottom: 0.125rem; +} + .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; @@ -1217,21 +1216,6 @@ body { padding-bottom: 1rem; } -.px-2\.5 { - padding-left: 0.625rem; - padding-right: 0.625rem; -} - -.py-0 { - padding-top: 0px; - padding-bottom: 0px; -} - -.py-0\.5 { - padding-top: 0.125rem; - padding-bottom: 0.125rem; -} - .pl-3 { padding-left: 0.75rem; } @@ -1278,6 +1262,11 @@ body { line-height: 1.5rem; } +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} + .text-sm { font-size: 0.875rem; line-height: 1.25rem; @@ -1288,11 +1277,6 @@ body { line-height: 1rem; } -.text-lg { - font-size: 1.125rem; - line-height: 1.75rem; -} - .font-black { font-weight: 900; } @@ -1317,22 +1301,14 @@ body { line-height: 1; } -.leading-normal { - line-height: 1.5; -} - -.leading-tight { - line-height: 1.25; +.tracking-tight { + letter-spacing: -0.025em; } .tracking-widest { letter-spacing: 0.1em; } -.tracking-tight { - letter-spacing: -0.025em; -} - .text-accent-foreground { color: hsl(var(--accent-foreground)); } @@ -1402,14 +1378,14 @@ body { opacity: 0.6; } -.opacity-90 { - opacity: 0.9; -} - .opacity-70 { opacity: 0.7; } +.opacity-90 { + opacity: 0.9; +} + .shadow-lg { --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); @@ -1516,6 +1492,10 @@ body { background-color: hsl(var(--accent)); } +.hover\:bg-destructive\/80:hover { + background-color: hsl(var(--destructive) / 0.8); +} + .hover\:bg-destructive\/90:hover { background-color: hsl(var(--destructive) / 0.9); } @@ -1540,18 +1520,6 @@ body { background-color: hsl(var(--secondary) / 0.8); } -.hover\:bg-destructive\/80:hover { - background-color: hsl(var(--destructive) / 0.8); -} - -.hover\:bg-primary\/80:hover { - background-color: hsl(var(--primary) / 0.8); -} - -.hover\:bg-primary\/100:hover { - background-color: hsl(var(--primary) / 1); -} - .hover\:text-accent-foreground:hover { color: hsl(var(--accent-foreground)); } @@ -1850,18 +1818,14 @@ body { --tw-enter-translate-y: 0.5rem; } -.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed] { - --tw-exit-translate-x: 100%; -} - -.data-\[state\=open\]\:slide-in-from-top-full[data-state=open] { - --tw-enter-translate-y: -100%; -} - .data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed] { --tw-exit-translate-x: -50%; } +.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed] { + --tw-exit-translate-x: 100%; +} + .data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed] { --tw-exit-translate-y: -48%; } @@ -1874,6 +1838,10 @@ body { --tw-enter-translate-y: -48%; } +.data-\[state\=open\]\:slide-in-from-top-full[data-state=open] { + --tw-enter-translate-y: -100%; +} + @media (min-width: 640px) { .sm\:bottom-0 { bottom: 0px; @@ -1899,6 +1867,12 @@ body { justify-content: flex-end; } + .sm\:space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); + } + .sm\:space-x-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(1rem * var(--tw-space-x-reverse)); @@ -1911,12 +1885,6 @@ body { margin-bottom: calc(0px * var(--tw-space-y-reverse)); } - .sm\:space-x-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.5rem * var(--tw-space-x-reverse)); - margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); - } - .sm\:rounded-lg { border-radius: var(--radius); } diff --git a/src/app/story/data-table.tsx b/src/app/ui/tables/data-table.tsx similarity index 100% rename from src/app/story/data-table.tsx rename to src/app/ui/tables/data-table.tsx