@ihabdevteam/core 0.437.0 → 0.440.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +3 -3
  3. package/dist/components.cjs.js +196 -186
  4. package/dist/components.esm.css +3 -3
  5. package/dist/hooks.cjs.js +5 -5
  6. package/dist/i18n.cjs.js +3 -3
  7. package/dist/ihabdevteam-core.cjs.js +195 -185
  8. package/dist/ihabdevteam-core.d.ts +317 -6
  9. package/dist/packages/core/src/components/Breadcrumb.css +52 -0
  10. package/dist/packages/core/src/components/Breadcrumb.d.ts +19 -1
  11. package/dist/packages/core/src/components/Breadcrumb.js +12 -4
  12. package/dist/packages/core/src/components/Button.css +9 -2
  13. package/dist/packages/core/src/components/Dropdown.css +2 -1
  14. package/dist/packages/core/src/components/FolderGrid.css +28 -0
  15. package/dist/packages/core/src/components/FolderGrid.d.ts +47 -0
  16. package/dist/packages/core/src/components/FolderGrid.js +76 -0
  17. package/dist/packages/core/src/components/FolderHead.css +8 -0
  18. package/dist/packages/core/src/components/FolderHead.d.ts +42 -0
  19. package/dist/packages/core/src/components/FolderHead.js +62 -0
  20. package/dist/packages/core/src/components/FolderTreeButton.css +2 -0
  21. package/dist/packages/core/src/components/FolderTreeButton.d.ts +34 -0
  22. package/dist/packages/core/src/components/FolderTreeButton.js +44 -0
  23. package/dist/packages/core/src/components/Popup/ConfirmPopup.d.ts +8 -2
  24. package/dist/packages/core/src/components/Popup/ConfirmPopup.js +3 -3
  25. package/dist/packages/core/src/components/Popup/Popup.css +2 -0
  26. package/dist/packages/core/src/components/SideNav.css +8 -0
  27. package/dist/packages/core/src/components/SideNav.js +4 -1
  28. package/dist/packages/core/src/components/Tooltip/DescriptionTooltip.css +1 -1
  29. package/dist/packages/core/src/components/Tooltip/FolderTreeTooltip.css +99 -0
  30. package/dist/packages/core/src/components/Tooltip/FolderTreeTooltip.d.ts +60 -0
  31. package/dist/packages/core/src/components/Tooltip/FolderTreeTooltip.js +81 -0
  32. package/dist/packages/core/src/components/Tooltip/TextBoxTooltip.css +1 -1
  33. package/dist/packages/core/src/components/Tooltip/Tooltip.css +5 -1
  34. package/dist/packages/core/src/components/Tooltip/Tooltip.d.ts +6 -0
  35. package/dist/packages/core/src/components/Tooltip/Tooltip.js +10 -4
  36. package/dist/packages/core/src/components/Tooltip/TrainingTooltip.css +1 -0
  37. package/dist/packages/core/src/components/Tooltip/WordImageTooltip.css +1 -0
  38. package/dist/packages/core/src/components/Training/TrainingCard.css +45 -8
  39. package/dist/packages/core/src/components/Training/TrainingCard.d.ts +35 -2
  40. package/dist/packages/core/src/components/Training/TrainingCard.js +26 -5
  41. package/dist/packages/core/src/components.d.ts +8 -0
  42. package/dist/packages/core/src/components.js +5 -0
  43. package/dist/packages/core/src/i18n/locales/en.json +10 -0
  44. package/dist/packages/core/src/i18n/locales/ko.json +9 -0
  45. package/dist/packages/core/src/utils/folderPath.d.ts +50 -0
  46. package/dist/packages/core/src/utils/folderPath.js +98 -0
  47. package/dist/packages/core/src/utils/lucideIconSet.js +4 -0
  48. package/dist/packages/core/src/utils.d.ts +1 -0
  49. package/dist/packages/core/src/utils.js +2 -0
  50. package/dist/packages/core/src/version.d.ts +1 -1
  51. package/dist/packages/core/src/version.js +1 -1
  52. package/dist/utils.cjs.js +175 -165
  53. package/package.json +3 -3
