feat(B07,B08): 워크플로 순서 교환 — 상세설계를 수량산출 앞으로
횡단설계(B06) 다음을 상세설계 → 수량산출 → 설계도서 순으로 재배열하고, 폴더 번호가 흐름과 일치하도록 이름을 맞바꾼다. - B08_DesignDetail → B07_DesignDetail, B07_Quantity → B08_Quantity (파일 접두어·식별자·라우트·locale 키 전량 스왑) - STAGE_KEYS 4=DESIGN_DETAIL, 5=QUANTITY 스왑 + 라우터 stage 리터럴 교체 - CAD 마운트 /b08-cad → /b07-cad (main.py·vite proxy·iframe URL), openwebcad Toolbar 라벨 B07로 수정 후 재빌드 - 유지: openwebcad postMessage 프로토콜 aislo:b08:*·패키지명(내부 식별자) - 기존 프로젝트 storage 폴더 rename + project_manifest 갱신, DB project_workflow_stages stage_no 4↔5 행 스왑 완료 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
import {noop} from 'es-toolkit';
|
||||
import type {CSSProperties, FC, MouseEvent, ReactNode} from 'react';
|
||||
import {Icon, type IconName} from './Icon/Icon.tsx';
|
||||
|
||||
interface ButtonProps {
|
||||
label?: string;
|
||||
title?: string;
|
||||
iconName?: IconName;
|
||||
iconClassname?: string;
|
||||
iconComponent?: ReactNode;
|
||||
active?: boolean;
|
||||
onClick?: (evt: MouseEvent) => void;
|
||||
children?: ReactNode;
|
||||
className?: string;
|
||||
style?: CSSProperties;
|
||||
dataId?: string;
|
||||
size?: 'small' | 'regular';
|
||||
type?: 'regular' | 'transparent';
|
||||
left?: ReactNode;
|
||||
right?: ReactNode;
|
||||
}
|
||||
|
||||
export const Button: FC<ButtonProps> = ({
|
||||
label,
|
||||
title,
|
||||
iconName,
|
||||
iconClassname,
|
||||
iconComponent,
|
||||
onClick,
|
||||
active = false,
|
||||
children,
|
||||
className,
|
||||
style,
|
||||
dataId,
|
||||
type = 'regular',
|
||||
size = 'regular',
|
||||
left = null,
|
||||
right = null,
|
||||
}) => {
|
||||
const classParts = [
|
||||
'font-semibold py-4 h-10 flex flex-row justify-start w-full items-center hover:bg-blue-500 hover:text-white hover:border-transparent',
|
||||
type === 'regular' ? 'bg-gray-950 text-blue-500' : '',
|
||||
type === 'transparent' ? 'bg-transparent text-blue-500' : '',
|
||||
active ? 'bg-blue-500 text-white border-transparent hover:bg-blue-400' : '',
|
||||
size === 'regular' ? 'pl-2 pr-2 gap-2' : '',
|
||||
size === 'small' ? 'pl-2 pr-2 gap-0' : '',
|
||||
className || '',
|
||||
];
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
className={classParts.join(' ')}
|
||||
style={style}
|
||||
data-active={active}
|
||||
data-size={size}
|
||||
data-type={type}
|
||||
onClick={onClick || noop}
|
||||
onKeyUp={(evt) => {
|
||||
if (evt.key === 'Enter' || evt.key === ' ') {
|
||||
onClick?.(evt as unknown as MouseEvent);
|
||||
}
|
||||
}}
|
||||
title={title}
|
||||
data-id={dataId}
|
||||
type="button"
|
||||
>
|
||||
{iconComponent ||
|
||||
(iconName && (
|
||||
<Icon
|
||||
name={iconName}
|
||||
className={`${iconClassname} text-blue-700 ${active ? 'text-white' : ''} ${size === 'small' ? 'w-4' : 'w-5'}`}
|
||||
/>
|
||||
))}
|
||||
<div className="flex flex-row flex-nowrap">{left}</div>
|
||||
{label && <span className="text-nowrap flex-grow text-left">{label}</span>}
|
||||
{children}
|
||||
<div className="flex flex-row flex-nowrap">{right}</div>
|
||||
</button>
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user