-
-
+
+
+
{translations?.range ?? "Range"}:
{" "}
{displayRange}
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/description-list.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/description-list.js
new file mode 100644
index 0000000..75bb824
--- /dev/null
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/description-list.js
@@ -0,0 +1,37 @@
+import { cn } from "@keystone/utils/cn";
+
+export function DescriptionList({ className, ...props }) {
+ return (
+
+ );
+}
+
+export function DescriptionTerm({ className, ...props }) {
+ return (
+
+ );
+}
+
+export function DescriptionDetails({ className, ...props }) {
+ return (
+
+ );
+}
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/dialog.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/dialog.js
index 754146f..65a02c6 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/dialog.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/dialog.js
@@ -1,30 +1,136 @@
-"use client";
+// "use client";
-import * as React from "react";
-import * as DialogPrimitive from "@radix-ui/react-dialog";
-import { X } from "lucide-react";
+// import * as React from "react";
+// import * as DialogPrimitive from "@radix-ui/react-dialog";
+// import { X } from "lucide-react";
-import { cn } from "@keystone/utils/cn";
+// import { cn } from "@keystone/utils/cn";
-const Dialog = DialogPrimitive.Root;
+// const Dialog = DialogPrimitive.Root;
-const DialogTrigger = DialogPrimitive.Trigger;
+// const DialogTrigger = DialogPrimitive.Trigger;
-const DialogPortal = DialogPrimitive.Portal;
+// const DialogPortal = DialogPrimitive.Portal;
-const DialogClose = DialogPrimitive.Close;
+// const DialogClose = DialogPrimitive.Close;
+
+// const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (
+//
+// ));
+// DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
+
+// const DialogContent = React.forwardRef(
+// ({ className, children, ...props }, ref) => (
+//
+//
+//
+// {children}
+//
+//
+// Close
+//
+//
+//
+// )
+// );
+// DialogContent.displayName = DialogPrimitive.Content.displayName;
+
+// const DialogHeader = ({ className, ...props }) => (
+//
+// );
+// DialogHeader.displayName = "DialogHeader";
+
+// const DialogFooter = ({ className, ...props }) => (
+//
+// );
+// DialogFooter.displayName = "DialogFooter";
+
+// const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (
+//
+// ));
+// DialogTitle.displayName = DialogPrimitive.Title.displayName;
+
+// const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (
+//
+// ));
+// DialogDescription.displayName = DialogPrimitive.Description.displayName;
+
+// export {
+// Dialog,
+// DialogPortal,
+// DialogOverlay,
+// DialogClose,
+// DialogTrigger,
+// DialogContent,
+// DialogHeader,
+// DialogFooter,
+// DialogTitle,
+// DialogDescription,
+// };
+
+"use client"
+
+import * as React from "react"
+import * as DialogPrimitive from "@radix-ui/react-dialog"
+import { Cross2Icon } from "@radix-ui/react-icons"
+import { cn } from "@keystone/utils/cn"
+
+const Dialog = DialogPrimitive.Root
+
+const DialogTrigger = DialogPrimitive.Trigger
+
+const DialogPortal = DialogPrimitive.Portal
+
+const DialogClose = DialogPrimitive.Close
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (
-));
-DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
+))
+DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
const DialogContent = React.forwardRef(
({ className, children, ...props }, ref) => (
@@ -33,21 +139,21 @@ const DialogContent = React.forwardRef(
{children}
-
+
Close
)
-);
-DialogContent.displayName = DialogPrimitive.Content.displayName;
+)
+DialogContent.displayName = DialogPrimitive.Content.displayName
const DialogHeader = ({ className, ...props }) => (
(
)}
{...props}
/>
-);
-DialogHeader.displayName = "DialogHeader";
+)
+DialogHeader.displayName = "DialogHeader"
const DialogFooter = ({ className, ...props }) => (
(
)}
{...props}
/>
-);
-DialogFooter.displayName = "DialogFooter";
+)
+DialogFooter.displayName = "DialogFooter"
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (
(
)}
{...props}
/>
-));
-DialogTitle.displayName = DialogPrimitive.Title.displayName;
+))
+DialogTitle.displayName = DialogPrimitive.Title.displayName
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (
(
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
-));
-DialogDescription.displayName = DialogPrimitive.Description.displayName;
+))
+DialogDescription.displayName = DialogPrimitive.Description.displayName
export {
Dialog,
DialogPortal,
DialogOverlay,
- DialogClose,
DialogTrigger,
+ DialogClose,
DialogContent,
DialogHeader,
DialogFooter,
DialogTitle,
- DialogDescription,
-};
+ DialogDescription
+}
diff --git a/keystone/themes/Tailwind/odyssey/primitives/default/ui/dropdown-menu.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/dropdown-menu-depracated.js
similarity index 77%
rename from keystone/themes/Tailwind/odyssey/primitives/default/ui/dropdown-menu.js
rename to keystone/themes/Tailwind/atlas/primitives/default/ui/dropdown-menu-depracated.js
index 2233fa1..0ce7c0a 100644
--- a/keystone/themes/Tailwind/odyssey/primitives/default/ui/dropdown-menu.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/dropdown-menu-depracated.js
@@ -1,22 +1,22 @@
-"use client"
+"use client";
-import * as React from "react"
-import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
-import { Check, ChevronRight, Circle } from "lucide-react"
+import * as React from "react";
+import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
+import { Check, ChevronRight, Circle, Loader2 } from "lucide-react";
-import { cn } from "@keystone/utils/cn"
+import { cn } from "@keystone/utils/cn";
-const DropdownMenu = DropdownMenuPrimitive.Root
+const DropdownMenu = DropdownMenuPrimitive.Root;
-const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
+const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
-const DropdownMenuGroup = DropdownMenuPrimitive.Group
+const DropdownMenuGroup = DropdownMenuPrimitive.Group;
-const DropdownMenuPortal = DropdownMenuPrimitive.Portal
+const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
-const DropdownMenuSub = DropdownMenuPrimitive.Sub
+const DropdownMenuSub = DropdownMenuPrimitive.Sub;
-const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
+const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
const DropdownMenuSubTrigger = React.forwardRef(
({ className, inset, children, ...props }, ref) => (
@@ -33,9 +33,9 @@ const DropdownMenuSubTrigger = React.forwardRef(
)
-)
+);
DropdownMenuSubTrigger.displayName =
- DropdownMenuPrimitive.SubTrigger.displayName
+ DropdownMenuPrimitive.SubTrigger.displayName;
const DropdownMenuSubContent = React.forwardRef(
({ className, ...props }, ref) => (
@@ -48,9 +48,9 @@ const DropdownMenuSubContent = React.forwardRef(
{...props}
/>
)
-)
+);
DropdownMenuSubContent.displayName =
- DropdownMenuPrimitive.SubContent.displayName
+ DropdownMenuPrimitive.SubContent.displayName;
const DropdownMenuContent = React.forwardRef(
({ className, sideOffset = 4, ...props }, ref) => (
@@ -59,15 +59,15 @@ const DropdownMenuContent = React.forwardRef(
ref={ref}
sideOffset={sideOffset}
className={cn(
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
+ "z-50 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
/>
)
-)
-DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
+);
+DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
const DropdownMenuItem = React.forwardRef(
({ className, inset, ...props }, ref) => (
@@ -81,11 +81,11 @@ const DropdownMenuItem = React.forwardRef(
{...props}
/>
)
-)
-DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
+);
+DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
const DropdownMenuCheckboxItem = React.forwardRef(
- ({ className, children, checked, ...props }, ref) => (
+ ({ className, children, checked, isLoading, ...props }, ref) => (
-
+ {isLoading ? (
+
+ ) : (
+
+ )}
{children}
)
-)
+);
DropdownMenuCheckboxItem.displayName =
- DropdownMenuPrimitive.CheckboxItem.displayName
+ DropdownMenuPrimitive.CheckboxItem.displayName;
const DropdownMenuRadioItem = React.forwardRef(
({ className, children, ...props }, ref) => (
@@ -125,8 +129,8 @@ const DropdownMenuRadioItem = React.forwardRef(
{children}
)
-)
-DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
+);
+DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
const DropdownMenuLabel = React.forwardRef(
({ className, inset, ...props }, ref) => (
@@ -140,8 +144,8 @@ const DropdownMenuLabel = React.forwardRef(
{...props}
/>
)
-)
-DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
+);
+DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
const DropdownMenuSeparator = React.forwardRef(
({ className, ...props }, ref) => (
@@ -151,8 +155,8 @@ const DropdownMenuSeparator = React.forwardRef(
{...props}
/>
)
-)
-DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
+);
+DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
const DropdownMenuShortcut = ({ className, ...props }) => {
return (
@@ -160,9 +164,9 @@ const DropdownMenuShortcut = ({ className, ...props }) => {
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
{...props}
/>
- )
-}
-DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
+ );
+};
+DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
export {
DropdownMenu,
@@ -179,5 +183,5 @@ export {
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
- DropdownMenuRadioGroup
-}
+ DropdownMenuRadioGroup,
+};
\ No newline at end of file
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/dropdown-menu.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/dropdown-menu.js
index 045488c..61df9e2 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/dropdown-menu.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/dropdown-menu.js
@@ -1,187 +1,157 @@
-"use client";
-import * as React from "react";
-import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
-import { Check, ChevronRight, Circle, Loader2 } from "lucide-react";
-import { cn } from "@keystone/utils/cn";
+'use client'
-const DropdownMenu = DropdownMenuPrimitive.Root;
+import * as Headless from '@headlessui/react'
-const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
+import { Button } from './button'
+import { Link } from './link'
+import { cn } from '@keystone/utils/cn'
-const DropdownMenuGroup = DropdownMenuPrimitive.Group;
+export function Dropdown(props) {
+ return
+}
-const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
+export function DropdownButton({ as = Button, ...props }) {
+ return
+}
-const DropdownMenuSub = DropdownMenuPrimitive.Sub;
-
-const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
-
-const DropdownMenuSubTrigger = React.forwardRef(
- ({ className, inset, children, ...props }, ref) => (
-
- {children}
-
-
- )
-);
-DropdownMenuSubTrigger.displayName =
- DropdownMenuPrimitive.SubTrigger.displayName;
-
-const DropdownMenuSubContent = React.forwardRef(
- ({ className, ...props }, ref) => (
-
- )
-);
-DropdownMenuSubContent.displayName =
- DropdownMenuPrimitive.SubContent.displayName;
-
-const DropdownMenuContent = React.forwardRef(
- ({ className, sideOffset = 4, ...props }, ref) => (
-
-
+
-
+
+ )
+}
+
+export function DropdownItem({ className, ...props }) {
+ let classes = cn(
+ className,
+ // Base styles
+ 'group cursor-default rounded-md px-3.5 py-2.5 focus:outline-none sm:px-3 sm:py-1.5',
+ // Text styles
+ 'text-left text-base/6 text-zinc-700 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]',
+ // Focus
+ 'data-[focus]:bg-blue-500 data-[focus]:text-white',
+ // Disabled state
+ 'data-[disabled]:opacity-50',
+ // Forced colors mode
+ 'forced-color-adjust-none forced-colors:data-[focus]:bg-[Highlight] forced-colors:data-[focus]:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:data-[focus]:text-[HighlightText]',
+ // Use subgrid when available but fallback to an explicit grid layout if not
+ 'col-span-full grid grid-cols-[auto_1fr_1.5rem_0.5rem_auto] items-center supports-[grid-template-columns:subgrid]:grid-cols-subgrid',
+ // Icons
+ '[&>[data-slot=icon]]:col-start-1 [&>[data-slot=icon]]:row-start-1 [&>[data-slot=icon]]:-ml-0.5 [&>[data-slot=icon]]:mr-2.5 [&>[data-slot=icon]]:size-5 sm:[&>[data-slot=icon]]:mr-2 [&>[data-slot=icon]]:sm:size-4',
+ '[&>[data-slot=icon]]:text-zinc-500 [&>[data-slot=icon]]:data-[focus]:text-white [&>[data-slot=icon]]:dark:text-zinc-400 [&>[data-slot=icon]]:data-[focus]:dark:text-white',
+ // Avatar
+ '[&>[data-slot=avatar]]:-ml-1 [&>[data-slot=avatar]]:mr-2.5 [&>[data-slot=avatar]]:size-6 sm:[&>[data-slot=avatar]]:mr-2 sm:[&>[data-slot=avatar]]:size-5'
)
-);
-DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
-const DropdownMenuItem = React.forwardRef(
- ({ className, inset, ...props }, ref) => (
-
+ ) : (
+
+ )
+}
+
+export function DropdownHeader({ className, ...props }) {
+ return
+}
+
+export function DropdownSection({ className, ...props }) {
+ return (
+
)
-);
-DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
+}
-const DropdownMenuCheckboxItem = React.forwardRef(
- ({ className, children, checked, isLoading, ...props }, ref) => (
-
-
-
- {isLoading ? (
-
- ) : (
-
- )}
-
-
- {children}
-
- )
-);
-DropdownMenuCheckboxItem.displayName =
- DropdownMenuPrimitive.CheckboxItem.displayName;
-
-const DropdownMenuRadioItem = React.forwardRef(
- ({ className, children, ...props }, ref) => (
-
-
-
-
-
-
- {children}
-
+ />
)
-);
-DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
+}
-const DropdownMenuLabel = React.forwardRef(
- ({ className, inset, ...props }, ref) => (
-
)
-);
-DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
-
-const DropdownMenuSeparator = React.forwardRef(
- ({ className, ...props }, ref) => (
-
+ )
+}
+
+export function DropdownDescription({ className, ...props }) {
+ return (
+
)
-);
-DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
+}
-const DropdownMenuShortcut = ({ className, ...props }) => {
+export function DropdownShortcut({ keys, className, ...props }) {
return (
-
- );
-};
-DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
-
-export {
- DropdownMenu,
- DropdownMenuTrigger,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuCheckboxItem,
- DropdownMenuRadioItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuShortcut,
- DropdownMenuGroup,
- DropdownMenuPortal,
- DropdownMenuSub,
- DropdownMenuSubContent,
- DropdownMenuSubTrigger,
- DropdownMenuRadioGroup,
-};
+ className={cn(className, 'col-start-5 row-start-1 flex justify-self-end')}
+ >
+ {(Array.isArray(keys) ? keys : keys.split('')).map((char, index) => (
+ 0 && char.length > 1 && 'pl-1',
+ ])}
+ >
+ {char}
+
+ ))}
+
+ )
+}
\ No newline at end of file
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/form.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/form.js
index 903c1df..ed0e533 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/form.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/form.js
@@ -3,7 +3,7 @@ import { Slot } from "@radix-ui/react-slot";
import { Controller, FormProvider, useFormContext } from "react-hook-form";
import { cn } from "@keystone/utils/cn";
-import { Label } from "@/registry/default/ui/label";
+import { Label } from "./label";
const Form = FormProvider;
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/input-depracated.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/input-depracated.js
new file mode 100644
index 0000000..67cf874
--- /dev/null
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/input-depracated.js
@@ -0,0 +1,20 @@
+import * as React from "react";
+
+import { cn } from "@keystone/utils/cn";
+
+const Input = React.forwardRef(({ className, type, ...props }, ref) => {
+ return (
+
+ );
+});
+Input.displayName = "Input";
+
+export { Input };
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/input.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/input.js
index 5845eae..67cf874 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/input.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/input.js
@@ -7,7 +7,7 @@ const Input = React.forwardRef(({ className, type, ...props }, ref) => {
{
+ const [selectedValues, setSelectedValues] = React.useState(defaultValue);
+ const [isOpen, setIsOpen] = React.useState(false);
+ const [searchTerm, setSearchTerm] = React.useState("");
+
+ React.useEffect(() => {
+ setSelectedValues(defaultValue);
+ }, [defaultValue]);
+
+ const toggleOption = (value) => {
+ const newSelectedValues = selectedValues.includes(value)
+ ? selectedValues.filter((v) => v !== value)
+ : [...selectedValues, value];
+ setSelectedValues(newSelectedValues);
+ onValueChange(newSelectedValues);
+ };
+
+ const handleClear = () => {
+ setSelectedValues([]);
+ onValueChange([]);
+ };
+
+ const toggleAll = () => {
+ if (selectedValues.length === options.length) {
+ handleClear();
+ } else {
+ const allValues = options.map((option) => option.value);
+ setSelectedValues(allValues);
+ onValueChange(allValues);
+ }
+ };
+
+ const filteredOptions = options.filter((option) =>
+ option.label.toLowerCase().includes(searchTerm.toLowerCase())
+ );
+
+ return (
+
+
+ 0 ? "h-full" : "h-10",
+ className
+ )}
+ >
+
+ {selectedValues.length > 0 ? (
+ selectedValues.slice(0, maxCount).map((value) => (
+
+ {options.find((option) => option.value === value)?.label}
+ {
+ e.stopPropagation();
+ toggleOption(value);
+ }}
+ >
+
+
+
+ ))
+ ) : (
+ {placeholder}
+ )}
+ {selectedValues.length > maxCount && (
+
+ +{selectedValues.length - maxCount} more
+
+ )}
+
+
+
+
+
+
+
setSearchTerm(e.target.value)}
+ />
+
+
+
+ {selectedValues.length === options.length && (
+
+ )}
+
+
Select All
+
+ {filteredOptions.map((option) => (
+
toggleOption(option.value)}
+ >
+
+ {selectedValues.includes(option.value) && (
+
+ )}
+
+
{option.label}
+
+ ))}
+
+ {selectedValues.length > 0 && (
+
{
+ handleClear();
+ setIsOpen(false);
+ }}
+ >
+ Clear
+
+ )}
+
+
+
+ );
+ }
+);
+
+MultiSelect.displayName = "MultiSelect";
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/navbar.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/navbar.js
new file mode 100644
index 0000000..bd0c1d9
--- /dev/null
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/navbar.js
@@ -0,0 +1,84 @@
+'use client'
+
+import * as Headless from '@headlessui/react'
+import { LayoutGroup, motion } from 'framer-motion'
+import React, { useId } from 'react'
+import { TouchTarget } from './button'
+import { Link } from './link'
+import { cn } from '@keystone/utils/cn'
+
+export function Navbar({ className, ...props }) {
+ return
+}
+
+export function NavbarDivider({ className, ...props }) {
+ return
+}
+
+export function NavbarSection({ className, ...props }) {
+ let id = useId()
+
+ return (
+
+
+
+ )
+}
+
+export function NavbarSpacer({ className, ...props }) {
+ return
+}
+
+export const NavbarItem = React.forwardRef(function NavbarItem(
+ { current, className, children, ...props },
+
+ ref
+) {
+ let classes = cn(
+ // Base
+ 'relative flex min-w-0 items-center gap-3 rounded-lg p-2 text-left text-base/6 font-medium text-zinc-950 sm:text-sm/5',
+ // Leading icon/icon-only
+ 'data-[slot=icon]:*:size-6 data-[slot=icon]:*:shrink-0 data-[slot=icon]:*:fill-zinc-500 sm:data-[slot=icon]:*:size-5',
+ // Trailing icon (down chevron or similar)
+ 'data-[slot=icon]:last:[&:not(:nth-child(2))]:*:ml-auto data-[slot=icon]:last:[&:not(:nth-child(2))]:*:size-5 sm:data-[slot=icon]:last:[&:not(:nth-child(2))]:*:size-4',
+ // Avatar
+ 'data-[slot=avatar]:*:-m-0.5 data-[slot=avatar]:*:size-7 data-[slot=avatar]:*:[--avatar-radius:theme(borderRadius.DEFAULT)] data-[slot=avatar]:*:[--ring-opacity:10%] sm:data-[slot=avatar]:*:size-6',
+ // Hover
+ 'data-[hover]:bg-zinc-950/5 data-[slot=icon]:*:data-[hover]:fill-zinc-950',
+ // Active
+ 'data-[active]:bg-zinc-950/5 data-[slot=icon]:*:data-[active]:fill-zinc-950',
+ // Dark mode
+ 'dark:text-white dark:data-[slot=icon]:*:fill-zinc-400',
+ 'dark:data-[hover]:bg-white/5 dark:data-[slot=icon]:*:data-[hover]:fill-white',
+ 'dark:data-[active]:bg-white/5 dark:data-[slot=icon]:*:data-[active]:fill-white'
+ )
+
+ return (
+
+ {current && (
+
+ )}
+ {'href' in props ? (
+
+ {children}
+
+ ) : (
+
+ {children}
+
+ )}
+
+ )
+})
+
+export function NavbarLabel({ className, ...props }) {
+ return
+}
\ No newline at end of file
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/select.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/select.js
index 138babb..d6f56fc 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/select.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/select.js
@@ -1,23 +1,22 @@
-"use client";
+"use client"
-import * as React from "react";
-import * as SelectPrimitive from "@radix-ui/react-select";
-import { Check, ChevronDown } from "lucide-react";
+import * as React from "react"
+import * as SelectPrimitive from "@radix-ui/react-select"
+import { Check, ChevronDown, ChevronUp } from "lucide-react"
+import { cn } from "@keystone/utils/cn"
-import { cn } from "@keystone/utils/cn";
+const Select = SelectPrimitive.Root
-const Select = SelectPrimitive.Root;
+const SelectGroup = SelectPrimitive.Group
-const SelectGroup = SelectPrimitive.Group;
-
-const SelectValue = SelectPrimitive.Value;
+const SelectValue = SelectPrimitive.Value
const SelectTrigger = React.forwardRef(
({ className, children, ...props }, ref) => (
span]:line-clamp-1",
className
)}
{...props}
@@ -28,8 +27,41 @@ const SelectTrigger = React.forwardRef(
)
-);
-SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
+)
+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
+
+const SelectScrollUpButton = React.forwardRef(
+ ({ className, ...props }, ref) => (
+
+
+
+ )
+)
+SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
+
+const SelectScrollDownButton = React.forwardRef(
+ ({ className, ...props }, ref) => (
+
+
+
+ )
+)
+SelectScrollDownButton.displayName =
+ SelectPrimitive.ScrollDownButton.displayName
const SelectContent = React.forwardRef(
({ className, children, position = "popper", ...props }, ref) => (
@@ -37,7 +69,7 @@ const SelectContent = React.forwardRef(
+
{children}
+
)
-);
-SelectContent.displayName = SelectPrimitive.Content.displayName;
+)
+SelectContent.displayName = SelectPrimitive.Content.displayName
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (
(
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
{...props}
/>
-));
-SelectLabel.displayName = SelectPrimitive.Label.displayName;
+))
+SelectLabel.displayName = SelectPrimitive.Label.displayName
const SelectItem = React.forwardRef(
({ className, children, ...props }, ref) => (
@@ -88,8 +122,8 @@ const SelectItem = React.forwardRef(
{children}
)
-);
-SelectItem.displayName = SelectPrimitive.Item.displayName;
+)
+SelectItem.displayName = SelectPrimitive.Item.displayName
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (
(
className={cn("-mx-1 my-1 h-px bg-muted", className)}
{...props}
/>
-));
-SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
+))
+SelectSeparator.displayName = SelectPrimitive.Separator.displayName
export {
Select,
@@ -109,4 +143,6 @@ export {
SelectLabel,
SelectItem,
SelectSeparator,
-};
+ SelectScrollUpButton,
+ SelectScrollDownButton
+}
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/sheet.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/sheet.js
index 09832dc..7aa146f 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/sheet.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/sheet.js
@@ -73,7 +73,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName
const SheetHeader = ({ className, ...props }) => (
+
+
+ );
+}
+
+function CloseMenuIcon() {
+ return (
+
+
+
+ );
+}
+
+function MobileSidebar({ open, close, children }) {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export function SidebarLayout({ navbar, sidebar, children, logo }) {
+ let [showSidebar, setShowSidebar] = useState(false);
+
+ return (
+
+ {/* Sidebar on desktop */}
+
{sidebar}
+
+ {/* Sidebar on mobile */}
+
setShowSidebar(false)}>
+ {sidebar}
+
+
+ {/* Navbar on mobile */}
+
+
+ {/* Content */}
+
+
+
+
+ );
+}
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/sidebar.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/sidebar.js
new file mode 100644
index 0000000..46407eb
--- /dev/null
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/sidebar.js
@@ -0,0 +1,159 @@
+"use client";
+
+import * as Headless from "@headlessui/react";
+import { LayoutGroup, motion } from "framer-motion";
+import { default as React, useId } from "react";
+import { TouchTarget } from "./button";
+import { Link } from "./link";
+import { cn } from "@keystone/utils/cn";
+
+export function Sidebar({ className, ...props }) {
+ return
;
+}
+
+export function SidebarHeader({ className, ...props }) {
+ return (
+
[data-slot=section]+[data-slot=section]]:mt-2.5"
+ )}
+ />
+ );
+}
+
+export function SidebarBody({ className, ...props }) {
+ return (
+
[data-slot=section]+[data-slot=section]]:mt-8"
+ )}
+ />
+ );
+}
+
+export function SidebarFooter({ className, ...props }) {
+ return (
+
[data-slot=section]+[data-slot=section]]:mt-2.5"
+ )}
+ />
+ );
+}
+
+export function SidebarSection({ className, ...props }) {
+ let id = useId();
+
+ return (
+
+
+
+ );
+}
+
+export function SidebarDivider({ className, ...props }) {
+ return (
+
+ );
+}
+
+export function SidebarSpacer({ className, ...props }) {
+ return (
+
+ );
+}
+
+export function SidebarHeading({ className, ...props }) {
+ return (
+
+ );
+}
+
+export const SidebarItem = React.forwardRef(function SidebarItem(
+ { current, className, children, ...props },
+
+ ref
+) {
+ let classes = cn(
+ // Base
+ "flex w-full items-center gap-3 rounded-lg px-2 py-2.5 text-left text-base/6 font-medium text-zinc-950 sm:py-2 sm:text-sm/5",
+ // Leading icon/icon-only
+ "data-[slot=icon]:*:size-6 data-[slot=icon]:*:shrink-0 data-[slot=icon]:*:fill-zinc-500 sm:data-[slot=icon]:*:size-5",
+ // Trailing icon (down chevron or similar)
+ "data-[slot=icon]:last:*:ml-auto data-[slot=icon]:last:*:size-5 sm:data-[slot=icon]:last:*:size-4",
+ // Avatar
+ "data-[slot=avatar]:*:-m-0.5 data-[slot=avatar]:*:size-7 data-[slot=avatar]:*:[--ring-opacity:10%] sm:data-[slot=avatar]:*:size-6",
+ // Hover
+ "data-[hover]:bg-zinc-950/5 data-[slot=icon]:*:data-[hover]:fill-zinc-950",
+ // Active
+ "data-[active]:bg-zinc-950/5 data-[slot=icon]:*:data-[active]:fill-zinc-950",
+ // Current
+ "data-[slot=icon]:*:data-[current]:fill-zinc-950",
+ // Dark mode
+ "dark:text-white dark:data-[slot=icon]:*:fill-zinc-400",
+ "dark:data-[hover]:bg-white/5 dark:data-[slot=icon]:*:data-[hover]:fill-white",
+ "dark:data-[active]:bg-white/5 dark:data-[slot=icon]:*:data-[active]:fill-white",
+ "dark:data-[slot=icon]:*:data-[current]:fill-white"
+ );
+
+ return (
+
+ {current && (
+
+ )}
+ {"href" in props ? (
+
+ {children}
+
+ ) : (
+
+ {children}
+
+ )}
+
+ );
+});
+
+export function SidebarLabel({ className, ...props }) {
+ return
;
+}
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/skeleton.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/skeleton.js
index acff4ce..64938d4 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/skeleton.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/skeleton.js
@@ -3,7 +3,7 @@ import { cn } from "@keystone/utils/cn";
function Skeleton({ className, ...props }) {
return (
);
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/table.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/table.js
index e0e2d88..86fe345 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/table.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/table.js
@@ -52,7 +52,7 @@ const TableHead = React.forwardRef(({ className, ...props }, ref) => (
(
));
diff --git a/keystone/themes/Tailwind/odyssey/primitives/default/ui/tabs.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/tabs-depracated.js
similarity index 100%
rename from keystone/themes/Tailwind/odyssey/primitives/default/ui/tabs.js
rename to keystone/themes/Tailwind/atlas/primitives/default/ui/tabs-depracated.js
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/tabs.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/tabs.js
index 3ad7196..2eba05b 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/tabs.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/tabs.js
@@ -1,46 +1,122 @@
-"use client";
+import * as TabsPrimitives from "@radix-ui/react-tabs";
+import React from "react";
+import { focusRing } from "./utils";
+import { cn } from "@keystone/utils/cn";
-import * as React from "react";
-import * as TabsPrimitive from "@radix-ui/react-tabs";
+const Tabs = (props) => {
+ return
;
+};
+Tabs.displayName = "Tabs";
-import { cn } from "@keystone/utils/cn";
+const TabsListVariantContext = React.createContext("line");
+
+const variantStyles = {
+ line: cn(
+ // base
+ "flex items-center justify-start border-b",
+ // border color
+ "border-zinc-200 dark:border-zinc-800"
+ ),
+ solid: cn(
+ // base
+ "inline-flex items-center justify-center rounded-md p-1",
+ // border color
+ // "border-zinc-200 dark:border-zinc-800",
+ // background color
+ "bg-zinc-100 dark:bg-zinc-800"
+ ),
+};
+
+const TabsList = React.forwardRef(
+ (
+ {
+ className,
+ variant = "line",
+ orientation = "horizontal",
+ children,
+ ...props
+ },
+ forwardedRef
+ ) => (
+
+
+ {children}
+
+
+ )
+);
+TabsList.displayName = "TabsList";
+
+function getVariantStyles(tabVariant) {
+ switch (tabVariant) {
+ case "line":
+ return cn(
+ // base
+ "-mb-px items-center justify-center whitespace-nowrap border-b-2 border-transparent px-3 pb-3 text-sm font-medium transition-all",
+ // text color
+ "text-zinc-500 dark:text-zinc-500",
+ // hover
+ "hover:text-zinc-500 hover:dark:text-zinc-400",
+ // border hover
+ "hover:border-zinc-500 hover:dark:border-zinc-400",
+ // selected
+ "data-[state=active]:border-zinc-500 data-[state=active]:text-zinc-500",
+ "data-[state=active]:dark:border-zinc-400 data-[state=active]:dark:text-zinc-400",
+ // disabled
+ "disabled:pointer-events-none",
+ "disabled:text-zinc-300 disabled:dark:text-zinc-700"
+ );
+ case "solid":
+ return cn(
+ // base
+ "inline-flex items-center justify-center whitespace-nowrap rounded px-3 py-1 transition-all text-sm font-medium",
+ // text color
+ "text-zinc-500 dark:text-zinc-400",
+ // hover
+ "hover:text-zinc-700 hover:dark:text-zinc-200",
+ // selected
+ "data-[state=active]:bg-white data-[state=active]:text-zinc-900 data-[state=active]:shadow",
+ "data-[state=active]:dark:bg-zinc-900 data-[state=active]:dark:text-zinc-50",
+ // disabled
+ "disabled:pointer-events-none disabled:text-zinc-400 disabled:dark:text-zinc-600 disabled:opacity-50"
+ );
+ }
+}
+
+const TabsTrigger = React.forwardRef(
+ ({ className, children, ...props }, forwardedRef) => {
+ const variant = React.useContext(TabsListVariantContext);
+ return (
+
+ {children}
+
+ );
+ }
+);
+TabsTrigger.displayName = "TabsTrigger";
+
+const TabsContent = React.forwardRef(
+ ({ className, ...props }, forwardedRef) => (
+
+ )
+);
+TabsContent.displayName = "TabsContent";
-const Tabs = TabsPrimitive.Root;
-
-const TabsList = React.forwardRef(({ className, ...props }, ref) => (
-
-));
-TabsList.displayName = TabsPrimitive.List.displayName;
-
-const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (
-
-));
-TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
-
-const TabsContent = React.forwardRef(({ className, ...props }, ref) => (
-
-));
-TabsContent.displayName = TabsPrimitive.Content.displayName;
-
-export { Tabs, TabsList, TabsTrigger, TabsContent };
+export { Tabs, TabsContent, TabsList, TabsTrigger };
diff --git a/keystone/themes/Tailwind/odyssey/primitives/default/ui/toast.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/toast-depracated.js
similarity index 100%
rename from keystone/themes/Tailwind/odyssey/primitives/default/ui/toast.js
rename to keystone/themes/Tailwind/atlas/primitives/default/ui/toast-depracated.js
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/toast.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/toast.js
index aacb791..6b122bb 100644
--- a/keystone/themes/Tailwind/atlas/primitives/default/ui/toast.js
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/toast.js
@@ -20,7 +20,7 @@ const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
const toastVariants = cva(
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
+ "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-4 pr-6 shadow-md transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
{
variants: {
variant: {
@@ -76,7 +76,7 @@ ToastClose.displayName = ToastPrimitives.Close.displayName;
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (
));
diff --git a/keystone/themes/Tailwind/atlas/primitives/default/ui/utils.js b/keystone/themes/Tailwind/atlas/primitives/default/ui/utils.js
new file mode 100644
index 0000000..666a5bd
--- /dev/null
+++ b/keystone/themes/Tailwind/atlas/primitives/default/ui/utils.js
@@ -0,0 +1,5 @@
+export const focusRing = [
+ // base
+ "outline outline-offset-2 outline-0 focus-visible:outline-2", // outline color
+ "outline-blue-500 dark:outline-blue-500",
+];
diff --git a/keystone/themes/Tailwind/atlas/primitives/focusRing.js b/keystone/themes/Tailwind/atlas/primitives/focusRing.js
deleted file mode 100644
index ffd4f14..0000000
--- a/keystone/themes/Tailwind/atlas/primitives/focusRing.js
+++ /dev/null
@@ -1,4 +0,0 @@
-export const focusRing = [
- "outline outline-offset-2 outline-0 focus-visible:outline-2",
- "outline-blue-500 dark:outline-blue-500",
-];
diff --git a/keystone/themes/Tailwind/atlas/screens/CreateItemPage/index.js b/keystone/themes/Tailwind/atlas/screens/CreateItemPage/index.js
index f53d9f9..45c21a2 100644
--- a/keystone/themes/Tailwind/atlas/screens/CreateItemPage/index.js
+++ b/keystone/themes/Tailwind/atlas/screens/CreateItemPage/index.js
@@ -1,14 +1,14 @@
-import { Fields } from "@keystone/components/Fields";
import { useKeystone, useList } from "@keystone/keystoneProvider";
-import { GraphQLErrorNotice } from "@keystone/components/GraphQLErrorNotice";
import { useCreateItem } from "@keystone/utils/useCreateItem";
-import { Container } from "@keystone/components/Container";
-import { AdminLink } from "@keystone/components/AdminLink";
-
import { useRouter } from "next/navigation";
import { models } from "@keystone/models";
import { getNamesFromList } from "@keystone/utils/getNamesFromList";
-import { Button } from "@keystone/primitives/default/ui/button";
+import { Link } from "next-view-transitions";
+import { Fields } from "../../components/Fields";
+import { GraphQLErrorNotice } from "../../components/GraphQLErrorNotice";
+import { Container } from "../../components/Container";
+import { AdminLink } from "../../components/AdminLink";
+import { Button } from "../../primitives/default/ui/button";
import {
Breadcrumb,
BreadcrumbItem,
@@ -16,8 +16,8 @@ import {
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
-} from "@keystone/primitives/default/ui/breadcrumb";
-import Link from "next/link";
+} from "../../primitives/default/ui/breadcrumb";
+import { basePath } from "@keystone/index";
export const CreateItemPage = ({ params }) => {
const listKey = params.listKey;
@@ -35,7 +35,7 @@ export const CreateItemPage = ({ params }) => {
const router = useRouter();
- const adminPath = process.env.NEXT_PUBLIC_ADMIN_PATH || "/dashboard";
+ const adminPath = basePath
return (
@@ -51,7 +51,7 @@ export const CreateItemPage = ({ params }) => {
{list.isSingleton ? (
-
+
{list.label}
) : (
@@ -111,14 +111,12 @@ export const CreateItemPage = ({ params }) => {
{
const item = await createItem.create();
if (item) {
router.push(`${adminPath}/${list.path}/${item.id}`);
}
}}
- // size="lg"
className="ml-auto"
>
Create {list.singular}
diff --git a/keystone/themes/Tailwind/atlas/screens/HomePage/index.js b/keystone/themes/Tailwind/atlas/screens/HomePage/index.js
index c7b7fb1..d154503 100644
--- a/keystone/themes/Tailwind/atlas/screens/HomePage/index.js
+++ b/keystone/themes/Tailwind/atlas/screens/HomePage/index.js
@@ -3,60 +3,17 @@ import { useMemo } from "react";
import { makeDataGetter } from "@keystone-6/core/admin-ui/utils";
import { gql, useQuery } from "@keystone-6/core/admin-ui/apollo";
import { useKeystone, useList } from "@keystone/keystoneProvider";
-import { AdminLink } from "@keystone/components/AdminLink";
-import { LoadingIcon } from "@keystone/components/LoadingIcon";
-import { Card } from "@keystone/primitives/default/ui/card";
-import { Button } from "@keystone/primitives/default/ui/button";
-import { Skeleton } from "@keystone/primitives/default/ui/skeleton";
-import { ExternalLink, PlusIcon } from "lucide-react";
+import { PlusIcon } from "lucide-react";
+import { Skeleton } from "../../primitives/default/ui/skeleton";
+import { LoadingIcon } from "../../components/LoadingIcon";
+import { AdminLink } from "../../components/AdminLink";
const ListCard = ({ listKey, count, hideCreate }) => {
const list = useList(listKey);
return (
- //
- //
-
- //
- //
- // {list.label}{" "}
- //
-
- // {list.isSingleton ? null : count.type === "success" ? (
- //
- // {count.count} item{count.count !== 1 ? "s" : ""}
- //
- // ) : count.type === "error" ? (
- // count.message
- // ) : count.type === "loading" ? (
- //
- // ) : (
- // "No access"
- // )}
- //
- // {hideCreate === false && !list.isSingleton && (
- //
- //
- //
- //
- //
- // )}
- //
-
- {/*
*/}
- {/*
- H1
-
*/}
- {/*
- Hello
-
*/}
-
-
+
+
+
{list.isSingleton ? null : count.type === "success" ? (
count.count
) : count.type === "error" ? (
@@ -68,7 +25,7 @@ const ListCard = ({ listKey, count, hideCreate }) => {
)}
{list.label}
@@ -84,18 +41,18 @@ const ListCard = ({ listKey, count, hideCreate }) => {
)} */}
- {/*
+ {/*
*/}
- {/*
+ {/*
*/}
- {/*
+ {/*
*/}
{hideCreate === false && !list.isSingleton && (
-
+
@@ -142,91 +99,8 @@ export const HomePage = () => {
{visibleLists.state === "loading" ? (
) : (
- //
- //
- //
- //
- //
- //
- // H1
- //
- //
- //
- // 02
- //
- //
- // Text
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
-
-
+
{(() => {
- console.log({ lists });
if (visibleLists.state === "error") {
return (
diff --git a/keystone/themes/Tailwind/atlas/screens/InitPage/index.js b/keystone/themes/Tailwind/atlas/screens/InitPage/index.js
index 9475e52..8bd94ce 100644
--- a/keystone/themes/Tailwind/atlas/screens/InitPage/index.js
+++ b/keystone/themes/Tailwind/atlas/screens/InitPage/index.js
@@ -10,9 +10,9 @@ import {
} from "@keystone-6/core/admin-ui/utils";
import { useRedirect } from "@keystone/utils/useRedirect";
import { useReinitContext, useKeystone } from "@keystone/keystoneProvider";
-import Head from "next/head";
-import { Fields } from "@keystone/components/Fields";
-import { GraphQLErrorNotice } from "@keystone/components/GraphQLErrorNotice";
+import { Outfit } from "next/font/google";
+import { Button } from "../../primitives/default/ui/button";
+import { GraphQLErrorNotice } from "../../components/GraphQLErrorNotice";
import {
Card,
CardContent,
@@ -20,14 +20,12 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@keystone/primitives/default/ui/card";
-import { Button } from "@keystone/primitives/default/ui/button";
-import { Logo } from "@keystone/logo";
-import { Outfit } from "next/font/google";
+} from "../../primitives/default/ui/card";
+import { Logo } from "../../components/Logo";
+import { Fields } from "../../components/Fields";
const montserrat = Outfit({ subsets: ["latin"] });
-
export function InitPage({
fieldPaths = ["name", "email", "password"],
listKey = "User",
@@ -118,18 +116,17 @@ export function InitPage({
};
return (
-
-
-
-
-
+
+
+
+ {/* {error && (
+
+ Error
+ {error.message}
+
+ )}
+ {data?.authenticate?.__typename === failureTypename && (
+
+ Error
+ {data?.authenticate.message}
+
+ )} */}
);
diff --git a/keystone/themes/Tailwind/atlas/screens/ItemPage/index.js b/keystone/themes/Tailwind/atlas/screens/ItemPage/index.js
index 1221425..09b7837 100644
--- a/keystone/themes/Tailwind/atlas/screens/ItemPage/index.js
+++ b/keystone/themes/Tailwind/atlas/screens/ItemPage/index.js
@@ -9,7 +9,12 @@ import {
useRef,
useState,
} from "react";
-
+import { models } from "@keystone/models";
+import { getNamesFromList } from "@keystone/utils/getNamesFromList";
+import { AlertTriangle } from "lucide-react";
+import { Link } from "next-view-transitions";
+import { useList } from "@keystone/keystoneProvider";
+import { usePreventNavigation } from "@keystone/utils/usePreventNavigation";
import { gql, useMutation, useQuery } from "@keystone-6/core/admin-ui/apollo";
import {
deserializeValue,
@@ -17,34 +22,11 @@ import {
useChangedFieldsAndDataForUpdate,
useInvalidFields,
} from "@keystone-6/core/admin-ui/utils";
-import { CreateButtonLink } from "@keystone/components/CreateButtonLink";
-import { FieldLabel } from "@keystone/components/FieldLabel";
-import { Fields } from "@keystone/components/Fields";
-import { GraphQLErrorNotice } from "@keystone/components/GraphQLErrorNotice";
-import { AlertDialog } from "@keystone/components/Modals";
-import { useToasts } from "@keystone/components/Toast";
-import { useList } from "@keystone/keystoneProvider";
-import { usePreventNavigation } from "@keystone/utils/usePreventNavigation";
-import { AdminLink } from "@keystone/components/AdminLink";
-
-import { models } from "@keystone/models";
-import { getNamesFromList } from "@keystone/utils/getNamesFromList";
-import { Button } from "@keystone/primitives/default/ui/button";
-import { LoadingIcon } from "@keystone/components/LoadingIcon";
-import Link from "next/link";
-import { Skeleton } from "@keystone/primitives/default/ui/skeleton";
-import { AlertCircle, AlertTriangle, ClipboardIcon } from "lucide-react";
import {
Alert,
AlertDescription,
AlertTitle,
-} from "@keystone/primitives/default/ui/alert";
-import {
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger,
-} from "@keystone/primitives/default/ui/tooltip";
+} from "../../primitives/default/ui/alert";
import {
Dialog,
DialogClose,
@@ -54,7 +36,7 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from "@keystone/primitives/default/ui/dialog";
+} from "../../primitives/default/ui/dialog";
import {
Breadcrumb,
BreadcrumbItem,
@@ -62,7 +44,17 @@ import {
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
-} from "@keystone/primitives/default/ui/breadcrumb";
+} from "../../primitives/default/ui/breadcrumb";
+import { CreateButtonLink } from "../../components/CreateButtonLink";
+import { FieldLabel } from "../../components/FieldLabel";
+import { Fields } from "../../components/Fields";
+import { GraphQLErrorNotice } from "../../components/GraphQLErrorNotice";
+import { useToasts } from "../../components/Toast";
+import { AdminLink } from "../../components/AdminLink";
+import { Button } from "../../primitives/default/ui/button";
+import { LoadingIcon } from "../../components/LoadingIcon";
+import { Skeleton } from "../../primitives/default/ui/skeleton";
+import { basePath } from "@keystone/index";
export function ItemPageHeader(props) {
return (
@@ -72,7 +64,7 @@ export function ItemPageHeader(props) {
{props.list.label}
@@ -119,7 +111,7 @@ export function ItemPageHeader(props) {
-
@@ -160,7 +152,8 @@ export function ColumnLayout(props) {
export function BaseToolbar(props) {
return (
-
+ //
+
{props.children}
);
@@ -370,27 +363,28 @@ function DeleteButton({ itemLabel, itemId, list }) {
);
const router = useRouter();
- const adminPath = process.env.NEXT_PUBLIC_ADMIN_PATH || "/dashboard";
+ const adminPath = basePath;
return (
- Delete
+ Delete
Delete Confirmation
-
+
Are you sure you want to delete {itemLabel} ?
- Close
+ Close
{
try {
await deleteItem();
@@ -438,6 +432,8 @@ export const ItemPage = ({ params }) => {
export const ItemPageTemplate = ({ listKey, id }) => {
const list = useList(listKey);
+ console.log(list.fields);
+
const { query, selectedFields } = useMemo(() => {
const selectedFields = Object.entries(list.fields)
.filter(
@@ -450,6 +446,7 @@ export const ItemPageTemplate = ({ listKey, id }) => {
return list.fields[fieldKey].controller.graphqlSelection;
})
.join("\n");
+ console.log({ selectedFields });
return {
selectedFields,
query: gql`
@@ -534,7 +531,7 @@ export const ItemPageTemplate = ({ listKey, id }) => {
{list.isSingleton ? (
-
+
{list.label}
) : (
@@ -663,10 +660,9 @@ const Toolbar = memo(function Toolbar({
No changes
)}
Save changes
@@ -682,18 +678,22 @@ function ResetChangesButton(props) {
- Reset changes
+ Reset changes
Reset Confirmation
- Are you sure you want to reset changes?
+
+ Are you sure you want to reset changes?
+
- Close
+ Close
- props.onReset()}>Reset Changes
+ props.onReset()}>
+ Reset Changes
+
diff --git a/keystone/themes/Tailwind/atlas/screens/ListPage/index.js b/keystone/themes/Tailwind/atlas/screens/ListPage/index.js
index 06ae037..f50dee5 100644
--- a/keystone/themes/Tailwind/atlas/screens/ListPage/index.js
+++ b/keystone/themes/Tailwind/atlas/screens/ListPage/index.js
@@ -12,30 +12,34 @@ import { useSelectedFields } from "@keystone/utils/useSelectedFields";
import { useSort } from "@keystone/utils/useSort";
import { models } from "@keystone/models";
import { getNamesFromList } from "@keystone/utils/getNamesFromList";
-
-import { CreateButtonLink } from "@keystone/components/CreateButtonLink";
-import { DeleteManyButton } from "@keystone/components/DeleteManyButton";
-import { FieldSelection } from "@keystone/components/FieldSelection";
-import { FilterAdd } from "@keystone/components/FilterAdd";
-import { FilterList } from "@keystone/components/FilterList";
-import { ListTable } from "@keystone/components/ListTable";
-import { SortSelection } from "@keystone/components/SortSelection";
-import { Input } from "@keystone/primitives/default/ui/input";
-import { Button } from "@keystone/primitives/default/ui/button";
import {
ArrowUpDown,
- ChevronRight,
Circle,
- Columns3,
- PlusIcon,
Search,
Square,
SquareArrowRight,
Triangle,
+ PlusCircleIcon,
+ PlusIcon as PlusIcon2,
+ ChevronDown,
+ SearchIcon,
+ Filter,
+ ArrowRight,
+ ChevronRight,
+ Columns3,
} from "lucide-react";
-
-import { LoadingIcon } from "@keystone/components/LoadingIcon";
-import Link from "next/link";
+import { Link } from "next-view-transitions";
+
+import { CreateButtonLink } from "../../components/CreateButtonLink";
+import { DeleteManyButton } from "../../components/DeleteManyButton";
+import { FieldSelection } from "../../components/FieldSelection";
+import { FilterAdd } from "../../components/FilterAdd";
+import { FilterList } from "../../components/FilterList";
+import { ListTable } from "../../components/ListTable";
+import { SortSelection } from "../../components/SortSelection";
+import { Button } from "../../primitives/default/ui/button";
+
+import { LoadingIcon } from "../../components/LoadingIcon";
import {
Breadcrumb,
BreadcrumbItem,
@@ -43,8 +47,16 @@ import {
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
-} from "@keystone/primitives/default/ui/breadcrumb";
-import { Pagination } from "../../components/Pagination";
+} from "../../primitives/default/ui/breadcrumb";
+import {
+ Pagination,
+ PaginationDropdown,
+ PaginationNavigation,
+ PaginationStats,
+} from "../../components/Pagination";
+import { Input } from "../../primitives/default/ui/input";
+import { Badge } from "../../primitives/default/ui/badge";
+import ListDataTable from "../../components/ListDataTable";
let listMetaGraphqlQuery = gql`
query ($listKey: String!) {
@@ -129,6 +141,7 @@ export const ListPageTemplate = ({ listKey }) => {
const sort = useSort(list, orderableFields);
const filters = useFilters(list, filterableFields);
+
const searchFields = Object.keys(list.fields).filter(
(key) => list.fields[key].search
);
@@ -242,18 +255,17 @@ export const ListPageTemplate = ({ listKey }) => {
// TODO: Show errors nicely and with information
"Error..."
) : data && metaQuery.data ? (
-
-
-
-
-
-
- Dashboard
-
-
-
- {list.label}
- {/* {list.isSingleton ? (
+
+
+
+
+
+ Dashboard
+
+
+
+ {list.label}
+ {/* {list.isSingleton ? (
{list.label}
@@ -266,63 +278,76 @@ export const ListPageTemplate = ({ listKey }) => {
)} */}
-
-
-
-
-
- {list.label}
-
-
- {list.description ? (
-
{list.description}
- ) : (
-
- Create and manage{" "}
- {list.label}
-
- )}
-
-
- {data.count || query.search || filters.filters.length ? (
-
- {showCreate && }
-
- ) : null}
+
+
+
+
+
+ {list.label}
+
+
+ {list.description ? (
+
{list.description}
+ ) : (
+
+ Create and manage{" "}
+ {list.label}
+
+ )}
+
-