@ihabdevteam/core 0.458.0 → 0.460.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.
@@ -14,6 +14,7 @@ import { JSX } from 'react';
14
14
  import { KeyboardEvent as KeyboardEvent_2 } from 'react';
15
15
  import { LazyExoticComponent } from 'react';
16
16
  import { MouseEvent as MouseEvent_2 } from 'react';
17
+ import type { MouseEventHandler } from 'react';
17
18
  import { default as React_2 } from 'react';
18
19
  import * as React_3 from 'react';
19
20
  import { ReactElement } from 'react';
@@ -2024,6 +2025,11 @@ export declare interface ConfirmPopupProps {
2024
2025
  closeOnClick?: boolean;
2025
2026
  /** 곁 단추만 따로 비활성 (처리 중 등). 팝업 전체의 busy 와는 별개로 얹힌다. */
2026
2027
  disabled?: boolean;
2028
+ /**
2029
+ * 곁 단추가 설 자리 — `'start'`(기본, 맨 앞: [곁, 취소, 확인]) · `'beforeConfirm'`(확인 바로 앞: [취소, 곁, 확인]).
2030
+ * 말귀 청 (457), 사장님 지시 *"취소 왼쪽으로"* — 곁 단추가 확인과 같은 갈래의 일(다른 길로 보내기 등)이면 확인 곁에 둔다.
2031
+ */
2032
+ placement?: 'start' | 'beforeConfirm';
2027
2033
  };
2028
2034
  /**
2029
2035
  * 확인 클릭 시 실행. `close`로 직접 닫을 수 있음(async 지원).
@@ -2245,7 +2251,7 @@ export declare function copyText(text: string): Promise<boolean>;
2245
2251
  *
2246
2252
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
2247
2253
  */
2248
- export declare const CORE_VERSION = "0.458.0";
2254
+ export declare const CORE_VERSION = "0.460.0";
2249
2255
 
2250
2256
  /** @public */
2251
2257
  declare const coreDefault: Record<string, unknown>;
