ERP-node/frontend/lib/registry/components/accordion-basic/index.ts

68 lines
2.4 KiB
TypeScript

"use client";
import React from "react";
import { createComponentDefinition } from "../../utils/createComponentDefinition";
import { ComponentCategory } from "@/types/component";
import type { WebType } from "@/types/screen";
import { AccordionBasicWrapper } from "./AccordionBasicComponent";
import { AccordionBasicConfigPanel } from "./AccordionBasicConfigPanel";
import { AccordionBasicConfig } from "./types";
/**
* AccordionBasic 컴포넌트 정의
* 접을 수 있는 콘텐츠 섹션을 제공하는 컴포넌트
*/
export const AccordionBasicDefinition = createComponentDefinition({
id: "accordion-basic",
name: "아코디언",
nameEng: "AccordionBasic Component",
description: "접을 수 있는 콘텐츠 섹션을 제공하는 컴포넌트",
category: ComponentCategory.DISPLAY,
webType: "text",
component: AccordionBasicWrapper,
defaultConfig: {
dataSource: {
sourceType: "static" as const,
useScreenTable: true,
},
items: [
{
id: "item-1",
title: "제품 정보",
content:
"우리의 주력 제품은 최첨단 기술과 세련된 디자인을 결합합니다. 프리미엄 소재로 제작되어 탁월한 성능과 신뢰성을 제공합니다.",
defaultOpen: true,
},
{
id: "item-2",
title: "배송 정보",
content:
"신뢰할 수 있는 택배 파트너를 통해 전 세계 배송을 제공합니다. 일반 배송은 3-5 영업일, 특급 배송은 1-2 영업일 내 배송됩니다.",
},
{
id: "item-3",
title: "반품 정책",
content:
"포괄적인 30일 반품 정책으로 제품을 보장합니다. 완전히 만족하지 않으시면 원래 상태로 제품을 반품하시면 됩니다.",
},
],
type: "single",
collapsible: true,
defaultValue: "item-1",
},
defaultSize: { width: 400, height: 200 },
configPanel: AccordionBasicConfigPanel,
icon: "ChevronDown",
tags: ["아코디언", "접기", "펼치기", "콘텐츠", "섹션"],
version: "1.0.0",
author: "Developer",
documentation: "https://ui.shadcn.com/docs/components/accordion",
});
// 타입 내보내기
export type { AccordionBasicConfig } from "./types";
// 컴포넌트 내보내기
export { AccordionBasicComponent } from "./AccordionBasicComponent";
export { AccordionBasicRenderer } from "./AccordionBasicRenderer";