@nurihaus/web-design-system 3.9.1 → 3.9.3
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/README.md +1 -1
- package/dist/.storybook/preview.d.ts +49 -0
- package/dist/ai/components.md +721 -111
- package/dist/ai/motion.md +156 -134
- package/dist/ai/tokens.md +295 -137
- package/dist/asset.js +328 -0
- package/dist/avatar.js +208 -33
- package/dist/bottom-nav.js +86 -6
- package/dist/breadcrumb.js +6 -3
- package/dist/card.js +5 -2
- package/dist/check-box.js +81 -45
- package/dist/chip-group.js +50 -12
- package/dist/chunk-1563.js +42 -18
- package/dist/chunk-1983.js +100 -0
- package/dist/chunk-3297.js +130 -0
- package/dist/chunk-3640.js +94 -0
- package/dist/chunk-3839.js +54 -0
- package/dist/chunk-4558.js +13 -2
- package/dist/chunk-4577.js +35 -0
- package/dist/chunk-5302.js +111 -0
- package/dist/{chunk-1657.js → chunk-5589.js} +41 -5
- package/dist/chunk-5670.js +122 -0
- package/dist/chunk-6302.js +10 -10
- package/dist/chunk-6706.js +64 -0
- package/dist/chunk-7302.js +66 -0
- package/dist/chunk-7460.js +204 -0
- package/dist/{chunk-6149.js → chunk-8377.js} +36 -2
- package/dist/chunk-8734.js +33 -0
- package/dist/chunk-8787.js +260 -0
- package/dist/chunk-8933.js +14 -2
- package/dist/chunk-910.js +82 -27
- package/dist/chunk-948.js +166 -0
- package/dist/collapsible-menu.js +109 -55
- package/dist/components/asset/asset-props.d.ts +43 -0
- package/dist/components/asset/asset-type.d.ts +38 -0
- package/dist/components/asset/asset.d.ts +21 -0
- package/dist/components/asset/asset.stories.d.ts +65 -0
- package/dist/components/asset/base-asset.d.ts +7 -0
- package/dist/components/avatar/avatar-props.d.ts +1 -0
- package/dist/components/avatar/avatar-type.d.ts +6 -4
- package/dist/components/avatar/avatar.stories.d.ts +10 -0
- package/dist/components/badge/badge-type.d.ts +10 -4
- package/dist/components/badge/badge.stories.d.ts +15 -0
- package/dist/components/bottom-bar/bottom-bar.stories.d.ts +14 -7
- package/dist/components/bottom-nav/bottom-nav-type.d.ts +2 -1
- package/dist/components/bottom-nav/bottom-nav.stories.d.ts +16 -1
- package/dist/components/breadcrumb/breadcrumb-type.d.ts +2 -1
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts +15 -0
- package/dist/components/button/button-appearance.d.ts +50 -0
- package/dist/components/button/button-props.d.ts +12 -3
- package/dist/components/button/button-type.d.ts +14 -4
- package/dist/components/button/button.stories.d.ts +34 -3
- package/dist/components/button/cta-button.d.ts +1 -1
- package/dist/components/callout/callout.stories.d.ts +11 -0
- package/dist/components/card/card-type.d.ts +2 -1
- package/dist/components/card/card.stories.d.ts +9 -0
- package/dist/components/check-box/check-box-props.d.ts +8 -0
- package/dist/components/check-box/check-box-type.d.ts +7 -3
- package/dist/components/check-box/check-box.stories.d.ts +32 -1
- package/dist/components/chip-group/chip-group-props.d.ts +13 -1
- package/dist/components/chip-group/chip-group-type.d.ts +5 -1
- package/dist/components/chip-group/chip-group.stories.d.ts +30 -0
- package/dist/components/collapsible-menu/collapsible-menu-type.d.ts +28 -2
- package/dist/components/collapsible-menu/collapsible-menu.d.ts +1 -1
- package/dist/components/collapsible-menu/collapsible-menu.stories.d.ts +14 -0
- package/dist/components/description-list/description-list.stories.d.ts +7 -0
- package/dist/components/drawer/base-drawer.d.ts +2 -4
- package/dist/components/drawer/drawer-type.d.ts +17 -2
- package/dist/components/drawer/drawer.stories.d.ts +21 -0
- package/dist/components/drop-down/drop-down-type.d.ts +4 -2
- package/dist/components/drop-down/drop-down.stories.d.ts +16 -0
- package/dist/components/elements/text/text-props.d.ts +3 -3
- package/dist/components/elements/text/text-type.d.ts +3 -2
- package/dist/components/elements/text/text.stories.d.ts +13 -1
- package/dist/components/empty-state/empty-state.stories.d.ts +37 -12
- package/dist/components/icon/icon.stories.d.ts +11 -1
- package/dist/components/icon-button/icon-button-type.d.ts +2 -1
- package/dist/components/icon-button/icon-button.stories.d.ts +9 -0
- package/dist/components/list/list-group.stories.d.ts +7 -0
- package/dist/components/list/list-row.stories.d.ts +20 -10
- package/dist/components/list/list-type.d.ts +2 -1
- package/dist/components/loading/index.d.ts +4 -0
- package/dist/components/loading/inline-loading/base-inline-loading.d.ts +3 -2
- package/dist/components/loading/inline-loading/inline-loading-props.d.ts +3 -0
- package/dist/components/loading/inline-loading/inline-loading-type.d.ts +6 -6
- package/dist/components/loading/inline-loading/inline-loading.stories.d.ts +28 -2
- package/dist/components/loading/loading-dots/base-loading-dots.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots-props.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots-type.d.ts +6 -0
- package/dist/components/loading/loading-dots/loading-dots.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots.stories.d.ts +37 -0
- package/dist/components/loading/loading-props.d.ts +9 -0
- package/dist/components/loading/loading-type.d.ts +9 -0
- package/dist/components/loading/loading.stories.d.ts +15 -0
- package/dist/components/loading/overlay-loading/overlay-loading-type.d.ts +4 -0
- package/dist/components/loading/overlay-loading/overlay-loading.stories.d.ts +17 -0
- package/dist/components/loading/progress-bar/base-progress-bar.d.ts +3 -0
- package/dist/components/loading/progress-bar/progress-bar-props.d.ts +4 -0
- package/dist/components/loading/progress-bar/progress-bar-type.d.ts +19 -0
- package/dist/components/loading/progress-bar/progress-bar.d.ts +4 -0
- package/dist/components/loading/progress-bar/progress-bar.stories.d.ts +63 -0
- package/dist/components/loading/spinner/spinner-props.d.ts +4 -1
- package/dist/components/loading/spinner/spinner-type.d.ts +3 -1
- package/dist/components/loading/spinner/spinner.d.ts +2 -1
- package/dist/components/loading/spinner/spinner.stories.d.ts +30 -4
- package/dist/components/logging/logging.stories.d.ts +5 -0
- package/dist/components/media/media-thumbnail.stories.d.ts +9 -0
- package/dist/components/media/media-type.d.ts +2 -1
- package/dist/components/media/media-viewer.stories.d.ts +7 -0
- package/dist/components/message/message.stories.d.ts +19 -12
- package/dist/components/message-composer/message-composer-type.d.ts +2 -1
- package/dist/components/message-composer/message-composer.stories.d.ts +10 -0
- package/dist/components/modal/modal-type.d.ts +22 -3
- package/dist/components/modal/modal-with-double-button.stories.d.ts +15 -0
- package/dist/components/modal/modal.stories.d.ts +16 -0
- package/dist/components/motion/motion.stories.d.ts +7 -0
- package/dist/components/notice/notice-type.d.ts +1 -1
- package/dist/components/notice/notice.stories.d.ts +16 -9
- package/dist/components/overlay/overlay-context.d.ts +34 -0
- package/dist/components/overlay/overlay-provider.d.ts +6 -0
- package/dist/components/overlay/overlay-type.d.ts +45 -0
- package/dist/components/overlay/overlay.d.ts +4 -0
- package/dist/components/overlay/overlay.stories.d.ts +34 -0
- package/dist/components/overlay/use-dialog.d.ts +3 -0
- package/dist/components/overlay/use-toast.d.ts +3 -0
- package/dist/components/pagination/pagination-type.d.ts +2 -1
- package/dist/components/pagination/pagination.stories.d.ts +15 -0
- package/dist/components/radio/base-radio.d.ts +5 -2
- package/dist/components/radio/radio-type.d.ts +11 -3
- package/dist/components/radio/radio.stories.d.ts +20 -2
- package/dist/components/skeleton/base-skeleton.d.ts +7 -3
- package/dist/components/skeleton/skeleton-group-props.d.ts +4 -0
- package/dist/components/skeleton/skeleton-group-type.d.ts +47 -0
- package/dist/components/skeleton/skeleton-group.d.ts +4 -0
- package/dist/components/skeleton/skeleton-group.stories.d.ts +57 -0
- package/dist/components/skeleton/skeleton-type.d.ts +1 -0
- package/dist/components/skeleton/skeleton.stories.d.ts +20 -9
- package/dist/components/step-progress/step-progress-props.d.ts +10 -0
- package/dist/components/step-progress/step-progress-type.d.ts +22 -3
- package/dist/components/step-progress/step-progress.d.ts +1 -1
- package/dist/components/step-progress/step-progress.stories.d.ts +40 -0
- package/dist/components/switch/base-switch.d.ts +2 -4
- package/dist/components/switch/switch-type.d.ts +5 -2
- package/dist/components/switch/switch.stories.d.ts +22 -0
- package/dist/components/table/table-props.d.ts +9 -0
- package/dist/components/table/table-type.d.ts +7 -1
- package/dist/components/table/table.stories.d.ts +46 -0
- package/dist/components/tabs/tabs-type.d.ts +4 -1
- package/dist/components/tabs/tabs.stories.d.ts +17 -0
- package/dist/components/tag/tag-type.d.ts +2 -1
- package/dist/components/tag/tag.stories.d.ts +9 -0
- package/dist/components/text-area/base-text-area.d.ts +2 -1
- package/dist/components/text-area/text-area-type.d.ts +11 -3
- package/dist/components/text-area/text-area.stories.d.ts +15 -0
- package/dist/components/text-field/base-text-field.d.ts +12 -6
- package/dist/components/text-field/text-field-type.d.ts +37 -6
- package/dist/components/text-field/text-field.stories.d.ts +32 -5
- package/dist/components/toast/toast-type.d.ts +4 -1
- package/dist/components/toast/toast.stories.d.ts +28 -13
- package/dist/components/tooltip/tooltip-type.d.ts +4 -1
- package/dist/components/tooltip/tooltip.stories.d.ts +11 -0
- package/dist/components.css +2005 -672
- package/dist/cta-button.js +94 -33
- package/dist/data-table.js +38 -5
- package/dist/drawer.js +79 -13
- package/dist/drop-down.js +18 -10
- package/dist/helpers/hooks/useCloseOnBackEvent.d.ts +12 -0
- package/dist/helpers/hooks/useFieldClear.d.ts +21 -0
- package/dist/helpers/hooks/useReturnFocus.d.ts +9 -0
- package/dist/helpers/motion/appear.d.ts +3 -0
- package/dist/helpers/motion/effects.d.ts +9 -0
- package/dist/helpers/motion/motion-props.d.ts +35 -0
- package/dist/helpers/motion/stagger.d.ts +3 -0
- package/dist/helpers/motion/use-appear.d.ts +12 -0
- package/dist/helpers/motion/use-attention-handle.d.ts +7 -0
- package/dist/helpers/motion/use-confirm-spring.d.ts +7 -0
- package/dist/helpers/motion/use-effect-trigger.d.ts +11 -0
- package/dist/helpers/motion/use-hide-on-scroll.d.ts +12 -0
- package/dist/helpers/motion/use-presence-callbacks.d.ts +13 -0
- package/dist/icon-button.js +4 -2
- package/dist/icon-text-badge.js +27 -17
- package/dist/icon-text-option-badge.js +19 -13
- package/dist/index.d.ts +11 -4
- package/dist/index.js +4074 -989
- package/dist/list-row.js +5 -2
- package/dist/loading.js +200 -39
- package/dist/media-thumbnail.js +9 -5
- package/dist/message-composer.js +15 -11
- package/dist/modal-with-double-button.js +71 -53
- package/dist/modal.js +95 -29
- package/dist/notice.js +14 -8
- package/dist/option-badge.js +27 -17
- package/dist/overlay.js +1213 -0
- package/dist/pagination.js +11 -7
- package/dist/radio.js +117 -21
- package/dist/reset.css +4 -0
- package/dist/skeleton-group.js +445 -0
- package/dist/skeleton.js +24 -112
- package/dist/step-progress.js +125 -16
- package/dist/styles.css +2309 -756
- package/dist/switch.js +89 -17
- package/dist/tabs.js +77 -23
- package/dist/tag.js +4 -2
- package/dist/text-area.js +81 -31
- package/dist/text-field.js +160 -33
- package/dist/toast.js +98 -241
- package/dist/tokens/generated/motion.d.ts +21 -4
- package/dist/tokens/generated/semantic-admin.d.ts +103 -46
- package/dist/tokens/generated/semantic-app.d.ts +164 -16
- package/dist/tokens.css +578 -103
- package/dist/tokens.js +293 -71
- package/dist/tooltip.js +50 -22
- package/package.json +14 -1
- package/dist/chunk-5226.js +0 -79
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
1
|
+
import { ChangeEvent, ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { TrackProps } from '../logging/logging-type';
|
|
3
3
|
import { sizes } from './text-field-props';
|
|
4
|
+
/** 값(raw)과 화면 글을 오가는 한 쌍. 값은 늘 raw 이고 input 에는 transform(raw) 가 보인다 */
|
|
5
|
+
export interface TextFieldFormat {
|
|
6
|
+
transform: (raw: string) => string;
|
|
7
|
+
/** 화면 글을 raw 로 되돌린다. 없으면 그대로 쓴다 */
|
|
8
|
+
reset?: (display: string) => string;
|
|
9
|
+
}
|
|
4
10
|
export interface TextFieldRootProps {
|
|
5
|
-
children:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/** raw 값. controlled·uncontrolled 는 조합형이 정한다 */
|
|
13
|
+
value: string;
|
|
14
|
+
format?: TextFieldFormat;
|
|
15
|
+
/** event.target.value 는 이미 raw 로 되돌려져 있다 */
|
|
16
|
+
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
9
17
|
}
|
|
10
18
|
export interface TextFieldLabelProps {
|
|
11
19
|
text: ReactNode;
|
|
@@ -17,15 +25,38 @@ export interface TextFieldInputProps extends Omit<ComponentPropsWithRef<'input'>
|
|
|
17
25
|
className?: string;
|
|
18
26
|
disabled?: boolean;
|
|
19
27
|
}
|
|
28
|
+
export type TextFieldPrefixProps = ComponentPropsWithRef<'span'>;
|
|
29
|
+
export type TextFieldSuffixProps = ComponentPropsWithRef<'span'>;
|
|
30
|
+
/** 입력 상자 안의 아이콘 버튼. 아이콘뿐이라 읽어 줄 이름이 꼭 있어야 한다 */
|
|
31
|
+
export interface TextFieldActionProps extends Omit<ComponentPropsWithRef<'button'>, 'aria-label' | 'type'> {
|
|
32
|
+
'aria-label': string;
|
|
33
|
+
}
|
|
34
|
+
/** 입력 상자 안 버튼 하나. 조합형이 이 목록을 한 번 만들고 순서대로 그린다 */
|
|
35
|
+
export interface TextFieldActionItem extends TextFieldActionProps {
|
|
36
|
+
id: 'clear' | 'password-toggle';
|
|
37
|
+
}
|
|
20
38
|
export interface TextFieldHelperTextProps {
|
|
21
39
|
text: ReactNode;
|
|
22
40
|
className?: string;
|
|
23
41
|
}
|
|
24
|
-
export interface TextFieldProps extends Omit<ComponentPropsWithRef<'input'>, 'title' | 'size'>, TrackProps {
|
|
42
|
+
export interface TextFieldProps extends Omit<ComponentPropsWithRef<'input'>, 'title' | 'size' | 'prefix'>, TrackProps {
|
|
25
43
|
size: (typeof sizes)[number];
|
|
26
44
|
width: number | string;
|
|
27
45
|
leftIcon?: ReactNode;
|
|
28
46
|
rightIcon?: ReactNode;
|
|
47
|
+
/** input 앞에 붙는 고정 글(단위·국가 번호 등). leftIcon 뒤에 온다 */
|
|
48
|
+
prefix?: ReactNode;
|
|
49
|
+
/** input 뒤에 붙는 고정 글. 버튼과 rightIcon 앞에 온다 */
|
|
50
|
+
suffix?: ReactNode;
|
|
51
|
+
/** 값(raw)을 화면 글로 바꾼다. value·defaultValue·onChange 는 raw 를 주고받는다 */
|
|
52
|
+
format?: TextFieldFormat;
|
|
53
|
+
/** 값이 있고 포커스가 안에 있으면 지우기 버튼(X)을 띄운다 */
|
|
54
|
+
clearable?: boolean;
|
|
55
|
+
/** 지우기 버튼으로 지운 뒤 불린다. onChange 는 그 앞에 '' 로 불린다 */
|
|
56
|
+
onClear?: () => void;
|
|
57
|
+
/** type='password' 일 때 보기·숨기기 버튼을 붙인다 */
|
|
58
|
+
passwordToggle?: boolean;
|
|
59
|
+
onVisibilityChange?: (visible: boolean) => void;
|
|
29
60
|
name: string;
|
|
30
61
|
title?: ReactNode;
|
|
31
62
|
helperText?: ReactNode;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
4
11
|
component: import("react").ForwardRefExoticComponent<Omit<import("./text-field-type").TextFieldProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
size: {
|
|
7
|
-
control:
|
|
8
|
-
type: "select";
|
|
9
|
-
};
|
|
14
|
+
control: "inline-radio";
|
|
10
15
|
options: readonly ["xs", "s", "m", "l", "xl"];
|
|
11
16
|
};
|
|
12
17
|
};
|
|
@@ -18,7 +23,29 @@ declare const meta: {
|
|
|
18
23
|
};
|
|
19
24
|
export default meta;
|
|
20
25
|
type Story = StoryObj<typeof meta>;
|
|
26
|
+
/** 라벨, 자리 글자, 안내 문구를 단 기본 입력 상자다. */
|
|
21
27
|
export declare const Default: Story;
|
|
28
|
+
/** xs·s·m·l·xl 다섯 크기다. 높이와 좌우 여백·글자가 버튼과 같은 단계로 바뀐다. 아이콘도 크기에 맞춘다. */
|
|
22
29
|
export declare const Sizes: Story;
|
|
23
|
-
|
|
24
|
-
export declare const
|
|
30
|
+
/** 좌우 아이콘은 무엇을 넣는 칸인지 알려 준다. 오른쪽에는 단위 같은 글자도 넣을 수 있다. */
|
|
31
|
+
export declare const WithIcons: Story;
|
|
32
|
+
/** type 과 inputMode 는 input 에 그대로 간다. 휴대폰에서는 맞는 자판이 뜬다. */
|
|
33
|
+
export declare const InputTypes: Story;
|
|
34
|
+
/** helperText 는 회색 안내 문구다. isError 면 테두리와 문구가 빨개지고 input 에 aria-invalid 가 붙는다. */
|
|
35
|
+
export declare const HelperAndError: Story;
|
|
36
|
+
/** 글자 수는 value 로 제어하고 helperText 에 적는다. maxLength 는 input 에 그대로 간다. */
|
|
37
|
+
export declare const CharacterCount: Story;
|
|
38
|
+
/** format 은 값(raw)과 화면 글을 오간다. 숫자만 값으로 들고 화면에는 010-1234-5678 처럼 보인다. 아래 글은 실제 값이다. */
|
|
39
|
+
export declare const Format: Story;
|
|
40
|
+
/** clearable 이면 값이 있고 포커스가 안에 있을 때 오른쪽에 지우기 버튼이 뜬다. 눌러도 포커스는 input 에 남는다. */
|
|
41
|
+
export declare const Clearable: Story;
|
|
42
|
+
/** type='password' 에 passwordToggle 을 주면 보기·숨기기 버튼이 붙는다. 보는 동안은 눈 아이콘이 채워진다. */
|
|
43
|
+
export declare const PasswordToggle: Story;
|
|
44
|
+
/** prefix·suffix 는 input 안쪽 앞뒤에 붙는 고정 글이다. 입력값에는 들어가지 않는다. */
|
|
45
|
+
export declare const PrefixSuffix: Story;
|
|
46
|
+
/** 폭은 width 로 정한다. 숫자는 px, 문자열은 그대로 쓴다. */
|
|
47
|
+
export declare const Widths: Story;
|
|
48
|
+
/** disabled 는 회색 바탕에 입력할 수 없고, readOnly 는 모양은 그대로 두고 고칠 수만 없다. */
|
|
49
|
+
export declare const DisabledAndReadOnly: Story;
|
|
50
|
+
/** 실제 화면처럼 카드 안에서 쓴 모습이다. 라벨, 입력, 안내 문구가 같은 간격으로 쌓인다. */
|
|
51
|
+
export declare const InForm: Story;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { PresenceCallbackProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { TrackProps } from '../logging/logging-type';
|
|
4
5
|
import { positions, variants } from './toast-props';
|
|
@@ -9,6 +10,8 @@ export interface ToastProviderProps {
|
|
|
9
10
|
position?: (typeof positions)[number];
|
|
10
11
|
/** 스크린 리더가 읽는 이름. 토스트마다 "{label}", 토스트 영역은 "{label} (F8)". 기본 '알림' */
|
|
11
12
|
label?: string;
|
|
13
|
+
/** 토스트 자리(Viewport)를 그릴 요소. 없으면 Provider 가 놓인 자리에 그린다 */
|
|
14
|
+
portalContainer?: HTMLElement;
|
|
12
15
|
}
|
|
13
16
|
export interface ToastViewportProps extends ComponentPropsWithRef<'ol'> {
|
|
14
17
|
position?: (typeof positions)[number];
|
|
@@ -37,7 +40,7 @@ export interface ToastAction {
|
|
|
37
40
|
onClick: () => void;
|
|
38
41
|
altText: string;
|
|
39
42
|
}
|
|
40
|
-
export interface ToastProps extends Omit<ToastRootProps, 'children' | keyof StyleProps>, StyleProps, TrackProps {
|
|
43
|
+
export interface ToastProps extends Omit<ToastRootProps, 'children' | keyof StyleProps>, StyleProps, TrackProps, PresenceCallbackProps {
|
|
41
44
|
title: ReactNode;
|
|
42
45
|
description?: ReactNode;
|
|
43
46
|
variant?: (typeof variants)[number];
|
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { variants } from './toast-props';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
5
12
|
component: import("react").ForwardRefExoticComponent<Omit<import("./toast-type").ToastProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
6
13
|
argTypes: {
|
|
7
14
|
variant: {
|
|
@@ -17,21 +24,11 @@ declare const meta: {
|
|
|
17
24
|
variant: "default";
|
|
18
25
|
};
|
|
19
26
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
20
|
-
|
|
21
|
-
description?: import("react").ReactNode;
|
|
22
|
-
open?: boolean | undefined;
|
|
23
|
-
defaultOpen?: boolean | undefined;
|
|
24
|
-
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
25
|
-
className?: string | undefined;
|
|
27
|
+
slot?: string | undefined | undefined;
|
|
26
28
|
style?: import("react").CSSProperties | undefined;
|
|
29
|
+
title: import("react").ReactNode;
|
|
27
30
|
track?: string | undefined;
|
|
28
|
-
trackProps?: Record<string, string | number | boolean> | undefined;
|
|
29
31
|
key?: import("react").Key | null | undefined;
|
|
30
|
-
color?: string | undefined | undefined;
|
|
31
|
-
content?: string | undefined | undefined;
|
|
32
|
-
translate?: "yes" | "no" | undefined | undefined;
|
|
33
|
-
slot?: string | undefined | undefined;
|
|
34
|
-
value?: string | number | readonly string[] | undefined;
|
|
35
32
|
defaultChecked?: boolean | undefined | undefined;
|
|
36
33
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
37
34
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -39,6 +36,7 @@ declare const meta: {
|
|
|
39
36
|
accessKey?: string | undefined | undefined;
|
|
40
37
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
41
38
|
autoFocus?: boolean | undefined | undefined;
|
|
39
|
+
className?: string | undefined;
|
|
42
40
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
43
41
|
contextMenu?: string | undefined | undefined;
|
|
44
42
|
dir?: string | undefined | undefined;
|
|
@@ -50,9 +48,11 @@ declare const meta: {
|
|
|
50
48
|
nonce?: string | undefined | undefined;
|
|
51
49
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
52
50
|
tabIndex?: number | undefined | undefined;
|
|
51
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
53
52
|
radioGroup?: string | undefined | undefined;
|
|
54
53
|
role?: import("react").AriaRole | undefined;
|
|
55
54
|
about?: string | undefined | undefined;
|
|
55
|
+
content?: string | undefined | undefined;
|
|
56
56
|
datatype?: string | undefined | undefined;
|
|
57
57
|
inlist?: any;
|
|
58
58
|
prefix?: string | undefined | undefined;
|
|
@@ -64,6 +64,7 @@ declare const meta: {
|
|
|
64
64
|
vocab?: string | undefined | undefined;
|
|
65
65
|
autoCorrect?: string | undefined | undefined;
|
|
66
66
|
autoSave?: string | undefined | undefined;
|
|
67
|
+
color?: string | undefined | undefined;
|
|
67
68
|
itemProp?: string | undefined | undefined;
|
|
68
69
|
itemScope?: boolean | undefined | undefined;
|
|
69
70
|
itemType?: string | undefined | undefined;
|
|
@@ -290,10 +291,18 @@ declare const meta: {
|
|
|
290
291
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLLIElement> | undefined;
|
|
291
292
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
292
293
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
293
|
-
|
|
294
|
+
value?: string | number | readonly string[] | undefined;
|
|
294
295
|
variant?: (typeof variants)[number] | undefined;
|
|
296
|
+
trackProps?: Record<string, string | number | boolean> | undefined;
|
|
297
|
+
open?: boolean | undefined;
|
|
298
|
+
defaultOpen?: boolean | undefined;
|
|
299
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
300
|
+
onEntered?: (() => void) | undefined;
|
|
301
|
+
onExited?: (() => void) | undefined;
|
|
302
|
+
action?: import("./toast-type").ToastAction | undefined;
|
|
295
303
|
onResume?: (() => void) | undefined;
|
|
296
304
|
duration?: number | undefined;
|
|
305
|
+
description?: import("react").ReactNode;
|
|
297
306
|
showClose?: boolean | undefined;
|
|
298
307
|
ref?: import("react").LegacyRef<HTMLLIElement> | undefined;
|
|
299
308
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
@@ -304,9 +313,15 @@ type Story = StoryObj<typeof meta>;
|
|
|
304
313
|
export declare const Default: Story;
|
|
305
314
|
/** 모든 variant 를 한 번에 보인다. 닫히지 않게 duration 을 길게 둔다. */
|
|
306
315
|
export declare const Variants: Story;
|
|
316
|
+
/** 되돌리기 동작 버튼을 단 토스트다. 닫은 뒤 다시 띄우기 버튼으로 다시 띄워 본다. */
|
|
307
317
|
export declare const WithAction: Story;
|
|
318
|
+
/** 닫기 버튼이 없는 토스트다. */
|
|
308
319
|
export declare const WithoutClose: Story;
|
|
320
|
+
/** 설명 없이 제목만 있는 토스트다. */
|
|
309
321
|
export declare const TitleOnly: Story;
|
|
322
|
+
/** 제목과 설명이 긴 토스트다. 폭은 그대로이고 글이 줄바꿈되며 닫기 버튼이 제자리를 지키는지 본다. */
|
|
310
323
|
export declare const LongText: Story;
|
|
311
324
|
/** Provider 의 position 별 자리. 스토리마다 Provider 를 새로 두므로 decorator 를 쓰지 않는다. */
|
|
312
325
|
export declare const Positions: Story;
|
|
326
|
+
/** 아래에서 밀려 들어오고 흐려지며 나간다. 2초 뒤 스스로 닫히거나 옆으로 밀어 닫으면 onExited 가 찍힌다. */
|
|
327
|
+
export declare const MotionEnterExit: Story;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AnimationEventHandler } from 'react';
|
|
2
|
+
import { EnterMotionProps, PresenceCallbackProps } from '../../helpers/motion/motion-props';
|
|
1
3
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
2
4
|
import { TrackProps } from '../logging/logging-type';
|
|
3
5
|
import { direction } from './tooltip-props';
|
|
@@ -16,6 +18,7 @@ export interface TooltipTriggerProps extends CommonTooltipProps, AsChildProps {
|
|
|
16
18
|
}
|
|
17
19
|
export interface TooltipContentProps extends CommonTooltipProps, AsChildProps {
|
|
18
20
|
direction?: (typeof direction)[number];
|
|
21
|
+
onAnimationEnd?: AnimationEventHandler<HTMLDivElement>;
|
|
19
22
|
}
|
|
20
23
|
export interface TooltipProviderProps {
|
|
21
24
|
children: React.ReactNode;
|
|
@@ -23,7 +26,7 @@ export interface TooltipProviderProps {
|
|
|
23
26
|
skipDelayDuration?: number;
|
|
24
27
|
disableHoverableContent?: boolean;
|
|
25
28
|
}
|
|
26
|
-
export interface TooltipProps extends TooltipRootProps, TrackProps {
|
|
29
|
+
export interface TooltipProps extends TooltipRootProps, TrackProps, EnterMotionProps, PresenceCallbackProps {
|
|
27
30
|
trigger: React.ReactNode;
|
|
28
31
|
content: React.ReactNode;
|
|
29
32
|
direction?: (typeof direction)[number];
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
4
11
|
component: import("react").ForwardRefExoticComponent<import("./tooltip-type").TooltipProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
direction: {
|
|
@@ -18,9 +25,13 @@ declare const meta: {
|
|
|
18
25
|
};
|
|
19
26
|
export default meta;
|
|
20
27
|
type Story = StoryObj<typeof meta>;
|
|
28
|
+
/** + 점에 마우스를 올리면 오른쪽에 툴팁이 뜬다. */
|
|
21
29
|
export declare const Default: Story;
|
|
22
30
|
/** 네 방향을 한 번에 보인다. defaultOpen 은 Radix 가 다른 툴팁이 열릴 때 닫으므로 open 으로 고정한다. */
|
|
23
31
|
export declare const Directions: Story;
|
|
24
32
|
/** 하나에 올렸다가 옆으로 옮기면 skipDelayDuration(1초) 동안은 지연 없이 바로 뜬다. */
|
|
25
33
|
export declare const SharedProvider: Story;
|
|
34
|
+
/** 접혔을 때만 툴팁이 뜬다. 펼치기를 누른 뒤에는 마우스를 올려도 뜨지 않는지 본다. */
|
|
26
35
|
export declare const Disabled: Story;
|
|
36
|
+
/** 네 방향 모두 트리거 쪽에서 밀려 나오며 나타나고 흐려지며 사라진다. 올렸다 떼어 본다. 윗줄 weak, 아랫줄 strong. */
|
|
37
|
+
export declare const MotionStrength: Story;
|