@@ -4825,7 +4831,7 @@ export declare interface LandingBottomStickyProps {
4825
4831
  *
4826
4832
  * @public
4827
4833
  */
4828
- export declare function LandingButton({ href, tone, arrow, className, children }: LandingButtonProps): JSX.Element;
4834
+ export declare function LandingButton({ href, tone, arrow, align, className, children }: LandingButtonProps): JSX.Element;
4829
4835
 
4830
4836
  /** @public */
4831
4837
  export declare interface LandingButtonProps {
@@ -4840,6 +4846,13 @@ export declare interface LandingButtonProps {
4840
4846
  tone?: 'dark' | 'main' | 'sub' | 'line';
4841
4847
  /** 뒤에 화살표(루시드 `chevron-right`)를 붙인다 */
4842
4848
  arrow?: boolean;
4849
+ /**
4850
+ * 글과 화살표를 어디에 둘까(말귀 청 (451))
4851
+ * · `center` — 둘을 붙여 가운데에(기본)
4852
+ * · `between` — 글은 왼쪽, 화살표는 오른쪽 끝에. 폭이 다른 단추 여럿을 **같은 폭으로 세울 때** 쓴다 —
4853
+ * 가운데에 두면 글이 짧은 단추만 글과 화살표가 안쪽으로 몰려, 줄마다 글 머리와 화살표 자리가 어긋난다.
4854
+ */
4855
+ align?: 'center' | 'between';
4843
4856
  className?: string;
4844
4857
  children: ReactNode;
4845
4858
  }
@@ -4951,6 +4964,28 @@ export declare interface LandingHeaderProps {
4951
4964
  };
4952
4965
  }
4953
4966
 
4967
+ /**
4968
+ * **랜딩의 메뉴 고리** — 글자만 서고, 올리면 주색으로 바뀌며 아래에 밑줄이 왼쪽에서 차오른다(말귀 청 (452)).
4969
+ *
4970
+ * 그 꼴은 `LandingHeader` 의 가운데 메뉴에만 있었다(`.landing-header__links a`). 띠 밖에서 같은 꼴을 쓰려면 그 클래스를
4971
+ * 빌리거나 베껴야 했다 — 말귀 랜딩이 들머리에 구획 고리 줄을 세우며 생긴 일이다. 이제 조각 하나가 그 꼴을 쥐고,
4972
+ * 띠의 메뉴도 이것을 쓴다(한 꼴이 두 곳에 산다).
4973
+ *
4974
+ * 글 크기 · 굵기 · 색은 **부모의 것을 받는다**(`inherit`) — 띠는 15px · 500 · 제 변수 색을 준다. 바꿀 색은 변수로 연다:
4975
+ * `--landing-menu-link-hover`(올렸을 때 · 기본 주색). 띠는 제 옛 변수(`--landing-header-link-hover`)를 여기로 이어 준다.
4976
+ */
4977
+ export declare function LandingMenuLink({ href, current, onClick, className, children }: LandingMenuLinkProps): JSX.Element;
4978
+
4979
+ /** @public */
4980
+ export declare interface LandingMenuLinkProps {
4981
+ href: string;
4982
+ /** 지금 선 자리 — `aria-current="page"` 로 알린다 */
4983
+ current?: boolean;
4984
+ onClick?: MouseEventHandler<HTMLAnchorElement>;
4985
+ className?: string;
4986
+ children: ReactNode;
4987
+ }
4988
+
4954
4989
  /**
4955
4990
  * **랜딩 구획 하나** — 위아래 여백과 안쪽 틀을 한 자리에 둔다.
4956
4991
  *
@@ -41,13 +41,15 @@
41
41
  transform: scale(1.12);
42
42
  }
43
43
  /* ── 위치 ── */
44
+ /* 모서리 배지가 부모 밖으로 삐져나오는 양 — 담는 쪽(카드 줄 등)이 이 수로 자리를 쥔다(말귀 청 (455), 2026-11-17).
45
+ 수는 한 곳: `--circle-badge-overhang`(없으면 6px). */
44
46
  .circle-badge--top-right {
45
- top: -6px;
46
- right: -6px;
47
+ top: calc(-1 * var(--circle-badge-overhang, 6px));
48
+ right: calc(-1 * var(--circle-badge-overhang, 6px));
47
49
  }
48
50
  .circle-badge--top-left {
49
- top: -6px;
50
- left: -6px;
51
+ top: calc(-1 * var(--circle-badge-overhang, 6px));
52
+ left: calc(-1 * var(--circle-badge-overhang, 6px));
51
53
  }
52
54
  /* 인라인(불릿·단계 번호) — absolute 해제, 흐름 안에 배치. 오버레이용 흰 테두리 제거 */
53
55
  .circle-badge--inline {
@@ -147,6 +147,35 @@
147
147
  .landing-button--line { background: var(--color-pureWhite); border-color: var(--color-whiteLine); color: var(--color-black); }
148
148
  .landing-button--line:hover { background: var(--color-pureWhite); color: var(--color-black); }
149
149
 
150
+ /* **메뉴 고리**(`LandingMenuLink`, 말귀 청 (452)) — 글자만, 올리면 주색 · 밑줄이 왼쪽에서 차오른다.
151
+ 글 크기 · 굵기 · 색은 부모의 것을 받는다. `LandingHeader` 의 가운데 메뉴가 쓰던 꼴을 옮겨 왔다 */
152
+ .landing-menu-link {
153
+ color: inherit;
154
+ text-decoration: none;
155
+ position: relative;
156
+ padding: 6px 0;
157
+ transition: color .2s;
158
+ }
159
+ .landing-menu-link:hover { color: var(--landing-menu-link-hover, var(--color-main)); }
160
+ .landing-menu-link::after {
161
+ content: "";
162
+ position: absolute;
163
+ left: 0;
164
+ right: 100%;
165
+ bottom: 0;
166
+ height: 2px;
167
+ background: linear-gradient(90deg, var(--color-main), var(--color-sub));
168
+ border-radius: 1px;
169
+ transition: right .35s cubic-bezier(.2, .7, .2, 1);
170
+ }
171
+ .landing-menu-link:hover::after { right: 0; }
172
+ @media (prefers-reduced-motion: reduce) {
173
+ .landing-menu-link, .landing-menu-link::after { transition: none; }
174
+ }
175
+
176
+ /* 글은 왼쪽, 화살표는 오른쪽 끝(`align="between"`, 말귀 청 (451)) — 같은 폭으로 세운 단추들의 글 머리와 화살표가 줄마다 맞는다 */
177
+ .landing-button--between { justify-content: space-between; }
178
+
150
179
  /* 수 띠 — 겉틀이 **그라데이션 그림자**를 쥔다.
151
180
 
152
181
  `box-shadow` 는 한 색뿐이라 띠처럼 두 색으로 번지게 둘 수 없다(사장님 물음 2026-11-06).
@@ -13,6 +13,13 @@ export interface LandingButtonProps {
13
13
  tone?: 'dark' | 'main' | 'sub' | 'line';
14
14
  /** 뒤에 화살표(루시드 `chevron-right`)를 붙인다 */
15
15
  arrow?: boolean;
16
+ /**
17
+ * 글과 화살표를 어디에 둘까(말귀 청 (451))
18
+ * · `center` — 둘을 붙여 가운데에(기본)
19
+ * · `between` — 글은 왼쪽, 화살표는 오른쪽 끝에. 폭이 다른 단추 여럿을 **같은 폭으로 세울 때** 쓴다 —
20
+ * 가운데에 두면 글이 짧은 단추만 글과 화살표가 안쪽으로 몰려, 줄마다 글 머리와 화살표 자리가 어긋난다.
21
+ */
22
+ align?: 'center' | 'between';
16
23
  className?: string;
17
24
  children: ReactNode;
18
25
  }
@@ -28,4 +35,4 @@ export interface LandingButtonProps {
28
35
  *
29
36
  * @public
30
37
  */
31
- export default function LandingButton({ href, tone, arrow, className, children }: LandingButtonProps): import("react").JSX.Element;
38
+ export default function LandingButton({ href, tone, arrow, align, className, children }: LandingButtonProps): import("react").JSX.Element;
@@ -14,6 +14,6 @@ import './Landing.css';
14
14
  *
15
15
  * @public
16
16
  */
17
- export default function LandingButton({ href, tone = 'dark', arrow = false, className, children }) {
18
- return (_jsxs("a", { className: cx('landing-button', tone !== 'dark' && `landing-button--${tone}`, className), href: href, children: [children, arrow ? (_jsx("svg", { "aria-hidden": "true", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { flex: 'none' }, children: _jsx("path", { d: "m9 18 6-6-6-6" }) })) : null] }));
17
+ export default function LandingButton({ href, tone = 'dark', arrow = false, align = 'center', className, children }) {
18
+ return (_jsxs("a", { className: cx('landing-button', tone !== 'dark' && `landing-button--${tone}`, align === 'between' && 'landing-button--between', className), href: href, children: [children, arrow ? (_jsx("svg", { "aria-hidden": "true", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { flex: 'none' }, children: _jsx("path", { d: "m9 18 6-6-6-6" }) })) : null] }));
19
19
  }
@@ -0,0 +1,22 @@
1
+ import type { ReactNode, MouseEventHandler } from 'react';
2
+ import './Landing.css';
3
+ /** @public */
4
+ export interface LandingMenuLinkProps {
5
+ href: string;
6
+ /** 지금 선 자리 — `aria-current="page"` 로 알린다 */
7
+ current?: boolean;
8
+ onClick?: MouseEventHandler<HTMLAnchorElement>;
9
+ className?: string;
10
+ children: ReactNode;
11
+ }
12
+ /**
13
+ * **랜딩의 메뉴 고리** — 글자만 서고, 올리면 주색으로 바뀌며 아래에 밑줄이 왼쪽에서 차오른다(말귀 청 (452)).
14
+ *
15
+ * 그 꼴은 `LandingHeader` 의 가운데 메뉴에만 있었다(`.landing-header__links a`). 띠 밖에서 같은 꼴을 쓰려면 그 클래스를
16
+ * 빌리거나 베껴야 했다 — 말귀 랜딩이 들머리에 구획 고리 줄을 세우며 생긴 일이다. 이제 조각 하나가 그 꼴을 쥐고,
17
+ * 띠의 메뉴도 이것을 쓴다(한 꼴이 두 곳에 산다).
18
+ *
19
+ * 글 크기 · 굵기 · 색은 **부모의 것을 받는다**(`inherit`) — 띠는 15px · 500 · 제 변수 색을 준다. 바꿀 색은 변수로 연다:
20
+ * `--landing-menu-link-hover`(올렸을 때 · 기본 주색). 띠는 제 옛 변수(`--landing-header-link-hover`)를 여기로 이어 준다.
21
+ */
22
+ export default function LandingMenuLink({ href, current, onClick, className, children }: LandingMenuLinkProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cx } from '../../utils/cx';
4
+ import './Landing.css';
5
+ /**
6
+ * **랜딩의 메뉴 고리** — 글자만 서고, 올리면 주색으로 바뀌며 아래에 밑줄이 왼쪽에서 차오른다(말귀 청 (452)).
7
+ *
8
+ * 그 꼴은 `LandingHeader` 의 가운데 메뉴에만 있었다(`.landing-header__links a`). 띠 밖에서 같은 꼴을 쓰려면 그 클래스를
9
+ * 빌리거나 베껴야 했다 — 말귀 랜딩이 들머리에 구획 고리 줄을 세우며 생긴 일이다. 이제 조각 하나가 그 꼴을 쥐고,
10
+ * 띠의 메뉴도 이것을 쓴다(한 꼴이 두 곳에 산다).
11
+ *
12
+ * 글 크기 · 굵기 · 색은 **부모의 것을 받는다**(`inherit`) — 띠는 15px · 500 · 제 변수 색을 준다. 바꿀 색은 변수로 연다:
13
+ * `--landing-menu-link-hover`(올렸을 때 · 기본 주색). 띠는 제 옛 변수(`--landing-header-link-hover`)를 여기로 이어 준다.
14
+ */
15
+ export default function LandingMenuLink({ href, current, onClick, className, children }) {
16
+ return (_jsx("a", { href: href, onClick: onClick, "aria-current": current ? 'page' : undefined, className: cx('landing-menu-link', className), children: children }));
17
+ }
@@ -73,32 +73,9 @@
73
73
  transform: translateX(-50%);
74
74
  }
75
75
 
76
- .landing-header__links a {
77
- color: inherit;
78
- text-decoration: none;
79
- position: relative;
80
- padding: 6px 0;
81
- transition: color .2s;
82
- }
83
-
84
- .landing-header__links a:hover {
85
- color: var(--landing-header-link-hover, var(--color-main));
86
- }
87
-
88
- /* hover 시 왼쪽에서 오른쪽으로 차오르는 밑줄 */
89
- .landing-header__links a::after {
90
- content: "";
91
- position: absolute;
92
- left: 0;
93
- right: 100%;
94
- bottom: 0;
95
- height: 2px;
96
- background: linear-gradient(90deg, var(--color-main), var(--color-sub));
97
- border-radius: 1px;
98
- transition: right .35s cubic-bezier(.2, .7, .2, 1);
99
- }
100
-
101
- .landing-header__links a:hover::after { right: 0; }
76
+ /* 고리의 꼴(글자 · 올렸을 때 주색 · 차오르는 밑줄)은 조각이 쥔다(`LandingMenuLink`, 말귀 청 (452)) — 띠는 제 옛 변수를
77
+ 그 조각의 변수로 이어 준다(쓰던 쪽이 준 `--landing-header-link-hover` 가 그대로 먹게) */
78
+ .landing-header__links { --landing-menu-link-hover: var(--landing-header-link-hover, var(--color-main)); }
102
79
 
103
80
  .landing-header__actions {
104
81
  display: flex;
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useId, useRef, useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { pushEsc } from '../hooks/escStack';
6
+ import LandingMenuLink from './Landing/LandingMenuLink';
6
7
  import './LandingHeader.css';
7
8
  /**
8
9
  * 랜딩/마케팅 페이지용 상단 고정 헤더.
@@ -58,6 +59,12 @@ export default function LandingHeader({ logo, logoAlt = '', logoHref, links = []
58
59
  return renderLink(item, { onClick });
59
60
  return (_jsx("a", { href: item.href, onClick: onClick, "aria-current": item.current ? 'page' : undefined, children: item.label }));
60
61
  };
62
+ /* 가운데 메뉴는 **랜딩 메뉴 고리**다(`LandingMenuLink`) — 꼴을 그 조각이 쥔다. 서랍은 손가락 크기의 제 꼴이라 맨 고리다 */
63
+ const menuLink = (item) => {
64
+ if (renderLink)
65
+ return renderLink(item, {});
66
+ return _jsx(LandingMenuLink, { href: item.href, current: item.current, children: item.label });
67
+ };
61
68
  return (_jsxs("header", { className: className ? `landing-header ${className}` : 'landing-header', children: [_jsxs("div", { className: innerClass, children: [logo != null && (() => {
62
69
  const brand = typeof logo === 'string'
63
70
  ? _jsx("img", { src: logo, alt: logoAlt, className: "landing-header__logo" })
@@ -65,7 +72,7 @@ export default function LandingHeader({ logo, logoAlt = '', logoHref, links = []
65
72
  return logoHref
66
73
  ? _jsx("a", { href: logoHref, className: "landing-header__brand", children: brand })
67
74
  : _jsx("div", { className: "landing-header__brand", children: brand });
68
- })(), links.length > 0 && (_jsx("nav", { className: "landing-header__links", children: links.map((item, i) => (_jsx("span", { children: link(item) }, `${i}:${item.href}`))) })), _jsxs("div", { className: "landing-header__actions", children: [actions, links.length > 0 && (_jsx("button", { ref: toggleRef, type: "button", onClick: () => setOpen(v => !v), "aria-expanded": open, "aria-controls": drawerId, "aria-label": open ? menuLabel.close : menuLabel.open, className: open
75
+ })(), links.length > 0 && (_jsx("nav", { className: "landing-header__links", children: links.map((item, i) => (_jsx("span", { children: menuLink(item) }, `${i}:${item.href}`))) })), _jsxs("div", { className: "landing-header__actions", children: [actions, links.length > 0 && (_jsx("button", { ref: toggleRef, type: "button", onClick: () => setOpen(v => !v), "aria-expanded": open, "aria-controls": drawerId, "aria-label": open ? menuLabel.close : menuLabel.open, className: open
69
76
  ? 'landing-header__toggle landing-header__toggle--open'
70
77
  : 'landing-header__toggle', children: _jsxs("span", { className: "landing-header__burger", children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }) }))] })] }), links.length > 0 && (_jsx("nav", { id: drawerId, hidden: !open, className: "landing-header__drawer", children: _jsx("div", { className: containerClassName ?? undefined, children: links.map((item, i) => (_jsx("span", { className: "landing-header__drawer-item", children: link(item, () => setOpen(false)) }, `${i}:${item.href}`))) }) }))] }));
71
78
  }
@@ -62,6 +62,11 @@ export interface ConfirmPopupProps {
62
62
  closeOnClick?: boolean;
63
63
  /** 곁 단추만 따로 비활성 (처리 중 등). 팝업 전체의 busy 와는 별개로 얹힌다. */
64
64
  disabled?: boolean;
65
+ /**
66
+ * 곁 단추가 설 자리 — `'start'`(기본, 맨 앞: [곁, 취소, 확인]) · `'beforeConfirm'`(확인 바로 앞: [취소, 곁, 확인]).
67
+ * 말귀 청 (457), 사장님 지시 *"취소 왼쪽으로"* — 곁 단추가 확인과 같은 갈래의 일(다른 길로 보내기 등)이면 확인 곁에 둔다.
68
+ */
69
+ placement?: 'start' | 'beforeConfirm';
65
70
  };
66
71
  /**
67
72
  * 확인 클릭 시 실행. `close`로 직접 닫을 수 있음(async 지원).
@@ -15,15 +15,17 @@ export default function ConfirmPopup(props) {
15
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
+ 단추 차례는 [곁 단추?, 취소?, 확인] 이다 — 곁 단추가 `placement: 'beforeConfirm'` 이면 [취소?, 곁 단추, 확인]. */
19
19
  const bodyRef = useRef(null);
20
20
  useEffect(() => {
21
21
  if (inline || initialFocus === 'close')
22
22
  return;
23
23
  const panel = bodyRef.current?.closest('.popup-panel');
24
24
  const buttons = Array.from(panel?.querySelectorAll('.popup-footer--buttons button') ?? []);
25
+ /* 취소의 자리 — 곁 단추가 맨 앞이면 둘째, 확인 앞이면(또는 없으면) 첫째(청 (457)) */
26
+ const cancelIndex = extraAction && (extraAction.placement ?? 'start') === 'start' ? 1 : 0;
25
27
  const picked = initialFocus === 'confirm' ? buttons[buttons.length - 1]
26
- : hideCancel ? undefined : buttons[extraAction ? 1 : 0];
28
+ : hideCancel ? undefined : buttons[cancelIndex];
27
29
  if (picked && !picked.disabled)
28
30
  picked.focus();
29
31
  // 열릴 때 한 번만
@@ -76,32 +78,37 @@ export default function ConfirmPopup(props) {
76
78
  // 사용자는 "취소했다"고 믿었는데 실제로는 실행된 것처럼 보이는 문제를 막는다.
77
79
  closeDisabled: busy, inline: inline, width: width ?? size ?? 'small',
78
80
  /* 위에 미리보기가 서면 더해 둔 위 여백을 되돌린다 — 까닭은 `Popup.css` 의 그 규칙에 */
79
- className: cx('confirm-popup', topContent != null && 'confirm-popup--has-top', className), buttons: [
80
- ...(extraAction ? [{
81
- label: extraAction.label,
82
- variant: extraAction.variant ?? 'default',
83
- disabled: extraAction.disabled || busy,
84
- // 확인 단추와 같은 재진입 방지를 받는다. 여기 오는 것은 파괴적이고 되돌릴 수
85
- // 없는 일(삭제·연결 해제)이라, 두 번 눌려 두 번 나가면 첫 번째만 뜻이 있고
86
- // 두 번째는 엉뚱한 실패로 돌아온다.
87
- onClick: async ({ closeWithAnimation }) => {
88
- await once(async () => {
89
- const close = makeClose(closeWithAnimation);
90
- await extraAction.onClick(close.close);
91
- const closeOnClick = extraAction.closeOnClick ?? true;
92
- if (closeOnClick)
93
- closeWithAnimation();
94
- return closeOnClick || close.didClose();
95
- });
96
- },
97
- }] : []),
98
- ...(hideCancel ? [] : [{
99
- label: cancelLabel ?? t('common.cancel', '취소'),
100
- variant: 'default',
101
- disabled: busy,
102
- onClick: ({ closeWithAnimation }) => closeWithAnimation(),
103
- }]),
104
- {
81
+ className: cx('confirm-popup', topContent != null && 'confirm-popup--has-top', className), buttons: (() => {
82
+ /* 차례: [곁, 취소, 확인] — 곁 단추가 'beforeConfirm' 이면 [취소, 곁, 확인](청 (457)) */
83
+ const extraButtons = [
84
+ ...(extraAction ? [{
85
+ label: extraAction.label,
86
+ variant: extraAction.variant ?? 'default',
87
+ disabled: extraAction.disabled || busy,
88
+ // 확인 단추와 같은 재진입 방지를 받는다. 여기 오는 것은 파괴적이고 되돌릴 수
89
+ // 없는 일(삭제·연결 해제)이라, 두 번 눌려 두 번 나가면 첫 번째만 뜻이 있고
90
+ // 두 번째는 엉뚱한 실패로 돌아온다.
91
+ onClick: async ({ closeWithAnimation }) => {
92
+ await once(async () => {
93
+ const close = makeClose(closeWithAnimation);
94
+ await extraAction.onClick(close.close);
95
+ const closeOnClick = extraAction.closeOnClick ?? true;
96
+ if (closeOnClick)
97
+ closeWithAnimation();
98
+ return closeOnClick || close.didClose();
99
+ });
100
+ },
101
+ }] : []),
102
+ ];
103
+ const cancelButtons = [
104
+ ...(hideCancel ? [] : [{
105
+ label: cancelLabel ?? t('common.cancel', '취소'),
106
+ variant: 'default',
107
+ disabled: busy,
108
+ onClick: ({ closeWithAnimation }) => closeWithAnimation(),
109
+ }]),
110
+ ];
111
+ const confirmButton = {
105
112
  label: confirmLabel ?? t('common.confirm', '확인'),
106
113
  variant: confirmVariant,
107
114
  disabled: confirmDisabled || busy,
@@ -114,6 +121,9 @@ export default function ConfirmPopup(props) {
114
121
  return closeOnConfirm || close.didClose();
115
122
  });
116
123
  },
117
- },
118
- ], children: [topContent != null && _jsx("div", { className: "confirm-popup__top", children: topContent }), details && details.length > 0 && (_jsx(Panel, { children: details.map((d, i) => (_jsx(PanelRow, { label: d.label, children: _jsx("span", { className: "panel-row__text body-2", children: d.value }) }, i))) })), _jsx("p", { ref: bodyRef, className: "body-2 confirm-popup__message", hidden: message == null, children: message }), children] }));
124
+ };
125
+ return (extraAction?.placement ?? 'start') === 'beforeConfirm'
126
+ ? [...cancelButtons, ...extraButtons, confirmButton]
127
+ : [...extraButtons, ...cancelButtons, confirmButton];
128
+ })(), children: [topContent != null && _jsx("div", { className: "confirm-popup__top", children: topContent }), details && details.length > 0 && (_jsx(Panel, { children: details.map((d, i) => (_jsx(PanelRow, { label: d.label, children: _jsx("span", { className: "panel-row__text body-2", children: d.value }) }, i))) })), _jsx("p", { ref: bodyRef, className: "body-2 confirm-popup__message", hidden: message == null, children: message }), children] }));
119
129
  }
@@ -57,6 +57,13 @@
57
57
  min-width: min(480px, calc(100% - 40px));
58
58
  max-width: min(1140px, calc(100% - 40px));
59
59
  }
60
+ /* **내용에 맞춘 창은 막대 자리를 미리 안 잡는다**(말귀 청 (453)) — 창 폭을 정하는 셈(`fit-content`)이 `scrollbar-gutter: stable` 의
61
+ 자리(6px)를 안 셈해, 속이 그만큼 모자랐다. 카드 셋(200 × 3 + 틈 10 × 2 = 620)에 맞춰 선 창의 속이 614 가 되어 그리드가 둘 + 하나로
62
+ 접혔다(말귀 랜딩 실측). 이 창은 내용에 맞춰 서므로 대개 구르지 않는다 — 막대 자리는 구를 때만 생기고, 좌우 여백은 그대로 20 이다. */
63
+ .popup-panel--fit > .popup-content {
64
+ scrollbar-gutter: auto;
65
+ padding-inline-end: var(--spacing-l);
66
+ }
60
67
  /* 층 — 훈련 페이지 팝업 바로 아래(그 창이 이 창을 덮는다). inline 은 제 자리 규칙을 따른다 */
61
68
  .popup.popup--below-page-popup:not(.popup--inline) { z-index: calc(var(--z-page-popup) - 1); }
62
69
  .popup-close-float {
@@ -118,6 +125,21 @@
118
125
  overscroll-behavior: contain;
119
126
  touch-action: pan-y;
120
127
  }
128
+ /* **아래가 더 남은 꼬리말 없는 창 — 본문 아래 끝을 흐린다**(말귀 청 (456), 사장님 2026-11-17 아래 흐림을 고르심).
129
+ `Popup` 이 본문이 더 구를 수 있는 동안만 `data-more-below` 를 단다. 흐림은 본문 끝에 붙은(sticky) 빈 줄이라 구르는 동안 창 아래에
130
+ 머물고, 끝까지 내리면 표시가 걷혀 사라진다. 색은 창 바탕(`--color-white`) → 투명, 높이는 `--spacing-xl`(24). 누름은 지나간다. */
131
+ .popup-content[data-more-below]::after {
132
+ content: '';
133
+ display: block;
134
+ position: sticky;
135
+ bottom: 0;
136
+ height: var(--spacing-xl);
137
+ /* 본문은 세로 flex 라, 안 막으면 넘칠 때 이 줄이 0 으로 줄어든다(실측 — 놀이터에서 키 0) */
138
+ flex-shrink: 0;
139
+ margin-top: calc(-1 * var(--spacing-xl));
140
+ background: linear-gradient(to bottom, transparent, var(--color-white));
141
+ pointer-events: none;
142
+ }
121
143
  /* **`.popup-content__inner` — 굴러가는 칸 안의 한 겹.** 바탕에서는 여백이 없다(본문 위아래 0, 사장님 지시 2026-11-16). 하는 일은 셋:
122
144
  · 아래 여백이 필요할 때 **굴림과 함께 움직이게** 이 겹에 준다 — 바닥이 없는 창(아래 규칙) · 확인창(맨 아래).
123
145
  굴러가는 칸(`.popup-content`) 제 padding-bottom 은 브라우저에 따라 굴림 끝에 안 붙어, 겹에 준다.
@@ -67,20 +67,34 @@ export default function Popup(props) {
67
67
  // tabIndex가 없으면 키보드만 쓰는 사용자가 아예 스크롤할 수 없다(WCAG 2.1.1).
68
68
  // 넘치지 않을 때는 부여하지 않는다 — 짧은 확인 팝업에 불필요한 Tab 정지점이 생긴다.
69
69
  const [contentScrollable, setContentScrollable] = useState(false);
70
+ /* **아래가 더 남았나**(말귀 청 (456), 사장님 2026-11-17 *"popup에 footer 가 없으니까 하단이 스크롤이 닿아 버리네?"* → 아래 흐림).
71
+ 꼬리말 없는 창은 본문이 창의 마지막이라, 내리는 도중 카드가 둥근 아래 모서리에 칼로 자른 듯 걸려 더 있는지가 안 보였다.
72
+ 더 구를 수 있는 동안만 `data-more-below` 를 달고 CSS 가 아래 끝에 흐림을 깐다 — 끝까지 내리면 걷힌다. */
73
+ const [moreBelow, setMoreBelow] = useState(false);
70
74
  useEffect(() => {
71
75
  const el = contentRef.current;
72
76
  if (!el)
73
77
  return;
74
- const check = () => setContentScrollable(el.scrollHeight > el.clientHeight + 1);
78
+ const check = () => {
79
+ setContentScrollable(el.scrollHeight > el.clientHeight + 1);
80
+ setMoreBelow(el.scrollHeight - el.scrollTop - el.clientHeight > 1);
81
+ };
75
82
  check();
83
+ /* 구를 때마다 바로 재지 않고 **한 틀에 한 번**으로 모은다 — 스크롤은 한 틀에 여러 번 온다 */
84
+ let frame = 0;
85
+ const onScroll = () => { if (!frame)
86
+ frame = requestAnimationFrame(() => { frame = 0; check(); }); };
87
+ el.addEventListener('scroll', onScroll, { passive: true });
88
+ const stop = () => { el.removeEventListener('scroll', onScroll); if (frame)
89
+ cancelAnimationFrame(frame); };
76
90
  if (typeof ResizeObserver === 'undefined')
77
- return;
91
+ return stop;
78
92
  const ro = new ResizeObserver(check);
79
93
  ro.observe(el);
80
94
  const inner = el.firstElementChild;
81
95
  if (inner)
82
96
  ro.observe(inner);
83
- return () => ro.disconnect();
97
+ return () => { ro.disconnect(); stop(); };
84
98
  }, [children, resetScrollKey]);
85
99
  useEffect(() => {
86
100
  if (inline)
@@ -248,7 +262,7 @@ export default function Popup(props) {
248
262
  max-height(CSS)가 height 보다 이기므로 화면보다 크게 줘도 화면에 맞춰진다 */
249
263
  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
250
264
  ? _jsx("h2", { id: titleId, className: "popup-title popup-title--left h2", children: title })
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) ? (
265
+ : _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, "data-more-below": moreBelow && !(footerStart || footerEnd || (buttons && buttons.length > 0) || footer) ? '' : undefined, children: _jsx("div", { className: "popup-content__inner", children: typeof children === 'function' ? children({ animateThen, closeWithAnimation }) : children }) }), (footerStart || footerEnd) ? (
252
266
  /* 왼쪽·오른쪽 덩이 — 빈 덩이도 그린다(자리를 지켜야 오른쪽이 끝에 선다).
253
267
  `footerLayout` 은 보지 않는다: 이 줄 자체가 배치다. */
254
268
  _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] }) }));
