@ihabdevteam/core 0.443.0 → 0.444.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 (40) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components.cjs.js +186 -181
  3. package/dist/components.esm.css +1 -1
  4. package/dist/hooks.cjs.js +5 -5
  5. package/dist/i18n.cjs.js +3 -3
  6. package/dist/ihabdevteam-core.cjs.js +191 -186
  7. package/dist/ihabdevteam-core.d.ts +101 -2
  8. package/dist/packages/core/src/components/DatePicker.css +8 -0
  9. package/dist/packages/core/src/components/DatePicker.js +13 -1
  10. package/dist/packages/core/src/components/FolderAddPopup.d.ts +25 -0
  11. package/dist/packages/core/src/components/FolderAddPopup.js +21 -0
  12. package/dist/packages/core/src/components/FolderList.css +18 -0
  13. package/dist/packages/core/src/components/FolderList.d.ts +28 -0
  14. package/dist/packages/core/src/components/FolderList.js +23 -0
  15. package/dist/packages/core/src/components/PagePopup.d.ts +10 -1
  16. package/dist/packages/core/src/components/PagePopup.js +7 -1
  17. package/dist/packages/core/src/components/Popup/Popup.css +14 -0
  18. package/dist/packages/core/src/components/Popup/Popup.d.ts +9 -0
  19. package/dist/packages/core/src/components/Popup/Popup.js +21 -3
  20. package/dist/packages/core/src/components/TextField.css +20 -0
  21. package/dist/packages/core/src/components/TextField.d.ts +17 -0
  22. package/dist/packages/core/src/components/TextField.js +19 -4
  23. package/dist/packages/core/src/components/Training/TrainingBlockGrid.js +25 -1
  24. package/dist/packages/core/src/components.d.ts +4 -0
  25. package/dist/packages/core/src/components.js +2 -0
  26. package/dist/packages/core/src/hooks/useBackClosable.d.ts +8 -0
  27. package/dist/packages/core/src/hooks/useBackClosable.js +97 -0
  28. package/dist/packages/core/src/hooks.d.ts +1 -0
  29. package/dist/packages/core/src/hooks.js +1 -0
  30. package/dist/packages/core/src/i18n/locales/en.json +10 -3
  31. package/dist/packages/core/src/i18n/locales/ko.json +10 -3
  32. package/dist/packages/core/src/utils/jamoSpeech.d.ts +19 -0
  33. package/dist/packages/core/src/utils/jamoSpeech.js +53 -0
  34. package/dist/packages/core/src/utils/lucideIconSet.js +2 -0
  35. package/dist/packages/core/src/utils/wordTrainingGenerators.d.ts +1 -6
  36. package/dist/packages/core/src/utils/wordTrainingGenerators.js +3 -45
  37. package/dist/packages/core/src/version.d.ts +1 -1
  38. package/dist/packages/core/src/version.js +1 -1
  39. package/dist/utils.cjs.js +136 -131
  40. package/package.json +1 -1
@@ -2227,7 +2227,7 @@ export declare function copyText(text: string): Promise<boolean>;
2227
2227
  *
2228
2228
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
2229
2229
  */
2230
- export declare const CORE_VERSION = "0.443.0";
2230
+ export declare const CORE_VERSION = "0.444.0";
2231
2231
 
2232
2232
  /** @public */
2233
2233
  declare const coreDefault: Record<string, unknown>;
