UNPKG

@premieroctet/next-admin

Version:

Next-Admin provides a customizable and turnkey admin dashboard for applications built with Next.js and powered by the Prisma ORM. It aims to simplify the development process by providing a turnkey admin system that can be easily integrated into your proje

65 lines (64 loc) 3.92 kB
import { jsx, jsxs } from "react/jsx-runtime"; import { ChevronDownIcon } from "@heroicons/react/24/outline"; import { Content, Group, Icon, Item, ItemIndicator, ItemText, Label, Portal, Root, Separator, Trigger, Value, Viewport } from "@radix-ui/react-select"; import { forwardRef } from "react"; import external_clsx_default from "clsx"; const Select = Root; const SelectGroup = Group; const SelectValue = Value; const SelectTrigger = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(Trigger, { ref: ref, className: external_clsx_default("border-nextadmin-border-default dark:border-dark-nextadmin-border-strong ring-nextadmin-primary-500 placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: [ children, /*#__PURE__*/ jsx(Icon, { asChild: true, children: /*#__PURE__*/ jsx(ChevronDownIcon, { className: "text-nextadmin-content-inverted dark:text-dark-nextadmin-content-inverted h-4 w-4 dark:opacity-100" }) }) ] })); SelectTrigger.displayName = Trigger.displayName; const SelectContent = /*#__PURE__*/ forwardRef(({ className, children, position = "popper", ...props }, ref)=>/*#__PURE__*/ jsx(Portal, { children: /*#__PURE__*/ jsx(Content, { ref: ref, className: external_clsx_default("border-nextadmin-border-default dark:border-dark-nextadmin-border-default dark:bg-dark-nextadmin-background-subtle animate-in fade-in-80 relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md", "popper" === position && "translate-y-1", className), position: position, ...props, children: /*#__PURE__*/ jsx(Viewport, { className: external_clsx_default("p-1", "popper" === position && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }) }) })); SelectContent.displayName = Content.displayName; const SelectLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Label, { ref: ref, className: external_clsx_default("py-1.5 pl-8 pr-2 text-sm font-semibold", className), ...props })); SelectLabel.displayName = Label.displayName; const SelectItem = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(Item, { ref: ref, className: external_clsx_default("text-nextadmin-content-inverted dark:text-dark-nextadmin-content-inverted hover:bg-nextadmin-background-subtle dark:hover:bg-dark-nextadmin-background-muted focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [ /*#__PURE__*/ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /*#__PURE__*/ jsx(ItemIndicator, {}) }), /*#__PURE__*/ jsx(ItemText, { children: children }) ] })); SelectItem.displayName = Item.displayName; const SelectSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, { ref: ref, className: external_clsx_default("bg-muted -mx-1 my-1 h-px", className), ...props })); SelectSeparator.displayName = Separator.displayName; export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };