@ihabdevteam/core 0.454.0 → 0.456.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.
@@ -2047,7 +2047,9 @@ export declare interface ConfirmPopupProps {
2047
2047
  initialFocus?: 'close' | 'confirm' | 'cancel';
2048
2048
  /** portal 없이 부모 컨테이너에 제자리 렌더 (목업/데모용) */
2049
2049
  inline?: boolean;
2050
- /** 패널 최대 가로폭. 확인창 기본은 'small'(480px) */
2050
+ /** 패널 넓이(`Popup width` 와 같은 이름 값, 말귀 청 (445)). 확인창 기본은 'small'(480px) */
2051
+ width?: 'small' | 'medium' | 'large';
2052
+ /** @deprecated `width` 의 옛 이름(말귀 청 (445)). 둘이 같이 오면 `width` 가 이긴다 */
2051
2053
  size?: 'small' | 'medium' | 'large';
2052
2054
  className?: string;
2053
2055
  }
@@ -2243,7 +2245,7 @@ export declare function copyText(text: string): Promise<boolean>;
2243
2245
  *
2244
2246
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
2245
2247
  */
2246
- export declare const CORE_VERSION = "0.454.0";
2248
+ export declare const CORE_VERSION = "0.456.0";
2247
2249
 
2248
2250
  /** @public */
2249
2251
  declare const coreDefault: Record<string, unknown>;
@@ -7003,17 +7005,6 @@ export declare interface PopupProps {
7003
7005
  };
7004
7006
  /** 커스텀 footer 래퍼에 추가할 클래스 (정렬·간격 override용) */
7005
7007
  footerClassName?: string;
7006
- /**
7007
- * 바닥 줄 **위**의 한 줄 안내 띠(말귀 요청 (108), 사용자 지시 2026-10-10). 숙제 창 둘(회원 `info` ·
7008
- * 매니저 `.hwd-foot`)이 `.popup-footer` 에 글줄을 싣느라 각자 덧칠했고 **벌써 둘이 달랐다**(한쪽만
7009
- * 실선). 띠 높이 40 · 위로 숨 · 왼쪽 정렬 — 코어가 하나로 쥔다.
7010
- *
7011
- * 바닥 줄(`buttons` · `footer` · `footerStart/End`)과 **따로** 그려진다 — 바닥 줄이 없어도 선다.
7012
- * 글이 길면 줄을 바꾼다(40 은 최소 높이다). `footerNoteDivider` 로 위에 실선을 둔다.
7013
- */
7014
- footerNote?: ReactNode;
7015
- /** `footerNote` 위에 실선(기본 없음). 창마다 있고 없고가 갈리던 자리라 **값으로** 고른다. */
7016
- footerNoteDivider?: boolean;
7017
7008
  /**
7018
7009
  * 바닥 줄 **왼쪽 덩이** — 보조 단추(아이콘 단추 여럿)가 서는 자리.
7019
7010
  *
@@ -7098,6 +7089,17 @@ export declare interface PopupProps {
7098
7089
  /** true면 portal/배경 스크롤 잠금 없이 부모 컨테이너 안에 제자리 렌더 (목업/데모용) */
7099
7090
  inline?: boolean;
7100
7091
  /**
7092
+ * **넓이**(말귀 청 (445), 사장님 지시 2026-11-16 *"width, height. 모두"*) — 이름 값. 미지정 시 기본(최대 820px).
7093
+ * - `small` 최대 480px (확인/알림류) · `medium` 680px (입력 폼) · `large` 1080px (리스트/다중 콘텐츠)
7094
+ * - `xlarge` 화면 − 좌우 40(`--popup-wide-gap`), 최대 1320px — 훈련 카드 만들기처럼 화면을 넓게 쓰는 창
7095
+ * - `full` 화면 − 좌우 40, 천장 없음 — 카드를 한눈에 많이 펴는 고르는 창(옛 `size="fullwidth"`)
7096
+ * - `fit` 내용 폭 — 최소 480 · 최대 1140(둘 다 화면 − 40 을 넘지 않는다). 한 줄에 카드가 몇 장 드느냐로 폭이 정해지는 목록 창
7097
+ * `height` 와 같은 결이다 — `width="full" height="full"` 이면 사방 40.
7098
+ */
7099
+ width?: 'small' | 'medium' | 'large' | 'xlarge' | 'full' | 'fit';
7100
+ /**
7101
+ * @deprecated `width` 의 옛 이름(말귀 청 (445)). 둘이 같이 오면 `width` 가 이긴다. `fullwidth` 는 `width="full"`.
7102
+ *
7101
7103
  * 패널 최대 가로폭 제한. 미지정 시 기본(820px) 유지.
7102
7104
  * - `small` 480px (확인/알림류)
7103
7105
  * - `medium` 680px (입력 폼)
@@ -7122,11 +7124,12 @@ export declare interface PopupProps {
7122
7124
  * 맞춘다** — 패널의 `max-height`(데스크톱 `100% - 60px`, 좁은 화면은 하단 내비 몫까지 뺀 값)가
7123
7125
  * 그대로 걸리므로 창이 화면 밖으로 나가지 않는다. 넘치는 내용은 본문이 스스로 굴린다.
7124
7126
  *
7125
- * **이름 값 `'full'`**(말귀 청 (445), 사장님 지시 2026-11-16 *"core 에 정식으로 모두 prop 으로 지정해야지"*) — 화면 높이에서 위아래
7126
- * `--popup-wide-gap`(40)씩 뺀 높이(`calc(100% - 80px)`). `size="fullwidth"` · `"xlarge"` 의 좌우 여백과 같은 출처라, 둘을 함께 주면
7127
- * 사방 40 이 같다. 앱은 창마다 `calc` 를 셈하지 말고 이 이름을 쓴다. 숫자 · 다른 문자열은 전처럼 그대로 받는다.
7127
+ * **이름 값**(말귀 청 (445), 사장님 지시 2026-11-16 *"core 에 정식으로 모두 prop 으로 지정해야지"* · *"width, height. 모두"*):
7128
+ * - `fit` 내용만큼(기본 — 안 준 것과 같다)
7129
+ * - `full` 화면 높이 − 위아래 `--popup-wide-gap`(40). `width="full"` · `"xlarge"` 의 좌우 여백과 같은 출처라 함께 주면 사방 40.
7130
+ * 앱은 창마다 `calc` 를 셈하지 말고 이 이름을 쓴다. 숫자 · 다른 문자열은 전처럼 그대로 받는다.
7128
7131
  */
7129
- height?: 'full' | number | (string & {});
7132
+ height?: 'fit' | 'full' | number | (string & {});
7130
7133
  /**
7131
7134
  * 본문이 패널 높이를 채운다 — 본문 자신은 굴리지 않고, 안쪽을 세로 flex(높이 100%)로 넘겨 **안의 한 칸만** 굴리게 한다.
7132
7135
  * `height` 로 창 높이를 박고 가운데 목록(`Panel scrollable` 등)만 굴러가야 하는 창에 쓴다.
@@ -85,7 +85,9 @@ export interface ConfirmPopupProps {
85
85
  initialFocus?: 'close' | 'confirm' | 'cancel';
86
86
  /** portal 없이 부모 컨테이너에 제자리 렌더 (목업/데모용) */
87
87
  inline?: boolean;
88
- /** 패널 최대 가로폭. 확인창 기본은 'small'(480px) */
88
+ /** 패널 넓이(`Popup width` 와 같은 이름 값, 말귀 청 (445)). 확인창 기본은 'small'(480px) */
89
+ width?: 'small' | 'medium' | 'large';
90
+ /** @deprecated `width` 의 옛 이름(말귀 청 (445)). 둘이 같이 오면 `width` 가 이긴다 */
89
91
  size?: 'small' | 'medium' | 'large';
90
92
  className?: string;
91
93
  }
@@ -12,7 +12,7 @@ import Panel, { PanelRow } from '../Panel';
12
12
  * @public
13
13
  */
14
14
  export default function ConfirmPopup(props) {
15
- const { title, subtitle, message, topContent, details, children, confirmLabel, cancelLabel, hideCancel = false, extraAction, confirmVariant = 'main', confirmDisabled = false, onConfirm, closeOnConfirm = true, onClose, inline, size = 'small', className, initialFocus = 'close', } = props;
15
+ const { title, subtitle, message, topContent, details, children, confirmLabel, cancelLabel, hideCancel = false, extraAction, confirmVariant = 'main', confirmDisabled = false, onConfirm, closeOnConfirm = true, onClose, inline, width, size, className, initialFocus = 'close', } = props;
16
16
  const { t } = useTranslation();
17
17
  /* 열릴 때 포커스 자리 — Popup 이 먼저 첫 포커스 자리(X)로 옮긴 뒤(자식 효과가 먼저 돈다) 여기서 고른 단추로 옮긴다.
18
18
  단추 차례는 [곁 단추?, 취소?, 확인] 이다. */
@@ -74,7 +74,7 @@ export default function ConfirmPopup(props) {
74
74
  // onConfirm(서버 요청 등)이 진행 중일 때 X/ESC로 닫으면, 팝업은 즉시 사라지는데
75
75
  // 이미 시작된 요청은 계속 진행돼 완료 후 부모 state/토스트가 뒤늦게 갱신된다 —
76
76
  // 사용자는 "취소했다"고 믿었는데 실제로는 실행된 것처럼 보이는 문제를 막는다.
77
- closeDisabled: busy, inline: inline, size: size,
77
+ closeDisabled: busy, inline: inline, width: width ?? size ?? 'small',
78
78
  /* 위에 미리보기가 서면 더해 둔 위 여백을 되돌린다 — 까닭은 `Popup.css` 의 그 규칙에 */
79
79
  className: cx('confirm-popup', topContent != null && 'confirm-popup--has-top', className), buttons: [
80
80
  ...(extraAction ? [{
@@ -43,7 +43,7 @@ export default function CouponInputPopup({ onApply, onCancel }) {
43
43
  setCode(e.target.value);
44
44
  setError(null);
45
45
  };
46
- return (_jsx(Popup, { className: "coupon-input-popup", title: t('usage.couponButton', '쿠폰 입력'), size: "small", onClose: onCancel, closeDisabled: loading, buttons: [
46
+ return (_jsx(Popup, { className: "coupon-input-popup", title: t('usage.couponButton', '쿠폰 입력'), width: "small", onClose: onCancel, closeDisabled: loading, buttons: [
47
47
  { label: t('common.cancel', '취소'), variant: 'default', disabled: loading, onClick: ({ closeWithAnimation }) => closeWithAnimation() },
48
48
  { label: t('coupons.applyButton', '적용'), variant: 'main', disabled: !code.trim() || loading, onClick: ({ closeWithAnimation }) => void handleApply(closeWithAnimation) },
49
49
  ], children: ({ closeWithAnimation }) => (_jsxs(_Fragment, { children: [_jsx("input", { ref: inputRef, className: "coupon-input-popup__input body-2", "aria-label": t('coupons.input.label', '쿠폰 코드'), "aria-invalid": error ? true : undefined, "aria-errormessage": error ? hintId : undefined, "aria-describedby": error ? hintId : undefined, placeholder: t('coupons.input.placeholder', '쿠폰 코드 입력'), value: code, onChange: handleChange, onKeyDown: e => handleKey(e, closeWithAnimation), disabled: loading, autoComplete: "off", spellCheck: false }), error && _jsx("p", { id: hintId, className: "coupon-input-popup__error caption-1", role: "alert", children: error })] })) }));
@@ -72,7 +72,9 @@
72
72
  /* 좁아지면 **오른쪽 묶음이 아랫줄로 내려간다**. 예전에는 묶음이 `flex-shrink: 0` 이라 제 속 너비를
73
73
  끝까지 우기고 제목 칸만 0 까지 눌려, 좁은 화면에서 제목이 한 글자씩 세로로 쏟아졌다
74
74
  (말귀 2026-09-22 실측). 제목에 밑바닥(220px)을 줘 그 아래로는 줄을 바꾸게 한다. */
75
- .popup-header { padding: var(--spacing-l) var(--spacing-l) 0; display: flex; align-items: center; flex-wrap: wrap; gap: var(--spacing-s); flex-shrink: 0; }
75
+ /* **머리 · 바닥은 사방 20, 본문은 좌우 20 · 위아래 0**(사장님 지시 2026-11-16) — 칸 사이 간격은 머리 아래 20 · 바닥 위 20 이 쥔다.
76
+ 본문이 위아래 여백을 안 가지니 굴릴 때 내용이 머리 · 바닥 선까지 닿는다. 전에는 머리 아래 0 · 본문 위 20 · 본문 속 아래 20 · 바닥 위 0 이었다(보이는 간격은 같다). */
77
+ .popup-header { padding: var(--spacing-l); display: flex; align-items: center; flex-wrap: wrap; gap: var(--spacing-s); flex-shrink: 0; }
76
78
  .popup-header--with-subtitle { align-items: flex-start; }
77
79
  /* **밑바닥이 220px 이면 줄바꿈이 너무 일찍 정해진다**(말귀 청 (346), 2026-10-28).
78
80
  flex 는 줄을 나눌 때 **줄이기 전의 크기**(= flex-basis)로 센다. 제목이 87px 밖에 안 쓰는데
@@ -102,10 +104,10 @@
102
104
  넓은 것을 얹는 자리다. 닫기(✕)는 어느 경우에도 이 묶음 안에 있어 손이 닿는다. */
103
105
  .popup-header-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; min-width: 0; flex-shrink: 0; }
104
106
  .popup-content {
105
- padding: 20px 20px 0;
106
- /* 막대 자리를 미리 잡고 그만큼 오른쪽 여백을 깎는다(청 (444) ②) — 넘쳐도 속의 폭 · 좌우 여백이 같다 */
107
+ padding: 0 var(--spacing-l);
108
+ /* 막대는 영역을 안 차지한다 — 자리를 미리 잡고 그만큼 오른쪽 여백을 깎아, 보이는 좌우 여백이 막대 유무와 상관없이 20 이다(청 (444) ②) */
107
109
  scrollbar-gutter: stable;
108
- padding-inline-end: calc(20px - var(--scrollbar-size));
110
+ padding-inline-end: calc(var(--spacing-l) - var(--scrollbar-size));
109
111
  flex: 1;
110
112
  min-height: 0;
111
113
  overflow-x: hidden;
@@ -116,26 +118,21 @@
116
118
  overscroll-behavior: contain;
117
119
  touch-action: pan-y;
118
120
  }
119
- .popup-content__inner {
120
- padding-bottom: 20px;
121
- }
121
+ /* **`.popup-content__inner` — 굴러가는 칸 안의 한 겹.** 바탕에서는 여백이 없다(본문 위아래 0, 사장님 지시 2026-11-16). 하는 일은 셋:
122
+ · 아래 여백이 필요할 때 **굴림과 함께 움직이게** 이 겹에 준다 — 바닥이 없는 창(아래 규칙) · 확인창(맨 아래).
123
+ 굴러가는 칸(`.popup-content`) 제 padding-bottom 은 브라우저에 따라 굴림 끝에 안 붙어, 겹에 준다.
124
+ · `fillBody` 에서 높이를 물려받는 세로 flex 고리(위 `.popup-panel--fill-body`).
125
+ · 소비자가 본문 전체를 잡는 자리(코어 `WordTablePopup`, 말귀 앱 몇 창) — 이름을 바꾸지 않는다. */
126
+ /* **머리나 바닥이 없을 때만 본문이 그 쪽 20 을 쥔다** — 판 끝에 내용이 붙지 않게.
127
+ 머리가 없으면(제목 · 닫기 둘 다 없거나 `useTitle={false}` 로 닫기만 떠 있을 때) 위 20, 바닥이 없으면 아래 20. */
128
+ .popup-panel > .popup-content:first-child,
129
+ .popup-close-float + .popup-content { padding-top: var(--spacing-l); }
130
+ .popup-panel > .popup-content:last-child > .popup-content__inner { padding-bottom: var(--spacing-l); }
122
131
  /* 세로는 가운데 — 안 적어 두면 stretch 라, 키가 다른 것(보조 글월 + 단추)을 나란히 두면 늘어난다.
123
132
  소비자 셋이 이 자리를 각자 `align-items: center` 로 칠하고 있었다(2026-09-17 말귀 전수). */
124
133
  /* 좁으면 **줄을 바꾼다.** 안 바꾸면 단추 셋(120×3 + 사이 = 408px)이 353px 바닥에 그대로 서서
125
134
  마지막 단추의 오른쪽 55px 이 잘렸다 — 잘린 쪽은 눌리지도 않는다(말귀 375px 채점 창 실측). */
126
- .popup-footer { padding: 0 20px 20px; display:flex; flex-wrap: wrap; gap:8px; justify-content:center; align-items:center }
127
- /* 바닥 줄 **위**의 한 줄 안내 띠((108), 2026-10-10) — 최소 40 · 위로 숨 · 왼쪽 정렬. 본문 `padding-bottom: 20`
128
- 이 "위로 숨" 이고, 띠는 바닥 줄과 같은 좌우 20 을 쓴다. 숙제 창 둘이 각자 덧칠하던 규칙 — 실선은 값으로 고른다. */
129
- .popup-footer-note {
130
- min-height: 40px;
131
- display: flex;
132
- align-items: center;
133
- padding: 0 20px;
134
- text-align: left;
135
- color: var(--color-gray);
136
- flex-shrink: 0;
137
- }
138
- .popup-footer-note--divider { border-top: 1px solid var(--color-darkWhite); }
135
+ .popup-footer { padding: var(--spacing-l); display:flex; flex-wrap: wrap; gap:8px; justify-content:center; align-items:center }
139
136
  /* 바닥 배치(footerLayout) */
140
137
  .popup-footer--fill > * { flex: 1 }
141
138
  .popup-footer--between {
@@ -267,13 +264,13 @@
267
264
  text-align: left;
268
265
  text-indent: 1em;
269
266
  }
270
- /* 확인 팝업은 본문 위/아래 여백을 20px씩 더(기본 20 → 40) */
271
- .confirm-popup .popup-content { padding-top: 40px; }
272
- .confirm-popup .popup-content__inner { padding-bottom: 40px; }
267
+ /* 확인 팝업은 본문 위/아래 숨을 20 씩 더(기본 20 → 40) — 머리 아래 20 · 바닥 위 20 에 본문이 20 씩 더한다 */
268
+ .confirm-popup .popup-content { padding-top: var(--spacing-l); }
269
+ .confirm-popup .popup-content__inner { padding-bottom: var(--spacing-l); }
273
270
  /* **위에 미리보기가 서면 그 더한 여백은 되돌린다.** 글만 있는 확인창에서는 그 한 뼘이 숨 쉴
274
271
  자리지만, 맨 위에 표나 카드가 서면 제목과 내용을 공연히 벌려 놓는다(사용자 지시 2026-09-23
275
272
  "여백이 많아보여"). 부르는 쪽 둘이 각자 되돌리고 있던 것을 여기서 한다(2026-09-25). */
276
- .confirm-popup--has-top .popup-content { padding-top: var(--spacing-l); }
273
+ .confirm-popup--has-top .popup-content { padding-top: 0; }
277
274
  /* details Panel과 아래 메시지 사이 간격 */
278
275
  .confirm-popup .panel + .confirm-popup__message { margin-top: 16px; }
279
276
  /* **최상단 자리 — 세로로 쌓고 가로는 가운데.**
@@ -52,17 +52,6 @@ export interface PopupProps {
52
52
  };
53
53
  /** 커스텀 footer 래퍼에 추가할 클래스 (정렬·간격 override용) */
54
54
  footerClassName?: string;
55
- /**
56
- * 바닥 줄 **위**의 한 줄 안내 띠(말귀 요청 (108), 사용자 지시 2026-10-10). 숙제 창 둘(회원 `info` ·
57
- * 매니저 `.hwd-foot`)이 `.popup-footer` 에 글줄을 싣느라 각자 덧칠했고 **벌써 둘이 달랐다**(한쪽만
58
- * 실선). 띠 높이 40 · 위로 숨 · 왼쪽 정렬 — 코어가 하나로 쥔다.
59
- *
60
- * 바닥 줄(`buttons` · `footer` · `footerStart/End`)과 **따로** 그려진다 — 바닥 줄이 없어도 선다.
61
- * 글이 길면 줄을 바꾼다(40 은 최소 높이다). `footerNoteDivider` 로 위에 실선을 둔다.
62
- */
63
- footerNote?: ReactNode;
64
- /** `footerNote` 위에 실선(기본 없음). 창마다 있고 없고가 갈리던 자리라 **값으로** 고른다. */
65
- footerNoteDivider?: boolean;
66
55
  /**
67
56
  * 바닥 줄 **왼쪽 덩이** — 보조 단추(아이콘 단추 여럿)가 서는 자리.
68
57
  *
@@ -147,6 +136,17 @@ export interface PopupProps {
147
136
  /** true면 portal/배경 스크롤 잠금 없이 부모 컨테이너 안에 제자리 렌더 (목업/데모용) */
148
137
  inline?: boolean;
149
138
  /**
139
+ * **넓이**(말귀 청 (445), 사장님 지시 2026-11-16 *"width, height. 모두"*) — 이름 값. 미지정 시 기본(최대 820px).
140
+ * - `small` 최대 480px (확인/알림류) · `medium` 680px (입력 폼) · `large` 1080px (리스트/다중 콘텐츠)
141
+ * - `xlarge` 화면 − 좌우 40(`--popup-wide-gap`), 최대 1320px — 훈련 카드 만들기처럼 화면을 넓게 쓰는 창
142
+ * - `full` 화면 − 좌우 40, 천장 없음 — 카드를 한눈에 많이 펴는 고르는 창(옛 `size="fullwidth"`)
143
+ * - `fit` 내용 폭 — 최소 480 · 최대 1140(둘 다 화면 − 40 을 넘지 않는다). 한 줄에 카드가 몇 장 드느냐로 폭이 정해지는 목록 창
144
+ * `height` 와 같은 결이다 — `width="full" height="full"` 이면 사방 40.
145
+ */
146
+ width?: 'small' | 'medium' | 'large' | 'xlarge' | 'full' | 'fit';
147
+ /**
148
+ * @deprecated `width` 의 옛 이름(말귀 청 (445)). 둘이 같이 오면 `width` 가 이긴다. `fullwidth` 는 `width="full"`.
149
+ *
150
150
  * 패널 최대 가로폭 제한. 미지정 시 기본(820px) 유지.
151
151
  * - `small` 480px (확인/알림류)
152
152
  * - `medium` 680px (입력 폼)
@@ -171,11 +171,12 @@ export interface PopupProps {
171
171
  * 맞춘다** — 패널의 `max-height`(데스크톱 `100% - 60px`, 좁은 화면은 하단 내비 몫까지 뺀 값)가
172
172
  * 그대로 걸리므로 창이 화면 밖으로 나가지 않는다. 넘치는 내용은 본문이 스스로 굴린다.
173
173
  *
174
- * **이름 값 `'full'`**(말귀 청 (445), 사장님 지시 2026-11-16 *"core 에 정식으로 모두 prop 으로 지정해야지"*) — 화면 높이에서 위아래
175
- * `--popup-wide-gap`(40)씩 뺀 높이(`calc(100% - 80px)`). `size="fullwidth"` · `"xlarge"` 의 좌우 여백과 같은 출처라, 둘을 함께 주면
176
- * 사방 40 이 같다. 앱은 창마다 `calc` 를 셈하지 말고 이 이름을 쓴다. 숫자 · 다른 문자열은 전처럼 그대로 받는다.
174
+ * **이름 값**(말귀 청 (445), 사장님 지시 2026-11-16 *"core 에 정식으로 모두 prop 으로 지정해야지"* · *"width, height. 모두"*):
175
+ * - `fit` 내용만큼(기본 — 안 준 것과 같다)
176
+ * - `full` 화면 높이 − 위아래 `--popup-wide-gap`(40). `width="full"` · `"xlarge"` 의 좌우 여백과 같은 출처라 함께 주면 사방 40.
177
+ * 앱은 창마다 `calc` 를 셈하지 말고 이 이름을 쓴다. 숫자 · 다른 문자열은 전처럼 그대로 받는다.
177
178
  */
178
- height?: 'full' | number | (string & {});
179
+ height?: 'fit' | 'full' | number | (string & {});
179
180
  /**
180
181
  * 본문이 패널 높이를 채운다 — 본문 자신은 굴리지 않고, 안쪽을 세로 flex(높이 100%)로 넘겨 **안의 한 칸만** 굴리게 한다.
181
182
  * `height` 로 창 높이를 박고 가운데 목록(`Panel scrollable` 등)만 굴러가야 하는 창에 쓴다.
@@ -18,7 +18,11 @@ const ANIM_MS = POPUP_CLOSE_MS; // 닫힘 시간은 한 곳(popupTiming.ts) —
18
18
  /** @public */
19
19
  export default function Popup(props) {
20
20
  const { t } = useTranslation();
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
+ const { title, subtitle, headerActions, headerSegment, children, buttons, footer, footerStart, footerEnd, footerClassName = "", footerLayout = 'center', onClose, closeDisabled = false, beforeClose, closeOnBackdrop = true, backClosable = true, className = "", ariaLabel, useTitle = true, inline = false, width, size, layer = 'modal', height, fillBody = false, resetScrollKey } = props || {};
22
+ /* 넓이 — `width` 가 이긴다. 옛 `size` 의 `fullwidth` 는 `full`. 클래스 이름은 그대로 둔다(앱이 `.popup-panel--fullwidth` 를 짚을 수 있다) */
23
+ const widthName = width ?? (size === 'fullwidth' ? 'full' : size);
24
+ const widthClass = widthName ? ` popup-panel--${widthName === 'full' ? 'fullwidth' : widthName}` : '';
25
+ const hasHeight = height != null && height !== 'fit';
22
26
  const [closing, setClosing] = useState(false);
23
27
  // 닫힘 애니메이션 중(260ms)엔 버튼이 시각적으로만 흐려질 뿐 클릭은 계속 가능해,
24
28
  // 그 사이 같은 버튼을 연타하면 cb(확인/완료 콜백)가 여러 번 예약되어 중복 실행된다.
@@ -239,14 +243,12 @@ export default function Popup(props) {
239
243
  거절)을 누르면 포커스가 body 로 떨어져, 이어서 누른 Tab 이 뒤 화면으로 나갔다(가둠은 판 안의 키만 듣는다).
240
244
  mousedown 의 기본 동작(포커스 옮김)만 막고 click 은 그대로 온다. */
241
245
  onMouseDown: inline ? undefined : (e) => { if (e.target === e.currentTarget)
242
- e.preventDefault(); }, children: _jsxs("div", { ref: panelRef, className: `popup-panel${size ? ` popup-panel--${size}` : ''}${height === 'full' ? ' popup-panel--height-full' : height != null ? ' popup-panel--has-height' : ''}${fillBody ? ' popup-panel--fill-body' : ''}`,
246
+ e.preventDefault(); }, children: _jsxs("div", { ref: panelRef, className: `popup-panel${widthClass}${height === 'full' ? ' popup-panel--height-full' : hasHeight ? ' popup-panel--has-height' : ''}${fillBody ? ' popup-panel--fill-body' : ''}`,
243
247
  /* 높이는 **CSS 변수로** 넘긴다 — 인라인 height 로 박으면 앱의 미디어 규칙(좁은 화면만 다른 높이)이 못 이겼다.
244
248
  max-height(CSS)가 height 보다 이기므로 화면보다 크게 줘도 화면에 맞춰진다 */
245
- style: height != null && height !== 'full' ? { '--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
249
+ style: hasHeight && height !== 'full' ? { '--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
246
250
  ? _jsx("h2", { id: titleId, className: "popup-title popup-title--left h2", children: title })
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 && (
248
- /* 바닥 줄 위의 안내 띠 — 바닥 줄과 따로 선다((108)). `role="note"` 로 낭독기에 "참고" 로 읽힌다. */
249
- _jsx("div", { className: `popup-footer-note caption-1${footerNoteDivider ? ' popup-footer-note--divider' : ''}`, role: "note", children: footerNote })), (footerStart || footerEnd) ? (
251
+ : _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 }) }), (footerStart || footerEnd) ? (
250
252
  /* 왼쪽·오른쪽 덩이 — 빈 덩이도 그린다(자리를 지켜야 오른쪽이 끝에 선다).
251
253
  `footerLayout` 은 보지 않는다: 이 줄 자체가 배치다. */
252
254
  _jsxs("div", { className: `popup-footer popup-footer--bar${footerClassName ? ` ${footerClassName}` : ''}`, children: [_jsx("div", { className: "popup-footer__start", children: typeof footerStart === 'function' ? footerStart({ animateThen, closeWithAnimation }) : footerStart }), _jsx("div", { className: "popup-footer__end", children: typeof footerEnd === 'function' ? footerEnd({ animateThen, closeWithAnimation }) : footerEnd })] })) : buttons?.length ? (_jsx("div", { className: `popup-footer popup-footer--buttons${footerLayout !== 'center' ? ` popup-footer--${footerLayout}` : ''}`, children: buttons.map((btn, i) => (_jsx(Button, { htmlType: "button", size: 48, variant: btn.variant ?? 'default', label: btn.label, disabled: btn.disabled, onClick: () => btn.onClick?.({ animateThen, closeWithAnimation }) }, i))) })) : footer ? (_jsx("div", { className: `popup-footer${footerLayout !== 'center' ? ` popup-footer--${footerLayout}` : ''}${footerClassName ? ` ${footerClassName}` : ''}`, children: typeof footer === 'function' ? footer({ animateThen, closeWithAnimation }) : footer })) : null] }) }));
@@ -6,7 +6,7 @@
6
6
  flex-direction: column;
7
7
  flex: 1;
8
8
  min-height: 0;
9
- /* 여백은 전부 바깥(popup-content 20px, popup-content__inner 하단 20px, footer 20px)이
9
+ /* 여백은 전부 바깥(본문 좌우 20 · 위는 아래 규칙의 20 · 바닥 사방 20)이
10
10
  이미 대고 있다. 여기서 또 주면 결과 표만 안쪽으로 밀려 좁아 보이므로 0으로 둔다.
11
11
  head는 자체 padding(12px 72px 20px)으로 중앙 정렬 폭을 따로 잡는다. */
12
12
  padding: 0;
@@ -22,6 +22,8 @@
22
22
  z-index: 1;
23
23
  padding: var(--spacing-l) var(--spacing-l) 0;
24
24
  }
25
+ /* 머리가 떠 있어 본문이 판 맨 위에 선다 — 판 끝과의 20 은 본문이 쥔다(머리가 흐름에 있을 때 머리가 쥐던 몫) */
26
+ .popup--training-result .popup-content { padding-top: var(--spacing-l); }
25
27
 
26
28
  /* ── Header ── */
27
29
  .trp-result__head {
@@ -115,7 +115,7 @@ export default function WordTablePopup({ items, words, baseItem, baseContentType
115
115
  }, 100);
116
116
  return () => window.clearTimeout(id);
117
117
  }, [autoPrint]);
118
- return (_jsxs(Popup, { title: title ?? t('keyWords.title', '주요 단어'), subtitle: subtitle, size: "large", className: cx('word-table-popup', className), buttons: footerButtons, footer: customFooter, footerClassName: footerClassName, footerLayout: footerLayout, beforeClose: beforeClose, onClose: onClose, children: [tableItems.length > 0 ? (_jsxs("div", { className: "word-table-popup__body", children: [showSettings && (_jsx(TableFilterPanel, { sections: filterSections, selected: filterSelected, onSelect: handleSelect })), isPaginated ? (_jsx("div", { className: "word-table-popup__pages", children: pages.map((page, i) => (_jsx(WordTable, { items: page, orientation: settings.orientation, contentTypes: settings.contentTypes,
118
+ return (_jsxs(Popup, { title: title ?? t('keyWords.title', '주요 단어'), subtitle: subtitle, width: "large", className: cx('word-table-popup', className), buttons: footerButtons, footer: customFooter, footerClassName: footerClassName, footerLayout: footerLayout, beforeClose: beforeClose, onClose: onClose, children: [tableItems.length > 0 ? (_jsxs("div", { className: "word-table-popup__body", children: [showSettings && (_jsx(TableFilterPanel, { sections: filterSections, selected: filterSelected, onSelect: handleSelect })), isPaginated ? (_jsx("div", { className: "word-table-popup__pages", children: pages.map((page, i) => (_jsx(WordTable, { items: page, orientation: settings.orientation, contentTypes: settings.contentTypes,
119
119
  /* 쪽마다 머리 칸이 선다 — 한 장만 뽑아 들어도 무엇의 활용인지 알 수 있게 */
120
120
  baseItem: baseItem, baseContentTypes: baseContentTypes, cutLine: settings.cutLine, showOutline: settings.showOutline, showDivLine: settings.showDivLine, count: settings.count, contentRef: el => { pageRefs.current[i] = el; }, pageNumber: { current: i + 1, total: pages.length }, pageNumberPosition: pageNumberPosition, brand: brand && { ...brand, top: settings.showTopInfo, bottom: settings.showBottomInfo }, code: code, scoring: scoring, scoreIndexOffset: pageStart[i], marks: marksForTable, onMarkClick: handleMarkClick }, i))) })) : (_jsx("div", { className: "word-table-popup__table", children: _jsx(WordTable, { items: tableItems, orientation: settings.orientation, contentTypes: settings.contentTypes, baseItem: baseItem, baseContentTypes: baseContentTypes, cutLine: settings.cutLine, showOutline: settings.showOutline, showDivLine: settings.showDivLine, count: settings.count, contentRef: contentRef, fitHeight: true, scoring: scoring, marks: marksForTable, onMarkClick: handleMarkClick, brand: brand && { ...brand, top: settings.showTopInfo, bottom: settings.showBottomInfo }, code: code }) }))] })) : (_jsx("p", { className: "word-table-popup__empty body-3", children: emptyText ?? t('keyWords.empty', '추출된 주요 단어가 없습니다.') })), _jsx(Toast, { message: toastMsg, position: "top", onClose: handleToastClose }, toastKey)] }));
121
121
  }
@@ -378,7 +378,7 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
378
378
  }
379
379
  };
380
380
  const savePreview = (_jsx(WordTable, { items: saveItems, orientation: orientation, contentTypes: contentTypes, baseItem: baseItem, baseContentTypes: baseContentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: count }));
381
- return (_jsxs(_Fragment, { children: [_jsxs(Section, { type: "page", icon: titleIcon, title: title, disc: disc, className: cx('word-table-block', className), children: [showSaveAsPopup && (_jsx(Popup, { size: "small", title: secondarySaveButtonLabel ?? t('wordTable.saveAsNewButton', '다른 이름으로 저장'), onClose: () => setShowSaveAsPopup(false), footer: ({ closeWithAnimation }) => (_jsxs(_Fragment, { children: [_jsx(Button, { htmlType: "button", size: 48, type: "bar", label: t('common.cancel', '취소'), onClick: closeWithAnimation }), _jsx(Button, { htmlType: "button", size: 48, type: "bar", variant: "main", label: t('common.save', '저장'), disabled: !saveAsTrimmed || saveAsCollides, onClick: handleSaveAsConfirm })] })), children: _jsx(TextField, { label: t('wordTable.save.nameLabel', '이름'), value: saveAsName, onChange: setSaveAsName, placeholder: t('wordTable.save.placeholder', '이 단어표에 대한 제목을 입력하세요.'), maxLength: 40, size: 48, fullWidth: true, autoFocus: true, onEnter: handleSaveAsConfirm, error: saveAsCollides ? t('wordTable.save.duplicateName', '이미 사용 중인 이름입니다.') : undefined }) })), showSavePopup && onSaveComplete && renderSavePopup?.({
381
+ return (_jsxs(_Fragment, { children: [_jsxs(Section, { type: "page", icon: titleIcon, title: title, disc: disc, className: cx('word-table-block', className), children: [showSaveAsPopup && (_jsx(Popup, { width: "small", title: secondarySaveButtonLabel ?? t('wordTable.saveAsNewButton', '다른 이름으로 저장'), onClose: () => setShowSaveAsPopup(false), footer: ({ closeWithAnimation }) => (_jsxs(_Fragment, { children: [_jsx(Button, { htmlType: "button", size: 48, type: "bar", label: t('common.cancel', '취소'), onClick: closeWithAnimation }), _jsx(Button, { htmlType: "button", size: 48, type: "bar", variant: "main", label: t('common.save', '저장'), disabled: !saveAsTrimmed || saveAsCollides, onClick: handleSaveAsConfirm })] })), children: _jsx(TextField, { label: t('wordTable.save.nameLabel', '이름'), value: saveAsName, onChange: setSaveAsName, placeholder: t('wordTable.save.placeholder', '이 단어표에 대한 제목을 입력하세요.'), maxLength: 40, size: 48, fullWidth: true, autoFocus: true, onEnter: handleSaveAsConfirm, error: saveAsCollides ? t('wordTable.save.duplicateName', '이미 사용 중인 이름입니다.') : undefined }) })), showSavePopup && onSaveComplete && renderSavePopup?.({
382
382
  defaultName: typeof title === 'string' ? title : t('wordTable.defaultName', '단어 표'),
383
383
  preview: savePreview,
384
384
  previewW: width,
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export declare const CORE_VERSION = "0.454.0";
49
+ export declare const CORE_VERSION = "0.456.0";
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export const CORE_VERSION = '0.454.0';
49
+ export const CORE_VERSION = '0.456.0';