@x-plat/design-system 0.5.65 → 0.6.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 (72) hide show
  1. package/dist/components/Accordion/index.css +6 -6
  2. package/dist/components/AutoResizeTextArea/index.css +5 -5
  3. package/dist/components/Avatar/index.css +2 -2
  4. package/dist/components/Badge/index.css +1 -1
  5. package/dist/components/Box/index.css +5 -5
  6. package/dist/components/Breadcrumb/index.css +4 -4
  7. package/dist/components/Button/index.cjs +1 -2
  8. package/dist/components/Button/index.css +6 -6
  9. package/dist/components/Button/index.d.cts +1 -1
  10. package/dist/components/Button/index.d.ts +1 -1
  11. package/dist/components/Button/index.js +1 -2
  12. package/dist/components/Calendar/index.css +18 -18
  13. package/dist/components/CardTab/index.css +8 -8
  14. package/dist/components/Chart/index.css +11 -11
  15. package/dist/components/ChatInput/index.cjs +1 -2
  16. package/dist/components/ChatInput/index.css +16 -16
  17. package/dist/components/ChatInput/index.js +1 -2
  18. package/dist/components/CheckBox/index.css +2 -4
  19. package/dist/components/CheckBox/index.js +1 -1
  20. package/dist/components/Chip/index.css +5 -5
  21. package/dist/components/DatePicker/index.cjs +1 -2
  22. package/dist/components/DatePicker/index.css +36 -36
  23. package/dist/components/DatePicker/index.js +1 -2
  24. package/dist/components/Divider/index.css +2 -2
  25. package/dist/components/Drawer/index.css +5 -5
  26. package/dist/components/Dropdown/index.css +4 -4
  27. package/dist/components/Editor/index.css +36 -36
  28. package/dist/components/EmptyState/index.css +2 -2
  29. package/dist/components/FileUpload/index.css +4 -4
  30. package/dist/components/HtmlTypeWriter/index.css +1 -1
  31. package/dist/components/IconButton/index.cjs +1 -2
  32. package/dist/components/IconButton/index.css +5 -5
  33. package/dist/components/IconButton/index.d.cts +1 -1
  34. package/dist/components/IconButton/index.d.ts +1 -1
  35. package/dist/components/IconButton/index.js +1 -2
  36. package/dist/components/ImageSelector/index.css +7 -7
  37. package/dist/components/Input/index.css +7 -7
  38. package/dist/components/Modal/index.css +1 -1
  39. package/dist/components/Pagination/index.css +3 -3
  40. package/dist/components/PopOver/index.css +1 -1
  41. package/dist/components/Progress/index.css +1 -1
  42. package/dist/components/Radio/index.css +5 -5
  43. package/dist/components/Select/index.css +9 -9
  44. package/dist/components/Spinner/index.css +1 -1
  45. package/dist/components/Steps/index.css +3 -3
  46. package/dist/components/Swiper/index.css +3 -3
  47. package/dist/components/Switch/index.css +3 -3
  48. package/dist/components/Tab/index.css +4 -4
  49. package/dist/components/Table/index.css +10 -10
  50. package/dist/components/Tag/index.css +3 -3
  51. package/dist/components/TextArea/index.css +5 -5
  52. package/dist/components/Tooltip/index.css +4 -4
  53. package/dist/components/Video/index.css +1 -1
  54. package/dist/components/index.cjs +2 -4
  55. package/dist/components/index.css +624 -1018
  56. package/dist/components/index.js +3 -5
  57. package/dist/index.cjs +2 -6
  58. package/dist/index.css +624 -1018
  59. package/dist/index.d.cts +1 -1
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +3 -6
  62. package/dist/layout/index.css +401 -793
  63. package/dist/tokens/index.cjs +0 -2
  64. package/dist/tokens/index.d.cts +9 -10
  65. package/dist/tokens/index.d.ts +9 -10
  66. package/dist/tokens/index.js +1 -2
  67. package/guidelines/AGENT_PROMPT.md +8 -9
  68. package/guidelines/Guidelines.md +1 -1
  69. package/guidelines/components/chart.md +1 -1
  70. package/guidelines/foundations/color.md +22 -23
  71. package/guidelines/foundations/typography.md +86 -36
  72. package/package.json +1 -1
