@ihabdevteam/core 0.455.0 → 0.457.0
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.
- package/CHANGELOG.md +30 -0
- package/dist/components.cjs.js +183 -183
- package/dist/components.esm.css +2 -2
- package/dist/hooks.cjs.js +1 -1
- package/dist/i18n.cjs.js +1 -1
- package/dist/ihabdevteam-core.cjs.js +188 -188
- package/dist/ihabdevteam-core.d.ts +34 -15
- package/dist/packages/core/src/components/FolderGrid.css +2 -0
- package/dist/packages/core/src/components/FolderGrid.d.ts +17 -2
- package/dist/packages/core/src/components/FolderGrid.js +4 -4
- package/dist/packages/core/src/components/FolderHead.d.ts +4 -1
- package/dist/packages/core/src/components/FolderHead.js +2 -2
- package/dist/packages/core/src/components/Popup/Popup.css +24 -24
- package/dist/packages/core/src/components/Popup/Popup.d.ts +0 -11
- package/dist/packages/core/src/components/Popup/Popup.js +2 -4
- package/dist/packages/core/src/components/Popup/TrainingResultPopup.css +3 -1
- package/dist/packages/core/src/components/Tooltip/MenuTooltip.css +18 -0
- package/dist/packages/core/src/components/Tooltip/MenuTooltip.d.ts +11 -0
- package/dist/packages/core/src/components/Tooltip/MenuTooltip.js +38 -1
- package/dist/packages/core/src/components.d.ts +1 -1
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +1 -1
- package/package.json +1 -1
|
@@ -2245,7 +2245,7 @@ export declare function copyText(text: string): Promise<boolean>;
|
|
|
2245
2245
|
*
|
|
2246
2246
|
* 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
|
|
2247
2247
|
*/
|
|
2248
|
-
export declare const CORE_VERSION = "0.
|
|
2248
|
+
export declare const CORE_VERSION = "0.457.0";
|
|
2249
2249
|
|
|
2250
2250
|
/** @public */
|
|
2251
2251
|
declare const coreDefault: Record<string, unknown>;
|
|
@@ -3259,6 +3259,16 @@ export declare type FlowState = {
|
|
|
3259
3259
|
|
|
3260
3260
|
export declare function fmtBytes(n: number): string;
|
|
3261
3261
|
|
|
3262
|
+
/**
|
|
3263
|
+
* 「새 폴더」 칸 — 누르면 화면이 폴더 추가 창(`FolderAddPopup`)을 연다.
|
|
3264
|
+
* @public
|
|
3265
|
+
*/
|
|
3266
|
+
export declare interface FolderAddEntry {
|
|
3267
|
+
/** 칸 이름 — 낭독기도 이 글자를 그대로 읽는다 */
|
|
3268
|
+
label: string;
|
|
3269
|
+
onClick: () => void;
|
|
3270
|
+
}
|
|
3271
|
+
|
|
3262
3272
|
/**
|
|
3263
3273
|
* **폴더 추가 창**(말귀 청 (438) ㉴ — 말귀 앱에서 옮겨 왔다, 2026-11-14). `FolderHead` · `FolderGrid` · `FolderList` 와 한 벌이다.
|
|
3264
3274
|
*
|
|
@@ -3337,10 +3347,10 @@ export declare interface FolderEntry {
|
|
|
3337
3347
|
*
|
|
3338
3348
|
* · 칸은 `Button`(bar · 48 · default · 왼쪽 맞춤)이고 폭은 200 으로 고정이다 — 긴 이름은 단추가 줄인다.
|
|
3339
3349
|
* · **놓을 자리이기도 하다** — 카드든 폴더든 끌고 그 위에 오면 단추가 기본 호버 꼴(`is-hover`)이 된다. 따로 테를 두르지 않는다.
|
|
3340
|
-
* · 폴더가 없으면 아무것도 안 그린다(빈 격자가 자리를 먹지 않는다). 「위로」 칸(`up`)을 주면 그 칸만으로 선다.
|
|
3350
|
+
* · 폴더가 없으면 아무것도 안 그린다(빈 격자가 자리를 먹지 않는다). 「위로」 칸(`up`) · 「새 폴더」 칸(`add`)을 주면 그 칸만으로 선다.
|
|
3341
3351
|
* @public
|
|
3342
3352
|
*/
|
|
3343
|
-
export declare function FolderGrid({ folders, onOpen, dropProps, dropOver, menuItems, onMove, up }: FolderGridProps): JSX.Element | null;
|
|
3353
|
+
export declare function FolderGrid({ folders, onOpen, dropProps, dropOver, menuItems, onMove, up, add }: FolderGridProps): JSX.Element | null;
|
|
3344
3354
|
|
|
3345
3355
|
/** @public */
|
|
3346
3356
|
export declare interface FolderGridProps {
|
|
@@ -3366,6 +3376,12 @@ export declare interface FolderGridProps {
|
|
|
3366
3376
|
* 폴더가 하나도 없어도 이 칸만으로 격자가 선다. `FolderHead` 는 폴더 안에 있는 동안 늘 준다.
|
|
3367
3377
|
*/
|
|
3368
3378
|
up?: FolderUpEntry;
|
|
3379
|
+
/**
|
|
3380
|
+
* **맨 끝의 「새 폴더」 칸**(말귀 청 (448), 사장님 결정 2026-11-16) — 주면 폴더 칸과 같은 크기의 칸이 맨 끝에 선다(「위로」 · 폴더들 ·
|
|
3381
|
+
* 「새 폴더」 차례). 폴더가 하나도 없어도 이 칸만으로 격자가 서서, 맨 위에서 폴더 줄이 통째로 빠져 아래 목록이 튀지 않는다.
|
|
3382
|
+
* 폴더 칸과 갈리게 테두리가 점선이다. 안 주면 전과 같다(고르기만 하는 창).
|
|
3383
|
+
*/
|
|
3384
|
+
add?: FolderAddEntry;
|
|
3369
3385
|
}
|
|
3370
3386
|
|
|
3371
3387
|
/**
|
|
@@ -3381,7 +3397,7 @@ export declare interface FolderGridProps {
|
|
|
3381
3397
|
* · 길 줄의 키는 40 으로 고정이다(`Breadcrumb size="medium"`) — 폴더를 드나들 때 아래가 안 튄다.
|
|
3382
3398
|
* @public
|
|
3383
3399
|
*/
|
|
3384
|
-
export declare function FolderHead({ rootLabel, opened, onOpen, paths, countOf, folderMenu, rootMenu, dropProps, dropOver, onMoveFolder, itemDragging, rootDropKey, }: FolderHeadProps): JSX.Element;
|
|
3400
|
+
export declare function FolderHead({ rootLabel, opened, onOpen, paths, countOf, folderMenu, rootMenu, dropProps, dropOver, onMoveFolder, itemDragging, rootDropKey, add, }: FolderHeadProps): JSX.Element;
|
|
3385
3401
|
|
|
3386
3402
|
/** @public */
|
|
3387
3403
|
export declare interface FolderHeadProps {
|
|
@@ -3408,6 +3424,8 @@ export declare interface FolderHeadProps {
|
|
|
3408
3424
|
itemDragging?: boolean;
|
|
3409
3425
|
/** 맨 위(폴더 밖)로 놓을 때의 열쇠 — `dropProps` · `dropOver` 가 맨 위를 가리키는 그 값. 안 주면 나무의 맨 위 줄에는 못 놓는다 */
|
|
3410
3426
|
rootDropKey?: string;
|
|
3427
|
+
/** 폴더 칸 줄 맨 끝의 「새 폴더」 칸(말귀 청 (448)) — 주면 맨 위 · 폴더 안 어디서나 선다. `FolderGrid` 의 `add` 그대로 */
|
|
3428
|
+
add?: FolderAddEntry;
|
|
3411
3429
|
}
|
|
3412
3430
|
|
|
3413
3431
|
/** @public 폴더 안에 새 폴더의 길을 짓는다 — `parent` 가 없으면 맨 위에 선다 */
|
|
@@ -7005,17 +7023,6 @@ export declare interface PopupProps {
|
|
|
7005
7023
|
};
|
|
7006
7024
|
/** 커스텀 footer 래퍼에 추가할 클래스 (정렬·간격 override용) */
|
|
7007
7025
|
footerClassName?: string;
|
|
7008
|
-
/**
|
|
7009
|
-
* 바닥 줄 **위**의 한 줄 안내 띠(말귀 요청 (108), 사용자 지시 2026-10-10). 숙제 창 둘(회원 `info` ·
|
|
7010
|
-
* 매니저 `.hwd-foot`)이 `.popup-footer` 에 글줄을 싣느라 각자 덧칠했고 **벌써 둘이 달랐다**(한쪽만
|
|
7011
|
-
* 실선). 띠 높이 40 · 위로 숨 · 왼쪽 정렬 — 코어가 하나로 쥔다.
|
|
7012
|
-
*
|
|
7013
|
-
* 바닥 줄(`buttons` · `footer` · `footerStart/End`)과 **따로** 그려진다 — 바닥 줄이 없어도 선다.
|
|
7014
|
-
* 글이 길면 줄을 바꾼다(40 은 최소 높이다). `footerNoteDivider` 로 위에 실선을 둔다.
|
|
7015
|
-
*/
|
|
7016
|
-
footerNote?: ReactNode;
|
|
7017
|
-
/** `footerNote` 위에 실선(기본 없음). 창마다 있고 없고가 갈리던 자리라 **값으로** 고른다. */
|
|
7018
|
-
footerNoteDivider?: boolean;
|
|
7019
7026
|
/**
|
|
7020
7027
|
* 바닥 줄 **왼쪽 덩이** — 보조 단추(아이콘 단추 여럿)가 서는 자리.
|
|
7021
7028
|
*
|
|
@@ -8615,6 +8622,9 @@ export declare interface ShortcutBadgeProps {
|
|
|
8615
8622
|
className?: string;
|
|
8616
8623
|
}
|
|
8617
8624
|
|
|
8625
|
+
/** 단축키 글자 → 자판 자리(`KeyE` · `Digit1`). 글자 · 숫자 하나가 아니면 `null` */
|
|
8626
|
+
export declare function shortcutCode(shortcut: string | undefined): string | null;
|
|
8627
|
+
|
|
8618
8628
|
/**
|
|
8619
8629
|
* 채점 화면을 떠나려 할 때 **물어봐야 하는가.**
|
|
8620
8630
|
*
|
|
@@ -10289,6 +10299,15 @@ export declare type TooltipMenuColumnItem = {
|
|
|
10289
10299
|
/** 우측 원형 배지 숫자(알림 개수 등). 라벨에 "(5)"를 붙이는 대신 SideNav와 같은
|
|
10290
10300
|
* Badge type="dot"으로 표시한다 — 두 메뉴가 같은 항목을 다르게 보여주지 않도록. */
|
|
10291
10301
|
badgeCount?: number;
|
|
10302
|
+
/**
|
|
10303
|
+
* **단축키**(말귀 청 (447), 사장님 지시 2026-11-16 *"버튼 단축키 가능한가? · 쇼컷을 이름에 붙이지 말고 우측에 보이도록"*) — 글자 하나
|
|
10304
|
+
* (`'E'`) 또는 숫자 하나(`'1'`).
|
|
10305
|
+
* · 보이기: 항목 오른쪽 끝에 키캡으로 따로 선다. 이름이 길면 이름이 줄고 키캡은 안 잘린다. 하위 메뉴(`children`) · 배지가 있으면 그쪽이 선다.
|
|
10306
|
+
* · 누르기: 메뉴가 떠 있는 동안 그 키를 누르면 이 항목을 누른 것과 같다(`closeOnSelect` 그대로). **자판 자리(`event.code`)로 맞춰**
|
|
10307
|
+
* 한글 입력 상태에서도 먹는다. 꺼진 항목 · 입력칸에 초점이 있을 때 · Ctrl/⌘/Alt 와 함께 누를 때는 안 먹는다. 지금 보이는 목록만 본다.
|
|
10308
|
+
* · 낭독기: `aria-keyshortcuts` 로 알린다.
|
|
10309
|
+
*/
|
|
10310
|
+
shortcut?: string;
|
|
10292
10311
|
};
|
|
10293
10312
|
|
|
10294
10313
|
/** @public */
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
list-style: none;
|
|
12
12
|
}
|
|
13
13
|
.folder-grid__cell { position: relative; min-width: 0; }
|
|
14
|
+
/* 「새 폴더」 칸(청 (448)) — 폴더와 같은 크기, 테두리만 점선으로 갈린다(색은 단추 제 테두리 그대로) */
|
|
15
|
+
.folder-grid__cell--add .button { border-style: dashed; }
|
|
14
16
|
/* 칸 오른쪽의 ⋯ — 폴더 단추 위에 얹는다(세로 가운데). 단추 안에는 같은 폭의 빈자리를 둔다 */
|
|
15
17
|
.folder-grid__more {
|
|
16
18
|
position: absolute;
|
|
@@ -36,6 +36,21 @@ export interface FolderGridProps {
|
|
|
36
36
|
* 폴더가 하나도 없어도 이 칸만으로 격자가 선다. `FolderHead` 는 폴더 안에 있는 동안 늘 준다.
|
|
37
37
|
*/
|
|
38
38
|
up?: FolderUpEntry;
|
|
39
|
+
/**
|
|
40
|
+
* **맨 끝의 「새 폴더」 칸**(말귀 청 (448), 사장님 결정 2026-11-16) — 주면 폴더 칸과 같은 크기의 칸이 맨 끝에 선다(「위로」 · 폴더들 ·
|
|
41
|
+
* 「새 폴더」 차례). 폴더가 하나도 없어도 이 칸만으로 격자가 서서, 맨 위에서 폴더 줄이 통째로 빠져 아래 목록이 튀지 않는다.
|
|
42
|
+
* 폴더 칸과 갈리게 테두리가 점선이다. 안 주면 전과 같다(고르기만 하는 창).
|
|
43
|
+
*/
|
|
44
|
+
add?: FolderAddEntry;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 「새 폴더」 칸 — 누르면 화면이 폴더 추가 창(`FolderAddPopup`)을 연다.
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export interface FolderAddEntry {
|
|
51
|
+
/** 칸 이름 — 낭독기도 이 글자를 그대로 읽는다 */
|
|
52
|
+
label: string;
|
|
53
|
+
onClick: () => void;
|
|
39
54
|
}
|
|
40
55
|
/**
|
|
41
56
|
* 「위로」 칸 — 누르면 한 층 위로. 끌어다 놓는 화면에서는 **한 층 위로 옮기는 놓을 자리**도 된다.
|
|
@@ -59,7 +74,7 @@ export interface FolderUpEntry {
|
|
|
59
74
|
*
|
|
60
75
|
* · 칸은 `Button`(bar · 48 · default · 왼쪽 맞춤)이고 폭은 200 으로 고정이다 — 긴 이름은 단추가 줄인다.
|
|
61
76
|
* · **놓을 자리이기도 하다** — 카드든 폴더든 끌고 그 위에 오면 단추가 기본 호버 꼴(`is-hover`)이 된다. 따로 테를 두르지 않는다.
|
|
62
|
-
* · 폴더가 없으면 아무것도 안 그린다(빈 격자가 자리를 먹지 않는다). 「위로」 칸(`up`)을 주면 그 칸만으로 선다.
|
|
77
|
+
* · 폴더가 없으면 아무것도 안 그린다(빈 격자가 자리를 먹지 않는다). 「위로」 칸(`up`) · 「새 폴더」 칸(`add`)을 주면 그 칸만으로 선다.
|
|
63
78
|
* @public
|
|
64
79
|
*/
|
|
65
|
-
export default function FolderGrid({ folders, onOpen, dropProps, dropOver, menuItems, onMove, up }: FolderGridProps): import("react").JSX.Element | null;
|
|
80
|
+
export default function FolderGrid({ folders, onOpen, dropProps, dropOver, menuItems, onMove, up, add }: FolderGridProps): import("react").JSX.Element | null;
|
|
@@ -18,10 +18,10 @@ const UP_KEY = '\u0000up';
|
|
|
18
18
|
*
|
|
19
19
|
* · 칸은 `Button`(bar · 48 · default · 왼쪽 맞춤)이고 폭은 200 으로 고정이다 — 긴 이름은 단추가 줄인다.
|
|
20
20
|
* · **놓을 자리이기도 하다** — 카드든 폴더든 끌고 그 위에 오면 단추가 기본 호버 꼴(`is-hover`)이 된다. 따로 테를 두르지 않는다.
|
|
21
|
-
* · 폴더가 없으면 아무것도 안 그린다(빈 격자가 자리를 먹지 않는다). 「위로」 칸(`up`)을 주면 그 칸만으로 선다.
|
|
21
|
+
* · 폴더가 없으면 아무것도 안 그린다(빈 격자가 자리를 먹지 않는다). 「위로」 칸(`up`) · 「새 폴더」 칸(`add`)을 주면 그 칸만으로 선다.
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
|
-
export default function FolderGrid({ folders, onOpen, dropProps, dropOver, menuItems, onMove, up }) {
|
|
24
|
+
export default function FolderGrid({ folders, onOpen, dropProps, dropOver, menuItems, onMove, up, add }) {
|
|
25
25
|
const { t } = useTranslation();
|
|
26
26
|
/** 메뉴가 열린 폴더와 그 단추 */
|
|
27
27
|
const [menu, setMenu] = useState(null);
|
|
@@ -59,7 +59,7 @@ export default function FolderGrid({ folders, onOpen, dropProps, dropOver, menuI
|
|
|
59
59
|
const upOver = !!up && (draggingFolder === null
|
|
60
60
|
? up.cardDropKey != null && dropOver === up.cardDropKey
|
|
61
61
|
: !!up.onFolderDrop && folderDrag.dragOverKey === UP_KEY);
|
|
62
|
-
if (folders.length === 0 && !up)
|
|
62
|
+
if (folders.length === 0 && !up && !add)
|
|
63
63
|
return null;
|
|
64
64
|
return (_jsxs("ul", { className: "folder-grid", "aria-label": t('folder.list', '폴더'), children: [up && (_jsx("li", { className: ['folder-grid__cell', 'folder-grid__cell--up', upOver && 'folder-grid__cell--over'].filter(Boolean).join(' '), ...upDrag(), children: _jsx(Button, { htmlType: "button", type: "bar", size: 48, variant: "default", align: "left", width: "100%", ellipsis: true, className: upOver ? 'is-hover' : undefined, icon: "arrow-up", label: t('folder.up', '위로'), ariaLabel: t('folder.upTo', { name: up.targetLabel, defaultValue: '한 층 위로 — {{name}}' }), onClick: up.onOpen }) }, UP_KEY)), folders.map(folder => {
|
|
65
65
|
const label = folder.label ?? folder.name;
|
|
@@ -77,5 +77,5 @@ export default function FolderGrid({ folders, onOpen, dropProps, dropOver, menuI
|
|
|
77
77
|
const anchor = e.currentTarget;
|
|
78
78
|
setMenu(now => (now?.name === folder.name ? null : { name: folder.name, label, anchor }));
|
|
79
79
|
} }) }))] }, folder.name));
|
|
80
|
-
}), menu && menuItems && (_jsx(Tooltip, { anchorEl: menu.anchor, onClose: closeMenu, closeOnOutsideClick: true, offset: 4, prefer: "bottom", ariaLabel: t('folder.menu', { name: menu.label, defaultValue: '{{name}} 폴더 메뉴' }), children: _jsx(MenuTooltip, { columns: [{ items: menuItems(menu.name) }], size: "small", onClose: closeMenu }) }))] }));
|
|
80
|
+
}), add && (_jsx("li", { className: "folder-grid__cell folder-grid__cell--add", children: _jsx(Button, { htmlType: "button", type: "bar", size: 48, variant: "default", align: "left", width: "100%", ellipsis: true, icon: "folder-plus", label: add.label, onClick: add.onClick }) }, "__add")), menu && menuItems && (_jsx(Tooltip, { anchorEl: menu.anchor, onClose: closeMenu, closeOnOutsideClick: true, offset: 4, prefer: "bottom", ariaLabel: t('folder.menu', { name: menu.label, defaultValue: '{{name}} 폴더 메뉴' }), children: _jsx(MenuTooltip, { columns: [{ items: menuItems(menu.name) }], size: "small", onClose: closeMenu }) }))] }));
|
|
81
81
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type TooltipMenuColumnItem } from './Tooltip/MenuTooltip';
|
|
2
|
+
import { type FolderAddEntry } from './FolderGrid';
|
|
2
3
|
import './FolderHead.css';
|
|
3
4
|
/** @public */
|
|
4
5
|
export interface FolderHeadProps {
|
|
@@ -25,6 +26,8 @@ export interface FolderHeadProps {
|
|
|
25
26
|
itemDragging?: boolean;
|
|
26
27
|
/** 맨 위(폴더 밖)로 놓을 때의 열쇠 — `dropProps` · `dropOver` 가 맨 위를 가리키는 그 값. 안 주면 나무의 맨 위 줄에는 못 놓는다 */
|
|
27
28
|
rootDropKey?: string;
|
|
29
|
+
/** 폴더 칸 줄 맨 끝의 「새 폴더」 칸(말귀 청 (448)) — 주면 맨 위 · 폴더 안 어디서나 선다. `FolderGrid` 의 `add` 그대로 */
|
|
30
|
+
add?: FolderAddEntry;
|
|
28
31
|
}
|
|
29
32
|
/**
|
|
30
33
|
* **폴더로 보는 화면의 머리** — 구조 단추 · 길(브레드크럼) · 지금 자리의 폴더 칸들. 도구줄 **위**에 선다(말귀 청 (435)).
|
|
@@ -39,4 +42,4 @@ export interface FolderHeadProps {
|
|
|
39
42
|
* · 길 줄의 키는 40 으로 고정이다(`Breadcrumb size="medium"`) — 폴더를 드나들 때 아래가 안 튄다.
|
|
40
43
|
* @public
|
|
41
44
|
*/
|
|
42
|
-
export default function FolderHead({ rootLabel, opened, onOpen, paths, countOf, folderMenu, rootMenu, dropProps, dropOver, onMoveFolder, itemDragging, rootDropKey, }: FolderHeadProps): import("react").JSX.Element;
|
|
45
|
+
export default function FolderHead({ rootLabel, opened, onOpen, paths, countOf, folderMenu, rootMenu, dropProps, dropOver, onMoveFolder, itemDragging, rootDropKey, add, }: FolderHeadProps): import("react").JSX.Element;
|
|
@@ -22,7 +22,7 @@ import './FolderHead.css';
|
|
|
22
22
|
* · 길 줄의 키는 40 으로 고정이다(`Breadcrumb size="medium"`) — 폴더를 드나들 때 아래가 안 튄다.
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
export default function FolderHead({ rootLabel, opened, onOpen, paths, countOf, folderMenu, rootMenu, dropProps, dropOver, onMoveFolder, itemDragging, rootDropKey, }) {
|
|
25
|
+
export default function FolderHead({ rootLabel, opened, onOpen, paths, countOf, folderMenu, rootMenu, dropProps, dropOver, onMoveFolder, itemDragging, rootDropKey, add, }) {
|
|
26
26
|
const { t } = useTranslation();
|
|
27
27
|
/** 길의 메뉴가 붙을 단추 — 열려 있으면 그 단추 */
|
|
28
28
|
const [menuAnchor, setMenuAnchor] = useState(null);
|
|
@@ -65,5 +65,5 @@ export default function FolderHead({ rootLabel, opened, onOpen, paths, countOf,
|
|
|
65
65
|
onOpen: () => onOpen(parent),
|
|
66
66
|
cardDropKey: parent ?? rootDropKey,
|
|
67
67
|
onFolderDrop: onMoveFolder ? path => onMoveFolder(path, parent) : undefined,
|
|
68
|
-
} : undefined }), menuAnchor && hasMenu && (_jsx(Tooltip, { anchorEl: menuAnchor, onClose: closeMenu, closeOnOutsideClick: true, offset: 4, prefer: "bottom", ariaLabel: menuLabel, children: _jsx(MenuTooltip, { columns: [{ items: (opened ? folderMenu?.(opened) : rootMenu) ?? [] }], size: "small", onClose: closeMenu }) }))] }));
|
|
68
|
+
} : undefined, add: add }), menuAnchor && hasMenu && (_jsx(Tooltip, { anchorEl: menuAnchor, onClose: closeMenu, closeOnOutsideClick: true, offset: 4, prefer: "bottom", ariaLabel: menuLabel, children: _jsx(MenuTooltip, { columns: [{ items: (opened ? folderMenu?.(opened) : rootMenu) ?? [] }], size: "small", onClose: closeMenu }) }))] }));
|
|
69
69
|
}
|
|
@@ -72,7 +72,9 @@
|
|
|
72
72
|
/* 좁아지면 **오른쪽 묶음이 아랫줄로 내려간다**. 예전에는 묶음이 `flex-shrink: 0` 이라 제 속 너비를
|
|
73
73
|
끝까지 우기고 제목 칸만 0 까지 눌려, 좁은 화면에서 제목이 한 글자씩 세로로 쏟아졌다
|
|
74
74
|
(말귀 2026-09-22 실측). 제목에 밑바닥(220px)을 줘 그 아래로는 줄을 바꾸게 한다. */
|
|
75
|
-
|
|
75
|
+
/* **머리 · 바닥은 사방 20, 본문은 좌우 20 · 위아래 0**(사장님 지시 2026-11-16) — 칸 사이 간격은 머리 아래 20 · 바닥 위 20 이 쥔다.
|
|
76
|
+
본문이 위아래 여백을 안 가지니 굴릴 때 내용이 머리 · 바닥 선까지 닿는다. 전에는 머리 아래 0 · 본문 위 20 · 본문 속 아래 20 · 바닥 위 0 이었다(보이는 간격은 같다). */
|
|
77
|
+
.popup-header { padding: var(--spacing-l); display: flex; align-items: center; flex-wrap: wrap; gap: var(--spacing-s); flex-shrink: 0; }
|
|
76
78
|
.popup-header--with-subtitle { align-items: flex-start; }
|
|
77
79
|
/* **밑바닥이 220px 이면 줄바꿈이 너무 일찍 정해진다**(말귀 청 (346), 2026-10-28).
|
|
78
80
|
flex 는 줄을 나눌 때 **줄이기 전의 크기**(= flex-basis)로 센다. 제목이 87px 밖에 안 쓰는데
|
|
@@ -102,10 +104,10 @@
|
|
|
102
104
|
넓은 것을 얹는 자리다. 닫기(✕)는 어느 경우에도 이 묶음 안에 있어 손이 닿는다. */
|
|
103
105
|
.popup-header-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; min-width: 0; flex-shrink: 0; }
|
|
104
106
|
.popup-content {
|
|
105
|
-
padding:
|
|
106
|
-
/*
|
|
107
|
+
padding: 0 var(--spacing-l);
|
|
108
|
+
/* 막대는 영역을 안 차지한다 — 자리를 미리 잡고 그만큼 오른쪽 여백을 깎아, 보이는 좌우 여백이 막대 유무와 상관없이 20 이다(청 (444) ②) */
|
|
107
109
|
scrollbar-gutter: stable;
|
|
108
|
-
padding-inline-end: calc(
|
|
110
|
+
padding-inline-end: calc(var(--spacing-l) - var(--scrollbar-size));
|
|
109
111
|
flex: 1;
|
|
110
112
|
min-height: 0;
|
|
111
113
|
overflow-x: hidden;
|
|
@@ -116,26 +118,21 @@
|
|
|
116
118
|
overscroll-behavior: contain;
|
|
117
119
|
touch-action: pan-y;
|
|
118
120
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
/* **`.popup-content__inner` — 굴러가는 칸 안의 한 겹.** 바탕에서는 여백이 없다(본문 위아래 0, 사장님 지시 2026-11-16). 하는 일은 셋:
|
|
122
|
+
· 아래 여백이 필요할 때 **굴림과 함께 움직이게** 이 겹에 준다 — 바닥이 없는 창(아래 규칙) · 확인창(맨 아래).
|
|
123
|
+
굴러가는 칸(`.popup-content`) 제 padding-bottom 은 브라우저에 따라 굴림 끝에 안 붙어, 겹에 준다.
|
|
124
|
+
· `fillBody` 에서 높이를 물려받는 세로 flex 고리(위 `.popup-panel--fill-body`).
|
|
125
|
+
· 소비자가 본문 전체를 잡는 자리(코어 `WordTablePopup`, 말귀 앱 몇 창) — 이름을 바꾸지 않는다. */
|
|
126
|
+
/* **머리나 바닥이 없을 때만 본문이 그 쪽 20 을 쥔다** — 판 끝에 내용이 붙지 않게.
|
|
127
|
+
머리가 없으면(제목 · 닫기 둘 다 없거나 `useTitle={false}` 로 닫기만 떠 있을 때) 위 20, 바닥이 없으면 아래 20. */
|
|
128
|
+
.popup-panel > .popup-content:first-child,
|
|
129
|
+
.popup-close-float + .popup-content { padding-top: var(--spacing-l); }
|
|
130
|
+
.popup-panel > .popup-content:last-child > .popup-content__inner { padding-bottom: var(--spacing-l); }
|
|
122
131
|
/* 세로는 가운데 — 안 적어 두면 stretch 라, 키가 다른 것(보조 글월 + 단추)을 나란히 두면 늘어난다.
|
|
123
132
|
소비자 셋이 이 자리를 각자 `align-items: center` 로 칠하고 있었다(2026-09-17 말귀 전수). */
|
|
124
133
|
/* 좁으면 **줄을 바꾼다.** 안 바꾸면 단추 셋(120×3 + 사이 = 408px)이 353px 바닥에 그대로 서서
|
|
125
134
|
마지막 단추의 오른쪽 55px 이 잘렸다 — 잘린 쪽은 눌리지도 않는다(말귀 375px 채점 창 실측). */
|
|
126
|
-
.popup-footer { padding:
|
|
127
|
-
/* 바닥 줄 **위**의 한 줄 안내 띠((108), 2026-10-10) — 최소 40 · 위로 숨 · 왼쪽 정렬. 본문 `padding-bottom: 20`
|
|
128
|
-
이 "위로 숨" 이고, 띠는 바닥 줄과 같은 좌우 20 을 쓴다. 숙제 창 둘이 각자 덧칠하던 규칙 — 실선은 값으로 고른다. */
|
|
129
|
-
.popup-footer-note {
|
|
130
|
-
min-height: 40px;
|
|
131
|
-
display: flex;
|
|
132
|
-
align-items: center;
|
|
133
|
-
padding: 0 20px;
|
|
134
|
-
text-align: left;
|
|
135
|
-
color: var(--color-gray);
|
|
136
|
-
flex-shrink: 0;
|
|
137
|
-
}
|
|
138
|
-
.popup-footer-note--divider { border-top: 1px solid var(--color-darkWhite); }
|
|
135
|
+
.popup-footer { padding: var(--spacing-l); display:flex; flex-wrap: wrap; gap:8px; justify-content:center; align-items:center }
|
|
139
136
|
/* 바닥 배치(footerLayout) */
|
|
140
137
|
.popup-footer--fill > * { flex: 1 }
|
|
141
138
|
.popup-footer--between {
|
|
@@ -260,6 +257,9 @@
|
|
|
260
257
|
(처음에 "표(`panel-row`)와 선을 맞춘다" 로 읽어 20px 들여쓰기로 올렸다가 사장님께
|
|
261
258
|
바로잡혔다. 눈에 보인 어긋남과 말씀하신 것이 달랐다.) */
|
|
262
259
|
.confirm-popup__message {
|
|
260
|
+
/* **제목보다 한 단계 옅게**(말귀 청 (446-1), 사장님 지시 2026-11-16 *"색상이 너무 진한데"*, 색은 사장님이 골랐다) — 색이 없어 제목과
|
|
261
|
+
같은 --color-black 을 물려받았다 */
|
|
262
|
+
color: var(--color-darkGray);
|
|
263
263
|
padding: 8px 0;
|
|
264
264
|
margin: 0 auto;
|
|
265
265
|
width: fit-content;
|
|
@@ -267,13 +267,13 @@
|
|
|
267
267
|
text-align: left;
|
|
268
268
|
text-indent: 1em;
|
|
269
269
|
}
|
|
270
|
-
/* 확인 팝업은 본문 위/아래
|
|
271
|
-
.confirm-popup .popup-content { padding-top:
|
|
272
|
-
.confirm-popup .popup-content__inner { padding-bottom:
|
|
270
|
+
/* 확인 팝업은 본문 위/아래 숨을 20 씩 더(기본 20 → 40) — 머리 아래 20 · 바닥 위 20 에 본문이 20 씩 더한다 */
|
|
271
|
+
.confirm-popup .popup-content { padding-top: var(--spacing-l); }
|
|
272
|
+
.confirm-popup .popup-content__inner { padding-bottom: var(--spacing-l); }
|
|
273
273
|
/* **위에 미리보기가 서면 그 더한 여백은 되돌린다.** 글만 있는 확인창에서는 그 한 뼘이 숨 쉴
|
|
274
274
|
자리지만, 맨 위에 표나 카드가 서면 제목과 내용을 공연히 벌려 놓는다(사용자 지시 2026-09-23
|
|
275
275
|
"여백이 많아보여"). 부르는 쪽 둘이 각자 되돌리고 있던 것을 여기서 한다(2026-09-25). */
|
|
276
|
-
.confirm-popup--has-top .popup-content { padding-top:
|
|
276
|
+
.confirm-popup--has-top .popup-content { padding-top: 0; }
|
|
277
277
|
/* details Panel과 아래 메시지 사이 간격 */
|
|
278
278
|
.confirm-popup .panel + .confirm-popup__message { margin-top: 16px; }
|
|
279
279
|
/* **최상단 자리 — 세로로 쌓고 가로는 가운데.**
|
|
@@ -52,17 +52,6 @@ export interface PopupProps {
|
|
|
52
52
|
};
|
|
53
53
|
/** 커스텀 footer 래퍼에 추가할 클래스 (정렬·간격 override용) */
|
|
54
54
|
footerClassName?: string;
|
|
55
|
-
/**
|
|
56
|
-
* 바닥 줄 **위**의 한 줄 안내 띠(말귀 요청 (108), 사용자 지시 2026-10-10). 숙제 창 둘(회원 `info` ·
|
|
57
|
-
* 매니저 `.hwd-foot`)이 `.popup-footer` 에 글줄을 싣느라 각자 덧칠했고 **벌써 둘이 달랐다**(한쪽만
|
|
58
|
-
* 실선). 띠 높이 40 · 위로 숨 · 왼쪽 정렬 — 코어가 하나로 쥔다.
|
|
59
|
-
*
|
|
60
|
-
* 바닥 줄(`buttons` · `footer` · `footerStart/End`)과 **따로** 그려진다 — 바닥 줄이 없어도 선다.
|
|
61
|
-
* 글이 길면 줄을 바꾼다(40 은 최소 높이다). `footerNoteDivider` 로 위에 실선을 둔다.
|
|
62
|
-
*/
|
|
63
|
-
footerNote?: ReactNode;
|
|
64
|
-
/** `footerNote` 위에 실선(기본 없음). 창마다 있고 없고가 갈리던 자리라 **값으로** 고른다. */
|
|
65
|
-
footerNoteDivider?: boolean;
|
|
66
55
|
/**
|
|
67
56
|
* 바닥 줄 **왼쪽 덩이** — 보조 단추(아이콘 단추 여럿)가 서는 자리.
|
|
68
57
|
*
|
|
@@ -18,7 +18,7 @@ const ANIM_MS = POPUP_CLOSE_MS; // 닫힘 시간은 한 곳(popupTiming.ts) —
|
|
|
18
18
|
/** @public */
|
|
19
19
|
export default function Popup(props) {
|
|
20
20
|
const { t } = useTranslation();
|
|
21
|
-
const { title, subtitle, headerActions, headerSegment, children, buttons, footer, footerStart, footerEnd,
|
|
21
|
+
const { title, subtitle, headerActions, headerSegment, children, buttons, footer, footerStart, footerEnd, footerClassName = "", footerLayout = 'center', onClose, closeDisabled = false, beforeClose, closeOnBackdrop = true, backClosable = true, className = "", ariaLabel, useTitle = true, inline = false, width, size, layer = 'modal', height, fillBody = false, resetScrollKey } = props || {};
|
|
22
22
|
/* 넓이 — `width` 가 이긴다. 옛 `size` 의 `fullwidth` 는 `full`. 클래스 이름은 그대로 둔다(앱이 `.popup-panel--fullwidth` 를 짚을 수 있다) */
|
|
23
23
|
const widthName = width ?? (size === 'fullwidth' ? 'full' : size);
|
|
24
24
|
const widthClass = widthName ? ` popup-panel--${widthName === 'full' ? 'fullwidth' : widthName}` : '';
|
|
@@ -248,9 +248,7 @@ export default function Popup(props) {
|
|
|
248
248
|
max-height(CSS)가 height 보다 이기므로 화면보다 크게 줘도 화면에 맞춰진다 */
|
|
249
249
|
style: hasHeight && height !== 'full' ? { '--popup-height': typeof height === 'number' ? `${height}px` : height } : undefined, tabIndex: -1, role: inline ? undefined : 'dialog', "aria-modal": inline ? undefined : true, "aria-labelledby": !inline && useTitle && title ? titleId : undefined, "aria-label": !inline && !(useTitle && title) ? (ariaLabel ?? (typeof title === 'string' ? title : undefined)) : undefined, children: [!useTitle && (headerActions || onClose) ? (_jsxs("div", { className: "popup-close-float", children: [headerActions, onClose && _jsx(Button, { htmlType: "button", size: 40, type: "dot", icon: "x", variant: "transparent-gray", useBorder: false, className: "popup-close-btn", onClick: closeWithAnimation, disabled: closeDisabled, ariaLabel: t('common.close', '닫기') })] })) : (title || headerActions || onClose) ? (_jsxs("div", { className: `popup-header${subtitle ? ' popup-header--with-subtitle' : ''}`, children: [_jsxs("div", { className: "popup-header-main", children: [title
|
|
250
250
|
? _jsx("h2", { id: titleId, className: "popup-title popup-title--left h2", children: title })
|
|
251
|
-
: _jsx("span", { id: titleId, className: "popup-title popup-title--left h2" }), subtitle && _jsx("span", { className: "popup-subtitle body-3", children: subtitle })] }), _jsxs("div", { className: "popup-header-aside", children: [headerSegment && (_jsx("div", { className: "popup-header-segment", children: _jsx(SegmentedControl, { size: 40, ariaLabel: headerSegment.ariaLabel, options: headerSegment.options.map(o => ({ key: o.key, label: o.label, disabled: o.disabled })), value: headerSegment.value, onChange: headerSegment.onChange }) })), _jsxs("div", { className: "popup-header-actions", children: [headerActions, onClose && (_jsx(Button, { htmlType: "button", size: 40, type: "dot", icon: "x", variant: "transparent-gray", useBorder: false, className: "popup-close-btn", onClick: closeWithAnimation, disabled: closeDisabled, ariaLabel: t('common.close', '닫기') }))] })] })] })) : null, _jsx("div", { className: "popup-content", ref: contentRef, tabIndex: contentScrollable ? 0 : undefined, children: _jsx("div", { className: "popup-content__inner", children: typeof children === 'function' ? children({ animateThen, closeWithAnimation }) : children }) }),
|
|
252
|
-
/* 바닥 줄 위의 안내 띠 — 바닥 줄과 따로 선다((108)). `role="note"` 로 낭독기에 "참고" 로 읽힌다. */
|
|
253
|
-
_jsx("div", { className: `popup-footer-note caption-1${footerNoteDivider ? ' popup-footer-note--divider' : ''}`, role: "note", children: footerNote })), (footerStart || footerEnd) ? (
|
|
251
|
+
: _jsx("span", { id: titleId, className: "popup-title popup-title--left h2" }), subtitle && _jsx("span", { className: "popup-subtitle body-3", children: subtitle })] }), _jsxs("div", { className: "popup-header-aside", children: [headerSegment && (_jsx("div", { className: "popup-header-segment", children: _jsx(SegmentedControl, { size: 40, ariaLabel: headerSegment.ariaLabel, options: headerSegment.options.map(o => ({ key: o.key, label: o.label, disabled: o.disabled })), value: headerSegment.value, onChange: headerSegment.onChange }) })), _jsxs("div", { className: "popup-header-actions", children: [headerActions, onClose && (_jsx(Button, { htmlType: "button", size: 40, type: "dot", icon: "x", variant: "transparent-gray", useBorder: false, className: "popup-close-btn", onClick: closeWithAnimation, disabled: closeDisabled, ariaLabel: t('common.close', '닫기') }))] })] })] })) : null, _jsx("div", { className: "popup-content", ref: contentRef, tabIndex: contentScrollable ? 0 : undefined, children: _jsx("div", { className: "popup-content__inner", children: typeof children === 'function' ? children({ animateThen, closeWithAnimation }) : children }) }), (footerStart || footerEnd) ? (
|
|
254
252
|
/* 왼쪽·오른쪽 덩이 — 빈 덩이도 그린다(자리를 지켜야 오른쪽이 끝에 선다).
|
|
255
253
|
`footerLayout` 은 보지 않는다: 이 줄 자체가 배치다. */
|
|
256
254
|
_jsxs("div", { className: `popup-footer popup-footer--bar${footerClassName ? ` ${footerClassName}` : ''}`, children: [_jsx("div", { className: "popup-footer__start", children: typeof footerStart === 'function' ? footerStart({ animateThen, closeWithAnimation }) : footerStart }), _jsx("div", { className: "popup-footer__end", children: typeof footerEnd === 'function' ? footerEnd({ animateThen, closeWithAnimation }) : footerEnd })] })) : buttons?.length ? (_jsx("div", { className: `popup-footer popup-footer--buttons${footerLayout !== 'center' ? ` popup-footer--${footerLayout}` : ''}`, children: buttons.map((btn, i) => (_jsx(Button, { htmlType: "button", size: 48, variant: btn.variant ?? 'default', label: btn.label, disabled: btn.disabled, onClick: () => btn.onClick?.({ animateThen, closeWithAnimation }) }, i))) })) : footer ? (_jsx("div", { className: `popup-footer${footerLayout !== 'center' ? ` popup-footer--${footerLayout}` : ''}${footerClassName ? ` ${footerClassName}` : ''}`, children: typeof footer === 'function' ? footer({ animateThen, closeWithAnimation }) : footer })) : null] }) }));
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
flex: 1;
|
|
8
8
|
min-height: 0;
|
|
9
|
-
/* 여백은 전부 바깥(
|
|
9
|
+
/* 여백은 전부 바깥(본문 좌우 20 · 위는 아래 규칙의 20 · 바닥 사방 20)이
|
|
10
10
|
이미 대고 있다. 여기서 또 주면 결과 표만 안쪽으로 밀려 좁아 보이므로 0으로 둔다.
|
|
11
11
|
head는 자체 padding(12px 72px 20px)으로 중앙 정렬 폭을 따로 잡는다. */
|
|
12
12
|
padding: 0;
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
z-index: 1;
|
|
23
23
|
padding: var(--spacing-l) var(--spacing-l) 0;
|
|
24
24
|
}
|
|
25
|
+
/* 머리가 떠 있어 본문이 판 맨 위에 선다 — 판 끝과의 20 은 본문이 쥔다(머리가 흐름에 있을 때 머리가 쥐던 몫) */
|
|
26
|
+
.popup--training-result .popup-content { padding-top: var(--spacing-l); }
|
|
25
27
|
|
|
26
28
|
/* ── Header ── */
|
|
27
29
|
.trp-result__head {
|
|
@@ -90,3 +90,21 @@
|
|
|
90
90
|
flex-direction: column;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
/* **단축키 키캡**(말귀 청 (447)) — 항목 오른쪽 끝, 이름과 따로. 이름이 길면 이름이 줄고 키캡은 안 잘린다.
|
|
95
|
+
색은 이 메뉴에 있던 값 그대로 — 글자는 열 머리글(lightGray), 테두리는 구분선(whiteLine). */
|
|
96
|
+
.menu-tooltip__shortcut {
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
min-width: 22px;
|
|
99
|
+
height: 22px;
|
|
100
|
+
padding: 0 6px;
|
|
101
|
+
display: inline-flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
border: 1px solid var(--color-whiteLine);
|
|
106
|
+
border-radius: var(--radius-xs);
|
|
107
|
+
color: var(--color-lightGray);
|
|
108
|
+
font-family: inherit;
|
|
109
|
+
line-height: 1;
|
|
110
|
+
}
|
|
@@ -19,7 +19,18 @@ export type TooltipMenuColumnItem = {
|
|
|
19
19
|
/** 우측 원형 배지 숫자(알림 개수 등). 라벨에 "(5)"를 붙이는 대신 SideNav와 같은
|
|
20
20
|
* Badge type="dot"으로 표시한다 — 두 메뉴가 같은 항목을 다르게 보여주지 않도록. */
|
|
21
21
|
badgeCount?: number;
|
|
22
|
+
/**
|
|
23
|
+
* **단축키**(말귀 청 (447), 사장님 지시 2026-11-16 *"버튼 단축키 가능한가? · 쇼컷을 이름에 붙이지 말고 우측에 보이도록"*) — 글자 하나
|
|
24
|
+
* (`'E'`) 또는 숫자 하나(`'1'`).
|
|
25
|
+
* · 보이기: 항목 오른쪽 끝에 키캡으로 따로 선다. 이름이 길면 이름이 줄고 키캡은 안 잘린다. 하위 메뉴(`children`) · 배지가 있으면 그쪽이 선다.
|
|
26
|
+
* · 누르기: 메뉴가 떠 있는 동안 그 키를 누르면 이 항목을 누른 것과 같다(`closeOnSelect` 그대로). **자판 자리(`event.code`)로 맞춰**
|
|
27
|
+
* 한글 입력 상태에서도 먹는다. 꺼진 항목 · 입력칸에 초점이 있을 때 · Ctrl/⌘/Alt 와 함께 누를 때는 안 먹는다. 지금 보이는 목록만 본다.
|
|
28
|
+
* · 낭독기: `aria-keyshortcuts` 로 알린다.
|
|
29
|
+
*/
|
|
30
|
+
shortcut?: string;
|
|
22
31
|
};
|
|
32
|
+
/** 단축키 글자 → 자판 자리(`KeyE` · `Digit1`). 글자 · 숫자 하나가 아니면 `null` */
|
|
33
|
+
export declare function shortcutCode(shortcut: string | undefined): string | null;
|
|
23
34
|
/** @public */
|
|
24
35
|
export type TooltipMenuColumn = {
|
|
25
36
|
/**
|
|
@@ -6,6 +6,15 @@ import Button from '../Button';
|
|
|
6
6
|
import CircleBadge from '../CircleBadge';
|
|
7
7
|
import './MenuTooltip.css';
|
|
8
8
|
import { withLegacy } from '../../utils/legacyBlocks';
|
|
9
|
+
/** 단축키 글자 → 자판 자리(`KeyE` · `Digit1`). 글자 · 숫자 하나가 아니면 `null` */
|
|
10
|
+
export function shortcutCode(shortcut) {
|
|
11
|
+
const k = (shortcut ?? '').trim().toUpperCase();
|
|
12
|
+
if (/^[A-Z]$/.test(k))
|
|
13
|
+
return `Key${k}`;
|
|
14
|
+
if (/^[0-9]$/.test(k))
|
|
15
|
+
return `Digit${k}`;
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
9
18
|
/** @public */
|
|
10
19
|
export default function MenuTooltip({ columns = [], onClose, className = '', size = 'medium' }) {
|
|
11
20
|
const { t } = useTranslation();
|
|
@@ -82,6 +91,32 @@ export default function MenuTooltip({ columns = [], onClose, className = '', siz
|
|
|
82
91
|
}
|
|
83
92
|
catch (err) { }
|
|
84
93
|
}, [onClose, visibleDepth]);
|
|
94
|
+
/* **단축키**(청 (447)) — 떠 있는 동안 지금 보이는 목록의 항목을 자판 자리로 누른다. 최신 목록 · 손은 ref 로 읽어 듣개를 한 번만 건다 */
|
|
95
|
+
const shortcutRef = useRef({ columns: current.columns, handleClick });
|
|
96
|
+
shortcutRef.current = { columns: current.columns, handleClick };
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
const onKey = (e) => {
|
|
99
|
+
if (e.defaultPrevented || e.ctrlKey || e.metaKey || e.altKey)
|
|
100
|
+
return;
|
|
101
|
+
const target = e.target;
|
|
102
|
+
if (target && (target.closest?.('input, textarea, select, [contenteditable=""], [contenteditable="true"]')))
|
|
103
|
+
return;
|
|
104
|
+
const { columns: cols, handleClick: press } = shortcutRef.current;
|
|
105
|
+
for (let ci = 0; ci < (cols?.length ?? 0); ci++) {
|
|
106
|
+
const items = cols[ci]?.items ?? [];
|
|
107
|
+
for (let ii = 0; ii < items.length; ii++) {
|
|
108
|
+
const it = items[ii];
|
|
109
|
+
if (!it || it.disabled || shortcutCode(it.shortcut) !== e.code)
|
|
110
|
+
continue;
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
press(it, ci, ii);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
window.addEventListener('keydown', onKey);
|
|
118
|
+
return () => window.removeEventListener('keydown', onKey);
|
|
119
|
+
}, []);
|
|
85
120
|
return (_jsxs("div", { className: withLegacy(`menu-tooltip menu-tooltip--${size} ${className}`), children: [(stack.length > 1 || current.title) && (_jsxs("div", { className: withLegacy("menu-tooltip__header"), children: [stack.length > 1 ? (_jsx(Button, { htmlType: "button", size: itemSize, type: "dot", icon: "chevron-left", ariaLabel: t('common.back', '뒤로'), onClick: goBack, variant: "transparent-gray", useBorder: false })) : null, _jsx("div", { className: withLegacy("menu-tooltip__title button-1"), children: current.title })] })), _jsx("div", { className: withLegacy("menu-tooltip__columns"), ref: itemsWrapRef, children: current.columns && current.columns.map((col, ci) => {
|
|
86
121
|
/**
|
|
87
122
|
* **아무도 안 쓰는 왼쪽 자리는 안 세운다**(말귀 청 (349), 2026-10-29).
|
|
@@ -111,7 +146,9 @@ export default function MenuTooltip({ columns = [], onClose, className = '', siz
|
|
|
111
146
|
? 'chevron-right'
|
|
112
147
|
: item.badgeCount
|
|
113
148
|
? _jsx(CircleBadge, { position: "inline", number: Math.min(item.badgeCount, 99), size: 24, "aria-hidden": true })
|
|
114
|
-
:
|
|
149
|
+
: shortcutCode(item.shortcut)
|
|
150
|
+
? _jsx("kbd", { className: withLegacy('menu-tooltip__shortcut caption-1'), "aria-hidden": "true", children: item.shortcut.trim().toUpperCase() })
|
|
151
|
+
: undefined, "aria-keyshortcuts": shortcutCode(item.shortcut) ? item.shortcut.trim().toUpperCase() : undefined, ellipsis: shortcutCode(item.shortcut) ? true : undefined, label: item.label,
|
|
115
152
|
/* 개수는 이름에 붙인다 — ariaLabel 이 글자뿐이라 배지 수가 이름에서 빠져 "알림" 으로만 읽혔다
|
|
116
153
|
(SideNav·BottomNav 와 같은 nav.badgeLabel "알림, 5개"). */
|
|
117
154
|
ariaLabel: item.label && item.badgeCount && item.badgeCount > 0
|
|
@@ -106,7 +106,7 @@ export type { BreadcrumbProps, BreadcrumbItem } from './components/Breadcrumb';
|
|
|
106
106
|
export { default as FolderHead } from './components/FolderHead';
|
|
107
107
|
export type { FolderHeadProps } from './components/FolderHead';
|
|
108
108
|
export { default as FolderGrid } from './components/FolderGrid';
|
|
109
|
-
export type { FolderGridProps, FolderEntry, FolderUpEntry } from './components/FolderGrid';
|
|
109
|
+
export type { FolderGridProps, FolderEntry, FolderUpEntry, FolderAddEntry } from './components/FolderGrid';
|
|
110
110
|
export { default as FolderList } from './components/FolderList';
|
|
111
111
|
export type { FolderListProps } from './components/FolderList';
|
|
112
112
|
export { default as FolderAddPopup } from './components/FolderAddPopup';
|