@@ -56,6 +56,13 @@
56
56
  gap: var(--block-grid-gap, 10px);
57
57
  margin: 0 auto;
58
58
  }
59
+ /* **모서리 배지가 위로 삐져나오는 만큼 윗자리를 쥔다**(말귀 청 (455), 사장님 2026-11-17 *"circlebadge 잘린다"*).
60
+ 줄이 구르는 상자(`.popup-content`)의 맨 위에 바로 서면, 카드의 끝냄 배지(위 · 왼쪽으로 6 삐져나옴)가 상자 윗선에서 5px 깎였다.
61
+ 쓰는 쪽이 그 수를 몰라도 되게 줄이 배지의 수(`--circle-badge-overhang`)만큼 위를 비운다 — **배지가 든 줄만**이라 배지 없는 줄의
62
+ 키 · 자리는 그대로다. */
63
+ .training-block-grid:has(.circle-badge--top-left, .circle-badge--top-right) {
64
+ padding-top: var(--circle-badge-overhang, 6px);
65
+ }
59
66
  .training-block-grid--measured {
60
67
  max-width: calc(var(--block-grid-cols) * var(--block-grid-card) + (var(--block-grid-cols) - 1) * var(--block-grid-gap, 10px));
61
68
  }
@@ -76,6 +76,8 @@ export { default as LandingCard } from './components/Landing/LandingCard';
76
76
  export type { LandingCardProps } from './components/Landing/LandingCard';
