@opsnow-mcp/opsnow-mcp-common-ui-server 1.0.44 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,7 @@ import { createStepperComponent } from "./opsnow-common-stepper.js";
20
20
  import { createToastPopupComponent } from "./opsnow-common-toast-popup.js";
21
21
  import { createFileUploaderComponent } from "./opsnow-common-file-upload.js";
22
22
  import { createDropdownComponent } from "./opsnow-common-dropdown.js";
23
+ import { createSelectionGroupComponent } from "./opsnow-common-selection-group.js";
23
24
  const componentFactories = [
24
25
  createCalendarComponent,
25
26
  createChartComponent,
@@ -41,6 +42,7 @@ const componentFactories = [
41
42
  createToastPopupComponent,
42
43
  createFileUploaderComponent,
43
44
  createDropdownComponent,
45
+ createSelectionGroupComponent,
44
46
  ];
45
47
  export function collectComponentTools() {
46
48
  return componentFactories.flatMap(factory => factory());
@@ -1,14 +1,6 @@
1
- // ============================================================
2
- // uidemo 데모 사이트 링크 → MCP 컴포넌트·예제 매핑
3
- //
4
- // 데모 사이트: https://uidemo.finplex.bespinglobal.com/v2/uidemo (레포: opsnow-common-ui/cm-uidemo-web)
5
- // 사용처: getComponentSpec / getUIExamples 에 데모 링크를 그대로 넣었을 때의 해석,
6
- // listComponents 안내, scripts/build-skill.ts 의 references/uidemo-links.md 생성.
7
- //
8
- // 갱신: cm-uidemo-web 의 src/route/routes.jsx(path)와 각 페이지의 TAB_IDS(#tab=<id>)를 기준으로 맞춘다.
9
- // - components: getComponentSpec 의 component 이름 (createXxx 의 Xxx)
10
- // - examples: getUIExamples 의 uiType (+ keyword). 이름이 틀리면 build:skill 이 실패한다.
11
- // ============================================================
1
+ // uidemo 데모 사이트(레포 cm-uidemo-web) 링크 → MCP 컴포넌트·예제 매핑
2
+ // 갱신 기준: cm-uidemo-web 의 src/route/routes.jsx(path), 각 페이지의 TAB_IDS(#tab=<id>)
3
+ // components 는 getComponentSpec 이름, examples 는 getUIExamples 의 uiType(+keyword) — 틀리면 build:skill 실패
12
4
  export const UIDEMO_BASE_URL = "https://uidemo.finplex.bespinglobal.com/v2/uidemo";
13
5
  export const UIDEMO_ROUTES = [
14
6
  { path: "/", title: "Typography (첫 화면)", components: ["Typography"], examples: [{ uiType: "Typography" }] },
@@ -27,22 +19,22 @@ export const UIDEMO_ROUTES = [
27
19
  { path: "/chart/download", title: "Chart Download (downloadFile)", components: ["BarChart", "LineChart", "StackChart", "PieChart"], examples: [{ uiType: "BarChart", keyword: "다운로드" }, { uiType: "LineChart", keyword: "다운로드" }, { uiType: "StackChart", keyword: "다운로드" }, { uiType: "PieChart", keyword: "다운로드" }], note: "차트 ref 의 downloadFile(fileName, fileType, fileOption?) 데모입니다." },
28
20
  { path: "/data-status", title: "Data Status", components: ["DataStatus"], examples: [{ uiType: "DataStatus" }] },
29
21
  { path: "/file-upload", title: "File Upload", components: ["FileUploader"], examples: [{ uiType: "FileUploader" }] },
30
- { path: "/select", title: "Select", components: ["Select", "AutocompleteSelect", "SelectMenu", "CompanySelect", "CurrencySwitcher"], examples: [{ uiType: "Select" }, { uiType: "Autocomplete" }, { uiType: "CurrencySwitcher" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
22
+ { path: "/select", title: "Select", components: ["Select", "AutocompleteSelect", "SelectMenu", "CompanySelect", "CurrencySwitcher"], examples: [{ uiType: "Select" }, { uiType: "Autocomplete" }, { uiType: "SelectMenu" }, { uiType: "CompanySelect" }, { uiType: "CurrencySwitcher" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
31
23
  { path: "/select", tab: "select", title: "Select › 기본 Select (단일 선택)", components: ["Select"], examples: [{ uiType: "Select" }] },
32
24
  { path: "/select", tab: "multi-select", title: "Select › Multi Select (다중 선택)", components: ["Select"], examples: [{ uiType: "Select" }] },
33
25
  { path: "/select", tab: "autocomplete", title: "Select › Autocomplete (검색·체크박스·그룹 선택)", components: ["AutocompleteSelect"], examples: [{ uiType: "Autocomplete" }] },
34
- { path: "/select", tab: "select-menu", title: "Select › Select Menu (메뉴 선택)", components: ["SelectMenu"], examples: [] },
35
- { path: "/select", tab: "company-select", title: "Select › Company Select (회사 선택)", components: ["CompanySelect"], examples: [] },
26
+ { path: "/select", tab: "select-menu", title: "Select › Select Menu (메뉴 선택)", components: ["SelectMenu"], examples: [{ uiType: "SelectMenu" }] },
27
+ { path: "/select", tab: "company-select", title: "Select › Company Select (회사 선택)", components: ["CompanySelect"], examples: [{ uiType: "CompanySelect" }] },
36
28
  { path: "/select", tab: "currency-switcher", title: "Select › Currency Switcher (통화 전환)", components: ["CurrencySwitcher"], examples: [{ uiType: "CurrencySwitcher" }] },
37
- { path: "/forms", title: "Forms", components: ["Button", "Badge", "TextField", "Textarea", "Switch", "ToggleButton", "Chip", "Checkbox", "RadioGroup", "Collapse", "Slider", "Link", "Avatar", "TreeView", "InsightCard", "InsightContent"], examples: [{ uiType: "Button" }, { uiType: "Badge" }, { uiType: "TextField" }, { uiType: "Textarea" }, { uiType: "Switch" }, { uiType: "ToggleButtonGroup" }, { uiType: "Chip" }, { uiType: "Checkbox" }, { uiType: "RadioGroup" }, { uiType: "Collapse" }, { uiType: "Slider" }, { uiType: "Link" }, { uiType: "Avatar" }, { uiType: "TreeView" }, { uiType: "InsightCard" }, { uiType: "InsightContent" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
29
+ { path: "/forms", title: "Forms", components: ["Button", "Badge", "TextField", "Textarea", "Switch", "ToggleButton", "Chip", "ChipGroup", "Checkbox", "RadioGroup", "CheckboxGroup", "Card", "CardGroup", "Collapse", "Slider", "Link", "Avatar", "TreeView", "InsightCard", "InsightContent"], examples: [{ uiType: "Button" }, { uiType: "Badge" }, { uiType: "TextField" }, { uiType: "Textarea" }, { uiType: "Switch" }, { uiType: "ToggleButtonGroup" }, { uiType: "Chip" }, { uiType: "ChipGroup" }, { uiType: "Checkbox" }, { uiType: "RadioGroup" }, { uiType: "CheckboxGroup" }, { uiType: "Card" }, { uiType: "CardGroup" }, { uiType: "Collapse" }, { uiType: "Slider" }, { uiType: "Link" }, { uiType: "Avatar" }, { uiType: "TreeView" }, { uiType: "InsightCard" }, { uiType: "InsightContent" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
38
30
  { path: "/forms", tab: "button", title: "Forms › Button", components: ["Button"], examples: [{ uiType: "Button" }] },
39
31
  { path: "/forms", tab: "badge", title: "Forms › Badge", components: ["Badge"], examples: [{ uiType: "Badge" }] },
40
32
  { path: "/forms", tab: "text-field", title: "Forms › TextField", components: ["TextField", "Input"], examples: [{ uiType: "TextField" }] },
41
33
  { path: "/forms", tab: "textarea", title: "Forms › Textarea", components: ["Textarea"], examples: [{ uiType: "Textarea" }] },
42
34
  { path: "/forms", tab: "switch", title: "Forms › Switch", components: ["Switch"], examples: [{ uiType: "Switch" }] },
43
35
  { path: "/forms", tab: "toggle-button", title: "Forms › ToggleButton", components: ["ToggleButton"], examples: [{ uiType: "ToggleButtonGroup" }] },
44
- { path: "/forms", tab: "chip", title: "Forms › Chip", components: ["Chip"], examples: [{ uiType: "Chip" }], note: "ChipGroup 은 아직 이 MCP/스킬에 스펙이 없습니다." },
45
- { path: "/forms", tab: "checkbox-radio", title: "Forms › Checkbox & RadioGroup", components: ["Checkbox", "RadioGroup"], examples: [{ uiType: "Checkbox" }, { uiType: "RadioGroup" }], note: "CheckboxGroup 은 아직 이 MCP/스킬에 스펙이 없습니다." },
36
+ { path: "/forms", tab: "chip", title: "Forms › Chip & ChipGroup", components: ["Chip", "ChipGroup"], examples: [{ uiType: "Chip" }, { uiType: "ChipGroup" }] },
37
+ { path: "/forms", tab: "checkbox-radio", title: "Forms › Checkbox & RadioGroup & CheckboxGroup", components: ["Checkbox", "RadioGroup", "CheckboxGroup"], examples: [{ uiType: "Checkbox" }, { uiType: "RadioGroup" }, { uiType: "CheckboxGroup" }] },
46
38
  { path: "/forms", tab: "collapse", title: "Forms › Collapse", components: ["Collapse"], examples: [{ uiType: "Collapse" }] },
47
39
  { path: "/forms", tab: "slider", title: "Forms › Slider", components: ["Slider"], examples: [{ uiType: "Slider" }] },
48
40
  { path: "/forms", tab: "link", title: "Forms › Link", components: ["Link"], examples: [{ uiType: "Link" }] },
@@ -50,7 +42,7 @@ export const UIDEMO_ROUTES = [
50
42
  { path: "/forms", tab: "tree-view", title: "Forms › TreeView", components: ["TreeView"], examples: [{ uiType: "TreeView" }] },
51
43
  { path: "/forms", tab: "insight-card", title: "Forms › InsightCard", components: ["InsightCard"], examples: [{ uiType: "InsightCard" }] },
52
44
  { path: "/forms", tab: "insight-content", title: "Forms › InsightContent", components: ["InsightContent"], examples: [{ uiType: "InsightContent" }] },
53
- { path: "/forms", tab: "card", title: "Forms › Card & CardGroup", components: [], examples: [], note: "OpsnowCommonCard · OpsnowCommonCardGroup 은 아직 이 MCP/스킬에 스펙·예제가 없습니다. 카드형 컨테이너가 필요하면 Tile 을 확인하세요." },
45
+ { path: "/forms", tab: "card", title: "Forms › Card & CardGroup", components: ["Card", "CardGroup"], examples: [{ uiType: "Card" }, { uiType: "CardGroup" }] },
54
46
  { path: "/grid/ex1", title: "Grid › 기본 그리드", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "기본 데이터 그리드" }] },
55
47
  { path: "/grid/interaction", title: "Grid › 그리드 인터랙션", components: ["DataGrid"], examples: [{ uiType: "DataGrid" }] },
56
48
  { path: "/grid/scroll-layout", title: "Grid › 그리드 스크롤 레이아웃 (최대 높이)", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "그리드 최대 높이" }] },
@@ -79,8 +71,8 @@ export const UIDEMO_ROUTES = [
79
71
  { path: "/progress", title: "Progress · Loading", components: ["ProgressLine", "ProgressCircle"], examples: [{ uiType: "Progress" }, { uiType: "Loading" }] },
80
72
  { path: "/stepper", title: "Stepper", components: ["Stepper", "StepButton"], examples: [{ uiType: "Stepper" }] },
81
73
  { path: "/storage", title: "Storage (commonUILocalStorage)", components: [], examples: [{ uiType: "Storage" }], note: "컴포넌트가 아니라 공통 스토리지 유틸 데모입니다." },
82
- { path: "/tooltip", title: "Tooltip", components: ["Tooltip", "CoachMark"], examples: [{ uiType: "Tooltip" }, { uiType: "CoachMark" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
83
- { path: "/tooltip", tab: "icon-tooltip", title: "Tooltip › Icon Tooltip", components: ["Tooltip"], examples: [{ uiType: "Tooltip" }], note: "OpsnowCommonIconTooltip 은 아직 별도 스펙이 없습니다. Tooltip 스펙·예제를 먼저 확인하세요." },
74
+ { path: "/tooltip", title: "Tooltip", components: ["Tooltip", "IconTooltip", "CoachMark"], examples: [{ uiType: "Tooltip" }, { uiType: "IconTooltip" }, { uiType: "CoachMark" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
75
+ { path: "/tooltip", tab: "icon-tooltip", title: "Tooltip › Icon Tooltip", components: ["IconTooltip"], examples: [{ uiType: "IconTooltip" }] },
84
76
  { path: "/tooltip", tab: "tooltip", title: "Tooltip › Tooltip", components: ["Tooltip"], examples: [{ uiType: "Tooltip" }] },
85
77
  { path: "/tooltip", tab: "coach-mark", title: "Tooltip › Coach Mark", components: ["CoachMark"], examples: [{ uiType: "CoachMark" }] },
86
78
  { path: "/utils", title: "Utils (finOpsDateUtils 날짜 표기 표준)", components: [], examples: [], note: "컴포넌트가 아니라 날짜 표기 유틸 데모입니다. 서버 instructions·SKILL.md 의 \"날짜 표기 표준 — finOpsDateUtils\" 절을 따르세요." },
@@ -123,8 +115,7 @@ export const UIDEMO_ROUTES = [
123
115
  { path: "/settings/07/template", title: "설정 페이지 패턴 07 › Template (뼈대)", components: ["Icon", "Switch", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
124
116
  { path: "/settings/07/ex1", title: "설정 페이지 패턴 07 › Example (적용 예)", components: ["Button", "Icon", "Input", "RadioGroup", "Switch", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
125
117
  ];
126
- // 데모 페이지(위에서 아래 순서)의 N번째 예제 → MCP 예제 제목.
127
- // 한 MCP 예제가 데모 여러 개를 합쳐 다루는 경우 같은 제목이 반복된다.
118
+ // 데모 화면의 예제(위에서 아래 순서) → MCP 예제. 키는 경로 또는 "<path>#tab=<id>"
128
119
  export const UIDEMO_DEMOS = {
129
120
  "/chart/xy-multi-chart": [
130
121
  { label: "Basic XyMulti Chart + Multilingual", uiType: "XyMultiChart", title: "XY 멀티 차트 - 기본 + 다국어" },
@@ -267,9 +258,166 @@ export const UIDEMO_DEMOS = {
267
258
  { label: "3. 선택 행 일괄 로딩 (Bulk Row Loading)", uiType: "DataGrid", title: "행 단위 로딩 (Partial Loading — rowClassRules + redrawRows) + 선택 행 일괄 로딩" },
268
259
  { label: "4. 컬럼 단위 로딩 + 실패/재시도", uiType: "DataGrid", title: "셀 단위 로딩 (Partial Loading — refreshCells) + 컬럼 전체 / 실패·재시도" },
269
260
  ],
261
+ "/forms#tab=button": [
262
+ { label: "Button - Contained", uiType: "Button", keyword: "contained" },
263
+ { label: "Button - Outlined", uiType: "Button", keyword: "outlined" },
264
+ { label: "Button - Text", uiType: "Button", keyword: "-text-" },
265
+ { label: "Button - Loading State", uiType: "Button", keyword: "loading" },
266
+ ],
267
+ "/forms#tab=badge": [
268
+ { label: "Badge - Standard", uiType: "Badge", keyword: "badge-standard" },
269
+ { label: "Badge - Dot", uiType: "Badge", keyword: "badge-dot" },
270
+ ],
271
+ "/forms#tab=text-field": [
272
+ { label: "Basic TextFields", uiType: "TextField", keyword: "basic-" },
273
+ { label: "Error States", uiType: "TextField", keyword: "error-" },
274
+ { label: "Disabled States", uiType: "TextField", keyword: "disabled-" },
275
+ { label: "Additional Variants", uiType: "TextField", keyword: "variant-" },
276
+ { label: "Show Input Values", uiType: "TextField" },
277
+ ],
278
+ "/forms#tab=textarea": [
279
+ { label: "TextArea Variations", uiType: "Textarea" },
280
+ ],
281
+ "/forms#tab=switch": [
282
+ { label: "Switch Variants", uiType: "Switch" },
283
+ { label: "Copilot 연결 (copilotId)", uiType: "Switch" },
284
+ ],
285
+ "/forms#tab=toggle-button": [
286
+ { label: "Large Size Buttons", uiType: "ToggleButtonGroup", title: "large-toggle-group" },
287
+ { label: "Medium Size Buttons", uiType: "ToggleButtonGroup", title: "medium-toggle-group" },
288
+ { label: "Small Size Buttons", uiType: "ToggleButtonGroup", title: "small-toggle-group-icon" },
289
+ { label: "Theme(New) Medium Size Icon + Text Buttons", uiType: "ToggleButtonGroup", title: "medium-icon-text-theme-new" },
290
+ { label: "Medium Size Icon Only Buttons", uiType: "ToggleButtonGroup", title: "medium-icon-only" },
291
+ { label: "Disabled State Buttons", uiType: "ToggleButtonGroup", title: "medium-disabled-toggle-group" },
292
+ ],
293
+ "/forms#tab=chip": [
294
+ { label: "Default Chips", uiType: "Chip", keyword: "default-chip" },
295
+ { label: "Color Chips", uiType: "Chip" },
296
+ { label: "ChipGroup — 카테고리 필터 (단일 선택 + 개수)", uiType: "ChipGroup", title: "ChipGroup - 단일 선택 카테고리 필터 (renderLabel로 개수 표시)" },
297
+ { label: "ChipGroup — 템플릿 선택 (selectedVariant)", uiType: "ChipGroup", title: "ChipGroup - 고른 칩만 filled (variant=\"outlined\" + selectedVariant=\"filled\")" },
298
+ { label: "ChipGroup — 클라우드 필터 (다중 선택 + renderItem)", uiType: "ChipGroup", title: "ChipGroup - 칩 모양 직접 그리기 (renderItem + itemProps)" },
299
+ ],
300
+ "/forms#tab=checkbox-radio": [
301
+ { label: "Bespin Common Checkbox", uiType: "Checkbox" },
302
+ { label: "Parent / Child Checkboxes", uiType: "Checkbox", keyword: "parent" },
303
+ { label: "Bespin Common Radio Group", uiType: "RadioGroup" },
304
+ { label: "CheckboxGroup — 계정 선택 (검색 + 전체 선택 + 목록 스크롤)", uiType: "CheckboxGroup", title: "CheckboxGroup - 검색 + 전체 선택 + 목록 스크롤 (selectAll · listMaxHeight · emptyContent)" },
305
+ { label: "CheckboxGroup — 요일 (가로 · small)", uiType: "CheckboxGroup", title: "CheckboxGroup - 가로 배치 · small (요일 선택)" },
306
+ ],
307
+ "/forms#tab=collapse": [
308
+ { label: "Collapse Examples", uiType: "Collapse" },
309
+ ],
310
+ "/forms#tab=slider": [
311
+ { label: "Continuous Slider", uiType: "Slider", keyword: "continuous-slider" },
312
+ { label: "Discrete Slider", uiType: "Slider", keyword: "discrete-slider" },
313
+ { label: "Range Slider", uiType: "Slider", keyword: "range-slider" },
314
+ { label: "Disabled Continuous Slider", uiType: "Slider", title: "disabled-continuous-slider" },
315
+ { label: "Range Slider with Value Labels", uiType: "Slider", title: "range-slider-with-marks" },
316
+ { label: "Custom Marks Slider", uiType: "Slider", title: "custom-marks-slider" },
317
+ { label: "Vertical Sliders", uiType: "Slider", keyword: "vertical-slider" },
318
+ ],
319
+ "/forms#tab=link": [
320
+ { label: "Link Examples", uiType: "Link" },
321
+ ],
322
+ "/forms#tab=avatar": [
323
+ { label: "Basic Avatars", uiType: "Avatar", keyword: "basic-avatar" },
324
+ { label: "Text Avatars", uiType: "Avatar", keyword: "text-avatar" },
325
+ { label: "Avatars with OpsnowCommonIcon", uiType: "Avatar", keyword: "icon-avatar" },
326
+ { label: "Different Variant & Colors", uiType: "Avatar", keyword: "variant-avatar" },
327
+ { label: "Avatar with Image", uiType: "Avatar", keyword: "image-avatar" },
328
+ { label: "Various Sizes", uiType: "Avatar", keyword: "text-avatar" },
329
+ { label: "Clickable Avatar", uiType: "Avatar", title: "clickable-avatar" },
330
+ { label: "alt Property", uiType: "Avatar", title: "avatar-no-exist-image-alt" },
331
+ ],
332
+ "/forms#tab=tree-view": [
333
+ { label: "Basic TreeView (Default: Searchable = true, showTotal = true)", uiType: "TreeView" },
334
+ { label: "TreeView with Default Expanded", uiType: "TreeView", title: "treeview-expanded-by-default" },
335
+ { label: "TreeView with Custom Icons (MUI Icons)", uiType: "TreeView", title: "basic-treeview-with-mui-icons" },
336
+ { label: "TreeView with Action Buttons", uiType: "TreeView" },
337
+ { label: "TreeView with Checkbox (Single Selection)", uiType: "TreeView", keyword: "checkbox" },
338
+ { label: "TreeView with Checkbox (Multi Selection)", uiType: "TreeView", title: "treeview-with-checkbox-multiselect" },
339
+ ],
340
+ "/forms#tab=card": [
341
+ { label: "Card — 표시만 (기본)", uiType: "Card", title: "Card - 표시만 (기본 outlined · padding · variant=\"plain\")" },
342
+ { label: "Card — 클릭 · 선택 표시 (onClick · selected · disabled)", uiType: "Card", title: "Card - 클릭 · 선택 표시 (onClick · selected · disabled)" },
343
+ { label: "CardGroup — 표시만 (기본 selectionMode='none')", uiType: "CardGroup", title: "CardGroup - 표시만 (요약 카드 줄, columns 반응형)" },
344
+ { label: "CardGroup — 클릭 카드 (onCardClick, 이동 · 팝업)", uiType: "CardGroup", title: "CardGroup - 클릭 카드 (onCardClick, 이동 · 팝업)" },
345
+ { label: "CardGroup — 비용 카드 (단일 선택 · 1 / 2 / 4열)", uiType: "CardGroup", title: "CardGroup - 단일 선택 (selectionMode=\"single\", value · onChange · cardSx)" },
346
+ { label: "CardGroup — 기준월 타일 (고정 크기)", uiType: "CardGroup", title: "CardGroup - 고정 크기 타일 (sx gridTemplateColumns · cardSx height · state.selected)" },
347
+ { label: "CardGroup — 만료 구간 카드 (minCardWidth)", uiType: "CardGroup", title: "CardGroup - 단일 선택 (selectionMode=\"single\", value · onChange · cardSx)" },
348
+ { label: "CardGroup — 상태 카드 (1 / 2 / 4열)", uiType: "CardGroup", title: "CardGroup - 단일 선택 (selectionMode=\"single\", value · onChange · cardSx)" },
349
+ { label: "CardGroup — 추천 필터 카드 (다중 선택 + 비활성)", uiType: "CardGroup", title: "CardGroup - 다중 선택 + 비활성 카드 (selectionMode=\"multiple\", minCardWidth)" },
350
+ ],
351
+ "/select#tab=select": [
352
+ { label: "label + placeholder (outlined, small)", uiType: "Select", title: "outlined, size=small, label + placeholder (단일 선택)" },
353
+ { label: "copilotLabel (코파일럿 전용 선택지 이름)", uiType: "Select", title: "copilotLabel (코파일럿 전용 옵션 이름)" },
354
+ { label: "variant=standard, size=small", uiType: "Select", title: "standard, size=small" },
355
+ { label: "variant=noLine, size=small", uiType: "Select", title: "noLine, size=small" },
356
+ { label: "variant=filled, size=small", uiType: "Select", title: "filled, size=small, label JSX" },
357
+ { label: "variant=outlined, size=small", uiType: "Select", title: "outlined, size=small" },
358
+ { label: "variant=outlined, size=medium", uiType: "Select", title: "outlined, size=medium, error" },
359
+ { label: "variant=filled, size=medium", uiType: "Select", title: "filled, size=medium, disabled" },
360
+ { label: "variant=standard, size=medium, error=true", uiType: "Select", title: "outlined, size=medium, error" },
361
+ { label: "variant=outlined, size=medium, disabled=true", uiType: "Select", title: "filled, size=medium, disabled" },
362
+ { label: "variant=filled, size=medium, disabled=true", uiType: "Select", title: "filled, size=medium, disabled" },
363
+ { label: "variant=standard, size=medium, disabled=true", uiType: "Select", title: "filled, size=medium, disabled" },
364
+ ],
365
+ "/select#tab=multi-select": [
366
+ { label: "label + placeholder (outlined, small)", uiType: "Select", title: "outlined, size=small, label + placeholder, multiple (다중 선택)" },
367
+ { label: "variant=standard, size=small", uiType: "Select", keyword: "multiple" },
368
+ { label: "variant=noLine, size=small", uiType: "Select", title: "noLine, size=small, multiple" },
369
+ { label: "variant=filled, size=small", uiType: "Select", keyword: "multiple" },
370
+ { label: "variant=outlined, size=small", uiType: "Select", title: "outlined, size=small, multiple" },
371
+ { label: "variant=outlined, size=medium", uiType: "Select", keyword: "multiple" },
372
+ { label: "variant=filled, size=medium", uiType: "Select", keyword: "multiple" },
373
+ { label: "variant=standard, size=medium, error=true", uiType: "Select", keyword: "multiple" },
374
+ { label: "variant=outlined, size=medium, disabled=true", uiType: "Select", keyword: "multiple" },
375
+ { label: "variant=filled, size=medium, disabled=true", uiType: "Select", keyword: "multiple" },
376
+ { label: "variant=standard, size=medium, disabled=true", uiType: "Select", keyword: "multiple" },
377
+ ],
378
+ "/select#tab=autocomplete": [
379
+ { label: "긴 라벨 — 기본 동작 (드롭다운이 옵션 폭에 맞게 확장)", uiType: "Autocomplete", title: "Autocomplete - 긴 라벨 기본 동작 (드롭다운 자동 확장)" },
380
+ { label: "긴 라벨 — fitDropdownWidth", uiType: "Autocomplete", title: "Autocomplete - fitDropdownWidth (드롭다운을 입력 필드 폭에 고정)" },
381
+ { label: "긴 라벨 — dropdownMaxWidth (360px)", uiType: "Autocomplete", title: "Autocomplete - dropdownMaxWidth (확장 최대 너비 제한)" },
382
+ { label: "Single Select", uiType: "Autocomplete", title: "Autocomplete - 단일 선택" },
383
+ { label: "Single Select - do not close on select", uiType: "Autocomplete", title: "Autocomplete - 단일 선택 (disableCloseOnSelect)" },
384
+ { label: "Multiple Select", uiType: "Autocomplete", title: "Autocomplete - 다중 선택" },
385
+ { label: "Async Options", uiType: "Autocomplete", title: "Autocomplete - 비동기 로딩" },
386
+ { label: "Grouped Single Select", uiType: "Autocomplete", title: "Autocomplete - 그룹 옵션" },
387
+ { label: "Grouped Multiple Select", uiType: "Autocomplete", title: "Autocomplete - 그룹 옵션 (다중 선택)" },
388
+ { label: "Checkbox Options", uiType: "Autocomplete", title: "Autocomplete - 체크박스/전체선택" },
389
+ { label: "Label & Placeholder", uiType: "Autocomplete", title: "Autocomplete - Label + Placeholder (단일)" },
390
+ { label: "Label & Placeholder (Multiple)", uiType: "Autocomplete", title: "Autocomplete - Label + Placeholder (다중)" },
391
+ { label: "Placeholder only (no label)", uiType: "Autocomplete", title: "Autocomplete - Placeholder only (no label)" },
392
+ { label: "OpsnowCommonIcons Example", uiType: "Autocomplete", title: "Autocomplete - 아이콘 옵션" },
393
+ { label: "Partially disabled options", uiType: "Autocomplete", title: "Autocomplete - 일부 옵션 disabled" },
394
+ { label: "All disabled", uiType: "Autocomplete", title: "Autocomplete - 전체 disabled" },
395
+ ],
396
+ "/select#tab=select-menu": [
397
+ { label: "Open menu with an icon button", uiType: "SelectMenu", title: "SelectMenu - 아이콘 버튼으로 여는 기본 메뉴 (buttonIconName + menuItems)" },
398
+ { label: "Long text example", uiType: "SelectMenu", title: "SelectMenu - 아이콘 버튼으로 여는 기본 메뉴 (buttonIconName + menuItems)" },
399
+ { label: "Open menu with an avatar (e.g. profile menu) - including listHeader and listFooter", uiType: "SelectMenu", title: "SelectMenu - 커스텀 트리거 + 헤더/푸터 (button · listHeader · listFooter, 프로필 메뉴)" },
400
+ { label: "Open menu with text", uiType: "SelectMenu", title: "SelectMenu - 커스텀 트리거 + 헤더/푸터 (button · listHeader · listFooter, 프로필 메뉴)" },
401
+ { label: "List with divider", uiType: "SelectMenu", title: "SelectMenu - 구분선이 있는 메뉴 (hasDivider)" },
402
+ { label: "List items containing custom components", uiType: "SelectMenu", title: "SelectMenu - 항목에 칩 · 액션 버튼 붙이기 (labelPreComponent · actionComponent)" },
403
+ { label: "Menu anchor/transform origin example", uiType: "SelectMenu", title: "SelectMenu - 메뉴 위치 맞추기 (anchorOrigin · transformOrigin)" },
404
+ ],
405
+ "/tooltip#tab=icon-tooltip": [
406
+ { label: "icon tooltip image, tooltipFullWidth = true", uiType: "IconTooltip", title: "IconTooltip - 이미지 미리보기 툴팁 (title에 JSX + tooltipPreview)" },
407
+ { label: "icon tooltip image", uiType: "IconTooltip", title: "IconTooltip - 이미지 미리보기 툴팁 (title에 JSX + tooltipPreview)" },
408
+ { label: "icon tooltip, tooltipFullWidth = true, justifyContent='flex-start'", uiType: "IconTooltip", title: "IconTooltip - 아이콘 색 · 크기 · 넓은 툴팁 (commonColor · size · tooltipFullWidth · placement)" },
409
+ ],
410
+ "/tooltip#tab=coach-mark": [
411
+ { label: "가이드 말풍선 — X로 닫으면 새로고침해도 다시 뜨지 않음 (localStorage)", uiType: "CoachMark", title: "storageKey-title-content-placement" },
412
+ { label: "제목 없이 본문만", uiType: "CoachMark", title: "content-only" },
413
+ { label: "placement = top", uiType: "CoachMark", title: "placement-top" },
414
+ { label: "placement = left", uiType: "CoachMark", title: "placement-left" },
415
+ { label: "onClose 콜백 + 커스텀 content(JSX)", uiType: "CoachMark", title: "jsx-content-onClose" },
416
+ { label: "하단 우측 액션 버튼 (actions)", uiType: "CoachMark", title: "actions-button" },
417
+ ],
270
418
  };
271
419
  function normalizePath(p) {
272
- // "<링크> 3" 처럼 뒤에 번호가 붙을 수 있으므로 첫 토큰만 경로로 본다
420
+ // 뒤에 번호가 붙을 수 있어 첫 토큰만 경로로 본다
273
421
  let s = p.trim().split(/\s+/)[0] ?? "";
274
422
  try {
275
423
  if (/^https?:\/\//i.test(s))
@@ -285,28 +433,67 @@ function normalizePath(p) {
285
433
  s = s.replace(/\/+$/, "");
286
434
  return (s || "/").toLowerCase();
287
435
  }
288
- /** 입력이 uidemo 데모 링크(또는 /v2/uidemo 경로)처럼 보이는지 */
289
436
  export function looksLikeDemoUrl(input) {
290
437
  return /uidemo/i.test(input) || /^https?:\/\//i.test(input.trim());
291
438
  }
292
- /** 데모 링크 → 매핑 항목. 못 찾으면 route 가 undefined */
439
+ /** 못 찾으면 route 가 undefined */
293
440
  export function resolveDemoUrl(input) {
294
441
  const path = normalizePath(input);
295
442
  const tab = /[#&?]tab=([\w-]+)/i.exec(input)?.[1]?.toLowerCase();
296
443
  const samePath = UIDEMO_ROUTES.filter(r => r.path === path);
297
444
  const tabs = samePath.filter(r => r.tab);
298
445
  const route = (tab && tabs.find(r => r.tab === tab)) || samePath.find(r => !r.tab);
299
- // "N번째": URL 뒤에 공백으로 붙인 "5", "5번째", "#5" 또는 #demo=5 / ?n=5
446
+ // "N번째": 링크 뒤의 "5" · "5번째" 또는 #demo=5 / ?n=5
300
447
  const afterUrl = input.trim().replace(/^\S+/, "");
301
448
  const idx = /[#&?](?:demo|example|ex|n)=(\d+)/i.exec(input)?.[1] ??
302
449
  /(\d+)\s*(?:번째|번|th|st|nd|rd)?/i.exec(afterUrl)?.[1];
303
- return { path, tab, route, tabs, demos: UIDEMO_DEMOS[path] ?? [], index: idx ? Number(idx) : undefined };
450
+ return { path, tab, route, tabs, demos: (route?.tab ? UIDEMO_DEMOS[`${path}#tab=${route.tab}`] : undefined) ?? UIDEMO_DEMOS[path] ?? [], index: idx ? Number(idx) : undefined };
451
+ }
452
+ export function demoCall(d) {
453
+ const kw = d.title ?? d.keyword;
454
+ return kw ? `getUIExamples({ uiType: "${d.uiType}", keyword: "${kw}" })` : `getUIExamples({ uiType: "${d.uiType}" })`;
455
+ }
456
+ // 제목 비교용: 소문자 + 글자·숫자만 (— / - / 공백 / 괄호 차이 무시)
457
+ function normLabel(s) {
458
+ return s.toLowerCase().replace(/&amp;/g, "&").replace(/[^0-9a-z가-힣]/g, "");
459
+ }
460
+ /** 데모 화면의 예제 제목으로 검색 — 완전 일치가 있으면 그것만, 없으면 부분 일치(3글자 이상) */
461
+ export function searchDemosByLabel(query, uiType) {
462
+ const q = normLabel(query);
463
+ if (!q)
464
+ return [];
465
+ const hits = [];
466
+ for (const [page, demos] of Object.entries(UIDEMO_DEMOS)) {
467
+ demos.forEach((demo, i) => {
468
+ if (uiType && demo.uiType !== uiType)
469
+ return;
470
+ const l = normLabel(demo.label);
471
+ if (l === q)
472
+ hits.push({ page, index: i + 1, demo, exact: true });
473
+ else if (q.length >= 3 && l.includes(q))
474
+ hits.push({ page, index: i + 1, demo, exact: false });
475
+ });
476
+ }
477
+ const exact = hits.filter(h => h.exact);
478
+ return exact.length > 0 ? exact : hits;
479
+ }
480
+ export function renderLabelHits(query, hits) {
481
+ const seen = new Set();
482
+ const lines = [];
483
+ for (const h of hits) {
484
+ const call = demoCall(h.demo);
485
+ const key = `${h.demo.label}|${call}`;
486
+ if (seen.has(key))
487
+ continue;
488
+ seen.add(key);
489
+ lines.push(`- ${h.demo.label} (${UIDEMO_BASE_URL}${h.page}, ${h.index}번째) → ${call}`);
490
+ }
491
+ return `uidemo 데모 화면의 예제 제목 '${query}' 검색 결과 ${lines.length}건 — 맞는 호출문을 그대로 실행하세요:\n${lines.slice(0, 20).join("\n")}`;
304
492
  }
305
- /** 항목의 데모 링크 */
306
493
  export function demoUrlOf(r) {
307
494
  return UIDEMO_BASE_URL + (r.path === "/" ? "" : r.path) + (r.tab ? `#tab=${r.tab}` : "");
308
495
  }
309
- /** 데모 링크 해석 결과를 복붙 가능한 다음 호출문과 함께 마크다운으로 */
496
+ /** 데모 링크 → 스펙·예제 호출문 안내 (마크다운) */
310
497
  export function renderDemoMatch(input) {
311
498
  const m = resolveDemoUrl(input);
312
499
  if (!m.route) {
@@ -328,7 +515,7 @@ export function renderDemoMatch(input) {
328
515
  .join("\n") + "\n\n";
329
516
  }
330
517
  if (m.demos.length > 0) {
331
- const call = (d) => `getUIExamples({ uiType: "${d.uiType}", keyword: "${d.title}" })`;
518
+ const call = demoCall;
332
519
  const picked = m.index ? m.demos[m.index - 1] : undefined;
333
520
  if (m.index && picked) {
334
521
  md += `## 데모 화면의 ${m.index}번째 예제 — ${picked.label}\n${call(picked)}\n\n`;