@ihabdevteam/core 0.412.0 → 0.414.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 (65) hide show
  1. package/CHANGELOG.md +663 -0
  2. package/dist/components.cjs.js +178 -177
  3. package/dist/components.esm.css +2 -2
  4. package/dist/hooks.cjs.js +5 -5
  5. package/dist/i18n.cjs.js +3 -3
  6. package/dist/ihabdevteam-core.cjs.js +184 -183
  7. package/dist/ihabdevteam-core.d.ts +306 -19
  8. package/dist/packages/core/src/components/Accordion.css +16 -0
  9. package/dist/packages/core/src/components/BarChart.css +16 -8
  10. package/dist/packages/core/src/components/BarChart.d.ts +1 -1
  11. package/dist/packages/core/src/components/BarChart.js +13 -11
  12. package/dist/packages/core/src/components/BulkBar.js +2 -1
  13. package/dist/packages/core/src/components/ChartSection.css +193 -25
  14. package/dist/packages/core/src/components/ChartSection.d.ts +94 -2
  15. package/dist/packages/core/src/components/ChartSection.js +92 -7
  16. package/dist/packages/core/src/components/ColorPicker.d.ts +2 -1
  17. package/dist/packages/core/src/components/ColorPicker.js +2 -1
  18. package/dist/packages/core/src/components/DatePicker.css +5 -0
  19. package/dist/packages/core/src/components/DatePicker.d.ts +2 -1
  20. package/dist/packages/core/src/components/DatePicker.js +1 -1
  21. package/dist/packages/core/src/components/Dropdown.css +6 -0
  22. package/dist/packages/core/src/components/Dropdown.d.ts +2 -1
  23. package/dist/packages/core/src/components/FilterPanel.js +17 -3
  24. package/dist/packages/core/src/components/Header.js +4 -4
  25. package/dist/packages/core/src/components/Panel.css +53 -6
  26. package/dist/packages/core/src/components/RingChart.js +10 -6
  27. package/dist/packages/core/src/components/SegmentedControl.css +6 -1
  28. package/dist/packages/core/src/components/SegmentedControl.d.ts +5 -1
  29. package/dist/packages/core/src/components/SegmentedControl.js +2 -1
  30. package/dist/packages/core/src/components/SideNav.js +1 -1
  31. package/dist/packages/core/src/components/StatChart.d.ts +22 -11
  32. package/dist/packages/core/src/components/StatChart.js +17 -37
  33. package/dist/packages/core/src/components/SummaryStrip.d.ts +1 -1
  34. package/dist/packages/core/src/components/SummaryStrip.js +1 -1
  35. package/dist/packages/core/src/components/Table.d.ts +36 -1
  36. package/dist/packages/core/src/components/Table.js +127 -15
  37. package/dist/packages/core/src/components/Tabs.d.ts +2 -1
  38. package/dist/packages/core/src/components/Tabs.js +2 -1
  39. package/dist/packages/core/src/components/TextField.css +20 -1
  40. package/dist/packages/core/src/components/TextField.d.ts +7 -1
  41. package/dist/packages/core/src/components/TextField.js +2 -1
  42. package/dist/packages/core/src/components/Training/TrainingCardGroup.css +22 -3
  43. package/dist/packages/core/src/components/Word/WordSearchResultBlock.js +2 -1
  44. package/dist/packages/core/src/components/Word/WordTableBlock.js +27 -7
  45. package/dist/packages/core/src/components/WordTable.js +25 -1
  46. package/dist/packages/core/src/components/barChartTypes.d.ts +12 -0
  47. package/dist/packages/core/src/components/controlSize.d.ts +87 -1
  48. package/dist/packages/core/src/components/controlSize.js +87 -1
  49. package/dist/packages/core/src/components/tableFitWidths.d.ts +19 -0
  50. package/dist/packages/core/src/components/tableFitWidths.js +26 -0
  51. package/dist/packages/core/src/components/useBarChartControl.js +27 -7
  52. package/dist/packages/core/src/components.d.ts +3 -3
  53. package/dist/packages/core/src/components.js +1 -1
  54. package/dist/packages/core/src/i18n/locales/en.json +1 -0
  55. package/dist/packages/core/src/i18n/locales/ko.json +1 -0
  56. package/dist/packages/core/src/utils/imageCompression.d.ts +109 -0
  57. package/dist/packages/core/src/utils/imageCompression.js +163 -0
  58. package/dist/packages/core/src/utils/legacyBlocks.js +5 -1
  59. package/dist/packages/core/src/utils.d.ts +1 -0
  60. package/dist/packages/core/src/utils.js +3 -0
  61. package/dist/packages/core/src/version.d.ts +1 -1
  62. package/dist/packages/core/src/version.js +1 -1
  63. package/dist/utils.cjs.js +164 -164
  64. package/package.json +1 -1
  65. package/dist/packages/core/src/components/StatChart.css +0 -93
@@ -12,12 +12,31 @@ 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
+ import { CHART_HEAD_SIZE } from './controlSize';
16
16
  import { withLegacy } from '../utils/legacyBlocks';
17
17
  /** 차트 범례 — 색상 점 + 라벨 목록. BarChart/RingChart 섹션이 공유. @public */
18
18
  export function ChartLegend({ items, className }) {
19
19
  return (_jsx("div", { className: withLegacy(className ? `chart-section__legend ${className}` : 'chart-section__legend'), children: items.map((it, i) => (_jsxs("span", { className: withLegacy("chart-section__legend-item"), children: [_jsx("span", { className: withLegacy("chart-section__legend-dot"), style: { background: it.color } }), it.label] }, i))) }));
20
20
  }
21
+ /**
22
+ * **카드가 보이는 큰 수의 글자 단계** — 작은 카드(`size="small"` · `type="stat"` 과 한 줄에
23
+ * 서는 것)는 수 칸의 값과 같은 `h1`(32px · 700), 그 밖은 `h0`(40px).
24
+ *
25
+ * `h1` 은 **원래 모습으로 돌아간 것**이다(사장님 지시 2026-11-02 "h1으로"). 2026-11-02
26
+ * 아침까지 수 칸의 값은 `32px · 700 · 자간 -0.5` 를 CSS 에 박고 있었는데 — 그것이 바로
27
+ * `h1` 토큰이다(줄높이만 1 이었다). 그날 낮에 `h2`(24·500) 로 내려 봤다가 되돌렸다.
28
+ *
29
+ * 네 자리(`ChartSection` · `BarChart` 셋 · `RingChart`)가 저마다 `h0` 를 적고 있었다.
30
+ *
31
+ * **`h0`(40px)는 가로를 통째로 쓰는 카드 하나뿐이다**(2026-11-02 — 사장님이 고리 카드의
32
+ * `56`(h1)과 차트 카드의 `0`(h0)을 나란히 놓고 "같은 거 맞아?" 하셨다. 아니었다).
33
+ * 격자에 서는 카드는 크기가 달라도 **수의 단계는 같아야** 한 줄로 읽힌다.
34
+ * 작은 카드만 CSS 로 크기를 덮어 맞췄는데, 그러면 **마크업에 적힌 단계가 아무 일도 안
35
+ * 한다** — 글자를 고쳐도 화면이 안 바뀐다(사장님이 2026-11-02 에 짚으셨다). 단계를 한
36
+ * 군데서 정하고, 부르는 쪽은 "작은 카드인가" 만 넘긴다.
37
+ * @public
38
+ */
39
+ export const chartTotalNumClass = (small) => `chart-section__total__num ${small ? 'h1' : 'h0'}`;
21
40
  /** 차트 총계 표시 — label이 있으면 라벨(윗줄)+값(아랫줄) stacked, 없으면 값만. @public */
