@tide-design/components 0.11.4 → 0.11.5

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 (143) hide show
  1. package/dist/Accordion/Accordion.d.ts +6 -2
  2. package/dist/Accordion/Accordion.js +4 -1
  3. package/dist/Accordion/components/AccordionItem.d.ts +3 -1
  4. package/dist/Accordion/components/AccordionItem.js +1 -0
  5. package/dist/Accordion/components/AccordionPanel.d.ts +3 -1
  6. package/dist/Accordion/components/AccordionPanel.js +1 -0
  7. package/dist/Accordion/components/AccordionTrigger.d.ts +3 -1
  8. package/dist/Accordion/components/AccordionTrigger.js +1 -0
  9. package/dist/Accordion/index.d.ts +5 -5
  10. package/dist/Alert/Alert.d.ts +6 -2
  11. package/dist/Alert/Alert.js +4 -1
  12. package/dist/Alert/index.d.ts +2 -2
  13. package/dist/Avatar/Avatar.d.ts +3 -1
  14. package/dist/Avatar/Avatar.js +1 -0
  15. package/dist/Avatar/index.d.ts +2 -2
  16. package/dist/Badge/Badge.d.ts +6 -2
  17. package/dist/Badge/Badge.js +4 -1
  18. package/dist/Badge/index.d.ts +2 -2
  19. package/dist/Breadcrumb/Breadcrumb.d.ts +3 -1
  20. package/dist/Breadcrumb/Breadcrumb.js +1 -0
  21. package/dist/Breadcrumb/components/BreadcrumbLink.d.ts +6 -2
  22. package/dist/Breadcrumb/components/BreadcrumbLink.js +4 -1
  23. package/dist/Breadcrumb/index.d.ts +3 -3
  24. package/dist/Button/Button.d.ts +6 -2
  25. package/dist/Button/Button.js +4 -1
  26. package/dist/Button/index.d.ts +2 -2
  27. package/dist/Card/Card.d.ts +3 -1
  28. package/dist/Card/Card.js +1 -0
  29. package/dist/Card/index.d.ts +2 -2
  30. package/dist/Checkbox/Checkbox.d.ts +6 -2
  31. package/dist/Checkbox/Checkbox.js +4 -1
  32. package/dist/Checkbox/index.d.ts +2 -2
  33. package/dist/CheckboxGroup/CheckboxGroup.d.ts +3 -1
  34. package/dist/CheckboxGroup/CheckboxGroup.js +1 -0
  35. package/dist/CheckboxGroup/index.d.ts +2 -2
  36. package/dist/Combobox/Combobox.d.ts +3 -1
  37. package/dist/Combobox/Combobox.js +1 -0
  38. package/dist/Combobox/components/ComboboxItem.d.ts +3 -1
  39. package/dist/Combobox/components/ComboboxItem.js +1 -0
  40. package/dist/Combobox/index.d.ts +3 -3
  41. package/dist/Dialog/components/DialogClose.d.ts +3 -1
  42. package/dist/Dialog/components/DialogClose.js +1 -0
  43. package/dist/Dialog/components/DialogContent.d.ts +3 -1
  44. package/dist/Dialog/components/DialogContent.js +1 -0
  45. package/dist/Dialog/components/DialogTrigger.d.ts +3 -1
  46. package/dist/Dialog/components/DialogTrigger.js +1 -0
  47. package/dist/Dialog/index.d.ts +4 -4
  48. package/dist/Field/Field.d.ts +3 -1
  49. package/dist/Field/Field.js +1 -0
  50. package/dist/Field/index.d.ts +2 -2
  51. package/dist/IconButton/IconButton.d.ts +6 -2
  52. package/dist/IconButton/IconButton.js +4 -1
  53. package/dist/IconButton/index.d.ts +2 -2
  54. package/dist/Input/Input.d.ts +3 -1
  55. package/dist/Input/Input.js +1 -0
  56. package/dist/Input/index.d.ts +2 -2
  57. package/dist/Link/Link.d.ts +6 -2
  58. package/dist/Link/Link.js +4 -1
  59. package/dist/Link/index.d.ts +2 -2
  60. package/dist/Menu/components/MenuContent.d.ts +3 -1
  61. package/dist/Menu/components/MenuContent.js +1 -0
  62. package/dist/Menu/components/MenuItem.d.ts +3 -1
  63. package/dist/Menu/components/MenuItem.js +1 -0
  64. package/dist/Menu/components/MenuTrigger.d.ts +3 -1
  65. package/dist/Menu/components/MenuTrigger.js +1 -0
  66. package/dist/Menu/index.d.ts +4 -4
  67. package/dist/Pagination/Pagination.d.ts +3 -1
  68. package/dist/Pagination/Pagination.js +1 -0
  69. package/dist/Pagination/components/PaginationEllipsis.d.ts +6 -2
  70. package/dist/Pagination/components/PaginationEllipsis.js +4 -1
  71. package/dist/Pagination/components/PaginationLink.d.ts +6 -2
  72. package/dist/Pagination/components/PaginationLink.js +4 -1
  73. package/dist/Pagination/components/PaginationNext.d.ts +6 -2
  74. package/dist/Pagination/components/PaginationNext.js +4 -1
  75. package/dist/Pagination/components/PaginationPrevious.d.ts +6 -2
  76. package/dist/Pagination/components/PaginationPrevious.js +4 -1
  77. package/dist/Pagination/index.d.ts +6 -6
  78. package/dist/Pagination/types.d.ts +5 -4
  79. package/dist/Popover/components/PopoverContent.d.ts +3 -1
  80. package/dist/Popover/components/PopoverContent.js +1 -0
  81. package/dist/Popover/components/PopoverTrigger.d.ts +3 -1
  82. package/dist/Popover/components/PopoverTrigger.js +1 -0
  83. package/dist/Popover/index.d.ts +3 -3
  84. package/dist/Progress/Progress.d.ts +6 -3
  85. package/dist/Progress/Progress.js +4 -1
  86. package/dist/Progress/index.d.ts +2 -2
  87. package/dist/Radio/Radio.d.ts +6 -2
  88. package/dist/Radio/Radio.js +4 -1
  89. package/dist/Radio/index.d.ts +2 -2
  90. package/dist/RadioGroup/RadioGroup.d.ts +3 -1
  91. package/dist/RadioGroup/RadioGroup.js +1 -0
  92. package/dist/RadioGroup/index.d.ts +2 -2
  93. package/dist/Select/Select.d.ts +3 -1
  94. package/dist/Select/Select.js +1 -0
  95. package/dist/Select/components/SelectItem.d.ts +3 -1
  96. package/dist/Select/components/SelectItem.js +1 -0
  97. package/dist/Select/index.d.ts +3 -3
  98. package/dist/Separator/Separator.d.ts +6 -2
  99. package/dist/Separator/Separator.js +4 -1
  100. package/dist/Separator/index.d.ts +2 -2
  101. package/dist/Skeleton/Skeleton.d.ts +4 -3
  102. package/dist/Skeleton/Skeleton.js +1 -0
  103. package/dist/Skeleton/index.d.ts +2 -2
  104. package/dist/Spinner/Spinner.d.ts +3 -1
  105. package/dist/Spinner/Spinner.js +1 -0
  106. package/dist/Spinner/index.d.ts +2 -2
  107. package/dist/Switch/Switch.d.ts +3 -1
  108. package/dist/Switch/Switch.js +1 -0
  109. package/dist/Switch/index.d.ts +2 -2
  110. package/dist/Table/components/TableHeaderCell.d.ts +3 -1
  111. package/dist/Table/components/TableHeaderCell.js +1 -0
  112. package/dist/Table/index.d.ts +2 -2
  113. package/dist/Tabs/Tabs.d.ts +4 -2
  114. package/dist/Tabs/Tabs.js +1 -0
  115. package/dist/Tabs/components/Tab.d.ts +3 -1
  116. package/dist/Tabs/components/Tab.js +1 -0
  117. package/dist/Tabs/components/TabList.d.ts +3 -1
  118. package/dist/Tabs/components/TabList.js +1 -0
  119. package/dist/Tabs/components/TabPanel.d.ts +3 -1
  120. package/dist/Tabs/components/TabPanel.js +1 -0
  121. package/dist/Tabs/index.d.ts +5 -5
  122. package/dist/Tag/Tag.d.ts +3 -1
  123. package/dist/Tag/Tag.js +1 -0
  124. package/dist/Tag/components/TagGroup.d.ts +3 -2
  125. package/dist/Tag/components/TagGroup.js +1 -0
  126. package/dist/Tag/index.d.ts +3 -3
  127. package/dist/Textarea/Textarea.d.ts +3 -1
  128. package/dist/Textarea/Textarea.js +1 -0
  129. package/dist/Textarea/index.d.ts +2 -2
  130. package/dist/Toast/Toast.d.ts +3 -1
  131. package/dist/Toast/Toast.js +1 -0
  132. package/dist/Toast/index.d.ts +2 -2
  133. package/dist/Tooltip/components/TooltipContent.d.ts +3 -1
  134. package/dist/Tooltip/components/TooltipContent.js +1 -0
  135. package/dist/Tooltip/components/TooltipTrigger.d.ts +3 -1
  136. package/dist/Tooltip/components/TooltipTrigger.js +1 -0
  137. package/dist/Tooltip/index.d.ts +3 -3
  138. package/dist/Typography/Typography.d.ts +8 -4
  139. package/dist/Typography/Typography.js +1 -0
  140. package/dist/Typography/index.d.ts +2 -2
  141. package/dist/_internal/components/ListBoxNodes/types.d.ts +2 -1
  142. package/dist/index.d.ts +54 -54
  143. package/package.json +3 -3
