@tide-tds/components 0.6.0 → 0.8.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.
package/dist/Button.js CHANGED
@@ -10,7 +10,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
10
  /** 높이, 좌우 padding, 아이콘과 텍스트 사이 간격, 텍스트 스타일(spec size 표). radius는 모든 size에서 `md`다. */
11
11
  const sizeClass = {
12
12
  xs: "h-6 gap-1 px-2 text-label-sm",
13
- sm: "h-8 gap-1.5 px-3 text-label-sm",
13
+ sm: "h-8 gap-1.5 px-3 text-label-md",
14
14
  md: "h-10 gap-2 px-4 text-label-md",
15
15
  lg: "h-12 gap-2 px-5 text-label-lg"
16
16
  };
package/dist/Combobox.js CHANGED
@@ -31,7 +31,7 @@ const buttonClass = "inline-flex shrink-0 cursor-pointer items-center justify-en
31
31
  * listbox 밖(같은 목록 표면 안)에 둔다. listbox 자식은 option·group만 될 수 있어서다. 결과 개수(0개)는 React Aria가
32
32
  * live region으로 알린다.
33
33
  */
34
- const emptyClass = "px-2 py-1.5 text-body-md text-muted select-none";
34
+ const emptyClass = "px-2 py-1.5 text-body-sm text-muted select-none";
35
35
  /**
36
36
  * 한글 IME 조합 중의 keydown인지. 조합 중 Enter·화살표·Esc는 IME가 쓰므로 목록 동작에 쓰지 않는다.
37
37
  * Chromium·Firefox는 `isComposing`이 `true`다. Safari는 조합을 끝내는 Enter의 keydown이 compositionend 뒤에
package/dist/Switch.d.ts CHANGED
@@ -5,7 +5,7 @@ type SwitchSize = Extract<Size, "sm" | "md" | "lg">;
5
5
  export interface SwitchProps extends Omit<ComponentProps<"input">, "type" | "size" | "color" | "role" | "children"> {
6
6
  /** 스위치 옆에 보이는 label. 스위치의 이름이 된다. Field 안에서는 Field의 `label`을 쓰고 비워 둔다. */
7
7
  children?: ReactNode;
8
- /** track 크기 `sm` 28×16px, `md` 36×20px, `lg` 44×24px. label 텍스트 스타일도 함께 바뀐다. 기본값은 `md`다. */
8
+ /** track 크기 `sm` 28×16px, `md` 36×20px, `lg` 44×24px. label 텍스트 스타일(Checkbox·Radio와 같은 `body-sm`/`body-md`/`body-lg`)도 함께 바뀐다. 기본값은 `md`다. */
9
9
  size?: SwitchSize;
10
10
  /**
11
11
  * 켜졌을 때 track 색. Role(Tide Role 6개와 앱이 `RoleRegistry`에 더한 Role)을 받는다. 기본값은 `primary`다.
package/dist/Switch.js CHANGED
@@ -7,9 +7,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
7
7
  // src/Switch.tsx
8
8
  /** 루트 높이는 최소 24px라 track이 작아도 누르는 영역이 24×24px 이상이다. */
9
9
  const rootSizeClass = {
10
- sm: "gap-1.5 text-label-sm",
11
- md: "gap-2 text-label-md",
12
- lg: "gap-2.5 text-label-lg"
10
+ sm: "gap-1.5 text-body-sm",
11
+ md: "gap-2 text-body-md",
12
+ lg: "gap-2.5 text-body-lg"
13
13
  };
14
14
  /** track 크기(border 1px 포함). thumb은 track 안쪽에서 2px 떨어진다. */