@@ -3228,6 +3228,33 @@ export declare type FlowState = {
3228
3228
 
3229
3229
  export declare function fmtBytes(n: number): string;
3230
3230
 
3231
+ /**
3232
+ * **폴더 추가 창**(말귀 청 (438) ㉴ — 말귀 앱에서 옮겨 왔다, 2026-11-14). `FolderHead` · `FolderGrid` · `FolderList` 와 한 벌이다.
3233
+ *
3234
+ * 작은 확인 창, 제목 아래 부제, 이름표 없는 입력칸 하나, 취소 · 추가.
3235
+ * · **못 만들 이름이면 「추가」 가 꺼진다**(`canAdd`).
3236
+ * · **닫는 길을 넘겨준다**(`onAdd(close)`) — 되면 그때 닫는다. 이름이 틀렸을 때 열린 채로 남아야 고쳐 넣는다.
3237
+ * · **한글을 조합하는 중의 Enter 로는 안 만든다** — 조합 확정 Enter 는 `TextField.onEnter` 가 가린다.
3238
+ * · 글 넷은 코어 사전(`folder.add.*` · `common.add`)이다.
3239
+ * @public
3240
+ */
3241
+ export declare function FolderAddPopup({ value, onChange, canAdd, error, onAdd, onClose, maxLength }: FolderAddPopupProps): JSX.Element;
3242
+
3243
+ /** @public */
3244
+ export declare interface FolderAddPopupProps {
3245
+ value: string;
3246
+ onChange: (value: string) => void;
3247
+ /** 지금 이름으로 만들 수 있나 — 아니면 「추가」 가 꺼지고 Enter 도 안 먹는다. 무엇이 못 만들 이름인지는 화면이 정한다 */
3248
+ canAdd: boolean;
3249
+ /** 입력칸 아래에 보일 말(이미 있는 이름 등) — 없으면 안 선다 */
3250
+ error?: string;
3251
+ /** 만든다 — 받은 `close` 로 닫는다(안 부르면 창이 남아 이름을 고쳐 넣는다) */
3252
+ onAdd: (close: () => void) => void;
3253
+ onClose: () => void;
3254
+ /** 이름 길이 상한 — 폴더 이름은 길과 폴더 칸에 그대로 나온다. 안 주면 상한 없음 */
3255
+ maxLength?: number;
3256
+ }
3257
+
3231
3258
  /** @public `parent` 바로 아래의 폴더들(한 층만) — `parent` 가 `null` 이면 맨 위의 폴더들. 받은 차례 그대로 */
3232
3259
  export declare function folderChildren(paths: readonly string[], parent: string | null): string[];
3233
3260
 
@@ -3327,6 +3354,34 @@ export declare const folderJoin: (parent: string | null, name: string) => string
3327
3354
  /** @public 화면에 보일 이름 — 길의 마지막 마디 */
3328
3355
  export declare function folderLeaf(path: string): string;
3329
3356
 
3357
+ /**
3358
+ * **폴더로 볼 때 지금 자리의 목록**(말귀 청 (438) ㉴ — 말귀 앱에서 옮겨 왔다, 2026-11-14).
3359
+ *
3360
+ * 맨 위면 그룹 없는 것, 폴더 안이면 그 폴더의 카드가 쪽 바탕에 바로 선다. 카드는 제 폭을 쥐고 있어 드는 만큼
3361
+ * 나란히 서고, 한 줄의 카드는 키를 맞춘다. **끌어다 놓는 자리는 남는다** — 맨 위의 목록은 '그룹 없음' 으로
3362
+ * 되돌리는 자리다. `FolderHead` · `FolderGrid` 와 한 벌이다.
3363
+ *
3364
+ * 앱 사본과 다른 것 하나: **정렬을 안 한다.** 앱 사본은 앱의 정렬 셈을 불렀다 — 세운 줄을 받으면 앱에 기대는
3365
+ * 것이 없다.
3366
+ * @public
3367
+ */
3368
+ export declare function FolderList<T>({ rows, rowRender, emptySpeech, dropProps, dropOver, className }: FolderListProps<T>): JSX.Element | null;
3369
+
3370
+ /** @public */
3371
+ export declare interface FolderListProps<T> {
3372
+ /** 그릴 줄 — **이미 세운 차례대로** 준다. 정렬은 부르는 쪽이 한다(정렬 열쇠는 화면마다 다르다) */
3373
+ rows: T[];
3374
+ /** 줄 하나를 그린다 — 두 번째 인자는 그 줄의 자리(0부터) */
3375
+ rowRender: (row: T, slot: number) => ReactNode;
3376
+ /** 비었을 때의 말 — 안 주면 비었을 때 아무것도 안 선다(맨 위처럼 폴더만 서면 되는 자리) */
3377
+ emptySpeech?: string;
3378
+ /** 끌어다 놓는 손(`useCardDragToGroup` 의 받는 쪽 등) — 목록 칸(비었으면 빈 말)에 그대로 얹는다 */
3379
+ dropProps?: HTMLAttributes<HTMLElement> | Record<string, unknown>;
3380
+ /** 끈 것이 이 위에 있다 — 테두리 빛을 켠다 */
3381
+ dropOver?: boolean;
3382
+ className?: string;
3383
+ }
3384
+
3330
3385
  /** @public 폴더 메뉴의 줄을 정해진 차례 · 아이콘으로 짓는다 */
3331
3386
  export declare function folderMenuItems(lines: {
3332
3387
  /** 이 자리에 하나 더 만든다(무엇을 만드는지는 화면 몫) */
@@ -5702,7 +5757,7 @@ declare type PageNumberPosition = 'left' | 'center' | 'right' | 'none';
5702
5757
  * · Tab 은 판 안을 돈다(`useFocusTrap`).
5703
5758
  * @public
5704
5759
  */
5705
- export declare function PagePopup({ children, top, bottom, mode, contentFull, closing, className, 'aria-label': ariaLabel }: PagePopupProps): JSX.Element;
5760
+ export declare function PagePopup({ children, top, bottom, mode, contentFull, closing, onClose, backClosable, beforeClose, className, 'aria-label': ariaLabel }: PagePopupProps): JSX.Element;
5706
5761
 
5707
5762
  /** @public */
5708
5763
  export declare interface PagePopupProps {
@@ -5717,6 +5772,15 @@ export declare interface PagePopupProps {
5717
5772
  contentFull?: boolean;
5718
5773
  /** 닫히는 중 — `usePagePopupClose` 의 `closing` 을 넘긴다 */
5719
5774
  closing?: boolean;
5775
+ /**
5776
+ * 닫는 손 — 주면 **폰 '뒤로' 가 이 창을 닫는다**(말귀 청 (438) ㉯, 2026-11-14). 보통 `usePagePopupClose` 의
5777
+ * `handleClose` 를 넘긴다. 이 껍데기는 닫기 단추를 그리지 않으므로(단추는 `top` 에 부르는 쪽이 넣는다) 뒤로에만 쓴다.
5778
+ */
5779
+ onClose?: () => void;
5780
+ /** 뒤로로 닫기 — 기본 true. `onClose` 가 있을 때만 건다. 길(route)로 띄운 창은 끈다. */
5781
+ backClosable?: boolean;
5782
+ /** 뒤로가 왔을 때 먼저 묻는다 — `false` 면 안 닫고 그대로 둔다(고치다 만 것을 확인 창으로 묻는 자리). `Popup` 과 같다. */
5783
+ beforeClose?: () => boolean;
5720
5784
  className?: string;
5721
5785
  'aria-label'?: string;
5722
5786
  }
@@ -6909,6 +6973,15 @@ export declare interface PopupProps {
6909
6973
  * 바깥을 잘못 눌러 입력이 날아가면 안 되는 창은 `beforeClose` 로 묻거나 이것을 끈다.
6910
6974
  */
6911
6975
  closeOnBackdrop?: boolean;
6976
+ /**
6977
+ * **폰 '뒤로' 로 닫는다.** 기본 true(말귀 청 (438) ㉯, 2026-11-14).
6978
+ *
6979
+ * 열릴 때 역사 칸 하나를 쌓고, 뒤로가 오면 **맨 위 창 하나만** 닫는다(`useBackClosable`). 닫기는
6980
+ * X · ESC 와 같은 길이라 `closeDisabled` · `beforeClose` 가 막으면 안 닫히고 칸이 도로 쌓인다.
6981
+ * ESC 와 같은 조건(`inline` 이 아니고 `onClose` 가 있을 때)에서만 건다. 길(route)로 띄운 창처럼
6982
+ * 뒤로가 이미 제 뜻을 갖는 자리는 끈다.
6983
+ */
6984
+ backClosable?: boolean;
6912
6985
  className?: string;
6913
6986
  /**
6914
6987
  * 다이얼로그 접근명 — 제목을 그리지 않는 팝업(`title` 이 없거나 useTitle=false)에서 쓴다.
@@ -9742,6 +9815,23 @@ export declare interface TextFieldProps {
9742
9815
  /** 모바일 키패드 종류 힌트 */
9743
9816
  inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
9744
9817
  autoComplete?: string;
9818
+ /**
9819
+ * 첫 글자 대문자 바꾸기(모바일 키보드) — `<input>` 에 그대로 넘긴다(말귀 청 (438) ㉰, 2026-11-14).
9820
+ *
9821
+ * **안 주면 칸의 쓰임을 보고 정한다** — `type` 이 `email`·`tel`·`password`·`url` 이거나
9822
+ * `autoComplete` 가 `username`·`email`·`one-time-code` 면 `'none'`, 그 밖은 브라우저 기본.
9823
+ * iOS 가 로그인 아이디 첫 글자를 대문자로 바꿔 '아이디가 틀렸다' 가 났다.
9824
+ */
9825
+ autoCapitalize?: 'none' | 'off' | 'sentences' | 'words' | 'characters' | 'on';
9826
+ /** 자동 고침(iOS) — 기본은 `autoCapitalize` 와 같은 칸에서 `'off'`. 그 밖은 브라우저 기본. */
9827
+ autoCorrect?: 'on' | 'off';
9828
+ /**
9829
+ * 비밀번호 보기/숨기기 단추(말귀 청 (438) ㉱) — `type="password"` 일 때만 선다. 기본 거짓.
9830
+ *
9831
+ * 단추는 지우기 단추 뒤, `rightIcon` 앞에 **나란히** 선다(겹치지 않는다). 보일 때도 값은
9832
+ * HTML 속성에 안 박힌다 — 비밀번호 칸의 평문 보호(아래 `isPasswordControlled`)는 **원래 `type`** 을 본다.
9833
+ */
9834
+ revealable?: boolean;
9745
9835
  className?: string;
9746
9836
  onFocus?: (e: FocusEvent_2<HTMLInputElement | HTMLTextAreaElement>) => void;
9747
9837
  onBlur?: (e: FocusEvent_2<HTMLInputElement | HTMLTextAreaElement>) => void;
@@ -11627,6 +11717,15 @@ export declare interface UseAnchoredMenuResult<Trigger extends HTMLElement, Menu
11627
11717
  menuRef: RefObject<Menu | null>;
11628
11718
  }
11629
11719
 
11720
+ /**
11721
+ * 열려 있는 동안 폰 '뒤로' 로 닫히게 한다.
11722
+ *
11723
+ * @param open 열려 있는가. 거짓이면 아무것도 안 한다.
11724
+ * @param onBack 뒤로가 왔을 때 부른다 — 닫는다. **`false` 를 돌려주면 안 닫은 것**으로 보고 칸을 도로 쌓는다.
11725
+ * @public
11726
+ */
11727
+ export declare function useBackClosable(open: boolean, onBack: () => boolean | void): void;
11728
+
11630
11729
  /**
11631
11730
  * BarChart 기간 상태/옵션/네비게이션을 캡슐화한 훅.
11632
11731
  * 여러 BarChart가 하나의 컨트롤을 공유하려면 이 훅을 상위에서 호출해 control을 내려준다.
@@ -243,3 +243,11 @@
243
243
  cursor: not-allowed;
244
244
  }
245
245
 
246
+
247
+ /* **다 쳤는데 못 받는 날짜** — 칸에만 빨간 줄, 값은 안 바뀐다(말귀 청 (438) ㉲, 2026-11-14).
248
+ 색은 `TextField` 의 오류 꼴과 같은 토큰이다. 열린 꼴 · 포커스 꼴보다 뒤에 두어 이긴다. */
249
+ .date-picker--invalid .date-picker__trigger,
250
+ .date-picker--invalid .date-picker__trigger:focus {
251
+ border-color: var(--color-error);
252
+ box-shadow: 0 0 0 3px var(--color-error-a10);
253
+ }
@@ -354,6 +354,18 @@ export default function DatePicker({ value, onChange, size: sizeProp, min, max,
354
354
  const [y, m] = iso.split('-');
355
355
  setViewYM(+y, +m - 1);
356
356
  }, [min, max, onChange, setViewYM]);
357
+ /**
358
+ * **다 쳤는데 못 받는 글** — 빨간 줄만 두고 값은 안 바꾼다(말귀 청 (438) ㉲, 2026-11-14).
359
+ *
360
+ * 숫자 여덟을 다 쳤는데 없는 날이거나 `min`·`max` 밖이면 칸에만 표시한다. 치는 중(여덟 아래)에는
361
+ * 아직 틀린 것이 아니라 안 칠한다. 칸을 떠나면 친 글을 버리므로(아래) 표시도 같이 사라진다.
362
+ */
363
+ const typedInvalid = (() => {
364
+ if (typed == null || typed.replace(/\D/g, '').length < 8)
365
+ return false;
366
+ const iso = parseTyped(typed);
367
+ return !iso || (!!min && iso < min) || (!!max && iso > max);
368
+ })();
357
369
  /** 다 못 친 글은 **버린다** — 고른 값으로 되돌린다. 반쪽 글을 남겨 두면 날짜처럼 보인다 */
358
370
  const commitTyped = useCallback(() => { setTyped(null); }, []);
359
371
  const onFieldKeyDown = useCallback((e) => {
@@ -381,5 +393,5 @@ export default function DatePicker({ value, onChange, size: sizeProp, min, max,
381
393
  const col = (i % 7);
382
394
  return (_jsx("button", { type: "button", disabled: dis, "data-day": d, tabIndex: d === tabIndexOf ? 0 : -1, "aria-current": isToday ? 'date' : undefined, onClick: () => !dis && selectDay(d), className: cx('date-picker__day caption-1', isSelected && 'date-picker__day--selected', isToday && !isSelected && 'date-picker__day--today', dis && 'date-picker__day--disabled', col === 0 && 'date-picker__day--sun', col === 6 && 'date-picker__day--sat'), children: d }, d));
383
395
  })] })] }), document.body) : null;
