feat(M01): 화면 부품 공용화 — 드롭다운·찾기 칸·단추·확인창을 공용 템플릿으로 · 재료 컨테이너 차례

- createSelectField 에 선택 인자 더함(compact · ariaLabel · setOptions) — 기본 동작 그대로
- 인력 2단 거름 · 로직 편집 고르기 · 계산 입력 · 요소 찾기 창 그룹 select 를 공용으로 · m01-side__select 걷음
- 찾기 칸은 createInputField · 표 칸·모달 단추는 createButton · 버리기 확인은 showConfirmDialog
- 재료 컨테이너 = 자재품목 · 유가 · 품셈재료 차례 · 안 쓰는 조달 문구 걷음

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
2026-09-20 16:27:06 +09:00
co-authored by Claude Sonnet 5
parent 9de61eb251
commit 21f04c64bb
12 changed files with 141 additions and 142 deletions
+18 -8
View File
@@ -4,7 +4,13 @@
* 표 고르기(소요량·계수)는 값칸 단추를 눌러 `찾기(…).칸` 으로 수량에 넣음
* ========================================================================== */
import { createButton, el, showToast } from "@ui/ui_template_elements";
import {
createButton,
createInputField,
createSelectField,
el,
showToast,
} from "@ui/ui_template_elements";
import { searchElements, type ElementBrief } from "./M01_MasterData_UI_Logic_Api";
import { formatNumber, type PickDone, type PickMode } from "./M01_MasterData_UI_Logic_Edit";
import { tx } from "./M01_MasterData_UI_Logic_Text";
@@ -16,13 +22,14 @@ const GROUPS: Record<PickMode, string[]> = {
export function openPicker(mode: PickMode, group: string, done: PickDone): void {
const groups = GROUPS[mode];
const select = el("select", { className: "m01-logic__input" });
for (const g of groups) select.append(el("option", { text: g, attrs: { value: g } }));
select.value = groups.includes(group) ? group : groups[0];
const search = el("input", {
className: "m01-logic__input",
attrs: { type: "search", placeholder: tx("Pick_Search") },
const groupField = createSelectField({
options: groups.map((g) => ({ value: g, text: g })),
value: groups.includes(group) ? group : groups[0],
compact: true,
});
const select = groupField.select;
const searchField = createInputField({ type: "search", placeholder: tx("Pick_Search") });
const search = searchField.input;
const count = el("span", { className: "m01-logic__muted" });
const list = el("div", { className: "m01-logic__pick-list" });
const close = (): void => backdrop.remove();
@@ -37,7 +44,10 @@ export function openPicker(mode: PickMode, group: string, done: PickDone): void
createButton({ label: tx("Pick_Close"), variant: "ghost", onClick: close }),
],
}),
el("div", { className: "m01-logic__pick-bar", children: [select, search, count] }),
el("div", {
className: "m01-logic__pick-bar",
children: [groupField.root, searchField.root, count],
}),
list,
],
});