@ihabdevteam/core 0.415.0 → 0.423.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 (50) hide show
  1. package/CHANGELOG.md +617 -1
  2. package/dist/components.cjs.js +179 -179
  3. package/dist/components.esm.css +2 -2
  4. package/dist/hooks.cjs.js +3 -3
  5. package/dist/i18n.cjs.js +3 -3
  6. package/dist/ihabdevteam-core.cjs.js +190 -190
  7. package/dist/ihabdevteam-core.d.ts +199 -8
  8. package/dist/packages/core/src/components/Badge.css +26 -0
  9. package/dist/packages/core/src/components/Badge.d.ts +6 -1
  10. package/dist/packages/core/src/components/BarChart.css +25 -5
  11. package/dist/packages/core/src/components/Button.css +114 -2
  12. package/dist/packages/core/src/components/Button.js +3 -2
  13. package/dist/packages/core/src/components/ChartSection.css +33 -0
  14. package/dist/packages/core/src/components/ChartSection.d.ts +8 -3
  15. package/dist/packages/core/src/components/ChartSection.js +106 -4
  16. package/dist/packages/core/src/components/Header.css +3 -1
  17. package/dist/packages/core/src/components/Landing/Landing.css +235 -0
  18. package/dist/packages/core/src/components/Landing/LandingButton.d.ts +31 -0
  19. package/dist/packages/core/src/components/Landing/LandingButton.js +19 -0
  20. package/dist/packages/core/src/components/Landing/LandingCard.d.ts +31 -0
  21. package/dist/packages/core/src/components/Landing/LandingCard.js +21 -0
  22. package/dist/packages/core/src/components/Landing/LandingSection.d.ts +28 -0
  23. package/dist/packages/core/src/components/Landing/LandingSection.js +18 -0
  24. package/dist/packages/core/src/components/Landing/LandingStatBand.d.ts +23 -0
  25. package/dist/packages/core/src/components/Landing/LandingStatBand.js +90 -0
  26. package/dist/packages/core/src/components/Landing/LandingTitle.d.ts +34 -0
  27. package/dist/packages/core/src/components/Landing/LandingTitle.js +26 -0
  28. package/dist/packages/core/src/components/Popup/DeviceSideTable.js +6 -1
  29. package/dist/packages/core/src/components/SideNav.css +44 -15
  30. package/dist/packages/core/src/components/SideNav.js +1 -1
  31. package/dist/packages/core/src/components/StatChart.d.ts +1 -1
  32. package/dist/packages/core/src/components/TableField.css +9 -0
  33. package/dist/packages/core/src/components/Word/wordTableScoring.d.ts +54 -0
  34. package/dist/packages/core/src/components/Word/wordTableScoring.js +60 -0
  35. package/dist/packages/core/src/components/WordTable.css +30 -1
  36. package/dist/packages/core/src/components/WordTable.js +34 -2
  37. package/dist/packages/core/src/components/barChartData.d.ts +23 -0
  38. package/dist/packages/core/src/components/barChartData.js +30 -0
  39. package/dist/packages/core/src/components/buttonTypes.d.ts +35 -2
  40. package/dist/packages/core/src/components/useBarChartControl.js +17 -13
  41. package/dist/packages/core/src/components.d.ts +10 -0
  42. package/dist/packages/core/src/components.js +6 -0
  43. package/dist/packages/core/src/i18n/locales/en.json +2 -1
  44. package/dist/packages/core/src/i18n/locales/ko.json +1 -0
  45. package/dist/packages/core/src/utils/date.d.ts +12 -0
  46. package/dist/packages/core/src/utils/date.js +18 -0
  47. package/dist/packages/core/src/version.d.ts +1 -1
  48. package/dist/packages/core/src/version.js +1 -1
  49. package/dist/utils.cjs.js +3 -3
  50. package/package.json +5 -1