@@ -9,6 +9,7 @@ import { mergeProps, mergeRefs, usePress } from "react-aria";
9
9
  /**
10
10
  * Dialog를 여는 버튼. 누르면(마우스, 터치, Enter, Space) 연다. 열린 동안은 바깥이 inert라 다시 누를 수 없다.
11
11
  * `aria-expanded`, 열렸을 때 `aria-controls`와 `data-open`이 붙는다.
12
+ * Tide props: `render` ({@link DialogTriggerOwnProps}). 나머지는 `<button>` 속성.
12
13
  */
13
14
  function DialogTrigger({ render, ref, id, className, ...props }) {
14
15
  const { state, triggerRef, triggerProps, setTriggerId } = useDialogContext("DialogTrigger");
@@ -1,10 +1,10 @@
1
1
  import { DialogProps } from "../_internal/components/DialogRoot.js";
2
2
  import { Dialog } from "./Dialog.js";
3
- import { DialogTrigger, DialogTriggerProps } from "./components/DialogTrigger.js";
3
+ import { DialogTrigger, DialogTriggerOwnProps, DialogTriggerProps } from "./components/DialogTrigger.js";
4
4
  import { DialogSize } from "./types.js";
5
- import { DialogContent, DialogContentProps } from "./components/DialogContent.js";
5
+ import { DialogContent, DialogContentOwnProps, DialogContentProps } from "./components/DialogContent.js";
6
6
  import { DialogTitle, DialogTitleProps } from "./components/DialogTitle.js";
7
7
  import { DialogDescription, DialogDescriptionProps } from "./components/DialogDescription.js";
8
8
  import { DialogFooter, DialogFooterProps } from "./components/DialogFooter.js";
9
- import { DialogClose, DialogCloseProps } from "./components/DialogClose.js";
10
- export { Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, type DialogProps, type DialogSize, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps };
9
+ import { DialogClose, DialogCloseOwnProps, DialogCloseProps } from "./components/DialogClose.js";
10
+ export { Dialog, DialogClose, type DialogCloseOwnProps, type DialogCloseProps, DialogContent, type DialogContentOwnProps, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, type DialogProps, type DialogSize, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerOwnProps, type DialogTriggerProps };
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps, ReactElement, ReactNode } from "react";
2
- export interface FieldProps extends ComponentProps<"div"> {
2
+ export interface FieldOwnProps {
3
3
  /** 입력창의 이름이 되는 label. 화면에 보인다. */
4
4
  label: ReactNode;
5
5
  /** 입력창 아래에 보이는 설명. 입력창의 `aria-describedby`로 연결된다. */
@@ -19,8 +19,10 @@ export interface FieldProps extends ComponentProps<"div"> {
19
19
  /** 입력 Component 하나(Input, Textarea, CheckboxGroup, RadioGroup 등) */
20
20
  children: ReactNode;
21
21
  }
22
+ export interface FieldProps extends FieldOwnProps, Omit<ComponentProps<"div">, keyof FieldOwnProps> {}
22
23
  /**
23
24
  * 입력 Component에 label, 설명, 오류 메시지를 붙이고 `id`·`aria-describedby`·`aria-invalid`·`required`·`disabled`를
24
25
  * 자동으로 연결한다. 서버 컴포넌트로 쓸 수 있다.
26
+ * Tide props: `label`, `description`, `error`, `invalid`, `required`, `disabled`, `htmlFor`, `group`, `children` ({@link FieldOwnProps}). 나머지는 `<div>` 속성.
25
27
  */
26
28
  export declare function Field({ label, description, error, invalid, required, disabled, htmlFor, group, className, children, ...props }: FieldProps): ReactElement;
@@ -9,6 +9,7 @@ const hasContent = (node) => node !== void 0 && node !== null && node !== false
9
9
  /**
10
10
  * 입력 Component에 label, 설명, 오류 메시지를 붙이고 `id`·`aria-describedby`·`aria-invalid`·`required`·`disabled`를
11
11
  * 자동으로 연결한다. 서버 컴포넌트로 쓸 수 있다.
12
+ * Tide props: `label`, `description`, `error`, `invalid`, `required`, `disabled`, `htmlFor`, `group`, `children` ({@link FieldOwnProps}). 나머지는 `<div>` 속성.
12
13
  */
13
14
  function Field({ label, description, error, invalid, required = false, disabled = false, htmlFor, group = false, className, children, ...props }) {
14
15
  const baseId = useId();
@@ -1,2 +1,2 @@
1
- import { Field, FieldProps } from "./Field.js";
2
- export { Field, type FieldProps };
1
+ import { Field, FieldOwnProps, FieldProps } from "./Field.js";
2
+ export { Field, type FieldOwnProps, type FieldProps };
@@ -2,7 +2,7 @@ import { FillVariant, Role, Size } from "../types.js";
2
2
  import { ComponentProps, ReactElement, ReactNode } from "react";
3
3
  type IconButtonVariant = Extract<FillVariant, "solid" | "subtle" | "outline" | "ghost">;
4
4
  type IconButtonSize = Extract<Size, "xs" | "sm" | "md" | "lg">;
5
- export interface IconButtonProps extends Omit<ComponentProps<"button">, "color" | "aria-label" | "children"> {
5
+ export interface IconButtonOwnProps {
6
6
  /** 버튼 이름. 아이콘만 보이므로 필수다(예: `"설정"`). */
7
7
  "aria-label": string;
8
8
  /** 아이콘. 장식용으로 숨겨지고 size에 맞는 크기가 된다. */
@@ -22,6 +22,10 @@ export interface IconButtonProps extends Omit<ComponentProps<"button">, "color"
22
22
  /** 다른 요소로 렌더한다. 예: `render={<Link href="/x" />}`. 그 요소의 `disabled`는 `aria-disabled`로 바뀐다. */
23
23
  render?: ReactElement;
24
24
  }
25
- /** 아이콘만 있는 버튼. `aria-label`이 필수다. 모양 축은 Button과 같다. */
25
+ export interface IconButtonProps extends IconButtonOwnProps, Omit<ComponentProps<"button">, keyof IconButtonOwnProps> {}
26
+ /**
27
+ * 아이콘만 있는 버튼. `aria-label`이 필수다. 모양 축은 Button과 같다.
28
+ * Tide props: `aria-label`, `children`, `variant`, `color`, `size`, `loading`, `loadingLabel`, `noPressScale`, `render` ({@link IconButtonOwnProps}). 나머지는 `<button>` 속성.
29
+ */
26
30
  export declare function IconButton({ variant, color, size, loading, loadingLabel, noPressScale, render, disabled, type, children, onClick, "aria-label": ariaLabel, ...props }: IconButtonProps): ReactElement;
27
31
  export {};
@@ -19,7 +19,10 @@ const iconSizeClass = {
19
19
  md: "size-5",
20
20
  lg: "size-6"
21
21
  };
22
- /** 아이콘만 있는 버튼. `aria-label`이 필수다. 모양 축은 Button과 같다. */
22
+ /**
23
+ * 아이콘만 있는 버튼. `aria-label`이 필수다. 모양 축은 Button과 같다.
24
+ * Tide props: `aria-label`, `children`, `variant`, `color`, `size`, `loading`, `loadingLabel`, `noPressScale`, `render` ({@link IconButtonOwnProps}). 나머지는 `<button>` 속성.
25
+ */
23
26
  function IconButton({ variant = "solid", color = "primary", size = "md", loading = false, loadingLabel = "로딩 중", noPressScale = false, render, disabled = false, type, children, onClick, "aria-label": ariaLabel, ...props }) {
24
27
  const state = pressableState({
25
28
  variant,
@@ -1,2 +1,2 @@
1
- import { IconButton, IconButtonProps } from "./IconButton.js";
2
- export { IconButton, type IconButtonProps };
1
+ import { IconButton, IconButtonOwnProps, IconButtonProps } from "./IconButton.js";
2
+ export { IconButton, type IconButtonOwnProps, type IconButtonProps };
@@ -1,6 +1,6 @@
1
1
  import { InputSize } from "../_internal/constants/inputClass.js";
2
2
  import { ComponentProps, ReactElement } from "react";
3
- export interface InputProps extends Omit<ComponentProps<"input">, "size"> {
3
+ export interface InputOwnProps {
4
4
  /** 높이 `sm` 32px, `md` 40px, `lg` 48px. 같은 size의 Button과 높이가 같다. 기본값은 `md`다. */
5
5
  size?: InputSize;
6
6
  /**
@@ -9,8 +9,10 @@ export interface InputProps extends Omit<ComponentProps<"input">, "size"> {
9
9
  */
10
10
  invalid?: boolean;
11
11
  }
12
+ export interface InputProps extends InputOwnProps, Omit<ComponentProps<"input">, keyof InputOwnProps> {}
12
13
  /**
13
14
  * 한 줄 텍스트를 입력하는 네이티브 `<input>`. `type`(`email`, `password`, `date` 등)을 그대로 받는다.
14
15
  * Field 안에 두면 label, 설명, 오류 메시지가 자동으로 연결된다.
16
+ * Tide props: `size`, `invalid` ({@link InputOwnProps}). 나머지는 `<input>` 속성.
15
17
  */
16
18
  export declare function Input({ size, invalid, id, disabled, required, className, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }: InputProps): ReactElement;
@@ -9,6 +9,7 @@ import { jsx } from "react/jsx-runtime";
9
9
  /**
10
10
  * 한 줄 텍스트를 입력하는 네이티브 `<input>`. `type`(`email`, `password`, `date` 등)을 그대로 받는다.
11
11
  * Field 안에 두면 label, 설명, 오류 메시지가 자동으로 연결된다.
12
+ * Tide props: `size`, `invalid` ({@link InputOwnProps}). 나머지는 `<input>` 속성.
12
13
  */
13
14
  function Input({ size = "md", invalid, id, disabled, required, className, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }) {
14
15
  const control = useFieldControl({
@@ -1,2 +1,2 @@
1
- import { Input, InputProps } from "./Input.js";
2
- export { Input, type InputProps };
1
+ import { Input, InputOwnProps, InputProps } from "./Input.js";
2
+ export { Input, type InputOwnProps, type InputProps };
@@ -1,10 +1,14 @@
1
1
  import { Role } from "../types.js";
2
2
  import { ComponentProps, ReactElement } from "react";
3
- export interface LinkProps extends Omit<ComponentProps<"a">, "color"> {
3
+ export interface LinkOwnProps {
4
4
  /** 글자색 Role(Tide Role + 앱 Role). 기본값 `primary`. 색 계열 이름은 받지 않는다. */
5
5
  color?: Role;
6
6
  /** 다른 요소로 렌더한다. 예: `render={<NextLink href="/x" />}`. props·ref·className을 병합한다. */
7
7
  render?: ReactElement;
8
8
  }
9
- /** 문장 안에서 다른 페이지나 위치로 이동하는 텍스트 링크. 글자 크기·굵기는 물려받는다. 서버 컴포넌트로 쓸 수 있다. */
9
+ export interface LinkProps extends LinkOwnProps, Omit<ComponentProps<"a">, keyof LinkOwnProps> {}
10
+ /**
11
+ * 문장 안에서 다른 페이지나 위치로 이동하는 텍스트 링크. 글자 크기·굵기는 물려받는다. 서버 컴포넌트로 쓸 수 있다.
12
+ * Tide props: `color`, `render` ({@link LinkOwnProps}). 나머지는 `<a>` 속성.
13
+ */
10
14
  export declare function Link({ color, render, ...props }: LinkProps): ReactElement;
package/dist/Link/Link.js CHANGED
@@ -2,7 +2,10 @@ import { renderElement } from "../_internal/libs/renderElement.js";
2
2
 
3
3
  // src/Link/Link.tsx
4
4
  const baseClass = "cursor-pointer rounded-sm text-accent underline decoration-1 underline-offset-2 hover:decoration-2 focus-visible:focus-ring";
5
- /** 문장 안에서 다른 페이지나 위치로 이동하는 텍스트 링크. 글자 크기·굵기는 물려받는다. 서버 컴포넌트로 쓸 수 있다. */
5
+ /**
6
+ * 문장 안에서 다른 페이지나 위치로 이동하는 텍스트 링크. 글자 크기·굵기는 물려받는다. 서버 컴포넌트로 쓸 수 있다.
7
+ * Tide props: `color`, `render` ({@link LinkOwnProps}). 나머지는 `<a>` 속성.
8
+ */
6
9
  function Link({ color = "primary", render, ...props }) {
7
10
  return renderElement({
8
11
  defaultElement: "a",
@@ -1,2 +1,2 @@
1
- import { Link, LinkProps } from "./Link.js";
2
- export { Link, type LinkProps };
1
+ import { Link, LinkOwnProps, LinkProps } from "./Link.js";
2
+ export { Link, type LinkOwnProps, type LinkProps };
@@ -1,6 +1,6 @@
1
1
  import { MenuPlacement } from "../types.js";
2
2
  import { ComponentProps, ReactElement, ReactNode } from "react";
3
- export interface MenuContentProps extends Omit<ComponentProps<"div">, "id" | "role"> {
3
+ export interface MenuContentOwnProps {
4
4
  /** 트리거 기준 위치. 기본값은 `bottom start`(아래, 시작 끝 맞춤)다. 공간이 모자라면 반대쪽으로 뒤집힌다. */
5
5
  placement?: MenuPlacement;
6
6
  /** 트리거와의 간격(px). 기본값은 `4`다. */
@@ -8,8 +8,10 @@ export interface MenuContentProps extends Omit<ComponentProps<"div">, "id" | "ro
8
8
  /** `MenuItem`과 `MenuSection`. 이 요소들을 바로 아래(또는 Fragment·배열 안)에 둔다. */
9
9
  children?: ReactNode;
10
10
  }
11
+ export interface MenuContentProps extends MenuContentOwnProps, Omit<ComponentProps<"div">, keyof MenuContentOwnProps | "id" | "role"> {}
11
12
  /**
12
13
  * 트리거 옆에 뜨는 동작 목록(`role="menu"`). 열릴 때만 `document.body`에 portal한다.
13
14
  * 상태는 `data-open`, 방향은 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
15
+ * Tide props: `placement`, `offset`, `children` ({@link MenuContentOwnProps}). 나머지는 `<div>` 속성.
14
16
  */
15
17
  export declare function MenuContent(props: MenuContentProps): ReactElement | null;
@@ -11,6 +11,7 @@ import { useRef } from "react";
11
11
  /**
12
12
  * 트리거 옆에 뜨는 동작 목록(`role="menu"`). 열릴 때만 `document.body`에 portal한다.
13
13
  * 상태는 `data-open`, 방향은 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
14
+ * Tide props: `placement`, `offset`, `children` ({@link MenuContentOwnProps}). 나머지는 `<div>` 속성.
14
15
  */
15
16
  function MenuContent(props) {
16
17
  const context = useMenuContext("MenuContent");
@@ -1,13 +1,15 @@
1
1
  import { CollectionItemProps } from "../../_internal/libs/listCollection.js";
2
2
  import { ComponentProps, ReactNode } from "react";
3
- export interface MenuItemProps extends Omit<ComponentProps<"div">, "role" | "children">, CollectionItemProps {
3
+ export interface MenuItemOwnProps extends CollectionItemProps {
4
4
  /** 항목 내용. 아이콘(장식용)과 글자를 함께 둘 수 있다. */
5
5
  children?: ReactNode;
6
6
  /** 항목을 실행할 때 부른다(누름·Enter·Space). 실행하면 메뉴가 닫힌다. `disabled`면 부르지 않는다. */
7
7
  onClick?: ComponentProps<"div">["onClick"];
8
8
  }
9
+ export interface MenuItemProps extends MenuItemOwnProps, Omit<ComponentProps<"div">, keyof MenuItemOwnProps | "role"> {}
9
10
  /**
10
11
  * Menu의 동작 항목(`role="menuitem"`). `MenuContent`나 `MenuSection` 바로 안에 둔다.
11
12
  * 상태는 `data-highlighted`(키보드 위치·hover), `data-disabled`(비활성)로 노출한다.
13
+ * Tide props: `disabled`, `textValue`, `aria-label`, `children`, `onClick` ({@link MenuItemOwnProps}). 나머지는 `<div>` 속성.
12
14
  */
13
15
  export declare function MenuItem(_props: MenuItemProps): null;
@@ -6,6 +6,7 @@ import { asCollectionComponent, itemCollectionNode } from "../../_internal/libs/
6
6
  /**
7
7
  * Menu의 동작 항목(`role="menuitem"`). `MenuContent`나 `MenuSection` 바로 안에 둔다.
8
8
  * 상태는 `data-highlighted`(키보드 위치·hover), `data-disabled`(비활성)로 노출한다.
9
+ * Tide props: `disabled`, `textValue`, `aria-label`, `children`, `onClick` ({@link MenuItemOwnProps}). 나머지는 `<div>` 속성.
9
10
  */
10
11
  function MenuItem(_props) {
11
12
  return null;
@@ -1,13 +1,15 @@
1
1
  import { ComponentProps, ReactElement } from "react";
2
- export interface MenuTriggerProps extends ComponentProps<"button"> {
2
+ export interface MenuTriggerOwnProps {
3
3
  /**
4
4
  * 다른 요소로 렌더한다. 예: `render={<Button variant="outline" />}`. props·ref·className·핸들러를 병합한다.
5
5
  * 기본은 class 없는 `<button type="button">`이다.
6
6
  */
7
7
  render?: ReactElement;
8
8
  }
9
+ export interface MenuTriggerProps extends MenuTriggerOwnProps, Omit<ComponentProps<"button">, keyof MenuTriggerOwnProps> {}
9
10
  /**
10
11
  * Menu를 여는 버튼. 마우스는 누르는 순간 열고, 키보드는 Enter·Space·↓로 첫 항목, ↑로 마지막 항목에서 연다.
11
12
  * 열렸을 때 `data-open`이 붙는다.
13
+ * Tide props: `render` ({@link MenuTriggerOwnProps}). 나머지는 `<button>` 속성.
12
14
  */
13
15
  export declare function MenuTrigger({ render, ref, id, className, ...props }: MenuTriggerProps): ReactElement;
@@ -9,6 +9,7 @@ import { mergeProps, mergeRefs, usePress } from "react-aria";
9
9
  /**
10
10
  * Menu를 여는 버튼. 마우스는 누르는 순간 열고, 키보드는 Enter·Space·↓로 첫 항목, ↑로 마지막 항목에서 연다.
11
11
  * 열렸을 때 `data-open`이 붙는다.
12
+ * Tide props: `render` ({@link MenuTriggerOwnProps}). 나머지는 `<button>` 속성.
12
13
  */
13
14
  function MenuTrigger({ render, ref, id, className, ...props }) {
14
15
  const { state, triggerRef, menuTriggerProps, triggerId, setTriggerId } = useMenuContext("MenuTrigger");
@@ -1,7 +1,7 @@
1
1
  import { Menu, MenuProps } from "./Menu.js";
2
- import { MenuTrigger, MenuTriggerProps } from "./components/MenuTrigger.js";
3
- import { MenuContent, MenuContentProps } from "./components/MenuContent.js";
4
- import { MenuItem, MenuItemProps } from "./components/MenuItem.js";
2
+ import { MenuTrigger, MenuTriggerOwnProps, MenuTriggerProps } from "./components/MenuTrigger.js";
3
+ import { MenuContent, MenuContentOwnProps, MenuContentProps } from "./components/MenuContent.js";
4
+ import { MenuItem, MenuItemOwnProps, MenuItemProps } from "./components/MenuItem.js";
5
5
  import { MenuSection, MenuSectionProps } from "./components/MenuSection.js";
6
6
  import { MenuPlacement } from "./types.js";
7
- export { Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, type MenuPlacement, type MenuProps, MenuSection, type MenuSectionProps, MenuTrigger, type MenuTriggerProps };
7
+ export { Menu, MenuContent, type MenuContentOwnProps, type MenuContentProps, MenuItem, type MenuItemOwnProps, type MenuItemProps, type MenuPlacement, type MenuProps, MenuSection, type MenuSectionProps, MenuTrigger, type MenuTriggerOwnProps, type MenuTriggerProps };
@@ -1,10 +1,12 @@
1
1
  import { ComponentProps, ReactElement } from "react";
2
- export interface PaginationProps extends ComponentProps<"nav"> {
2
+ export interface PaginationOwnProps {
3
3
  /** 탐색 영역 이름. 기본값 `"페이지 이동"`. 한 화면에 여럿이면 `"댓글 페이지"`처럼 구분한다. */
4
4
  "aria-label"?: string;
5
5
  }
6
+ export interface PaginationProps extends PaginationOwnProps, Omit<ComponentProps<"nav">, keyof PaginationOwnProps> {}
6
7
  /**
7
8
  * 페이지 이동 탐색 영역(`<nav>` 안의 `<ul>`). 자식은 `PaginationItem`이다.
8
9
  * 보일 번호 범위는 앱이 정한다. `ref`·`className`은 `<nav>`에 붙는다.
10
+ * Tide props: `aria-label` ({@link PaginationOwnProps}). 나머지는 `<nav>` 속성.
9
11
  */
10
12
  export declare function Pagination({ "aria-label": ariaLabel, children, ...props }: PaginationProps): ReactElement;
@@ -5,6 +5,7 @@ import { jsx } from "react/jsx-runtime";
5
5
  /**
6
6
  * 페이지 이동 탐색 영역(`<nav>` 안의 `<ul>`). 자식은 `PaginationItem`이다.
7
7
  * 보일 번호 범위는 앱이 정한다. `ref`·`className`은 `<nav>`에 붙는다.
8
+ * Tide props: `aria-label` ({@link PaginationOwnProps}). 나머지는 `<nav>` 속성.
8
9
  */
9
10
  function Pagination({ "aria-label": ariaLabel = "페이지 이동", children, ...props }) {
10
11
  return /* @__PURE__ */ jsx("nav", {
@@ -1,7 +1,11 @@
1
1
  import { ComponentProps, ReactElement, ReactNode } from "react";
2
- export interface PaginationEllipsisProps extends Omit<ComponentProps<"span">, "children"> {
2
+ export interface PaginationEllipsisOwnProps {
3
3
  /** 스크린리더가 읽는 텍스트(화면에는 「…」만 보인다). 기본값 `"페이지 생략"`. */
4
4
  children?: ReactNode;
5
5
  }
6
- /** 생략된 번호 자리. 화면에는 「…」 아이콘, 스크린리더에는 텍스트를 보인다. */
6
+ export interface PaginationEllipsisProps extends PaginationEllipsisOwnProps, Omit<ComponentProps<"span">, keyof PaginationEllipsisOwnProps> {}
7
+ /**
8
+ * 생략된 번호 자리. 화면에는 「…」 아이콘, 스크린리더에는 텍스트를 보인다.
9
+ * Tide props: `children` ({@link PaginationEllipsisOwnProps}). 나머지는 `<span>` 속성.
10
+ */
7
11
  export declare function PaginationEllipsis({ className, children, ...props }: PaginationEllipsisProps): ReactElement;
@@ -5,7 +5,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { EllipsisIcon } from "@tide-design/icons";
6
6
 
7
7
  // src/Pagination/components/PaginationEllipsis.tsx
8
- /** 생략된 번호 자리. 화면에는 「…」 아이콘, 스크린리더에는 텍스트를 보인다. */
8
+ /**
9
+ * 생략된 번호 자리. 화면에는 「…」 아이콘, 스크린리더에는 텍스트를 보인다.
10
+ * Tide props: `children` ({@link PaginationEllipsisOwnProps}). 나머지는 `<span>` 속성.
11
+ */
9
12
  function PaginationEllipsis({ className, children = "페이지 생략", ...props }) {
10
13
  return /* @__PURE__ */ jsxs("span", {
11
14
  ...props,
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps, ReactElement } from "react";
2
- export interface PaginationLinkProps extends Omit<ComponentProps<"a">, "color"> {
2
+ export interface PaginationLinkOwnProps {
3
3
  /** 현재 페이지인지. `aria-current="page"`를 붙이고 subtle 채움으로 보인다. 기본값은 `false`다. */
4
4
  current?: boolean;
5
5
  /**
@@ -8,5 +8,9 @@ export interface PaginationLinkProps extends Omit<ComponentProps<"a">, "color">
8
8
  */
9
9
  render?: ReactElement;
10
10
  }
11
- /** 페이지 번호 링크. 기본은 `<a>`이고 Button(ghost, 32px) 모양이다. 현재 페이지는 `current`를 준다. */
11
+ export interface PaginationLinkProps extends PaginationLinkOwnProps, Omit<ComponentProps<"a">, keyof PaginationLinkOwnProps | "color"> {}
12
+ /**
13
+ * 페이지 번호 링크. 기본은 `<a>`이고 Button(ghost, 32px) 모양이다. 현재 페이지는 `current`를 준다.
14
+ * Tide props: `current`, `render` ({@link PaginationLinkOwnProps}). 나머지는 `<a>` 속성.
15
+ */
12
16
  export declare function PaginationLink({ current, render, className, ...props }: PaginationLinkProps): ReactElement;
@@ -4,7 +4,10 @@ import { linkClass } from "../constants/paginationClass.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
6
6
  // src/Pagination/components/PaginationLink.tsx
7
- /** 페이지 번호 링크. 기본은 `<a>`이고 Button(ghost, 32px) 모양이다. 현재 페이지는 `current`를 준다. */
7
+ /**
8
+ * 페이지 번호 링크. 기본은 `<a>`이고 Button(ghost, 32px) 모양이다. 현재 페이지는 `current`를 준다.
9
+ * Tide props: `current`, `render` ({@link PaginationLinkOwnProps}). 나머지는 `<a>` 속성.
10
+ */
8
11
  function PaginationLink({ current = false, render, className, ...props }) {
9
12
  return /* @__PURE__ */ jsx(Button, {
10
13
  ...props,
@@ -1,5 +1,9 @@
1
- import { PaginationArrowProps } from "../types.js";
1
+ import { PaginationArrowOwnProps, PaginationArrowProps } from "../types.js";
2
2
  import { ReactElement } from "react";
3
+ export interface PaginationNextOwnProps extends PaginationArrowOwnProps {}
3
4
  export interface PaginationNextProps extends PaginationArrowProps {}
4
- /** 다음 페이지로 가는 IconButton(ghost, 32px, ›). 마지막 페이지에서는 `disabled`를 준다. */
5
+ /**
6
+ * 다음 페이지로 가는 IconButton(ghost, 32px, ›). 마지막 페이지에서는 `disabled`를 준다.
7
+ * Tide props: `aria-label`, `noPressScale`, `render` ({@link PaginationNextOwnProps}). 나머지는 `<button>` 속성.
8
+ */
5
9
  export declare function PaginationNext({ "aria-label": ariaLabel, ...props }: PaginationNextProps): ReactElement;
@@ -3,7 +3,10 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { ChevronRightIcon } from "@tide-design/icons";
4
4
 
5
5
  // src/Pagination/components/PaginationNext.tsx
6
- /** 다음 페이지로 가는 IconButton(ghost, 32px, ›). 마지막 페이지에서는 `disabled`를 준다. */
6
+ /**
7
+ * 다음 페이지로 가는 IconButton(ghost, 32px, ›). 마지막 페이지에서는 `disabled`를 준다.
8
+ * Tide props: `aria-label`, `noPressScale`, `render` ({@link PaginationNextOwnProps}). 나머지는 `<button>` 속성.
9
+ */
7
10
  function PaginationNext({ "aria-label": ariaLabel = "다음 페이지", ...props }) {
8
11
  return /* @__PURE__ */ jsx(IconButton, {
9
12
  ...props,
@@ -1,5 +1,9 @@
1
- import { PaginationArrowProps } from "../types.js";
1
+ import { PaginationArrowOwnProps, PaginationArrowProps } from "../types.js";
2
2
  import { ReactElement } from "react";
3
+ export interface PaginationPreviousOwnProps extends PaginationArrowOwnProps {}
3
4
  export interface PaginationPreviousProps extends PaginationArrowProps {}
4
- /** 이전 페이지로 가는 IconButton(ghost, 32px, ‹). 첫 페이지에서는 `disabled`를 준다. */
5
+ /**
6
+ * 이전 페이지로 가는 IconButton(ghost, 32px, ‹). 첫 페이지에서는 `disabled`를 준다.
7
+ * Tide props: `aria-label`, `noPressScale`, `render` ({@link PaginationPreviousOwnProps}). 나머지는 `<button>` 속성.
8
+ */
5
9
  export declare function PaginationPrevious({ "aria-label": ariaLabel, ...props }: PaginationPreviousProps): ReactElement;
@@ -3,7 +3,10 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { ChevronLeftIcon } from "@tide-design/icons";
4
4
 
5
5
  // src/Pagination/components/PaginationPrevious.tsx
6
- /** 이전 페이지로 가는 IconButton(ghost, 32px, ‹). 첫 페이지에서는 `disabled`를 준다. */
6
+ /**
7
+ * 이전 페이지로 가는 IconButton(ghost, 32px, ‹). 첫 페이지에서는 `disabled`를 준다.
8
+ * Tide props: `aria-label`, `noPressScale`, `render` ({@link PaginationPreviousOwnProps}). 나머지는 `<button>` 속성.
9
+ */
7
10
  function PaginationPrevious({ "aria-label": ariaLabel = "이전 페이지", ...props }) {
8
11
  return /* @__PURE__ */ jsx(IconButton, {
9
12
  ...props,
@@ -1,7 +1,7 @@
1
- import { Pagination, PaginationProps } from "./Pagination.js";
1
+ import { Pagination, PaginationOwnProps, PaginationProps } from "./Pagination.js";
2
2
  import { PaginationItem, PaginationItemProps } from "./components/PaginationItem.js";
3
- import { PaginationLink, PaginationLinkProps } from "./components/PaginationLink.js";
4
- import { PaginationPrevious, PaginationPreviousProps } from "./components/PaginationPrevious.js";
5
- import { PaginationNext, PaginationNextProps } from "./components/PaginationNext.js";
6
- import { PaginationEllipsis, PaginationEllipsisProps } from "./components/PaginationEllipsis.js";
7
- export { Pagination, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps };
3
+ import { PaginationLink, PaginationLinkOwnProps, PaginationLinkProps } from "./components/PaginationLink.js";
4
+ import { PaginationPrevious, PaginationPreviousOwnProps, PaginationPreviousProps } from "./components/PaginationPrevious.js";
5
+ import { PaginationNext, PaginationNextOwnProps, PaginationNextProps } from "./components/PaginationNext.js";
6
+ import { PaginationEllipsis, PaginationEllipsisOwnProps, PaginationEllipsisProps } from "./components/PaginationEllipsis.js";
7
+ export { Pagination, PaginationEllipsis, type PaginationEllipsisOwnProps, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkOwnProps, type PaginationLinkProps, PaginationNext, type PaginationNextOwnProps, type PaginationNextProps, type PaginationOwnProps, PaginationPrevious, type PaginationPreviousOwnProps, type PaginationPreviousProps, type PaginationProps };
@@ -1,6 +1,7 @@
1
- import { IconButtonProps } from "../IconButton/IconButton.js";
2
- /** 이전/다음 항목 props. IconButton에서 모양·아이콘·로딩을 고정했다. */
3
- export interface PaginationArrowProps extends Omit<IconButtonProps, "aria-label" | "children" | "variant" | "color" | "size" | "loading" | "loadingLabel"> {
1
+ import { IconButtonOwnProps, IconButtonProps } from "../IconButton/IconButton.js";
2
+ /** 이전/다음 항목이 받는 Tide props. IconButton에서 모양·아이콘·로딩을 고정했다. */
3
+ export interface PaginationArrowOwnProps extends Omit<IconButtonOwnProps, "aria-label" | "children" | "variant" | "color" | "size" | "loading" | "loadingLabel"> {
4
4
  /** 버튼 이름. 기본값은 이전 `"이전 페이지"`, 다음 `"다음 페이지"`다. */
5
5
  "aria-label"?: string;
6
- }
6
+ }
7
+ export interface PaginationArrowProps extends PaginationArrowOwnProps, Omit<IconButtonProps, keyof IconButtonOwnProps> {}
@@ -1,13 +1,15 @@
1
1
  import { PopoverPlacement } from "../types.js";
2
2
  import { ComponentProps, ReactElement } from "react";
3
- export interface PopoverContentProps extends Omit<ComponentProps<"div">, "id" | "role"> {
3
+ export interface PopoverContentOwnProps {
4
4
  /** 트리거 기준 위치. 기본값은 `bottom`(아래, 가운데 맞춤)이다. 공간이 모자라면 반대쪽으로 뒤집힌다. */
5
5
  placement?: PopoverPlacement;
6
6
  /** 트리거와의 간격(px). 기본값은 `8`이다. */
7
7
  offset?: number;
8
8
  }
9
+ export interface PopoverContentProps extends PopoverContentOwnProps, Omit<ComponentProps<"div">, keyof PopoverContentOwnProps | "id" | "role"> {}
9
10
  /**
10
11
  * 트리거 옆에 뜨는 내용(`role="dialog"`). 열릴 때만 `document.body`에 portal로 렌더한다.
11
12
  * 열려 있으면 `data-open`이, 트리거 기준 방향이 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
13
+ * Tide props: `placement`, `offset` ({@link PopoverContentOwnProps}). 나머지는 `<div>` 속성.
12
14
  */
13
15
  export declare function PopoverContent(props: PopoverContentProps): ReactElement | null;
@@ -11,6 +11,7 @@ import { useRef } from "react";
11
11
  /**
12
12
  * 트리거 옆에 뜨는 내용(`role="dialog"`). 열릴 때만 `document.body`에 portal로 렌더한다.
13
13
  * 열려 있으면 `data-open`이, 트리거 기준 방향이 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
14
+ * Tide props: `placement`, `offset` ({@link PopoverContentOwnProps}). 나머지는 `<div>` 속성.
14
15
  */
15
16
  function PopoverContent(props) {
16
17
  const context = usePopoverContext("PopoverContent");
@@ -1,13 +1,15 @@
1
1
  import { ComponentProps, ReactElement } from "react";
2
- export interface PopoverTriggerProps extends ComponentProps<"button"> {
2
+ export interface PopoverTriggerOwnProps {
3
3
  /**
4
4
  * 다른 요소로 렌더한다. 예: `render={<Button variant="outline" />}`, `render={<IconButton aria-label="설정" />}`.
5
5
  * props, ref, className, 이벤트 핸들러를 그 요소에 병합한다. 기본은 class 없는 `<button type="button">`이다.
6
6
  */
7
7
  render?: ReactElement;
8
8
  }
9
+ export interface PopoverTriggerProps extends PopoverTriggerOwnProps, Omit<ComponentProps<"button">, keyof PopoverTriggerOwnProps> {}
9
10
  /**
10
11
  * Popover를 여닫는 버튼. 누르면(마우스, 터치, Enter, Space) 열림 상태를 뒤집는다.
11
12
  * `aria-expanded`, 열렸을 때 `aria-controls`, 열렸을 때 `data-open`이 붙는다.
13
+ * Tide props: `render` ({@link PopoverTriggerOwnProps}). 나머지는 `<button>` 속성.
12
14
  */
13
15
  export declare function PopoverTrigger({ render, ref, id, className, ...props }: PopoverTriggerProps): ReactElement;
@@ -9,6 +9,7 @@ import { mergeProps, mergeRefs, usePress } from "react-aria";
9
9
  /**
10
10
  * Popover를 여닫는 버튼. 누르면(마우스, 터치, Enter, Space) 열림 상태를 뒤집는다.
11
11
  * `aria-expanded`, 열렸을 때 `aria-controls`, 열렸을 때 `data-open`이 붙는다.
12
+ * Tide props: `render` ({@link PopoverTriggerOwnProps}). 나머지는 `<button>` 속성.
12
13
  */
13
14
  function PopoverTrigger({ render, ref, id, className, ...props }) {
14
15
  const { state, triggerRef, triggerProps, triggerId, setTriggerId } = usePopoverContext("PopoverTrigger");
@@ -1,5 +1,5 @@
1
1
  import { Popover, PopoverProps } from "./Popover.js";
2
- import { PopoverTrigger, PopoverTriggerProps } from "./components/PopoverTrigger.js";
3
- import { PopoverContent, PopoverContentProps } from "./components/PopoverContent.js";
2
+ import { PopoverTrigger, PopoverTriggerOwnProps, PopoverTriggerProps } from "./components/PopoverTrigger.js";
3
+ import { PopoverContent, PopoverContentOwnProps, PopoverContentProps } from "./components/PopoverContent.js";
4
4
  import { PopoverPlacement } from "./types.js";
5
- export { Popover, PopoverContent, type PopoverContentProps, type PopoverPlacement, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
5
+ export { Popover, PopoverContent, type PopoverContentOwnProps, type PopoverContentProps, type PopoverPlacement, type PopoverProps, PopoverTrigger, type PopoverTriggerOwnProps, type PopoverTriggerProps };
@@ -8,7 +8,7 @@ type ProgressName = {
8
8
  "aria-label"?: string;
9
9
  "aria-labelledby": string;
10
10
  };
11
- interface ProgressOwnProps extends Omit<ComponentProps<"div">, "color" | "children" | "role" | "aria-label" | "aria-labelledby" | "aria-valuenow" | "aria-valuemin" | "aria-valuemax"> {
11
+ export interface ProgressOwnProps {
12
12
  /** 현재 값. 0~`max`로 잘라 쓴다. 값을 모르는 진행은 Spinner를 쓴다. */
13
13
  value: number;
14
14
  /** 끝 값. 기본값 `100`. 시작 값은 항상 0이다. */
@@ -18,7 +18,10 @@ interface ProgressOwnProps extends Omit<ComponentProps<"div">, "color" | "childr
18
18
  /** 막대 색. Role(Tide Role + 앱 Role)만 받는다. 기본값 `primary`. */
19
19
  color?: Role;
20
20
  }
21
- export type ProgressProps = ProgressOwnProps & ProgressName;
22
- /** 작업이 얼마나 진행됐는지 막대로 보여 준다(`role="progressbar"`). 서버 컴포넌트로 쓸 수 있다. */
21
+ export type ProgressProps = ProgressOwnProps & ProgressName & Omit<ComponentProps<"div">, keyof ProgressOwnProps | "children" | "role" | "aria-label" | "aria-labelledby" | "aria-valuenow" | "aria-valuemin" | "aria-valuemax">;
22
+ /**
23
+ * 작업이 얼마나 진행됐는지 막대로 보여 준다(`role="progressbar"`). 서버 컴포넌트로 쓸 수 있다.
24
+ * Tide props: `value`, `max`, `size`, `color` ({@link ProgressOwnProps}). 나머지는 `<div>` 속성(`aria-label`이나 `aria-labelledby` 필수).
25
+ */
23
26
  export declare function Progress({ value, max, size, color, className, ...props }: ProgressProps): ReactElement;
24
27
  export {};
@@ -12,7 +12,10 @@ function clamp(value, max) {
12
12
  if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) return 0;
13
13
  return Math.min(Math.max(value, 0), max);
14
14
  }
15
- /** 작업이 얼마나 진행됐는지 막대로 보여 준다(`role="progressbar"`). 서버 컴포넌트로 쓸 수 있다. */
15
+ /**
16
+ * 작업이 얼마나 진행됐는지 막대로 보여 준다(`role="progressbar"`). 서버 컴포넌트로 쓸 수 있다.
17
+ * Tide props: `value`, `max`, `size`, `color` ({@link ProgressOwnProps}). 나머지는 `<div>` 속성(`aria-label`이나 `aria-labelledby` 필수).
18
+ */
16
19
  function Progress({ value, max = 100, size = "md", color = "primary", className, ...props }) {
17
20
  const safeMax = Number.isFinite(max) && max > 0 ? max : 100;
18
21
  const now = clamp(value, safeMax);
@@ -1,2 +1,2 @@
1
- import { Progress, ProgressProps } from "./Progress.js";
2
- export { Progress, type ProgressProps };
1
+ import { Progress, ProgressOwnProps, ProgressProps } from "./Progress.js";
2
+ export { Progress, type ProgressOwnProps, type ProgressProps };
@@ -1,7 +1,7 @@
1
1
  import { ChoiceSize } from "../_internal/constants/choiceClass.js";
2
2
  import { Role } from "../types.js";
3
3
  import { CSSProperties, ComponentProps, ReactElement, ReactNode } from "react";
4
- export interface RadioProps extends Omit<ComponentProps<"input">, "type" | "size" | "color" | "children" | "className" | "style" | "value"> {
4
+ export interface RadioOwnProps {
5
5
  /** 이 라디오의 값. RadioGroup의 `value`·`onValueChange`가 쓰고 form에 제출된다. */
6
6
  value: string;
7
7
  /** 원 옆에 보이는 label. 라디오의 이름이 된다. 없으면 `aria-label`을 준다. */
@@ -17,5 +17,9 @@ export interface RadioProps extends Omit<ComponentProps<"input">, "type" | "size
17
17
  /** 루트 label의 style */
18
18
  style?: CSSProperties;
19
19
  }
20
- /** 네이티브 라디오 버튼. 보통 `RadioGroup` 안에 둔다. 묶음 밖에서는 `name`·`checked`·`onChange`를 직접 준다. */
20
+ export interface RadioProps extends RadioOwnProps, Omit<ComponentProps<"input">, keyof RadioOwnProps | "type"> {}
21
+ /**
22
+ * 네이티브 라디오 버튼. 보통 `RadioGroup` 안에 둔다. 묶음 밖에서는 `name`·`checked`·`onChange`를 직접 준다.
23
+ * Tide props: `value`, `children`, `size`, `color`, `invalid`, `className`, `style` ({@link RadioOwnProps}). 나머지는 `<input>` 속성.
24
+ */
21
25
  export declare function Radio({ value, children, size, color, invalid, id, disabled, required, name, checked, defaultChecked, onChange, className, style, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }: RadioProps): ReactElement;
@@ -17,7 +17,10 @@ const dotSize = {
17
17
  sm: 6,
18
18
  md: 8
19
19
  };
20
- /** 네이티브 라디오 버튼. 보통 `RadioGroup` 안에 둔다. 묶음 밖에서는 `name`·`checked`·`onChange`를 직접 준다. */
20
+ /**
21
+ * 네이티브 라디오 버튼. 보통 `RadioGroup` 안에 둔다. 묶음 밖에서는 `name`·`checked`·`onChange`를 직접 준다.
22
+ * Tide props: `value`, `children`, `size`, `color`, `invalid`, `className`, `style` ({@link RadioOwnProps}). 나머지는 `<input>` 속성.
23
+ */
21
24
  function Radio({ value, children, size = "md", color = "primary", invalid, id, disabled, required, name, checked, defaultChecked, onChange, className, style, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }) {
22
25
  const group = use(RadioGroupContext);
23
26
  const control = useFieldControl({
@@ -1,2 +1,2 @@
1
- import { Radio, RadioProps } from "./Radio.js";
2
- export { Radio, type RadioProps };
1
+ import { Radio, RadioOwnProps, RadioProps } from "./Radio.js";
2
+ export { Radio, type RadioOwnProps, type RadioProps };