sellmate-design-system-react 9.0.0-beta.97 → 9.0.0-beta.99

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.
package/AGENTS.md CHANGED
@@ -1343,6 +1343,7 @@ tableRef.current.scrollToRow(row); // 복원
1343
1343
  | 본문 속 이동 링크 | `STextLink` |
1344
1344
  | 메인 액션 + 부가 메뉴 | `SDropdownButton` |
1345
1345
  | **GNB system 패널의 한 줄 액션** | **`SSystemActionButton`** — 행 전체가 버튼인 표면형 (아래 3-5-7) |
1346
+ | **본문·목록 사이에 끼어 서는 작은 부가 버튼** (추천 질문·출처 바로가기) | **`SButton pill color="neutral" outline`** (아래 3-5-6) |
1346
1347
 
1347
1348
  #### 3-5-1. 채움 버튼은 페이지당 개수 제한이 있다
1348
1349
 
@@ -1374,6 +1375,7 @@ tableRef.current.scrollToRow(row); // 복원
1374
1375
 
1375
1376
  | 위치 | size |
1376
1377
  | --- | --- |
1378
+ | **본문 텍스트 사이**에 끼워 서는 버튼 (출처 번호·문장 속 바로가기) | `xxs` |
1377
1379
  | 테이블 **행 내부** 인라인 액션 | `xs` |
1378
1380
  | 화면·목록 액션 (툴바, `STableBar`) | `sm` |
1379
1381
  | **모달·드로어·팝업 푸터** | `md` (고정) |
@@ -1384,6 +1386,8 @@ tableRef.current.scrollToRow(row); // 복원
1384
1386
 
1385
1387
  `lg` 는 현재 사용처가 없다. 페이지 골격에서 쓰지 않는다.
1386
1388
 
1389
+ **`xxs` 는 본문 텍스트 사이에만 쓴다.** 높이가 본문 줄 높이와 같아 문장 속에 끼워도 줄이 벌어지지 않는 크기다. 목록·툴바·표 행처럼 버튼끼리 서는 자리에서는 누르기에 작으니 `xs` 이상을 쓴다. 문장 속 알약이면 `pill` 과 함께 준다.
1390
+
1387
1391
  **푸터 버튼의 크기는 버튼이 아니라 푸터가 정한다.** 모달·드로어·팝업은 예외가 없어 타입에 `size` 가 없고, 카드 둘(`SCard`·`SSectionHeaderCard`)만 `footerSize` 로 고른다 — 자세한 기준은 §3-7-8. **`footerLeft` 슬롯에 직접 배치하는 `SButton` 은 그 푸터와 같은 크기를 명시한다**(모달이면 `size="md"`, `footerSize="sm"` 인 카드면 `size="sm"`). 슬롯까지는 타입이 못 막으므로 어긋나면 좌우 버튼 높이가 갈린다.
1388
1392
 
1389
1393
  #### 3-5-3. 파괴적 액션의 채움 / outline
@@ -1484,6 +1488,7 @@ tableRef.current.scrollToRow(row); // 복원
1484
1488
  - 라벨은 **동사(+목적어)** — `저장` · `적치 지시` · `송장 재출력`
1485
1489
  - 완료된 작업 버튼은 제거하지 않고 **`disabled` 로 남긴다.** 자리가 사라지면 행 높이가 흔들린다.
1486
1490
  - **모달 보조 액션은 `color="neutral" outline`** 이 표준이다.
1491
+ - **`pill` 은 본문·목록 사이에 끼어 서는 작은 부가 버튼에만 준다** — 추천 질문·출처 바로가기처럼 누르면 동작하는 알약. 보통 `color="neutral" outline` 과 함께 쓰고, 크기는 목록 사이면 `xs`, 문장 속이면 `xxs` 다(§3-5-2). 화면의 주 액션·폼 제출·하단 버튼은 모서리를 바꾸지 않는다. 값·필터 토큰이면 `SChip`, 누를 수 없는 표시면 `STag` 다. 알약 모양을 `className="rounded-full"` 로 직접 만들지 않는다.
1487
1492
 
1488
1493
  **하단 버튼 배치 (모든 화면 공통)** — 그룹을 모아 정렬하지 않고 **양끝으로 벌린다**(`justify-between`).
1489
1494
 
@@ -10,10 +10,11 @@
10
10
  |------|------|---------|-------------|
11
11
  | `color?` | `SButtonColor` | `'primary'` | 색상 — sd-button preset의 색 계열 |
12
12
  | `outline?` | `boolean` | `false` | 아웃라인(테두리) 스타일. primary·neutral·danger 만 지원 (secondary 는 무시) |