@@ -0,0 +1,47 @@
1
+ import { type TooltipMenuColumnItem } from './Tooltip/MenuTooltip';
2
+ import './FolderGrid.css';
3
+ /**
4
+ * 폴더 칸 하나에 그릴 것.
5
+ * @public
6
+ */
7
+ export interface FolderEntry {
8
+ /** 폴더의 **온 길**(`앙/하위`) — 여는 손 · 끌어다 놓는 손 · 메뉴가 이것을 받는다 */
9
+ name: string;
10
+ /** 화면에 보일 이름 — 길의 마지막 마디. 안 주면 `name` 그대로 */
11
+ label?: string;
12
+ /** 이 폴더에 든 수 — 찾기 · 쪽 나누기와 상관없이 **전부** */
13
+ count: number;
14
+ }
15
+ /** @public */
16
+ export interface FolderGridProps {
17
+ folders: FolderEntry[];
18
+ onOpen: (name: string) => void;
19
+ /** 그 칸을 **든 것(카드)이 놓일 자리**로 만드는 손 — 화면의 끌기 훅이 내주는 것(`onDragOver` · `onDrop` …)을 그대로 얹는다 */
20
+ dropProps?: (name: string) => Record<string, unknown>;
21
+ /** 지금 카드가 그 위에 떠 있는 폴더 */
22
+ dropOver?: string | null;
23
+ /**
24
+ * 폴더 칸 오른쪽의 ⋯ 메뉴 — 주면 칸마다 ⋯ 가 서고, 누르면 그 폴더의 메뉴가 아래로 열린다(폴더는 안 열린다).
25
+ * `FolderHead` 는 길의 「이름 ▾」 와 **같은 줄들**을 넘긴다.
26
+ */
27
+ menuItems?: (name: string) => TooltipMenuColumnItem[];
28
+ /**
29
+ * **폴더 칸을 끌어 다른 폴더 칸에 넣는다** — 주면 칸을 쥐고 끌 수 있고, 다른 폴더 칸에 놓으면 그 안으로 들어간다.
30
+ * 제 자신에게는 안 놓인다. 폴더 밖으로 빼는 것은 구조 나무(`FolderTreeTooltip`)에서 한다(여기 선 칸들은 모두 같은 자리의
31
+ * 폴더라 '밖' 이 없다).
32
+ */
33
+ onMove?: (path: string, into: string) => void;
34
+ }
35
+ /**
36
+ * **폴더 칸의 격자** — 폴더 하나가 단추 하나(아이콘 · 이름 · 든 수)이고, 누르면 그 안으로 들어간다(말귀 청 (435)).
37
+ *
38
+ * 말귀의 나의 단어훈련에서 먼저 섰다(사장님 지시 2026-11-13 *"그룹과 훈련묶음의 화면이 구조가 이해도 안되고 어떤 그룹은 하단으로
39
+ * 내려가 있으니까 너무 불편해. 구글 드라이브 식으로"* → *"이런구조. 브래드와 폴더와 리스트."*). 그룹이 전부 펼쳐진 채 위아래로
40
+ * 쌓이던 것을, 그룹 하나를 **작은 칸 하나**로 줄였다.
41
+ *
42
+ * · 칸은 `Button`(bar · 48 · default · 왼쪽 맞춤)이고 폭은 200 으로 고정이다 — 긴 이름은 단추가 줄인다.
43
+ * · **놓을 자리이기도 하다** — 카드든 폴더든 끌고 그 위에 오면 단추가 기본 호버 꼴(`is-hover`)이 된다. 따로 테를 두르지 않는다.
44
+ * · 폴더가 없으면 아무것도 안 그린다(빈 격자가 자리를 먹지 않는다).
45
+ * @public
46
+ */
47
+ export default function FolderGrid({ folders, onOpen, dropProps, dropOver, menuItems, onMove }: FolderGridProps): import("react").JSX.Element | null;
@@ -0,0 +1,76 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useRef, useState } from 'react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import Button from './Button';
6
+ import Tooltip from './Tooltip/Tooltip';
7
+ import MenuTooltip from './Tooltip/MenuTooltip';
8
+ import './FolderGrid.css';
9
+ /**
10
+ * **폴더 칸의 격자** — 폴더 하나가 단추 하나(아이콘 · 이름 · 든 수)이고, 누르면 그 안으로 들어간다(말귀 청 (435)).
11
+ *
12
+ * 말귀의 나의 단어훈련에서 먼저 섰다(사장님 지시 2026-11-13 *"그룹과 훈련묶음의 화면이 구조가 이해도 안되고 어떤 그룹은 하단으로
13
+ * 내려가 있으니까 너무 불편해. 구글 드라이브 식으로"* → *"이런구조. 브래드와 폴더와 리스트."*). 그룹이 전부 펼쳐진 채 위아래로
14
+ * 쌓이던 것을, 그룹 하나를 **작은 칸 하나**로 줄였다.
15
+ *
16
+ * · 칸은 `Button`(bar · 48 · default · 왼쪽 맞춤)이고 폭은 200 으로 고정이다 — 긴 이름은 단추가 줄인다.
17
+ * · **놓을 자리이기도 하다** — 카드든 폴더든 끌고 그 위에 오면 단추가 기본 호버 꼴(`is-hover`)이 된다. 따로 테를 두르지 않는다.
18
+ * · 폴더가 없으면 아무것도 안 그린다(빈 격자가 자리를 먹지 않는다).
19
+ * @public
20
+ */
21
+ export default function FolderGrid({ folders, onOpen, dropProps, dropOver, menuItems, onMove }) {
22
+ const { t } = useTranslation();
23
+ /** 메뉴가 열린 폴더와 그 단추 */
24
+ const [menu, setMenu] = useState(null);
25
+ /** 지금 끌고 있는 폴더 칸 · 그것이 떠 있는 칸 — 카드 끌기(화면의 손)와 따로 쥔다 */
26
+ const [draggingFolder, setDraggingFolder] = useState(null);
27
+ const [folderOver, setFolderOver] = useState(null);
28
+ /** 그 칸의 끌기 손 — 폴더를 끄는 중이면 폴더가 놓일 자리, 아니면 카드가 놓일 자리(화면이 준 손) */
29
+ const cellDrag = (name) => {
30
+ const grab = onMove ? {
31
+ draggable: true,
32
+ onDragStart: (e) => { e.dataTransfer.effectAllowed = 'move'; e.dataTransfer.setData('text/plain', name); setDraggingFolder(name); },
33
+ onDragEnd: () => { setDraggingFolder(null); setFolderOver(null); },
34
+ } : {};
35
+ if (draggingFolder === null)
36
+ return { ...dropProps?.(name), ...grab };
37
+ if (!onMove || draggingFolder === name)
38
+ return grab;
39
+ return {
40
+ ...grab,
41
+ onDragOver: (e) => { e.preventDefault(); e.dataTransfer.dropEffect = 'move'; if (folderOver !== name)
42
+ setFolderOver(name); },
43
+ onDragLeave: (e) => { if (!e.currentTarget.contains(e.relatedTarget))
44
+ setFolderOver(now => (now === name ? null : now)); },
45
+ onDrop: (e) => { e.preventDefault(); const from = draggingFolder; setDraggingFolder(null); setFolderOver(null); onMove(from, name); },
46
+ };
47
+ };
48
+ /** 그 칸 위에 무엇이 떠 있나 — 카드든 폴더든 같은 꼴로 말한다 */
49
+ const isOver = (name) => (draggingFolder === null ? dropOver === name : folderOver === name);
50
+ /* 열린 채 ⋯ 를 다시 누르면 닫힌다 — 그 누름은 메뉴에게 '바깥 누름' 이라 메뉴가 먼저 닫히는데, 이어서 이 손이 도로 열면
51
+ 닫을 길이 없다. 방금 닫힌 그 폴더면 다시 열지 않는다. */
52
+ const justClosed = useRef(null);
53
+ const closeMenu = () => {
54
+ setMenu(now => { if (now)
55
+ justClosed.current = { name: now.name, at: Date.now() }; return null; });
56
+ };
57
+ if (folders.length === 0)
58
+ return null;
59
+ return (_jsxs("ul", { className: "folder-grid", "aria-label": t('folder.list', '폴더'), children: [folders.map(folder => {
60
+ const label = folder.label ?? folder.name;
61
+ return (
62
+ /* **끌어다 놓는 손은 칸(`li`)에 얹는다** — 단추는 끌기 손을 안 받는다 */
63
+ _jsxs("li", { className: ['folder-grid__cell', isOver(folder.name) && 'folder-grid__cell--over', draggingFolder === folder.name && 'folder-grid__cell--dragging'].filter(Boolean).join(' '), ...cellDrag(folder.name), children: [_jsx(Button, { htmlType: "button", type: "bar", size: 48, variant: "default", align: "left", width: "100%", ellipsis: true,
64
+ /* 무엇을 끌고 그 위에 오면 **기본 호버 꼴**로 말한다 — 끄는 동안에는 `:hover` 가 안 걸려 `is-hover` 를 붙인다 */
65
+ className: isOver(folder.name) ? 'is-hover' : undefined, icon: "folder", label: label, count: folder.count,
66
+ /* 이름만으로는 무엇을 누르는지 모른다 — 폴더라는 것과 든 수를 함께 읽는다 */
67
+ ariaLabel: t('folder.open', { name: label, count: folder.count, defaultValue: '{{name}} 폴더 열기, {{count}}개' }),
68
+ /* ⋯ 가 설 자리를 단추 안에 비워 둔다 — 안 비우면 긴 이름이 ⋯ 밑으로 들어간다 */
69
+ rightIcon: menuItems ? _jsx("span", { className: "folder-grid__more-room", "aria-hidden": "true" }) : undefined, onClick: () => onOpen(folder.name) }), menuItems && (_jsx("span", { className: "folder-grid__more", children: _jsx(Button, { htmlType: "button", size: 32, type: "dot", variant: "transparent-gray", useBorder: false, icon: "ellipsis", ariaLabel: t('folder.menu', { name: label, defaultValue: '{{name}} 폴더 메뉴' }), ariaExpanded: menu?.name === folder.name, onClick: (e) => {
70
+ if (justClosed.current?.name === folder.name && Date.now() - justClosed.current.at < 300)
71
+ return;
72
+ const anchor = e.currentTarget;
73
+ setMenu(now => (now?.name === folder.name ? null : { name: folder.name, label, anchor }));
74
+ } }) }))] }, folder.name));
75
+ }), 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 }) }))] }));
76
+ }
@@ -0,0 +1,8 @@
1
+ /* **폴더로 보는 화면의 머리**(`FolderHead`)의 길 줄 — 구조 단추와 길이 한 줄에 선다. 길은 왼쪽에서 시작한다
2
+ (말귀 청 (435)). 줄의 키는 길(`Breadcrumb` medium, 40)이 정한다. */
3
+ .folder-head {
4
+ display: flex;
5
+ align-items: center;
6
+ gap: var(--spacing-xs);
7
+ margin: 0 0 var(--spacing-m);
8
+ }
@@ -0,0 +1,42 @@
1
+ import { type TooltipMenuColumnItem } from './Tooltip/MenuTooltip';
2
+ import './FolderHead.css';
3
+ /** @public */
4
+ export interface FolderHeadProps {
5
+ /** 맨 위의 이름 — 길의 첫 칸 · 구조 나무의 첫 줄 */
6
+ rootLabel: string;
7
+ /** 지금 들어가 있는 폴더의 **온 길**(없으면 맨 위) */
8
+ opened: string | null;
9
+ onOpen: (path: string | null) => void;
10
+ /** 있는 폴더 전부의 길 — 중간 폴더가 빠져 있어도 된다(여기서 채운다). 차례는 받은 그대로 */
11
+ paths: readonly string[];
12
+ /** 그 폴더에 든 수(하위 폴더에 든 것까지) */
13
+ countOf: (path: string) => number;
14
+ /** 그 폴더의 메뉴 줄 — 길의 「이름 ▾」 와 폴더 칸의 ⋯ 가 함께 쓴다 */
15
+ folderMenu?: (path: string) => TooltipMenuColumnItem[];
16
+ /** 맨 위의 메뉴 줄 */
17
+ rootMenu?: TooltipMenuColumnItem[];
18
+ /** 그 폴더를 **든 것(카드)이 놓일 자리**로 만드는 손 — 폴더 칸과 구조 나무의 줄이 함께 쓴다 */
19
+ dropProps?: (path: string) => Record<string, unknown>;
20
+ /** 지금 카드가 그 위에 떠 있는 폴더 */
21
+ dropOver?: string | null;
22
+ /** 폴더를 끌어 다른 폴더에 넣거나 뺀다 — 폴더 칸끼리, 그리고 구조 나무에서(`into` 가 `null` 이면 맨 위로) */
23
+ onMoveFolder?: (path: string, into: string | null) => void;
24
+ /** 화면이 카드를 끄는 중인가 — 그때 구조 단추 위로 오면 나무가 펼쳐지고, 나무의 줄이 놓을 자리가 된다 */
25
+ itemDragging?: boolean;
26
+ /** 맨 위(폴더 밖)로 놓을 때의 열쇠 — `dropProps` · `dropOver` 가 맨 위를 가리키는 그 값. 안 주면 나무의 맨 위 줄에는 못 놓는다 */
27
+ rootDropKey?: string;
28
+ }
29
+ /**
30
+ * **폴더로 보는 화면의 머리** — 구조 단추 · 길(브레드크럼) · 지금 자리의 폴더 칸들. 도구줄 **위**에 선다(말귀 청 (435)).
31
+ *
32
+ * 말귀의 나의 단어표 · 나의 단어훈련 · 나의 문장훈련이 이 꼴로 선다(사장님 지시 2026-11-13 — 구글 드라이브 식 "브래드와 폴더와
33
+ * 리스트"). 차례는 길 · 폴더 · 도구줄 · 목록이고, 도구줄과 목록은 부르는 쪽이 그 아래에 세운다.
34
+ *
35
+ * · **길의 마지막 칸은 늘 메뉴 단추다**(「이름 ▾」) — 폴더 안이면 그 폴더의 메뉴(`folderMenu`), 맨 위면 맨 위의 메뉴(`rootMenu`).
36
+ * · **폴더 칸은 지금 자리의 바로 아래 폴더들이다** — 폴더 안에도 폴더가 선다(이름을 길로 적는다 — `utils` 의 `folder*`).
37
+ * 길은 층마다 한 칸씩 이어진다. 칸마다 ⋯ 가 서고, 그 줄은 「이름 ▾」 와 한 벌이다.
38
+ * · 메뉴는 **아래로** 펼친다 — 위로 뜨면 쪽 제목을 덮는다.
39
+ * · 길 줄의 키는 40 으로 고정이다(`Breadcrumb size="medium"`) — 폴더를 드나들 때 아래가 안 튄다.
40
+ * @public
41
+ */
42
+ export default function FolderHead({ rootLabel, opened, onOpen, paths, countOf, folderMenu, rootMenu, dropProps, dropOver, onMoveFolder, itemDragging, rootDropKey, }: FolderHeadProps): import("react").JSX.Element;
@@ -0,0 +1,62 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useRef, useState } from 'react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import Breadcrumb from './Breadcrumb';
6
+ import Tooltip from './Tooltip/Tooltip';
7
+ import MenuTooltip from './Tooltip/MenuTooltip';
8
+ import FolderGrid from './FolderGrid';
9
+ import FolderTreeButton from './FolderTreeButton';
10
+ import { folderChildren, folderLeaf, folderTrail, folderTree } from '../utils/folderPath';
11
+ import './FolderHead.css';
12
+ /**
13
+ * **폴더로 보는 화면의 머리** — 구조 단추 · 길(브레드크럼) · 지금 자리의 폴더 칸들. 도구줄 **위**에 선다(말귀 청 (435)).
14
+ *
15
+ * 말귀의 나의 단어표 · 나의 단어훈련 · 나의 문장훈련이 이 꼴로 선다(사장님 지시 2026-11-13 — 구글 드라이브 식 "브래드와 폴더와
16
+ * 리스트"). 차례는 길 · 폴더 · 도구줄 · 목록이고, 도구줄과 목록은 부르는 쪽이 그 아래에 세운다.
17
+ *
18
+ * · **길의 마지막 칸은 늘 메뉴 단추다**(「이름 ▾」) — 폴더 안이면 그 폴더의 메뉴(`folderMenu`), 맨 위면 맨 위의 메뉴(`rootMenu`).
19
+ * · **폴더 칸은 지금 자리의 바로 아래 폴더들이다** — 폴더 안에도 폴더가 선다(이름을 길로 적는다 — `utils` 의 `folder*`).
20
+ * 길은 층마다 한 칸씩 이어진다. 칸마다 ⋯ 가 서고, 그 줄은 「이름 ▾」 와 한 벌이다.
21
+ * · 메뉴는 **아래로** 펼친다 — 위로 뜨면 쪽 제목을 덮는다.
22
+ * · 길 줄의 키는 40 으로 고정이다(`Breadcrumb size="medium"`) — 폴더를 드나들 때 아래가 안 튄다.
23
+ * @public
24
+ */
25
+ export default function FolderHead({ rootLabel, opened, onOpen, paths, countOf, folderMenu, rootMenu, dropProps, dropOver, onMoveFolder, itemDragging, rootDropKey, }) {
26
+ const { t } = useTranslation();
27
+ /** 길의 메뉴가 붙을 단추 — 열려 있으면 그 단추 */
28
+ const [menuAnchor, setMenuAnchor] = useState(null);
29
+ /* 열린 채 다시 누르면 닫힌다 — 그 누름이 메뉴를 먼저 닫는데(바깥 누름), 이어서 도로 열면 닫을 길이 없다 */
30
+ const closedAt = useRef(0);
31
+ const closeMenu = () => { setMenuAnchor(now => { if (now)
32
+ closedAt.current = Date.now(); return null; }); };
33
+ const hereLabel = opened ? folderLeaf(opened) : rootLabel;
34
+ const menuLabel = opened
35
+ ? t('folder.menu', { name: hereLabel, defaultValue: '{{name}} 폴더 메뉴' })
36
+ : t('folder.placeMenu', { name: hereLabel, defaultValue: '{{name}} 메뉴' });
37
+ /* **메뉴를 안 주면 길은 읽기만 한다**(말귀 청 (436)) — 고르는 창처럼 폴더를 드나들기만 하고
38
+ 더하거나 고치지 않는 자리다. 그때 마지막 칸은 맨 이름이고 폴더 칸에도 ⋯ 가 안 선다. */
39
+ const hasMenu = !!folderMenu || !!rootMenu;
40
+ const last = !hasMenu ? { label: hereLabel } : {
41
+ label: hereLabel,
42
+ menu: {
43
+ onOpen: (anchor) => {
44
+ if (Date.now() - closedAt.current < 300)
45
+ return;
46
+ setMenuAnchor(now => (now ? null : anchor));
47
+ },
48
+ expanded: !!menuAnchor,
49
+ ariaLabel: menuLabel,
50
+ },
51
+ };
52
+ /* 길 — 맨 위 · 위 폴더들(누르면 그리로) · 지금 자리(메뉴 단추) */
53
+ const crumbs = opened
54
+ ? [
55
+ { label: rootLabel, onClick: () => onOpen(null) },
56
+ ...folderTrail(opened).slice(0, -1).map(step => ({ label: step.label, onClick: () => onOpen(step.path) })),
57
+ last,
58
+ ]
59
+ : [last];
60
+ const children = folderChildren(paths, opened).map(path => ({ name: path, label: folderLeaf(path), count: countOf(path) }));
61
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "folder-head", children: [_jsx(FolderTreeButton, { rootLabel: rootLabel, opened: opened, onOpen: onOpen, onMove: onMoveFolder, itemDragging: itemDragging, itemDropProps: dropProps ? path => (path !== null ? dropProps(path) : rootDropKey ? dropProps(rootDropKey) : {}) : undefined, itemDropOver: path => dropOver != null && dropOver === (path ?? rootDropKey), tree: folderTree(paths).map(node => ({ ...node, count: countOf(node.path) })) }), _jsx(Breadcrumb, { size: "medium", items: crumbs })] }), _jsx(FolderGrid, { folders: children, onOpen: onOpen, dropProps: dropProps, dropOver: dropOver, menuItems: folderMenu, onMove: onMoveFolder }), 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 }) }))] }));
62
+ }
@@ -0,0 +1,2 @@
1
+ /* 구조 단추의 감싸개(`FolderTreeButton`) — 든 것을 끌고 그 위로 오면 나무를 펼치려고 끌기 손을 받는다. 꼴은 없다(단추는 `Button`) */
2
+ .folder-tree-button { display: inline-flex; }
@@ -0,0 +1,34 @@
1
+ import { type FolderTreeNode } from './Tooltip/FolderTreeTooltip';
2
+ import './FolderTreeButton.css';
3
+ /** @public */
4
+ export interface FolderTreeButtonProps {
5
+ /** 맨 위의 이름 — 나무의 첫 줄 */
6
+ rootLabel: string;
7
+ /** 지금 들어가 있는 폴더(없으면 맨 위) */
8
+ opened: string | null;
9
+ onOpen: (path: string | null) => void;
10
+ /** 폴더 나무를 **펼친 차례**로(`folderTree`) — 층(`depth`)만큼 들여 세운다. `count` 는 그 폴더에 든 수 */
11
+ tree: readonly FolderTreeNode[];
12
+ /** 폴더를 끌어 다른 폴더에 넣거나 뺀다 — 나무(`FolderTreeTooltip`)로 그대로 간다 */
13
+ onMove?: (path: string, into: string | null) => void;
14
+ /**
15
+ * 화면이 **든 것(카드)을 끄는 중**인가 — 그때 이 단추 위로 끌고 오면 나무가 절로 펼쳐지고(누를 손이 없다), 끌기가 끝나면
16
+ * 닫힌다.
17
+ */
18
+ itemDragging?: boolean;
19
+ /** 카드가 놓일 자리로 만드는 손 · 떠 있는 줄 — 나무(`FolderTreeTooltip`)로 그대로 간다 */
20
+ itemDropProps?: (path: string | null) => Record<string, unknown>;
21
+ itemDropOver?: (path: string | null) => boolean;
22
+ }
23
+ /**
24
+ * **폴더 구조를 펼쳐 보는 단추** — 길(`Breadcrumb`) 앞에 선다(말귀 청 (435)).
25
+ *
26
+ * 드라이브의 왼쪽 폴더 나무를 보여 주되 자리를 늘 차지하지 않게 하려는 것이다(사장님 지시 2026-11-13 *"sidebar도 이미 있고
27
+ * 영역을 잡고 있기가 싫은데"* → *"앞에 구조 보려줄 수 있는 버튼 넣고 누르면 tooltip 형태로 나오도록 해봐"*). **누를 때만** 뜬다:
28
+ * 맨 위와 폴더 전부가 한 줄씩 서고, 지금 있는 자리에 표시가 붙으며, 줄을 누르면 그리로 간다. 폴더가 하나도 없어도 단추는 선다
29
+ * (맨 위 한 줄).
30
+ *
31
+ * 뜨는 나무는 제 조각이다(`FolderTreeTooltip`) — 여기는 **띄우는 단추**(dot · 40 · default)와 여닫음만 쥔다.
32
+ * @public
33
+ */
34
+ export default function FolderTreeButton({ rootLabel, opened, onOpen, tree, onMove, itemDragging, itemDropProps, itemDropOver, }: FolderTreeButtonProps): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from 'react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import Button from './Button';
6
+ import FolderTreeTooltip from './Tooltip/FolderTreeTooltip';
7
+ import './FolderTreeButton.css';
8
+ /**
9
+ * **폴더 구조를 펼쳐 보는 단추** — 길(`Breadcrumb`) 앞에 선다(말귀 청 (435)).
10
+ *
11
+ * 드라이브의 왼쪽 폴더 나무를 보여 주되 자리를 늘 차지하지 않게 하려는 것이다(사장님 지시 2026-11-13 *"sidebar도 이미 있고
12
+ * 영역을 잡고 있기가 싫은데"* → *"앞에 구조 보려줄 수 있는 버튼 넣고 누르면 tooltip 형태로 나오도록 해봐"*). **누를 때만** 뜬다:
13
+ * 맨 위와 폴더 전부가 한 줄씩 서고, 지금 있는 자리에 표시가 붙으며, 줄을 누르면 그리로 간다. 폴더가 하나도 없어도 단추는 선다
14
+ * (맨 위 한 줄).
15
+ *
16
+ * 뜨는 나무는 제 조각이다(`FolderTreeTooltip`) — 여기는 **띄우는 단추**(dot · 40 · default)와 여닫음만 쥔다.
17
+ * @public
18
+ */
19
+ export default function FolderTreeButton({ rootLabel, opened, onOpen, tree, onMove, itemDragging = false, itemDropProps, itemDropOver, }) {
20
+ const { t } = useTranslation();
21
+ const [anchor, setAnchor] = useState(null);
22
+ /* 열린 채 단추를 다시 누르면 닫힌다 — 그 누름이 통을 먼저 닫는데(바깥 누름), 이어서 도로 열면 닫을 길이 없다 */
23
+ const closedAt = useRef(0);
24
+ const close = () => { setAnchor(now => { if (now)
25
+ closedAt.current = Date.now(); return null; }); };
26
+ const label = t('folder.tree', '폴더 구조 보기');
27
+ /* 끌고 와서 펼친 나무는 **끌기가 끝나면 닫는다** — 누른 것이 아니라 손이 지나가다 연 것이다. 눌러 연 것은 그대로 둔다 */
28
+ const openedByDrag = useRef(false);
29
+ useEffect(() => {
30
+ if (!itemDragging && openedByDrag.current) {
31
+ openedByDrag.current = false;
32
+ setAnchor(null);
33
+ }
34
+ }, [itemDragging]);
35
+ return (_jsxs(_Fragment, { children: [_jsx("span", { className: "folder-tree-button", onDragEnter: itemDragging ? e => { if (!anchor) {
36
+ openedByDrag.current = true;
37
+ setAnchor(e.currentTarget);
38
+ } } : undefined, children: _jsx(Button, { htmlType: "button", size: 40, type: "dot", variant: "default", icon: "folder-tree", ariaLabel: label, showTooltipInfo: label, ariaExpanded: !!anchor, onClick: (e) => {
39
+ if (Date.now() - closedAt.current < 300)
40
+ return;
41
+ const el = e.currentTarget;
42
+ setAnchor(now => (now ? null : el));
43
+ } }) }), anchor && (_jsx(FolderTreeTooltip, { anchorEl: anchor, onClose: close, ariaLabel: label, rootLabel: rootLabel, opened: opened, onPick: onOpen, tree: tree, onMove: onMove, itemDropProps: itemDropProps, itemDropOver: itemDropOver }))] }));
44
+ }
@@ -4,8 +4,14 @@ import { type ButtonVariant } from '../Button';
4
4
  export interface ConfirmPopupProps {
5
5
  /** 팝업 제목 */
6
6
  title: ReactNode;
7
- /** 본문 메시지 */
8
- message: ReactNode;
7
+ /**
8
+ * 제목 아래 한 줄(창 머리의 부제) — 안내 글을 본문이 아니라 **머리**에 둘 때 쓴다(코어 `Popup.subtitle` 로 간다).
9
+ * 입력칸 하나를 띄우는 창처럼 본문 글이 따로 필요 없으면 이것만 주고 `message` 는 비운다
10
+ * (말귀 청 (431), 사장님 지시 2026-11-13 — 폴더 추가 창의 안내 글을 고르시며 "sub로").
11
+ */
12
+ subtitle?: string;
13
+ /** 본문 메시지. `subtitle` 로 말을 다 했으면 안 줘도 된다 — 그때는 문단이 자리를 안 차지한다 */
14
+ message?: ReactNode;
9
15
  /**
10
16
  * details·message 위(본문 최상단)에 놓을 것 — 미리보기 카드·표 등.
11
17
  *
@@ -12,7 +12,7 @@ import Panel, { PanelRow } from '../Panel';
12
12
  * @public
13
13
  */
14
14
  export default function ConfirmPopup(props) {
15
- const { title, message, topContent, details, children, confirmLabel, cancelLabel, hideCancel = false, extraAction, confirmVariant = 'main', confirmDisabled = false, onConfirm, closeOnConfirm = true, onClose, inline, size = 'small', className, initialFocus = 'close', } = props;
15
+ const { title, subtitle, message, topContent, details, children, confirmLabel, cancelLabel, hideCancel = false, extraAction, confirmVariant = 'main', confirmDisabled = false, onConfirm, closeOnConfirm = true, onClose, inline, size = 'small', className, initialFocus = 'close', } = props;
16
16
  const { t } = useTranslation();
17
17
  /* 열릴 때 포커스 자리 — Popup 이 먼저 첫 포커스 자리(X)로 옮긴 뒤(자식 효과가 먼저 돈다) 여기서 고른 단추로 옮긴다.
18
18
  단추 차례는 [곁 단추?, 취소?, 확인] 이다. */
@@ -70,7 +70,7 @@ export default function ConfirmPopup(props) {
70
70
  }
71
71
  }
72
72
  };
