@ihabdevteam/core 0.436.0 → 0.438.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 +55 -0
- package/dist/components.cjs.js +179 -179
- package/dist/components.esm.css +3 -3
- package/dist/hooks.cjs.js +1 -1
- package/dist/i18n.cjs.js +1 -1
- package/dist/ihabdevteam-core.cjs.js +186 -186
- package/dist/ihabdevteam-core.d.ts +73 -5
- package/dist/packages/core/src/components/Dropdown.css +2 -1
- package/dist/packages/core/src/components/Landing/Landing.css +17 -0
- package/dist/packages/core/src/components/Landing/LandingCard.d.ts +9 -1
- package/dist/packages/core/src/components/Landing/LandingCard.js +3 -3
- package/dist/packages/core/src/components/Popup/Popup.css +21 -0
- package/dist/packages/core/src/components/SideNav.css +8 -0
- package/dist/packages/core/src/components/SideNav.js +4 -1
- package/dist/packages/core/src/components/Table.css +20 -0
- package/dist/packages/core/src/components/Table.js +8 -0
- package/dist/packages/core/src/components/Toolbar.css +4 -1
- package/dist/packages/core/src/components/Tooltip/DescriptionTooltip.css +1 -1
- package/dist/packages/core/src/components/Tooltip/TextBoxTooltip.css +1 -1
- package/dist/packages/core/src/components/Tooltip/Tooltip.css +5 -1
- package/dist/packages/core/src/components/Tooltip/TrainingTooltip.css +1 -0
- package/dist/packages/core/src/components/Tooltip/WordImageTooltip.css +1 -0
- package/dist/packages/core/src/components/Training/TrainingCard.css +45 -8
- package/dist/packages/core/src/components/Training/TrainingCard.d.ts +35 -2
- package/dist/packages/core/src/components/Training/TrainingCard.js +26 -5
- package/dist/packages/core/src/components/Training/TrainingPagePopup.css +28 -0
- package/dist/packages/core/src/components/Training/TrainingPagePopup.d.ts +15 -0
- package/dist/packages/core/src/components/Training/TrainingPagePopup.js +23 -5
- package/dist/packages/core/src/components/Word/WordTableBlock.d.ts +1 -1
- package/dist/packages/core/src/components/Word/WordTableBlock.js +36 -6
- package/dist/packages/core/src/components/Word/wordTableBlockTypes.d.ts +12 -0
- package/dist/packages/core/src/components/WordTable.js +9 -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
|
@@ -2131,7 +2131,7 @@ export declare function copyText(text: string): Promise<boolean>;
|
|
|
2131
2131
|
*
|
|
2132
2132
|
* 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
|
|
2133
2133
|
*/
|
|
2134
|
-
export declare const CORE_VERSION = "0.
|
|
2134
|
+
export declare const CORE_VERSION = "0.438.0";
|
|
2135
2135
|
|
|
2136
2136
|
/** @public */
|
|
2137
2137
|
declare const coreDefault: Record<string, unknown>;
|
|
@@ -4215,7 +4215,7 @@ export declare interface LandingButtonProps {
|
|
|
4215
4215
|
*
|
|
4216
4216
|
* @public
|
|
4217
4217
|
*/
|
|
4218
|
-
export declare function LandingCard({ icon, title, desc, children, layout, leadWidth, titleStyle, tight, align, className, style, }: LandingCardProps): JSX.Element;
|
|
4218
|
+
export declare function LandingCard({ icon, title, desc, children, layout, leadWidth, titleStyle, tight, align, hover, className, style, }: LandingCardProps): JSX.Element;
|
|
4219
4219
|
|
|
4220
4220
|
/** @public */
|
|
4221
4221
|
export declare interface LandingCardProps {
|
|
@@ -4235,6 +4235,14 @@ export declare interface LandingCardProps {
|
|
|
4235
4235
|
tight?: boolean;
|
|
4236
4236
|
/** 아이콘·글을 칸 가운데로 (`stack` 일 때만) */
|
|
4237
4237
|
align?: 'left' | 'center';
|
|
4238
|
+
/**
|
|
4239
|
+
* 마우스를 얹으면 살짝 떠오른다 — 기본 `true`(말귀 청 (420), 사장님 지시 2026-11-12: *"렌딩 카드들
|
|
4240
|
+
* 호버 넣고싶어. 살짝 뜨는 느낌으로 그림자가 생기고 살짝 움직이고 마우스 나가면 다시 제자리로"*).
|
|
4241
|
+
* 위로 4px · 그림자 `--shadow-dropdown` · 0.2초. 마우스가 있는 기기에서만 켜지고, 움직임 줄이기
|
|
4242
|
+
* 설정에서는 오르지 않고 그림자만 진다. 큰 판이 든 `layout="row"` 카드처럼 뜨면 어색한 자리는 `false`.
|
|
4243
|
+
* 누르는 칸이 아니라 손가락 모양(`cursor: pointer`)은 안 붙인다.
|
|
4244
|
+
*/
|
|
4245
|
+
hover?: boolean;
|
|
4238
4246
|
className?: string;
|
|
4239
4247
|
style?: CSSProperties;
|
|
4240
4248
|
}
|
|
@@ -9904,7 +9912,21 @@ export declare interface TrainingBlockProps {
|
|
|
9904
9912
|
}
|
|
9905
9913
|
|
|
9906
9914
|
/** @public */
|
|
9907
|
-
export declare function TrainingCard({ title, titleLevel, description, topActions, children, footerLeft, footerRight, ariaLabel, onClick, draggable, onDragStart, onDragEnd, className, }: TrainingCardProps): JSX.Element;
|
|
9915
|
+
export declare function TrainingCard({ title, titleLevel, category, categoryVariant, description, topActions, actions, children, footerLeft, footerRight, ariaLabel, onClick, draggable, onDragStart, onDragEnd, className, }: TrainingCardProps): JSX.Element;
|
|
9916
|
+
|
|
9917
|
+
/**
|
|
9918
|
+
* @public 카드 오른쪽 위의 할 일 하나 — `actions` 로 준다.
|
|
9919
|
+
* `selected` 는 눌린 꼴(좋아요가 켜졌나)이다 — 단추 하나일 때 `aria-pressed` 로, 메뉴일 때 선택 표시로 선다.
|
|
9920
|
+
*/
|
|
9921
|
+
declare type TrainingCardAction = {
|
|
9922
|
+
icon: string;
|
|
9923
|
+
label: string;
|
|
9924
|
+
onClick: () => void;
|
|
9925
|
+
selected?: boolean;
|
|
9926
|
+
disabled?: boolean;
|
|
9927
|
+
/** 단추 하나일 때의 색 꼴 — 기본 `transparent-lightGray`. 좋아요가 켜졌을 때 `danger` 처럼 바꾼다(메뉴 꼴에서는 안 쓴다). */
|
|
9928
|
+
variant?: ButtonProps['variant'];
|
|
9929
|
+
};
|
|
9908
9930
|
|
|
9909
9931
|
/** @public */
|
|
9910
9932
|
export declare function TrainingCardGroup({ title, titleLevel, count, collapsed, onToggle, beforeSort, sort, actions, empty, emptyContent, dragOver, onDragOver, onDragLeave, onDrop, children, className, }: TrainingCardGroupProps): JSX.Element;
|
|
@@ -10012,12 +10034,31 @@ export declare type TrainingCardProps = {
|
|
|
10012
10034
|
* (말귀 실측: `H1 나의 문장훈련 / H3 1123 / H3 테스트 카드`).
|
|
10013
10035
|
* `0` 을 주면 전과 같이 `div` 로 그린다. */
|
|
10014
10036
|
titleLevel?: 0 | 2 | 3 | 4 | 5 | 6;
|
|
10037
|
+
/**
|
|
10038
|
+
* **제목 위 갈래 표시** — `'문장 훈련'` · `'단어 훈련'` 처럼 이 카드가 어느 훈련인지(사장님 지시 2026-11-12:
|
|
10039
|
+
* *"title 상단에 문장훈련, 단어훈련 표시하도록 하자"*). 작은 글자 한 줄로 제목 위에 선다.
|
|
10040
|
+
* 안 줘도 그 한 줄 자리는 비워 둔다 — 갈래를 준 카드와 안 준 카드가 한 줄에 서도 키가 같다(같은 날 지시
|
|
10041
|
+
* *"안에 항목 없더라도 동일한 크기가 되도록"*).
|
|
10042
|
+
*/
|
|
10043
|
+
category?: ReactNode;
|
|
10044
|
+
/** 갈래 표시의 색 — `'main'`(기본, 문장 훈련) · `'sub'`(단어 훈련 — 사장님 지시 2026-11-12: *"단어훈련은 --color-sub 컬러로"*) */
|
|
10045
|
+
categoryVariant?: 'main' | 'sub';
|
|
10015
10046
|
/** 제목 — 문자열이면 h4 제목으로 감싸고, 노드면 그대로 렌더(예: 인라인 이름변경 입력) */
|
|
10016
10047
|
title: ReactNode;
|
|
10017
10048
|
/** 한 줄 설명 — 문자열이면 본문 문단으로 감싸고, 노드면 그대로 렌더 */
|
|
10018
10049
|
description?: ReactNode;
|
|
10019
|
-
/** 우측 상단 액션 영역 (좋아요/다운로드, ⋯ 메뉴 등) — 클릭이 카드로 전파되지
|
|
10050
|
+
/** 우측 상단 액션 영역 (좋아요/다운로드, ⋯ 메뉴 등) — 클릭이 카드로 전파되지 않음.
|
|
10051
|
+
* **할 일 단추는 `actions` 로 준다** — 여기에 단추를 여럿 얹으면 '단추는 하나' 규칙을 못 지킨다. 이 칸은 단추가 아닌 것
|
|
10052
|
+
* (모서리 배지 등)이나 `actions` 로 못 그리는 것에 쓴다. `actions` 를 주면 이 칸은 안 그린다. */
|
|
10020
10053
|
topActions?: ReactNode;
|
|
10054
|
+
/**
|
|
10055
|
+
* **오른쪽 위 할 일 — 단추는 늘 하나다**(사장님 지시 2026-11-12: *"우측 상단의 버튼은 무조건 1개. 2개 이상일 경우에는
|
|
10056
|
+
* ...버튼으로 표현하고 tooltip menu 로 선택하도록"*).
|
|
10057
|
+
*
|
|
10058
|
+
* 하나면 그 아이콘 단추(이름 = `label`, `selected` 면 눌린 꼴). 둘 이상이면 `⋯` 단추 하나가 서고 누르면 메뉴로 고른다.
|
|
10059
|
+
* 비었거나 안 주면 `topActions` 를 그린다.
|
|
10060
|
+
*/
|
|
10061
|
+
actions?: TrainingCardAction[];
|
|
10021
10062
|
/**
|
|
10022
10063
|
* **카드가 눌릴 때 읽히는 이름**(말귀 요청 (65), 2026-10-02).
|
|
10023
10064
|
*
|
|
@@ -10360,6 +10401,21 @@ export declare type TrainingPagePopupProps = {
|
|
|
10360
10401
|
* 창에서 고친다). **한 칸이 두 가지를 뜻하게 하지 않는다.**
|
|
10361
10402
|
*/
|
|
10362
10403
|
hideNoiseRows?: boolean;
|
|
10404
|
+
/**
|
|
10405
|
+
* **부른 자리에 선다** — 몸통에 포털로 붙지 않는다(말귀 청 (425), 2026-11-12). 코어 `Popup` 의 `inline` 과 같은 뜻.
|
|
10406
|
+
*
|
|
10407
|
+
* 첫 화면의 훈련 예시처럼 **실제 훈련 창을 쪽 안에 보여 줄 때** 쓴다(사장님: *"실제 개발된 내용과 다른 형태의
|
|
10408
|
+
* ui 여서 개발된 내용으로 구성하고 싶어"*). 화면을 덮지 않고 부모 폭 · 제 내용 높이(또는 `height`)로 서고,
|
|
10409
|
+
* 아래 줄(다음 문제 · 소음 설정)이 그 틀의 바닥에 선다.
|
|
10410
|
+
*
|
|
10411
|
+
* 몸통에 거는 것을 안 한다 — 스크롤 잠금 · `ihabdevteam-core-scope` 붙이기 · 훈련 창 열림 표식 · 첫 칸으로
|
|
10412
|
+
* 초점 옮기기 · 초점 가두기 · ESC. 뒤로 단추도 안 그린다(`onBack` 없이 쓴다). 대화상자가 아니라 이름 붙은
|
|
10413
|
+
* 구역(`role="region"`)이다. 한 쪽에 여럿이 서도 된다 — 소리는 코어 전역 자물쇠(`currentSound`)로 한 번에
|
|
10414
|
+
* 하나만 나고, 소음 설정은 틀마다 제 것을 쥔다.
|
|
10415
|
+
*/
|
|
10416
|
+
inline?: boolean;
|
|
10417
|
+
/** `inline` 일 때 틀의 높이(px 수 또는 CSS 길이). 안 주면 제 내용 높이. 주면 안쪽이 굴러간다. */
|
|
10418
|
+
height?: number | string;
|
|
10363
10419
|
/** 훈련 결과 팝업 렌더러 — 없으면 기본 결과 팝업(TrainingResultPopup)을 띄운다 */
|
|
10364
10420
|
renderResultPopup?: (props: {
|
|
10365
10421
|
score?: number | null;
|
|
@@ -12509,7 +12565,7 @@ export declare interface WordSearchResultWord {
|
|
|
12509
12565
|
*/
|
|
12510
12566
|
export declare function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, onPickForm, indexOffset, totalCount, renderCellAction, showFillerAdd, fillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
|
|
12511
12567
|
|
|
12512
|
-
export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onPickForm, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, fillerAdd, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }: WordTableBlockProps): JSX.Element;
|
|
12568
|
+
export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onPickForm, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, fillerAdd, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, onItemsPerPageChange, renderCellAction, actionsLeftExtra }: WordTableBlockProps): JSX.Element;
|
|
12513
12569
|
|
|
12514
12570
|
/** @public */
|
|
12515
12571
|
export declare interface WordTableBlockProps {
|
|
@@ -12692,6 +12748,18 @@ export declare interface WordTableBlockProps {
|
|
|
12692
12748
|
* 숫자를 주면 그 숫자에 못 박히므로 도중에 늘어난 만큼은 다음 쪽으로 넘어간다.
|
|
12693
12749
|
*/
|
|
12694
12750
|
initialItemsPerPage?: number | 'all';
|
|
12751
|
+
/**
|
|
12752
|
+
* **블록이 실제로 쓰는 '페이지당 개수' 를 알린다** — 들어설 때 한 번, 사람이 고르거나 자리 수가 바뀌어
|
|
12753
|
+
* 값이 달라질 때마다(말귀_2 청 (427), 2026-11-12).
|
|
12754
|
+
*
|
|
12755
|
+
* 쪽을 나누는 꼴(완성된 표시)에서만 부른다 — 편집 · 칸수조절 꼴에는 쪽이 없다. 알리는 수는 고른 값을
|
|
12756
|
+
* 자리 수 · `maxItemsPerPage` 로 조인 뒤의 것이다(`'전부'` 를 골랐으면 그때의 자리 수).
|
|
12757
|
+
*
|
|
12758
|
+
* 쓰는 까닭: 빈 쪽을 피하려고 `cellCapacity = 올림(낱말 수 / 쪽당) × 쪽당` 으로 넘기는 쪽은 **쪽당 수**를
|
|
12759
|
+
* 알아야 한다. 모르고 늘 12 로 세면 '4개' 를 고른 표에서 통째로 빈 둘째 쪽이 섰다(사장님: *"이렇게
|
|
12760
|
+
* 비어있는 페이지 노출하지 말고 페이지 아래 버튼 넣는것 있을꺼야"*).
|
|
12761
|
+
*/
|
|
12762
|
+
onItemsPerPageChange?: (n: number) => void;
|
|
12695
12763
|
/**
|
|
12696
12764
|
* **칸 오른쪽 위에 부르는 쪽이 얹는 것** — 안쪽 `WordTable` 의 같은 이름 프롭으로 그대로 간다.
|
|
12697
12765
|
* 자리·드러나는 때·인쇄에서 치우는 규칙은 그쪽 글에 있다.
|
|
@@ -104,7 +104,8 @@
|
|
|
104
104
|
/* Menu */
|
|
105
105
|
.dropdown__menu {
|
|
106
106
|
background: var(--color-white);
|
|
107
|
-
|
|
107
|
+
/* 외곽선 색은 darkWhite(사장님 지시 2026-11-12: *"popup, tooltip dp 외곽선이 없으니까 가끔 이상하게 보일때가 있네 각각 보더 넣어주되 컬러를 --color-darkWhite로"*) */
|
|
108
|
+
border: 1.5px solid var(--color-darkWhite);
|
|
108
109
|
border-radius: var(--radius-card);
|
|
109
110
|
box-shadow: var(--shadow-dropdown);
|
|
110
111
|
padding: 6px;
|
|
@@ -54,6 +54,23 @@
|
|
|
54
54
|
border: 1px solid var(--color-darkWhite);
|
|
55
55
|
border-radius: var(--radius-m);
|
|
56
56
|
}
|
|
57
|
+
/* **마우스를 얹으면 살짝 떠오른다**(말귀 청 (420), 사장님 지시 2026-11-12). 위로 4px · 그림자 · 0.2초.
|
|
58
|
+
전환을 기본 꼴에 두어 나갈 때도 같은 빠르기로 제자리에 온다. 마우스가 있는 기기에서만 켠다 —
|
|
59
|
+
폰에서 누르면 `:hover` 가 붙은 채 남아 칸이 떠 있게 된다. 누르는 칸이 아니라 `cursor` 는 그대로. */
|
|
60
|
+
@media (hover: hover) {
|
|
61
|
+
.landing-card--hover {
|
|
62
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
63
|
+
}
|
|
64
|
+
.landing-card--hover:hover {
|
|
65
|
+
transform: translateY(-4px);
|
|
66
|
+
box-shadow: var(--shadow-dropdown);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/* 움직임 줄이기 — 오르지 않고 그림자만 바로 진다 */
|
|
70
|
+
@media (hover: hover) and (prefers-reduced-motion: reduce) {
|
|
71
|
+
.landing-card--hover { transition: none; }
|
|
72
|
+
.landing-card--hover:hover { transform: none; }
|
|
73
|
+
}
|
|
57
74
|
/* 칸 제목은 **한 크기뿐이다**(말귀 사장님 지시 2026-11-06) — `big` 으로 두 크기를 두었더니
|
|
58
75
|
같은 쪽 안에서 24px 과 17px 이 섞여 어느 것이 큰 자리인지 안 읽혔다.
|
|
59
76
|
|
|
@@ -18,6 +18,14 @@ export interface LandingCardProps {
|
|
|
18
18
|
tight?: boolean;
|
|
19
19
|
/** 아이콘·글을 칸 가운데로 (`stack` 일 때만) */
|
|
20
20
|
align?: 'left' | 'center';
|
|
21
|
+
/**
|
|
22
|
+
* 마우스를 얹으면 살짝 떠오른다 — 기본 `true`(말귀 청 (420), 사장님 지시 2026-11-12: *"렌딩 카드들
|
|
23
|
+
* 호버 넣고싶어. 살짝 뜨는 느낌으로 그림자가 생기고 살짝 움직이고 마우스 나가면 다시 제자리로"*).
|
|
24
|
+
* 위로 4px · 그림자 `--shadow-dropdown` · 0.2초. 마우스가 있는 기기에서만 켜지고, 움직임 줄이기
|
|
25
|
+
* 설정에서는 오르지 않고 그림자만 진다. 큰 판이 든 `layout="row"` 카드처럼 뜨면 어색한 자리는 `false`.
|
|
26
|
+
* 누르는 칸이 아니라 손가락 모양(`cursor: pointer`)은 안 붙인다.
|
|
27
|
+
*/
|
|
28
|
+
hover?: boolean;
|
|
21
29
|
className?: string;
|
|
22
30
|
style?: CSSProperties;
|
|
23
31
|
}
|
|
@@ -28,4 +36,4 @@ export interface LandingCardProps {
|
|
|
28
36
|
*
|
|
29
37
|
* @public
|
|
30
38
|
*/
|
|
31
|
-
export default function LandingCard({ icon, title, desc, children, layout, leadWidth, titleStyle, tight, align, className, style, }: LandingCardProps): import("react").JSX.Element;
|
|
39
|
+
export default function LandingCard({ icon, title, desc, children, layout, leadWidth, titleStyle, tight, align, hover, className, style, }: LandingCardProps): import("react").JSX.Element;
|
|
@@ -9,13 +9,13 @@ import './Landing.css';
|
|
|
9
9
|
*
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
export default function LandingCard({ icon, title, desc, children, layout = 'stack', leadWidth = 300, titleStyle, tight = false, align = 'left', className, style, }) {
|
|
12
|
+
export default function LandingCard({ icon, title, desc, children, layout = 'stack', leadWidth = 300, titleStyle, tight = false, align = 'left', hover = true, className, style, }) {
|
|
13
13
|
/* 여백·바탕·모서리는 **CSS 가 쥔다**(코어 `inlineVarIsInvisible1020` — 인라인 `var()` 는
|
|
14
14
|
jsdom 이 버려서 시험이 그 자리를 못 본다). 인라인은 쓰는 쪽이 준 것과 폭 수치뿐이다. */
|
|
15
15
|
const pad = tight ? 'landing-card--pad-tight' : 'landing-card--pad';
|
|
16
16
|
const head = (_jsxs(_Fragment, { children: [icon, title ? _jsx("h3", { className: "landing-card__title", style: titleStyle, children: title }) : null, desc ? _jsx("p", { className: "landing-card__desc", children: desc }) : null] }));
|
|
17
17
|
if (layout === 'row') {
|
|
18
|
-
return (_jsxs("div", { className: cx('landing-card', 'landing-card--row', pad, className), style: style, children: [_jsx("div", { className: "landing-card__lead", style: { ['--landing-card-lead-w']: `${leadWidth}px` }, children: head }), _jsx("div", { className: "landing-card__panel", children: children })] }));
|
|
18
|
+
return (_jsxs("div", { className: cx('landing-card', 'landing-card--row', pad, hover && 'landing-card--hover', className), style: style, children: [_jsx("div", { className: "landing-card__lead", style: { ['--landing-card-lead-w']: `${leadWidth}px` }, children: head }), _jsx("div", { className: "landing-card__panel", children: children })] }));
|
|
19
19
|
}
|
|
20
|
-
return (_jsxs("div", { className: cx('landing-card', pad, align === 'center' && 'landing-card--center', className), style: style, children: [head, children] }));
|
|
20
|
+
return (_jsxs("div", { className: cx('landing-card', pad, align === 'center' && 'landing-card--center', hover && 'landing-card--hover', className), style: style, children: [head, children] }));
|
|
21
21
|
}
|
|
@@ -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);
|
|
@@ -180,7 +182,26 @@
|
|
|
180
182
|
.popup-footer__end > *:not(.button) {
|
|
181
183
|
min-width: 0;
|
|
182
184
|
}
|
|
185
|
+
/* **뜰 때도 부드럽게 · 닫힘과 짝을 맞춘다**(말귀 청 (421), 사장님 2026-11-12: *"로그인 팝업이 너무 툭 나오는
|
|
186
|
+
느낌인데 popup 에 in out. 애니메이션 있지 않았나?"*). 전에는 닫힘(흐려짐 260ms)만 있었다.
|
|
187
|
+
- 뜰 때: 바탕은 흐려지며 서고(0 → 1), 창은 8px 아래에서 떠오르며 선다 · 200ms. 창은 붙을 때 한 번만 돈다
|
|
188
|
+
(`Popup` 은 열고 닫을 때 붙었다 떨어진다).
|
|
189
|
+
- 닫힐 때: 바탕 · 창이 함께 흐려지고 창은 같은 8px 아래로 내려간다 · 260ms(닫힘 타이머 `ANIM_MS` 와 같다).
|
|
190
|
+
- 쪽 안에 갇힌 꼴(`popup--inline`)은 움직이지 않는다 — 쪽의 한 부분이라 떠오를 까닭이 없다.
|
|
191
|
+
- 움직임 줄이기: 둘 다 끈다(전역 규칙도 줄이지만 여기서도 끈다).
|
|
192
|
+
창 안에서 뜨자마자 자리를 재는 것(툴팁 앵커)은 200ms 동안 최대 8px 어긋날 수 있다 — 툴팁은 얹을 때 재므로
|
|
193
|
+
보통은 다 선 뒤다. `autoFocus` 는 자리와 상관없다. */
|
|
194
|
+
@keyframes popup-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
|
|
195
|
+
@keyframes popup-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
|
|
196
|
+
.popup:not(.popup--inline) { animation: popup-backdrop-in 200ms ease-out; }
|
|
197
|
+
.popup:not(.popup--inline) > .popup-panel { animation: popup-panel-in 200ms ease-out; }
|
|
183
198
|
.popup--closing { opacity: 0; transition: opacity 260ms ease }
|
|
199
|
+
.popup--closing:not(.popup--inline) > .popup-panel { transform: translateY(8px); transition: transform 260ms ease; }
|
|
200
|
+
@media (prefers-reduced-motion: reduce) {
|
|
201
|
+
.popup:not(.popup--inline),
|
|
202
|
+
.popup:not(.popup--inline) > .popup-panel { animation: none; }
|
|
203
|
+
.popup--closing:not(.popup--inline) > .popup-panel { transform: none; transition: none; }
|
|
204
|
+
}
|
|
184
205
|
|
|
185
206
|
@media (max-width: 767px) {
|
|
186
207
|
.popup-panel {
|
|
@@ -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 && (
|
|
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();
|
|
@@ -93,6 +93,26 @@
|
|
|
93
93
|
좁아져 정렬이 지켜진다. */
|
|
94
94
|
.table-wrap--resizable .table-fields,
|
|
95
95
|
.table-wrap--resizable .table-row { padding-right: var(--table-reset-gutter, 40px); }
|
|
96
|
+
/* **한 칸짜리 줄(불러오는 중 · 없음)은 보이는 폭의 가운데에 선다.**
|
|
97
|
+
- 오른쪽 빈자리(40)를 안 비운다 — 칸 정렬을 맞출 칸이 없는데 오른쪽만 비어 스피너가 20px · 빈 글이 10px
|
|
98
|
+
왼쪽에 섰다(사장님이 짚으심 2026-11-12: *"스피너가 가운데 있는 느낌이 아니네?"*).
|
|
99
|
+
- 표가 가로로 넘쳐도 — 안쪽 상자가 열 폭 합만큼 넓어져 글이 넘친 폭 전체의 가운데(어드민 회원 표에서
|
|
100
|
+
143px 오른쪽)에 섰다(말귀_3 청 (424), 사장님: *"안내글도 가운데가 아냐"*). 칸을 **보이는 폭**
|
|
101
|
+
(`--table-visible-w`, `measureOverflow` 가 통의 `clientWidth` 를 적는다)으로 두고 왼쪽에 붙박는다(sticky).
|
|
102
|
+
줄 자신의 여백은 걷고 칸이 쥔다 — 빈 줄의 좌우 20 은 칸 안으로 옮겼다. */
|
|
103
|
+
.table-wrap .table-row.table-row--loading,
|
|
104
|
+
.table-wrap .table-row.table-row--empty { padding: 0; justify-content: flex-start; }
|
|
105
|
+
.table-row--loading > .table-row__full-cell,
|
|
106
|
+
.table-row--empty > .table-row__full-cell {
|
|
107
|
+
display: flex;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
align-items: center;
|
|
110
|
+
position: sticky;
|
|
111
|
+
left: 0;
|
|
112
|
+
width: var(--table-visible-w, 100%);
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
}
|
|
115
|
+
.table-row--empty > .table-row__full-cell { padding: 0 20px; text-align: center; }
|
|
96
116
|
|
|
97
117
|
/* **단추 받침 — 보이는 오른쪽 끝에 붙박인다**(말귀 청 (216), 2026-10-28).
|
|
98
118
|
|
|
@@ -377,6 +377,14 @@ export default function Table({ fields: rawFields = [], sort: sortBinding, sorta
|
|
|
377
377
|
얹는다.** 이 함수는 그려질 때마다 불리지만 같은 수면 React 가 다시 안 그리므로
|
|
378
378
|
도는 일은 없다. */
|
|
379
379
|
setBoxWidth(el.clientWidth);
|
|
380
|
+
/* **보이는 폭을 CSS 에 건넨다**(말귀_3 청 (424), 2026-11-12). 표가 가로로 넘치면 안쪽 상자가 열 폭 합만큼
|
|
381
|
+
넓어져, 한 칸짜리 줄(불러오는 중 · 없음)의 글이 **넘친 폭 전체**의 가운데에 섰다(어드민 회원 표: 통 996 ·
|
|
382
|
+
안쪽 1280 · 안내글이 143px 오른쪽). 그 칸을 보이는 폭으로 붙박는다(`Table.css` 의 `--table-visible-w`). */
|
|
383
|
+
/* 넘칠 때만 적는다 — 안 넘치면 칸이 줄 폭(100%)과 같아 필요 없고, 폭을 안 준 표의 `style` 을 비워 둔다 */
|
|
384
|
+
if (el.scrollWidth > el.clientWidth + 1)
|
|
385
|
+
el.style.setProperty('--table-visible-w', `${el.clientWidth}px`);
|
|
386
|
+
else
|
|
387
|
+
el.style.removeProperty('--table-visible-w');
|
|
380
388
|
}, []);
|
|
381
389
|
/* **보개의 목숨을 `ref` 콜백 하나가 쥔다 — effect 와 나눠 갖지 않는다.**
|
|
382
390
|
|
|
@@ -44,7 +44,10 @@
|
|
|
44
44
|
우측 묶음은 오른쪽에 붙었는데 그 안은 왼쪽에 붙는 꼴이다(말귀 실측 2026-09-22).
|
|
45
45
|
늘어나는 것 자체는 막지 않는다(막으면 좁은 화면에서 그 묶음이 제 줄을 못 쓴다).
|
|
46
46
|
대신 **늘어나도 안쪽이 오른쪽에 서게** 한다 — 원래 오른쪽 것이던 자리다. */
|
|
47
|
-
.
|
|
47
|
+
/* **단추는 빼낸다**(말귀_3 청 (423), 2026-11-12). 이 규칙이 오른쪽 묶음에 바로 놓인 단추에도 닿아
|
|
48
|
+
`.button--align-center` 를 이겼다 — 어드민 회원 관리의 CSV 단추(40×40)에서 아이콘 20px 이 왼쪽 19 ·
|
|
49
|
+
오른쪽 1 로 쏠렸다. 단추는 제 안이 늘어날 일이 없고(줄을 바꾸는 묶음이 아니다) 가운데가 맞다. */
|
|
50
|
+
.toolbar__row-end > :not(.button) {
|
|
48
51
|
justify-content: flex-end;
|
|
49
52
|
}
|
|
50
53
|
|
|
@@ -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-
|
|
12
|
+
border: 1px solid var(--color-darkWhite); /* 2026-11-12 사장님 지시 — 툴팁 외곽선은 darkWhite */
|
|
13
13
|
max-width: 640px;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
padding: var(--spacing-content);
|
|
3
3
|
border-radius: var(--radius-m);
|
|
4
4
|
background: var(--color-deepWhite);
|
|
5
|
-
border: 1px solid var(--color-
|
|
5
|
+
border: 1px solid var(--color-darkWhite); /* 2026-11-12 사장님 지시 — 툴팁 외곽선은 darkWhite */
|
|
6
6
|
max-width: 520px;
|
|
7
7
|
box-sizing: border-box;
|
|
8
8
|
}
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
animation: tooltip-pop 200ms cubic-bezier(.2,.9,.2,1) both;
|
|
12
12
|
will-change: transform, opacity;
|
|
13
13
|
background-color: var(--color-white);
|
|
14
|
+
/* **늘 외곽선**(사장님 지시 2026-11-12: *"popup, tooltip dp 외곽선이 없으니까 가끔 이상하게 보일때가 있네 각각 보더 넣어주되 컬러를 --color-darkWhite로"*). 전에는 `useBorder` 일 때만 섰다 */
|
|
15
|
+
border: 1px solid var(--color-darkWhite);
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
/* useBorder=true 일 때만 외곽선 */
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
position: static;
|
|
20
22
|
}
|
|
21
23
|
.tooltip__content--bordered {
|
|
22
|
-
border: 1px solid var(--color-
|
|
24
|
+
border: 1px solid var(--color-darkWhite);
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
/* 배경 없는 variant 툴팁(Info/Description/Training) 공통 — 감싸는 wrapper(.tooltip__content)의
|
|
@@ -31,6 +33,8 @@
|
|
|
31
33
|
.tooltip__content.training-tooltip {
|
|
32
34
|
background: transparent;
|
|
33
35
|
box-shadow: none;
|
|
36
|
+
/* 감싸개는 안 보이는 겉이다 — 외곽선은 안쪽 상자가 쥔다(겹치면 두 줄이 된다) */
|
|
37
|
+
border: none;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
/* header prop 전달 시 상단 헤더 */
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
gap: 10px;
|
|
10
10
|
padding: 18px;
|
|
11
11
|
background: var(--color-white);
|
|
12
|
-
/*
|
|
13
|
-
|
|
12
|
+
/* **기본 테두리는 whiteLine**(사장님 지시 2026-11-12: *"기본 border 넣자. white line 으로"*). 전에는 고대비에서만
|
|
13
|
+
섰다(`--color-control-edge`, 보통 transparent — 청 412). 고대비에서는 whiteLine 토큰 자체가 짙어져(#7b8798)
|
|
14
|
+
경계가 그대로 또렷하다. */
|
|
15
|
+
border: 1px solid var(--color-whiteLine);
|
|
14
16
|
border-radius: var(--radius-card);
|
|
15
17
|
transition: border-color 0.15s, box-shadow 0.15s;
|
|
16
18
|
}
|
|
@@ -36,9 +38,11 @@
|
|
|
36
38
|
.training-card__header {
|
|
37
39
|
display: grid;
|
|
38
40
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
39
|
-
|
|
41
|
+
/* 갈래 표시 · 제목 · 설명 세 줄(2026-11-12 갈래 줄이 머리 안으로 들어왔다) */
|
|
42
|
+
grid-template-rows: auto auto auto;
|
|
40
43
|
column-gap: 8px;
|
|
41
|
-
|
|
44
|
+
/* 갈래 · 제목 · 설명 사이 6(사장님 지시 2026-11-12 *"간격 조정"* — 4 로는 세 줄이 붙어 보였다) */
|
|
45
|
+
row-gap: 6px;
|
|
42
46
|
align-items: start;
|
|
43
47
|
}
|
|
44
48
|
|
|
@@ -47,11 +51,24 @@
|
|
|
47
51
|
display: contents;
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
.training-
|
|
54
|
+
.training-card__header > .training-card__category { grid-area: 1 / 1; min-width: 0; }
|
|
55
|
+
.training-card__title-row > :first-child { grid-area: 2 / 1; min-width: 0; }
|
|
51
56
|
|
|
52
57
|
/* 머리의 마지막 아이는 설명이다(없으면 빈 자리를 채우는 자리지기) */
|
|
53
|
-
.training-card__header > :last-child { grid-area:
|
|
58
|
+
.training-card__header > :last-child { grid-area: 3 / 1; }
|
|
54
59
|
|
|
60
|
+
/* 제목 위 갈래 표시('문장 훈련' · '단어 훈련', 사장님 지시 2026-11-12). 본색 글자로 제목과 층을 가른다.
|
|
61
|
+
한 줄 — 넘치면 말줄임. 머리 격자의 첫 줄이라 제목과 사이는 줄 간격(4)이다. */
|
|
62
|
+
.training-card__category {
|
|
63
|
+
margin: 0;
|
|
64
|
+
color: var(--color-main-ink, var(--color-main));
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
text-overflow: ellipsis;
|
|
69
|
+
min-height: 1lh;
|
|
70
|
+
}
|
|
71
|
+
.training-card__category--sub { color: var(--color-sub); } /* 단어 훈련(사장님 지시 2026-11-12) */
|
|
55
72
|
.training-card__title {
|
|
56
73
|
margin: 0;
|
|
57
74
|
color: var(--color-darkGray);
|
|
@@ -66,14 +83,18 @@
|
|
|
66
83
|
/* **두 줄에 걸친다.** 첫 줄만 차지하면 그 줄이 다시 단추 키(40px)로 부풀어
|
|
67
84
|
아무것도 나아지지 않는다 — 고치는 도중에 실제로 그랬다(머리가 66px 그대로).
|
|
68
85
|
두 줄에 걸치고 `align-self: start` 로 위에 붙여야 제목 줄이 제 키를 지킨다. */
|
|
69
|
-
|
|
86
|
+
/* 갈래 줄부터 설명 줄까지 — 카드 **오른쪽 위**에 붙는다(제목 줄과 따로, 사장님 지시 2026-11-12) */
|
|
87
|
+
grid-row: 1 / 4;
|
|
70
88
|
grid-column: 2;
|
|
71
89
|
align-self: start;
|
|
72
90
|
display: flex;
|
|
73
91
|
align-items: center;
|
|
74
92
|
gap: 2px;
|
|
75
93
|
flex-shrink: 0;
|
|
76
|
-
|
|
94
|
+
/* **아이콘을 카드 안쪽 여백 모서리에 맞춘다**(2026-11-12) — 40 단추 안의 20 아이콘은 사방 10 이 비어, 그대로 두면
|
|
95
|
+
아이콘이 갈래 글자보다 10 아래 · 여백보다 안쪽에 떠 보였다. 위 · 오른쪽으로 10 씩 당긴다. */
|
|
96
|
+
margin-top: -10px;
|
|
97
|
+
margin-right: -10px;
|
|
77
98
|
}
|
|
78
99
|
|
|
79
100
|
/* 게시자 이름은 **글자 높이가 곧 누름감 높이**였다 — 320px 라이브 실측 29 x 13px
|
|
@@ -139,9 +160,21 @@
|
|
|
139
160
|
flex-direction: column;
|
|
140
161
|
gap: 8px;
|
|
141
162
|
justify-content: flex-end;
|
|
163
|
+
/* **가운데가 기본**(사장님 지시 2026-11-12: *"가운데 정렬을 기본으로"*). 수 칸을 `training-card__types` 로 감싼
|
|
164
|
+
카드는 가운데, 감싸지 않고 바로 넣은 카드는 왼쪽에 서서 카드마다 달랐다. 본문 자체를 가운데로 둔다 —
|
|
165
|
+
한 줄을 다 쓰는 것(단어 배지 줄 등)은 제 폭이 차서 그대로다. */
|
|
166
|
+
align-items: center;
|
|
167
|
+
/* **본문이 없어도 수 칸(CountTile 72) 한 줄 자리를 쥔다**(사장님 지시 2026-11-12) — 카드 키가 든 것에 따라
|
|
168
|
+
달라지지 않게. 본문이 없는 카드는 빈 자리(`--empty`)가 이 키로 선다. */
|
|
169
|
+
min-height: 72px;
|
|
142
170
|
}
|
|
143
171
|
|
|
144
172
|
.training-card__empty { color: var(--color-lightGray); }
|
|
173
|
+
/* 빈 본문 · 빈 바닥 자리 — 키만 쥐고 아무것도 받지 않는다(2026-11-12) */
|
|
174
|
+
.training-card__body--empty,
|
|
175
|
+
.training-card__footer--empty { pointer-events: none; }
|
|
176
|
+
/* ⋯ 메뉴를 담는 자리 — 자리를 안 차지한다(메뉴는 몸통에 떠서 선다) */
|
|
177
|
+
.training-card__menu-host { display: contents; }
|
|
145
178
|
|
|
146
179
|
.training-card__types {
|
|
147
180
|
display: flex;
|
|
@@ -175,6 +208,10 @@
|
|
|
175
208
|
justify-content: space-between;
|
|
176
209
|
padding-top: 8px;
|
|
177
210
|
gap: var(--spacing-xs);
|
|
211
|
+
/* **바닥이 없거나 작은 것만 들어도 같은 키**(사장님 지시 2026-11-12) — 바닥에 흔히 서는 작은 배지(높이 20)만큼
|
|
212
|
+
자리를 쥔다. 날짜(11px)만 든 바닥도, 바닥이 없는 카드(`--empty`)도 이 키로 선다. */
|
|
213
|
+
min-height: 28px;
|
|
214
|
+
box-sizing: border-box;
|
|
178
215
|
}
|
|
179
216
|
|
|
180
217
|
.training-card__footer-left {
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import './TrainingCard.css';
|
|
2
2
|
import type { ReactNode, DragEvent } from 'react';
|
|
3
|
+
import type { ButtonProps } from '../buttonTypes';
|
|
4
|
+
/**
|
|
5
|
+
* @public 카드 오른쪽 위의 할 일 하나 — `actions` 로 준다.
|
|
6
|
+
* `selected` 는 눌린 꼴(좋아요가 켜졌나)이다 — 단추 하나일 때 `aria-pressed` 로, 메뉴일 때 선택 표시로 선다.
|
|
7
|
+
*/
|
|
8
|
+
export type TrainingCardAction = {
|
|
9
|
+
icon: string;
|
|
10
|
+
label: string;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** 단추 하나일 때의 색 꼴 — 기본 `transparent-lightGray`. 좋아요가 켜졌을 때 `danger` 처럼 바꾼다(메뉴 꼴에서는 안 쓴다). */
|
|
15
|
+
variant?: ButtonProps['variant'];
|
|
16
|
+
};
|
|
3
17
|
/** @public */
|
|
4
18
|
export type TrainingCardProps = {
|
|
5
19
|
/** 카드 제목을 **머리글 몇 급**으로 그릴지(말귀가 (54) 를 재다 짚음, 2026-10-02).
|
|
@@ -10,12 +24,31 @@ export type TrainingCardProps = {
|
|
|
10
24
|
* (말귀 실측: `H1 나의 문장훈련 / H3 1123 / H3 테스트 카드`).
|
|
11
25
|
* `0` 을 주면 전과 같이 `div` 로 그린다. */
|
|
12
26
|
titleLevel?: 0 | 2 | 3 | 4 | 5 | 6;
|
|
27
|
+
/**
|
|
28
|
+
* **제목 위 갈래 표시** — `'문장 훈련'` · `'단어 훈련'` 처럼 이 카드가 어느 훈련인지(사장님 지시 2026-11-12:
|
|
29
|
+
* *"title 상단에 문장훈련, 단어훈련 표시하도록 하자"*). 작은 글자 한 줄로 제목 위에 선다.
|
|
30
|
+
* 안 줘도 그 한 줄 자리는 비워 둔다 — 갈래를 준 카드와 안 준 카드가 한 줄에 서도 키가 같다(같은 날 지시
|
|
31
|
+
* *"안에 항목 없더라도 동일한 크기가 되도록"*).
|
|
32
|
+
*/
|
|
33
|
+
category?: ReactNode;
|
|
34
|
+
/** 갈래 표시의 색 — `'main'`(기본, 문장 훈련) · `'sub'`(단어 훈련 — 사장님 지시 2026-11-12: *"단어훈련은 --color-sub 컬러로"*) */
|
|
35
|
+
categoryVariant?: 'main' | 'sub';
|
|
13
36
|
/** 제목 — 문자열이면 h4 제목으로 감싸고, 노드면 그대로 렌더(예: 인라인 이름변경 입력) */
|
|
14
37
|
title: ReactNode;
|
|
15
38
|
/** 한 줄 설명 — 문자열이면 본문 문단으로 감싸고, 노드면 그대로 렌더 */
|
|
16
39
|
description?: ReactNode;
|
|
17
|
-
/** 우측 상단 액션 영역 (좋아요/다운로드, ⋯ 메뉴 등) — 클릭이 카드로 전파되지
|
|
40
|
+
/** 우측 상단 액션 영역 (좋아요/다운로드, ⋯ 메뉴 등) — 클릭이 카드로 전파되지 않음.
|
|
41
|
+
* **할 일 단추는 `actions` 로 준다** — 여기에 단추를 여럿 얹으면 '단추는 하나' 규칙을 못 지킨다. 이 칸은 단추가 아닌 것
|
|
42
|
+
* (모서리 배지 등)이나 `actions` 로 못 그리는 것에 쓴다. `actions` 를 주면 이 칸은 안 그린다. */
|
|
18
43
|
topActions?: ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* **오른쪽 위 할 일 — 단추는 늘 하나다**(사장님 지시 2026-11-12: *"우측 상단의 버튼은 무조건 1개. 2개 이상일 경우에는
|
|
46
|
+
* ...버튼으로 표현하고 tooltip menu 로 선택하도록"*).
|
|
47
|
+
*
|
|
48
|
+
* 하나면 그 아이콘 단추(이름 = `label`, `selected` 면 눌린 꼴). 둘 이상이면 `⋯` 단추 하나가 서고 누르면 메뉴로 고른다.
|
|
49
|
+
* 비었거나 안 주면 `topActions` 를 그린다.
|
|
50
|
+
*/
|
|
51
|
+
actions?: TrainingCardAction[];
|
|
19
52
|
/**
|
|
20
53
|
* **카드가 눌릴 때 읽히는 이름**(말귀 요청 (65), 2026-10-02).
|
|
21
54
|
*
|
|
@@ -43,4 +76,4 @@ export type TrainingCardProps = {
|
|
|
43
76
|
className?: string;
|
|
44
77
|
};
|
|
45
78
|
/** @public */
|
|
46
|
-
export default function TrainingCard({ title, titleLevel, description, topActions, children, footerLeft, footerRight, ariaLabel, onClick, draggable, onDragStart, onDragEnd, className, }: TrainingCardProps): import("react").JSX.Element;
|
|
79
|
+
export default function TrainingCard({ title, titleLevel, category, categoryVariant, description, topActions, actions, children, footerLeft, footerRight, ariaLabel, onClick, draggable, onDragStart, onDragEnd, className, }: TrainingCardProps): import("react").JSX.Element;
|