13
- | `size?` | `SButtonSize` | `'sm'` | 크기 |
13
+ | `size?` | `SButtonSize` | `'sm'` | 크기. 놓이는 위치가 정한다(AGENTS.md §3-5-2). `xxs` 는 본문 텍스트 사이에 끼워 서는 버튼 전용 — 높이가 본문 줄 높이와 같아 줄이 벌어지지 않는다. 버튼끼리 서는 자리에서는 `xs` 이상을 쓴다. |
14
14
  | `icon?` | `SIconName` | — | 레이블 왼쪽 아이콘 |
15
15
  | `rightIcon?` | `SIconName` | — | 레이블 오른쪽 아이콘 |
16
16
  | `label?` | `string` | — | 버튼 텍스트 (문자열만 — 아이콘은 icon/rightIcon 사용) |
17
+ | `pill?` | `boolean` | `false` | 모서리를 완전히 둥글게(알약 모양). 색·크기·아이콘은 그대로다. 본문·목록 사이에 끼어 서는 **누르면 동작하는 작은 부가 버튼**에 쓴다 — 출처 배지·추천 질문처럼. 보통 `color="neutral" outline` 과 함께 쓴다(흰 면 + 옅은 테두리). 화면의 주 액션·폼 제출 버튼은 모서리를 바꾸지 않는다. 값·필터 토큰이면 `SChip`, 누를 수 없는 표시면 `STag` 다. |
17
18
 
18
19
  ## Types
19
20
 
@@ -46,7 +47,7 @@ export const BUTTON_COLORS = ['primary', 'secondary', 'neutral', 'danger'] as co
46
47
  ### BUTTON_SIZES
47
48
 
48
49
  ```ts
49
- export const BUTTON_SIZES = ['xs', 'sm', 'md', 'lg'] as const;
50
+ export const BUTTON_SIZES = ['xxs', 'xs', 'sm', 'md', 'lg'] as const;
50
51
  ```
51
52
 
52
53
  ## Dependencies
@@ -6,7 +6,10 @@ export interface SButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElemen
6
6
  color?: SButtonColor;
7
7
  /** 아웃라인(테두리) 스타일. primary·neutral·danger 만 지원 (secondary 는 무시) */
8
8
  outline?: boolean;
9
- /** 크기 */
9
+ /**
10
+ * 크기. 놓이는 위치가 정한다(AGENTS.md §3-5-2). `xxs` 는 본문 텍스트 사이에 끼워 서는 버튼 전용 —
11
+ * 높이가 본문 줄 높이와 같아 줄이 벌어지지 않는다. 버튼끼리 서는 자리에서는 `xs` 이상을 쓴다.
12
+ */
10
13
  size?: SButtonSize;
11
14
  /** 레이블 왼쪽 아이콘 */
12
15
  icon?: SIconName;
@@ -14,10 +17,18 @@ export interface SButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElemen
14
17
  rightIcon?: SIconName;
15
18
  /** 버튼 텍스트 (문자열만 — 아이콘은 icon/rightIcon 사용) */
16
19
  label?: string;
20
+ /**
21
+ * 모서리를 완전히 둥글게(알약 모양). 색·크기·아이콘은 그대로다.
22
+ *
23
+ * 본문·목록 사이에 끼어 서는 **누르면 동작하는 작은 부가 버튼**에 쓴다 — 출처 배지·추천 질문처럼.
24
+ * 보통 `color="neutral" outline` 과 함께 쓴다(흰 면 + 옅은 테두리). 화면의 주 액션·폼 제출 버튼은
25
+ * 모서리를 바꾸지 않는다. 값·필터 토큰이면 `SChip`, 누를 수 없는 표시면 `STag` 다.
26
+ */
27
+ pill?: boolean;
17
28
  }
18
29
  /**
19
30
  * SButton — sd-button 포팅.
20
- * color(4) × outline × 4개 사이즈, 아이콘(icon/rightIcon), 컴포넌트 토큰(--cmp-button-*) 기반.
31
+ * color(4) × outline × 5개 사이즈, 아이콘(icon/rightIcon), pill 모양, 컴포넌트 토큰(--cmp-button-*) 기반.
21
32
  * 텍스트는 label(문자열)로만 받는다. 이벤트: sdClick → 네이티브 onClick.
22
33
  */
23
34
  export declare const SButton: import("react").ForwardRefExoticComponent<SButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -7,7 +7,7 @@
7
7
  * 색상은 theme.css의 `--cmp-button-*` CSS 변수를 참조한다.
8
8
  */
9
9
  export declare const BUTTON_COLORS: readonly ["primary", "secondary", "neutral", "danger"];
10
- export declare const BUTTON_SIZES: readonly ["xs", "sm", "md", "lg"];
10
+ export declare const BUTTON_SIZES: readonly ["xxs", "xs", "sm", "md", "lg"];
11
11
  export type SButtonColor = (typeof BUTTON_COLORS)[number];
12
12
  export type SButtonSize = (typeof BUTTON_SIZES)[number];