@@ -319,7 +319,6 @@ __export(tokens_exports, {
319
319
  breakpoints: () => breakpoints,
320
320
  cssVar: () => import_tokens_core2.cssVar,
321
321
  gridColumns: () => gridColumns,
322
- primitive: () => import_tokens_core.primitive,
323
322
  semantic: () => import_tokens_core.semantic
324
323
  });
325
324
  module.exports = __toCommonJS(tokens_exports);
@@ -6111,6 +6110,5 @@ var import_tokens_core2 = require("@x-plat/tokens-core");
6111
6110
  breakpoints,
6112
6111
  cssVar,
6113
6112
  gridColumns,
6114
- primitive,
6115
6113
  semantic
6116
6114
  });
@@ -1,18 +1,17 @@
1
1
  export { B as BREAKPOINT_KEYS_ORDERED, a as BreakpointKey, b as GridColumnConfig, G as GridSpanFor, c as breakpoints, g as gridColumns } from '../breakpoints-DsXkJgdl.cjs';
2
- export { TokenVar, cssVar, primitive, semantic } from '@x-plat/tokens-core';
2
+ export { TokenVar, cssVar, semantic } from '@x-plat/tokens-core';
3
3
  import React from 'react';
4
4
 
5
- type SemanticTextToken = "semantic-text-strong" | "semantic-text-subtle" | "semantic-text-muted" | "semantic-text-brand" | "semantic-text-disabled" | "semantic-text-inverse" | "semantic-text-success" | "semantic-text-error" | "semantic-text-warning" | "semantic-text-info" | "semantic-text-link";
5
+ type SemanticTextToken = "semantic-text-primary" | "semantic-text-secondary" | "semantic-text-tertiary" | "semantic-text-brand-primary" | "semantic-text-brand-secondary" | "semantic-text-disabled" | "semantic-text-inverse" | "semantic-text-success" | "semantic-text-error" | "semantic-text-warning" | "semantic-text-info" | "semantic-text-link" | "semantic-text-accent-red" | "semantic-text-accent-blue";
6
6
  type SurfaceVariant = "subtle" | "default" | "strong";
7
- type SurfaceGroup = "brand" | "success" | "error" | "warning" | "info";
8
- type SemanticSurfaceToken = "semantic-surface-neutral-default" | "semantic-surface-neutral-subtle" | "semantic-surface-neutral-strong" | "semantic-surface-neutral-overlay" | "semantic-surface-neutral-disabled" | `semantic-surface-${SurfaceGroup}-${SurfaceVariant}`;
9
- type SemanticBorderToken = "semantic-border-default" | "semantic-border-subtle" | "semantic-border-strong" | "semantic-border-disabled" | "semantic-border-success" | "semantic-border-error" | "semantic-border-warning" | "semantic-border-info";
10
- type SemanticIconToken = "semantic-icon-strong" | "semantic-icon-subtle" | "semantic-icon-inverse" | "semantic-icon-brand" | "semantic-icon-success" | "semantic-icon-error" | "semantic-icon-warning" | "semantic-icon-info" | "semantic-icon-disabled";
11
- type SemanticEmphasisToken = "semantic-emphasis-brand" | "semantic-emphasis-success" | "semantic-emphasis-error" | "semantic-emphasis-warning" | "semantic-emphasis-info";
12
- type SemanticInteractionToken = "semantic-interaction-overlay-10" | "semantic-interaction-overlay-25" | "semantic-interaction-focus-ring";
13
- type SemanticColorToken = SemanticTextToken | SemanticSurfaceToken | SemanticBorderToken | SemanticIconToken | SemanticEmphasisToken | SemanticInteractionToken;
7
+ type SurfaceGroup = "brand" | "brand-secondary" | "success" | "error" | "warning" | "info";
8
+ type SemanticSurfaceToken = "semantic-surface-neutral-primary" | "semantic-surface-neutral-secondary" | "semantic-surface-neutral-tertiary" | "semantic-surface-neutral-inverse" | "semantic-surface-neutral-disabled" | `semantic-surface-${SurfaceGroup}-${SurfaceVariant}`;
9
+ type SemanticBorderToken = "semantic-border-primary" | "semantic-border-secondary" | "semantic-border-tertiary" | "semantic-border-disabled" | "semantic-border-brand-primary" | "semantic-border-brand-secondary" | "semantic-border-success" | "semantic-border-error" | "semantic-border-warning" | "semantic-border-info";
10
+ type SemanticIconToken = "semantic-icon-primary" | "semantic-icon-secondary" | "semantic-icon-inverse" | "semantic-icon-brand" | "semantic-icon-brand-secondary" | "semantic-icon-success" | "semantic-icon-error" | "semantic-icon-warning" | "semantic-icon-info" | "semantic-icon-disabled";
11
+ type SemanticInteractionToken = `semantic-interaction-overlay-${5 | 10 | 25 | 50 | 75}` | "semantic-interaction-focus-ring";
12
+ type SemanticColorToken = SemanticTextToken | SemanticSurfaceToken | SemanticBorderToken | SemanticIconToken | SemanticInteractionToken;
14
13
  type Shade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
