@tide-design/components 0.11.2 → 0.11.4

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 (131) hide show
  1. package/dist/Accordion/Accordion.d.ts +3 -12
  2. package/dist/Accordion/Accordion.js +1 -4
  3. package/dist/Accordion/components/AccordionPanel.d.ts +1 -4
  4. package/dist/Accordion/components/AccordionTrigger.d.ts +3 -7
  5. package/dist/Accordion/components/AccordionTrigger.js +2 -3
  6. package/dist/Alert/Alert.d.ts +8 -16
  7. package/dist/Alert/Alert.js +1 -4
  8. package/dist/Avatar/Avatar.d.ts +2 -4
  9. package/dist/Avatar/Avatar.js +1 -5
  10. package/dist/Badge/Badge.d.ts +5 -20
  11. package/dist/Badge/Badge.js +1 -5
  12. package/dist/Breadcrumb/Breadcrumb.d.ts +3 -4
  13. package/dist/Breadcrumb/Breadcrumb.js +2 -3
  14. package/dist/Breadcrumb/components/BreadcrumbCurrent.d.ts +1 -1
  15. package/dist/Breadcrumb/components/BreadcrumbCurrent.js +1 -1
  16. package/dist/Breadcrumb/components/BreadcrumbLink.d.ts +2 -5
  17. package/dist/Breadcrumb/components/BreadcrumbLink.js +1 -1
  18. package/dist/Button/Button.d.ts +7 -20
  19. package/dist/Button/Button.js +1 -4
  20. package/dist/Button/constants/buttonClass.js +2 -2
  21. package/dist/Checkbox/Checkbox.d.ts +6 -15
  22. package/dist/Checkbox/Checkbox.js +1 -6
  23. package/dist/CheckboxGroup/CheckboxGroup.d.ts +3 -6
  24. package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
  25. package/dist/Combobox/Combobox.d.ts +6 -16
  26. package/dist/Combobox/Combobox.js +2 -12
  27. package/dist/Combobox/components/ComboboxItem.d.ts +2 -4
  28. package/dist/Combobox/components/ComboboxItem.js +2 -4
  29. package/dist/Combobox/components/ComboboxPopover.js +0 -5
  30. package/dist/Combobox/components/ComboboxPopoverInner.js +0 -4
  31. package/dist/Combobox/components/ComboboxSection.d.ts +1 -1
  32. package/dist/Combobox/components/ComboboxSection.js +1 -1
  33. package/dist/Combobox/constants/comboboxClass.js +0 -5
  34. package/dist/Dialog/Dialog.d.ts +1 -1
  35. package/dist/Dialog/Dialog.js +1 -1
  36. package/dist/Dialog/components/DialogClose.d.ts +1 -4
  37. package/dist/Dialog/components/DialogContent.d.ts +2 -4
  38. package/dist/Dialog/components/DialogContent.js +2 -4
  39. package/dist/Dialog/components/DialogTrigger.d.ts +1 -1
  40. package/dist/Dialog/components/DialogTrigger.js +1 -1
  41. package/dist/Field/Field.d.ts +4 -11
  42. package/dist/Field/Field.js +2 -4
  43. package/dist/IconButton/IconButton.d.ts +10 -25
  44. package/dist/IconButton/IconButton.js +1 -6
  45. package/dist/Link/Link.d.ts +3 -13
  46. package/dist/Link/Link.js +1 -4
  47. package/dist/Menu/Menu.d.ts +1 -4
  48. package/dist/Menu/Menu.js +1 -4
  49. package/dist/Menu/components/MenuContent.d.ts +2 -3
  50. package/dist/Menu/components/MenuContent.js +2 -3
  51. package/dist/Menu/components/MenuContentInner.js +0 -1
  52. package/dist/Menu/components/MenuItem.d.ts +1 -5
  53. package/dist/Menu/components/MenuItem.js +0 -1
  54. package/dist/Menu/components/MenuItemView.js +0 -1
  55. package/dist/Menu/components/MenuSection.d.ts +1 -1
  56. package/dist/Menu/components/MenuSection.js +1 -1
  57. package/dist/Menu/components/MenuSectionView.js +0 -1
  58. package/dist/Menu/components/MenuTrigger.d.ts +4 -4
  59. package/dist/Menu/components/MenuTrigger.js +2 -2
  60. package/dist/Pagination/Pagination.d.ts +3 -4
  61. package/dist/Pagination/Pagination.js +2 -3
  62. package/dist/Pagination/components/PaginationEllipsis.d.ts +2 -2
  63. package/dist/Pagination/components/PaginationEllipsis.js +1 -1
  64. package/dist/Pagination/components/PaginationLink.d.ts +2 -5
  65. package/dist/Pagination/components/PaginationLink.js +1 -4
  66. package/dist/Pagination/types.d.ts +1 -1
  67. package/dist/Popover/components/PopoverContent.d.ts +1 -2
  68. package/dist/Popover/components/PopoverContent.js +1 -2
  69. package/dist/Progress/Progress.d.ts +5 -13
  70. package/dist/Progress/Progress.js +1 -5
  71. package/dist/Radio/Radio.d.ts +6 -12
  72. package/dist/Radio/Radio.js +1 -5
  73. package/dist/Select/Select.d.ts +5 -15
  74. package/dist/Select/Select.js +1 -5
  75. package/dist/Select/components/SelectItem.d.ts +1 -3
  76. package/dist/Select/components/SelectItem.js +1 -3
  77. package/dist/Select/components/SelectPopoverInner.js +1 -4
  78. package/dist/Separator/Separator.d.ts +2 -9
  79. package/dist/Separator/Separator.js +1 -4
  80. package/dist/Skeleton/Skeleton.d.ts +4 -8
  81. package/dist/Skeleton/Skeleton.js +1 -1
  82. package/dist/Spinner/Spinner.d.ts +2 -8
  83. package/dist/Spinner/Spinner.js +1 -3
  84. package/dist/Switch/Switch.d.ts +4 -10
  85. package/dist/Switch/Switch.js +1 -4
  86. package/dist/Tabs/Tabs.d.ts +2 -8
  87. package/dist/Tabs/components/Tab.d.ts +1 -2
  88. package/dist/Tabs/components/Tab.js +1 -2
  89. package/dist/Tabs/components/TabPanel.d.ts +1 -1
  90. package/dist/Tabs/components/TabPanel.js +1 -1
  91. package/dist/Tag/Tag.d.ts +1 -5
  92. package/dist/Tag/components/TagGroup.d.ts +5 -8
  93. package/dist/Tag/components/TagGroup.js +2 -3
  94. package/dist/Tag/components/TagView.js +0 -1
  95. package/dist/Textarea/Textarea.d.ts +1 -4
  96. package/dist/Textarea/Textarea.js +0 -1
  97. package/dist/Toast/Toast.d.ts +2 -4
  98. package/dist/Toast/Toast.js +1 -1
  99. package/dist/Toast/libs/toastQueue.d.ts +1 -8
  100. package/dist/Toast/libs/toastQueue.js +1 -8
  101. package/dist/Toast/types.d.ts +5 -9
  102. package/dist/Tooltip/components/TooltipContent.d.ts +1 -2
  103. package/dist/Tooltip/components/TooltipContent.js +1 -2
  104. package/dist/Tooltip/components/TooltipTrigger.d.ts +2 -3
  105. package/dist/Typography/Typography.d.ts +4 -10
  106. package/dist/Typography/Typography.js +2 -2
  107. package/dist/_internal/components/ListBoxNodes/ListBoxNodes.js +1 -3
  108. package/dist/_internal/components/ListBoxNodes/components/ListBoxOptionView.js +1 -4
  109. package/dist/_internal/components/OverlayPortal.js +2 -4
  110. package/dist/_internal/constants/alertClass.js +7 -20
  111. package/dist/_internal/constants/choiceClass.js +2 -2
  112. package/dist/_internal/constants/choiceGroupClass.d.ts +0 -1
  113. package/dist/_internal/constants/choiceGroupClass.js +0 -1
  114. package/dist/_internal/constants/inputClass.d.ts +1 -1
  115. package/dist/_internal/constants/inputClass.js +1 -2
  116. package/dist/_internal/constants/listClass.js +4 -29
  117. package/dist/_internal/constants/overlayClass.js +9 -53
  118. package/dist/_internal/constants/pressableClass.js +3 -6
  119. package/dist/_internal/hooks/useChoiceGroup.js +1 -4
  120. package/dist/_internal/hooks/useCloseOnTab.js +2 -8
  121. package/dist/_internal/hooks/useFieldControl.js +1 -4
  122. package/dist/_internal/hooks/useOverlayPresence.js +1 -7
  123. package/dist/_internal/hooks/useOverlayTheme.js +1 -5
  124. package/dist/_internal/hooks/usePopoverOverlay.js +1 -7
  125. package/dist/_internal/libs/listCollection.js +5 -23
  126. package/dist/_internal/libs/overlayPosition.d.ts +1 -4
  127. package/dist/_internal/libs/overlayPosition.js +2 -5
  128. package/dist/_internal/libs/pressableState.js +2 -5
  129. package/dist/_internal/libs/renderElement.js +1 -1
  130. package/dist/types.d.ts +2 -5
  131. package/package.json +14 -3