384
- return (_jsxs("div", { className: cx('date-picker', `date-picker--s${size}`, open && 'date-picker--open', className), children: [_jsxs("div", { className: "date-picker__field", children: [_jsx("input", { ref: triggerRef, type: "text", className: "date-picker__trigger body-2", value: typed ?? formatDisplay(value), placeholder: placeholder, onChange: (e) => onTyped(e.target.value), onClick: () => !disabled && !open && toggle(), onKeyDown: onFieldKeyDown, onBlur: commitTyped, disabled: disabled, "aria-haspopup": "dialog", "aria-expanded": open, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, inputMode: "numeric", autoComplete: "off" }), _jsx("button", { type: "button", className: "date-picker__icon-btn", onClick: () => !disabled && toggle(), disabled: disabled, tabIndex: -1, "aria-label": placeholder, "aria-haspopup": "dialog", "aria-expanded": open, children: _jsx(Calendar, { size: iconSize, className: "date-picker__icon", strokeWidth: 1.5 }) })] }), dropdown] }));
396
+ return (_jsxs("div", { className: cx('date-picker', `date-picker--s${size}`, open && 'date-picker--open', typedInvalid && 'date-picker--invalid', className), children: [_jsxs("div", { className: "date-picker__field", children: [_jsx("input", { ref: triggerRef, type: "text", className: "date-picker__trigger body-2", value: typed ?? formatDisplay(value), placeholder: placeholder, onChange: (e) => onTyped(e.target.value), onClick: () => !disabled && !open && toggle(), onKeyDown: onFieldKeyDown, onBlur: commitTyped, disabled: disabled, "aria-haspopup": "dialog", "aria-expanded": open, "aria-invalid": typedInvalid || undefined, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, inputMode: "numeric", autoComplete: "off" }), _jsx("button", { type: "button", className: "date-picker__icon-btn", onClick: () => !disabled && toggle(), disabled: disabled, tabIndex: -1, "aria-label": placeholder, "aria-haspopup": "dialog", "aria-expanded": open, children: _jsx(Calendar, { size: iconSize, className: "date-picker__icon", strokeWidth: 1.5 }) })] }), dropdown] }));
385
397
  }