22
41
  export function ChartTotal({ label, children }) {
23
42
  if (!label) {
@@ -25,13 +44,56 @@ export function ChartTotal({ label, children }) {
25
44
  }
26
45
  return (_jsxs("div", { className: withLegacy("chart-section__total chart-section__total--stacked"), children: [_jsx("span", { className: withLegacy("chart-section__total__label body-3"), children: label }), _jsx("span", { className: withLegacy("chart-section__total__value"), children: children })] }));
27
46
  }
47
+ /**
48
+ * 카드 사이의 틈 — `.chart-section` 의 아래 여백, 소비자 격자의 `gap` 과 같은 수다.
49
+ *
50
+ * **14 → 20**(사장님 지시 2026-11-02 — *"간격 20이 나아?"* · *"응"*). 14 는 집안 사다리
51
+ * (`--spacing-*`: 8 · 12 · 16 · 20 · 24) **밖의 수**였고, 20 은 `--spacing-l` 이면서
52
+ * 카드 안 여백(19 = 20 − 테두리 1)과도 같은 수다.
53
+ */
54
+ const CARD_GAP = 20;
55
+ /**
56
+ * `small` 의 키 — **사다리의 밑동**(사장님 지시 2026-11-02 — "small -> 260 * 120 으로 하자").
57
+ *
58
+ * 속이 내는 키는 109 다(여백 38 + 테두리 2 + 제목 줄 23 + 틈 2 + 큰 수 44). 120 은 그보다
59
+ * 11 넉넉하다 — 수 하나짜리 카드가 글자에 딱 붙지 않게 둔 자리다. `min-height` 라 속이
60
+ * 더 길면 늘어난다(잘리지 않는다).
61
+ */
62
+ const CARD_H_SMALL = 120;
63
+ /** 급 → 가장 낮은 키(px). 적힌 것만 키를 받는다 — 나머지는 속이 정한다 */
64
+ const CARD_MIN_HEIGHT = {
65
+ small: CARD_H_SMALL,
66
+ /** `small` 둘이 위아래로 쌓인 것과 **바닥이 한 선**이 되는 키 — 120×2 + 20 = 260 */
67
+ medium: CARD_H_SMALL * 2 + CARD_GAP,
68
+ /** 차트 카드도 **같은 칸**에 선다 — `medium` 보다 낮아지지 않는다(속이 더 길면 늘어난다) */
69
+ large: CARD_H_SMALL * 2 + CARD_GAP,
70
+ };
71
+ /** 급 → 껍데기에 붙는 꼴. `large` 는 밑바탕이라 붙일 것이 없다 */
72
+ const CARD_SIZE_CLASS = {
73
+ small: 'chart-section--compact',
74
+ medium: 'chart-section--compact',
75
+ xLarge: 'chart-section--full',
76
+ };
28
77
  /**
29
78
  * 차트 카드 공통 레이아웃 — 제목 헤더 + total/legend 서브로우 + 차트 본체.
30
79
  * BarChart와 RingChart 기반 섹션(숙제 진행현황 등)이 동일한 헤더/범례 디자인을
31
80
  * 공유하도록 두 컴포넌트가 내부적으로 사용한다.
32
81
  * @public
33
82
  */
34
- export default function ChartSection({ title, titleClassName = 'h3', titleLevel = 3, icon, disc, headRight, headFloat, headSegment, headMenuItems, collapseBelow = 420, onClick, ariaLabel, tooltip, totalNum, totalUnit, totalLabel, subRow, subRowAlign = 'start', className, inGrid = false, children }) {
83
+ export default function ChartSection({ type = 'chart', title, titleClassName, titleLevel, icon, disc, headRight, headFloat, headSegment, headMenuItems, collapseBelow = 420, onClick, ariaLabel, tooltip, totalNum, totalUnit, totalLabel, change, changeType, size, bodyAlign = 'bottom', subRow, subRowAlign = 'start', className, inGrid = false, children }) {
84
+ const isStat = type === 'stat';
85
+ /** 안 주면 갈래가 정한다 — 수 칸은 `small`, 차트 카드는 `large`(밑바탕) */
86
+ const cardSize = size ?? (isStat ? 'small' : 'large');
87
+ /* **작은 카드인가** — 글자 단계(아래 `totalRow`)와 꼴이 이것으로 갈린다.
88
+ 급에서 바로 읽는다. 2026-11-02 아침까지는 `className` 글자에서 `chart-section--compact`
89
+ 를 찾았는데, 그 이름을 붙이는 것은 `RingChart`·`BarChart` 뿐이라 **부르는 쪽이 클래스를
90
+ 적어야만 작은 카드가 되는** 꼴이었다. 급을 받으면 그 꼼수가 필요 없다. */
91
+ const isCompact = cardSize === 'small' || cardSize === 'medium';
92
+ /* 글자 꼴·머리글 급의 밑바탕이 갈래마다 다르다 — `stat` 의 제목은 작은 이름표(`h5`)이고
93
+ **머리글이 아니다**(급 0). 수 칸이 열 개 서는 화면에서 그것을 다 머리글로 올리면
94
+ 낭독기의 층이 수 칸으로 뒤덮인다. */
95
+ const resolvedTitleClass = titleClassName ?? 'h5';
96
+ const resolvedTitleLevel = titleLevel ?? (isStat ? 0 : 3);
35
97
  const { t } = useTranslation();
36
98
  const secRef = useRef(null);
37
99
  /* 설명 툴팁 — StatChart 와 같은 결(카드 사각형 기준, 포인터가 나가거나 초점이 빠지면 닫힘).
@@ -106,17 +168,40 @@ export default function ChartSection({ title, titleClassName = 'h3', titleLevel
106
168
  /* 제목(과 `disc`) 아래 수 — 차트 카드(BarChart·RingChart)가 쓰는 `ChartTotal` 그 꼴을 그대로 쓴다.
107
169
  같은 자리에 두 모양이 생기면 카드마다 눈금이 달라진다(설명 `disc` 를 머리 아래 한 줄로 모은 것과 같은 까닭).
108
170
  0.176.0 까지는 머리 오른쪽에 한 줄로 섰다 — 사용자가 차트 카드의 그 꼴로 정했다(2026-09-17). */
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;
171
+ const totalRow = (totalNum != null || totalLabel) ? (_jsxs(ChartTotal, { label: totalLabel, children: [totalNum != null && _jsx("span", { className: withLegacy(chartTotalNumClass(isCompact)), children: totalNum }), totalUnit && _jsx("span", { className: withLegacy("chart-section__total__unit body-3"), children: totalUnit })] })) : null;
110
172
  /* 머리 오른쪽에는 **고르개와 `headRight` 만** 남는다 — 고르개가 먼저, 상세보기 단추가 오른쪽 끝(사용자 지시 2026-09-17) */
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;
173
+ const headRightNode = (rightNode || headSegment) ? (_jsxs("div", { className: withLegacy("chart-section__head-right"), children: [headSegment && (collapsed ? (_jsx(Button, { htmlType: "button", size: CHART_HEAD_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: CHART_HEAD_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;
112
174
  const titleId = useId();
113
- const TitleTag = titleLevel ? `h${titleLevel}` : 'div';
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: {
175
+ const TitleTag = resolvedTitleLevel ? `h${resolvedTitleLevel}` : 'div';
176
+ /* ── `stat` 갈래 ──────────────────────────────────────────────
177
+ 제목 줄(이름표 + 오른쪽 아이콘) · 큰 수 · 값 아래 자리. 머리의 고르개·띄운 줄·
178
+ 서브로우는 안 쓴다 — 위의 훅들은 그 자리가 없으면 아무 일도 안 한다(`headSegment`
179
+ 가 없으면 재기도 안 돈다).
180
+
181
+ **이름도 `chart-section*` 한 벌로 모았다**(사장님 지시 2026-11-02 "하나로"). 겹치던
182
+ 넷(`--clickable` · 아이콘 둘 · 제목)은 글자까지 같았으므로 그대로 저쪽 것을 쓴다. */
183
+ const minHeight = typeof cardSize === 'number' ? cardSize : CARD_MIN_HEIGHT[cardSize];
184
+ const resolvedChangeType = changeType ?? (change === undefined ? undefined : change > 0 ? 'up' : change < 0 ? 'down' : 'neutral');
185
+ const changeText = change === undefined ? undefined : change > 0 ? `+${change}` : `${change}`;
186
+ const tooltipNode = tooltip && tipRect ? (_jsx(TooltipInfo, { anchorRect: {
187
+ left: tipRect.left,
188
+ top: tipRect.top + 21,
189
+ right: tipRect.right,
190
+ bottom: tipRect.bottom,
191
+ width: tipRect.width,
192
+ height: tipRect.height,
193
+ }, text: tooltip })) : null;
194
+ if (isStat) {
195
+ return (_jsxs("div", { ref: secRef, className: withLegacy(['chart-section', 'chart-section--stat', typeof cardSize === 'string' && CARD_SIZE_CLASS[cardSize], onClick && 'chart-section--clickable', className].filter(Boolean).join(' ')), style: minHeight === undefined ? undefined : { minHeight }, onClick: onClick ? onCardClick : undefined, onKeyDown: onClick ? onCardKeyDown : undefined, onPointerEnter: tooltip ? showTip : undefined, onPointerLeave: tooltip ? closeTip : undefined,
196
+ // hover 전용이면 키보드로는 툴팁 내용을 볼 수 없다
197
+ 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, totalNum, changeText].filter(v => v !== undefined && v !== null && v !== '').join(' ')) : undefined, "aria-labelledby": !onClick && title != null ? titleId : undefined, children: [tooltipNode, _jsxs("div", { className: withLegacy("chart-section__head"), children: [_jsx(TitleTag, { id: titleId, className: withLegacy(['chart-section__title', resolvedTitleClass].filter(Boolean).join(' ')), children: title }), icon && (_jsx("span", { className: withLegacy("chart-section__head-icon"), children: _jsx(Icon, { icon: icon, className: withLegacy("chart-section__head-icon-inner") }) }))] }), _jsxs("div", { className: withLegacy(['chart-section__content', bodyAlign === 'center' && 'chart-section__content--body-center'].filter(Boolean).join(' ')), children: [_jsxs("div", { className: withLegacy("chart-section__value-row"), children: [_jsx("div", { className: withLegacy("chart-section__value h1"), children: totalNum }), changeText && (_jsx("div", { className: withLegacy(`chart-section__change chart-section__change--${resolvedChangeType ?? 'neutral'} caption-1`), children: changeText }))] }), children && _jsx("div", { className: withLegacy("chart-section__body"), children: children })] })] }));
198
+ }
199
+ return (_jsxs("section", { ref: secRef, className: withLegacy(['chart-section', inGrid && 'chart-section--grid', typeof cardSize === 'string' && CARD_SIZE_CLASS[cardSize], onClick && 'chart-section--clickable', className].filter(Boolean).join(' ')), style: minHeight === undefined ? undefined : { minHeight }, 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: {
115
200
  left: tipRect.left,
116
201
  top: tipRect.top + 21,
117
202
  right: tipRect.right,
118
203
  bottom: tipRect.bottom,
119
204
  width: tipRect.width,
120
205
  height: tipRect.height,
121
- }, text: tooltip })), headFloat && _jsx(SectionHeadFloat, { children: headFloat }), _jsxs("div", { className: withLegacy("chart-section__head"), children: [_jsxs("div", { className: withLegacy("chart-section__title-row"), children: [icon && _jsx(Icon, { icon: icon, label: typeof title === 'string' ? title : undefined, className: withLegacy("chart-section__icon") }), _jsx(TitleTag, { id: titleId, className: withLegacy(['chart-section__title', titleClassName].filter(Boolean).join(' ')), children: title })] }), headRightNode, disc && _jsx("div", { className: withLegacy("chart-section__disc body-3"), children: disc })] }), (totalRow || subRow) && (_jsxs("div", { className: withLegacy(['chart-section__sub-row', subRowAlign !== 'start' && `chart-section__sub-row--${subRowAlign}`].filter(Boolean).join(' ')), children: [totalRow, subRow] })), children, menuRect && (_jsx(Tooltip, { anchorRect: menuRect, onClose: closeMenu, ariaLabel: headSegment?.ariaLabel ?? t('tooltip.menu', '메뉴'), children: _jsx(MenuTooltip, { columns: [{ items: menuItems }], onClose: closeMenu, size: "small" }) }))] }));
206
+ }, text: tooltip })), headFloat && _jsx(SectionHeadFloat, { children: headFloat }), _jsxs("div", { className: withLegacy("chart-section__head"), children: [_jsxs("div", { className: withLegacy("chart-section__title-row"), children: [icon && _jsx(Icon, { icon: icon, label: typeof title === 'string' ? title : undefined, className: withLegacy("chart-section__icon") }), _jsx(TitleTag, { id: titleId, className: withLegacy(['chart-section__title', resolvedTitleClass].filter(Boolean).join(' ')), children: title })] }), headRightNode, disc && _jsx("div", { className: withLegacy("chart-section__disc body-3"), children: disc })] }), (totalRow || subRow) && (_jsxs("div", { className: withLegacy(['chart-section__sub-row', subRowAlign !== 'start' && `chart-section__sub-row--${subRowAlign}`].filter(Boolean).join(' ')), children: [totalRow, subRow] })), children, menuRect && (_jsx(Tooltip, { anchorRect: menuRect, onClose: closeMenu, ariaLabel: headSegment?.ariaLabel ?? t('tooltip.menu', '메뉴'), children: _jsx(MenuTooltip, { columns: [{ items: menuItems }], onClose: closeMenu, size: "small" }) }))] }));
122
207
  }