13
13
  interface PresetColors {
@@ -32,6 +32,8 @@ export declare const BUTTON_SIZE_CONFIG: Record<SButtonSize, {
32
32
  fontWeight: number;
33
33
  radius: string;
34
34
  minWidth: number;
35
+ /** 라벨 글자만 내리는 위 여백 — 글꼴 상자가 버튼 안에 반 픽셀로 놓이는 크기의 보정 (xxs) */
36
+ labelOffsetTop?: string;
35
37
  }>;
36
38
  export declare const BUTTON_FOCUS_RING = "var(--sys-color-border-accent)";
37
39
  export declare const BUTTON_DISABLED_BG = "var(--cmp-button-bg-disabled, #E1E1E1)";
package/dist/index.cjs CHANGED
@@ -4153,7 +4153,7 @@ var SBadge = /* @__PURE__ */ react.forwardRef(function SBadge2({ color = "blue",
4153
4153
 
4154
4154
  // src/components/SButton/button.config.ts
4155
4155
  var BUTTON_COLORS = ["primary", "secondary", "neutral", "danger"];
4156
- var BUTTON_SIZES = ["xs", "sm", "md", "lg"];
4156
+ var BUTTON_SIZES = ["xxs", "xs", "sm", "md", "lg"];
4157
4157
  var V = (path) => `var(--cmp-button-${path})`;
4158
4158
  function buttonPreset(color, outline) {
4159
4159
  switch (color) {
@@ -4204,6 +4204,25 @@ function buttonPreset(color, outline) {
4204
4204
  }
4205
4205
  }
4206
4206
  var BUTTON_SIZE_CONFIG = {
4207
+ /**
4208
+ * 본문 텍스트 사이에 끼워 서는 버튼 — 높이가 본문 줄 높이(12px/20px)와 같아 줄이 벌어지지 않는다.
4209
+ * 버튼 xxs 컴포넌트 토큰(--cmp-button-xxs-*)이 아직 없어 공용 토큰으로 둔다. 디자인팀이 내면 바꾼다.
4210
+ */
4211
+ xxs: {
4212
+ height: "var(--spacing-sd-20)",
4213
+ paddingX: "var(--spacing-sd-6)",
4214
+ gap: "var(--spacing-sd-4)",
4215
+ iconSize: "var(--cmp-button-xs-icon)",
4216
+ iconOnlyWidth: "var(--spacing-sd-20)",
4217
+ fontSize: 11,
4218
+ fontWeight: 500,
4219
+ radius: "var(--cmp-button-radius-sm)",
4220
+ // 번호 하나·짧은 낱말이 그대로 서야 해서 최소 폭을 두지 않는다
4221
+ minWidth: 0,
4222
+ // 11px 글자의 글꼴 상자(13px)가 안쪽 높이(18px)에 반 픽셀 자리로 놓이고, Pretendard 는 위가 넓어
4223
+ // 한글이 0.8px 위로 쏠린다. 라벨에 위 여백 1px 을 줘 0.5px 내린다 — 글자 크기·높이를 바꾸면 다시 잰다
4224
+ labelOffsetTop: "1px"
4225
+ },
4207
4226
  xs: {
4208
4227
  height: "var(--cmp-button-xs-height)",
4209
4228
  paddingX: "var(--cmp-button-xs-paddingX)",
@@ -4261,6 +4280,7 @@ var SButton = /* @__PURE__ */ react.forwardRef(function SButton2({
4261
4280
  icon,
4262
4281
  rightIcon,
4263
4282
  label,
4283
+ pill = false,
4264
4284
  className,
4265
4285
  style,
4266
4286
  type = "button",
@@ -4291,7 +4311,8 @@ var SButton = /* @__PURE__ */ react.forwardRef(function SButton2({
4291
4311
  "minHeight": s.height,
4292
4312
  "minWidth": iconOnly ? s.iconOnlyWidth : hasLabel ? s.minWidth : void 0,
4293
4313
  "padding": iconOnly ? 0 : `0 ${s.paddingX}`,
4294
- "borderRadius": s.radius,
4314
+ // 버튼 전용 pill 반경 토큰이 아직 없어 공용 반경을 쓴다
4315
+ "borderRadius": pill ? "var(--radius-full)" : s.radius,
4295
4316
  "gap": s.gap,
4296
4317
  "fontSize": s.fontSize,
4297
4318
  "fontWeight": s.fontWeight,
@@ -4316,7 +4337,14 @@ var SButton = /* @__PURE__ */ react.forwardRef(function SButton2({
4316
4337
  ...props,
4317
4338
  children: [
4318
4339
  iconNode,
4319
- hasLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center justify-center", children: label }),
4340
+ hasLabel && /* @__PURE__ */ jsxRuntime.jsx(
4341
+ "span",
4342
+ {
4343
+ className: "inline-flex items-center justify-center",
4344
+ style: s.labelOffsetTop ? { paddingTop: s.labelOffsetTop } : void 0,
4345
+ children: label
4346
+ }
4347
+ ),
4320
4348
  rightIconNode
4321
4349
  ]
4322
4350
  }