@@ -1,7 +1,7 @@
1
1
  import { ListBoxSectionProps } from "../../_internal/components/ListBoxNodes/types.js";
2
2
  export interface ComboboxSectionProps extends ListBoxSectionProps {}
3
3
  /**
4
- * 옵션 묶음(`role="group"`). `heading`이 화면에 보이는 제목이자 묶음의 이름이고, 없으면 `aria-label`이 이름이다.
4
+ * 옵션 묶음(`role="group"`). `heading`이 보이는 제목이자 이름이고, 없으면 `aria-label`이 이름이다.
5
5
  * 거른 결과 묶음 안에 남은 옵션이 없으면 묶음도 빠진다.
6
6
  */
7
7
  export declare function ComboboxSection(_props: ComboboxSectionProps): null;
@@ -4,7 +4,7 @@ import { asCollectionComponent, sectionCollectionNode } from "../../_internal/li
4
4
 
5
5
  // src/Combobox/components/ComboboxSection.tsx
6
6
  /**
7
- * 옵션 묶음(`role="group"`). `heading`이 화면에 보이는 제목이자 묶음의 이름이고, 없으면 `aria-label`이 이름이다.
7
+ * 옵션 묶음(`role="group"`). `heading`이 보이는 제목이자 이름이고, 없으면 `aria-label`이 이름이다.
8
8
  * 거른 결과 묶음 안에 남은 옵션이 없으면 묶음도 빠진다.
9
9
  */