@@ -0,0 +1,25 @@
1
+ /** @public */
2
+ export interface FolderAddPopupProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ /** 지금 이름으로 만들 수 있나 — 아니면 「추가」 가 꺼지고 Enter 도 안 먹는다. 무엇이 못 만들 이름인지는 화면이 정한다 */
6
+ canAdd: boolean;
7
+ /** 입력칸 아래에 보일 말(이미 있는 이름 등) — 없으면 안 선다 */
8
+ error?: string;
9
+ /** 만든다 — 받은 `close` 로 닫는다(안 부르면 창이 남아 이름을 고쳐 넣는다) */
10
+ onAdd: (close: () => void) => void;
11
+ onClose: () => void;
12
+ /** 이름 길이 상한 — 폴더 이름은 길과 폴더 칸에 그대로 나온다. 안 주면 상한 없음 */
13
+ maxLength?: number;
14
+ }
15
+ /**
16
+ * **폴더 추가 창**(말귀 청 (438) ㉴ — 말귀 앱에서 옮겨 왔다, 2026-11-14). `FolderHead` · `FolderGrid` · `FolderList` 와 한 벌이다.
17
+ *
18
+ * 작은 확인 창, 제목 아래 부제, 이름표 없는 입력칸 하나, 취소 · 추가.
19
+ * · **못 만들 이름이면 「추가」 가 꺼진다**(`canAdd`).
20
+ * · **닫는 길을 넘겨준다**(`onAdd(close)`) — 되면 그때 닫는다. 이름이 틀렸을 때 열린 채로 남아야 고쳐 넣는다.
21
+ * · **한글을 조합하는 중의 Enter 로는 안 만든다** — 조합 확정 Enter 는 `TextField.onEnter` 가 가린다.
22
+ * · 글 넷은 코어 사전(`folder.add.*` · `common.add`)이다.
23
+ * @public
24
+ */
25
+ export default function FolderAddPopup({ value, onChange, canAdd, error, onAdd, onClose, maxLength }: FolderAddPopupProps): import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useTranslation } from 'react-i18next';
4
+ import ConfirmPopup from './Popup/ConfirmPopup';
5
+ import TextField from './TextField';
6
+ /**
7
+ * **폴더 추가 창**(말귀 청 (438) ㉴ — 말귀 앱에서 옮겨 왔다, 2026-11-14). `FolderHead` · `FolderGrid` · `FolderList` 와 한 벌이다.
8
+ *
9
+ * 작은 확인 창, 제목 아래 부제, 이름표 없는 입력칸 하나, 취소 · 추가.
10
+ * · **못 만들 이름이면 「추가」 가 꺼진다**(`canAdd`).
11
+ * · **닫는 길을 넘겨준다**(`onAdd(close)`) — 되면 그때 닫는다. 이름이 틀렸을 때 열린 채로 남아야 고쳐 넣는다.
12
+ * · **한글을 조합하는 중의 Enter 로는 안 만든다** — 조합 확정 Enter 는 `TextField.onEnter` 가 가린다.
13
+ * · 글 넷은 코어 사전(`folder.add.*` · `common.add`)이다.
14
+ * @public
15
+ */
16
+ export default function FolderAddPopup({ value, onChange, canAdd, error, onAdd, onClose, maxLength }) {
17
+ const { t } = useTranslation();
18
+ const placeholder = t('folder.add.placeholder', '폴더 이름');
19
+ return (_jsx(ConfirmPopup, { title: t('folder.add.title', '폴더 추가'), subtitle: t('folder.add.sub', '새 폴더 이름을 입력하세요.'), confirmLabel: t('common.add', '추가'), confirmDisabled: !canAdd, closeOnConfirm: false, onConfirm: close => onAdd(close), onClose: onClose, children: _jsx(TextField, { autoFocus: true, value: value, onChange: onChange, placeholder: placeholder, ariaLabel: placeholder, maxLength: maxLength, size: 48, fullWidth: true, error: error, onEnter: () => { if (canAdd)
20
+ onAdd(onClose); } }) }));
21
+ }
@@ -0,0 +1,18 @@
1
+ /* **폴더로 볼 때 지금 자리의 목록**(말귀 청 (438) ㉴) — 말귀 앱의 `training-folder-list` 를 그대로 옮겼다.
2
+ 카드는 제 폭(360 · 작은 것 120)을 쥐고 있어 드는 만큼 나란히 선다. 한 줄의 카드는 키를 맞춘다. */
3
+ .folder-list {
4
+ display: flex;
5
+ flex-wrap: wrap;
6
+ align-items: stretch;
7
+ gap: var(--spacing-s);
8
+ border-radius: var(--radius-m);
9
+ }
10
+ /* 카드가 자리보다 넓으면 줄어들 수 있게(폰) — 안 주면 360 이 버틴다 */
11
+ .folder-list > * { min-width: 0; }
12
+ .folder-list--over { box-shadow: 0 0 0 2px var(--color-main-a10); }
13
+ .folder-list__empty {
14
+ margin: 0;
15
+ padding: var(--spacing-xl) var(--spacing-m);
16
+ text-align: center;
17
+ color: var(--color-gray);
18
+ }
@@ -0,0 +1,28 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import './FolderList.css';
3
+ /** @public */
4
+ export interface FolderListProps<T> {
5
+ /** 그릴 줄 — **이미 세운 차례대로** 준다. 정렬은 부르는 쪽이 한다(정렬 열쇠는 화면마다 다르다) */
6
+ rows: T[];
7
+ /** 줄 하나를 그린다 — 두 번째 인자는 그 줄의 자리(0부터) */
8
+ rowRender: (row: T, slot: number) => ReactNode;
9
+ /** 비었을 때의 말 — 안 주면 비었을 때 아무것도 안 선다(맨 위처럼 폴더만 서면 되는 자리) */
10
+ emptySpeech?: string;
11
+ /** 끌어다 놓는 손(`useCardDragToGroup` 의 받는 쪽 등) — 목록 칸(비었으면 빈 말)에 그대로 얹는다 */
12
+ dropProps?: HTMLAttributes<HTMLElement> | Record<string, unknown>;
13
+ /** 끈 것이 이 위에 있다 — 테두리 빛을 켠다 */
14
+ dropOver?: boolean;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * **폴더로 볼 때 지금 자리의 목록**(말귀 청 (438) ㉴ — 말귀 앱에서 옮겨 왔다, 2026-11-14).
19
+ *
20
+ * 맨 위면 그룹 없는 것, 폴더 안이면 그 폴더의 카드가 쪽 바탕에 바로 선다. 카드는 제 폭을 쥐고 있어 드는 만큼
21
+ * 나란히 서고, 한 줄의 카드는 키를 맞춘다. **끌어다 놓는 자리는 남는다** — 맨 위의 목록은 '그룹 없음' 으로
22
+ * 되돌리는 자리다. `FolderHead` · `FolderGrid` 와 한 벌이다.
23
+ *
24
+ * 앱 사본과 다른 것 하나: **정렬을 안 한다.** 앱 사본은 앱의 정렬 셈을 불렀다 — 세운 줄을 받으면 앱에 기대는
25
+ * 것이 없다.
26
+ * @public
27
+ */
28
+ export default function FolderList<T>({ rows, rowRender, emptySpeech, dropProps, dropOver, className }: FolderListProps<T>): import("react").JSX.Element | null;
@@ -0,0 +1,23 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cx } from '../utils/cx';
4
+ import './FolderList.css';
5
+ /**
6
+ * **폴더로 볼 때 지금 자리의 목록**(말귀 청 (438) ㉴ — 말귀 앱에서 옮겨 왔다, 2026-11-14).
7
+ *
8
+ * 맨 위면 그룹 없는 것, 폴더 안이면 그 폴더의 카드가 쪽 바탕에 바로 선다. 카드는 제 폭을 쥐고 있어 드는 만큼
9
+ * 나란히 서고, 한 줄의 카드는 키를 맞춘다. **끌어다 놓는 자리는 남는다** — 맨 위의 목록은 '그룹 없음' 으로
10
+ * 되돌리는 자리다. `FolderHead` · `FolderGrid` 와 한 벌이다.
11
+ *
12
+ * 앱 사본과 다른 것 하나: **정렬을 안 한다.** 앱 사본은 앱의 정렬 셈을 불렀다 — 세운 줄을 받으면 앱에 기대는
13
+ * 것이 없다.
14
+ * @public
15
+ */
16
+ export default function FolderList({ rows, rowRender, emptySpeech, dropProps, dropOver = false, className }) {
17
+ if (rows.length === 0) {
18
+ return emptySpeech
19
+ ? _jsx("p", { className: cx('folder-list__empty body-3', className), ...dropProps, children: emptySpeech })
20
+ : null;
21
+ }
22
+ return (_jsx("div", { className: cx('folder-list', dropOver && 'folder-list--over', className), ...dropProps, children: rows.map((row, i) => rowRender(row, i)) }));
23
+ }
@@ -13,6 +13,15 @@ export interface PagePopupProps {
13
13
  contentFull?: boolean;
14
14
  /** 닫히는 중 — `usePagePopupClose` 의 `closing` 을 넘긴다 */
15
15
  closing?: boolean;
16
+ /**
17
+ * 닫는 손 — 주면 **폰 '뒤로' 가 이 창을 닫는다**(말귀 청 (438) ㉯, 2026-11-14). 보통 `usePagePopupClose` 의
18
+ * `handleClose` 를 넘긴다. 이 껍데기는 닫기 단추를 그리지 않으므로(단추는 `top` 에 부르는 쪽이 넣는다) 뒤로에만 쓴다.
19
+ */
20
+ onClose?: () => void;
21
+ /** 뒤로로 닫기 — 기본 true. `onClose` 가 있을 때만 건다. 길(route)로 띄운 창은 끈다. */
22
+ backClosable?: boolean;
23
+ /** 뒤로가 왔을 때 먼저 묻는다 — `false` 면 안 닫고 그대로 둔다(고치다 만 것을 확인 창으로 묻는 자리). `Popup` 과 같다. */
24
+ beforeClose?: () => boolean;
16
25
  className?: string;
17
26
  'aria-label'?: string;
18
27
  }