15
15
  const trackSizeClass = {
@@ -3,7 +3,7 @@ import { ComponentProps, ReactElement } from "react";
3
3
  /** Textarea의 size. Input과 같이 `sm`/`md`/`lg`만 받는다. */
4
4
  type TextareaSize = Extract<Size, "sm" | "md" | "lg">;
5
5
  export interface TextareaProps extends ComponentProps<"textarea"> {
6
- /** 글자 크기와 padding. 글자 크기는 같은 size의 Input과 같다(12/14/16px). 기본값은 `md`다. */
6
+ /** 글자 크기와 padding. 글자 크기는 같은 size의 Input과 같다(14/14/16px). 기본값은 `md`다. */
7
7
  size?: TextareaSize;
8
8
  /**
9
9
  * 오류 상태. `aria-invalid="true"`와 `data-invalid`가 붙고 경계가 danger 색이 된다.
package/dist/Textarea.js CHANGED
@@ -8,7 +8,7 @@ import { jsx } from "react/jsx-runtime";
8
8
  // src/Textarea.tsx
9
9
  /** 좌우·세로 padding, 텍스트 스타일 */
10
10
  const sizeClass = {
11
- sm: "px-2.5 py-1.5 text-caption",
11
+ sm: "px-2.5 py-1.25 text-body-sm",
12
12
  md: "px-3 py-2 text-body-sm",
13
13
  lg: "px-4 py-3 text-body-md"
14
14
  };
@@ -26,7 +26,7 @@ const alertCloseClass = "-my-0.5 -me-1";
26
26
  /**
27
27
  * Alert(subtle 표면) 안 닫기 버튼의 색. ghost의 기본(text-accent, bg-hover·bg-active)을 덮어쓴다.
28
28
  * subtle 바탕 위라 글자는 on-subtle이고, hover·누름은 같은 색의 subtle-hover·subtle-active다
29
- * (on-subtle × subtle 3단계 4.5:1 등록. text × subtle-active는 일부 색에서 4.5:1에 못 미친다, ADR 0022).
29
+ * (on-subtle × subtle 4.5:1, × subtle-hover·subtle-active 4:1 등록, ADR 0022·0023).
30
30
  */
31
31
  const alertSubtleCloseClass = "text-accent-on-subtle hover:bg-accent-subtle-hover active:bg-accent-subtle-active";
32
32
  const statusIcons = {
@@ -3,7 +3,7 @@
3
3
  const inputBaseClass = "w-full min-w-0 rounded-md border border-strong bg-canvas font-normal text-default transition-colors placeholder:text-muted aria-invalid:border-danger focus:focus-field disabled:cursor-not-allowed disabled:border-default disabled:bg-disabled disabled:text-disabled disabled:placeholder:text-disabled";
4
4
  /** 높이, 좌우 padding, 텍스트 스타일(spec size 표). radius는 모든 size에서 `md`다. */
5
5
  const inputSizeClass = {
6
- sm: "h-8 px-2.5 text-label-sm",
6
+ sm: "h-8 px-2.5 text-label-md",
7
7
  md: "h-10 px-3 text-label-md",
8
8
  lg: "h-12 px-4 text-label-lg"
9
9
  };
@@ -22,17 +22,17 @@ const listPopupClass = `isolate z-popover min-w-40 max-w-80 overflow-auto p-[3px
22
22
  * 기본 `outline-none`이 outline 모양 변수를 none으로 두므로 `outline-solid`를 함께 쓴다.
23
23
  * 항목 안쪽(`-outline-offset-2`)에 그려 이웃 항목·목록 경계와 겹치지 않는다.
24
24
  * - `hover`(highlight가 아닐 때): 색 없이 덮는 `bg-hover`(ADR 0022 §3). 키보드로 옮긴 위치가 따로 있을 때
25
- * 마우스가 다른 항목 위에 있는 경우다. text-default × bg-hover(bg-raised 위 합성)가 4.5:1로 등록되어 있다.
25
+ * 마우스가 다른 항목 위에 있는 경우다. text-default × bg-hover(bg-raised 위 합성)가 4:1(일시 상태, ADR 0023)로 등록되어 있다.
26
26
  * - `data-selected`(highlight가 아닐 때): 선택 유지 `subtle-active`(neutral). 상태를 나타내는 바탕이라 덮기로 바꾸지 않는다.
27
27
  * Select·Combobox의 고른 옵션이 쓴다.
28
28
  * - `data-disabled`: `text-disabled`, `cursor-not-allowed`. hover 배경이 없다.
29
29
  * - 상태끼리 겹칠 때 순서에 기대지 않도록 `not-data-highlighted:`로 서로 뺀다.
30
30
  * - transition이 없다. 반복되는 목록 항목은 바로 바뀐다(spec 「motion 적용」).
31
- * - 크기: 세로 6px·가로 8px 여백, `text-body-md`(16/24)라 높이 36px. 바로 안의 아이콘(svg, 장식용)은 16px이고
31
+ * - 크기: 세로 6px·가로 8px 여백, `text-body-sm`(14/20)이라 높이 32px. 글자 크기가 트리거(Button·Select `md`, 14px)와 같다. 바로 안의 아이콘(svg, 장식용)은 16px이고
32
32
  * 아이콘과 글자 사이는 8px다(Button md와 같은 아이콘 크기).
33
33
  */
34
34
  const listItemClass = [
35
- "flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-body-md text-default outline-none select-none [&>svg]:size-4 [&>svg]:shrink-0",
35
+ "flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-body-sm text-default outline-none select-none [&>svg]:size-4 [&>svg]:shrink-0",
36
36
  "hover:not-data-highlighted:not-data-disabled:bg-hover",
37
37
  "data-selected:not-data-highlighted:bg-neutral-subtle-active",
38
38
  "data-highlighted:bg-primary-subtle data-highlighted:text-primary data-highlighted:outline-2 data-highlighted:outline-solid data-highlighted:-outline-offset-2 data-highlighted:outline-transparent",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tide-tds/components",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Tide 디자인 시스템의 React Component",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,8 +23,8 @@
23
23
  "./styles.css": "./dist/styles.css"
24
24
  },
25
25
  "dependencies": {
26
- "@tide-tds/foundation": "0.6.0",
27
- "@tide-tds/icons": "0.6.0",
26
+ "@tide-tds/foundation": "0.8.0",
27
+ "@tide-tds/icons": "0.8.0",
28
28
  "clsx": "^2.1.1",
29
29
  "react-aria": "^3.53.1",
30
30
  "react-stately": "^3.51.0",