10
10
  function ComboboxSection(_props) {
@@ -11,11 +11,6 @@ const buttonSizeClass = {
11
11
  lg: "-ms-[41px] w-[41px] pe-[17px]"
12
12
  };
13
13
  const buttonClass = "inline-flex shrink-0 cursor-pointer items-center justify-end text-muted outline-none disabled:cursor-not-allowed disabled:text-disabled";
14
- /**
15
- * 거른 결과가 없을 때의 글자. 옵션과 같은 여백·글자 크기라 목록 높이가 옵션 하나와 같다. `text-muted`.
16
- * listbox 밖(같은 목록 표면 안)에 둔다. listbox 자식은 option·group만 될 수 있어서다. 결과 개수(0개)는 React Aria가
17
- * live region으로 알린다.
18
- */
19
14
  const emptyClass = "px-2 py-1.5 text-body-sm text-muted select-none";
20
15
 
21
16
  export { buttonClass, buttonSizeClass, emptyClass, inputEndClass, wrapperClass };
@@ -2,7 +2,7 @@ import { DialogProps } from "../_internal/components/DialogRoot.js";
2
2
  import { ReactElement } from "react";
3
3
  /**
4
4
  * 트리거와 내용을 잇는 열림 상태. DOM 요소를 만들지 않는다.
5
- * 안에 `DialogTrigger`(없어도 된다. `open`으로 제어해 Menu 항목 등에서 열 수 있다)와 `DialogContent`를 둔다.
5
+ * 안에 `DialogTrigger`와 `DialogContent`를 둔다. 트리거 없이 `open`으로 제어해 열어도 된다.
6
6
  */
7
7
  export declare function Dialog(props: DialogProps): ReactElement;
8
8
  export type { DialogProps };
@@ -6,7 +6,7 @@ import { jsx } from "react/jsx-runtime";
6
6
  // src/Dialog/Dialog.tsx
7
7
  /**
8
8
  * 트리거와 내용을 잇는 열림 상태. DOM 요소를 만들지 않는다.
9
- * 안에 `DialogTrigger`(없어도 된다. `open`으로 제어해 Menu 항목 등에서 열 수 있다)와 `DialogContent`를 둔다.
9
+ * 안에 `DialogTrigger`와 `DialogContent`를 둔다. 트리거 없이 `open`으로 제어해 열어도 된다.
10
10
  */
11
11
  function Dialog(props) {
12
12
  return /* @__PURE__ */ jsx(DialogRoot, {
@@ -1,9 +1,6 @@
1
1
  import { ComponentProps, ReactElement } from "react";
2
2
  export interface DialogCloseProps extends ComponentProps<"button"> {
3
- /**
4
- * 다른 요소로 렌더한다. 예: `render={<Button variant="ghost" color="neutral" />}`.
5
- * 기본은 class 없는 `<button type="button">`이다.
6
- */
3
+ /** 다른 요소로 렌더한다(예: `render={<Button variant="ghost" color="neutral" />}`). 기본은 class 없는 `<button type="button">`. */
7
4
  render?: ReactElement;
8
5
  }
9
6
  /**
@@ -7,9 +7,7 @@ export interface DialogContentProps extends Omit<ComponentProps<"div">, "id" | "
7
7
  closeLabel?: string;
8
8
  }
9
9
  /**
10
- * 화면 가운데 뜨는 모달 내용(`role="dialog"`, AlertDialog 안에서는 `role="alertdialog"`).
11
- * 열릴 때만 `document.body`에 portal하고, 반투명 막(`bg-overlay`)과 함께 `z-modal`로 쌓는다.
12
- * 등장은 opacity + scale 0.96 → 1(`normal`), 퇴장은 opacity + scale 0.98(`fast`)이다. 움직임 줄이기에서는 opacity만 바뀐다.
13
- * Dialog에는 끝 위쪽에 닫기 버튼(IconButton)이 있고 바깥 막을 누르면 닫힌다. AlertDialog는 둘 다 없다(Esc는 닫는다).
10
+ * 화면 가운데 뜨는 모달 내용(`role="dialog"`, AlertDialog 안에서는 `alertdialog`). 열릴 때만 `document.body`에 portal한다.
11
+ * Dialog는 끝 위쪽 닫기 버튼과 바깥 막 누름으로 닫히고, AlertDialog는 둘 다 없다(Esc는 닫는다).
14
12
  */
15
13
  export declare function DialogContent(props: DialogContentProps): ReactElement | null;
@@ -9,10 +9,8 @@ import { useRef } from "react";
9
9
 
10
10
  // src/Dialog/components/DialogContent.tsx
11
11
  /**
12
- * 화면 가운데 뜨는 모달 내용(`role="dialog"`, AlertDialog 안에서는 `role="alertdialog"`).
13
- * 열릴 때만 `document.body`에 portal하고, 반투명 막(`bg-overlay`)과 함께 `z-modal`로 쌓는다.
14
- * 등장은 opacity + scale 0.96 → 1(`normal`), 퇴장은 opacity + scale 0.98(`fast`)이다. 움직임 줄이기에서는 opacity만 바뀐다.
15
- * Dialog에는 끝 위쪽에 닫기 버튼(IconButton)이 있고 바깥 막을 누르면 닫힌다. AlertDialog는 둘 다 없다(Esc는 닫는다).
12
+ * 화면 가운데 뜨는 모달 내용(`role="dialog"`, AlertDialog 안에서는 `alertdialog`). 열릴 때만 `document.body`에 portal한다.
13
+ * Dialog는 끝 위쪽 닫기 버튼과 바깥 막 누름으로 닫히고, AlertDialog는 둘 다 없다(Esc는 닫는다).
16
14
  */
17
15
  function DialogContent(props) {
18
16
  const context = useDialogContext("DialogContent");
@@ -8,6 +8,6 @@ export interface DialogTriggerProps extends ComponentProps<"button"> {
8
8
  }
9
9
  /**
10
10
  * Dialog를 여는 버튼. 누르면(마우스, 터치, Enter, Space) 연다. 열린 동안은 바깥이 inert라 다시 누를 수 없다.
11
- * `aria-haspopup="dialog"`, `aria-expanded`, 열렸을 때 `aria-controls`와 `data-open`이 붙는다.
11
+ * `aria-expanded`, 열렸을 때 `aria-controls`와 `data-open`이 붙는다.
12
12
  */
13
13
  export declare function DialogTrigger({ render, ref, id, className, ...props }: DialogTriggerProps): ReactElement;
@@ -8,7 +8,7 @@ import { mergeProps, mergeRefs, usePress } from "react-aria";
8
8
  // src/Dialog/components/DialogTrigger.tsx
9
9
  /**
10
10
  * Dialog를 여는 버튼. 누르면(마우스, 터치, Enter, Space) 연다. 열린 동안은 바깥이 inert라 다시 누를 수 없다.
11
- * `aria-haspopup="dialog"`, `aria-expanded`, 열렸을 때 `aria-controls`와 `data-open`이 붙는다.
11
+ * `aria-expanded`, 열렸을 때 `aria-controls`와 `data-open`이 붙는다.
12
12
  */
13
13
  function DialogTrigger({ render, ref, id, className, ...props }) {
14
14
  const { state, triggerRef, triggerProps, setTriggerId } = useDialogContext("DialogTrigger");
@@ -6,10 +6,7 @@ export interface FieldProps extends ComponentProps<"div"> {
6
6
  description?: ReactNode;
7
7
  /** 오류 메시지. 오류 상태일 때만 보이고 입력창의 `aria-describedby`로 연결된다. */
8
8
  error?: ReactNode;
9
- /**
10
- * 오류 상태. 기본값은 `error`가 있으면 `true`다.
11
- * 입력창에 `aria-invalid="true"`와 `data-invalid`가 붙는다. `false`를 주면 `error`가 있어도 숨긴다.
12
- */
9
+ /** 오류 상태. 기본값은 `error`가 있으면 `true`. `false`를 주면 `error`가 있어도 숨긴다. */
13
10
  invalid?: boolean;
14
11
  /** 필수 입력. 입력창에 네이티브 `required`가 붙고 label 뒤에 `*`가 보인다(스크린리더는 `required`로 읽는다). */
15
12
  required?: boolean;
@@ -17,17 +14,13 @@ export interface FieldProps extends ComponentProps<"div"> {
17
14
  disabled?: boolean;
18
15
  /** label이 가리킬 입력창 id. 주지 않으면 자동으로 만든다. 오류 요약에서 `#id`로 링크할 때 쓴다. `group`이면 묶음의 id다. */
19
16
  htmlFor?: string;
20
- /**
21
- * 안에 둔 것이 묶음(`CheckboxGroup`, `RadioGroup`)일 때 `true`로 준다. 기본값은 `false`다.
22
- * label이 `<label for>` 대신 `for` 없는 요소가 되고, 묶음이 `aria-labelledby`로 이 label을 이름으로 쓴다.
23
- */
17
+ /** 안에 둔 것이 묶음(`CheckboxGroup`, `RadioGroup`)일 때 `true`. 기본값 `false`. 묶음이 `aria-labelledby`로 label을 쓴다. */
24
18
  group?: boolean;
25
19
  /** 입력 Component 하나(Input, Textarea, CheckboxGroup, RadioGroup 등) */
26
20
  children: ReactNode;
27
21
  }
28
22
  /**
29
- * 입력 Component에 label, 설명, 오류 메시지를 붙인다. 안의 Input·Textarea에 `id`, `aria-describedby`,
30
- * `aria-invalid`, `required`, `disabled`가 자동으로 연결된다. 묶음(CheckboxGroup·RadioGroup)은 `group`과 함께 쓴다.
31
- * 서버 컴포넌트로 쓸 수 있다.
23
+ * 입력 Component에 label, 설명, 오류 메시지를 붙이고 `id`·`aria-describedby`·`aria-invalid`·`required`·`disabled`를
24
+ * 자동으로 연결한다. 서버 컴포넌트로 쓸 수 있다.
32
25
  */
33
26
  export declare function Field({ label, description, error, invalid, required, disabled, htmlFor, group, className, children, ...props }: FieldProps): ReactElement;
@@ -5,12 +5,10 @@ import { useId } from "react";
5
5
  import { CircleExclamationPointIcon } from "@tide-design/icons";
6
6
 
7
7
  // src/Field/Field.tsx
8
- /** 값이 화면에 그릴 내용인지(null·undefined·false·빈 문자열이 아닌지) */
9
8
  const hasContent = (node) => node !== void 0 && node !== null && node !== false && node !== "";
10
9
  /**
11
- * 입력 Component에 label, 설명, 오류 메시지를 붙인다. 안의 Input·Textarea에 `id`, `aria-describedby`,
12
- * `aria-invalid`, `required`, `disabled`가 자동으로 연결된다. 묶음(CheckboxGroup·RadioGroup)은 `group`과 함께 쓴다.
13
- * 서버 컴포넌트로 쓸 수 있다.
10
+ * 입력 Component에 label, 설명, 오류 메시지를 붙이고 `id`·`aria-describedby`·`aria-invalid`·`required`·`disabled`를
11
+ * 자동으로 연결한다. 서버 컴포넌트로 쓸 수 있다.
14
12
  */
15
13
  function Field({ label, description, error, invalid, required = false, disabled = false, htmlFor, group = false, className, children, ...props }) {
16
14
  const baseId = useId();
@@ -1,42 +1,27 @@
1
1
  import { FillVariant, Role, Size } from "../types.js";
2
2
  import { ComponentProps, ReactElement, ReactNode } from "react";
3
- /** IconButton의 채움 방식. Button과 같은 4개를 받는다. */
4
3
  type IconButtonVariant = Extract<FillVariant, "solid" | "subtle" | "outline" | "ghost">;
5
- /** IconButton의 size. 공통 size 4개를 모두 받는다. 가장 작은 `xs`도 24×24px다. */
6
4
  type IconButtonSize = Extract<Size, "xs" | "sm" | "md" | "lg">;
7
5
  export interface IconButtonProps extends Omit<ComponentProps<"button">, "color" | "aria-label" | "children"> {
8
- /** 버튼 이름. 아이콘만 보이므로 반드시 적는다(예: `"설정"`). 스크린 리더가 읽는다. */
6
+ /** 버튼 이름. 아이콘만 보이므로 필수다(예: `"설정"`). */
9
7
  "aria-label": string;
10
- /** 아이콘. 장식용으로 숨겨지고 size에 맞는 크기가 된다. 다른 라이브러리의 아이콘도 받는다. */
8
+ /** 아이콘. 장식용으로 숨겨지고 size에 맞는 크기가 된다. */
11
9
  children: ReactNode;
12
- /** 채움 방식. 기본값은 Button과 같은 `solid`다. 툴바·닫기 버튼처럼 약한 동작은 `ghost`를 쓴다. */
10
+ /** 채움 방식. 기본값 `solid`. 툴바·닫기처럼 약한 동작은 `ghost`를 쓴다. */
13
11
  variant?: IconButtonVariant;
14
- /**
15
- * Role. Tide Role 6개와 앱이 `RoleRegistry`에 더한 Role을 받는다. 기본값은 `primary`다.
16
- * 색 계열 이름(`blue` 등)은 받지 않는다. 행동의 뜻을 색으로 전하기 때문이다(ADR 0016).
17
- * 루트에 `data-color`로 붙어 accent 색을 정한다. 바깥 요소의 색을 물려받지 않는다.
18
- */
12
+ /** Role(Tide Role + 앱 Role). 기본값 `primary`. 색 계열 이름은 받지 않는다. */
19
13
  color?: Role;
20
- /** 정사각형 크기 `xs` 24px, `sm` 32px, `md` 40px, `lg` 48px. 아이콘은 16/16/20/24px다. 기본값은 `md`다. */
14
+ /** 정사각형 크기 `xs` 24px, `sm` 32px, `md` 40px, `lg` 48px. 기본값 `md`. */
21
15
  size?: IconButtonSize;
22
- /**
23
- * 로딩 중. 아이콘 자리에 Spinner를 보이고 클릭을 막는다.
24
- * 포커스는 유지하고 `aria-disabled="true"`와 `data-loading`을 붙인다.
25
- */
16
+ /** 로딩 중. Spinner를 보이고 클릭을 막는다. 포커스는 유지하고 `aria-disabled="true"`를 붙인다. */
26
17
  loading?: boolean;
27
- /** 로딩 중에 `aria-label` 뒤에 붙는 텍스트. 기본값은 `"로딩 중"`이다. */
18
+ /** 로딩 중 `aria-label` 뒤에 붙는 텍스트. 기본값 `"로딩 중"`. */
28
19
  loadingLabel?: string;
29
- /** 누를 때 줄어드는 반응(scale 0.96)을 끈다. 움직임 줄이기 설정에서는 이 값과 관계없이 줄어들지 않는다. */
20
+ /** 누를 때 줄어드는 반응(scale 0.96)을 끈다. 움직임 줄이기 설정에서는 항상 꺼진다. */
30
21
  noPressScale?: boolean;
31
- /**
32
- * 다른 요소로 렌더한다. 예: `render={<Link href="/x" />}`.
33
- * props, ref, className을 그 요소에 병합한다. `button`이 아닌 요소의 `disabled`는 `aria-disabled`로 바뀐다.
34
- */
22
+ /** 다른 요소로 렌더한다. 예: `render={<Link href="/x" />}`. 그 요소의 `disabled`는 `aria-disabled`로 바뀐다. */
35
23
  render?: ReactElement;
36
24
  }
37
- /**
38
- * 아이콘만 있는 버튼. `aria-label`이 필수라 이름이 빠지지 않는다.
39
- * Button과 같은 채움 방식(`variant`) × Role(`color`) × `size` 축을 쓴다.
40
- */
25
+ /** 아이콘만 있는 버튼. `aria-label`이 필수다. 모양 축은 Button과 같다. */
41
26
  export declare function IconButton({ variant, color, size, loading, loadingLabel, noPressScale, render, disabled, type, children, onClick, "aria-label": ariaLabel, ...props }: IconButtonProps): ReactElement;
42
27
  export {};
@@ -7,24 +7,19 @@ import { Spinner } from "../Spinner/Spinner.js";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
 
9
9
  // src/IconButton/IconButton.tsx
10
- /** 정사각형 크기(spec size 표의 높이). padding은 없고 아이콘을 가운데 둔다. 24×24px 밑으로 내려가지 않는다. */
11
10
  const sizeClass = {
12
11
  xs: "size-6",
13
12
  sm: "size-8",
14
13
  md: "size-10",
15
14
  lg: "size-12"
16
15
  };
17
- /** 아이콘 크기(spec 아이콘 크기 규칙 「IconButton 아이콘」 열). 감싼 span과 Spinner에 쓴다. */
18
16
  const iconSizeClass = {
19
17
  xs: "size-4",
20
18
  sm: "size-4",
21
19
  md: "size-5",
22
20
  lg: "size-6"
23
21
  };
24
- /**
25
- * 아이콘만 있는 버튼. `aria-label`이 필수라 이름이 빠지지 않는다.
26
- * Button과 같은 채움 방식(`variant`) × Role(`color`) × `size` 축을 쓴다.
27
- */
22
+ /** 아이콘만 있는 버튼. `aria-label`이 필수다. 모양 축은 Button과 같다. */
28
23
  function IconButton({ variant = "solid", color = "primary", size = "md", loading = false, loadingLabel = "로딩 중", noPressScale = false, render, disabled = false, type, children, onClick, "aria-label": ariaLabel, ...props }) {
29
24
  const state = pressableState({
30
25
  variant,
@@ -1,20 +1,10 @@
1
1
  import { Role } from "../types.js";
2
2
  import { ComponentProps, ReactElement } from "react";
3
3
  export interface LinkProps extends Omit<ComponentProps<"a">, "color"> {
4
- /**
5
- * Role. Tide Role 6개와 앱이 `RoleRegistry`에 더한 Role을 받는다. 기본값은 `primary`다.
6
- * 색 계열 이름(`blue` 등)은 받지 않는다. 행동의 뜻을 색으로 전하기 때문이다(ADR 0016).
7
- * 루트에 `data-color`로 붙어 글자색(`text-accent`)을 정한다. 바깥 요소의 색을 물려받지 않는다.
8
- */
4
+ /** 글자색 Role(Tide Role + 앱 Role). 기본값 `primary`. 색 계열 이름은 받지 않는다. */
9
5
  color?: Role;
10
- /**
11
- * 다른 요소로 렌더한다. 예: `render={<NextLink href="/x" />}`.
12
- * props, ref, className을 그 요소에 병합한다.
13
- */
6
+ /** 다른 요소로 렌더한다. 예: `render={<NextLink href="/x" />}`. props·ref·className을 병합한다. */
14
7
  render?: ReactElement;
15
8
  }
16
- /**
17
- * 문장 안에서 다른 페이지나 위치로 이동하는 텍스트 링크.
18
- * Next.js에서는 `render={<NextLink href="/x" />}`로 클라이언트 이동을 쓴다.
19
- */
9
+ /** 문장 안에서 다른 페이지나 위치로 이동하는 텍스트 링크. 글자 크기·굵기는 물려받는다. 서버 컴포넌트로 쓸 수 있다. */
20
10
  export declare function Link({ color, render, ...props }: LinkProps): ReactElement;
package/dist/Link/Link.js CHANGED
@@ -2,10 +2,7 @@ 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
- /**
6
- * 문장 안에서 다른 페이지나 위치로 이동하는 텍스트 링크.
7
- * Next.js에서는 `render={<NextLink href="/x" />}`로 클라이언트 이동을 쓴다.
8
- */
5
+ /** 문장 안에서 다른 페이지나 위치로 이동하는 텍스트 링크. 글자 크기·굵기는 물려받는다. 서버 컴포넌트로 쓸 수 있다. */
9
6
  function Link({ color = "primary", render, ...props }) {
10
7
  return renderElement({
11
8
  defaultElement: "a",
@@ -9,8 +9,5 @@ export interface MenuProps {
9
9
  /** `MenuTrigger`와 `MenuContent` */
10
10
  children: ReactNode;
11
11
  }
12
- /**
13
- * 트리거와 동작 목록을 잇는 열림 상태. DOM 요소를 만들지 않는다.
14
- * 안에 `MenuTrigger` 하나와 `MenuContent` 하나를 둔다.
15
- */
12
+ /** 트리거와 동작 목록을 잇는 열림 상태(DOM 없음). 안에 `MenuTrigger` 하나와 `MenuContent` 하나를 둔다. */
16
13
  export declare function Menu({ open, defaultOpen, onOpenChange, children }: MenuProps): ReactElement;
package/dist/Menu/Menu.js CHANGED
@@ -7,10 +7,7 @@ import { useMenuTrigger } from "react-aria";
7
7
  import { useMenuTriggerState } from "react-stately";
8
8
 
9
9
  // src/Menu/Menu.tsx
10
- /**
11
- * 트리거와 동작 목록을 잇는 열림 상태. DOM 요소를 만들지 않는다.
12
- * 안에 `MenuTrigger` 하나와 `MenuContent` 하나를 둔다.
13
- */
10
+ /** 트리거와 동작 목록을 잇는 열림 상태(DOM 없음). 안에 `MenuTrigger` 하나와 `MenuContent` 하나를 둔다. */
14
11
  function Menu({ open, defaultOpen, onOpenChange, children }) {
15
12
  const state = useMenuTriggerState({
16
13
  isOpen: open,
@@ -9,8 +9,7 @@ export interface MenuContentProps extends Omit<ComponentProps<"div">, "id" | "ro
9
9
  children?: ReactNode;
10
10
  }
11
11
  /**
12
- * 트리거 옆에 뜨는 동작 목록(`role="menu"`). 열릴 때만 `document.body`에 portal로 렌더하고 `z-popover`로 쌓는다.
13
- * 바로 나타나고, 닫히면 opacity만 `fast`(150ms)로 사라진다.
14
- * 열려 있으면 `data-open`이, 트리거 기준 방향이 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
12
+ * 트리거 옆에 뜨는 동작 목록(`role="menu"`). 열릴 때만 `document.body`에 portal한다.
13
+ * 상태는 `data-open`, 방향은 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
15
14
  */
16
15
  export declare function MenuContent(props: MenuContentProps): ReactElement | null;
@@ -9,9 +9,8 @@ import { useRef } from "react";
9
9
 
10
10
  // src/Menu/components/MenuContent.tsx
11
11
  /**
12
- * 트리거 옆에 뜨는 동작 목록(`role="menu"`). 열릴 때만 `document.body`에 portal로 렌더하고 `z-popover`로 쌓는다.
13
- * 바로 나타나고, 닫히면 opacity만 `fast`(150ms)로 사라진다.
14
- * 열려 있으면 `data-open`이, 트리거 기준 방향이 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
12
+ * 트리거 옆에 뜨는 동작 목록(`role="menu"`). 열릴 때만 `document.body`에 portal한다.
13
+ * 상태는 `data-open`, 방향은 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
15
14
  */
16
15
  function MenuContent(props) {
17
16
  const context = useMenuContext("MenuContent");
@@ -14,7 +14,6 @@ import { mergeProps, mergeRefs, useMenu } from "react-aria";
14
14
  import { useTreeState } from "react-stately";
15
15
 
16
16
  // src/Menu/components/MenuContentInner.tsx
17
- /** DOM에 있는 동안만 portal 안에서 렌더한다. React Aria 오버레이·목록 hook은 요소가 있다고 보고 동작한다. */
18
17
  function MenuContentInner({ context, popoverRef, placement = "bottom start", offset = 4, ref, className, children, ...props }) {
19
18
  const { state, triggerRef, menuProps, triggerId } = context;
20
19
  useOverlayTheme(triggerRef, popoverRef);
@@ -3,15 +3,11 @@ import { ComponentProps, ReactNode } from "react";
3
3
  export interface MenuItemProps extends Omit<ComponentProps<"div">, "role" | "children">, CollectionItemProps {
4
4
  /** 항목 내용. 아이콘(장식용)과 글자를 함께 둘 수 있다. */
5
5
  children?: ReactNode;
6
- /**
7
- * 항목을 실행할 때 부른다. 마우스·터치 누름뿐 아니라 Enter·Space도 click으로 실행한다(네이티브 버튼과 같다).
8
- * 실행하면 메뉴가 닫힌다. `disabled`면 부르지 않는다.
9
- */
6
+ /** 항목을 실행할 때 부른다(누름·Enter·Space). 실행하면 메뉴가 닫힌다. `disabled`면 부르지 않는다. */
10
7
  onClick?: ComponentProps<"div">["onClick"];
11
8
  }
12
9
  /**
13
10
  * Menu의 동작 항목(`role="menuitem"`). `MenuContent`나 `MenuSection` 바로 안에 둔다.
14
- * 키보드 위치와 마우스를 올린 항목은 highlight(primary subtle 배경, primary 글자)로 바로 바뀐다.
15
11
  * 상태는 `data-highlighted`(키보드 위치·hover), `data-disabled`(비활성)로 노출한다.
16
12
  */
17
13
  export declare function MenuItem(_props: MenuItemProps): null;
@@ -5,7 +5,6 @@ import { asCollectionComponent, itemCollectionNode } from "../../_internal/libs/
5
5
  // src/Menu/components/MenuItem.tsx
6
6
  /**
7
7
  * Menu의 동작 항목(`role="menuitem"`). `MenuContent`나 `MenuSection` 바로 안에 둔다.
8
- * 키보드 위치와 마우스를 올린 항목은 highlight(primary subtle 배경, primary 글자)로 바로 바뀐다.
9
8
  * 상태는 `data-highlighted`(키보드 위치·hover), `data-disabled`(비활성)로 노출한다.
10
9
  */
11
10
  function MenuItem(_props) {
@@ -7,7 +7,6 @@ import { useMemo, useRef } from "react";
7
7
  import { mergeProps, mergeRefs, useMenuItem } from "react-aria";
8
8
 
9
9
  // src/Menu/components/MenuItemView.tsx
10
- /** 항목 하나를 그린다. node.props는 앱이 MenuItem에 준 props(와 컬렉션이 더한 isDisabled)다. */
11
10
  function MenuItemView({ node, tree }) {
12
11
  const itemRef = useRef(null);
13
12
  const { ref, className, onClick, disabled: _disabled, textValue: _textValue, isDisabled: _isDisabled, children: _children, id, ...props } = node.props;
@@ -7,7 +7,7 @@ export interface MenuSectionProps extends CollectionSectionProps {
7
7
  children?: ReactNode;
8
8
  }
9
9
  /**
10
- * 항목 묶음(`role="group"`). `heading`이 화면에 보이는 제목이자 묶음의 이름이고, 없으면 `aria-label`이 이름이다.
10
+ * 항목 묶음(`role="group"`). `heading`이 보이는 제목이자 이름이고, 없으면 `aria-label`이 이름이다.
11
11
  * 앞뒤 다른 항목·묶음과의 사이에 구분선(`role="separator"`)이 그려진다.
12
12
  */
13
13
  export declare function MenuSection(_props: MenuSectionProps): null;
@@ -4,7 +4,7 @@ import { asCollectionComponent, sectionCollectionNode } from "../../_internal/li
4
4
 
5
5
  // src/Menu/components/MenuSection.tsx
6
6
  /**
7
- * 항목 묶음(`role="group"`). `heading`이 화면에 보이는 제목이자 묶음의 이름이고, 없으면 `aria-label`이 이름이다.
7
+ * 항목 묶음(`role="group"`). `heading`이 보이는 제목이자 이름이고, 없으면 `aria-label`이 이름이다.
8
8
  * 앞뒤 다른 항목·묶음과의 사이에 구분선(`role="separator"`)이 그려진다.
9
9
  */
10
10
  function MenuSection(_props) {
@@ -6,7 +6,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { useMenuSection } from "react-aria";
7
7
 
8
8
  // src/Menu/components/MenuSectionView.tsx
9
- /** 묶음 하나를 그린다. 제목은 보조기술에서 숨기고(`presentation`) 묶음의 이름으로만 쓴다(useMenuSection). */
10
9
  function MenuSectionView({ node, tree }) {
11
10
  const { className } = node.props;
12
11
  const { itemProps, headingProps, groupProps } = useMenuSection({
@@ -1,13 +1,13 @@
1
1
  import { ComponentProps, ReactElement } from "react";
2
2
  export interface MenuTriggerProps extends ComponentProps<"button"> {
3
3
  /**
4
- * 다른 요소로 렌더한다. 예: `render={<Button variant="outline" />}`, `render={<IconButton aria-label="더보기" />}`.
5
- * props, ref, className, 이벤트 핸들러를 그 요소에 병합한다. 기본은 class 없는 `<button type="button">`이다.
4
+ * 다른 요소로 렌더한다. 예: `render={<Button variant="outline" />}`. props·ref·className·핸들러를 병합한다.
5
+ * 기본은 class 없는 `<button type="button">`이다.
6
6
  */
7
7
  render?: ReactElement;
8
8
  }
9
9
  /**
10
- * Menu를 여는 버튼. 마우스는 누르는 순간 열고, 키보드는 Enter·Space·↓로 열어 첫 항목에, ↑로 열어 마지막 항목에
11
- * 위치한다. `aria-haspopup`, `aria-expanded`, 열렸을 때 `aria-controls`와 `data-open`이 붙는다.
10
+ * Menu를 여는 버튼. 마우스는 누르는 순간 열고, 키보드는 Enter·Space·↓로 첫 항목, ↑로 마지막 항목에서 연다.
11
+ * 열렸을 때 `data-open`이 붙는다.
12
12
  */
13
13
  export declare function MenuTrigger({ render, ref, id, className, ...props }: MenuTriggerProps): ReactElement;
@@ -7,8 +7,8 @@ import { mergeProps, mergeRefs, usePress } from "react-aria";
7
7
 
8
8
  // src/Menu/components/MenuTrigger.tsx
9
9
  /**
10
- * Menu를 여는 버튼. 마우스는 누르는 순간 열고, 키보드는 Enter·Space·↓로 열어 첫 항목에, ↑로 열어 마지막 항목에
11
- * 위치한다. `aria-haspopup`, `aria-expanded`, 열렸을 때 `aria-controls`와 `data-open`이 붙는다.
10
+ * Menu를 여는 버튼. 마우스는 누르는 순간 열고, 키보드는 Enter·Space·↓로 첫 항목, ↑로 마지막 항목에서 연다.
11
+ * 열렸을 때 `data-open`이 붙는다.
12
12
  */
13
13
  function MenuTrigger({ render, ref, id, className, ...props }) {
14
14
  const { state, triggerRef, menuTriggerProps, triggerId, setTriggerId } = useMenuContext("MenuTrigger");
@@ -1,11 +1,10 @@
1
1
  import { ComponentProps, ReactElement } from "react";
2
2
  export interface PaginationProps extends ComponentProps<"nav"> {
3
- /** 탐색 영역 이름. 기본값은 `"페이지 이동"`이다. 한 화면에 목록이 여럿이면 `"댓글 페이지"`처럼 구분한다. */
3
+ /** 탐색 영역 이름. 기본값 `"페이지 이동"`. 한 화면에 여럿이면 `"댓글 페이지"`처럼 구분한다. */
4
4
  "aria-label"?: string;
5
5
  }
6
6
  /**
7
- * 페이지 이동 탐색 영역. `<nav>` 안의 `<ul>`이다.
8
- * 자식은 `PaginationItem`이고, 그 안에 `PaginationPrevious`·`PaginationLink`·`PaginationEllipsis`·`PaginationNext`를 둔다.
9
- * `ref`·`className`은 `<nav>`에 붙는다.
7
+ * 페이지 이동 탐색 영역(`<nav>` 안의 `<ul>`). 자식은 `PaginationItem`이다.
8
+ * 보일 번호 범위는 앱이 정한다. `ref`·`className`은 `<nav>`에 붙는다.
10
9
  */
11
10
  export declare function Pagination({ "aria-label": ariaLabel, children, ...props }: PaginationProps): ReactElement;
@@ -3,9 +3,8 @@ import { jsx } from "react/jsx-runtime";
3
3
 
4
4
  // src/Pagination/Pagination.tsx
5
5
  /**
6
- * 페이지 이동 탐색 영역. `<nav>` 안의 `<ul>`이다.
7
- * 자식은 `PaginationItem`이고, 그 안에 `PaginationPrevious`·`PaginationLink`·`PaginationEllipsis`·`PaginationNext`를 둔다.
8
- * `ref`·`className`은 `<nav>`에 붙는다.
6
+ * 페이지 이동 탐색 영역(`<nav>` 안의 `<ul>`). 자식은 `PaginationItem`이다.
7
+ * 보일 번호 범위는 앱이 정한다. `ref`·`className`은 `<nav>`에 붙는다.
9
8
  */
10
9
  function Pagination({ "aria-label": ariaLabel = "페이지 이동", children, ...props }) {
11
10
  return /* @__PURE__ */ jsx("nav", {
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps, ReactElement, ReactNode } from "react";
2
2
  export interface PaginationEllipsisProps extends Omit<ComponentProps<"span">, "children"> {
3
- /** 스크린리더가 읽는 텍스트. 화면에는 「…」 아이콘만 보인다. 기본값은 `"페이지 생략"`이다. */
3
+ /** 스크린리더가 읽는 텍스트(화면에는 「…」만 보인다). 기본값 `"페이지 생략"`. */
4
4
  children?: ReactNode;
5
5
  }
6
- /** 생략된 번호 자리 `<span>`. 화면에는 「…」 아이콘, 스크린리더에는 텍스트(기본 `"페이지 생략"`)를 보인다. */
6
+ /** 생략된 번호 자리. 화면에는 「…」 아이콘, 스크린리더에는 텍스트를 보인다. */
7
7
  export declare function PaginationEllipsis({ className, children, ...props }: PaginationEllipsisProps): ReactElement;
@@ -5,7 +5,7 @@ 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
- /** 생략된 번호 자리 `<span>`. 화면에는 「…」 아이콘, 스크린리더에는 텍스트(기본 `"페이지 생략"`)를 보인다. */
8
+ /** 생략된 번호 자리. 화면에는 「…」 아이콘, 스크린리더에는 텍스트를 보인다. */
9
9
  function PaginationEllipsis({ className, children = "페이지 생략", ...props }) {
10
10
  return /* @__PURE__ */ jsxs("span", {
11
11
  ...props,
@@ -4,12 +4,9 @@ export interface PaginationLinkProps extends Omit<ComponentProps<"a">, "color">
4
4
  current?: boolean;
5
5
  /**
6
6
  * 다른 요소로 렌더한다. 예: `render={<NextLink href="?page=2" />}`.
7
- * 상태로 페이지를 바꾸면 `render={<button type="button" onClick={...} />}`를 쓴다. props, ref, className을 병합한다.
7
+ * 상태로 페이지를 바꾸면 `render={<button type="button" onClick={...} />}`를 쓴다.
8
8
  */
9
9
  render?: ReactElement;
10
10
  }
11
- /**
12
- * 페이지 번호 링크. 기본은 `<a>`이고 Button(ghost, 32px) 모양이다. 현재 페이지는 `current`를 준다.
13
- * Next.js에서는 `render={<NextLink href="?page=2" />}`를 쓴다.
14
- */
11
+ /** 페이지 번호 링크. 기본은 `<a>`이고 Button(ghost, 32px) 모양이다. 현재 페이지는 `current`를 준다. */
15
12
  export declare function PaginationLink({ current, render, className, ...props }: PaginationLinkProps): ReactElement;
@@ -4,10 +4,7 @@ import { linkClass } from "../constants/paginationClass.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
6
6
  // src/Pagination/components/PaginationLink.tsx
7
- /**
8
- * 페이지 번호 링크. 기본은 `<a>`이고 Button(ghost, 32px) 모양이다. 현재 페이지는 `current`를 준다.
9
- * Next.js에서는 `render={<NextLink href="?page=2" />}`를 쓴다.
10
- */
7
+ /** 페이지 번호 링크. 기본은 `<a>`이고 Button(ghost, 32px) 모양이다. 현재 페이지는 `current`를 준다. */
11
8
  function PaginationLink({ current = false, render, className, ...props }) {
12
9
  return /* @__PURE__ */ jsx(Button, {
13
10
  ...props,
@@ -1,5 +1,5 @@
1
1
  import { IconButtonProps } from "../IconButton/IconButton.js";
2
- /** 이전/다음 항목 props. IconButton의 props에서 모양(variant·color·size)과 아이콘·로딩을 고정했다. */
2
+ /** 이전/다음 항목 props. IconButton에서 모양·아이콘·로딩을 고정했다. */
3
3
  export interface PaginationArrowProps extends Omit<IconButtonProps, "aria-label" | "children" | "variant" | "color" | "size" | "loading" | "loadingLabel"> {
4
4
  /** 버튼 이름. 기본값은 이전 `"이전 페이지"`, 다음 `"다음 페이지"`다. */
5
5
  "aria-label"?: string;
@@ -7,8 +7,7 @@ export interface PopoverContentProps extends Omit<ComponentProps<"div">, "id" |
7
7
  offset?: number;
8
8
  }
9
9
  /**
10
- * 트리거 옆에 뜨는 내용(`role="dialog"`). 열릴 때만 `document.body`에 portal로 렌더하고 `z-popover`로 쌓는다.
11
- * 등장은 opacity + blur 4px + 4px 이동(`normal`), 퇴장은 그 절반(`fast`)이다. 움직임 줄이기에서는 opacity만 바뀐다.
10
+ * 트리거 옆에 뜨는 내용(`role="dialog"`). 열릴 때만 `document.body`에 portal로 렌더한다.
12
11
  * 열려 있으면 `data-open`이, 트리거 기준 방향이 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
13
12
  */
14
13
  export declare function PopoverContent(props: PopoverContentProps): ReactElement | null;
@@ -9,8 +9,7 @@ import { useRef } from "react";
9
9
 
10
10
  // src/Popover/components/PopoverContent.tsx
11
11
  /**
12
- * 트리거 옆에 뜨는 내용(`role="dialog"`). 열릴 때만 `document.body`에 portal로 렌더하고 `z-popover`로 쌓는다.
13
- * 등장은 opacity + blur 4px + 4px 이동(`normal`), 퇴장은 그 절반(`fast`)이다. 움직임 줄이기에서는 opacity만 바뀐다.
12
+ * 트리거 옆에 뜨는 내용(`role="dialog"`). 열릴 때만 `document.body`에 portal로 렌더한다.
14
13
  * 열려 있으면 `data-open`이, 트리거 기준 방향이 `data-placement`(`top`/`bottom`/`left`/`right`)로 붙는다.
15
14
  */
16
15
  function PopoverContent(props) {
@@ -1,8 +1,6 @@
1
1
  import { Role, Size } from "../types.js";
2
2
  import { ComponentProps, ReactElement } from "react";
3
- /** Progress의 size. 막대 굵기다. */
4
3
  type ProgressSize = Extract<Size, "sm" | "md">;
5
- /** 접근 가능한 이름. `aria-label`이나 `aria-labelledby` 중 하나는 꼭 준다(WAI-ARIA progressbar는 이름이 필요하다). */
6
4
  type ProgressName = {
7
5
  "aria-label": string;
8
6
  "aria-labelledby"?: string;
@@ -11,22 +9,16 @@ type ProgressName = {
11
9
  "aria-labelledby": string;
12
10
  };
13
11
  interface ProgressOwnProps extends Omit<ComponentProps<"div">, "color" | "children" | "role" | "aria-label" | "aria-labelledby" | "aria-valuenow" | "aria-valuemin" | "aria-valuemax"> {
14
- /** 현재 값. 0 이상 `max` 이하로 잘라서 쓴다. 값을 모르는 진행은 Progress가 아니라 Spinner로 보여 준다. */
12
+ /** 현재 값. 0~`max`로 잘라 쓴다. 값을 모르는 진행은 Spinner를 쓴다. */
15
13
  value: number;
16
- /** 끝 값. 기본값은 `100`이다. 시작 값은 항상 0이다. */
14
+ /** 끝 값. 기본값 `100`. 시작 값은 항상 0이다. */
17
15
  max?: number;
18
- /** 막대 굵기. `sm` 4px, `md` 8px. 기본값은 `md`다. */
16
+ /** 막대 굵기. `sm` 4px, `md` 8px. 기본값 `md`. */
19
17
  size?: ProgressSize;
20
- /**
21
- * 막대 색. 진행 상태는 뜻이 있는 표시라 Role만 받는다(Tide Role 6개와 앱이 `RoleRegistry`에 더한 Role, ADR 0016).
22
- * 기본값은 `primary`다. 루트에 `data-color`로 붙고 바깥 요소의 색을 물려받지 않는다.
23
- */
18
+ /** 막대 색. Role(Tide Role + 앱 Role)만 받는다. 기본값 `primary`. */
24
19
  color?: Role;
25
20
  }
26
21
  export type ProgressProps = ProgressOwnProps & ProgressName;
27
- /**
28
- * 작업이 얼마나 진행됐는지 막대로 보여 준다. 역할은 `progressbar`이고 값은 `aria-valuenow`로 나간다.
29
- * 움직임 줄이기에서도 진행 표시는 그대로다. 서버 컴포넌트로 쓸 수 있다.
30
- */
22
+ /** 작업이 얼마나 진행됐는지 막대로 보여 준다(`role="progressbar"`). 서버 컴포넌트로 쓸 수 있다. */
31
23
  export declare function Progress({ value, max, size, color, className, ...props }: ProgressProps): ReactElement;
32
24
  export {};