77
77
  export { default as LandingButton } from './components/Landing/LandingButton';
78
78
  export type { LandingButtonProps } from './components/Landing/LandingButton';
79
+ export { default as LandingMenuLink } from './components/Landing/LandingMenuLink';
80
+ export type { LandingMenuLinkProps } from './components/Landing/LandingMenuLink';
79
81
  export { default as LandingStatBand } from './components/Landing/LandingStatBand';
80
82
  export type { LandingStatBandProps, LandingStat } from './components/Landing/LandingStatBand';
81
83
  export { default as Badge } from './components/Badge';
@@ -57,6 +57,7 @@ export { default as LandingSection } from './components/Landing/LandingSection';
57
57
  export { default as LandingTitle } from './components/Landing/LandingTitle';
58
58
  export { default as LandingCard } from './components/Landing/LandingCard';
59
59
  export { default as LandingButton } from './components/Landing/LandingButton';
60
+ export { default as LandingMenuLink } from './components/Landing/LandingMenuLink';
60
61
  export { default as LandingStatBand } from './components/Landing/LandingStatBand';
61
62
  export { default as Badge } from './components/Badge';
62
63
  export { default as CircleBadge } from './components/CircleBadge';
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export declare const CORE_VERSION = "0.458.0";
49
+ export declare const CORE_VERSION = "0.460.0";
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export const CORE_VERSION = '0.458.0';
49
+ export const CORE_VERSION = '0.460.0';