diff --git a/packages/common/business_components/package.json b/packages/common/business_components/package.json index ca6f67b76..341081f7c 100644 --- a/packages/common/business_components/package.json +++ b/packages/common/business_components/package.json @@ -28,6 +28,7 @@ "@common/components": "workspace:*", "@hookform/resolvers": "^4.1.2", "@radix-ui/react-label": "^2.1.2", + "@radix-ui/react-select": "^2.1.6", "@radix-ui/react-slot": "^1.1.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", diff --git a/packages/common/business_components/src/ui/index.ts b/packages/common/business_components/src/ui/index.ts index e29c71c40..ef8fa6f8c 100644 --- a/packages/common/business_components/src/ui/index.ts +++ b/packages/common/business_components/src/ui/index.ts @@ -1,3 +1,5 @@ export * from "./chart"; export * from "./table"; -export * from "./form"; \ No newline at end of file +export * from "./form"; +export * from "./search_form"; +export * from "./select"; \ No newline at end of file diff --git a/packages/common/business_components/src/ui/search_form/index.tsx b/packages/common/business_components/src/ui/search_form/index.tsx new file mode 100644 index 000000000..457c22024 --- /dev/null +++ b/packages/common/business_components/src/ui/search_form/index.tsx @@ -0,0 +1,9 @@ +function SearchDiv ({children}:{ children: React.ReactNode; }) { + return ( +
+ {children} +
+ ) +} + +export { SearchDiv }; \ No newline at end of file diff --git a/packages/common/business_components/src/ui/select/index.tsx b/packages/common/business_components/src/ui/select/index.tsx new file mode 100644 index 000000000..b416f8dec --- /dev/null +++ b/packages/common/business_components/src/ui/select/index.tsx @@ -0,0 +1,158 @@ +import * as React from "react" +import * as SelectPrimitive from "@radix-ui/react-select" +import { Check, ChevronDown, ChevronUp } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Select = SelectPrimitive.Root + +const SelectGroup = SelectPrimitive.Group + +const SelectValue = SelectPrimitive.Value + +const SelectTrigger = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + span]:line-clamp-1", + className + )} + {...props} + > + {children} + + + + +)) +SelectTrigger.displayName = SelectPrimitive.Trigger.displayName + +const SelectScrollUpButton = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + + +)) +SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName + +const SelectScrollDownButton = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + + +)) +SelectScrollDownButton.displayName = + SelectPrimitive.ScrollDownButton.displayName + +const SelectContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, position = "popper", ...props }, ref) => ( + + + + + {children} + + + + +)) +SelectContent.displayName = SelectPrimitive.Content.displayName + +const SelectLabel = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SelectLabel.displayName = SelectPrimitive.Label.displayName + +const SelectItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + + + + + + {children} + +)) +SelectItem.displayName = SelectPrimitive.Item.displayName + +const SelectSeparator = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SelectSeparator.displayName = SelectPrimitive.Separator.displayName + +export { + Select, + SelectGroup, + SelectValue, + SelectTrigger, + SelectContent, + SelectLabel, + SelectItem, + SelectSeparator, + SelectScrollUpButton, + SelectScrollDownButton, +} diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 6a5033963..17360af12 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -3,29 +3,30 @@ import UiPageNations from "./uiPageNations"; interface UiTableProps { + headName: string; publicReuseFacility: any[]; headlist: { id: string; title: string; }[]; pageSize: number; total: number; + children: React.ReactNode|undefined; } export function UiTable(UiTableProps: UiTableProps) { - const { publicReuseFacility, headlist,pageSize , total} = UiTableProps; - let cur = 1; - + const { publicReuseFacility, headlist,pageSize , total, children,headName} = UiTableProps; + const cur = 1; return ( <> -

공공하수처리시설 목록

+

{headName}

- + {children? <>{children}: {headlist.map((head) => ( {head.title} ))} - - + } + {publicReuseFacility.map((el: any,index) => (