@tide-design/components 0.11.0 → 0.11.1
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/Accordion.js +1 -1
- package/dist/Alert.js +3 -2
- package/dist/Avatar.js +1 -1
- package/dist/Badge.js +1 -1
- package/dist/Breadcrumb.js +2 -2
- package/dist/Button.js +3 -2
- package/dist/Card.js +1 -1
- package/dist/Checkbox.d.ts +1 -1
- package/dist/Checkbox.js +4 -4
- package/dist/CheckboxGroup.js +3 -3
- package/dist/Combobox.d.ts +2 -2
- package/dist/Combobox.js +10 -7
- package/dist/Dialog.js +6 -4
- package/dist/Field.js +2 -2
- package/dist/IconButton.js +3 -2
- package/dist/Input.d.ts +1 -1
- package/dist/Input.js +3 -3
- package/dist/Link.js +1 -1
- package/dist/Menu.d.ts +2 -2
- package/dist/Menu.js +9 -5
- package/dist/Pagination.js +1 -1
- package/dist/Popover.d.ts +1 -1
- package/dist/Popover.js +7 -4
- package/dist/Progress.js +1 -1
- package/dist/Radio.d.ts +1 -1
- package/dist/Radio.js +4 -4
- package/dist/RadioGroup.js +3 -3
- package/dist/Select.d.ts +2 -2
- package/dist/Select.js +11 -7
- package/dist/Separator.js +1 -1
- package/dist/Skeleton.js +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Switch.js +2 -2
- package/dist/Table.js +1 -1
- package/dist/Tabs.d.ts +1 -1
- package/dist/Tabs.js +2 -2
- package/dist/Tag.d.ts +1 -1
- package/dist/Tag.js +2 -2
- package/dist/Textarea.js +3 -3
- package/dist/Toast.js +6 -4
- package/dist/Tooltip.d.ts +1 -1
- package/dist/Tooltip.js +7 -4
- package/dist/Typography.js +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/{listbox.d.ts → components/ListBoxNodes.d.ts} +1 -1
- package/dist/{listbox.js → components/ListBoxNodes.js} +3 -3
- package/dist/components/OverlayPortal.js +21 -0
- package/dist/{alert-style.js → constants/alertClass.js} +2 -16
- package/dist/{choice-style.js → constants/choiceClass.js} +1 -1
- package/dist/{input-style.d.ts → constants/inputClass.d.ts} +1 -1
- package/dist/{input-style.js → constants/inputClass.js} +1 -1
- package/dist/{list-style.js → constants/listClass.js} +2 -2
- package/dist/{overlay-style.js → constants/overlayClass.js} +1 -1
- package/dist/constants/pressableClass.js +33 -0
- package/dist/{choice-group.js → hooks/useChoiceGroup.js} +2 -2
- package/dist/hooks/useCloseOnTab.js +29 -0
- package/dist/{field-context.js → hooks/useFieldControl.js} +1 -1
- package/dist/hooks/useOverlayPresence.js +46 -0
- package/dist/hooks/useOverlayTheme.js +20 -0
- package/dist/hooks/usePopoverOverlay.js +25 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/libs/alertStatusIcon.js +17 -0
- package/dist/{cn.js → libs/cn.js} +1 -1
- package/dist/{list-collection.js → libs/listCollection.js} +1 -1
- package/dist/{overlay.d.ts → libs/overlayPosition.d.ts} +0 -1
- package/dist/libs/overlayPosition.js +20 -0
- package/dist/libs/pressableState.js +43 -0
- package/dist/{render.js → libs/renderElement.js} +1 -1
- package/package.json +3 -3
- package/dist/overlay.js +0 -130
- package/dist/pressable.js +0 -70
- /package/dist/{choice-style.d.ts → constants/choiceClass.d.ts} +0 -0
- /package/dist/{cn.d.ts → libs/cn.d.ts} +0 -0
- /package/dist/{list-collection.d.ts → libs/listCollection.d.ts} +0 -0
package/dist/Accordion.js
CHANGED
package/dist/Alert.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { alertCloseClass, alertContentClass, alertDescriptionClass, alertIconClass, alertLayoutClass,
|
|
2
|
-
import {
|
|
1
|
+
import { alertCloseClass, alertContentClass, alertDescriptionClass, alertIconClass, alertLayoutClass, alertSubtleCloseClass, alertSurfaceClass, alertTitleClass } from "./constants/alertClass.js";
|
|
2
|
+
import { alertStatusIcon } from "./libs/alertStatusIcon.js";
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
3
4
|
import { IconButton } from "./IconButton.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { XIcon } from "@tide-design/icons";
|
package/dist/Avatar.js
CHANGED
package/dist/Badge.js
CHANGED
package/dist/Breadcrumb.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from "./cn.js";
|
|
2
|
-
import { renderElement } from "./
|
|
1
|
+
import { cn } from "./libs/cn.js";
|
|
2
|
+
import { renderElement } from "./libs/renderElement.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { ChevronRightIcon } from "@tide-design/icons";
|
|
5
5
|
|
package/dist/Button.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { pressableBaseClass
|
|
4
|
-
import {
|
|
3
|
+
import { pressableBaseClass } from "./constants/pressableClass.js";
|
|
4
|
+
import { pressableState } from "./libs/pressableState.js";
|
|
5
|
+
import { renderElement } from "./libs/renderElement.js";
|
|
5
6
|
import { Spinner } from "./Spinner.js";
|
|
6
7
|
import { VisuallyHidden } from "./VisuallyHidden.js";
|
|
7
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/Card.js
CHANGED
package/dist/Checkbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChoiceSize } from "./
|
|
1
|
+
import { ChoiceSize } from "./constants/choiceClass.js";
|
|
2
2
|
import { Role } from "./types.js";
|
|
3
3
|
import { CSSProperties, ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
4
|
export interface CheckboxProps extends Omit<ComponentProps<"input">, "type" | "size" | "color" | "children" | "className" | "style"> {
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { CheckboxGroupContext } from "./
|
|
4
|
-
import { choiceAreaClass, choiceInputClass, choiceMarkClass, choiceRootClass, choiceTextClass } from "./
|
|
5
|
-
import { cn } from "./cn.js";
|
|
6
|
-
import { useFieldControl } from "./
|
|
3
|
+
import { CheckboxGroupContext } from "./hooks/useChoiceGroup.js";
|
|
4
|
+
import { choiceAreaClass, choiceInputClass, choiceMarkClass, choiceRootClass, choiceTextClass } from "./constants/choiceClass.js";
|
|
5
|
+
import { cn } from "./libs/cn.js";
|
|
6
|
+
import { useFieldControl } from "./hooks/useFieldControl.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { use, useImperativeHandle, useLayoutEffect, useRef } from "react";
|
|
9
9
|
import { CheckIcon, MinusIcon } from "@tide-design/icons";
|
package/dist/CheckboxGroup.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { CheckboxGroupContext, useChoiceGroup } from "./
|
|
4
|
-
import { cn } from "./cn.js";
|
|
5
|
-
import { FieldContext } from "./
|
|
3
|
+
import { CheckboxGroupContext, useChoiceGroup } from "./hooks/useChoiceGroup.js";
|
|
4
|
+
import { cn } from "./libs/cn.js";
|
|
5
|
+
import { FieldContext } from "./hooks/useFieldControl.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
// src/CheckboxGroup.tsx
|
package/dist/Combobox.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputSize } from "./
|
|
2
|
-
import { ListBoxOptionProps, ListBoxSectionProps } from "./
|
|
1
|
+
import { InputSize } from "./constants/inputClass.js";
|
|
2
|
+
import { ListBoxOptionProps, ListBoxSectionProps } from "./components/ListBoxNodes.js";
|
|
3
3
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
4
|
export interface ComboboxProps extends Omit<ComponentProps<"input">, "value" | "defaultValue" | "onChange" | "type" | "size" | "children" | "name" | "form" | "list"> {
|
|
5
5
|
/** 고른 값(제어). 고른 옵션의 `value`다. `null`이면 아무것도 고르지 않은 상태다. 주면 `onValueChange`로 바꾼다. */
|
package/dist/Combobox.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { FieldContext, useFieldControl } from "./
|
|
5
|
-
import { inputBaseClass, inputSizeClass } from "./
|
|
6
|
-
import { asCollectionComponent, resolveCollectionChildren, sectionCollectionNode, valueItemCollectionNode } from "./
|
|
7
|
-
import { listPopupClass } from "./
|
|
8
|
-
import { ListBoxNodes } from "./
|
|
9
|
-
import { OverlayPortal
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { FieldContext, useFieldControl } from "./hooks/useFieldControl.js";
|
|
5
|
+
import { inputBaseClass, inputSizeClass } from "./constants/inputClass.js";
|
|
6
|
+
import { asCollectionComponent, resolveCollectionChildren, sectionCollectionNode, valueItemCollectionNode } from "./libs/listCollection.js";
|
|
7
|
+
import { listPopupClass } from "./constants/listClass.js";
|
|
8
|
+
import { ListBoxNodes } from "./components/ListBoxNodes.js";
|
|
9
|
+
import { OverlayPortal } from "./components/OverlayPortal.js";
|
|
10
|
+
import { useOverlayPresence } from "./hooks/useOverlayPresence.js";
|
|
11
|
+
import { useOverlayTheme } from "./hooks/useOverlayTheme.js";
|
|
12
|
+
import { usePopoverOverlay } from "./hooks/usePopoverOverlay.js";
|
|
10
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
14
|
import { use, useLayoutEffect, useMemo, useRef } from "react";
|
|
12
15
|
import { ChevronDownIcon } from "@tide-design/icons";
|
package/dist/Dialog.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
4
|
import { IconButton } from "./IconButton.js";
|
|
5
|
-
import { OverlayPortal
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { OverlayPortal } from "./components/OverlayPortal.js";
|
|
6
|
+
import { useOverlayPresence } from "./hooks/useOverlayPresence.js";
|
|
7
|
+
import { useOverlayTheme } from "./hooks/useOverlayTheme.js";
|
|
8
|
+
import { backdropMotionClass, dialogMotionClass, dialogSurfaceClass } from "./constants/overlayClass.js";
|
|
9
|
+
import { renderElement } from "./libs/renderElement.js";
|
|
8
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
11
|
import { createContext, createElement, use, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
10
12
|
import { XIcon } from "@tide-design/icons";
|
package/dist/Field.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from "./cn.js";
|
|
2
|
-
import { FieldContext } from "./
|
|
1
|
+
import { cn } from "./libs/cn.js";
|
|
2
|
+
import { FieldContext } from "./hooks/useFieldControl.js";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { useId } from "react";
|
|
5
5
|
import { CircleExclamationPointIcon } from "@tide-design/icons";
|
package/dist/IconButton.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { pressableBaseClass
|
|
4
|
-
import {
|
|
3
|
+
import { pressableBaseClass } from "./constants/pressableClass.js";
|
|
4
|
+
import { pressableState } from "./libs/pressableState.js";
|
|
5
|
+
import { renderElement } from "./libs/renderElement.js";
|
|
5
6
|
import { Spinner } from "./Spinner.js";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
|
package/dist/Input.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputSize } from "./
|
|
1
|
+
import { InputSize } from "./constants/inputClass.js";
|
|
2
2
|
import { ComponentProps, ReactElement } from "react";
|
|
3
3
|
export interface InputProps extends Omit<ComponentProps<"input">, "size"> {
|
|
4
4
|
/** 높이 `sm` 32px, `md` 40px, `lg` 48px. 같은 size의 Button과 높이가 같다. 기본값은 `md`다. */
|
package/dist/Input.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { useFieldControl } from "./
|
|
5
|
-
import { inputBaseClass, inputSizeClass } from "./
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { useFieldControl } from "./hooks/useFieldControl.js";
|
|
5
|
+
import { inputBaseClass, inputSizeClass } from "./constants/inputClass.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
// src/Input.tsx
|
package/dist/Link.js
CHANGED
package/dist/Menu.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CollectionItemProps, CollectionSectionProps } from "./
|
|
2
|
-
import { OverlayPlacement } from "./
|
|
1
|
+
import { CollectionItemProps, CollectionSectionProps } from "./libs/listCollection.js";
|
|
2
|
+
import { OverlayPlacement } from "./libs/overlayPosition.js";
|
|
3
3
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
4
|
/** Menu 목록의 위치. 앞은 트리거의 어느 쪽, 뒤는 그 변에서 맞출 끝이다. 공간이 모자라면 반대쪽으로 뒤집힌다. */
|
|
5
5
|
export type MenuPlacement = OverlayPlacement;
|
package/dist/Menu.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { asCollectionComponent, itemCollectionNode, resolveCollectionChildren, sectionCollectionNode } from "./
|
|
5
|
-
import { listHeadingClass, listItemClass, listPopupClass, listSeparatorClass } from "./
|
|
6
|
-
import { OverlayPortal
|
|
7
|
-
import {
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { asCollectionComponent, itemCollectionNode, resolveCollectionChildren, sectionCollectionNode } from "./libs/listCollection.js";
|
|
5
|
+
import { listHeadingClass, listItemClass, listPopupClass, listSeparatorClass } from "./constants/listClass.js";
|
|
6
|
+
import { OverlayPortal } from "./components/OverlayPortal.js";
|
|
7
|
+
import { useCloseOnTab } from "./hooks/useCloseOnTab.js";
|
|
8
|
+
import { useOverlayPresence } from "./hooks/useOverlayPresence.js";
|
|
9
|
+
import { useOverlayTheme } from "./hooks/useOverlayTheme.js";
|
|
10
|
+
import { usePopoverOverlay } from "./hooks/usePopoverOverlay.js";
|
|
11
|
+
import { renderElement } from "./libs/renderElement.js";
|
|
8
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
13
|
import { createContext, createElement, use, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
10
14
|
import { mergeProps, mergeRefs, useMenu, useMenuItem, useMenuSection, useMenuTrigger, usePress } from "react-aria";
|
package/dist/Pagination.js
CHANGED
package/dist/Popover.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OverlayPlacement } from "./
|
|
1
|
+
import { OverlayPlacement } from "./libs/overlayPosition.js";
|
|
2
2
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
3
3
|
/** Popover 내용의 위치. 앞은 트리거의 어느 쪽, 뒤는 그 변에서 맞출 끝이다. 공간이 모자라면 반대쪽으로 뒤집힌다. */
|
|
4
4
|
export type PopoverPlacement = OverlayPlacement;
|
package/dist/Popover.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { OverlayPortal
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { OverlayPortal } from "./components/OverlayPortal.js";
|
|
5
|
+
import { useOverlayPresence } from "./hooks/useOverlayPresence.js";
|
|
6
|
+
import { useOverlayTheme } from "./hooks/useOverlayTheme.js";
|
|
7
|
+
import { usePopoverOverlay } from "./hooks/usePopoverOverlay.js";
|
|
8
|
+
import { overlaySurfaceClass, popoverMotionClass } from "./constants/overlayClass.js";
|
|
9
|
+
import { renderElement } from "./libs/renderElement.js";
|
|
7
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
11
|
import { createContext, createElement, use, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
12
|
import { DismissButton, mergeProps, mergeRefs, useDialog, useOverlayTrigger, usePress } from "react-aria";
|
package/dist/Progress.js
CHANGED
package/dist/Radio.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChoiceSize } from "./
|
|
1
|
+
import { ChoiceSize } from "./constants/choiceClass.js";
|
|
2
2
|
import { Role } from "./types.js";
|
|
3
3
|
import { CSSProperties, ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
4
|
export interface RadioProps extends Omit<ComponentProps<"input">, "type" | "size" | "color" | "children" | "className" | "style" | "value"> {
|
package/dist/Radio.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { RadioGroupContext } from "./
|
|
4
|
-
import { choiceAreaClass, choiceInputClass, choiceMarkClass, choiceRootClass, choiceTextClass } from "./
|
|
5
|
-
import { cn } from "./cn.js";
|
|
6
|
-
import { useFieldControl } from "./
|
|
3
|
+
import { RadioGroupContext } from "./hooks/useChoiceGroup.js";
|
|
4
|
+
import { choiceAreaClass, choiceInputClass, choiceMarkClass, choiceRootClass, choiceTextClass } from "./constants/choiceClass.js";
|
|
5
|
+
import { cn } from "./libs/cn.js";
|
|
6
|
+
import { useFieldControl } from "./hooks/useFieldControl.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { use } from "react";
|
|
9
9
|
import { CircleIcon } from "@tide-design/icons";
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { orientationClass } from "./CheckboxGroup.js";
|
|
4
|
-
import { RadioGroupContext, useChoiceGroup } from "./
|
|
5
|
-
import { cn } from "./cn.js";
|
|
6
|
-
import { FieldContext } from "./
|
|
4
|
+
import { RadioGroupContext, useChoiceGroup } from "./hooks/useChoiceGroup.js";
|
|
5
|
+
import { cn } from "./libs/cn.js";
|
|
6
|
+
import { FieldContext } from "./hooks/useFieldControl.js";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { useId } from "react";
|
|
9
9
|
|
package/dist/Select.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputSize } from "./
|
|
2
|
-
import { ListBoxOptionProps, ListBoxSectionProps } from "./
|
|
1
|
+
import { InputSize } from "./constants/inputClass.js";
|
|
2
|
+
import { ListBoxOptionProps, ListBoxSectionProps } from "./components/ListBoxNodes.js";
|
|
3
3
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
4
|
export interface SelectProps extends Omit<ComponentProps<"button">, "value" | "defaultValue" | "onChange" | "type" | "size" | "children" | "name" | "form"> {
|
|
5
5
|
/** 고른 값(제어). 고른 옵션의 `value`다. `null`이면 아무것도 고르지 않은 상태다. 주면 `onValueChange`로 바꾼다. */
|
package/dist/Select.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { FieldContext, useFieldControl } from "./
|
|
5
|
-
import { inputBaseClass, inputSizeClass } from "./
|
|
6
|
-
import { asCollectionComponent, resolveCollectionChildren, sectionCollectionNode, valueItemCollectionNode } from "./
|
|
7
|
-
import { listPopupClass } from "./
|
|
8
|
-
import { ListBoxNodes } from "./
|
|
9
|
-
import { OverlayPortal
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { FieldContext, useFieldControl } from "./hooks/useFieldControl.js";
|
|
5
|
+
import { inputBaseClass, inputSizeClass } from "./constants/inputClass.js";
|
|
6
|
+
import { asCollectionComponent, resolveCollectionChildren, sectionCollectionNode, valueItemCollectionNode } from "./libs/listCollection.js";
|
|
7
|
+
import { listPopupClass } from "./constants/listClass.js";
|
|
8
|
+
import { ListBoxNodes } from "./components/ListBoxNodes.js";
|
|
9
|
+
import { OverlayPortal } from "./components/OverlayPortal.js";
|
|
10
|
+
import { useCloseOnTab } from "./hooks/useCloseOnTab.js";
|
|
11
|
+
import { useOverlayPresence } from "./hooks/useOverlayPresence.js";
|
|
12
|
+
import { useOverlayTheme } from "./hooks/useOverlayTheme.js";
|
|
13
|
+
import { usePopoverOverlay } from "./hooks/usePopoverOverlay.js";
|
|
10
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
15
|
import { use, useLayoutEffect, useMemo, useRef } from "react";
|
|
12
16
|
import { ChevronDownIcon } from "@tide-design/icons";
|
package/dist/Separator.js
CHANGED
package/dist/Skeleton.js
CHANGED
package/dist/Spinner.js
CHANGED
package/dist/Switch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { useFieldControl } from "./
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { useFieldControl } from "./hooks/useFieldControl.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
// src/Switch.tsx
|
package/dist/Table.js
CHANGED
package/dist/Tabs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionValueItemProps } from "./
|
|
1
|
+
import { CollectionValueItemProps } from "./libs/listCollection.js";
|
|
2
2
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
3
3
|
/** 탭 목록의 방향. 세로면 ↓↑로 옮기고 탭 목록이 패널의 시작쪽에 선다. */
|
|
4
4
|
export type TabsOrientation = "horizontal" | "vertical";
|
package/dist/Tabs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { asCollectionComponent, resolveCollectionChildren, valueItemCollectionNode } from "./
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { asCollectionComponent, resolveCollectionChildren, valueItemCollectionNode } from "./libs/listCollection.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { createContext, isValidElement, use, useCallback, useId, useMemo, useRef, useState } from "react";
|
|
7
7
|
import { mergeProps, mergeRefs, useTab, useTabList } from "react-aria";
|
package/dist/Tag.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionValueItemProps } from "./
|
|
1
|
+
import { CollectionValueItemProps } from "./libs/listCollection.js";
|
|
2
2
|
import { ColorFamilyName } from "./types.js";
|
|
3
3
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
4
|
type TagGroupNameProps = {
|
package/dist/Tag.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
4
|
import { IconButton } from "./IconButton.js";
|
|
5
|
-
import { asCollectionComponent, resolveCollectionChildren, valueItemCollectionNode } from "./
|
|
5
|
+
import { asCollectionComponent, resolveCollectionChildren, valueItemCollectionNode } from "./libs/listCollection.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { createContext, use, useMemo, useRef } from "react";
|
|
8
8
|
import { XIcon } from "@tide-design/icons";
|
package/dist/Textarea.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { useFieldControl } from "./
|
|
5
|
-
import { inputBaseClass } from "./
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { useFieldControl } from "./hooks/useFieldControl.js";
|
|
5
|
+
import { inputBaseClass } from "./constants/inputClass.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
// src/Textarea.tsx
|
package/dist/Toast.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { alertCloseClass, alertContentClass, alertDescriptionClass, alertIconClass, alertLayoutClass,
|
|
3
|
+
import { alertCloseClass, alertContentClass, alertDescriptionClass, alertIconClass, alertLayoutClass, alertTitleClass } from "./constants/alertClass.js";
|
|
4
|
+
import { alertStatusIcon } from "./libs/alertStatusIcon.js";
|
|
4
5
|
import { Button } from "./Button.js";
|
|
5
|
-
import { cn } from "./cn.js";
|
|
6
|
+
import { cn } from "./libs/cn.js";
|
|
6
7
|
import { IconButton } from "./IconButton.js";
|
|
7
|
-
import { OverlayPortal
|
|
8
|
-
import {
|
|
8
|
+
import { OverlayPortal } from "./components/OverlayPortal.js";
|
|
9
|
+
import { useOverlayPresence } from "./hooks/useOverlayPresence.js";
|
|
10
|
+
import { overlaySurfaceClass, popoverMotionClass } from "./constants/overlayClass.js";
|
|
9
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
12
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
11
13
|
import { XIcon } from "@tide-design/icons";
|
package/dist/Tooltip.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OverlayPlacement } from "./
|
|
1
|
+
import { OverlayPlacement } from "./libs/overlayPosition.js";
|
|
2
2
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
3
3
|
/** Tooltip 설명의 위치. 앞은 트리거의 어느 쪽, 뒤는 그 변에서 맞출 끝이다. 공간이 모자라면 반대쪽으로 뒤집힌다. */
|
|
4
4
|
export type TooltipPlacement = OverlayPlacement;
|
package/dist/Tooltip.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "./cn.js";
|
|
4
|
-
import { OverlayPortal
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { cn } from "./libs/cn.js";
|
|
4
|
+
import { OverlayPortal } from "./components/OverlayPortal.js";
|
|
5
|
+
import { overlayPositionProps } from "./libs/overlayPosition.js";
|
|
6
|
+
import { useOverlayPresence } from "./hooks/useOverlayPresence.js";
|
|
7
|
+
import { useOverlayTheme } from "./hooks/useOverlayTheme.js";
|
|
8
|
+
import { frequentMotionClass, overlaySurfaceClass } from "./constants/overlayClass.js";
|
|
9
|
+
import { renderElement } from "./libs/renderElement.js";
|
|
7
10
|
import { jsx } from "react/jsx-runtime";
|
|
8
11
|
import { createContext, createElement, use, useMemo, useRef } from "react";
|
|
9
12
|
import { mergeProps, mergeRefs, useOverlayPosition, useTooltip, useTooltipTrigger } from "react-aria";
|
package/dist/Typography.js
CHANGED
package/dist/VisuallyHidden.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionSectionProps, CollectionValueItemProps } from "
|
|
1
|
+
import { CollectionSectionProps, CollectionValueItemProps } from "../libs/listCollection.js";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
import "react-stately";
|
|
4
4
|
/** 옵션 Component(Select·Combobox 옵션)의 props. 옵션 요소는 `<div role="option">`이다. */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import { listHeadingClass, listItemClass, listSeparatorClass } from "
|
|
3
|
+
import { cn } from "../libs/cn.js";
|
|
4
|
+
import { listHeadingClass, listItemClass, listSeparatorClass } from "../constants/listClass.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useMemo, useRef } from "react";
|
|
7
7
|
import { CheckIcon } from "@tide-design/icons";
|
|
8
8
|
import { mergeProps, mergeRefs, useListBoxSection, useOption } from "react-aria";
|
|
9
9
|
|
|
10
|
-
// src/
|
|
10
|
+
// src/components/ListBoxNodes.tsx
|
|
11
11
|
/**
|
|
12
12
|
* 고른 옵션 끝의 체크 아이콘. 장식용이다(선택은 `aria-selected`가 알린다). 배경(subtle-active)이 지워지는 고대비
|
|
13
13
|
* 모드에서도 고른 옵션이 보이게 한다. 글자와의 간격은 항목의 gap(8px)이고 `ms-auto`로 오른쪽 끝에 붙는다.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Overlay } from "react-aria";
|
|
5
|
+
|
|
6
|
+
// src/components/OverlayPortal.tsx
|
|
7
|
+
/**
|
|
8
|
+
* 오버레이를 `document.body`에 portal한다(React Aria `Overlay`). top-layer(`<dialog>`, popover API)는 쓰지 않는다.
|
|
9
|
+
* 안을 `FocusScope`(`restoreFocus`)로 감싸서, DOM에서 빠질 때 포커스가 열기 전 요소(보통 트리거)로 돌아간다.
|
|
10
|
+
* 역할 hook이 포커스 가두기를 요청하면(`useDialog` 등) Tab이 안에서 돈다. 서버 렌더에서는 아무것도 그리지 않는다.
|
|
11
|
+
* `focusManagement={false}`면 FocusScope 없이 portal만 한다(Tooltip).
|
|
12
|
+
*/
|
|
13
|
+
function OverlayPortal({ isExiting, focusManagement = true, children }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Overlay, {
|
|
15
|
+
isExiting,
|
|
16
|
+
disableFocusManagement: !focusManagement,
|
|
17
|
+
children
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { OverlayPortal };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// src/alert-style.ts
|
|
1
|
+
// src/constants/alertClass.ts
|
|
4
2
|
/**
|
|
5
3
|
* 배치. 아이콘·내용·닫기 버튼을 한 줄로 놓고 위에 맞춘다. 여백은 16px, radius는 담는 요소의 lg다(spec radius 「쓰는 곳」).
|
|
6
4
|
* border 1px는 항상 둔다. forced-colors에서 브라우저가 경계를 CanvasText로 덮어 배경 없이도 영역이 남는다.
|
|
@@ -29,17 +27,5 @@ const alertCloseClass = "-my-0.5 -me-1";
|
|
|
29
27
|
* (on-subtle × subtle 4.5:1, × subtle-hover·subtle-active 4:1 등록, ADR 0022·0023).
|
|
30
28
|
*/
|
|
31
29
|
const alertSubtleCloseClass = "text-accent-on-subtle hover:bg-accent-subtle-hover active:bg-accent-subtle-active";
|
|
32
|
-
const statusIcons = {
|
|
33
|
-
neutral: InfoIcon,
|
|
34
|
-
primary: InfoIcon,
|
|
35
|
-
info: InfoIcon,
|
|
36
|
-
success: CircleCheckIcon,
|
|
37
|
-
warning: TriangleExclamationPointIcon,
|
|
38
|
-
danger: OctagonExclamationPointIcon
|
|
39
|
-
};
|
|
40
|
-
/** Role의 상태 아이콘. 앱이 더한 Role(예: `brand`)은 일반 알림으로 보고 i 아이콘을 쓴다. */
|
|
41
|
-
function alertStatusIcon(color) {
|
|
42
|
-
return Object.hasOwn(statusIcons, color) ? statusIcons[color] : InfoIcon;
|
|
43
|
-
}
|
|
44
30
|
|
|
45
|
-
export { alertCloseClass, alertContentClass, alertDescriptionClass, alertIconClass, alertLayoutClass,
|
|
31
|
+
export { alertCloseClass, alertContentClass, alertDescriptionClass, alertIconClass, alertLayoutClass, alertSubtleCloseClass, alertSurfaceClass, alertTitleClass };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/constants/choiceClass.ts
|
|
2
2
|
/** 루트 label. 글자 크기 class와 사용자 className은 뒤에 붙인다. */
|
|
3
3
|
const choiceRootClass = "group/choice inline-flex items-start gap-2 align-top text-default cursor-pointer has-disabled:cursor-not-allowed has-disabled:text-disabled";
|
|
4
4
|
/** 상자와 아이콘을 겹쳐 두는 24×24 조작 영역 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/constants/inputClass.ts
|
|
2
2
|
/** 입력창의 공통 모양. size class 뒤에 넣는다. */
|
|
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`다. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { frequentMotionClass, overlaySurfaceClass } from "./
|
|
1
|
+
import { frequentMotionClass, overlaySurfaceClass } from "./overlayClass.js";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/constants/listClass.ts
|
|
4
4
|
/**
|
|
5
5
|
* 목록 오버레이(Menu 목록, Select·Combobox 목록)의 루트. 요소에 `data-open`이 있어야 한다(`frequentMotionClass`).
|
|
6
6
|
*
|