15
- type BrandToken = `brand-primary-${Shade}` | `brand-secondary-${Shade}` | `brand-neutral-${Shade}` | "brand-base-white" | "brand-base-black-alpha-10" | "brand-base-black-alpha-25";
14
+ type BrandToken = `brand-primary-${Shade}` | `brand-secondary-${Shade}` | `brand-neutral-${Shade}` | "brand-base-white" | `brand-base-overlay-${5 | 10 | 25 | 50 | 75 | 85}`;
16
15
  type SystemToken = `system-success-${Shade}` | `system-error-${Shade}` | `system-warning-${Shade}` | `system-info-${Shade}` | `system-link-${400 | 500 | 600 | 700}`;
17
16
  type ColorToken = SemanticColorToken | BrandToken | SystemToken | XplatColorTokenRegistry[keyof XplatColorTokenRegistry];
18
17
  interface ColorProps {
@@ -1,18 +1,17 @@
1
1
  export { B as BREAKPOINT_KEYS_ORDERED, a as BreakpointKey, b as GridColumnConfig, G as GridSpanFor, c as breakpoints, g as gridColumns } from '../breakpoints-DsXkJgdl.js';
2
- export { TokenVar, cssVar, primitive, semantic } from '@x-plat/tokens-core';
2
+ export { TokenVar, cssVar, semantic } from '@x-plat/tokens-core';
3
3
  import React from 'react';
4
4
 
5
- type SemanticTextToken = "semantic-text-strong" | "semantic-text-subtle" | "semantic-text-muted" | "semantic-text-brand" | "semantic-text-disabled" | "semantic-text-inverse" | "semantic-text-success" | "semantic-text-error" | "semantic-text-warning" | "semantic-text-info" | "semantic-text-link";
5
+ type SemanticTextToken = "semantic-text-primary" | "semantic-text-secondary" | "semantic-text-tertiary" | "semantic-text-brand-primary" | "semantic-text-brand-secondary" | "semantic-text-disabled" | "semantic-text-inverse" | "semantic-text-success" | "semantic-text-error" | "semantic-text-warning" | "semantic-text-info" | "semantic-text-link" | "semantic-text-accent-red" | "semantic-text-accent-blue";
6
6
  type SurfaceVariant = "subtle" | "default" | "strong";
7
- type SurfaceGroup = "brand" | "success" | "error" | "warning" | "info";
8
- type SemanticSurfaceToken = "semantic-surface-neutral-default" | "semantic-surface-neutral-subtle" | "semantic-surface-neutral-strong" | "semantic-surface-neutral-overlay" | "semantic-surface-neutral-disabled" | `semantic-surface-${SurfaceGroup}-${SurfaceVariant}`;
9
- type SemanticBorderToken = "semantic-border-default" | "semantic-border-subtle" | "semantic-border-strong" | "semantic-border-disabled" | "semantic-border-success" | "semantic-border-error" | "semantic-border-warning" | "semantic-border-info";
10
- type SemanticIconToken = "semantic-icon-strong" | "semantic-icon-subtle" | "semantic-icon-inverse" | "semantic-icon-brand" | "semantic-icon-success" | "semantic-icon-error" | "semantic-icon-warning" | "semantic-icon-info" | "semantic-icon-disabled";
11
- type SemanticEmphasisToken = "semantic-emphasis-brand" | "semantic-emphasis-success" | "semantic-emphasis-error" | "semantic-emphasis-warning" | "semantic-emphasis-info";
12
- type SemanticInteractionToken = "semantic-interaction-overlay-10" | "semantic-interaction-overlay-25" | "semantic-interaction-focus-ring";
13
- type SemanticColorToken = SemanticTextToken | SemanticSurfaceToken | SemanticBorderToken | SemanticIconToken | SemanticEmphasisToken | SemanticInteractionToken;
7
+ type SurfaceGroup = "brand" | "brand-secondary" | "success" | "error" | "warning" | "info";
8
+ type SemanticSurfaceToken = "semantic-surface-neutral-primary" | "semantic-surface-neutral-secondary" | "semantic-surface-neutral-tertiary" | "semantic-surface-neutral-inverse" | "semantic-surface-neutral-disabled" | `semantic-surface-${SurfaceGroup}-${SurfaceVariant}`;
9
+ type SemanticBorderToken = "semantic-border-primary" | "semantic-border-secondary" | "semantic-border-tertiary" | "semantic-border-disabled" | "semantic-border-brand-primary" | "semantic-border-brand-secondary" | "semantic-border-success" | "semantic-border-error" | "semantic-border-warning" | "semantic-border-info";
10
+ type SemanticIconToken = "semantic-icon-primary" | "semantic-icon-secondary" | "semantic-icon-inverse" | "semantic-icon-brand" | "semantic-icon-brand-secondary" | "semantic-icon-success" | "semantic-icon-error" | "semantic-icon-warning" | "semantic-icon-info" | "semantic-icon-disabled";
11
+ type SemanticInteractionToken = `semantic-interaction-overlay-${5 | 10 | 25 | 50 | 75}` | "semantic-interaction-focus-ring";
12
+ type SemanticColorToken = SemanticTextToken | SemanticSurfaceToken | SemanticBorderToken | SemanticIconToken | SemanticInteractionToken;
14
13
  type Shade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
15
- type BrandToken = `brand-primary-${Shade}` | `brand-secondary-${Shade}` | `brand-neutral-${Shade}` | "brand-base-white" | "brand-base-black-alpha-10" | "brand-base-black-alpha-25";
14
+ type BrandToken = `brand-primary-${Shade}` | `brand-secondary-${Shade}` | `brand-neutral-${Shade}` | "brand-base-white" | `brand-base-overlay-${5 | 10 | 25 | 50 | 75 | 85}`;
16
15
  type SystemToken = `system-success-${Shade}` | `system-error-${Shade}` | `system-warning-${Shade}` | `system-info-${Shade}` | `system-link-${400 | 500 | 600 | 700}`;
17
16
  type ColorToken = SemanticColorToken | BrandToken | SystemToken | XplatColorTokenRegistry[keyof XplatColorTokenRegistry];
18
17
  interface ColorProps {
@@ -12,7 +12,7 @@ var gridColumns = {
12
12
  };
13
13
 
14
14
  // src/tokens/colors.ts
15
- import { primitive, semantic } from "@x-plat/tokens-core";
15
+ import { semantic } from "@x-plat/tokens-core";
16
16
 
17
17
  // src/tokens/svg/action/CopyIcon.tsx
18
18
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -5784,6 +5784,5 @@ export {
5784
5784
  breakpoints,
5785
5785
  cssVar,
5786
5786
  gridColumns,
5787
- primitive,
5788
5787
  semantic
5789
5788
  };
@@ -20,7 +20,7 @@
20
20
  1. 컴포넌트에 `color` / `className` / `style` prop **없음**. 색상·스타일은 내부 semantic 토큰으로 고정됨.
21
21
  2. 컴포넌트는 `width: 100%` 로 부모를 채우므로 **반드시 GridItem 또는 wrapper 로 감싸서 너비를 제어**.
22
22
  3. **CSS 로 DS 컴포넌트를 오버라이드하지 않는다**.
23
- 4. 색상·간격·타이포는 **semantic 토큰만** 사용. primitive / brand 직접 참조 금지.
23
+ 4. 색상·간격·타이포는 **semantic 토큰만** 사용. brand / system / typo primitive 직접 참조 금지.
24
24
  5. **모든 visible 그룹은 명시적 spacing 필수**. wrapper 의 `padding` / `gap` / 간격을 spacing 토큰으로 지정. 매직 넘버(`16px`, `1rem` 등) 금지.
25
25
 
26
26
  ---
@@ -430,7 +430,7 @@ import { ChatInput } from "@x-plat/design-system/components";
430
430
  <Button>B</Button>
431
431
  </div>
432
432
 
433
- // primitive 직접 참조 (semantic 만 허용)
433
+ // 존재하지 않는 레이어 참조 (semantic 만 허용)
434
434
  <div style={{ padding: "var(--spacing-size-4)" }}>...</div>
435
435
  ```
436
436
 
@@ -563,15 +563,14 @@ CSS 변수 `--semantic-{category}-{role}` 사용.
563
563
 
564
564
  | 카테고리 | 키 |
565
565
  |---|---|
566
- | `text` | strong / subtle / muted / brand / disabled / inverse / success / error / warning / info / link / sunday / saturday |
567
- | `surface` | neutral.{default/subtle/strong/overlay/disabled} / brand.{subtle/default/strong} / success/error/warning/info.{subtle/default/strong} |
568
- | `border` | default / subtle / strong / disabled / brand / success / error / warning / info |
569
- | `icon` | strong / subtle / inverse / brand / success / error / warning / info / disabled |
570
- | `emphasis` | brand / success / error / warning / info |
571
- | `interaction` | overlay-10 / overlay-25 / focus-ring |
566
+ | `text` | primary / secondary / tertiary / brand-primary / brand-secondary / disabled / inverse / success / error / warning / info / link / accent-red / accent-blue |
567
+ | `surface` | neutral.{primary/secondary/tertiary/inverse/disabled} / brand.{subtle/default/strong} / brand-secondary.{subtle/default/strong} / success/error/warning/info.{subtle/default/strong} |
568
+ | `border` | primary / secondary / tertiary / disabled / brand-primary / brand-secondary / success / error / warning / info |
569
+ | `icon` | primary / secondary / inverse / brand / brand-secondary / success / error / warning / info / disabled |
570
+ | `interaction` | overlay-5 / overlay-10 / overlay-25 / overlay-50 / overlay-75 / focus-ring |
572
571
  | `categorical` | 1-8 × {bg / area / fill / text} |
573
572
 
574
- 예: `color: var(--semantic-text-strong)`, `background: var(--semantic-surface-brand-default)`
573
+ 예: `color: var(--semantic-text-primary)`, `background: var(--semantic-surface-brand-default)`
575
574
 
576
575
  ### 스페이싱
577
576
 
@@ -43,7 +43,7 @@ React 기반 디자인 시스템 라이브러리이다. Figma Make Kit과 1:1
43
43
 
44
44
  1. **[설치 및 설정](./setup.md)** - CSS/컴포넌트 import, ToastProvider 설정
45
45
  2. **파운데이션**
46
- - [컬러](./foundations/color.md) - 4레이어 semantic 토큰
46
+ - [컬러](./foundations/color.md) - 3레이어 semantic 토큰
47
47
  - [스페이싱](./foundations/spacing.md) - space, radius, stroke
48
48
  - [타이포그래피](./foundations/typography.md) - font, size, weight
49
49
  - [아이콘](./foundations/icons.md) - import, 크기/색상, 카테고리
@@ -17,7 +17,7 @@ import { Chart } from "@xplat/design-system";
17
17
 
18
18
  ## 색상
19
19
 
20
- primitive 팔레트 기반으로 시리즈별 색상을 자동 배정한다. line/bar는 `LINE_BAR_PALETTES`, pie/doughnut는 `PIE_PALETTES`를 사용한다.
20
+ semantic categorical 토큰 기반으로 시리즈별 색상을 자동 배정한다. line/bar는 `LINE_BAR_PALETTES`, pie/doughnut는 `PIE_PALETTES`를 사용한다.
21
21
 
22
22
  ---
23
23
 
@@ -1,15 +1,15 @@
1
1
  # 컬러 토큰 시스템
2
2
 
3
- ## 4레이어 구조
3
+ ## 3레이어 구조
4
4
 
5
5
  | 레이어 | 접두사 | 역할 |
6
6
  |--------|--------|------|
7
- | Primitive | `--primitive-*` | 기초 팔레트 (hex) |
8
- | Brand | `--brand-*` | 브랜드 색상 |
9
- | System | `--system-*` | 상태 색상 (success/error/warning/info) |
7
+ | Brand | `--brand-*` | 브랜드 색상 (hex 실값, 테마별 오버라이드) |
8
+ | System | `--system-*` | 상태 색상 (success/error/warning/info/link, hex 실값) |
10
9
  | Semantic | `--semantic-*` | 용도 기반 최종 토큰 (brand+system 참조) |
11
10
 
12
- 컴포넌트는 **semantic 토큰만** 소비한다. primitive/brand/system을 직접 참조하지 않는다.
11
+ Figma `brand` / `system` / `semantic` 컬렉션과 1:1 대응한다.
12
+ 컴포넌트는 **semantic 토큰만** 소비한다. brand/system을 직접 참조하지 않는다.
13
13
 
14
14
  ---
15
15
 
@@ -19,16 +19,16 @@
19
19
 
20
20
  ```tsx
21
21
  // 텍스트
22
- <p className="text-semantic-text-strong">강조 텍스트</p>
23
- <p className="text-semantic-text-subtle">보조 텍스트</p>
22
+ <p className="text-semantic-text-primary">강조 텍스트</p>
23
+ <p className="text-semantic-text-secondary">보조 텍스트</p>
24
24
  <p className="text-semantic-text-error">에러 메시지</p>
25
25
 
26
26
  // 배경
27
- <div className="bg-semantic-surface-neutral-default">기본 배경</div>
27
+ <div className="bg-semantic-surface-neutral-primary">기본 배경</div>
28
28
  <div className="bg-semantic-surface-brand-subtle">브랜드 배경</div>
29
29
 
30
30
  // 테두리
31
- <div className="border border-semantic-border-default">기본 테두리</div>
31
+ <div className="border border-semantic-border-primary">기본 테두리</div>
32
32
  ```
33
33
 
34
34
  ---
@@ -37,12 +37,13 @@
37
37
 
38
38
  ### Text
39
39
 
40
- `--semantic-text-{strong, subtle, muted, brand, disabled, inverse, success, error, warning, info, link, sunday, saturday}`
40
+ `--semantic-text-{primary, secondary, tertiary, brand-primary, brand-secondary, disabled, inverse, success, error, warning, info, link, accent-red, accent-blue}`
41
41
 
42
42
  ### Surface
43
43
 
44
- - Neutral: `--semantic-surface-neutral-{subtle, default, strong}`
44
+ - Neutral: `--semantic-surface-neutral-{primary, secondary, tertiary, inverse, disabled}`
45
45
  - Brand: `--semantic-surface-brand-{subtle, default, strong}`
46
+ - Brand Secondary: `--semantic-surface-brand-secondary-{subtle, default, strong}`
46
47
  - Success: `--semantic-surface-success-{subtle, default, strong}`
47
48
  - Error: `--semantic-surface-error-{subtle, default, strong}`
48
49
  - Warning: `--semantic-surface-warning-{subtle, default, strong}`
@@ -50,32 +51,30 @@
50
51
 
51
52
  ### Border
52
53
 
53
- `--semantic-border-{default, strong, subtle, disabled, focus, error, success}`
54
+ `--semantic-border-{primary, secondary, tertiary, disabled, brand-primary, brand-secondary, success, error, warning, info}`
54
55
 
55
56
  ### Icon
56
57
 
57
- `--semantic-icon-{default, subtle, disabled, inverse, brand, success, warning, error, info}`
58
-
59
- ### Emphasis
60
-
61
- `--semantic-emphasis-{brand, success, error, warning, info}`
58
+ `--semantic-icon-{primary, secondary, inverse, brand, brand-secondary, success, error, warning, info, disabled}`
62
59
 
63
60
  ### Interaction
64
61
 
65
- `--semantic-interaction-{primary, primary-hover, primary-active, primary-disabled, secondary, secondary-hover, secondary-active, danger, danger-hover, danger-active}`
62
+ `--semantic-interaction-{overlay-5, overlay-10, overlay-25, overlay-50, overlay-75, focus-ring}`
63
+
64
+ ### Categorical (XPLAT 확장)
66
65
 
67
- ### Categorical
66
+ Figma 컬렉션에는 없고 차트/태그/아바타 시리즈 색으로 사용한다.
68
67
 
69
- `--semantic-categorical-{1, 2, 3, 4, 5, 6, 7, 8}`
68
+ `--semantic-categorical-{1..8}-{bg, area, fill, text}`
70
69
 
71
70
  ---
72
71
 
73
72
  ## 잘못된 사용
74
73
 
75
74
  ```css
76
- /* 금지: primitive 토큰 직접 사용 */
77
- color: var(--primitive-blue-500);
75
+ /* 금지: brand/system 토큰 직접 사용 */
76
+ color: var(--brand-primary-500);
78
77
 
79
78
  /* 올바른 방법: semantic 토큰 사용 */
80
- color: var(--semantic-text-brand);
79
+ color: var(--semantic-text-brand-primary);
81
80
  ```
@@ -1,63 +1,113 @@
1
1
  # 타이포그래피 토큰 시스템
2
2
 
3
- ## 3레이어 구조
3
+ ## 2레이어 구조
4
4
 
5
- | 레이어 | 역할 |
6
- |--------|------|
7
- | Primitive | 기초 폰트 수치 |
8
- | Brand | 브랜드별 커스텀 |
9
- | Semantic | 컴포넌트가 소비하는 최종 토큰 |
5
+ | 레이어 | 접두사 | 역할 |
6
+ |--------|--------|------|
7
+ | Primitive | `--typo-*` | 기초 폰트 수치 (pc/tablet/mobile 반응형) |
8
+ | Semantic | `--semantic-typo-*` | 컴포넌트가 소비하는 합성 스타일 23종 |
9
+
10
+ Figma `typography` 컬렉션은 primitive 만 갖고, pc / tablet / mobile 을 **모드**로 둔다.
11
+ density(compact/airy) 축과 브랜드 오버라이드 레이어는 없다.
12
+
13
+ 컴포넌트는 **semantic 만** 소비한다. `--typo-*` 를 직접 참조하지 않는다.
10
14
 
11
15
  ---
12
16
 
13
- ## Font Family
17
+ ## 반응형 동작
14
18
 
15
- | 토큰 | 용도 |
19
+ primitive 의 size / line-height / letter-spacing 은 브레이크포인트별로 값이 다르다.
20
+ CSS 는 PC 기준값을 `:root` 에 두고 tablet/mobile 을 `@media` 로 덮는다.
21
+
22
+ | 모드 | 범위 |
16
23
  |------|------|
17
- | `--font-family-sans` | 기본 산세리프 |
18
- | `--font-family-serif` | 세리프 |
19
- | `--font-family-suit` | SUIT 폰트 |
24
+ | pc | ≥ 1024px |
25
+ | tablet | 768 ~ 1023px |
26
+ | mobile | < 768px |
20
27
 
21
- ## Font Size
28
+ semantic 스타일은 primitive 를 `var()` 로 참조하므로 자동으로 반응형이 된다.
22
29
 
23
- `--font-size-{xs, sm, md, lg, xl, 2xl, 3xl, 4xl}`
30
+ ---
24
31
 
25
- ## Line Height (Density)
32
+ ## Primitive
26
33
 
27
- 3단계 밀도를 지원한다.
34
+ ### Font Family
28
35
 
29
- | 밀도 | 용도 |
36
+ | 토큰 | 용도 |
30
37
  |------|------|
31
- | compact | 정보 밀집 UI |
32
- | default | 기본 |
33
- | airy | 여유 있는 UI |
38
+ | `--typo-font-family-default` | 본문·라벨·캡션 |
39
+ | `--typo-font-family-brand` | display·title (브랜드 표현) |
34
40
 
35
- ## Font Weight
41
+ ### Size / Line Height
42
+
43
+ `--typo-size-{key}` · `--typo-lh-{key}`
44
+
45
+ key: `display-1` `display-2` `title-1` `title-2` `heading-1` `heading-2` `body-1` `body-2` `label-1` `label-2` `caption-1` `caption-2`
46
+
47
+ ### Font Weight
36
48
 
37
49
  | 토큰 | 값 |
38
50
  |------|-----|
39
- | `--font-weight-regular` | 400 |
40
- | `--font-weight-medium` | 500 |
41
- | `--font-weight-semibold` | 600 |
42
- | `--font-weight-bold` | 700 |
51
+ | `--typo-weight-regular` | 400 |
52
+ | `--typo-weight-medium` | 500 |
53
+ | `--typo-weight-semibold` | 600 |
54
+ | `--typo-weight-bold` | 700 |
43
55
 
44
- ## Letter Spacing
56
+ ### Letter Spacing
45
57
 
46
58
  | 토큰 | 용도 |
47
59
  |------|------|
48
- | `--letter-spacing-tight` | 좁은 자간 |
49
- | `--letter-spacing-normal` | 기본 자간 |
50
- | `--letter-spacing-wide` | 넓은 자간 |
60
+ | `--typo-ls-tight` | display·title·heading |
61
+ | `--typo-ls-normal` | body·label-1 |
62
+ | `--typo-ls-wide` | label-2·caption |
51
63
 
52
64
  ---
53
65
 
54
66
  ## Semantic Text Styles
55
67
 
56
- | 스타일 | 용도 |
57
- |--------|------|
58
- | display | 대형 타이틀, 히어로 |
59
- | title | 페이지 타이틀 |
60
- | heading | 섹션 타이틀 |
61
- | body | 본문 텍스트 |
62
- | label | 폼 라벨, 버튼 텍스트 |
63
- | caption | 부가 설명, 힌트 |
68
+ 스타일 하나가 5개 속성(`font` `size` `lh` `ls` `weight`)을 갖는다.
69
+ 접미사는 weight — `b`=bold, `sb`=semibold, `m`=medium, `r`=regular.
70
+
71
+ | 계열 | 스타일 | 용도 |
72
+ |------|--------|------|
73
+ | display | `display-1-b` `display-1-sb` `display-2-b` `display-2-sb` | 대형 타이틀, 히어로 |
74
+ | title | `title-1-sb` `title-1-m` `title-2-sb` `title-2-m` | 페이지 타이틀 |
75
+ | heading | `heading-1-sb` `heading-1-m` `heading-2-m` | 섹션 타이틀 |
76
+ | body | `body-1-sb` `body-1-m` `body-1-r` `body-2-m` `body-2-r` | 본문 텍스트 |
77
+ | label | `label-1-sb` `label-1-m` `label-2-sb` `label-2-m` | 폼 라벨, 버튼 텍스트 |
78
+ | caption | `caption-1-sb` `caption-1-r` `caption-2-r` | 부가 설명, 힌트 |
79
+
80
+ ### 사용법
81
+
82
+ 속성별 변수로 참조한다.
83
+
84
+ ```scss
85
+ .my-label {
86
+ font-family: var(--semantic-typo-label-2-m-font);
87
+ font-size: var(--semantic-typo-label-2-m-size);
88
+ line-height: var(--semantic-typo-label-2-m-lh);
89
+ letter-spacing: var(--semantic-typo-label-2-m-ls);
90
+ font-weight: var(--semantic-typo-label-2-m-weight);
91
+ }
92
+ ```
93
+
94
+ 또는 유틸리티 클래스로 한 번에 적용한다.
95
+
96
+ ```tsx
97
+ <span className="typo-label-2-m">라벨</span>
98
+ ```
99
+
100
+ ---
101
+
102
+ ## 잘못된 사용
103
+
104
+ ```scss
105
+ /* 금지: px 하드코딩 */
106
+ font-size: 14px;
107
+
108
+ /* 금지: primitive 직접 참조 */
109
+ font-size: var(--typo-size-label-2);
110
+
111
+ /* 올바른 방법: semantic 사용 */
112
+ font-size: var(--semantic-typo-label-2-m-size);
113
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-plat/design-system",
3
- "version": "0.5.65",
3
+ "version": "0.6.0",
4
4
  "description": "XPLAT UI Design System",
5
5
  "author": "XPLAT WOONG",
6
6
  "main": "dist/index.cjs",