73
- return (_jsxs(Popup, { title: title, onClose: onClose,
73
+ return (_jsxs(Popup, { title: title, subtitle: subtitle, onClose: onClose,
74
74
  // onConfirm(서버 요청 등)이 진행 중일 때 X/ESC로 닫으면, 팝업은 즉시 사라지는데
75
75
  // 이미 시작된 요청은 계속 진행돼 완료 후 부모 state/토스트가 뒤늦게 갱신된다 —
76
76
  // 사용자는 "취소했다"고 믿었는데 실제로는 실행된 것처럼 보이는 문제를 막는다.
@@ -115,5 +115,5 @@ export default function ConfirmPopup(props) {
115
115
  });
116
116
  },
117
117
  },
118
- ], children: [topContent != null && _jsx("div", { className: "confirm-popup__top", children: topContent }), details && details.length > 0 && (_jsx(Panel, { children: details.map((d, i) => (_jsx(PanelRow, { label: d.label, children: _jsx("span", { className: "panel-row__text body-2", children: d.value }) }, i))) })), _jsx("p", { ref: bodyRef, className: "body-2 confirm-popup__message", children: message }), children] }));
118
+ ], children: [topContent != null && _jsx("div", { className: "confirm-popup__top", children: topContent }), details && details.length > 0 && (_jsx(Panel, { children: details.map((d, i) => (_jsx(PanelRow, { label: d.label, children: _jsx("span", { className: "panel-row__text body-2", children: d.value }) }, i))) })), _jsx("p", { ref: bodyRef, className: "body-2 confirm-popup__message", hidden: message == null, children: message }), children] }));
119
119
  }