@@ -27,7 +36,7 @@ export interface PagePopupProps {
27
36
  * · Tab 은 판 안을 돈다(`useFocusTrap`).
28
37
  * @public
29
38
  */
30
- export default function PagePopup({ children, top, bottom, mode, contentFull, closing, className, 'aria-label': ariaLabel }: PagePopupProps): import("react").JSX.Element;
39
+ export default function PagePopup({ children, top, bottom, mode, contentFull, closing, onClose, backClosable, beforeClose, className, 'aria-label': ariaLabel }: PagePopupProps): import("react").JSX.Element;
31
40
  /**
32
41
  * **전체 화면 창이 사라지는 동안의 뒷일** — `PagePopup` 의 짝(말귀 청 (437) ㉰).
33
42
  *
@@ -5,6 +5,7 @@ import { cx } from '../utils/cx';
5
5
  import { useFocusTrap, FOCUSABLE_SELECTOR } from '../hooks/useFocusTrap';
6
6
  import { lockBodyScrollWithPadding } from '../hooks/bodyScrollLock';
7
7
  import { prefersReducedMotion } from '../hooks/usePrefersReducedMotion';
8
+ import { useBackClosable } from '../hooks/useBackClosable';
8
9
  import { PAGE_POPUP_CLOSE_MS } from './Training/pagePopupTiming';
9
10
  import './Training/TrainingPagePopup.css';
10
11
  /**
@@ -18,7 +19,12 @@ import './Training/TrainingPagePopup.css';
18
19
  * · Tab 은 판 안을 돈다(`useFocusTrap`).
19
20
  * @public
20
21
  */
21
- export default function PagePopup({ children, top, bottom, mode = 'top', contentFull = false, closing = false, className, 'aria-label': ariaLabel }) {
22
+ export default function PagePopup({ children, top, bottom, mode = 'top', contentFull = false, closing = false, onClose, backClosable = true, beforeClose, className, 'aria-label': ariaLabel }) {
23
+ useBackClosable(!!onClose && backClosable && !closing, () => {
24
+ if (beforeClose && beforeClose() === false)
25
+ return false;
26
+ onClose?.();
27
+ });
22
28
  const panelRef = useRef(null);
23
29
  const previouslyFocusedRef = useRef(typeof document === 'undefined' ? null : document.activeElement);
24
30
  useEffect(() => {
@@ -285,3 +285,17 @@
285
285
  margin-bottom: 20px;
286
286
  }
287
287
  .confirm-popup__top > * { max-width: 100%; }
288
+
289
+ /* ── 닫기(✕)의 닿는 자리는 44×44(말귀 청 (438) ㉱, 2026-11-14) ──
290
+ 보이는 단추는 40 그대로 두고, 손가락이 닿는 자리만 둘레로 넓힌다(WCAG 2.5.5 · Apple HIG 44pt).
291
+ 단추 밖에 서는 투명한 덧자리라 생김새와 자리 셈은 안 바뀐다. */
292
+ .popup-close-btn { position: relative; }
293
+ .popup-close-btn::after {
294
+ content: '';
295
+ position: absolute;
296
+ left: 50%;
297
+ top: 50%;
298
+ width: 44px;
299
+ height: 44px;
300
+ transform: translate(-50%, -50%);
301
+ }
@@ -125,6 +125,15 @@ export interface PopupProps {
125
125
  * 바깥을 잘못 눌러 입력이 날아가면 안 되는 창은 `beforeClose` 로 묻거나 이것을 끈다.
126
126
  */
127
127
  closeOnBackdrop?: boolean;
128
+ /**
129
+ * **폰 '뒤로' 로 닫는다.** 기본 true(말귀 청 (438) ㉯, 2026-11-14).
130
+ *
131
+ * 열릴 때 역사 칸 하나를 쌓고, 뒤로가 오면 **맨 위 창 하나만** 닫는다(`useBackClosable`). 닫기는
132
+ * X · ESC 와 같은 길이라 `closeDisabled` · `beforeClose` 가 막으면 안 닫히고 칸이 도로 쌓인다.
133
+ * ESC 와 같은 조건(`inline` 이 아니고 `onClose` 가 있을 때)에서만 건다. 길(route)로 띄운 창처럼
134
+ * 뒤로가 이미 제 뜻을 갖는 자리는 끈다.
135
+ */
136
+ backClosable?: boolean;
128
137
  className?: string;
129
138
  /**
130
139
  * 다이얼로그 접근명 — 제목을 그리지 않는 팝업(`title` 이 없거나 useTitle=false)에서 쓴다.
@@ -6,6 +6,7 @@ import { useTranslation } from "react-i18next";
6
6
  import Button from "../Button";
7
7
  import SegmentedControl from "../SegmentedControl";
8
8
  import { pushEsc } from "../../hooks/escStack";
9
+ import { useBackClosable } from "../../hooks/useBackClosable";
9
10
  import { lockBodyScroll } from "../../hooks/bodyScrollLock";
10
11
  import "./Popup.css";
11
12
  import { useFocusTrap, FOCUSABLE_SELECTOR } from '../../hooks/useFocusTrap';
@@ -17,7 +18,7 @@ const ANIM_MS = POPUP_CLOSE_MS; // 닫힘 시간은 한 곳(popupTiming.ts) —
17
18
  /** @public */
18
19
  export default function Popup(props) {
19
20
  const { t } = useTranslation();
20
- const { title, subtitle, headerActions, headerSegment, children, buttons, footer, footerStart, footerEnd, footerNote, footerNoteDivider = false, footerClassName = "", footerLayout = 'center', onClose, closeDisabled = false, beforeClose, closeOnBackdrop = true, className = "", ariaLabel, useTitle = true, inline = false, size, layer = 'modal', height, fillBody = false, resetScrollKey } = props || {};
21
+ const { title, subtitle, headerActions, headerSegment, children, buttons, footer, footerStart, footerEnd, footerNote, footerNoteDivider = false, footerClassName = "", footerLayout = 'center', onClose, closeDisabled = false, beforeClose, closeOnBackdrop = true, backClosable = true, className = "", ariaLabel, useTitle = true, inline = false, size, layer = 'modal', height, fillBody = false, resetScrollKey } = props || {};
21
22
  const [closing, setClosing] = useState(false);
22
23
  // 닫힘 애니메이션 중(260ms)엔 버튼이 시각적으로만 흐려질 뿐 클릭은 계속 가능해,
23
24
  // 그 사이 같은 버튼을 연타하면 cb(확인/완료 콜백)가 여러 번 예약되어 중복 실행된다.
@@ -197,6 +198,23 @@ export default function Popup(props) {
197
198
  return;
198
199
  return pushEsc(() => closeRef.current());
199
200
  }, [escEnabled]);
201
+ /* 폰 뒤로 — 맨 위 창 하나만 닫는다. 막히면(closeDisabled·beforeClose) false 를 돌려 칸을 도로 쌓게 한다(㉯) */
202
+ const beforeCloseRef = useRef(beforeClose);
203
+ useEffect(() => { beforeCloseRef.current = beforeClose; });
204
+ const closeDisabledRef = useRef(closeDisabled);
205
+ useEffect(() => { closeDisabledRef.current = closeDisabled; });
206
+ /* 묻는 것은 여기서 한 번만 — closeWithAnimation 을 부르면 beforeClose 가 두 번 불려 확인 창이 둘 뜬다 */
207
+ const closeNowRef = useRef(() => animateThen(onClose, true));
208
+ useEffect(() => { closeNowRef.current = () => animateThen(onClose, true); });
209
+ useBackClosable(escEnabled && backClosable, () => {
210
+ if (closeDisabledRef.current)
211
+ return false;
212
+ const ask = beforeCloseRef.current;
213
+ if (ask && ask() === false)
214
+ return false;
215
+ closeNowRef.current();
216
+ return true;
217
+ });
200
218
  /* 바탕 누르기 — **누른 곳과 뗀 곳이 둘 다 바탕일 때만** 닫는다.
201
219
  click 의 target 만 보면 패널 안에서 글자를 긁어 고르다 바깥에서 놓았을 때도
202
220
  바탕에서 click 이 떨어져 창이 닫힌다(브라우저는 공통 조상에 click 을 쏜다).
@@ -224,9 +242,9 @@ export default function Popup(props) {
224
242
  e.preventDefault(); }, children: _jsxs("div", { ref: panelRef, className: `popup-panel${size ? ` popup-panel--${size}` : ''}${height != null ? ' popup-panel--has-height' : ''}${fillBody ? ' popup-panel--fill-body' : ''}`,
225
243
  /* 높이는 **CSS 변수로** 넘긴다 — 인라인 height 로 박으면 앱의 미디어 규칙(좁은 화면만 다른 높이)이 못 이겼다.
226
244
  max-height(CSS)가 height 보다 이기므로 화면보다 크게 줘도 화면에 맞춰진다 */
227
- style: height != null ? { '--popup-height': typeof height === 'number' ? `${height}px` : height } : undefined, tabIndex: -1, role: inline ? undefined : 'dialog', "aria-modal": inline ? undefined : true, "aria-labelledby": !inline && useTitle && title ? titleId : undefined, "aria-label": !inline && !(useTitle && title) ? (ariaLabel ?? (typeof title === 'string' ? title : undefined)) : undefined, children: [!useTitle && (headerActions || onClose) ? (_jsxs("div", { className: "popup-close-float", children: [headerActions, onClose && _jsx(Button, { htmlType: "button", size: 40, type: "dot", icon: "x", variant: "transparent-gray", useBorder: false, onClick: closeWithAnimation, disabled: closeDisabled, ariaLabel: t('common.close', '닫기') })] })) : (title || headerActions || onClose) ? (_jsxs("div", { className: `popup-header${subtitle ? ' popup-header--with-subtitle' : ''}`, children: [_jsxs("div", { className: "popup-header-main", children: [title
245
+ style: height != null ? { '--popup-height': typeof height === 'number' ? `${height}px` : height } : undefined, tabIndex: -1, role: inline ? undefined : 'dialog', "aria-modal": inline ? undefined : true, "aria-labelledby": !inline && useTitle && title ? titleId : undefined, "aria-label": !inline && !(useTitle && title) ? (ariaLabel ?? (typeof title === 'string' ? title : undefined)) : undefined, children: [!useTitle && (headerActions || onClose) ? (_jsxs("div", { className: "popup-close-float", children: [headerActions, onClose && _jsx(Button, { htmlType: "button", size: 40, type: "dot", icon: "x", variant: "transparent-gray", useBorder: false, className: "popup-close-btn", onClick: closeWithAnimation, disabled: closeDisabled, ariaLabel: t('common.close', '닫기') })] })) : (title || headerActions || onClose) ? (_jsxs("div", { className: `popup-header${subtitle ? ' popup-header--with-subtitle' : ''}`, children: [_jsxs("div", { className: "popup-header-main", children: [title
228
246
  ? _jsx("h2", { id: titleId, className: "popup-title popup-title--left h2", children: title })
229
- : _jsx("span", { id: titleId, className: "popup-title popup-title--left h2" }), subtitle && _jsx("span", { className: "popup-subtitle body-3", children: subtitle })] }), _jsxs("div", { className: "popup-header-aside", children: [headerSegment && (_jsx("div", { className: "popup-header-segment", children: _jsx(SegmentedControl, { size: 40, ariaLabel: headerSegment.ariaLabel, options: headerSegment.options.map(o => ({ key: o.key, label: o.label, disabled: o.disabled })), value: headerSegment.value, onChange: headerSegment.onChange }) })), _jsxs("div", { className: "popup-header-actions", children: [headerActions, onClose && (_jsx(Button, { htmlType: "button", size: 40, type: "dot", icon: "x", variant: "transparent-gray", useBorder: false, onClick: closeWithAnimation, disabled: closeDisabled, ariaLabel: t('common.close', '닫기') }))] })] })] })) : null, _jsx("div", { className: "popup-content", ref: contentRef, tabIndex: contentScrollable ? 0 : undefined, children: _jsx("div", { className: "popup-content__inner", children: typeof children === 'function' ? children({ animateThen, closeWithAnimation }) : children }) }), footerNote != null && footerNote !== false && (
247
+ : _jsx("span", { id: titleId, className: "popup-title popup-title--left h2" }), subtitle && _jsx("span", { className: "popup-subtitle body-3", children: subtitle })] }), _jsxs("div", { className: "popup-header-aside", children: [headerSegment && (_jsx("div", { className: "popup-header-segment", children: _jsx(SegmentedControl, { size: 40, ariaLabel: headerSegment.ariaLabel, options: headerSegment.options.map(o => ({ key: o.key, label: o.label, disabled: o.disabled })), value: headerSegment.value, onChange: headerSegment.onChange }) })), _jsxs("div", { className: "popup-header-actions", children: [headerActions, onClose && (_jsx(Button, { htmlType: "button", size: 40, type: "dot", icon: "x", variant: "transparent-gray", useBorder: false, className: "popup-close-btn", onClick: closeWithAnimation, disabled: closeDisabled, ariaLabel: t('common.close', '닫기') }))] })] })] })) : null, _jsx("div", { className: "popup-content", ref: contentRef, tabIndex: contentScrollable ? 0 : undefined, children: _jsx("div", { className: "popup-content__inner", children: typeof children === 'function' ? children({ animateThen, closeWithAnimation }) : children }) }), footerNote != null && footerNote !== false && (
230
248
  /* 바닥 줄 위의 안내 띠 — 바닥 줄과 따로 선다((108)). `role="note"` 로 낭독기에 "참고" 로 읽힌다. */
231
249
  _jsx("div", { className: `popup-footer-note caption-1${footerNoteDivider ? ' popup-footer-note--divider' : ''}`, role: "note", children: footerNote })), (footerStart || footerEnd) ? (
232
250
  /* 왼쪽·오른쪽 덩이 — 빈 덩이도 그린다(자리를 지켜야 오른쪽이 끝에 선다).
@@ -341,3 +341,23 @@
341
341
  white-space: nowrap;
342
342
  border: 0;
343
343
  }
344
+
345
+ /* ── 폰 · 태블릿에서 입력 글자는 16px 밑으로 안 내려간다(말귀 청 (438) ㉮, 2026-11-14) ──
346
+ iOS Safari 는 초점 받은 입력칸 글자가 16px 아래면 **화면을 확대한다** — 칸을 누를 때마다 줌인되고
347
+ 아래 단추가 밀려 나간다. 토큰이 1023px 아래에서 body-2 를 15px 로, 작은 칸(`--s32`)은 위에서 14px 로
348
+ 둔다. 토큰은 그대로 두고(본문 글자는 안 바뀐다) **입력 요소만** 올린다. `max()` 라 글자 크게 보기
349
+ (`data-font-scale`, 18px↑)는 그대로다. 디스플레이형은 제 크기(22·28px)가 있어 뺀다.
350
+ 말귀 앱 · 어드민이 `App.css` 에서 같은 규칙으로 덮고 있었다(지킴이 `mobileInputNoZoom`). */
351
+ @media (max-width: 1023px) {
352
+ .text-field:not(.text-field--display) .text-field__input.body-2 {
353
+ font-size: max(16px, var(--text-body-2-size));
354
+ }
355
+ }
356
+
357
+ /* 비밀번호 보기 단추(㉱) — 지우기 단추와 같은 배치 */
358
+ .text-field__reveal {
359
+ flex-shrink: 0;
360
+ margin-right: 10px;
361
+ }
362
+ /* 지우기와 보기가 나란하면 사이만 좁힌다 */
363
+ .text-field__clear + .text-field__reveal { margin-left: -6px; }
@@ -101,6 +101,23 @@ export interface TextFieldProps {
101
101
  /** 모바일 키패드 종류 힌트 */
102
102
  inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
103
103
  autoComplete?: string;
104
+ /**
105
+ * 첫 글자 대문자 바꾸기(모바일 키보드) — `<input>` 에 그대로 넘긴다(말귀 청 (438) ㉰, 2026-11-14).
106
+ *
107
+ * **안 주면 칸의 쓰임을 보고 정한다** — `type` 이 `email`·`tel`·`password`·`url` 이거나
108
+ * `autoComplete` 가 `username`·`email`·`one-time-code` 면 `'none'`, 그 밖은 브라우저 기본.
109
+ * iOS 가 로그인 아이디 첫 글자를 대문자로 바꿔 '아이디가 틀렸다' 가 났다.
110
+ */
111
+ autoCapitalize?: 'none' | 'off' | 'sentences' | 'words' | 'characters' | 'on';
112
+ /** 자동 고침(iOS) — 기본은 `autoCapitalize` 와 같은 칸에서 `'off'`. 그 밖은 브라우저 기본. */
113
+ autoCorrect?: 'on' | 'off';
114
+ /**
115
+ * 비밀번호 보기/숨기기 단추(말귀 청 (438) ㉱) — `type="password"` 일 때만 선다. 기본 거짓.
116
+ *
117
+ * 단추는 지우기 단추 뒤, `rightIcon` 앞에 **나란히** 선다(겹치지 않는다). 보일 때도 값은
118
+ * HTML 속성에 안 박힌다 — 비밀번호 칸의 평문 보호(아래 `isPasswordControlled`)는 **원래 `type`** 을 본다.
119
+ */
120
+ revealable?: boolean;
104
121
  className?: string;
105
122
  onFocus?: (e: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
106
123
  onBlur?: (e: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
@@ -20,7 +20,7 @@ export default function TextField(props) {
20
20
  조작기가 40이다(세그먼트 단추·줄 옆 `Button`). 글자 칸만 48이라 수를 받는 줄이
21
21
  토글 줄보다 눈에 띄게 깊었다(실측: 그 줄 80px ↔ 토글 줄 56px → 72px 로 좁혀짐).
22
22
  48이 맞는 자리는 그 자리에 `size={48}` 을 적는다. */
23
- size: sizeProp, variant = 'input', fullWidth = false, newline = false, multiline = false, rows = 3, leftIcon, rightIcon, clearable = false, list, showCount = true, className = '', onFocus, onBlur, onKeyDown, onEnter, inputMode, autoComplete, autoFocus, suggestions: suggestionsProp, filterSuggestions, onSelectSuggestion, autoActiveFirst, openOnFocus = false, } = props;
23
+ size: sizeProp, variant = 'input', fullWidth = false, newline = false, multiline = false, rows = 3, leftIcon, rightIcon, clearable = false, list, showCount = true, className = '', onFocus, onBlur, onKeyDown, onEnter, inputMode, autoComplete, autoCapitalize: autoCapitalizeProp, autoCorrect: autoCorrectProp, revealable = false, autoFocus, suggestions: suggestionsProp, filterSuggestions, onSelectSuggestion, autoActiveFirst, openOnFocus = false, } = props;
24
24
  // 안 주면 가장 가까운 판 · 표의 값(청 (419)) — 그 밖이면 공용 수 `CONTROL_SIZE`(40)
25
25
  const inheritedSize = useControlSize();
26
26
  const size = sizeProp ?? inheritedSize ?? CONTROL_SIZE;
@@ -146,6 +146,15 @@ export default function TextField(props) {
146
146
  const placeholderGhost = ghostText
147
147
  ? `${ghostText}${ghostHint ?? t('wordTable.save.autoFillHint', ' (Tab 또는 space 입력시 자동 입력)')}`
148
148
  : placeholder;
149
+ /* 아이디 · 이메일 · 인증번호 칸은 글자를 손대지 않는다(㉰) — 안 주었을 때만 */
150
+ const isVerbatimField = type === 'email' || type === 'tel' || type === 'password' || type === 'url'
151
+ || autoComplete === 'username' || autoComplete === 'email' || autoComplete === 'one-time-code';
152
+ const autoCapitalize = autoCapitalizeProp ?? (isVerbatimField ? 'none' : undefined);
153
+ const autoCorrect = autoCorrectProp ?? (isVerbatimField ? 'off' : undefined);
154
+ /* 비밀번호 보기(㉱) — 그리는 type 만 바꾼다. 평문 보호는 원래 `type` 을 본다(아래) */
155
+ const canReveal = revealable && type === 'password' && !newline && !multiline;
156
+ const [revealed, setRevealed] = useState(false);
157
+ const inputType = canReveal && revealed ? 'text' : type;
149
158
  const isControlled = value !== undefined;
150
159
  /* 비밀번호는 value 를 React 에 넘기지 않는다 — 위 useEffect 주석 참고 */
151
160
  const isPasswordControlled = isControlled && type === 'password';
@@ -187,7 +196,7 @@ export default function TextField(props) {
187
196
  }, [value, innerLen, newline]);
188
197
  const isOver = maxLength != null && len > maxLength;
189
198
  const iconSize = size === 32 ? 16 : 20;
190
- const cls = cx('text-field', `text-field--s${size}`, variant === 'display' ? 'text-field--display' : '', fullWidth ? 'text-field--full-width' : '', disabled ? 'text-field--disabled' : '', readOnly ? 'text-field--readonly' : '', error ? 'text-field--error' : '', leftIcon ? 'text-field--has-left-icon' : '', (rightIcon || clearable) ? 'text-field--has-right-icon' : '', className);
199
+ const cls = cx('text-field', `text-field--s${size}`, variant === 'display' ? 'text-field--display' : '', fullWidth ? 'text-field--full-width' : '', disabled ? 'text-field--disabled' : '', readOnly ? 'text-field--readonly' : '', error ? 'text-field--error' : '', leftIcon ? 'text-field--has-left-icon' : '', (rightIcon || clearable || canReveal) ? 'text-field--has-right-icon' : '', className);
191
200
  const sharedInputProps = {
192
201
  id: inputId,
193
202
  // controlled면 value, uncontrolled면 defaultValue (IME 조합 충돌 회피)
@@ -206,6 +215,8 @@ export default function TextField(props) {
206
215
  list,
207
216
  inputMode,
208
217
  autoComplete,
218
+ autoCapitalize,
219
+ autoCorrect,
209
220
  'aria-label': !label && ariaLabel ? ariaLabel : undefined,
210
221
  'aria-required': required,
211
222
  'aria-invalid': !!error,
@@ -299,7 +310,7 @@ export default function TextField(props) {
299
310
  // 고정 영역 textarea — rows 로 높이 미리 확보
300
311
  return (_jsx("textarea", { ...sharedInputProps, className: "text-field__input text-field__input--textarea body-2", rows: rows }));
301
312
  }
302
- return (_jsx("input", { ...sharedInputProps, type: type, className: "text-field__input body-2" }));
313
+ return (_jsx("input", { ...sharedInputProps, type: inputType, className: "text-field__input body-2" }));
303
314
  };
304
315
  // variant="display"는 값과 placeholder 글자 크기가 크게 달라 네이티브 ::placeholder로는
305
316
  // 세로 중앙을 못 맞춘다. 전용 오버레이 div를 flex로 정중앙 정렬하고,
@@ -321,7 +332,11 @@ export default function TextField(props) {
321
332
  setInnerLen(0);
322
333
  }
323
334
  onChange?.('');
324
- }, tabIndex: -1 })), rightIcon && !showClear && (_jsx("span", { className: "text-field__icon text-field__icon--right", children: _jsx(Icon, { icon: rightIcon, label: "", className: "", svgClassName: "text-field__icon-svg", size: iconSize }) }))] }), !!suggestions && (_jsx("span", { className: "text-field__status", role: "status", "aria-live": "polite", children: combobox.open && (value ?? '').length > 0 && combobox.filtered.length === 0
335
+ }, tabIndex: -1 })), canReveal && (_jsx(Button, { size: 24, type: "dot", icon: revealed ? 'eye-off' : 'eye', variant: "transparent-gray", useBorder: false, className: "text-field__reveal",
336
+ /* 이름은 하나로 두고 눌림만 바꾼다 — 이름과 눌림을 같이 바꾸면 낭독기가 "숨기기, 눌림" 처럼 거꾸로 읽는다 */
337
+ ariaLabel: t('textField.showPassword', '비밀번호 보기'), "aria-pressed": revealed, htmlType: "button", disabled: disabled,
338
+ /* 누를 때 초점이 칸을 안 떠나게(지우기 단추와 같다) — 치던 자리가 그대로 남는다 */
339
+ onMouseDown: (e) => { e.preventDefault(); }, onClick: () => setRevealed(v => !v) })), rightIcon && !showClear && (_jsx("span", { className: "text-field__icon text-field__icon--right", children: _jsx(Icon, { icon: rightIcon, label: "", className: "", svgClassName: "text-field__icon-svg", size: iconSize }) }))] }), !!suggestions && (_jsx("span", { className: "text-field__status", role: "status", "aria-live": "polite", children: combobox.open && (value ?? '').length > 0 && combobox.filtered.length === 0
325
340
  ? t('common.noMatches', '맞는 항목이 없습니다')
326
341
  : '' })), listOpen && (typeof document === 'undefined' ? null : createPortal(_jsx("ul", { id: combobox.listId, className: "text-field__suggestions", role: "listbox", style: listStyle ?? { position: 'fixed', visibility: 'hidden' }, "data-tooltip-ignore": true, children: combobox.filtered.map((s, i) => (_jsx("li", { id: `${combobox.listId}-option-${i}`, role: "option", "aria-selected": i === combobox.activeIdx, className: `text-field__suggestion body-2${i === combobox.activeIdx ? ' is-active' : ''}`,
327
342
  // 선택은 click 에서 한다. onMouseDown 만 두면 마우스로는 눌리지만 스크린리더가
@@ -49,9 +49,33 @@ export default function TrainingBlockGrid({ gap = 10, count, className, children
49
49
  measure();
50
50
  if (typeof ResizeObserver === 'undefined')
51
51
  return;
52
+ /* **자기만 보면 묶인 뒤에 못 깬다**(말귀 청 (439), 2026-11-14). `--measured` 의 `max-width` 로 스스로 묶인 뒤에는
53
+ 부모가 넓어져도 이 상자는 그대로라 다시 안 잰다 — ① 내용에 맞춰 줄어드는 부모 안에서 먼저 재면 타일 셋이
54
+ 둘+하나로 접혀 410 에 묶이고 창이 660 이 돼도 그대로였다. ② 폰을 돌려 카드가 293 → 190 이 돼도 그리드는 1열에
55
+ 머물렀다. 그래서 **첫 카드**와 **위로 세 칸까지의 조상**도 보고, 창 크기 바뀜(돌리기)에도 잰다. 잰 값이 같으면
56
+ 상태를 안 바꾸므로(위 `prev`) 더 봐도 다시 그리지 않는다. */
52
57
  const ro = new ResizeObserver(measure);
53
58
  ro.observe(el);
54
- return () => ro.disconnect();
59
+ const first = el.firstElementChild;
60
+ if (first)
61
+ ro.observe(first);
62
+ let up = el.parentElement;
63
+ for (let i = 0; i < 3 && up && up !== document.body; i++, up = up.parentElement)
64
+ ro.observe(up);
65
+ /* 창 크기 바뀜은 잦다 — 틀에 한 번으로 모은다 */
66
+ let rafId = null;
67
+ const onResize = () => {
68
+ if (rafId !== null)
69
+ return;
70
+ rafId = requestAnimationFrame(() => { rafId = null; measure(); });
71
+ };
72
+ window.addEventListener('resize', onResize);
73
+ return () => {
74
+ ro.disconnect();
75
+ window.removeEventListener('resize', onResize);
76
+ if (rafId !== null)
77
+ cancelAnimationFrame(rafId);
78
+ };
55
79
  }, [itemCount, gap]);
56
80
  const cardWidth = measured.card > 0 ? measured.card : 0;
57
81
  const perRow = cardWidth > 0 ? columnsFitting(measured.width, cardWidth, gap) : 0;