@@ -267,7 +267,12 @@ export declare interface BadgeProps {
267
267
  * 색상 variant — `dot` · `bar` 가 같은 것을 쓴다.
268
268
  *
269
269
  * `default` · `main` · `sub` · `danger` · `disabled` · `like` ·
270
- * `success` · `warning` · `critical`
270
+ * `success` · `warning` · `critical` · `white` · `black`
271
+ *
272
+ * `white` · `black` 은 **뜻이 아니라 바탕을 고른다** — `white` 는 색이 깔린 자리
273
+ * (브랜드색 띠 · 사진 위)에, `black` 은 밝은 자리에 놓는다. 둘 다 **테마를 안 따라
274
+ * 간다**(어두운 테마에서도 흰 알약은 희다). 바탕을 따라가야 하면 `default` 를 쓴다.
275
+ * `white` 의 글자는 `--color-main` 이라 **명암비가 앱의 브랜드색에 달렸다.**
271
276
  *
272
277
  * `success` 는 브랜드 청록(`--color-sub`)이라 `sub` 와 **색이 같다**(사용자 지시
273
278
  * 2026-10-28). 이름이 다른 까닭은 뜻이 달라서다 — 색이 바뀔 날 한쪽만 바뀐다.
@@ -1028,6 +1033,20 @@ export declare interface ButtonProps {
1028
1033
  * 기본을 nowrap 으로 바꾸지 않은 까닭: 두 줄 라벨(`subLabel`·설명 붙은 단추)이 이미 선 화면이 있고,
1029
1034
  * 좁은 자리에서 nowrap 은 **넘쳐 잘린다**(줄바꿈은 키만 늘어난다). 어느 쪽이 나은지는 그 자리가 안다. */
1030
1035
  nowrap?: boolean;
1036
+ /** 라벨을 **한 줄로 두고 넘치면 말줄임**(`…`)한다 — `nowrap` 의 모자란 데를 메운다.
1037
+ *
1038
+ * `nowrap` 은 줄바꿈만 막는다. 그래서 좁은 자리에서는 글자가 **상자를 넘어 옆을 덮는다**
1039
+ * (바로 위 `nowrap` 머리말이 적어 둔 그 손해다 — *"좁은 자리에서 nowrap 은 넘쳐 잘린다"*).
1040
+ * 이것은 거기에 `overflow: hidden` + `text-overflow: ellipsis` 를 더해 **상자 안에서 끝내고
1041
+ * 끝에 `…` 를 남긴다** — 넘친 글자가 어딘가를 덮지 않고, 더 있다는 것이 보인다.
1042
+ *
1043
+ * 말귀 청 (373), 2026-11-03 — 사장님 지시 *"2줄 나오게 하지말고 이클립스 되도록"*.
1044
+ * 대시보드 추천훈련의 줄 단추가 `size 56`(키 고정)인데 긴 훈련 이름이 **두 줄로 접혀**
1045
+ * 단추 밖으로 1px 씩 비어져 나왔다. 키가 박힌 단추에서는 줄바꿈이 갈 데가 없다.
1046
+ *
1047
+ * `subLabel` 이 붙은 단추에서는 **두 줄 다** 각자 한 줄로 서고 각자 말줄임한다.
1048
+ * `nowrap` 과 함께 줘도 된다 — 이쪽이 줄바꿈 금지를 이미 품는다. */
1049
+ ellipsis?: boolean;
1031
1050
  selected?: boolean;
1032
1051
  toggleable?: boolean;
1033
1052
  /**
@@ -1120,8 +1139,27 @@ export declare interface ButtonProps {
1120
1139
  */
1121
1140
  export declare type ButtonShape = 'rounded' | 'pill';
1122
1141
 
1123
- /** @public */
1124
- export declare type ButtonVariant = 'default' | 'main' | 'sub' | 'transparent-white' | 'transparent-gray' | 'transparent-lightGray' | 'danger' | 'disabled-faded' | (string & {});
1142
+ /**
1143
+ * 단추의 변형.
1144
+ *
1145
+ * 대부분은 **강조의 세기**를 말한다 — `main`(쪽마다 하나뿐인 주요 행동) ·
1146
+ * `default`(흔한 보조 행동) · `transparent-*`(덜 드러나야 하는 행동) ·
1147
+ * `danger`(되돌릴 수 없는 행동).
1148
+ *
1149
+ * **`white` 와 `black` 만 뜻이 다르다 — 강조가 아니라 *바탕*을 고른다**
1150
+ * (사용자 지시 2026-11-06). 색이 깔린 자리(브랜드색 띠 · 사진 위 · `main` 판 안)에는
1151
+ * `white`, 밝은 자리에는 `black` 이다. 바탕이 비어 뒤가 비치는
1152
+ * `transparent-white` 와 달리 이 둘은 **바탕이 꽉 찬 판**이다.
1153
+ *
1154
+ * 이 둘은 **테마를 안 따라간다** — 어두운 테마에서도 흰 단추는 희고 검은 단추는
1155
+ * 검다. 바탕을 따라가야 하면 `default` 가 그 일을 한다. 까닭은 `Button.css` 의
1156
+ * 그 자리에 적어 두었다(`--color-pureWhite` 는 테마에서 뒤집힌다).
1157
+ *
1158
+ * `white` 의 글자는 앱의 본색(`--color-main`)이라 **명암비가 앱마다 다르다** —
1159
+ * 디자인 시스템 기본값으로는 AA 아래고 말귀의 브랜드색으로는 11.92:1 이다.
1160
+ * @public
1161
+ */
1162
+ export declare type ButtonVariant = 'default' | 'main' | 'sub' | 'transparent-white' | 'transparent-gray' | 'transparent-lightGray' | 'white' | 'black' | 'danger' | 'disabled-faded' | (string & {});
1125
1163
 
1126
1164
  /**
1127
1165
  * @public
@@ -1290,8 +1328,12 @@ export declare interface ChartSectionProps {
1290
1328
  change?: number;
1291
1329
  /** `stat` 전용 — 증감 색. 안 주면 `change` 의 부호로 정한다(양수=up, 음수=down, 0=neutral) */
1292
1330
  changeType?: StatChartChangeType;
1293
- /** 카드의 급 — `small` · `medium` · `large` · `xLarge`, 또는 키를 px 로 바로.
1294
- * 안 주면 갈래를 따른다(`stat`→`small` · `chart`→`large`) */
1331
+ /** 카드의 급 — `xSmall` · `small` · `medium` · `large` · `xLarge`, 또는 키를 px 로 바로.
1332
+ * 안 주면 갈래를 따른다(`stat`→`small` · `chart`→`large`).
1333
+ *
1334
+ * `xSmall`(120×120)은 **수 칸 전용**이고, **제 발로 내려앉는다** — 제목이 한 줄에 안
1335
+ * 들거나 큰 수가 속폭을 넘으면 코어가 `small`(260×120)로 바꿔 그린다. 영어로 바뀌는
1336
+ * 날·수가 한 자리 자라는 날 부르는 쪽이 고쳐 줄 것이 없다. */
1295
1337
  size?: ChartSectionSize | number;
1296
1338
  /** `stat` 전용 — 값 아래 자리가 서는 곳. `bottom`(기본, 카드 바닥) · `center` */
1297
1339
  bodyAlign?: StatChartBodyAlign;
@@ -1400,6 +1442,7 @@ export declare interface ChartSectionProps {
1400
1442
  *
1401
1443
  * | 급 | 보기 | 상자(실측 2026-11-02, 폭 1430) |
1402
1444
  * |---|---|---|
1445
+ * | `xSmall` | `총 고객` — 수 하나(제목도 수도 짧은 것) | 120 × **120** |
1403
1446
  * | `small` | `총 고객` — 수 하나 | 260 × **120** |
1404
1447
  * | `medium` | `금일 방문 예정` · 작은 고리 카드 | 260 × **260** |
1405
1448
  * | `large` | `상세 방문 현황` — 격자 두 칸에 서는 차트 카드 | 두 칸 폭 × 260 이상 |
@@ -1420,7 +1463,7 @@ export declare interface ChartSectionProps {
1420
1463
  * 수를 바로 줘도 된다(px) — 프리셋이 안 맞는 자리용 탈출구다.
1421
1464
  * @public
1422
1465
  */
1423
- declare type ChartSectionSize = 'small' | 'medium' | 'large' | 'xLarge';
1466
+ declare type ChartSectionSize = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge';
1424
1467
 
1425
1468
  /**
1426
1469
  * **카드의 갈래** — `chart`(기본) 와 `stat` 둘이다.
@@ -2067,7 +2110,7 @@ export declare function copyText(text: string): Promise<boolean>;
2067
2110
  *
2068
2111
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
2069
2112
  */
2070
- export declare const CORE_VERSION = "0.415.0";
2113
+ export declare const CORE_VERSION = "0.423.0";
2071
2114
 
2072
2115
  /** @public */
2073
2116
  declare const coreDefault: Record<string, unknown>;
@@ -3960,6 +4003,68 @@ export declare interface LandingBottomStickyProps {
3960
4003
  className?: string;
3961
4004
  }
3962
4005
 
4006
+ /**
4007
+ * **랜딩의 큰 단추** — 쪽에서 무언가로 넘어가는 자리.
4008
+ *
4009
+ * 키 60 · 모서리 `--radius-m` · 글자 h4 굵게는 네 꼴이 늘 같다. 화살표는 루시드
4010
+ * `chevron-right` 24px — 글자(h4 18px)보다 또렷이 크게 두어야 눈에 든다(16 · 20 은 작았다).
4011
+ *
4012
+ * **주색 위 흰 글씨는 2.96 : 1** 로 본문 기준(4.5) 아래다 — 코어 기본 단추
4013
+ * (`Button variant="main"`)가 쓰는 바로 그 짝이라 제품 전체가 같은 꼴이다. 더 또렷해야 하는
4014
+ * 자리라면 `--color-infoLink`(흰 글씨 4.14) 쪽을 쓴다.
4015
+ *
4016
+ * @public
4017
+ */
4018
+ export declare function LandingButton({ href, tone, arrow, className, children }: LandingButtonProps): JSX.Element;
4019
+
4020
+ /** @public */
4021
+ export declare interface LandingButtonProps {
4022
+ href: string;
4023
+ /**
4024
+ * 단추의 꼴
4025
+ * · `dark` — 검정 바탕에 흰 글씨(기본)
4026
+ * · `main` — 주색 바탕에 흰 글씨
4027
+ * · `sub` — 보조색 바탕에 검정 글씨
4028
+ * · `line` — 흰 바탕에 선만
4029
+ */
4030
+ tone?: 'dark' | 'main' | 'sub' | 'line';
4031
+ /** 뒤에 화살표(루시드 `chevron-right`)를 붙인다 */
4032
+ arrow?: boolean;
4033
+ className?: string;
4034
+ children: ReactNode;
4035
+ }
4036
+
4037
+ /**
4038
+ * **랜딩의 칸 하나** — 흰 바탕에 선을 두른 상자.
4039
+ *
4040
+ * 두 꼴뿐이다 — 아이콘이 윗줄에 서는 `stack`, 왼쪽에 서고 오른쪽에 내용이 붙는 `row`.
4041
+ *
4042
+ * @public
4043
+ */
4044
+ export declare function LandingCard({ icon, title, desc, children, layout, leadWidth, titleStyle, tight, align, className, style, }: LandingCardProps): JSX.Element;
4045
+
4046
+ /** @public */
4047
+ export declare interface LandingCardProps {
4048
+ /** 아이콘 칸 — 보통 `CategoryIcon` 을 넣는다 */
4049
+ icon?: ReactNode;
4050
+ title?: ReactNode;
4051
+ desc?: ReactNode;
4052
+ /** 제목·설명 아래(또는 줄 꼴이면 오른쪽)에 붙는 것 */
4053
+ children?: ReactNode;
4054
+ /** `row` 면 아이콘·제목이 왼쪽 칸에 서고 children 이 오른쪽에 붙는다 */
4055
+ layout?: 'stack' | 'row';
4056
+ /** 왼쪽 칸의 폭 — `row` 일 때만 */
4057
+ leadWidth?: number;
4058
+ /** 제목 줄에만 더 얹는 꼴 */
4059
+ titleStyle?: CSSProperties;
4060
+ /** 안쪽 여백을 좁게 */
4061
+ tight?: boolean;
4062
+ /** 아이콘·글을 칸 가운데로 (`stack` 일 때만) */
4063
+ align?: 'left' | 'center';
4064
+ className?: string;
4065
+ style?: CSSProperties;
4066
+ }
4067
+
3963
4068
  /**
3964
4069
  * 랜딩/마케팅 페이지용 상단 고정 헤더.
3965
4070
  *
@@ -4028,6 +4133,92 @@ export declare interface LandingHeaderProps {
4028
4133
  };
4029
4134
  }
4030
4135
 
4136
+ /**
4137
+ * **랜딩 구획 하나** — 위아래 여백과 안쪽 틀을 한 자리에 둔다.
4138
+ *
4139
+ * 위아래 여백은 늘 **쪽 여백의 두 배**다(말귀 랜딩 시안, 2026-11-04 — *"섹션에 위아래 여백이
4140
+ * 많이 부족해보이는데 답답해보여"*). 그 수를 구획마다 적어 두면 다음에 고칠 때 한둘이 빠지고,
4141
+ * 빠진 자리는 눈으로만 잡힌다.
4142
+ *
4143
+ * @public
4144
+ */
4145
+ export declare function LandingSection({ id, tone, bare, className, style, children }: LandingSectionProps): JSX.Element;
4146
+
4147
+ /** @public */
4148
+ export declare interface LandingSectionProps {
4149
+ /** 닻 이름 — 맨 위 띠의 고리가 이것으로 찾아온다 */
4150
+ id?: string;
4151
+ /**
4152
+ * 구획의 꼴.
4153
+ * · `plain` — 그냥 선다(기본)
4154
+ * · `line` — 위에 선 하나를 긋는다(갈래가 바뀌는 자리)
4155
+ */
4156
+ tone?: 'plain' | 'line';
4157
+ /** 속틀을 안 쓴다 — 띠가 화면 끝까지 가는 자리 */
4158
+ bare?: boolean;
4159
+ className?: string;
4160
+ style?: CSSProperties;
4161
+ children?: ReactNode;
4162
+ }
4163
+
4164
+ /** @public */
4165
+ export declare interface LandingStat {
4166
+ value: ReactNode;
4167
+ label: ReactNode;
4168
+ }
4169
+
4170
+ /**
4171
+ * **수 띠** — 큰 수 몇을 그라데이션 띠 위에 나란히 세운다.
4172
+ *
4173
+ * 수는 **받아서만** 쓴다 — 지어낸 수를 띄우면 쪽 전체가 못 믿을 것이 된다.
4174
+ *
4175
+ * **띠가 화면에 들어오면 수가 0 에서 올라간다**(1.2초, 한 번만). 올라가는 동안의 수는
4176
+ * 낭독기에 안 보낸다 — 들리는 것은 늘 최종값 하나다.
4177
+ *
4178
+ * @public
4179
+ */
4180
+ export declare function LandingStatBand({ stats, className }: LandingStatBandProps): JSX.Element;
4181
+
4182
+ /** @public */
4183
+ export declare interface LandingStatBandProps {
4184
+ stats: LandingStat[];
4185
+ className?: string;
4186
+ }
4187
+
4188
+ /**
4189
+ * **랜딩 구획의 머리** — 이름표 · 큰 글 · 설명 한 줄.
4190
+ *
4191
+ * 셋 사이의 여백과 글자 크기가 늘 같아, 구획마다 적어 두면 어긋난다.
4192
+ * 큰 글은 **통째로 받는다**(`title`) — 글 안에 줄 나눔과 주색 강조가 섞이기 때문이다.
4193
+ *
4194
+ * @public
4195
+ */
4196
+ export declare function LandingTitle({ badge, badgeVariant, title, sub, maxWidth, subMaxWidth, gap, noGap, onBand, align, }: LandingTitleProps): JSX.Element;
4197
+
4198
+ /** @public */
4199
+ export declare interface LandingTitleProps {
4200
+ /** 이름표 — 없으면 안 선다 */
4201
+ badge?: ReactNode;
4202
+ /** 이름표 색 — 코어 `Badge` 의 variant 를 그대로 쓴다(기본 `white`) */
4203
+ badgeVariant?: 'white' | 'main' | 'sub' | 'default';
4204
+ /** 큰 글 — 줄 나눔과 강조가 섞이므로 통째로 받는다 */
4205
+ title: ReactNode;
4206
+ /** 설명 한 줄 */
4207
+ sub?: ReactNode;
4208
+ /** 큰 글의 폭 */
4209
+ maxWidth?: number;
4210
+ /** 설명의 폭 — 큰 글과 따로 간다(설명만 좁히는 자리가 많다) */
4211
+ subMaxWidth?: number;
4212
+ /** 윗 여백 — 코어 여백 토큰 이름(기본 `m`) */
4213
+ gap?: 'xs' | 's' | 'm' | 'l' | 'xl';
4214
+ /** 윗 여백을 안 준다 */
4215
+ noGap?: boolean;
4216
+ /** 띠 위에 설 때 — 설명도 흰 글씨로 */
4217
+ onBand?: boolean;
4218
+ /** 머리 전체를 쪽 가운데로 */
4219
+ align?: 'left' | 'center';
4220
+ }
4221
+
4031
4222
  /**
4032
4223
  * 화면을 늦게 받아 오는 자리 — `lazy()` 를 그냥 쓰지 않고 이걸 쓴다.
4033
4224
  *
@@ -7986,7 +8177,7 @@ export declare interface StatChartProps {
7986
8177
  /** 호버 시 표시할 툴팁 텍스트 */
7987
8178
  tooltip?: string;
7988
8179
  onClick?: () => void;
7989
- /** 카드의 급 — `small`(기본) · `medium` · `large` · `xLarge`, 또는 키를 px 로 바로 */
8180
+ /** 카드의 급 — `xSmall`(120×120, 안 들면 스스로 `small` 로) · `small`(기본) · `medium` · `large` · `xLarge`, 또는 키를 px 로 바로 */
7990
8181
  size?: StatChartSize | number;
7991
8182
  /** 값 아래 자리가 서는 곳 — `bottom`(기본, 카드 바닥) · `center`(값 아래 남는 자리의 한가운데) */
7992
8183
  bodyAlign?: StatChartBodyAlign;
@@ -68,6 +68,32 @@
68
68
  --badge-on-color: #ffffff;
69
69
  }
70
70
 
71
+ /* ── `white` · `black` — **어느 바탕에 놓을지를 고르는 두 색**(사용자 지시 2026-11-06) ──
72
+
73
+ 다른 색들은 *뜻*을 말한다(위험하다 · 됐다 · 꺼져 있다). 이 둘은 뜻이 없다 — **바탕을
74
+ 고른다.** `white` 는 색이 깔린 자리(브랜드색 머리 띠 · 사진 위)에, `black` 은 밝은
75
+ 자리에 놓는 이름표다.
76
+
77
+ **테마를 안 따라간다 — 일부러다.** `--color-pureWhite` 는 어두운 테마에서 `#0f1215`
78
+ 로 **뒤집힌다**(`tokens.css`). 그 토큰을 쓰면 `white` 라 적은 알약이 어두운 테마에서
79
+ 검게 떠 이름이 거짓말을 한다. 게다가 이 둘이 놓이는 자리(브랜드색 띠 · 사진)는
80
+ 테마와 함께 안 바뀌는 자리다. 바탕을 따라가야 하면 `default` 가 그 일을 한다.
81
+
82
+ 글자색을 서로 다르게 두는 까닭: 흰 바탕에 흰 글자는 없으니 `white` 는 글자를 본색
83
+ (`--color-main`)으로 받았고(사용자 지시), 검은 바탕은 나머지 색들과 같은 흰 글자다.
84
+
85
+ **명암비는 앱의 `--brand-main` 에 달렸다.** 디자인 시스템 기본값(#499cdf)으로는
86
+ 흰 바탕에 **2.96:1** 로 AA 아래지만, 말귀의 브랜드색(#211f9f)으로는 **11.92:1** 이다.
87
+ `test/badgeWhiteBlackVariants1106.test.tsx` 가 이 수를 셈으로 들고 있다. */
88
+ .badge--white {
89
+ --badge-color: #ffffff;
90
+ --badge-on-color: var(--color-main);
91
+ }
92
+ .badge--black {
93
+ --badge-color: #000000;
94
+ --badge-on-color: #ffffff;
95
+ }
96
+
71
97
  /* ── outline — transparent bg, variant color border + text ── */
72
98
  .badge--outline {
73
99
  background: transparent;
@@ -70,7 +70,12 @@ export interface BadgeProps {
70
70
  * 색상 variant — `dot` · `bar` 가 같은 것을 쓴다.
71
71
  *
72
72
  * `default` · `main` · `sub` · `danger` · `disabled` · `like` ·
73
- * `success` · `warning` · `critical`
73
+ * `success` · `warning` · `critical` · `white` · `black`
74
+ *
75
+ * `white` · `black` 은 **뜻이 아니라 바탕을 고른다** — `white` 는 색이 깔린 자리
76
+ * (브랜드색 띠 · 사진 위)에, `black` 은 밝은 자리에 놓는다. 둘 다 **테마를 안 따라
77
+ * 간다**(어두운 테마에서도 흰 알약은 희다). 바탕을 따라가야 하면 `default` 를 쓴다.
78
+ * `white` 의 글자는 `--color-main` 이라 **명암비가 앱의 브랜드색에 달렸다.**
74
79
  *
75
80
  * `success` 는 브랜드 청록(`--color-sub`)이라 `sub` 와 **색이 같다**(사용자 지시
76
81
  * 2026-10-28). 이름이 다른 까닭은 뜻이 달라서다 — 색이 바뀔 날 한쪽만 바뀐다.
@@ -1,14 +1,34 @@
1
1
  /* BarChart — 막대차트 섹션 (제목 + 구간 네비 + 주/일 토글 + 2계열 막대) */
2
2
  /* 카드/헤더/total/legend 공통 레이아웃은 ChartSection.css 로 이동(RingChart 섹션과 공유) */
3
3
 
4
- /* 월/주 드롭다운 고정 너비 — 가장 긴 글(`2026.11 다섯째주`)을 담는 만큼.
4
+ /* 월/주 드롭다운 — **바닥은 150, 글이 길면 그만큼 늘어난다.**
5
5
  **200 → 150**(사장님 지시 2026-11-02 — "길이도 좀 줄이고"). 글을 `2026년 11월 첫째주`
6
- 에서 `2026.11 첫째주` 로 줄인 만큼 상자도 줄인다. 머리의 조절칸 넷이 416 → 366 이 되어
7
- 카드 폭 540 안에서 제목과 한 줄로 선다. */
6
+ 에서 `2026.11 첫째주` 로 줄인 만큼 상자도 줄였고, 머리의 조절칸 넷이 416 → 366 이 되어
7
+ 카드 폭 540 안에서 제목과 한 줄로 선다.
8
+
9
+ **150 에 못으로 박아 두었더니 이름표가 잘렸다**(청 (365), 실측 2026-11-03). 그때 적은
10
+ 까닭이 *"가장 긴 글(`2026.11 다섯째주`)을 담는 만큼"* 이었는데 **그 말이 틀렸다** —
11
+ 상자 150 의 이름표 칸은 **100**(150 − 좌우 여백 24 − 화살표 16 − 사이 8 − 테두리 2)인데
12
+ `2026.10 다섯째주` 는 **116** 이 필요하다. 그래서 `다섯째주` 만, 열두 달 가운데 열하나에서
13
+ `2026.10 다섯…` 으로 끊겼다(`첫째`~`넷째주` 는 최대 96 으로 들어온다).
14
+
15
+ **고치는 자리는 수가 아니라 못이다.** 150 을 160 으로 올려도 여전히 모자라고(110 < 116),
16
+ 166 으로 맞추면 다음에 글이 한 자 늘 때 또 끊긴다. 그래서 **바닥만 150 으로 남기고
17
+ 글에 맞춰 늘게 한다** — 사장님이 고르신 150 은 짧은 글에서 줄이 흔들리지 않게 지키는
18
+ 바닥으로 남고, 넘칠 때만 그만큼 넓어진다.
19
+
20
+ **카드는 안 커진다**(실측, 카드 540 · 속 폭 500): 늘어난 몫은 제목 칸이 내준다 —
21
+ `2026.10 다섯째주` 에서 상자 166 · 조절칸 382 · 제목 126 → 110 이고 **머리는 한 줄
22
+ 그대로**(키 32). 영어 최장 `May 2026 Week 4` 에서도 상자 180 · 조절칸 396 · 제목 96 ·
23
+ 한 줄이다. 폰 375 에서는 머리가 어차피 접히고 형제끼리 맞대어도 넘침이 없다.
24
+
25
+ **영어 긴 꼴은 이 못으로 못 푼다** — `September 2026 Week 4` 는 상자 229 가 되어 머리가
26
+ 두 줄로 접힌다(32 → 63). 그쪽은 글을 줄여서 막았다(`yearMonthCompact` 가 영어에서
27
+ `Sep 2026` 을 쓴다 — `useBarChartControl` 참고). 이 둘은 **함께** 가야 한다. */
8
28
  .month-dropdown .dropdown__trigger {
9
- width: 150px;
29
+ width: auto;
10
30
  min-width: 150px;
11
- max-width: 150px;
31
+ max-width: none;
12
32
  }
13
33
 
14
34
  /* 월 드롭다운 스크롤 */
@@ -89,6 +89,46 @@
89
89
  white-space: nowrap;
90
90
  }
91
91
 
92
+ /* **한 줄로 두고 넘치면 말줄임**(`ellipsis`, 청 (373) · 사장님 지시 2026-11-03 "2줄 나오게
93
+ 하지말고 이클립스 되도록").
94
+
95
+ `nowrap` 은 줄바꿈만 막아 글자가 **상자를 넘어 옆을 덮는다**. 여기에 세 줄을 더해 상자
96
+ 안에서 끝낸다. `display` 를 `inline-flex` 에서 `block` 으로 바꾸는 것이 알맹이다 —
97
+ **flex 줄에서는 `text-overflow` 가 안 먹는다**(글자가 아니라 칸을 나누는 상자라서).
98
+ 그래서 가로 자리는 flex 가 아니라 `text-align` 이 든다.
99
+
100
+ `min-width: 0` 은 부모 쪽 몫이다 — flex 자식은 밑바탕이 `min-width: auto` 라 **제 글자보다
101
+ 작아지지 않아서**, 그것부터 풀지 않으면 상자가 글자만큼 벌어지고 말줄임이 영영 안 뜬다. */
102
+ .button--ellipsis .button__label {
103
+ min-width: 0;
104
+ }
105
+ .button--ellipsis .button__label-text,
106
+ .button--ellipsis .button__sub-label-text {
107
+ display: block;
108
+ width: 100%;
109
+ white-space: nowrap;
110
+ overflow: hidden;
111
+ text-overflow: ellipsis;
112
+ /* 줄바꿈을 막았으니 낱말 쪼개기도 걷는다 — 안 걷으면 `break-word` 가 먼저 쪼갠다 */
113
+ word-break: normal;
114
+ }
115
+ /* 가로 자리는 `text-align` 이 든다(위 머리말) — flex 의 `justify-content` 는 block 에 안 먹는다 */
116
+ .button--ellipsis.button--align-center .button__label-text { text-align: center; }
117
+ .button--ellipsis.button--align-right .button__label-text { text-align: right; }
118
+ .button--ellipsis.button--align-left .button__label-text { text-align: left; }
119
+ /* `subLabel` 이 붙어도 **flex 로 되돌리지 않는다.**
120
+
121
+ 윗줄은 제 상자가 없다 — 마크업이 `<span class="…--has-sub">윗글<span class="…__sub-label-text">아랫글</span></span>`
122
+ 이라 **윗글은 맨 글자 마디**다. 그래서 `display: block` 그대로 두어야 그 글자가 이 상자의
123
+ 줄안 내용이 되어 말줄임이 걸린다(flex 로 되돌리면 윗글이 익명 칸이 되어 안 걸린다).
124
+ 아랫글은 제가 `display: block` 이라 **둘째 줄로 서고 제 말줄임을 따로** 받는다.
125
+
126
+ 세로 틈은 `--has-sub` 가 flex 의 `gap: 3px` 으로 주던 것이라 block 에서는 안 먹는다 —
127
+ 같은 수를 바깥 여백으로 돌려준다. */
128
+ .button--ellipsis .button__sub-label-text {
129
+ margin-top: 3px;
130
+ }
131
+
92
132
  /* align='left' 는 **교차축까지** 왼쪽이다 — 두 줄 라벨(제목+설명)이 가운데로 모여
93
133
  소비자 둘이 `align-items: flex-start` 를 다시 칠하고 있었다(2026-09-17 말귀 전수).
94
134
  한 줄 라벨에서는 가로 자리만 바뀐다(세로 가운데는 그대로) — `--has-sub` 는 세로 쌓임이라 그때만 교차축이 가로다. */
@@ -108,7 +148,9 @@
108
148
 
109
149
  .is-selected .button__count,
110
150
  [aria-pressed='true'] .button__count,
111
- .button--variant-main .button__count {
151
+ .button--variant-main .button__count,
152
+ /* 검은 바탕에서 기본 `--color-main` 수는 묻힌다 — 말귀 브랜드색(#211f9f)이면 1.6:1 이다 */
153
+ .button--variant-black .button__count {
112
154
  color: #ffffff;
113
155
  }
114
156
 
@@ -388,6 +430,76 @@
388
430
  }
389
431
 
390
432
 
433
+ /* ── `white` · `black` — **어느 바탕에 놓을지를 고르는 두 변형**(사용자 지시 2026-11-06) ──
434
+
435
+ 다른 변형은 *강조*를 말한다(주요 행동 · 보조 행동 · 되돌릴 수 없는 행동). 이 둘은
436
+ 강조가 아니라 **바탕을 고른다.** `white` 는 색이 깔린 자리(브랜드색 머리 띠 · 사진 위
437
+ · `main` 판 안)에, `black` 은 밝은 자리에 놓는 단추다.
438
+
439
+ **`transparent-white` 와 다르다.** 그쪽은 바탕이 **비어 있어** 뒤의 사진이 비치는
440
+ 테두리 단추고, 이쪽은 바탕이 **흰 판**이다. 사진 위에 글자가 묻히면 이쪽을 쓴다.
441
+
442
+ **테마를 안 따라간다 — 일부러다.** `--color-pureWhite` 는 어두운 테마에서 `#0f1215`
443
+ 로 **뒤집힌다**(`tokens.css`). 그 토큰을 쓰면 `white` 라 적은 단추가 어두운 테마에서
444
+ 검게 떠 이름이 거짓말을 한다. 게다가 이 둘이 놓이는 자리(브랜드색 띠 · 사진)는 테마와
445
+ 함께 안 바뀌는 자리다. 바탕을 따라가야 하면 `default` 가 그 일을 한다.
446
+ `Badge` 의 `white` · `black` 도 같은 까닭으로 같은 값을 박았다(`Badge.css`).
447
+
448
+ hover 색을 새로 고르지 않고 **섞어서** 쓴다 — 색은 사장님 자리라, 있는 두 색
449
+ (`--color-main` · 흰검)에서 뽑는다. 눌린 꼴(`is-selected`)은 **뒤집는다**:
450
+ 흰 단추는 브랜드색이 되고 검은 단추는 희어진다.
451
+
452
+ **명암비는 앱의 `--brand-main` 에 달렸다** — `white` 의 글자가 본색이라서다.
453
+ 디자인 시스템 기본값(#499cdf)으로는 흰 바탕에 **2.96:1** 로 AA 아래지만, 말귀의
454
+ 브랜드색(#211f9f)으로는 **11.92:1** 이다. `black` 은 어느 브랜드색에서도 **21:1** 이다.
455
+ `test/buttonWhiteBlackVariants1106.test.tsx` 가 이 수를 셈으로 들고 있다. */
456
+ .button--variant-white {
457
+ background: #ffffff;
458
+ color: var(--color-main);
459
+ --button-subLabel-color: var(--color-gray);
460
+ border: var(--button-border, 1px solid #ffffff);
461
+ }
462
+
463
+ .button--variant-white:hover,
464
+ .button--variant-white:focus-visible {
465
+ background: color-mix(in srgb, var(--color-main) 8%, #ffffff);
466
+ border-color: color-mix(in srgb, var(--color-main) 8%, #ffffff);
467
+ }
468
+
469
+ /* 눌리면 뒤집는다 — 다만 **테두리는 제 이름 색을 지킨다.**
470
+ 처음에는 테두리도 함께 뒤집었는데, 브랜드색 판 위에서 눌린 흰 단추가 판과 같은 색이 되어
471
+ **통째로 사라졌다**(실측 2026-11-06: 단추 bg 73,156,223 · 판 73,156,223). 검은 쪽도 흰 판에서
472
+ 똑같이 사라졌다. 테두리를 흰색으로 두면 눌린 자리가 윤곽으로 남는다. */
473
+ .button--variant-white.is-selected,
474
+ .button--variant-white[aria-pressed='true'] {
475
+ background: var(--color-main);
476
+ color: #ffffff;
477
+ --button-subLabel-color: var(--color-white-a80);
478
+ border-color: #ffffff;
479
+ }
480
+
481
+ .button--variant-black {
482
+ background: #000000;
483
+ color: #ffffff;
484
+ --button-subLabel-color: var(--color-white-a80);
485
+ border: var(--button-border, 1px solid #000000);
486
+ }
487
+
488
+ .button--variant-black:hover,
489
+ .button--variant-black:focus-visible {
490
+ background: color-mix(in srgb, #ffffff 16%, #000000);
491
+ border-color: color-mix(in srgb, #ffffff 16%, #000000);
492
+ }
493
+
494
+ .button--variant-black.is-selected,
495
+ .button--variant-black[aria-pressed='true'] {
496
+ background: #ffffff;
497
+ color: #000000;
498
+ --button-subLabel-color: var(--color-gray);
499
+ border-color: #000000;
500
+ }
501
+
502
+
391
503
 
392
504
 
393
505
 
@@ -475,7 +587,7 @@
475
587
  이벤트를 아예 안 내보낸다(2026-09-09 실측). `onDisabledClick` 을 준
476
588
  경우에는 `disabled` 속성 자체를 안 달므로 이 규칙에 걸리지도 않는다.
477
589
 
478
- hover 모양이 새지도 않는다 — hover 규칙 일곱은 모두
590
+ hover 모양이 새지도 않는다 — hover 규칙은 하나도 빠짐없이
479
591
  `.button--variant-<이름>:hover` 인데 막히면 그 자리가
480
592
  `--variant-disabled*` 로 바뀌어 하나도 안 걸린다(실측으로 확인). */
481
593
  .button:disabled,
@@ -12,7 +12,7 @@ import { isTouchPointer, recentlyTouched, useTouchToggle } from '../hooks/touchT
12
12
  /* **ref 는 forwardRef 로 받는다** — React 19 는 ref 를 props 로 넘기지만 peer 는 16.8~ 라, React 18(kscan) 에서는 함수 컴포넌트에 준
13
13
  ref 가 버려진다. 게다가 전에는 안쪽 ref(`btnRef`)가 props 에서 온 ref 를 덮어써 19 에서도 부르는 쪽 ref 가 비었다. 두 ref 를 잇는다. */
14
14
  function ButtonInner(props, forwardedRef) {
15
- const { size = 48, type: explicitType, htmlType, href, target, rel, icon, rightIcon, label: labelProp, count, subLabel, children, ariaLabel, variant = 'default', align = 'center', nowrap = false, selected, toggleable = false, ariaExpanded, ariaControls, disabled = false, loading = false, useLabel = true, useBorder = true, useBG = true, useDisabledCovered = false, useDisabledInvisible = false, useDisabledFilled = false, width, minWidth, onClick, onDisabledClick, showTooltipInfo = false, tooltipInfoText = null, tooltipDescription = null, tooltipOnly = false, iconSize = 'medium', iconColor, shape = 'rounded', color, className, ...rest } = props;
15
+ const { size = 48, type: explicitType, htmlType, href, target, rel, icon, rightIcon, label: labelProp, count, subLabel, children, ariaLabel, variant = 'default', align = 'center', nowrap = false, ellipsis = false, selected, toggleable = false, ariaExpanded, ariaControls, disabled = false, loading = false, useLabel = true, useBorder = true, useBG = true, useDisabledCovered = false, useDisabledInvisible = false, useDisabledFilled = false, width, minWidth, onClick, onDisabledClick, showTooltipInfo = false, tooltipInfoText = null, tooltipDescription = null, tooltipOnly = false, iconSize = 'medium', iconColor, shape = 'rounded', color, className, ...rest } = props;
16
16
  const sizeKey = typeof size === 'string' && isNaN(Number(size))
17
17
  ? size.toLowerCase()
18
18
  : String(Number(size) || 48);
@@ -34,6 +34,7 @@ function ButtonInner(props, forwardedRef) {
34
34
  const variantClass = effectiveVariant ? `button--variant-${effectiveVariant}` : '';
35
35
  const alignClass = align ? `button--align-${align}` : '';
36
36
  const nowrapClass = nowrap ? 'button--nowrap' : '';
37
+ const ellipsisClass = ellipsis ? 'button--ellipsis' : '';
37
38
  const shapeClass = shape ? `button--shape-${shape}` : '';
38
39
  const resolvedIconColor = typeof iconColor === 'string' && iconColor.startsWith('--')
39
40
  ? `var(${iconColor})`
@@ -146,7 +147,7 @@ function ButtonInner(props, forwardedRef) {
146
147
  : (toggleable || typeof selected === 'boolean')
147
148
  ? (isSelected ? 'true' : 'false')
148
149
  : rest['aria-pressed'];
149
- const classes = cx('button', sizeBase, sizeTypeClass, variantClass, alignClass, nowrapClass, shapeClass, isSelected ? 'is-selected' : null, !useBG ? 'button--no-bg' : null, tooltipOnly ? 'button--tooltip-only' : null, className);
150
+ const classes = cx('button', sizeBase, sizeTypeClass, variantClass, alignClass, nowrapClass, ellipsisClass, shapeClass, isSelected ? 'is-selected' : null, !useBG ? 'button--no-bg' : null, tooltipOnly ? 'button--tooltip-only' : null, className);
150
151
  const iconClassName = `button__icon button__icon--${iconSize}`;
151
152
  const subLabels = Array.isArray(subLabel) ? subLabel : (subLabel !== undefined ? [subLabel] : []);
152
153
  const renderLabelContent = () => {
@@ -600,3 +600,36 @@
600
600
  @media (max-width: 767px) {
601
601
  .chart-section--stat { padding: 12px 14px 16px; }
602
602
  }
603
+
604
+ /* ── `xSmall` — 120 × 120 정사각(말귀_1 청 (372) · 사장님 지시 2026-11-03) ─────────
605
+ 꼴은 작은 카드(`--compact`) 그대로다. 다른 것은 **하한 폭**뿐이다 — `--compact` 의
606
+ 160 이 남아 있으면 120 격자 칸을 40 넘쳐 곁 카드를 밀어낸다.
607
+ `--compact`(그리고 그 뒤의 `--grid`)보다 **뒤에 서야** 같은 급에서 이긴다 — 파일 끝. */
608
+ .chart-section--xsmall {
609
+ min-width: 0;
610
+ }
611
+ /* **제목을 재는 쌍둥이.** 안 보이고(`visibility`), 흐름에서 빠져 자리를 안 차지하고
612
+ (`absolute`), 낭독기에도 안 든다(마크업의 `aria-hidden`).
613
+ `nowrap` + `max-content` 라 **제 글자만큼** 넓다 — 카드가 120 이든 260 이든 같은 수가
614
+ 나오고, 그래서 내려앉은 뒤 다시 재도 셈이 안 돈다. */
615
+ .chart-section__title--probe {
616
+ position: absolute;
617
+ top: 0;
618
+ left: 0;
619
+ width: max-content;
620
+ max-width: none;
621
+ white-space: nowrap;
622
+ visibility: hidden;
623
+ pointer-events: none;
624
+ }
625
+ /* **안 들어 `small` 로 내려앉은 카드가 단다** — 120 격자에서 두 칸을 쓴다(120×2 + 20 = 260).
626
+
627
+ 이름에 `xsmall` 을 안 넣은 까닭: `--xsmall-wide` 는 `--xsmall` 을 **앞글자로 품어**,
628
+ 글자로 찾는 쪽(`className.includes`·grep)이 내려앉은 카드를 120 카드로 읽는다.
629
+ 실제로 이 못을 쓰다 한 번 걸렸다(2026-11-03).
630
+ `min-width: 260px` 를 쓰지 않는 것은 칸이 하나뿐인 격자(좁은 폰)에서 가로로 넘치기
631
+ 때문이다 — `span 2` 는 그때 한 칸으로 접히고, 카드는 `small` 의 꼴이라 **넘치는 대신
632
+ 키가 늘어난다.** 잘리지 않는 쪽으로 무너진다. */
633
+ .chart-section--span-two {
634
+ grid-column: span 2;
635
+ }
@@ -85,6 +85,7 @@ export type ChartSectionType = 'chart' | 'stat';
85
85
  *
86
86
  * | 급 | 보기 | 상자(실측 2026-11-02, 폭 1430) |
87
87
  * |---|---|---|
88
+ * | `xSmall` | `총 고객` — 수 하나(제목도 수도 짧은 것) | 120 × **120** |
88
89
  * | `small` | `총 고객` — 수 하나 | 260 × **120** |
89
90
  * | `medium` | `금일 방문 예정` · 작은 고리 카드 | 260 × **260** |
90
91
  * | `large` | `상세 방문 현황` — 격자 두 칸에 서는 차트 카드 | 두 칸 폭 × 260 이상 |
@@ -105,7 +106,7 @@ export type ChartSectionType = 'chart' | 'stat';
105
106
  * 수를 바로 줘도 된다(px) — 프리셋이 안 맞는 자리용 탈출구다.
106
107
  * @public
107
108
  */
108
- export type ChartSectionSize = 'small' | 'medium' | 'large' | 'xLarge';
109
+ export type ChartSectionSize = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge';
109
110
  /** @deprecated `ChartSectionSize` 를 쓴다 — `auto`→`small` · `ring`→`medium`(2026-11-02) @public */
110
111
  export type StatChartSize = ChartSectionSize;
111
112
  /** @public */
@@ -130,8 +131,12 @@ export interface ChartSectionProps {
130
131
  change?: number;
131
132
  /** `stat` 전용 — 증감 색. 안 주면 `change` 의 부호로 정한다(양수=up, 음수=down, 0=neutral) */
132
133
  changeType?: StatChartChangeType;
133
- /** 카드의 급 — `small` · `medium` · `large` · `xLarge`, 또는 키를 px 로 바로.
134
- * 안 주면 갈래를 따른다(`stat`→`small` · `chart`→`large`) */
134
+ /** 카드의 급 — `xSmall` · `small` · `medium` · `large` · `xLarge`, 또는 키를 px 로 바로.
135
+ * 안 주면 갈래를 따른다(`stat`→`small` · `chart`→`large`).
136
+ *
137
+ * `xSmall`(120×120)은 **수 칸 전용**이고, **제 발로 내려앉는다** — 제목이 한 줄에 안
138
+ * 들거나 큰 수가 속폭을 넘으면 코어가 `small`(260×120)로 바꿔 그린다. 영어로 바뀌는
139
+ * 날·수가 한 자리 자라는 날 부르는 쪽이 고쳐 줄 것이 없다. */
135
140
  size?: ChartSectionSize | number;
136
141
  /** `stat` 전용 — 값 아래 자리가 서는 곳. `bottom`(기본, 카드 바닥) · `center` */
137
142
  bodyAlign?: StatChartBodyAlign;