@@ -22,6 +22,8 @@
22
22
  position: relative;
23
23
  background: var(--color-white);
24
24
  border-radius: 28px;
25
+ /* **외곽선**(사장님 지시 2026-11-12: *"popup, tooltip dp 외곽선이 없으니까 가끔 이상하게 보일때가 있네 각각 보더 넣어주되 컬러를 --color-darkWhite로"*) — 바탕과 판이 비슷한 밝기일 때 판의 끝이 흐려 보였다 */
26
+ border: 1px solid var(--color-darkWhite);
25
27
  box-shadow: var(--shadow-popup);
26
28
  max-width: 820px;
27
29
  width: calc(100% - 40px);
@@ -133,6 +133,14 @@
133
133
  .side-nav__scroll-thumb:active {
134
134
  background: var(--color-lightGray);
135
135
  }
136
+ /* **얹었을 때만 보인다**(사장님 지시 2026-11-12: *"sidebar에 스크롤 바가 상시 보이는데 호버 되어잇을때만 보이도록"*).
137
+ 목록에 얹거나, 키보드로 목록 안에 들어왔거나, 막대를 잡고 끄는 동안만 선다(`:active` — 끌다 목록 밖으로
138
+ 손이 나가도 잡은 동안은 남는다). 나갈 때는 `opacity` 전환으로 천천히 사라진다. 손짓이 없는 화면(폰)은
139
+ 손가락으로 굴리므로 막대가 없어도 된다. */
140
+ .side-nav__scroll-thumb { opacity: 0; }
141
+ .side-nav__menu-list:hover .side-nav__scroll-thumb,
142
+ .side-nav__menu-list:focus-within .side-nav__scroll-thumb,
143
+ .side-nav__scroll-thumb:active { opacity: 1; }
136
144
 
