@ihabdevteam/core 0.399.0 → 0.401.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 +68 -0
- package/dist/components.cjs.js +176 -176
- package/dist/hooks.cjs.js +5 -5
- package/dist/i18n.cjs.js +3 -3
- package/dist/ihabdevteam-core.cjs.js +182 -182
- package/dist/ihabdevteam-core.d.ts +32 -6
- package/dist/packages/core/src/components/BarChart.js +3 -2
- package/dist/packages/core/src/components/ChartSection.js +2 -1
- package/dist/packages/core/src/components/PanelRow.js +7 -6
- package/dist/packages/core/src/components/SummaryStrip.d.ts +1 -1
- package/dist/packages/core/src/components/SummaryStrip.js +1 -1
- package/dist/packages/core/src/components/Table.js +3 -2
- package/dist/packages/core/src/components/Toolbar.js +3 -2
- package/dist/packages/core/src/components/Word/WordTableBlock.d.ts +1 -1
- package/dist/packages/core/src/components/Word/WordTableBlock.js +4 -4
- package/dist/packages/core/src/components/Word/wordTableBlockTypes.d.ts +2 -0
- package/dist/packages/core/src/components/WordTable.d.ts +19 -1
- package/dist/packages/core/src/components/WordTable.js +17 -3
- package/dist/packages/core/src/components/barChartTypes.d.ts +8 -2
- package/dist/packages/core/src/components/controlSize.d.ts +29 -0
- package/dist/packages/core/src/components/controlSize.js +29 -0
- package/dist/packages/core/src/i18n/locales/en.json +5 -1
- package/dist/packages/core/src/i18n/locales/ko.json +5 -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 +3 -3
- package/package.json +1 -1
|
@@ -493,8 +493,14 @@ export declare interface BarChartProps {
|
|
|
493
493
|
* (말귀 실측: 같은 자료가 dayMean 54% · weighted 80% = 229/286문항.)
|
|
494
494
|
*/
|
|
495
495
|
rateAgg?: 'dayMean' | 'weighted';
|
|
496
|
-
/**
|
|
497
|
-
*
|
|
496
|
+
/**
|
|
497
|
+
* '상세보기' 단추 크기 — **기본 40**(사장님 지시 2026-10-29: *"header 에 있는 요소들도
|
|
498
|
+
* 동일하게"*).
|
|
499
|
+
*
|
|
500
|
+
* 전에는 기본이 32 였고, 머리 줄에 큰 것을 얹은 카드만 40 을 주라고 적어 두었다. 그
|
|
501
|
+
* *"그 카드만"* 이 이 프롭이 생긴 까닭인데, 머리에 선 것이 모두 40 이 되면서 맞출 것이
|
|
502
|
+
* 없어졌다. 일부러 작게 쓰려는 자리만 32 를 준다.
|
|
503
|
+
*/
|
|
498
504
|
detailSize?: 32 | 40;
|
|
499
505
|
/** 머리 오른쪽 묶음에서 기간 컨트롤과 '상세보기' **사이** 에 놓을 것 — 앱이 카드 머리에 얹는 작은 조작(예: 시간/정답률 SegmentedControl size 32).
|
|
500
506
|
* size='small' 에서도 이것만은 그린다(기간 컨트롤은 그대로 숨김). */
|
|
@@ -1916,7 +1922,7 @@ export declare function copyText(text: string): Promise<boolean>;
|
|
|
1916
1922
|
*
|
|
1917
1923
|
* 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
|
|
1918
1924
|
*/
|
|
1919
|
-
export declare const CORE_VERSION = "0.
|
|
1925
|
+
export declare const CORE_VERSION = "0.401.0";
|
|
1920
1926
|
|
|
1921
1927
|
/** @public */
|
|
1922
1928
|
declare const coreDefault: Record<string, unknown>;
|
|
@@ -7842,7 +7848,7 @@ export declare function summarizeMisses(records: readonly TrainingResultRecord[]
|
|
|
7842
7848
|
* { label: '생년월일', value: patient.birthDate },
|
|
7843
7849
|
* { label: '환자번호', value: patient.chartNo ?? '-' },
|
|
7844
7850
|
* ]}
|
|
7845
|
-
* actions={<Button size={
|
|
7851
|
+
* actions={<Button size={40} type="dot" icon="pencil" ariaLabel="정보 수정" onClick={onEdit} />}
|
|
7846
7852
|
* />
|
|
7847
7853
|
* ```
|
|
7848
7854
|
*
|
|
@@ -11698,9 +11704,9 @@ export declare interface WordSearchResultWord {
|
|
|
11698
11704
|
* 표시(items)·편집(editCells) 두 모드를 지원한다.
|
|
11699
11705
|
* @public
|
|
11700
11706
|
*/
|
|
11701
|
-
export declare function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
|
|
11707
|
+
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, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
|
|
11702
11708
|
|
|
11703
|
-
export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }: WordTableBlockProps): JSX.Element;
|
|
11709
|
+
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, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }: WordTableBlockProps): JSX.Element;
|
|
11704
11710
|
|
|
11705
11711
|
/** @public */
|
|
11706
11712
|
export declare interface WordTableBlockProps {
|
|
@@ -11805,6 +11811,8 @@ export declare interface WordTableBlockProps {
|
|
|
11805
11811
|
onRemoveItem?: (id: string) => void;
|
|
11806
11812
|
/** 주면 칸에 **복사 단추**가 선다 — 그 낱말을 한 칸 더 만든다. 꼴은 코어가 빼기·옮기기와 같게 짓는다. */
|
|
11807
11813
|
onCopyItem?: (id: string, index: number) => void;
|
|
11814
|
+
/** 주면 칸에 **바꾸기 단추**가 선다 — 그 칸을 다른 낱말로. 꼴은 코어가 빼기·한 칸 더와 같게 짓는다(청 (353)). */
|
|
11815
|
+
onReplaceItem?: (id: string, index: number) => void;
|
|
11808
11816
|
/** 전달하면 액션 영역 왼쪽에 초기화 버튼 표시 */
|
|
11809
11817
|
onReset?: () => void;
|
|
11810
11818
|
resetLabel?: string;
|
|
@@ -12152,6 +12160,24 @@ export declare interface WordTableProps {
|
|
|
12152
12160
|
* 여기서 그리면 빼기·옮기기와 **같은 꼴로 지어진다** — 맞출 것이 없다.
|
|
12153
12161
|
*/
|
|
12154
12162
|
onCopyItem?: (id: string, index: number) => void;
|
|
12163
|
+
/**
|
|
12164
|
+
* 그 칸을 **다른 낱말로** 바꾼다 — 주면 칸의 오른쪽 기둥에 바꾸기 단추가 선다
|
|
12165
|
+
* (말귀 청 (353), 2026-10-29).
|
|
12166
|
+
*
|
|
12167
|
+
* **`onCopyItem` 과 같은 까닭으로 코어가 그린다.** 이 자리는 `renderCellAction` 으로
|
|
12168
|
+
* 부르는 쪽이 얹던 곳인데, 꼴을 다시 적어야 해서 **안 적은 쪽만 테두리가 생겼다**
|
|
12169
|
+
* (`useBorder` 기본이 `true` 다). 사장님이 **같은 것을 두 번** 이르셨다 —
|
|
12170
|
+
* 2026-09-27 *"다른 단어로 버튼만 다르네? 베리언트 동일하게"* · 2026-10-29
|
|
12171
|
+
* *"다른 단어로 버튼과 복사버튼이 스타일이 다르네?"*. 두 번 어긋났다는 것은
|
|
12172
|
+
* **적어 두는 것으로는 안 맞는다**는 뜻이라 그릴 자리를 코어로 옮긴다.
|
|
12173
|
+
*
|
|
12174
|
+
* 떠 있는 말은 **칸에 든 낱말 수**가 가른다 — 하나면 '다른 단어로', 대립쌍이면 '다른 쌍으로'.
|
|
12175
|
+
* 빼기가 '단어 빼기'·'대립쌍 빼기' 로 갈리는 것과 **같은 자**다. 앱은 이것을 *화면*
|
|
12176
|
+
* (단어표냐 대립쌍표냐)으로 갈라 왔는데 코어는 화면을 모르고, 두 자는 늘 같은 답을 낸다
|
|
12177
|
+
* (대립쌍표 칸은 낱말이 둘, 단어표·활용표 칸은 하나다). 갈리는 칸이 생긴다면 그때는
|
|
12178
|
+
* **빼기도 함께 틀리는 것**이라, 한 자에 묶어 두는 편이 낫다.
|
|
12179
|
+
*/
|
|
12180
|
+
onReplaceItem?: (id: string, index: number) => void;
|
|
12155
12181
|
onReorder?: (fromIndex: number, toIndex: number) => void;
|
|
12156
12182
|
/**
|
|
12157
12183
|
* 이 표의 첫 칸이 **전체 목록에서 몇 번째**인가 — 쪽으로 나뉜 표에서 `WordTableBlock` 이 준다
|
|
@@ -211,7 +211,7 @@ export function BarChartControls({ control }) {
|
|
|
211
211
|
주 보기에서 낭독기·툴팁이 실제 동작과 다른 말을 한다(말귀 검수 실측). */
|
|
212
212
|
const prevLabel = period === 'week' ? t('calendar.prevWeek', '이전 주') : t('calendar.prevMonth', '이전 달');
|
|
213
213
|
const nextLabel = period === 'week' ? t('calendar.nextWeek', '다음 주') : t('calendar.nextMonth', '다음 달');
|
|
214
|
-
return (_jsxs("div", { className: withLegacy("chart-section__controls"), children: [_jsx(Button, { htmlType: "button", size:
|
|
214
|
+
return (_jsxs("div", { className: withLegacy("chart-section__controls"), children: [_jsx(Button, { htmlType: "button", size: CONTROL_SIZE, type: "dot", icon: "chevron-left", ariaLabel: prevLabel, showTooltipInfo: prevLabel, disabled: activeIdx === activeOptions.length - 1, onClick: handlePrev }), _jsx(Dropdown, { value: range, onChange: setRange, options: activeOptions, size: CONTROL_SIZE, className: "month-dropdown", ariaLabel: t('calendar.rangeSelect', '기간 선택') }), _jsx(Button, { htmlType: "button", size: CONTROL_SIZE, type: "dot", icon: "chevron-right", ariaLabel: nextLabel, showTooltipInfo: nextLabel, disabled: activeIdx <= 0, onClick: handleNext }), _jsx(SegmentedControl, { ariaLabel: t('calendar.periodSelect', '기간 단위'), options: periodOptions, value: period, onChange: (k) => setPeriod(k), size: CONTROL_SIZE })] }));
|
|
215
215
|
}
|
|
216
216
|
/**
|
|
217
217
|
* 한 주(월요일부터 7일)의 날마다 — 그 날의 자료와 미래 여부. 달을 넘는 날은 그 달
|
|
@@ -284,6 +284,7 @@ function barsFromControl(data, control, t, showPast = true) {
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
import { monthKeyOfDate, parseMonthKey } from './barChartMonthKey';
|
|
287
|
+
import { CONTROL_SIZE } from './controlSize';
|
|
287
288
|
import { withLegacy } from '../utils/legacyBlocks';
|
|
288
289
|
/** 시맨틱 사이즈 → 캔버스 높이·막대 너비 프리셋 */
|
|
289
290
|
const BAR_SIZE_PRESET = {
|
|
@@ -297,7 +298,7 @@ const BAR_SIZE_PRESET = {
|
|
|
297
298
|
* - 주(week): 'YYYY년 M월 N째주' 드롭다운 + 그 주의 요일(월~일) 막대
|
|
298
299
|
* 원시 렌더링은 내부 BarChartCanvas가 담당한다.
|
|
299
300
|
*/
|
|
300
|
-
export default function BarChart({ focusableBars, size = 'medium', barWidth, titleKey, titleLevel, data, colorA, colorB, labelAKey, labelBKey, showTotal = false, totalUnitKey, totalLabelKey, control: controlProp, hideControls = false, rate = false, rateAgg = 'dayMean', tightMax = false, avgMode = false, totalFormat, series, seriesMode = 'stack', loading = false, onDetail, headExtra, headSegment, icon, disc, onClick, cardAriaLabel, cardTooltip, detailSize =
|
|
301
|
+
export default function BarChart({ focusableBars, size = 'medium', barWidth, titleKey, titleLevel, data, colorA, colorB, labelAKey, labelBKey, showTotal = false, totalUnitKey, totalLabelKey, control: controlProp, hideControls = false, rate = false, rateAgg = 'dayMean', tightMax = false, avgMode = false, totalFormat, series, seriesMode = 'stack', loading = false, onDetail, headExtra, headSegment, icon, disc, onClick, cardAriaLabel, cardTooltip, detailSize = CONTROL_SIZE, barGap, baseline, className, inGrid = false, }) {
|
|
301
302
|
const { t } = useTranslation();
|
|
302
303
|
const sizePreset = BAR_SIZE_PRESET[size];
|
|
303
304
|
// 외부 control 미지정 시 내부 컨트롤 사용 (단독 차트 하위 호환)
|
|
@@ -12,6 +12,7 @@ import TooltipInfo from './Tooltip/InfoTooltip';
|
|
|
12
12
|
import { useHoverAnchor } from '../hooks/useHoverAnchor';
|
|
13
13
|
import { useIsoLayoutEffect } from '../hooks/useIsoLayoutEffect';
|
|
14
14
|
import MenuTooltip from './Tooltip/MenuTooltip';
|
|
15
|
+
import { CONTROL_SIZE } from './controlSize';
|
|
15
16
|
import { withLegacy } from '../utils/legacyBlocks';
|
|
16
17
|
/** 차트 범례 — 색상 점 + 라벨 목록. BarChart/RingChart 섹션이 공유. @public */
|
|
17
18
|
export function ChartLegend({ items, className }) {
|
|
@@ -107,7 +108,7 @@ export default function ChartSection({ title, titleClassName = 'h3', titleLevel
|
|
|
107
108
|
0.176.0 까지는 머리 오른쪽에 한 줄로 섰다 — 사용자가 차트 카드의 그 꼴로 정했다(2026-09-17). */
|
|
108
109
|
const totalRow = (totalNum != null || totalLabel) ? (_jsxs(ChartTotal, { label: totalLabel, children: [totalNum != null && _jsx("span", { className: withLegacy("chart-section__total__num h0"), children: totalNum }), totalUnit && _jsx("span", { className: withLegacy("chart-section__total__unit h5"), children: totalUnit })] })) : null;
|
|
109
110
|
/* 머리 오른쪽에는 **고르개와 `headRight` 만** 남는다 — 고르개가 먼저, 상세보기 단추가 오른쪽 끝(사용자 지시 2026-09-17) */
|
|
110
|
-
const headRightNode = (rightNode || headSegment) ? (_jsxs("div", { className: withLegacy("chart-section__head-right"), children: [headSegment && (collapsed ? (_jsx(Button, { htmlType: "button", size:
|
|
111
|
+
const headRightNode = (rightNode || headSegment) ? (_jsxs("div", { className: withLegacy("chart-section__head-right"), children: [headSegment && (collapsed ? (_jsx(Button, { htmlType: "button", size: CONTROL_SIZE, type: "dot", icon: "ellipsis", ariaLabel: headSegment.ariaLabel ?? t('common.more', '더보기'), showTooltipInfo: headSegment.ariaLabel ?? t('common.more', '더보기'), "aria-haspopup": "menu", "aria-expanded": !!menuRect, onClick: openMenu })) : (_jsx(SegmentedControl, { size: CONTROL_SIZE, ariaLabel: headSegment.ariaLabel, options: headSegment.options.map(o => ({ key: o.key, label: o.label, disabled: o.disabled })), value: headSegment.value, onChange: headSegment.onChange }))), rightNode] })) : null;
|
|
111
112
|
const titleId = useId();
|
|
112
113
|
const TitleTag = titleLevel ? `h${titleLevel}` : 'div';
|
|
113
114
|
return (_jsxs("section", { ref: secRef, className: withLegacy(['chart-section', inGrid && 'chart-section--grid', onClick && 'chart-section--clickable', className].filter(Boolean).join(' ')), onClick: onClick ? onCardClick : undefined, onKeyDown: onClick ? onCardKeyDown : undefined, onPointerEnter: tooltip ? showTip : undefined, onPointerLeave: tooltip ? closeTip : undefined, onFocus: tooltip ? showTip : undefined, onBlur: tooltip ? closeTip : undefined, role: onClick ? 'button' : undefined, tabIndex: onClick ? 0 : undefined, "aria-label": onClick ? (ariaLabel ?? (typeof title === 'string' ? title : undefined)) : undefined, "aria-labelledby": !onClick && title != null ? titleId : undefined, children: [tooltip && tipRect && (_jsx(TooltipInfo, { anchorRect: {
|
|
@@ -12,6 +12,7 @@ import { deviceKindVariant, deviceKindLabel } from '../utils/deviceKind';
|
|
|
12
12
|
import { formatWornDate } from '../utils/wornDate';
|
|
13
13
|
import TextField from './TextField';
|
|
14
14
|
import Loader from './Loader';
|
|
15
|
+
import { CONTROL_SIZE } from './controlSize';
|
|
15
16
|
import './Panel.css';
|
|
16
17
|
const noop = () => { };
|
|
17
18
|
export function PanelRow(props) {
|
|
@@ -77,27 +78,27 @@ export function PanelRow(props) {
|
|
|
77
78
|
const p = props;
|
|
78
79
|
// dropdown 행과 동일하게, PanelRow 왼쪽 라벨은 <label htmlFor>가 아닌 일반 div라서
|
|
79
80
|
// SegmentedControl에 ariaLabel로 넘겨야 스크린리더가 이름 없는 라디오그룹으로 안내하지 않는다.
|
|
80
|
-
right = _jsx(SegmentedControl, { options: p.options, value: p.value, onChange: p.onChange, size: p.size ??
|
|
81
|
+
right = _jsx(SegmentedControl, { options: p.options, value: p.value, onChange: p.onChange, size: p.size ?? CONTROL_SIZE, ariaLabel: label });
|
|
81
82
|
}
|
|
82
83
|
else if (variant === 'dropdown') {
|
|
83
84
|
const p = props;
|
|
84
|
-
const dropdowns = p.dropdowns?.length ? (_jsx("div", { className: `panel-row__dropdown-group${useFullWidth ? ' panel-row__dropdown-group--full' : ''}`, children: p.dropdowns.map((d, i) => (_jsx("div", { className: useFullWidth ? 'panel-row__dropdown-item--full' : undefined, children: _jsx(Dropdown, { options: d.options, value: d.value, onChange: d.onChange, placeholder: d.placeholder, block: useFullWidth, error: !!error, ariaDescribedBy: errorId,
|
|
85
|
+
const dropdowns = p.dropdowns?.length ? (_jsx("div", { className: `panel-row__dropdown-group${useFullWidth ? ' panel-row__dropdown-group--full' : ''}`, children: p.dropdowns.map((d, i) => (_jsx("div", { className: useFullWidth ? 'panel-row__dropdown-item--full' : undefined, children: _jsx(Dropdown, { options: d.options, value: d.value, onChange: d.onChange, size: CONTROL_SIZE, placeholder: d.placeholder, block: useFullWidth, error: !!error, ariaDescribedBy: errorId,
|
|
85
86
|
// 한 행에 여러 개가 놓이므로 행 라벨만 넘기면 셋 다 "생년월일" 이라는 같은 이름이 된다.
|
|
86
87
|
// aria-label 이 있으면 스크린리더는 트리거의 화면 텍스트(년/월/일)를 읽지 않으므로
|
|
87
88
|
// 사용자는 어느 것이 무엇인지 구별할 수 없다 — placeholder 를 붙여 구별되게 한다.
|
|
88
89
|
ariaLabel: d.ariaLabel ?? ([label, d.placeholder].filter(Boolean).join(' ') || undefined) }) }, i))) })) : (
|
|
89
90
|
// PanelRow 왼쪽 라벨(panel-row__label)은 <label htmlFor>가 아니라 그냥 div라서 트리거 버튼과
|
|
90
91
|
// 프로그래밍적으로 연결되지 않는다 — ariaLabel로 직접 이름을 넘긴다 (TextField의 ariaLabel과 동일 패턴)
|
|
91
|
-
_jsx(Dropdown, { options: p.options ?? [], value: p.value ?? '', onChange: p.onChange ?? noop, block: useFullWidth, error: !!error, ariaLabel: label, ariaDescribedBy: errorId }));
|
|
92
|
+
_jsx(Dropdown, { options: p.options ?? [], value: p.value ?? '', onChange: p.onChange ?? noop, size: CONTROL_SIZE, block: useFullWidth, error: !!error, ariaLabel: label, ariaDescribedBy: errorId }));
|
|
92
93
|
right = error ? (_jsxs("div", { className: `panel-row__dropdown-error-wrap${useFullWidth ? ' panel-row__dropdown-error-wrap--full' : ''}`, children: [dropdowns, _jsx("span", { id: errorId, className: "caption-1 panel-row__error", role: "alert", children: error })] })) : dropdowns;
|
|
93
94
|
}
|
|
94
95
|
else if (variant === 'button') {
|
|
95
96
|
const p = props;
|
|
96
97
|
if (p.buttons?.length) {
|
|
97
|
-
right = (_jsx("div", { className: "panel-row__button-group", children: p.buttons.map((btn, i) => (_jsx(Button, { htmlType: "button", size: btn.btnSize ??
|
|
98
|
+
right = (_jsx("div", { className: "panel-row__button-group", children: p.buttons.map((btn, i) => (_jsx(Button, { htmlType: "button", size: btn.btnSize ?? CONTROL_SIZE, variant: btn.btnVariant ?? 'default', disabled: btn.disabled, onClick: btn.onClick, children: btn.label }, i))) }));
|
|
98
99
|
}
|
|
99
100
|
else {
|
|
100
|
-
right = (_jsx(Button, { htmlType: "button", size: p.btnSize ??
|
|
101
|
+
right = (_jsx(Button, { htmlType: "button", size: p.btnSize ?? CONTROL_SIZE, variant: p.btnVariant ?? 'default', disabled: p.disabled, onClick: p.onClick, children: p.buttonLabel }));
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
else if (variant === 'text') {
|
|
@@ -106,7 +107,7 @@ export function PanelRow(props) {
|
|
|
106
107
|
}
|
|
107
108
|
else if (variant === 'input') {
|
|
108
109
|
const p = props;
|
|
109
|
-
right = (_jsxs("div", { className: `panel-row__input-wrap${useFullWidth ? ' panel-row__input-wrap--full' : ''}`, children: [_jsx(TextField, { value: p.value, onChange: p.onChange ?? noop, onKeyDown: p.onKeyDown, onEnter: p.onEnter, placeholder: p.placeholder, ghostText: p.ghostText, inputMode: p.inputMode, readOnly: p.readOnly, disabled: p.disabled, type: p.type, autoComplete: p.autoComplete, maxLength: p.maxLength, showCount: p.showCount, multiline: p.multiline, rows: p.rows, fullWidth: useFullWidth, error: error, ariaLabel: label, required: required, ariaDescribedBy: p.helperText ? helperId : undefined }), p.helperText && _jsx("div", { id: helperId, className: "panel-row__helper caption-1", children: p.helperText })] }));
|
|
110
|
+
right = (_jsxs("div", { className: `panel-row__input-wrap${useFullWidth ? ' panel-row__input-wrap--full' : ''}`, children: [_jsx(TextField, { size: CONTROL_SIZE, value: p.value, onChange: p.onChange ?? noop, onKeyDown: p.onKeyDown, onEnter: p.onEnter, placeholder: p.placeholder, ghostText: p.ghostText, inputMode: p.inputMode, readOnly: p.readOnly, disabled: p.disabled, type: p.type, autoComplete: p.autoComplete, maxLength: p.maxLength, showCount: p.showCount, multiline: p.multiline, rows: p.rows, fullWidth: useFullWidth, error: error, ariaLabel: label, required: required, ariaDescribedBy: p.helperText ? helperId : undefined }), p.helperText && _jsx("div", { id: helperId, className: "panel-row__helper caption-1", children: p.helperText })] }));
|
|
110
111
|
}
|
|
111
112
|
else if (variant === 'custom') {
|
|
112
113
|
const p = props;
|
|
@@ -56,7 +56,7 @@ export interface SummaryStripProps {
|
|
|
56
56
|
* { label: '생년월일', value: patient.birthDate },
|
|
57
57
|
* { label: '환자번호', value: patient.chartNo ?? '-' },
|
|
58
58
|
* ]}
|
|
59
|
-
* actions={<Button size={
|
|
59
|
+
* actions={<Button size={40} type="dot" icon="pencil" ariaLabel="정보 수정" onClick={onEdit} />}
|
|
60
60
|
* />
|
|
61
61
|
* ```
|
|
62
62
|
*
|
|
@@ -22,7 +22,7 @@ import './SummaryStrip.css';
|
|
|
22
22
|
* { label: '생년월일', value: patient.birthDate },
|
|
23
23
|
* { label: '환자번호', value: patient.chartNo ?? '-' },
|
|
24
24
|
* ]}
|
|
25
|
-
* actions={<Button size={
|
|
25
|
+
* actions={<Button size={40} type="dot" icon="pencil" ariaLabel="정보 수정" onClick={onEdit} />}
|
|
26
26
|
* />
|
|
27
27
|
* ```
|
|
28
28
|
*
|
|
@@ -21,6 +21,7 @@ import ChevronDown from 'lucide-react/dist/esm/icons/chevron-down.mjs';
|
|
|
21
21
|
import Button from './Button';
|
|
22
22
|
import Icon from './Icon';
|
|
23
23
|
import Loader from './Loader';
|
|
24
|
+
import { CONTROL_SIZE } from './controlSize';
|
|
24
25
|
import useMediaQuery from '../hooks/useMediaQuery';
|
|
25
26
|
/* 칸 하나 — `role="cell"` 이라야 낭독기가 **낱낱으로** 읽는다(말귀 요청 (56), 2026-10-02).
|
|
26
27
|
역할이 없던 때는 줄 전체가 한 덩어리 글로 읽혀 `홍길동 010-1234-5678 2026-09-30 활성`
|
|
@@ -912,7 +913,7 @@ export default function Table({ fields: rawFields = [], sort: sortBinding, sorta
|
|
|
912
913
|
* 손으로 붙이던 `onKeyDown` 은 **지웠다** — 진짜 단추라 Enter·Space 는 브라우저가
|
|
913
914
|
* 처리하고, "머리 안 단추에서 누른 키는 그 단추 몫" 이라는 가드도 저절로 선다.
|
|
914
915
|
*/
|
|
915
|
-
role: "caption", children: [onToggleCollapse && (_jsx(Button, { htmlType: "button", size:
|
|
916
|
+
role: "caption", children: [onToggleCollapse && (_jsx(Button, { htmlType: "button", size: CONTROL_SIZE, type: "dot", variant: "transparent-gray", useBorder: false, icon: collapsed ? 'chevron-right' : 'chevron-down', ariaLabel: collapsed ? t('common.expand', '펼치기') : t('common.collapse', '접기'),
|
|
916
917
|
/* 여닫힘은 **여는 것**이 말한다 — 전에는 겉의 `div` 에 달려 있었다(위 머리글) */
|
|
917
918
|
ariaExpanded: !collapsed, className: "table-header__chevron" })), icon && (_jsx(Icon, { icon: icon, label: typeof title === 'string' ? title : undefined, className: "table-header__icon" })), _jsx("span", { id: titleId, className: "table-header__title h5b", children: title }), count !== undefined && _jsx("span", { className: "table-header__count body-3b", children: count }), headerActions && (_jsx("span", { className: "table-header__actions", onClick: e => e.stopPropagation(), children: headerActions }))] })), !collapsed && (_jsxs(_Fragment, { children: [headerGroups && headerGroups.length > 0 && (_jsx("div", { role: "row", className: "table-fields table-fields--groups", children: headerGroups.map((g, i) => (_jsx("div", { role: "columnheader", "aria-colspan": g.span, className: cx('table-field body-3', g.className), style: { gridColumn: `span ${g.span}` }, children: g.label }, i))) })), _jsxs("div", { role: "presentation", className: cx('table-fields-strip', canResize && 'table-fields-strip--resizable'), children: [_jsx("div", { role: "row", className: "table-fields", ref: fieldsRef, children: fields.map((f, i) => (_jsx(TableField, { onClick: f.onClick, className: cx(f.className, alignClass(f.align)), sortDir: f.sortDir, ariaSort: ariaSortOf(i),
|
|
918
919
|
/* fit 모드는 오른쪽 이웃에서 폭을 덜어 오므로, 덜어 올 컬럼이 없는 자리에는
|
|
@@ -931,7 +932,7 @@ export default function Table({ fields: rawFields = [], sort: sortBinding, sorta
|
|
|
931
932
|
그래서 자리를 안 차지하는 `sticky` 받침에 담는다. 넘치지 않을 때는 띠 끝의
|
|
932
933
|
빈자리(`--table-reset-gutter`)에 그대로 서고, 넘칠 때는 보이는 오른쪽 끝에
|
|
933
934
|
붙어 선다. 받침이 폭 0 이라 열 셈에는 아무것도 더하지 않는다. */
|
|
934
|
-
_jsx("div", { className: "table-fields__reset-dock", children: _jsx(Button, { htmlType: "button", size:
|
|
935
|
+
_jsx("div", { className: "table-fields__reset-dock", children: _jsx(Button, { htmlType: "button", size: CONTROL_SIZE, type: "dot", variant: "transparent-gray", useBorder: false, icon: "chevrons-left-right-ellipsis", ariaLabel: t('table.resetColumns', '칸 너비 초기화'), showTooltipInfo: t('table.resetColumns', '칸 너비 초기화'), className: "table-fields__reset", onClick: resetColumns }) }))] }), _jsx("div", { role: "rowgroup", className: "table-body", children: loading ? (_jsx(TableRow, { variant: "loading", colSpan: fields.length || undefined })) : items.length === 0 && empty ? (_jsx(TableRow, { variant: "empty", colSpan: fields.length || undefined, children: empty })) : items.map((item, idx) => {
|
|
935
936
|
const isDragging = draggingId != null && item.id === draggingId;
|
|
936
937
|
const clickable = !!onRowClick && (isRowClickable ? isRowClickable(item) : true);
|
|
937
938
|
/* 글자로 견준다 — URL·폼에서 온 '5' 와 자료의 5 가 같은 줄인데 `===` 로는 안 펴졌다 */
|
|
@@ -6,6 +6,7 @@ import TextField from './TextField';
|
|
|
6
6
|
import Dropdown from './Dropdown';
|
|
7
7
|
import Pagination from './Pagination';
|
|
8
8
|
import SegmentedControl from './SegmentedControl';
|
|
9
|
+
import { CONTROL_SIZE } from './controlSize';
|
|
9
10
|
import './Toolbar.css';
|
|
10
11
|
export default function Toolbar({ count, search, segment, filters, pageSize, pagination, actions, className, }) {
|
|
11
12
|
const { t } = useTranslation();
|
|
@@ -14,9 +15,9 @@ export default function Toolbar({ count, search, segment, filters, pageSize, pag
|
|
|
14
15
|
_jsxs("p", { className: "toolbar__count body-1", role: "status", "aria-atomic": "true", children: [count.prefix ?? t('common.totalPrefix', '총 '), _jsx("span", { className: "toolbar__count-highlight", children: count.value }), count.unit, count.suffix] }));
|
|
15
16
|
// 좌측 그룹: count → segment. 우측 그룹: search → filters(정렬 등) → pageSize → pagination → actions
|
|
16
17
|
const hasRight = !!(search || filters?.length || pageSize || pagination || actions);
|
|
17
|
-
return (_jsxs("div", { className: cx('toolbar', className), children: [_jsxs("div", { className: "toolbar__row", children: [countNode, segment && (Array.isArray(segment) ? segment : [segment]).map((seg, i) => (_jsx(SegmentedControl, { size:
|
|
18
|
+
return (_jsxs("div", { className: cx('toolbar', className), children: [_jsxs("div", { className: "toolbar__row", children: [countNode, segment && (Array.isArray(segment) ? segment : [segment]).map((seg, i) => (_jsx(SegmentedControl, { size: CONTROL_SIZE, ...seg }, seg.ariaLabel ?? i)))] }), hasRight && (_jsx("div", { className: "toolbar__row", children: _jsxs("div", { className: "toolbar__row-end", children: [search && (_jsx(TextField, { className: "toolbar__search", size: CONTROL_SIZE, value: search.value, onChange: search.onChange, placeholder: search.placeholder ?? t('common.search', '검색'),
|
|
18
19
|
/* placeholder는 접근 가능한 이름이 아니다 — 입력이 시작되면 사라지고
|
|
19
20
|
화면낭독기 지원도 제각각이라, 같은 문구를 aria-label로도 준다.
|
|
20
21
|
(툴바 검색은 시각적 라벨이 따로 없는 자리라 이게 유일한 이름이 된다.) */
|
|
21
|
-
ariaLabel: search.placeholder ?? t('common.search', '검색'), autoFocus: search.autoFocus, clearable: true })), filters?.map((f, i) => (_jsx(Dropdown, { size:
|
|
22
|
+
ariaLabel: search.placeholder ?? t('common.search', '검색'), autoFocus: search.autoFocus, clearable: true })), filters?.map((f, i) => (_jsx(Dropdown, { size: CONTROL_SIZE, options: f.options, value: f.value, onChange: f.onChange, ariaLabel: f.ariaLabel }, i))), (pageSize || pagination) && (_jsxs("div", { className: "toolbar__pager", children: [pageSize && _jsx(Dropdown, { size: CONTROL_SIZE, options: pageSize.options, value: pageSize.value, onChange: pageSize.onChange, ariaLabel: pageSize.ariaLabel ?? t('common.pageSizeSelect', '페이지당 표시 개수') }), pagination && (_jsx(Pagination, { page: pagination.page, totalPages: pagination.total, onChange: pagination.onChange, prevLabel: pagination.prevLabel, nextLabel: pagination.nextLabel }))] })), actions] }) }))] }));
|
|
22
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './WordTableBlock.css';
|
|
2
2
|
import type { WordTableBlockProps } from './wordTableBlockTypes';
|
|
3
3
|
export type { WordEntry, WordTableBlockProps } from './wordTableBlockTypes';
|
|
4
|
-
export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }: WordTableBlockProps): import("react").JSX.Element;
|
|
4
|
+
export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }: WordTableBlockProps): import("react").JSX.Element;
|
|
@@ -44,7 +44,7 @@ function withUniqueIds(list) {
|
|
|
44
44
|
return id === it.id ? it : { ...it, id };
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }) {
|
|
47
|
+
export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }) {
|
|
48
48
|
const { t } = useTranslation();
|
|
49
49
|
const resolvedResetLabel = resetLabel ?? t('wordPrint.clearAllSelection', '모두 선택 해제');
|
|
50
50
|
const isEditable = items === undefined;
|
|
@@ -381,7 +381,7 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
|
|
|
381
381
|
}), !hideControls && (_jsx(TableFilterPanel, { title: filterTitle, collapsible: filterCollapsible, defaultCollapsed: filterDefaultCollapsed, collapsed: filterCollapsed, onCollapsedChange: onFilterCollapsedChange, headerSummary: filterHeaderSummary, hasImage: hasImage, hasColloquial: hasColloquial, hasCaption: hasCaption, contentTypes: contentTypes, orientation: orientation, showOutline: showOutline, cutLine: cutLine, showDivLine: showDivLine, setters: { setContentTypes, setOrientation, setShowOutline, setCutLine, setShowDivLine, setShowTopInfo, setShowBottomInfo }, showCutLine: (pagesEnabled ? itemsPerPage : count) > 1, showDivLine2: hasPairs, middleSections: middleSections, extraSelected: middleSelected, onExtraSelect: handleMiddleSelect, showPaperBands: showBand, showTopInfo: showTopInfo, showBottomInfo: showBottomInfo })), isPaginated && pages ? (_jsx("div", { className: "word-table-block__pages", children: pages.map((page, i) => (_jsx(WordTable, { orientation: orientation, contentTypes: contentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: itemsPerPage, items: page,
|
|
382
382
|
/* 쪽마다 머리 칸이 선다 — 한 장만 들고 보는 종이에 머리 낱말이 없으면
|
|
383
383
|
나머지 칸이 무엇의 활용인지 알 수 없다 */
|
|
384
|
-
baseItem: baseItem, baseContentTypes: baseContentTypes, onRemoveItem: onRemoveItem, onCopyItem: onCopyItem,
|
|
384
|
+
baseItem: baseItem, baseContentTypes: baseContentTypes, onRemoveItem: onRemoveItem, onCopyItem: onCopyItem, onReplaceItem: onReplaceItem,
|
|
385
385
|
/* 쪽이 나뉘면 끌어 옮기기가 통째로 꺼졌다(말귀 단어 찾기: 9개부터). 쪽 안의 자리를 전체 자리로 옮겨 넘긴다 —
|
|
386
386
|
쪽을 넘는 이동은 하지 않는다. */
|
|
387
387
|
onReorder: onReorder && ((from, to) => onReorder(from + i * itemsPerPage, to + i * itemsPerPage)),
|
|
@@ -399,8 +399,8 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
|
|
|
399
399
|
/* 칸 크기가 쪽마다 같아야 해서 `count` 는 모든 쪽이 '페이지당 개수' 다 —
|
|
400
400
|
채울 자리는 마지막 쪽에서 모자랄 수 있으니 그것만 따로 센다. */
|
|
401
401
|
addableCount: Math.max(0, Math.min(itemsPerPage, capacity - i * itemsPerPage)), brand: band, code: code, contentRef: el => { pageRefs.current[i] = el; }, pageNumber: { current: i + 1, total: pages.length }, pageNumberPosition: pageNumberPosition }, i))) })) : (_jsx(WordTable, { orientation: orientation, contentTypes: contentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: count, items: isEditable ? undefined : (items ?? []), baseItem: isEditable ? undefined : baseItem, baseContentTypes: baseContentTypes, editCells: isEditable ? visibleCells : undefined, activeCell: activeCell, onActivateCell: (isEditable || onAddItem) ? setActiveCell : undefined, onRemoveCell: isEditable ? handleRemove : undefined, onRemoveItem: !isEditable ? onRemoveItem : undefined,
|
|
402
|
-
/* 편집 격자에는 '한 칸 더' 가 뜻이 없다 — 거기선 칸을 손으로 채운다 */
|
|
403
|
-
onCopyItem: !isEditable ? onCopyItem : undefined, onReorder: !isEditable ? onReorder : undefined,
|
|
402
|
+
/* 편집 격자에는 '한 칸 더'·'다른 단어로' 가 뜻이 없다 — 거기선 칸을 손으로 채운다 */
|
|
403
|
+
onCopyItem: !isEditable ? onCopyItem : undefined, onReplaceItem: !isEditable ? onReplaceItem : undefined, onReorder: !isEditable ? onReorder : undefined,
|
|
404
404
|
/* 편집 모드에는 얹을 항목이 없다 — 칸을 손으로 채우는 꼴이다 */
|
|
405
405
|
renderCellAction: !isEditable ? renderCellAction : undefined, brand: band, code: code, showFillerAdd: !!onAddItem, contentRef: contentRef })), !hideControls && !saveOnly && actionsLeftExtra != null && (_jsx("div", { className: "word-table-block__table-actions", children: actionsLeftExtra })), inlineNameFields && !hideControls && (_jsxs(Panel, { size: "medium", labelWidth: 64, useBorder: false, useRowBorder: false, className: "word-table-block__meta", children: [_jsx(PanelRow, { variant: "custom", label: t('wordTable.save.nameLabel', '이름'), required: true, align: "vertical", useFullWidth: true, children: _jsx(TextField, { required: true, value: nameValue ?? '', onChange: onNameChange, placeholder: namePlaceholder ? namePlaceholder + t('wordTable.save.autoFillHint', ' (Tab 또는 space 입력시 자동 입력)') : t('wordTable.save.placeholder', '이 단어표에 대한 제목을 입력하세요.'),
|
|
406
406
|
/* PanelRow의 라벨은 시각적으로만 붙어 있고 입력과 연결돼 있지 않아, 낭독기에는
|
|
@@ -118,6 +118,8 @@ export interface WordTableBlockProps {
|
|
|
118
118
|
onRemoveItem?: (id: string) => void;
|
|
119
119
|
/** 주면 칸에 **복사 단추**가 선다 — 그 낱말을 한 칸 더 만든다. 꼴은 코어가 빼기·옮기기와 같게 짓는다. */
|
|
120
120
|
onCopyItem?: (id: string, index: number) => void;
|
|
121
|
+
/** 주면 칸에 **바꾸기 단추**가 선다 — 그 칸을 다른 낱말로. 꼴은 코어가 빼기·한 칸 더와 같게 짓는다(청 (353)). */
|
|
122
|
+
onReplaceItem?: (id: string, index: number) => void;
|
|
121
123
|
/** 전달하면 액션 영역 왼쪽에 초기화 버튼 표시 */
|
|
122
124
|
onReset?: () => void;
|
|
123
125
|
resetLabel?: string;
|
|
@@ -59,6 +59,24 @@ export interface WordTableProps {
|
|
|
59
59
|
* 여기서 그리면 빼기·옮기기와 **같은 꼴로 지어진다** — 맞출 것이 없다.
|
|
60
60
|
*/
|
|
61
61
|
onCopyItem?: (id: string, index: number) => void;
|
|
62
|
+
/**
|
|
63
|
+
* 그 칸을 **다른 낱말로** 바꾼다 — 주면 칸의 오른쪽 기둥에 바꾸기 단추가 선다
|
|
64
|
+
* (말귀 청 (353), 2026-10-29).
|
|
65
|
+
*
|
|
66
|
+
* **`onCopyItem` 과 같은 까닭으로 코어가 그린다.** 이 자리는 `renderCellAction` 으로
|
|
67
|
+
* 부르는 쪽이 얹던 곳인데, 꼴을 다시 적어야 해서 **안 적은 쪽만 테두리가 생겼다**
|
|
68
|
+
* (`useBorder` 기본이 `true` 다). 사장님이 **같은 것을 두 번** 이르셨다 —
|
|
69
|
+
* 2026-09-27 *"다른 단어로 버튼만 다르네? 베리언트 동일하게"* · 2026-10-29
|
|
70
|
+
* *"다른 단어로 버튼과 복사버튼이 스타일이 다르네?"*. 두 번 어긋났다는 것은
|
|
71
|
+
* **적어 두는 것으로는 안 맞는다**는 뜻이라 그릴 자리를 코어로 옮긴다.
|
|
72
|
+
*
|
|
73
|
+
* 떠 있는 말은 **칸에 든 낱말 수**가 가른다 — 하나면 '다른 단어로', 대립쌍이면 '다른 쌍으로'.
|
|
74
|
+
* 빼기가 '단어 빼기'·'대립쌍 빼기' 로 갈리는 것과 **같은 자**다. 앱은 이것을 *화면*
|
|
75
|
+
* (단어표냐 대립쌍표냐)으로 갈라 왔는데 코어는 화면을 모르고, 두 자는 늘 같은 답을 낸다
|
|
76
|
+
* (대립쌍표 칸은 낱말이 둘, 단어표·활용표 칸은 하나다). 갈리는 칸이 생긴다면 그때는
|
|
77
|
+
* **빼기도 함께 틀리는 것**이라, 한 자에 묶어 두는 편이 낫다.
|
|
78
|
+
*/
|
|
79
|
+
onReplaceItem?: (id: string, index: number) => void;
|
|
62
80
|
onReorder?: (fromIndex: number, toIndex: number) => void;
|
|
63
81
|
/**
|
|
64
82
|
* 이 표의 첫 칸이 **전체 목록에서 몇 번째**인가 — 쪽으로 나뉜 표에서 `WordTableBlock` 이 준다
|
|
@@ -237,4 +255,4 @@ export interface WordTableProps {
|
|
|
237
255
|
* 표시(items)·편집(editCells) 두 모드를 지원한다.
|
|
238
256
|
* @public
|
|
239
257
|
*/
|
|
240
|
-
export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
|
|
258
|
+
export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
|
|
@@ -304,7 +304,7 @@ function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge
|
|
|
304
304
|
* 표시(items)·편집(editCells) 두 모드를 지원한다.
|
|
305
305
|
* @public
|
|
306
306
|
*/
|
|
307
|
-
export default function WordTable({ title, titleIcon, disc, className, orientation = 'landscape', contentTypes = ['image', 'word', 'standardPron'], baseItem, baseContentTypes, cutLine = 'show', showOutline = true, showDivLine = true, items, editCells, count, activeCell = null, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
|
|
307
|
+
export default function WordTable({ title, titleIcon, disc, className, orientation = 'landscape', contentTypes = ['image', 'word', 'standardPron'], baseItem, baseContentTypes, cutLine = 'show', showOutline = true, showDivLine = true, items, editCells, count, activeCell = null, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
|
|
308
308
|
const clickMark = useCallback((cellIndex, clicked) => {
|
|
309
309
|
onMarkClick?.(scoreIndexOffset + cellIndex, clicked);
|
|
310
310
|
}, [onMarkClick, scoreIndexOffset]);
|
|
@@ -680,7 +680,7 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
|
|
|
680
680
|
...dotDashStyle(0, orientation === 'landscape' ? 2 : 1, orientation === 'landscape' ? 1 : 2, cutLine),
|
|
681
681
|
}, children: (baseItem.words ?? []).map((w, wi) => (_jsxs(Fragment, { children: [wi > 0 && _jsx("div", { className: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: baseShow.word, showImage: baseShow.image, showPronunciation: baseShow.pron, showColloquial: baseShow.colloq, showCaption: baseShow.caption, buttonSize: buttonSize, wordInfo: (w.grade || w.syllables != null || w.pos || w.wordType) ? { grade: w.grade, syllables: w.syllables, pos: w.pos, wordType: w.wordType } : undefined })] }, wi))) })), (items ?? []).map((item, index) => (_jsxs("div", { "data-wordtable-cell": onReorder ? index : undefined, "data-wordtable-index": onReorder ? indexOffset + index : undefined, className: withLegacy(`word-table__card${onReorder ? ' word-table__card--draggable' : ''}${dragOver === index ? ' word-table__card--drag-over' : ''}${dragging === index ? ' word-table__card--dragging' : ''}`), style: dotDashStyle(index, itemCols, itemRows, cutLine), draggable: !!onReorder, onPointerDown: onReorder ? (e) => longPressDrag(e, index) : undefined, onKeyDown: onReorder ? (e) => moveByKey(e, index) : undefined, onDragStart: onReorder ? () => { dragIndex.current = index; } : undefined, onDragOver: onReorder ? (e) => { e.preventDefault(); setDragOver(index); } : undefined, onDragLeave: onReorder ? () => setDragOver(null) : undefined, onDrop: onReorder ? (e) => { e.preventDefault(); if (dragIndex.current !== null && dragIndex.current !== index) {
|
|
682
682
|
onReorder(dragIndex.current, index);
|
|
683
|
-
} ; dragIndex.current = null; setDragOver(null); } : undefined, onDragEnd: onReorder ? () => { dragIndex.current = null; setDragOver(null); } : undefined, children: [(item.words ?? []).map((w, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx("div", { className: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, showCaption: show.caption, buttonSize: buttonSize, wordInfo: (w.grade || w.syllables != null || w.pos || w.wordType) ? { grade: w.grade, syllables: w.syllables, pos: w.pos, wordType: w.wordType } : undefined })] }, i))), scoring && renderScore(index, (item.words ?? []).map(w => w.label).join(' / ')), (renderCellAction || onRemoveItem || onCopyItem || onReorder) && (
|
|
683
|
+
} ; dragIndex.current = null; setDragOver(null); } : undefined, onDragEnd: onReorder ? () => { dragIndex.current = null; setDragOver(null); } : undefined, children: [(item.words ?? []).map((w, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx("div", { className: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, showCaption: show.caption, buttonSize: buttonSize, wordInfo: (w.grade || w.syllables != null || w.pos || w.wordType) ? { grade: w.grade, syllables: w.syllables, pos: w.pos, wordType: w.wordType } : undefined })] }, i))), scoring && renderScore(index, (item.words ?? []).map(w => w.label).join(' / ')), (renderCellAction || onRemoveItem || onCopyItem || onReplaceItem || onReorder) && (
|
|
684
684
|
/* **오른쪽 기둥** — 빼기 → 부르는 쪽이 얹은 것 → 옮기기 손잡이 차례로 쌓인다
|
|
685
685
|
(말귀 청 (331), 2026-10-28). 전에는 빼기와 얹은 것만 **한 줄**로 서고
|
|
686
686
|
손잡이는 왼쪽 위에 따로 섰다 — 재생 단추와 **같은 자리라 겹쳤다.**
|
|
@@ -698,7 +698,21 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
|
|
|
698
698
|
_jsx("div", { className: withLegacy("word-table__card-copy"), children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "copy", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: t('wordTable.copyItem', '한 칸 더'), ariaLabel: t('wordTable.copyItemAria', {
|
|
699
699
|
n: indexOffset + index + 1,
|
|
700
700
|
defaultValue: '{{n}}번 칸 낱말을 한 칸 더',
|
|
701
|
-
}), onClick: () => onCopyItem(item.id, indexOffset + index) }) })),
|
|
701
|
+
}), onClick: () => onCopyItem(item.id, indexOffset + index) }) })), onReplaceItem && (
|
|
702
|
+
/* **'한 칸 더' 바로 아래** — 지금까지 `renderCellAction` 이 서던 자리라
|
|
703
|
+
화면 차례가 안 바뀐다. 꼴은 위아래 이웃과 **한 글자도 안 다르다**
|
|
704
|
+
(`type="dot"` · `transparent-lightGray` · `useBorder={false}`). */
|
|
705
|
+
_jsx("div", { className: withLegacy("word-table__card-replace"), children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "refresh-cw", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: (item.words ?? []).length > 1
|
|
706
|
+
? t('wordTable.replacePair', '다른 쌍으로')
|
|
707
|
+
: t('wordTable.replaceItem', '다른 단어로'), ariaLabel: (item.words ?? []).length > 1
|
|
708
|
+
? t('wordTable.replacePairAria', {
|
|
709
|
+
n: indexOffset + index + 1,
|
|
710
|
+
defaultValue: '{{n}}번 칸만 다른 쌍으로',
|
|
711
|
+
})
|
|
712
|
+
: t('wordTable.replaceItemAria', {
|
|
713
|
+
n: indexOffset + index + 1,
|
|
714
|
+
defaultValue: '{{n}}번 칸만 다른 단어로',
|
|
715
|
+
}), onClick: () => onReplaceItem(item.id, indexOffset + index) }) })), renderCellAction?.(index, item), onReorder && (
|
|
702
716
|
/* **옮기기 손잡이.** 키보드로 순서를 바꾸려면 초점이 갈 자리가 있어야 하는데,
|
|
703
717
|
칸 자체를 초점 대상으로 만들면 칸마다 뜻 없는 탭 정지점이 하나씩 늘고
|
|
704
718
|
낭독기는 그것이 무엇인지 말할 수 없다. 이름 붙은 진짜 단추를 둔다 —
|
|
@@ -154,8 +154,14 @@ export interface BarChartProps {
|
|
|
154
154
|
* (말귀 실측: 같은 자료가 dayMean 54% · weighted 80% = 229/286문항.)
|
|
155
155
|
*/
|
|
156
156
|
rateAgg?: 'dayMean' | 'weighted';
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
157
|
+
/**
|
|
158
|
+
* '상세보기' 단추 크기 — **기본 40**(사장님 지시 2026-10-29: *"header 에 있는 요소들도
|
|
159
|
+
* 동일하게"*).
|
|
160
|
+
*
|
|
161
|
+
* 전에는 기본이 32 였고, 머리 줄에 큰 것을 얹은 카드만 40 을 주라고 적어 두었다. 그
|
|
162
|
+
* *"그 카드만"* 이 이 프롭이 생긴 까닭인데, 머리에 선 것이 모두 40 이 되면서 맞출 것이
|
|
163
|
+
* 없어졌다. 일부러 작게 쓰려는 자리만 32 를 준다.
|
|
164
|
+
*/
|
|
159
165
|
detailSize?: 32 | 40;
|
|
160
166
|
/** 머리 오른쪽 묶음에서 기간 컨트롤과 '상세보기' **사이** 에 놓을 것 — 앱이 카드 머리에 얹는 작은 조작(예: 시간/정답률 SegmentedControl size 32).
|
|
161
167
|
* size='small' 에서도 이것만은 그린다(기간 컨트롤은 그대로 숨김). */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **줄과 머리에 서는 요소는 모두 이 크기다 — 40**
|
|
3
|
+
* (사장님 지시 2026-10-29: *"panel row, table row 에 있는 botton textfield, datepicker
|
|
4
|
+
* dropdown 등 요소의 size prop을 =40 으로 통일하자"* · 뒤이어 *"header 에 있는 요소들도
|
|
5
|
+
* 동일하게"*).
|
|
6
|
+
*
|
|
7
|
+
* ## 왜 수를 한 곳에 두나
|
|
8
|
+
*
|
|
9
|
+
* 요소마다 기본값이 다르다 — 단추 48 · 드롭다운 48 · 날짜 48 · 글상자 40 · 고르개 40.
|
|
10
|
+
* 그래서 줄·머리를 짓는 자리마다 **손으로 40 을 적어** 막아 왔는데, 적는 자리가 늘수록
|
|
11
|
+
* 하나씩 빠진다. 실제로 그렇게 빠졌다 —
|
|
12
|
+
*
|
|
13
|
+
* - `PanelRow` 의 드롭다운(2026-10-29 실측): 같은 줄의 단추·글상자·고르개는 40 인데
|
|
14
|
+
* 드롭다운 다섯만 **48** 로 섰다. 넷은 적었고 하나는 안 적었다.
|
|
15
|
+
* - `SegmentedControl` 은 2026-09-21 에 기본값을 48 → 40 으로 내렸는데, 그때 적은 머리말이
|
|
16
|
+
* *"코어가 제 안에서 세우는 고르개는 이미 전부 40 이고 옆에 서는 Dropdown·TextField 도
|
|
17
|
+
* 40 인데 기본값만 혼자 48"* 이다 — 같은 흠을 그 자리에서도 겪었다는 뜻이다.
|
|
18
|
+
*
|
|
19
|
+
* **글로 적어 두는 것으로는 안 맞는다.** 수를 한 곳에 두고 가져다 쓰면 빠질 자리가 없고,
|
|
20
|
+
* `controlSize1029` 시험이 **손으로 적은 수를 센다**.
|
|
21
|
+
*
|
|
22
|
+
* ## 여기에 안 드는 것
|
|
23
|
+
*
|
|
24
|
+
* 줄·머리가 아닌 자리는 제 크기를 갖는다 — 쪽 넘김(`Pagination` 32) · 팝업 바닥 단추(56) ·
|
|
25
|
+
* 제목 옆 뒤로 화살표(`PageTitle` 48, 글자 없이 서는 과녁이라 일부러 크다) · 단어표 칸 안의
|
|
26
|
+
* 단추(표 배율을 함께 받는다). 부르는 쪽이 `actions`·`headerActions` 로 **직접 얹는** 것도
|
|
27
|
+
* 코어가 쥐지 못한다 — 그쪽은 부르는 쪽이 40 으로 적는다.
|
|
28
|
+
*/
|
|
29
|
+
export declare const CONTROL_SIZE = 40;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **줄과 머리에 서는 요소는 모두 이 크기다 — 40**
|
|
3
|
+
* (사장님 지시 2026-10-29: *"panel row, table row 에 있는 botton textfield, datepicker
|
|
4
|
+
* dropdown 등 요소의 size prop을 =40 으로 통일하자"* · 뒤이어 *"header 에 있는 요소들도
|
|
5
|
+
* 동일하게"*).
|
|
6
|
+
*
|
|
7
|
+
* ## 왜 수를 한 곳에 두나
|
|
8
|
+
*
|
|
9
|
+
* 요소마다 기본값이 다르다 — 단추 48 · 드롭다운 48 · 날짜 48 · 글상자 40 · 고르개 40.
|
|
10
|
+
* 그래서 줄·머리를 짓는 자리마다 **손으로 40 을 적어** 막아 왔는데, 적는 자리가 늘수록
|
|
11
|
+
* 하나씩 빠진다. 실제로 그렇게 빠졌다 —
|
|
12
|
+
*
|
|
13
|
+
* - `PanelRow` 의 드롭다운(2026-10-29 실측): 같은 줄의 단추·글상자·고르개는 40 인데
|
|
14
|
+
* 드롭다운 다섯만 **48** 로 섰다. 넷은 적었고 하나는 안 적었다.
|
|
15
|
+
* - `SegmentedControl` 은 2026-09-21 에 기본값을 48 → 40 으로 내렸는데, 그때 적은 머리말이
|
|
16
|
+
* *"코어가 제 안에서 세우는 고르개는 이미 전부 40 이고 옆에 서는 Dropdown·TextField 도
|
|
17
|
+
* 40 인데 기본값만 혼자 48"* 이다 — 같은 흠을 그 자리에서도 겪었다는 뜻이다.
|
|
18
|
+
*
|
|
19
|
+
* **글로 적어 두는 것으로는 안 맞는다.** 수를 한 곳에 두고 가져다 쓰면 빠질 자리가 없고,
|
|
20
|
+
* `controlSize1029` 시험이 **손으로 적은 수를 센다**.
|
|
21
|
+
*
|
|
22
|
+
* ## 여기에 안 드는 것
|
|
23
|
+
*
|
|
24
|
+
* 줄·머리가 아닌 자리는 제 크기를 갖는다 — 쪽 넘김(`Pagination` 32) · 팝업 바닥 단추(56) ·
|
|
25
|
+
* 제목 옆 뒤로 화살표(`PageTitle` 48, 글자 없이 서는 과녁이라 일부러 크다) · 단어표 칸 안의
|
|
26
|
+
* 단추(표 배율을 함께 받는다). 부르는 쪽이 `actions`·`headerActions` 로 **직접 얹는** 것도
|
|
27
|
+
* 코어가 쥐지 못한다 — 그쪽은 부르는 쪽이 40 으로 적는다.
|
|
28
|
+
*/
|
|
29
|
+
export const CONTROL_SIZE = 40;
|
|
@@ -685,7 +685,11 @@
|
|
|
685
685
|
"handle": "Reorder {{word}} (Alt + arrow keys)",
|
|
686
686
|
"hint": "Alt + ← → to reorder"
|
|
687
687
|
},
|
|
688
|
-
"thumbMore": "+{{count}}"
|
|
688
|
+
"thumbMore": "+{{count}}",
|
|
689
|
+
"replaceItem": "Other words",
|
|
690
|
+
"replacePair": "Other pairs",
|
|
691
|
+
"replaceItemAria": "Swap cell {{n}} only",
|
|
692
|
+
"replacePairAria": "Swap pair {{n}} only"
|
|
689
693
|
},
|
|
690
694
|
"wordSearch": {
|
|
691
695
|
"filterTitle": "Word Search Settings",
|
|
@@ -672,7 +672,11 @@
|
|
|
672
672
|
"handle": "{{word}} 순서 바꾸기 (Alt + 화살표)",
|
|
673
673
|
"hint": "Alt + ← → 로 순서 바꾸기"
|
|
674
674
|
},
|
|
675
|
-
"thumbMore": "+{{count}}"
|
|
675
|
+
"thumbMore": "+{{count}}",
|
|
676
|
+
"replaceItem": "다른 단어로",
|
|
677
|
+
"replacePair": "다른 쌍으로",
|
|
678
|
+
"replaceItemAria": "{{n}}번 칸만 다른 단어로",
|
|
679
|
+
"replacePairAria": "{{n}}번 칸만 다른 쌍으로"
|
|
676
680
|
},
|
|
677
681
|
"wordSearch": {
|
|
678
682
|
"filterTitle": "단어 검색 설정",
|