diff --git a/components/search-data-table/data-table.vue b/components/search-data-table/data-table.vue index 20d975f..53714f9 100644 --- a/components/search-data-table/data-table.vue +++ b/components/search-data-table/data-table.vue @@ -13,9 +13,19 @@ import type { SearchResults } from "@/types/api.ts"; const props = defineProps<{ data: SearchResults["results"]; + resultsTotal: number; }>(); const columns: Array> = [ + { + accessorKey: "work_type", + header: () => h("div", "Typ"), + cell: ({ row }) => { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any + const workType = row.getValue("work_type") as Array | undefined; + return h("div", {}, workType?.map((type) => type.name).join(", ")); + }, + }, { accessorKey: "title", header: () => h("div", "Titel"), @@ -23,6 +33,42 @@ const columns: Array> = [ return h("div", row.getValue("title")); }, }, + { + accessorKey: "expression_data", + header: () => h("div", "Edition"), + cell: ({ row }) => { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any + const edition = row.getValue("expression_data") as Array | undefined; + return h("div", {}, edition?.map((type) => type.edition).join(", ")); + }, + }, + { + accessorKey: "expression_data", + header: () => h("div", "Ort"), + cell: ({ row }) => { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any + const placeOfPublication = row.getValue("expression_data") as Array | undefined; + return h("div", {}, placeOfPublication?.map((type) => type.place_of_publication).join(", ")); + }, + }, + { + accessorKey: "expression_data", + header: () => h("div", "Verlag"), + cell: ({ row }) => { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any + const publisher = row.getValue("expression_data") as Array | undefined; + return h("div", {}, publisher?.map((type) => type.publisher).join(", ")); + }, + }, + { + accessorKey: "expression_data", + header: () => h("div", "Veröffentlichungsdatum"), + cell: ({ row }) => { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any + const publicationDate = row.getValue("expression_data") as Array | undefined; + return h("div", {}, publicationDate?.map((type) => type.publication_date).join(", ")); + }, + }, ]; const table = useVueTable({ @@ -37,43 +83,44 @@ const table = useVueTable({ diff --git a/components/search-filter.vue b/components/search-filter.vue new file mode 100644 index 0000000..77162ac --- /dev/null +++ b/components/search-filter.vue @@ -0,0 +1,114 @@ + + + diff --git a/components/search-form.vue b/components/search-form.vue new file mode 100644 index 0000000..ca8decb --- /dev/null +++ b/components/search-form.vue @@ -0,0 +1,57 @@ + + + diff --git a/components/ui/button/index.ts b/components/ui/button/index.ts index ec2a644..8967808 100644 --- a/components/ui/button/index.ts +++ b/components/ui/button/index.ts @@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority"; export { default as Button } from "./Button.vue"; export const buttonVariants = cva( - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", + "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", { variants: { variant: { @@ -14,6 +14,10 @@ export const buttonVariants = cva( secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", ghost: "hover:bg-accent hover:text-accent-foreground", link: "text-primary underline-offset-4 hover:underline", + searchform: + "items-end justify-end bg-none text-lg font-bold text-frisch-orange hover:text-frisch-indigo", + pagination: "bg-frisch-indigo text-lg text-white hover:bg-frisch-indigo/90", + paginationActive: "bg-frisch-orange text-lg text-white", }, size: { default: "h-9 px-4 py-2", @@ -21,6 +25,7 @@ export const buttonVariants = cva( sm: "h-8 rounded-md px-3 text-xs", lg: "h-10 rounded-md px-8", icon: "size-9", + searchform: "h-9", }, }, defaultVariants: { diff --git a/components/ui/checkbox/Checkbox.vue b/components/ui/checkbox/Checkbox.vue new file mode 100644 index 0000000..c29ae11 --- /dev/null +++ b/components/ui/checkbox/Checkbox.vue @@ -0,0 +1,44 @@ + + + diff --git a/components/ui/checkbox/index.ts b/components/ui/checkbox/index.ts new file mode 100644 index 0000000..75be342 --- /dev/null +++ b/components/ui/checkbox/index.ts @@ -0,0 +1 @@ +export { default as Checkbox } from "./Checkbox.vue"; diff --git a/components/ui/input/Input.vue b/components/ui/input/Input.vue new file mode 100644 index 0000000..b46a49e --- /dev/null +++ b/components/ui/input/Input.vue @@ -0,0 +1,33 @@ + + + diff --git a/components/ui/input/index.ts b/components/ui/input/index.ts new file mode 100644 index 0000000..110f046 --- /dev/null +++ b/components/ui/input/index.ts @@ -0,0 +1 @@ +export { default as Input } from "./Input.vue"; diff --git a/components/ui/pagination/PaginationEllipsis.vue b/components/ui/pagination/PaginationEllipsis.vue index 2e32dbf..dea8c94 100644 --- a/components/ui/pagination/PaginationEllipsis.vue +++ b/components/ui/pagination/PaginationEllipsis.vue @@ -20,7 +20,7 @@ const delegatedProps = computed(() => { :class="cn('w-9 h-9 flex items-center justify-center', props.class)" > - + diff --git a/components/ui/pagination/PaginationFirst.vue b/components/ui/pagination/PaginationFirst.vue index f32fe83..50b83b9 100644 --- a/components/ui/pagination/PaginationFirst.vue +++ b/components/ui/pagination/PaginationFirst.vue @@ -22,7 +22,7 @@ const delegatedProps = computed(() => {