137
145
  /* ── list: **구르는 통**(2026-11-03) — 발치는 밖에 남아 늘 보인다 ─────────────── */
138
146
  .side-nav__menu-list {
@@ -26,7 +26,10 @@ function SideNavFooter(props) {
26
26
  // 하나도 없으면 바닥 자체를 비운다 — 빈 채로 두면 여백(margin-top + padding)만 남는다.
27
27
  if (!hasAny)
28
28
  return null;
29
- return (_jsxs("div", { className: "side-nav__footer", children: [onDebug && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "terminal", ariaLabel: t('nav.debug', '디버그'), onClick: onDebug, selected: activeKey === 'debug' })), onHelp && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "message-circle-question-mark", ariaLabel: t('nav.help', '도움말'), onClick: onHelp, selected: activeKey === 'help' })), onNotification && (_jsxs("span", { className: "side-nav__notification-wrap", children: [_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "bell", ariaLabel: nameWithCount(t, t('nav.notifications', '알림'), unreadCount), onClick: onNotification, selected: activeKey === 'notifications' }), !!unreadCount && unreadCount > 0 && (_jsx(CircleBadge, { number: Math.min(unreadCount, 99), size: 24, "aria-hidden": true }))] })), onSetting && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "settings", ariaLabel: t('nav.settings', '설정'), onClick: onSetting, selected: activeKey === 'settings' })), onFeedback && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "bug", ariaLabel: t('nav.feedback', '버그신고'), onClick: onFeedback, selected: activeKey === 'feedback' })), onAccount && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "user-round", ariaLabel: t('nav.account', '계정'), onClick: onAccount, selected: activeKey === 'account' }))] }));
29
+ return (_jsxs("div", { className: "side-nav__footer", children: [onDebug && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "terminal", ariaLabel: t('nav.debug', '디버그'), onClick: onDebug, selected: activeKey === 'debug' })), onHelp && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "message-circle-question-mark", ariaLabel: t('nav.help', '도움말'), onClick: onHelp, selected: activeKey === 'help' })), onNotification && (_jsxs("span", { className: "side-nav__notification-wrap", children: [_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "bell", ariaLabel: nameWithCount(t, t('nav.notifications', '알림'), unreadCount), onClick: onNotification, selected: activeKey === 'notifications' }), !!unreadCount && unreadCount > 0 && (
30
+ /* **오른쪽 위**(말귀 청 (429), 사장님 2026-11-12: *"이거 circle badge 왜 왼쪽에 와있지? 우측 상단으로"*).
31
+ 위치를 안 줘 기본값(왼쪽 위)으로 서 있었다. 아래 띠(BottomNav)의 같은 배지와 같은 자리다. */
32
+ _jsx(CircleBadge, { position: "top-right", number: Math.min(unreadCount, 99), size: 24, "aria-hidden": true }))] })), onSetting && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "settings", ariaLabel: t('nav.settings', '설정'), onClick: onSetting, selected: activeKey === 'settings' })), onFeedback && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "bug", ariaLabel: t('nav.feedback', '버그신고'), onClick: onFeedback, selected: activeKey === 'feedback' })), onAccount && (_jsx(Button, { htmlType: "button", size: 48, showTooltipInfo: true, type: "dot", shape: "pill", variant: variant, icon: "user-round", ariaLabel: t('nav.account', '계정'), onClick: onAccount, selected: activeKey === 'account' }))] }));
30
33
  }