@@ -9,7 +9,8 @@ export interface ColorPickerProps {
9
9
  onChange: (hex: string) => void;
10
10
  /** 선택 가능한 색상 팔레트. 기본값은 디자인 시스템 브랜드 색상 */
11
11
  palette?: string[];
12
- /** 스와치 크기 — Button과 동일한 체계 (32 / 40 / 48), radius도 Button rounded와 동일하게 맞춤 */
12
+ /** 스와치 크기 — Button과 동일한 체계 (32 / 40 / 48), radius도 Button rounded와 동일하게 맞춤.
13
+ * 안 주면 공용 수다(`CONTROL_SIZE` — 2026-11-02 부터 32. 전에는 40 이 박혀 있었다). */
13
14
  size?: ColorPickerSize;
14
15
  className?: string;
15
16
  /** 묶음의 이름(예: '글자 색') — 낭독기가 무엇의 색을 고르는지 읽는다 */
@@ -3,6 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import Icon from './Icon';
5
5
  import './ColorPicker.css';
6
+ import { CONTROL_SIZE } from './controlSize';
6
7
  const CHECK_ICON_SIZE = 20;
7
8
  const DEFAULT_PALETTE = [
8
9
  '#499cdf', // main
@@ -14,7 +15,7 @@ const DEFAULT_PALETTE = [
14
15
  '#bfc7d1', // disabled
15
16
  ];
16
17
  /** @public */
17
- export default function ColorPicker({ value, onChange, palette = DEFAULT_PALETTE, size = 40, className = '', ariaLabel, }) {
18
+ export default function ColorPicker({ value, onChange, palette = DEFAULT_PALETTE, size = CONTROL_SIZE, className = '', ariaLabel, }) {
18
19
  const { t } = useTranslation();
19
20
  return (
20
21
  /* role="group" 은 이름이 없으면 낭독기가 묶음을 알리지 않는다 — 이름을 받는다 */
@@ -48,6 +48,11 @@
48
48
  text-align: left;
49
49
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
50
50
  }
51
+ /* **32 — 줄·머리의 기본**(사장님 지시 2026-11-02). 모서리 사다리는 Dropdown·TextField 와 같다 */
52
+ .date-picker--s32 .date-picker__trigger {
53
+ height: 32px;
54
+ border-radius: 8px;
55
+ }
51
56
  .date-picker--s40 .date-picker__trigger { height: 40px; border-radius: 10px; }
52
57
  .date-picker--s48 .date-picker__trigger { height: 48px; border-radius: 12px; }
53
58
  .date-picker--s64 .date-picker__trigger { height: 64px; border-radius: 14px; }
@@ -9,7 +9,8 @@ export interface DatePickerProps {
9
9
  * 줄·머리에서 곁에 서는 단추·글상자·고르개가 모두 40 이다. 기본이 48 이면 안 적은
10
10
  * 자리만 한 급 크게 서고, 그것을 막으려고 자리마다 40 을 손으로 적게 된다.
11
11
  */
12
- size?: 40 | 48 | 64;
12
+ /** 조절칸 키 — 32(줄·머리 기본, 2026-11-02) · 40 · 48 · 64 */
13
+ size?: 32 | 40 | 48 | 64;
13
14
  min?: string;
14
15
  max?: string;
15
16
  disabled?: boolean;
@@ -304,7 +304,7 @@ export default function DatePicker({ value, onChange, size = CONTROL_SIZE, min,
304
304
  cells.push(null);
305
305
  for (let d = 1; d <= daysInMonth(viewY, viewM); d++)
306
306
  cells.push(d);
307
- const iconSize = size === 64 ? 20 : size === 40 ? 16 : 18;
307
+ const iconSize = size === 64 ? 20 : size === 32 ? 14 : size === 40 ? 16 : 18;
308
308
  /* 이름은 브라우저가 짓는다 — 한국어 `2026년` · `10월`, 영어 `2026` · `October`.
309
309
  연월을 한 덩어리로 짓던 `yearMonthLabel` 은 **달력 머리줄(Calendar)** 이 여전히 쓴다. */
310
310
  const locale = intlLocale(i18n.language);
@@ -16,6 +16,12 @@
16
16
  }
17
17
 
18
18
  /* Size variants — 실제 높이 px + 버튼과 동일한 round */
19
+ /* **32 — 줄·머리의 기본**(사장님 지시 2026-11-02 "size 모두 32 로"). 모서리는 집안
20
+ 사다리를 따른다: 32→8 · 40→10 · 48→12(`TextField` 가 먼저 깔아 둔 결이다). */
21
+ .dropdown--s32 .dropdown__trigger {
22
+ height: 32px;
23
+ border-radius: 8px;
24
+ }
19
25
  .dropdown--s40 .dropdown__trigger { height: 40px; border-radius: 10px; }
20
26
  .dropdown--s48 .dropdown__trigger { height: 48px; border-radius: 12px; }
21
27
 
@@ -22,7 +22,8 @@ export interface DropdownProps {
22
22
  * 단추·글상자·고르개가 40 인데 혼자 48 로 섰다(실측 2026-10-29). `SegmentedControl` 도
23
23
  * 2026-09-21 에 같은 까닭으로 48 → 40 으로 내렸다. 큰 자리만 48 을 적는다.
24
24
  */
25
- size?: 40 | 48;
25
+ /** 조절칸 키 — 32(줄·머리 기본, 2026-11-02) · 40 · 48 */
26
+ size?: 32 | 40 | 48;
26
27
  error?: boolean;
27
28
  className?: string;
28
29
  /** 화면에 보이는 라벨 없이 스크린리더용 이름을 지정할 때 사용 */
@@ -8,6 +8,7 @@ import Button from './Button';
8
8
  import SegmentedControl from './SegmentedControl';
9
9
  import TextField from './TextField';
10
10
  import Dropdown from './Dropdown';
11
+ import { CONTROL_SIZE } from './controlSize';
11
12
  export { FILTER_ALL_VALUE } from '../types/filterPanel';
12
13
  import { FILTER_ALL_VALUE } from '../types/filterPanel';
13
14
  import FilterSectionInfo from './FilterSectionInfo';
@@ -54,7 +55,7 @@ export default function FilterPanel({ title, titleLevel = 2, headerAction, heade
54
55
  안 잡혀, 셋이 나란히 서도 "지금 어느 판 안인지" 를 알 길이 없었다 — (51)·(54) 에서
55
56
  `ChartSection`·`TrainingCardGroup` 에 한 것과 같은 자다.
56
57
  **글자 제목일 때만 건다** — 마디를 가리키므로 글이 아닌 제목이면 이름이 안 선다. */
57
- _jsxs("div", { className: cx('filter-panel', collapsible ? 'filter-panel--collapsible' : '', collapsed ? 'filter-panel--collapsed' : '', className), role: typeof title === 'string' && title ? 'group' : undefined, "aria-labelledby": typeof title === 'string' && title ? titleId : undefined, children: [showHeader && (_jsxs("div", { className: "filter-panel__header", onClick: collapsible ? onHeadClick : undefined, children: [_jsx("div", { className: "filter-panel__title-row", children: title && _jsx(TitleTag, { id: titleId, className: "filter-panel__title h4", children: title }) }), _jsxs("div", { className: "filter-panel__header-actions", children: [collapsed ? summaryNode : headerAction, collapsible && (_jsx(Button, { htmlType: "button", size: 40, type: "dot", variant: "transparent-gray", useBorder: false, icon: collapsed ? 'chevron-down' : 'chevron-up',
58
+ _jsxs("div", { className: cx('filter-panel', collapsible ? 'filter-panel--collapsible' : '', collapsed ? 'filter-panel--collapsed' : '', className), role: typeof title === 'string' && title ? 'group' : undefined, "aria-labelledby": typeof title === 'string' && title ? titleId : undefined, children: [showHeader && (_jsxs("div", { className: "filter-panel__header", onClick: collapsible ? onHeadClick : undefined, children: [_jsx("div", { className: "filter-panel__title-row", children: title && _jsx(TitleTag, { id: titleId, className: "filter-panel__title h4", children: title }) }), _jsxs("div", { className: "filter-panel__header-actions", children: [collapsed ? summaryNode : headerAction, collapsible && (_jsx(Button, { htmlType: "button", size: CONTROL_SIZE, type: "dot", variant: "transparent-gray", useBorder: false, icon: collapsed ? 'chevron-down' : 'chevron-up',
58
59
  /* Button은 aria-label을 자기 ariaLabel prop으로 덮어쓴다({...rest} 뒤에
59
60
  aria-label={ariaLabelString}을 다시 쓴다) — kebab으로 넘기면 undefined가
60
61
  되어 이름이 통째로 사라진다. 저장소의 다른 호출부는 모두 ariaLabel을 쓴다.
@@ -135,11 +136,24 @@ export default function FilterPanel({ title, titleLevel = 2, headerAction, heade
135
136
  2026-09-22 에는 숫자 size 가 768px 이하에서 한 급 줄고(32→28) `size="Keyboard"`(32)는
136
137
  안 줄어 폰에서만 어긋났고, 맞추려면 손가락 자리가 28 이 되는 터라 어긋남 쪽을 택했다
137
138
  (사용자 판단). 그 사다리를 걷으면서 **둘 다 어느 폭에서나 32** 가 되어 까닭이 사라졌다.
138
- `test/buttonSizeLadder0922.test.ts` 가 사다리가 다시 생기지 않는지를 센다. */
139
+ `test/buttonSizeLadder0922.test.ts` 가 사다리가 다시 생기지 않는지를 센다.
140
+
141
+ **공용 수를 쓰면 안 된다 — 이 자리의 닻은 항목 단추다.**
142
+ 2026-11-02 에 공용 수가 32 로 내려가자 두 수가 같아져서 `CONTROL_SIZE` 로
143
+ 바꿨는데, **같은 날 공용 수가 40 으로 되돌려지면서 바로 어긋났다**
144
+ (`narrowScreen0922` 가 *"40 이면 옆 항목 단추(32)보다 8px 높다"* 로 울었다).
145
+ 항목 단추는 `size="keyboard"`(32)로 **다른 사다리**라 공용 수와 함께 움직이지
146
+ 않는다. 그러니 여기는 **32 를 손으로 적는다** — 두 수가 우연히 같아지는
147
+ 날에도 바꾸지 않는다. */
139
148
  size: 32 })) : (!section.multiple && section.display === 'dropdown') ? (_jsx(Dropdown, { className: "filter-panel__dropdown",
140
149
  /* 거르개 절의 이름을 그대로 쓴다 — (70) 로 방아쇠가 `combobox` 가 되면서
141
150
  안 글자가 값이 됐다. 이름을 안 주면 절이 여럿인 판에서 다 똑같이 들린다. */
142
- ariaLabel: typeof section.label === 'string' ? section.label : undefined, size: 40, options: [
151
+ /* **옆 갈래와 같은 수를 쓴다.** 바로 위 `SegmentedControl` 갈래는 2026-09-22 에
152
+ 32 로 내려갔는데 이 드롭다운만 40 으로 남아, 한 절 안에서 갈래에 따라 키가
153
+ 달랐다. 2026-10-29 에 `PanelRow` 에서 겪은 것과 같은 흠이다 — 손으로 적는
154
+ 자리가 여럿이면 하나가 빠진다. 그래서 공용 수를 쓴다.
155
+ */
156
+ ariaLabel: typeof section.label === 'string' ? section.label : undefined, size: CONTROL_SIZE, options: [
143
157
  ...(section.allOption ? [{ value: FILTER_ALL_VALUE, label: section.allLabel ?? t('common.all', '전체'), disabled: section.allOptionDisabled }] : []),
144
158
  ...items.map(item => {
145
159
  const value = typeof item === 'string' ? item : item.value;
@@ -80,12 +80,14 @@ export default function Header({ activeKey, onChange, items, malgwiItems: _malgw
80
80
  }
81
81
  onChange?.(key);
82
82
  }, [items, onChange]);
83
- // 모바일 하단 더보기(…) 메뉴에 노출할 유틸(알림·설정·도움말·계정·디버그).
83
+ // 모바일 하단 더보기(…) 메뉴에 노출할 유틸(디버그·도움말·알림·설정·버그신고·계정).
84
84
  // 데스크톱 SideNav 푸터와 동일한 아이콘/키를 사용해 활성표시가 일관되게 반영된다.
85
85
  const bottomMoreItems = useMemo(() => {
86
86
  const list = [];
87
87
  if (onDebug)
88
88
  list.push({ key: 'debug', icon: 'terminal', label: t('nav.debug', '디버그'), onClick: onDebug });
89
+ if (onHelp)
90
+ list.push({ key: 'help', icon: 'message-circle-question-mark', label: t('nav.help', '도움말'), onClick: onHelp });
89
91
  if (onNotification)
90
92
  list.push({
91
93
  key: 'notifications', icon: 'bell',
@@ -96,15 +98,13 @@ export default function Header({ activeKey, onChange, items, malgwiItems: _malgw
96
98
  });
97
99
  if (onSetting)
98
100
  list.push({ key: 'settings', icon: 'settings', label: t('nav.settings', '설정'), onClick: onSetting });
99
- if (onHelp)
100
- list.push({ key: 'help', icon: 'message-circle-question-mark', label: t('nav.help', '도움말'), onClick: onHelp });
101
101
  if (onFeedback)
102
102
  list.push({ key: 'feedback', icon: 'bug', label: t('nav.feedback', '버그신고'), onClick: onFeedback });
103
103
  if (onAccount)
104
104
  list.push({ key: 'account', icon: 'user-round', label: t('nav.account', '계정'), onClick: onAccount });
105
105
  return list;
106
106
  }, [t, onDebug, onNotification, onSetting, onHelp, onFeedback, onAccount, unreadCount]);
107
- // 헤더 햄버거 — SideNav 푸터에 해당하는 유틸(알림·설정·도움말·계정·디버그)을 띄운다.
107
+ // 헤더 햄버거 — SideNav 푸터에 해당하는 유틸(디버그·도움말·알림·설정·버그신고·계정)을 띄운다.
108
108
  // 데스크톱에선 SideNav 푸터에 늘 보이지만 모바일에선 그 자리가 없어, 같은 항목을
109
109
  // 하단 더보기(…)와 동일한 구성(bottomMoreItems)으로 재사용한다.
110
110
  const computeUtilMenuStyle = useCallback((rect, trigger) => ({
@@ -516,14 +516,14 @@
516
516
  * | 묶음 | 보는 것 | 하는 일 |
517
517
  * |---|---|---|
518
518
  * | `@media (max-width: 767px)` | 창 | 쌓는다 — **판 없는 줄의 받침** |
519
- * | `@container (max-width: 480px)` | 판 | 쌓는다 — 창이 넓어도 판이 좁으면 |
520
- * | `@container (min-width: 480px)` | 판 | **되돌린다** — 창이 좁아도 판이 넓으면 |
519
+ * | `@container (max-width: 430px)` | 판 | 쌓는다 — 창이 넓어도 판이 좁으면 |
520
+ * | `@container (min-width: 430px)` | 판 | **되돌린다** — 창이 좁아도 판이 넓으면 |
521
521
  *
522
522
  * 되돌리는 묶음이 있어야 767 의 낭떠러지가 없어진다. `@media` 는 특이도를 안 올리고
523
523
  * `@container` 도 안 올리므로, 되돌리는 묶음은 **맨 뒤**에 서야 순서로 이긴다.
524
524
  * `test/panelStackByPanelWidth1029.test.ts` 가 그 순서와 세 묶음의 짝을 센다.
525
525
  *
526
- * ### 480 은 어디서 나온 수인가 — **재서 얻었다**
526
+ * ### 430 은 어디서 나온 수인가 — **재서 얻었다**(480 → 440 → 430)
527
527
  *
528
528
  * 놀이터 `#panel` 의 줄 39개를 하나씩 좁혀 **처음 깨지는 폭**을 쟀다(창은 1280 로 벌려
529
529
  * `@media` 를 끄고, 판 폭을 680 → 200 으로 20px 씩 줄였다). 39 가운데 8 이 깨지고,
@@ -542,7 +542,33 @@
542
542
  * 104px 넓어지면 깨지는 폭도 그만큼 올라가 **384** 가 된다. 거기에 여유를 둬 **속폭 440**,
543
543
  * 줄 좌우 여백 20+20 을 더해 **판 480** 으로 잡았다.
544
544
  *
545
- * `@container` 의 조건에는 **`var()` 를 못 쓴다.** 그래서 이 480 은 글자 수로 두 번 적히고,
545
+ * ### 480 → 440 → **430** (2026-10-31, 사장님 지시 두 번)
546
+ *
547
+ * `small` 창(480)의 판이 **440** 이라, 문턱이 480 이면 `small` 창은 **늘 쌓였다.** 치수는
548
+ * `small 480 · medium 680 · large 1080` 셋뿐이라 그 사이가 없고, 창 폭을 소비자 CSS 로
549
+ * 덮는 길은 안 쓴다. 그래서 먼저 **440** 으로 내렸다.
550
+ *
551
+ * **그런데 440 은 여유가 0px 이고 테두리에 걸렸다.** 담는 그릇은 **속상자**를 잰다
552
+ * (`container-type: inline-size`). 판에는 테두리가 1px 씩 있으므로:
553
+ *
554
+ * | 겉폭 440 | 속폭 | 문턱 440 | 문턱 430 |
555
+ * |---|---|---|---|
556
+ * | 테두리 있음 (`.panel`) | **438** | 쌓인다 ✗ | **가로** |
557
+ * | 테두리 없음 (`--no-border`) | 440 | 가로(딱 걸침) | **가로** |
558
+ *
559
+ * 말귀의 `FormPanel` 은 `useBorder={false}` 라 440 에서도 뜻대로 섰지만, `popup--small`
560
+ * 에서 테두리를 안 끈 `<Panel>` 이 셋 있었다(`UserSubListPopup` · `UserPayListPopup` ·
561
+ * `UserDetailConfirmPopups`). **그 셋은 440 에서도 쌓였다.** 그래서 **430** 으로 내렸다 —
562
+ * 테두리 있는 판에 8px, 없는 판에 10px 여유가 생긴다.
563
+ *
564
+ * **잰 값은 그대로 넘는다.** 넘침은 **어느 폭에서도 0** 이다 — `--fill` 줄은 넘치지 않고
565
+ * **칸이 줄고**(라벨 200·판 480 → 264px · 판 440 → 224px · 판 430 → 214px), `children`
566
+ * 줄은 칸이 170px 을 지키고 **라벨이 준다.** 그래서 이 문턱은 "넘치는가" 가 아니라
567
+ * **"칸을 얼마나 좁게 두고 볼 것인가"** 를 정하는 수다. 라벨 200 에 칸 214px 이면 선다.
568
+ *
569
+ * 바뀌는 띠는 **판 430~439** 뿐이다(440 로 내릴 때는 440~479 였다).
570
+ *
571
+ * `@container` 의 조건에는 **`var()` 를 못 쓴다.** 그래서 이 440 은 글자 수로 두 번 적히고,
546
572
  * 못이 그 둘이 같은 수인지 센다 — 한쪽만 고치면 쌓기와 되돌리기 사이에 **아무도 안 쌓이는
547
573
  * 띠**나 **둘 다 맞는 띠**가 생긴다.
548
574
  *
@@ -568,7 +594,7 @@
568
594
  * 그런 줄을 세려면 **그려진 화면**을 봐야 한다(위 참조). 고치려면 받침을 줄 제 폭으로
569
595
  * 바꿔야 하는데, 그 길은 flex 에서만 되고 격자에는 없어 **폼과 아닌 것이 서로 다른 자로
570
596
  * 갈린다.** 오늘은 **옛 behaviour 를 그대로 남기는 쪽**을 골랐다(새로 깨진 것 0). */
571
- @container (max-width: 480px) {
597
+ @container (max-width: 430px) {
572
598
  /* ⓪ **줄바꿈과 축소를 먼저 켠다.** 229줄의 그 둘은 `@media` 안에 있어 **창**을 본다.
573
599
  그것 없이 아래 ①의 `flex: 1 0 100%` 만 걸면, 창이 넓은 자리에서 줄이 `nowrap` 인 채로
574
600
  두 칸이 각각 100% 를 달라 하고 **접히지 못해 밖으로 나간다.**
@@ -629,7 +655,7 @@
629
655
  /* **판이 넓으면 창이 좁아도 되돌린다** — 위 `@media` 를 이 묶음이 덮는다.
630
656
  선언은 바탕 규칙(241·263·273·276줄)과 **같은 값**이어야 한다. 한 자라도 어긋나면 창이
631
657
  좁은 자리에서만 달라져 눈에 안 띈다 — 못이 바탕과 글자로 맞춰 센다. */
632
- @container (min-width: 480px) {
658
+ @container (min-width: 430px) {
633
659
  .panel--form .panel-row.panel-row--label-fixed,
634
660
  .panel-row:has(> .panel-row__right .text-field),
635
661
  .panel-row:has(> .panel-row__right .dropdown),
@@ -748,6 +774,27 @@
748
774
  margin-left: 0;
749
775
  text-align: left;
750
776
  }
777
+ /* **세로줄은 위 `:has(…)` 묶음의 이름표 칸에서 빠진다.**
778
+ *
779
+ * 그 묶음은 **가로줄의 이름표 폭**을 `flex-basis` 로 잡는다(`--panel-label-width`).
780
+ * 세로줄은 `flex-direction: column` 이라 **같은 값이 높이가 된다** — 22px 글자 하나가
781
+ * 64px(또는 기본값 120px) 칸 안에 들어앉아, 이름표와 칸 사이가 벌어진다. 줄 사이는
782
+ * 0 이라 그 칸은 **아래 줄의 이름표 쪽으로** 쏠려 보인다(말귀가 짚었다, 2026-11-01).
783
+ *
784
+ * 바로 위 세 줄(`flex: none`)이 **이미 그렇게 적고 있었는데 번번이 졌다** — `:has()` 가
785
+ * 가장 센 인자의 특이도를 물려받아 저쪽이 (0,4,0), 이쪽이 (0,2,0) 이었다. 값을 바꾸는
786
+ * 것이 아니라 **특이도를 맞춰 다시 적는 것**이다.
787
+ *
788
+ * 말귀 실측(단어표 만들기, 폭 1,766 · 이름표 칸 64px): 이름 줄 128 → 86px ·
789
+ * 설명 줄 162 → 120px. 줄마다 **42px**(64 − 22)이 빈 자리였다.
790
+ *
791
+ * 폭을 안 적는다 — 바로 위 `.panel-row--vertical .panel-row__left` 의 `width: 100%` 가
792
+ * 그대로 선다. 여기서 되돌리는 것은 **높이로 둔갑한 basis 하나**다. */
793
+ .panel-row--vertical:has(> .panel-row__right .text-field) > .panel-row__left,
794
+ .panel-row--vertical:has(> .panel-row__right .dropdown) > .panel-row__left,
795
+ .panel-row--vertical:has(> .panel-row__right .form-input) > .panel-row__left {
796
+ flex: none;
797
+ }
751
798
 
752
799
  /* ── device variant — 좌/우 2-column grid ─────────────────────────────── */
753
800
  .panel-row--device {
@@ -4,7 +4,7 @@ import './RingChart.css';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import Loader from './Loader';
6
6
  import Icon from './Icon';
7
- import ChartSection, { ChartTotal, ChartLegend } from './ChartSection';
7
+ import ChartSection, { ChartTotal, ChartLegend, chartTotalNumClass } from './ChartSection';
8
8
  import { withLegacy } from '../utils/legacyBlocks';
9
9
  const RING_SIZE_PRESET = {
10
10
  small: { diameter: 96, strokeWidth: 16 },
@@ -63,11 +63,15 @@ export default function RingChart({ titleKey, titleLevel, headRight, icon, showT
63
63
  const loaderSize = typeof ringProps.size === 'number' ? ringProps.size : RING_SIZE_PRESET[ringProps.size ?? 'medium'].diameter;
64
64
  // size='large' — 카드가 가로 폭을 거의 100% 차지(1열)
65
65
  const isLarge = ringProps.size === 'large';
66
- const sectionClassName = [className, isSmall ? 'chart-section--compact' : isLarge ? 'chart-section--full' : '']
67
- .filter(Boolean).join(' ') || undefined;
68
- // StatChart(.stat-chart__card__icon)와 동일한 톤 — headRight 자리에 렌더(둘 중 하나만 사용)
69
- const iconNode = icon && (_jsx("span", { className: withLegacy("chart-section-icon"), children: _jsx(Icon, { icon: icon, className: withLegacy("chart-section-icon-inner") }) }));
70
- return (_jsx(ChartSection, { className: sectionClassName, inGrid: inGrid, onClick: onClick, ariaLabel: ariaLabel, tooltip: tooltip, title: t(titleKey), titleLevel: titleLevel, titleClassName: isSmall ? 'h5 chart-section-title--small' : undefined, headRight: iconNode || (isSmall ? undefined : headRight), subRow: (showTotal || legend) && _jsxs(_Fragment, { children: [showTotal ? (_jsxs(ChartTotal, { label: !isSmall && totalLabelKey ? t(totalLabelKey) : undefined, children: [_jsx("span", { className: withLegacy("chart-section__total__num h0"), children: pct }), _jsx("span", { className: withLegacy("chart-section__total__unit h5"), children: "%" })] })) : _jsx("span", {}), legend && _jsx(ChartLegend, { items: legend })] }), children: loading ? (
66
+ /* **급을 `ChartSection` 에 넘긴다**(2026-11-02) — 전에는 꼴 이름을 손으로 붙였다.
67
+ 이쪽 `size` 와 저쪽 급의 사다리가 한 칸씩 어긋난다: 이 카드의 `small` 은 260×208 짜리
68
+ 작은 카드라 저쪽의 **`medium`** 이고, `medium`(밑바탕)이 저쪽 `large`, `large` 가
69
+ 저쪽 `xLarge` 다. 이름을 맞추는 것은 이 컴포넌트의 공개 프롭을 바꾸는 일이라 따로 간다. */
70
+ const sectionSize = isSmall ? 'medium' : isLarge ? 'xLarge' : 'large';
71
+ const sectionClassName = className || undefined;
72
+ // 수 칸(ChartSection type="stat")과 같은 아이콘 규칙 — headRight 자리에 렌더(둘 중 하나만 사용)
73
+ const iconNode = icon && (_jsx("span", { className: withLegacy("chart-section__head-icon"), children: _jsx(Icon, { icon: icon, className: withLegacy("chart-section__head-icon-inner") }) }));
74
+ return (_jsx(ChartSection, { className: sectionClassName, size: sectionSize, inGrid: inGrid, onClick: onClick, ariaLabel: ariaLabel, tooltip: tooltip, title: t(titleKey), titleLevel: titleLevel, headRight: iconNode || (isSmall ? undefined : headRight), subRow: (showTotal || legend) && _jsxs(_Fragment, { children: [showTotal ? (_jsxs(ChartTotal, { label: !isSmall && totalLabelKey ? t(totalLabelKey) : undefined, children: [_jsx("span", { className: withLegacy(chartTotalNumClass(isSmall)), children: pct }), _jsx("span", { className: withLegacy("chart-section__total__unit body-3"), children: "%" })] })) : _jsx("span", {}), legend && _jsx(ChartLegend, { items: legend })] }), children: loading ? (
71
75
  /* 링도 같은 병이 있었다 — 기다림 상자 186px, 그려진 링은 지름(medium 120px)이다.
72
76
  **그려질 링과 같은 자리·같은 지름**의 뼈대를 세우고 그 안에서 기다린다
73
77
  (BarChart 와 같은 결, 사용자 지시 2026-09-17 "뼈대 먼저, 그 안에서 로딩"). */
@@ -41,7 +41,12 @@
41
41
  셈수를 위 규칙들보다 한 겹 높여(.segmented-control.segmented-control) 크기별 기본을 덮는다. */
42
42
  .segmented-control.segmented-control--min .button { min-width: var(--segmented-min-button-w); }
43
43
  .segmented-control--24 .button { min-width: 48px; }
44
- .segmented-control--32 .button { min-width: 80px; } /* 64 는 갑갑했다 — 같은 화면의 기간 고르개(40)와 같은 눈금(2026-09-17 사용자 지시) */
44
+ /* **80 → 64**(사장님 지시 2026-11-02 — "이 세그먼트의 버튼 가로길이 좀 줄이고").
45
+ `주`·`월` 처럼 한 글자가 서는 자리라 80 은 넓었다. 2026-09-17 에 *"64 는 갑갑했다"* 며
46
+ 80 으로 올린 자리인데, 그때는 이 고르개가 **40** 이었고 같은 줄의 기간 고르개도 40 이라
47
+ 눈금을 맞춘 것이었다 — 2026-11-02 에 줄·머리가 **32** 로 내려오면서 그 짝이 바뀌었다.
48
+ 덤으로 차트 카드 머리가 한 줄로 돌아온다(조절칸 405 → 373, 속 폭 502 안에 든다). */
49
+ .segmented-control--32 .button { min-width: 64px; }
45
50
  .segmented-control--40 .button { min-width: 80px; }
46
51
  .segmented-control--48 .button { min-width: 96px; }
47
52
 
@@ -27,7 +27,11 @@ export interface SegmentedControlProps {
27
27
  *
28
28
  * 기본이 48 이던 것을 40 으로 내렸다(사용자 지시 2026-09-21). 코어가 제 안에서 세우는 고르개는 이미 **전부 40**
29
29
  * 이었고(`Toolbar`·`FilterPanel`·`BarChart`·`PanelRow`…), 옆에 서는 `Dropdown`·`TextField` 도 40 이다 —
30
- * 기본값만 혼자 48 이라 안 주고 쓴 자리가 한 급 크게 섰다. */
30
+ * 기본값만 혼자 48 이라 안 주고 쓴 자리가 한 급 크게 섰다.
31
+ *
32
+ * **이제 기본은 공용 수다**(`CONTROL_SIZE` — 2026-11-02 부터 32). 손으로 적은 수를 두면
33
+ * 공용 수가 움직일 때 **안 주고 부른 자리만 뒤에 남는다** — 2026-11-02 에 그 일이 났고
34
+ * `Dropdown`·`DatePicker` 둘만 32 가 깔렸다(말귀_3 청 (408)). */
31
35
  size?: 24 | 32 | 40 | 48;
32
36
  shape?: 'rounded' | 'pill';
33
37
  useBG?: boolean;
@@ -6,6 +6,7 @@ import { useEffect, useId, useRef } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import Button from './Button';
8
8
  import { devWarnOnce, isDev } from '../utils/devWarn';
9
+ import { CONTROL_SIZE } from './controlSize';
9
10
  /**
10
11
  * **이름을 안 준 고르개들** — 개발 중에 서로 부딪히는지 세기 위한 자리다(운영에서는 비어 있다).
11
12
  *
@@ -24,7 +25,7 @@ export default function SegmentedControl(props) {
24
25
  const { t } = useTranslation();
25
26
  const { options = [],
26
27
  // 안 주면 **켜진** 첫 칸 — 꺼진 첫 칸이 골라져 있었다(Tabs 와 같게)
27
- value = options.find((o) => !o.disabled)?.key ?? options[0]?.key, onChange = (_v) => { }, className = '', size = 40, shape = 'pill', useBG = true, fullWidth = false, minButtonWidth, ariaLabel, } = props || {};
28
+ value = options.find((o) => !o.disabled)?.key ?? options[0]?.key, onChange = (_v) => { }, className = '', size = CONTROL_SIZE, shape = 'pill', useBG = true, fullWidth = false, minButtonWidth, ariaLabel, } = props || {};
28
29
  /* **라디오 무리는 Tab 자리 하나 + 화살표**가 ARIA 규칙이다.
29
30
  `role="radiogroup"`·`role="radio"` 만 붙여 놓고 키를 안 만들면 **안 붙인 것보다
30
31
  나쁘다** — 낭독기가 "라디오 그룹, 3 중 2" 라고 읽어 주니 사람은 화살표를 누르는데
@@ -26,7 +26,7 @@ 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' })), 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' })), 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' })), 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 && (_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' }))] }));
30
30
  }
31
31
  function SideNavButton(props) {
32
32
  const { t } = useTranslation();
@@ -1,7 +1,5 @@
1
- import './StatChart.css';
2
- import { type ReactNode } from 'react';
3
- /** @public */
4
- export type StatChartChangeType = 'up' | 'down' | 'neutral';
1
+ import { type ChartSectionProps, type StatChartSize, type StatChartChangeType, type StatChartBodyAlign } from './ChartSection';
2
+ export type { StatChartSize, StatChartChangeType, StatChartBodyAlign };
5
3
  /** @public */
6
4
  export interface StatChartProps {
7
5
  /** 카드 제목(좌상단) */
@@ -17,14 +15,27 @@ export interface StatChartProps {
17
15
  /** 호버 시 표시할 툴팁 텍스트 */
18
16
  tooltip?: string;
19
17
  onClick?: () => void;
20
- /** 값 **아래** 에 붙는 자리 — 목록 몇 줄, "외 n건" 단추처럼 값을 풀어 보이는 것.
21
- * 이 자리가 없어 소비자가 카드 마크업(`stat-chart__card__*` 여덟 이름)을 통째로 베끼고 있었다(말귀 매니저 '금일 방문 예정'). */
22
- children?: ReactNode;
18
+ /** 카드의 급 — `small`(기본) · `medium` · `large` · `xLarge`, 또는 키를 px 로 바로 */
19
+ size?: StatChartSize | number;
20
+ /** 값 아래 자리가 서는 곳 — `bottom`(기본, 카드 바닥) · `center`(값 아래 남는 자리의 한가운데) */
21
+ bodyAlign?: StatChartBodyAlign;
22
+ /** 값 **아래** 에 붙는 자리 — 목록 몇 줄, "외 n건" 단추처럼 값을 풀어 보이는 것 */
23
+ children?: ChartSectionProps['children'];
23
24
  }
24
25
  /**
25
- * 순수 카운트 스탯 카드 — 제목+아이콘, 큰 숫자, 증감(선택) 만 보여준다.
26
- * 도넛/리스트처럼 숫자 하나로 요약되지 않는 카드는 이 컴포넌트의 대상이 아니다
27
- * (도넛 breakdown은 RingChart segments 모드, 리스트는 페이지에서 직접 구성).
26
+ * 순수 카운트 스탯 카드.
27
+ *
28
+ * @deprecated **`<ChartSection type="stat">` 을 쓴다**(사장님 지시 2026-11-02 — "chartsection과
29
+ * statChart 하나로 합쳐, type 으로 전부 분기해"). 몸은 이미 그쪽 하나다 — 이것은 이름만
30
+ * 옮겨 주는 얇은 껍데기이고, 소비자가 다 옮기면 지운다.
31
+ *
32
+ * | 여기 | 저기 |
33
+ * |---|---|
34
+ * | `label` | `title` |
35
+ * | `value` | `totalNum` |
36
+ *
37
+ * 나머지(`change` · `changeType` · `icon` · `tooltip` · `onClick` · `size` · `bodyAlign` ·
38
+ * `children`)는 이름이 같다.
28
39
  * @public
29
40
  */
30
- export default function StatChart({ label, value, change, changeType, icon, tooltip, onClick, children }: StatChartProps): import("react").JSX.Element;
41
+ export default function StatChart({ label, value, change, changeType, icon, tooltip, onClick, size, bodyAlign, children }: StatChartProps): import("react").JSX.Element;