31
34
  function SideNavButton(props) {
32
35
  const { t } = useTranslation();
@@ -9,7 +9,7 @@
9
9
  background: var(--color-white);
10
10
  border-radius: var(--radius-m);
11
11
  box-shadow: var(--shadow-tooltip);
12
- border: 1px solid var(--color-whiteLine);
12
+ border: 1px solid var(--color-darkWhite); /* 2026-11-12 사장님 지시 — 툴팁 외곽선은 darkWhite */
13
13
  max-width: 640px;
14
14
  }
15
15
 
@@ -0,0 +1,99 @@
1
+ /* **폴더 구조 나무**(`FolderTreeTooltip`) — 구조 단추(`FolderTreeButton`)가 띄우는 통의 속(말귀 청 (435), 사장님 지시 2026-11-13
2
+ "폴더 구조를 보여줄 수 있는 ui로 … 새로운 tooltip"). 뜨는 통(그림자 · 모서리 · 자리)은 `Tooltip` 이 쥐고, 여기는 **줄**만 그린다.
3
+ 줄 = (폴더 아이콘 · 이름 · 든 수) · 접는 화살표. 층은 줄의 왼쪽 여백이다(`--folder-depth`). */
4
+ .folder-tree-tooltip {
5
+ display: flex;
6
+ flex-direction: column;
7
+ min-width: 220px;
8
+ max-width: 320px;
9
+ /* 폴더가 많으면 통 안에서 구른다 — 화면 밖으로 넘치지 않게 */
10
+ max-height: min(60vh, 420px);
11
+ overflow-y: auto;
12
+ padding: var(--spacing-xs);
13
+ }
14
+
15
+ .folder-tree-tooltip__row {
16
+ display: flex;
17
+ align-items: center;
18
+ min-height: 36px;
19
+ /* 한 층에 24px — 위 폴더 아이콘의 가운데에서 내려온 선이 제 아이콘까지 꺾여 닿을 만큼(16 이면 꺾일 자리가 없다) */
20
+ padding-left: calc(var(--folder-depth, 0) * 24px);
21
+ border-radius: var(--radius-s);
22
+ }
23
+ .folder-tree-tooltip__row:hover { background: var(--color-darkWhite); }
24
+ /* **폴더 안의 폴더 앞에 꺾인 선**(└)을 긋는다(사장님 지시 2026-11-13 — 「앙」 아래 「ㅁㅁ」 앞에 L 을 그려 보이시며
25
+ "이 표현 가능해?") — 어느 폴더에 딸렸는지가 들여쓰기만으로는 약했다. 줄의 왼쪽 여백 끝(위 폴더의 아이콘 아래쯤)에서
26
+ 내려와 제 아이콘 쪽으로 꺾인다. 꾸밈이라 낭독기에는 없다(층은 `aria-level` 이 말한다). */
27
+ .folder-tree-tooltip__row { position: relative; }
28
+ .folder-tree-tooltip__row--nested::before {
29
+ content: '';
30
+ position: absolute;
31
+ /* **위 폴더의 아이콘 가운데 아래**에서 내려와 **제 아이콘 앞**까지 꺾인다(사장님 지시 2026-11-13 "맞았으면 좋겠는데") —
32
+ 위 폴더의 아이콘 가운데 = (층-1)×24 + 이름 여백 8 + 아이콘 반 9 = (층-1)×24 + 17.
33
+ 제 아이콘의 왼끝은 거기서 15px 오른쪽이라, 2px 를 띄우고 13px 를 간다. */
34
+ left: calc((var(--folder-depth, 1) - 1) * 24px + 16px);
35
+ /* 작은 꺾쇠다(사장님 지시 2026-11-13 "ㄴ 이 좀 너무 큰거 같기도 한데") — 처음엔 위 폴더의 아이콘 밑에서부터 길게 내려
36
+ 그었다. 이제 제 줄 안에서만 짧게 꺾인다(세로 10 · 가로 10). 왼끝은 그대로 위 폴더 아이콘의 가운데다. */
37
+ top: 8px;
38
+ width: 10px;
39
+ height: 10px;
40
+ /* 선의 색은 `--color-lightGray` 다(사장님 지시 2026-11-13 — darkWhite · whiteLine 을 거쳐 작은 꺾쇠가 되고서 다시 "lightGray") */
41
+ border-left: 1.5px solid var(--color-lightGray);
42
+ border-bottom: 1.5px solid var(--color-lightGray);
43
+ border-bottom-left-radius: 4px;
44
+ pointer-events: none;
45
+ }
46
+ /* 지금 있는 자리 — 옅은 바탕과 굵은 글자로 말한다 */
47
+ .folder-tree-tooltip__row--here { background: var(--color-main-a10); }
48
+ .folder-tree-tooltip__row--here:hover { background: var(--color-main-a10); }
49
+ .folder-tree-tooltip__row--here .folder-tree-tooltip__label { font-weight: var(--text-body-2-weight-bold); }
50
+ /* 끌어 옮기기 — 쥔 줄은 흐려지고, 놓을 수 있는 줄 위에 뜨면 테를 두른다(폴더 칸의 '놓을 자리' 와 같은 말) */
51
+ .folder-tree-tooltip__row--dragging { opacity: 0.4; }
52
+ .folder-tree-tooltip__row--over { box-shadow: inset 0 0 0 2px var(--color-main); }
53
+ .folder-tree-tooltip__row[draggable="true"] { cursor: grab; }
54
+
55
+ /* 접는 화살표 — 줄의 **오른쪽 끝**에 선다(왼쪽은 꺾인 선의 자리다). 접혀 있으면 ›, 펴져 있으면 ⌄ */
56
+ .folder-tree-tooltip__twist {
57
+ flex: none;
58
+ display: inline-flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ width: 28px;
62
+ height: 28px;
63
+ margin-right: var(--spacing-xs);
64
+ padding: 0;
65
+ border: none;
66
+ border-radius: var(--radius-xs);
67
+ background: none;
68
+ color: var(--color-gray);
69
+ cursor: pointer;
70
+ transition: transform 0.12s;
71
+ }
72
+ .folder-tree-tooltip__twist--open { transform: rotate(90deg); }
73
+ .folder-tree-tooltip__twist:focus-visible { outline: 2px solid var(--color-main); outline-offset: 1px; }
74
+
75
+ .folder-tree-tooltip__name {
76
+ flex: 1;
77
+ min-width: 0;
78
+ display: flex;
79
+ align-items: center;
80
+ gap: var(--spacing-xs);
81
+ min-height: 36px;
82
+ padding: 0 var(--spacing-xs);
83
+ border: none;
84
+ border-radius: var(--radius-s);
85
+ background: none;
86
+ color: var(--color-text-primary);
87
+ font-family: inherit;
88
+ text-align: left;
89
+ cursor: pointer;
90
+ }
91
+ .folder-tree-tooltip__name:focus-visible { outline: 2px solid var(--color-main); outline-offset: -2px; }
92
+ /* 폴더 아이콘은 `--color-lightGray` 다(사장님 지시 2026-11-13 "폴더 아이콘 색상도 lightGray") — 처음엔 `--color-gray` 였다 */
93
+ .folder-tree-tooltip__icon { flex: none; display: inline-flex; align-items: center; color: var(--color-lightGray); }
94
+ /* 이름은 남는 만큼 — 길면 한 줄에서 줄인다 */
95
+ .folder-tree-tooltip__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
96
+ .folder-tree-tooltip__count { flex: none; color: var(--color-gray); }
97
+
98
+ /* 접는 화살표의 그림 — 감싸개가 줄 높이만큼 커지지 않게 */
99
+ .folder-tree-tooltip__twist-mark { display: inline-flex; align-items: center; }
@@ -0,0 +1,60 @@
1
+ import './FolderTreeTooltip.css';
2
+ /**
3
+ * 나무의 한 줄 — `folderTree`(`utils`)가 내주는 꼴에 든 수를 얹은 것.
4
+ * @public
5
+ */
6
+ export interface FolderTreeNode {
7
+ /** 폴더의 온 길(`앙/하위`) — 고르면 이것을 돌려준다 */
8
+ path: string;
9
+ /** 보일 이름 — 길의 마지막 마디 */
10
+ label: string;
11
+ /** 층 — 맨 위 폴더가 0 */
12
+ depth: number;
13
+ /** 그 폴더에 든 수 — 0 이면 안 적는다 */
14
+ count: number;
15
+ }
16
+ /** @public */
17
+ export interface FolderTreeTooltipProps {
18
+ /** 통이 붙을 마디 — 띄운 단추 */
19
+ anchorEl: Element | null;
20
+ onClose: () => void;
21
+ /** 맨 위의 이름 — 나무의 첫 줄 */
22
+ rootLabel: string;
23
+ /** 지금 있는 폴더의 온 길(맨 위면 `null`) — 그 줄에 표시가 붙는다 */
24
+ opened: string | null;
25
+ /** 줄을 골랐다 — 폴더의 온 길, 맨 위면 `null` */
26
+ onPick: (path: string | null) => void;
27
+ /** 나무를 **펼친 차례**로 — 부모 바로 뒤에 자식이 선다(`folderTree`) */
28
+ tree: readonly FolderTreeNode[];
29
+ /** 낭독기가 읽을 통의 이름 */
30
+ ariaLabel: string;
31
+ /**
32
+ * 폴더를 끌어 **다른 폴더에 넣거나 뺀다** — 주면 폴더 줄을 쥐고 끌 수 있고, 다른 폴더 줄에 놓으면 그 안으로, 맨 위 줄에
33
+ * 놓으면 맨 위로 뺀다. `into` 는 놓은 폴더의 온 길(맨 위면 `null`). 제 자신 · 제 아래 · 이미 있는 자리에는 안 놓인다
34
+ * (`canMoveFolder`). 통은 옮긴 뒤에도 떠 있다 — 이어서 더 옮길 수 있게.
35
+ */
36
+ onMove?: (path: string, into: string | null) => void;
37
+ /**
38
+ * **든 것(카드)을 나무의 줄에 끌어다 놓는다** — 화면이 카드를 끄는 중일 때 그 줄을 놓을 자리로 만드는 손이다(폴더 칸
39
+ * `FolderGrid` 가 쓰는 것과 같은 손). `path` 가 `null` 이면 맨 위 줄이다. 폴더 줄을 끄는 중(폴더 옮기기)에는 안 쓴다 —
40
+ * 두 가지 끌기가 한 줄에서 겹치지 않게.
41
+ */
42
+ itemDropProps?: (path: string | null) => Record<string, unknown>;
43
+ /** 끌고 있는 카드가 지금 그 줄 위에 떠 있나 */
44
+ itemDropOver?: (path: string | null) => boolean;
45
+ }
46
+ /**
47
+ * **폴더 구조를 나무로 띄우는 툴팁** — `MenuTooltip` 의 짝이다. 그쪽이 '할 일의 줄' 이라면 이쪽은 **'어디에 있나' 의 나무**다
48
+ * (말귀 청 (435), 사장님 지시 2026-11-13 *"menu 툴팁 사용하지말고 폴더 구조를 보여줄 수 있는 ui로 구성되도록 새로운 tooltip
49
+ * 만들어줘"*). 뜨는 통(그림자 · 모서리 · 자리 · 바깥 누름)은 `Tooltip` 그대로이고 속만 여기서 그린다: 줄마다 폴더 아이콘 ·
50
+ * 이름 · 든 수 · 접는 화살표가 서고, 층은 들여쓰기와 꺾쇠(└)다. 지금 자리는 옅은 바탕 · 굵은 글자 · 열린 폴더 아이콘으로 말한다.
51
+ *
52
+ * · **맨 위(뿌리)가 첫 줄**이다 — `rootLabel`. 고르면 `null` 을 돌려준다.
53
+ * · 하위 폴더가 있는 줄은 오른쪽 끝의 화살표로 **접고 편다**(처음엔 다 펴져 있다). 접힘은 이 통이 떠 있는 동안만 기억한다.
54
+ * · 줄을 고르면 `onPick` 을 부르고 **닫는다**(`onClose`). 닫을지는 부르는 쪽이 쥔다 — 통을 띄운 단추가 제 상태를 안다.
55
+ * · 아래로 펼친다(`prefer="bottom"`) — 위로 뜨면 쪽 제목을 덮는다.
56
+ *
57
+ * 띄우는 단추는 따로 있다(`FolderTreeButton`).
58
+ * @public
59
+ */
60
+ export default function FolderTreeTooltip({ anchorEl, onClose, rootLabel, opened, onPick, tree, ariaLabel, onMove, itemDropProps, itemDropOver, }: FolderTreeTooltipProps): import("react").JSX.Element;