@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,20 +1,46 @@
|
|
|
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("./inline-loading-type").InlineLoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: "inline-radio";
|
|
15
|
+
options: readonly ["s", "m", "l"];
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: readonly ["neutral", "brand", "inverse"];
|
|
20
|
+
};
|
|
6
21
|
justifyContent: {
|
|
7
22
|
control: "inline-radio";
|
|
8
23
|
options: readonly ["flex-start", "center", "flex-end", "space-between"];
|
|
9
24
|
};
|
|
10
25
|
};
|
|
11
26
|
args: {
|
|
12
|
-
size:
|
|
27
|
+
size: "m";
|
|
28
|
+
variant: "neutral";
|
|
13
29
|
justifyContent: "flex-start";
|
|
30
|
+
delay: false;
|
|
14
31
|
};
|
|
15
32
|
};
|
|
16
33
|
export default meta;
|
|
17
34
|
type Story = StoryObj<typeof meta>;
|
|
35
|
+
/** 기본 글자 불러오는 중을 단 인라인 로딩이다. */
|
|
18
36
|
export declare const Default: Story;
|
|
19
|
-
|
|
37
|
+
/** 무엇을 기다리는지 글자로 쓴다. 글자는 링과 같은 색이다. */
|
|
38
|
+
export declare const WithLabel: Story;
|
|
39
|
+
/** 정말 좁은 자리라 글자를 뺐다. 화면 읽기 프로그램에는 불러오는 중이라고 알린다. */
|
|
40
|
+
export declare const WithoutLabel: Story;
|
|
41
|
+
/** s·m 은 가로로, l 은 세로로 놓인다. l 은 빈 영역 가운데를 채울 때 쓴다. */
|
|
20
42
|
export declare const Sizes: Story;
|
|
43
|
+
/** neutral·brand 는 흰 바탕, inverse 는 어두운 바탕 위에 둔다. */
|
|
44
|
+
export declare const Variants: Story;
|
|
45
|
+
/** justifyContent 값별로 점선 상자 안에서 로딩 표시가 놓이는 자리를 본다. */
|
|
46
|
+
export declare const Justify: Story;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseLoadingDots: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default BaseLoadingDots;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
+
import { LoadingAppearanceProps } from '../loading-type';
|
|
4
|
+
export interface LoadingDotsProps extends StyleProps, LoadingAppearanceProps {
|
|
5
|
+
}
|
|
6
|
+
export type BaseLoadingDotsProps = ComponentPropsWithRef<'span'>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LoadingDotsProps } from './loading-dots-type';
|
|
2
|
+
declare const LoadingDots: import("react").ForwardRefExoticComponent<LoadingDotsProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
3
|
+
export default LoadingDots;
|
|
4
|
+
export type { LoadingDotsProps } from './loading-dots-type';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
component: import("react").ForwardRefExoticComponent<import("./loading-dots-type").LoadingDotsProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: "inline-radio";
|
|
15
|
+
options: readonly ["s", "m", "l"];
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: readonly ["neutral", "brand", "inverse"];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
args: {
|
|
23
|
+
size: "m";
|
|
24
|
+
variant: "neutral";
|
|
25
|
+
delay: false;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
/** 기본 점 셋이다. */
|
|
31
|
+
export declare const Default: Story;
|
|
32
|
+
/** s·m·l 세 크기다. 점 지름과 간격이 함께 바뀐다. */
|
|
33
|
+
export declare const Sizes: Story;
|
|
34
|
+
/** neutral·brand 는 흰 바탕, inverse 는 어두운 바탕 위에 둔다. */
|
|
35
|
+
export declare const Variants: Story;
|
|
36
|
+
/** 문장 끝에 붙인 점이다. 글자 크기에 맞춰 s 를 쓴다. */
|
|
37
|
+
export declare const InText: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropDef } from '../../helpers/types/propsDef';
|
|
2
|
+
/** 로딩 가족이 모두 같은 이름으로 쓰는 축. px 은 styles/token/size.css 의 --loading-*, 색은 styles/loading.css 에 있다 */
|
|
3
|
+
export declare const loadingSizes: readonly ["s", "m", "l"];
|
|
4
|
+
export declare const loadingVariants: readonly ["neutral", "brand", "inverse"];
|
|
5
|
+
export declare const loadingVariantProp: (defaultValue: (typeof loadingVariants)[number]) => PropDef<typeof loadingVariants>;
|
|
6
|
+
export declare const loadingProps: {
|
|
7
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
8
|
+
variant: PropDef<readonly ["neutral", "brand", "inverse"]>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { loadingSizes, loadingVariants } from './loading-props';
|
|
2
|
+
/** 로딩 가족 공통 축. 이름과 뜻이 컴포넌트마다 같다 */
|
|
3
|
+
export interface LoadingAppearanceProps {
|
|
4
|
+
size?: (typeof loadingSizes)[number];
|
|
5
|
+
/** neutral 은 흰 바탕의 회색, brand 는 보라, inverse 는 보라·어두운 바탕 위의 흰색 */
|
|
6
|
+
variant?: (typeof loadingVariants)[number];
|
|
7
|
+
/** true(기본)면 300ms 안에 끝나는 로딩은 보이지 않는다. 자리와 role 은 바로 생긴다 */
|
|
8
|
+
delay?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
/** 용도마다 하나씩 놓았다. 스토리에서는 바로 보이게 delay 를 껐다. */
|
|
15
|
+
export declare const ByPurpose: Story;
|
|
@@ -3,6 +3,10 @@ import { StyleProps } from '../../../helpers/types/common-props';
|
|
|
3
3
|
export interface OverlayLoadingProps extends StyleProps {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
message?: string;
|
|
6
|
+
/** 0~100. 주면 스피너 대신 진행 막대를 그린다(업로드처럼 얼마나 남았는지 알 때) */
|
|
7
|
+
progress?: number;
|
|
8
|
+
/** true(기본)면 300ms 안에 끝나면 보이지 않는다. 조작은 처음부터 막는다 */
|
|
9
|
+
delay?: boolean;
|
|
6
10
|
backdropOpacity?: number;
|
|
7
11
|
zIndex?: number;
|
|
8
12
|
}
|
|
@@ -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("./overlay-loading-type").OverlayLoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
backdropOpacity: {
|
|
@@ -20,14 +27,24 @@ declare const meta: {
|
|
|
20
27
|
message: string;
|
|
21
28
|
backdropOpacity: number;
|
|
22
29
|
zIndex: number;
|
|
30
|
+
delay: false;
|
|
23
31
|
};
|
|
24
32
|
};
|
|
25
33
|
export default meta;
|
|
26
34
|
type Story = StoryObj<typeof meta>;
|
|
35
|
+
/** 로딩 중... 문구를 단 화면 전체 덮개다. 아래 화면이 어둡게 가려지는지 본다. */
|
|
27
36
|
export declare const Default: Story;
|
|
37
|
+
/** 문구 없이 스피너만 있는 덮개다. */
|
|
28
38
|
export declare const WithoutMessage: Story;
|
|
39
|
+
/** 배경을 옅게(0.2) 덮고 저장 중입니다 문구를 단 덮개다. 아래 화면이 비쳐 보이는지 본다. */
|
|
29
40
|
export declare const LightBackdrop: Story;
|
|
41
|
+
/** progress 를 주면 스피너 대신 흰 진행 막대를 그린다. */
|
|
42
|
+
export declare const WithProgress: Story;
|
|
30
43
|
/** open 이 false 면 아무것도 그리지 않는다. */
|
|
31
44
|
export declare const Closed: Story;
|
|
32
45
|
/** 화면 전체를 덮어 뒤의 본문을 누를 수 없게 한다. */
|
|
33
46
|
export declare const OverContent: Story;
|
|
47
|
+
/** 켜면 화면 전체가 흐리게 덮인다. 2초 뒤 꺼지며 바로 사라진다. */
|
|
48
|
+
export declare const MotionEnter: Story;
|
|
49
|
+
/** 0.2초 걸리는 일과 2초 걸리는 일이다. delay 가 켜져 있으면 짧은 일에는 덮개가 보이지 않는다. 덮개는 처음부터 조작을 막는다. */
|
|
50
|
+
export declare const MotionDelay: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
+
import { LoadingAppearanceProps } from '../loading-type';
|
|
4
|
+
export interface ProgressBarProps extends StyleProps, LoadingAppearanceProps {
|
|
5
|
+
/** 0 부터 max 사이. 밖의 값은 끝으로 맞춘다. 없으면 끝을 모르는 진행이라 막대가 왼쪽에서 오른쪽으로 지난다 */
|
|
6
|
+
value?: number | null;
|
|
7
|
+
/** 기본 100 */
|
|
8
|
+
max?: number;
|
|
9
|
+
/** value 가 바뀌면 막대가 차오른다. 처음 그릴 때는 전환 없이 그린다. 기본 true */
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
/** 'aria-label' 로 붙는다 (예: '업로드 진행률') */
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
export interface BaseProgressBarProps extends ComponentPropsWithRef<'div'> {
|
|
15
|
+
/** null 이면 끝을 모르는 진행이다 */
|
|
16
|
+
value: number | null;
|
|
17
|
+
max: number;
|
|
18
|
+
indicatorStyle?: CSSProperties;
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ProgressBarProps } from './progress-bar-type';
|
|
2
|
+
declare const ProgressBar: import("react").ForwardRefExoticComponent<ProgressBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default ProgressBar;
|
|
4
|
+
export type { ProgressBarProps } from './progress-bar-type';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { loadingSizes, loadingVariants } from '../loading-props';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
component: import("react").ForwardRefExoticComponent<import("./progress-bar-type").ProgressBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
argTypes: {
|
|
14
|
+
size: {
|
|
15
|
+
control: "inline-radio";
|
|
16
|
+
options: readonly ["s", "m", "l"];
|
|
17
|
+
};
|
|
18
|
+
variant: {
|
|
19
|
+
control: "inline-radio";
|
|
20
|
+
options: readonly ["neutral", "brand", "inverse"];
|
|
21
|
+
};
|
|
22
|
+
value: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "range";
|
|
25
|
+
min: number;
|
|
26
|
+
max: number;
|
|
27
|
+
step: number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
args: {
|
|
32
|
+
value: number;
|
|
33
|
+
label: string;
|
|
34
|
+
size: "m";
|
|
35
|
+
variant: "brand";
|
|
36
|
+
delay: false;
|
|
37
|
+
};
|
|
38
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
39
|
+
value?: number | null | undefined;
|
|
40
|
+
max?: number | undefined;
|
|
41
|
+
animated?: boolean | undefined;
|
|
42
|
+
label: string;
|
|
43
|
+
className?: string | undefined;
|
|
44
|
+
style?: import("react").CSSProperties | undefined;
|
|
45
|
+
size?: (typeof loadingSizes)[number] | undefined;
|
|
46
|
+
variant?: (typeof loadingVariants)[number] | undefined;
|
|
47
|
+
delay?: boolean | undefined;
|
|
48
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
49
|
+
key?: import("react").Key | null | undefined;
|
|
50
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
51
|
+
};
|
|
52
|
+
export default meta;
|
|
53
|
+
type Story = StoryObj<typeof meta>;
|
|
54
|
+
/** 40% 진행한 막대다. */
|
|
55
|
+
export declare const Default: Story;
|
|
56
|
+
/** value 가 없으면 끝을 모르는 진행이다. 막대가 왼쪽 밖에서 오른쪽 밖으로 지난다. */
|
|
57
|
+
export declare const Indeterminate: Story;
|
|
58
|
+
/** s(2px)·m(4px)·l(8px) 두께다. */
|
|
59
|
+
export declare const Sizes: Story;
|
|
60
|
+
/** brand(기본)·neutral 은 흰 바탕, inverse 는 어두운 바탕 위에 둔다. */
|
|
61
|
+
export declare const Variants: Story;
|
|
62
|
+
/** 버튼을 누르면 20% 씩 차오른다. 오른쪽은 animated={false} 라 바로 바뀐다. */
|
|
63
|
+
export declare const MotionProgress: Story;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export declare const spinnerProps: {
|
|
1
|
+
export declare const spinnerProps: {
|
|
2
|
+
size: import("../../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
3
|
+
variant: import("../../../helpers/types/propsDef").PropDef<readonly ["neutral", "brand", "inverse"]>;
|
|
4
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
-
|
|
3
|
+
import { LoadingAppearanceProps } from '../loading-type';
|
|
4
|
+
export interface SpinnerProps extends StyleProps, LoadingAppearanceProps {
|
|
5
|
+
}
|
|
4
6
|
export type BaseSpinnerProps = ComponentPropsWithRef<'div'>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { SpinnerProps } from './spinner-type';
|
|
2
|
+
declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
2
3
|
export default Spinner;
|
|
3
4
|
export type { SpinnerProps } from './spinner-type';
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
component: import("react").ForwardRefExoticComponent<import("./spinner-type").SpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: "inline-radio";
|
|
15
|
+
options: readonly ["s", "m", "l"];
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: readonly ["neutral", "brand", "inverse"];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
args: {
|
|
23
|
+
size: "m";
|
|
24
|
+
variant: "neutral";
|
|
25
|
+
delay: false;
|
|
26
|
+
};
|
|
5
27
|
};
|
|
6
28
|
export default meta;
|
|
7
29
|
type Story = StoryObj<typeof meta>;
|
|
30
|
+
/** 기본 스피너다. 스토리에서는 바로 보이게 delay 를 껐다. */
|
|
8
31
|
export declare const Default: Story;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
32
|
+
/** s·m·l 세 크기다. 링 지름과 선 두께가 함께 바뀐다. */
|
|
33
|
+
export declare const Sizes: Story;
|
|
34
|
+
/** neutral·brand 는 흰 바탕, inverse 는 어두운 바탕 위에 둔다. */
|
|
35
|
+
export declare const Variants: Story;
|
|
36
|
+
/** 0.2초 걸리는 일과 2초 걸리는 일이다. delay 가 켜져 있으면 짧은 일에는 스피너가 보이지 않는다. */
|
|
37
|
+
export declare const MotionDelay: Story;
|
|
@@ -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("./media-type").MediaThumbnailProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
size: {
|
|
@@ -32,3 +39,5 @@ export declare const Invalid: Story;
|
|
|
32
39
|
export declare const Removable: Story;
|
|
33
40
|
/** 말풍선 안. size l 은 폭을 채우되 240 을 넘지 않는다. */
|
|
34
41
|
export declare const InBubble: Story;
|
|
42
|
+
/** 썸네일을 누르고 있으면 줄어든다. 아래는 pressEffect={false} */
|
|
43
|
+
export declare const MotionPress: Story;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactElement } from 'react';
|
|
2
|
+
import { PressEffectProps } 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 { mediaTypes, sizes } from './media-props';
|
|
@@ -27,7 +28,7 @@ export interface MediaViewerProps extends MediaViewerRootProps, MediaSourceProps
|
|
|
27
28
|
/** 뷰어의 접근성 이름. 화면에는 안 보인다. 없으면 alt 를 쓴다 */
|
|
28
29
|
title?: string;
|
|
29
30
|
}
|
|
30
|
-
export interface MediaThumbnailProps extends MediaSourceProps, StyleProps, TrackProps {
|
|
31
|
+
export interface MediaThumbnailProps extends MediaSourceProps, StyleProps, TrackProps, PressEffectProps {
|
|
31
32
|
size?: (typeof sizes)[number];
|
|
32
33
|
/** alt 가 없을 때(영상 등) 썸네일 버튼의 aria-label (예: '영상 보기') */
|
|
33
34
|
viewLabel?: string;
|
|
@@ -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("./media-type").MediaViewerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
type: {
|
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { motion, side } from './message-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("./message-type").MessageProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
6
13
|
argTypes: {
|
|
7
14
|
side: {
|
|
@@ -22,20 +29,11 @@ declare const meta: {
|
|
|
22
29
|
time: string;
|
|
23
30
|
};
|
|
24
31
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
25
|
-
title?: string | undefined | undefined;
|
|
26
|
-
children?: import("react").ReactNode;
|
|
27
|
-
side?: (typeof side)[number] | undefined;
|
|
28
|
-
className?: string | undefined | undefined;
|
|
29
|
-
style?: import("react").CSSProperties | undefined;
|
|
30
|
-
key?: import("react").Key | null | undefined;
|
|
31
|
-
color?: string | undefined | undefined;
|
|
32
|
-
content?: string | undefined | undefined;
|
|
33
|
-
translate?: "yes" | "no" | undefined | undefined;
|
|
34
|
-
motion?: (typeof motion)[number] | undefined;
|
|
35
32
|
slot?: string | undefined | undefined;
|
|
33
|
+
style?: import("react").CSSProperties | undefined;
|
|
36
34
|
time?: import("react").ReactNode;
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
title?: string | undefined | undefined;
|
|
36
|
+
key?: import("react").Key | null | undefined;
|
|
39
37
|
defaultChecked?: boolean | undefined | undefined;
|
|
40
38
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
41
39
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -43,6 +41,7 @@ declare const meta: {
|
|
|
43
41
|
accessKey?: string | undefined | undefined;
|
|
44
42
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
45
43
|
autoFocus?: boolean | undefined | undefined;
|
|
44
|
+
className?: string | undefined | undefined;
|
|
46
45
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
47
46
|
contextMenu?: string | undefined | undefined;
|
|
48
47
|
dir?: string | undefined | undefined;
|
|
@@ -54,9 +53,11 @@ declare const meta: {
|
|
|
54
53
|
nonce?: string | undefined | undefined;
|
|
55
54
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
56
55
|
tabIndex?: number | undefined | undefined;
|
|
56
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
57
57
|
radioGroup?: string | undefined | undefined;
|
|
58
58
|
role?: import("react").AriaRole | undefined;
|
|
59
59
|
about?: string | undefined | undefined;
|
|
60
|
+
content?: string | undefined | undefined;
|
|
60
61
|
datatype?: string | undefined | undefined;
|
|
61
62
|
inlist?: any;
|
|
62
63
|
prefix?: string | undefined | undefined;
|
|
@@ -68,6 +69,7 @@ declare const meta: {
|
|
|
68
69
|
vocab?: string | undefined | undefined;
|
|
69
70
|
autoCorrect?: string | undefined | undefined;
|
|
70
71
|
autoSave?: string | undefined | undefined;
|
|
72
|
+
color?: string | undefined | undefined;
|
|
71
73
|
itemProp?: string | undefined | undefined;
|
|
72
74
|
itemScope?: boolean | undefined | undefined;
|
|
73
75
|
itemType?: string | undefined | undefined;
|
|
@@ -133,6 +135,7 @@ declare const meta: {
|
|
|
133
135
|
"aria-valuemin"?: number | undefined | undefined;
|
|
134
136
|
"aria-valuenow"?: number | undefined | undefined;
|
|
135
137
|
"aria-valuetext"?: string | undefined | undefined;
|
|
138
|
+
children?: import("react").ReactNode;
|
|
136
139
|
dangerouslySetInnerHTML?: {
|
|
137
140
|
__html: string | TrustedHTML;
|
|
138
141
|
} | undefined | undefined;
|
|
@@ -295,6 +298,10 @@ declare const meta: {
|
|
|
295
298
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
296
299
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
297
300
|
media?: import("react").ReactNode;
|
|
301
|
+
name?: import("react").ReactNode;
|
|
302
|
+
motion?: (typeof motion)[number] | undefined;
|
|
303
|
+
value?: string | number | readonly string[] | undefined;
|
|
304
|
+
side?: (typeof side)[number] | undefined;
|
|
298
305
|
dateTime?: string | undefined;
|
|
299
306
|
ref?: import("react").LegacyRef<HTMLLIElement> | undefined;
|
|
300
307
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { TrackProps } from '../logging/logging-type';
|
|
4
5
|
export type MessageComposerRootProps = ComponentPropsWithRef<'div'>;
|
|
5
6
|
export type MessageComposerTextareaProps = ComponentPropsWithRef<'textarea'>;
|
|
6
7
|
export type MessageComposerSendProps = ComponentPropsWithRef<'button'>;
|
|
7
|
-
export interface MessageComposerProps extends StyleProps, TrackProps {
|
|
8
|
+
export interface MessageComposerProps extends StyleProps, TrackProps, PressEffectProps {
|
|
8
9
|
value?: string;
|
|
9
10
|
defaultValue?: string;
|
|
10
11
|
onValueChange?: (value: string) => void;
|
|
@@ -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("./message-composer-type").MessageComposerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
args: {
|
|
6
13
|
label: string;
|
|
@@ -27,6 +34,7 @@ declare const meta: {
|
|
|
27
34
|
style?: import("react").CSSProperties | undefined;
|
|
28
35
|
track?: string | undefined;
|
|
29
36
|
trackProps?: Record<string, string | number | boolean> | undefined;
|
|
37
|
+
pressEffect?: boolean | undefined;
|
|
30
38
|
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
31
39
|
key?: import("react").Key | null | undefined;
|
|
32
40
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
@@ -44,3 +52,5 @@ export declare const WithLeading: Story;
|
|
|
44
52
|
export declare const WithAttachments: Story;
|
|
45
53
|
/** 보내기에 성공하면 쓰는 쪽이 값을 비운다 */
|
|
46
54
|
export declare const Controlled: Story;
|
|
55
|
+
/** 보내기 원을 누르고 있으면 줄어든다. 아래는 pressEffect={false} */
|
|
56
|
+
export declare const MotionPress: Story;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { AnimationEventHandler, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { PresenceCallbackProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { CTAButtonProps } from '../button/button-type';
|
|
4
5
|
import { TrackProps } from '../logging/logging-type';
|
|
@@ -10,9 +11,15 @@ export interface ModalRootProps {
|
|
|
10
11
|
}
|
|
11
12
|
export interface ModalContainerProps extends AsChildProps, StyleProps {
|
|
12
13
|
forceMount?: true;
|
|
14
|
+
/** 창을 그릴 요소. Radix `Dialog.Portal` 의 container. 없으면 document.body */
|
|
15
|
+
portalContainer?: HTMLElement;
|
|
13
16
|
/** 열릴 때·닫힐 때 포커스를 옮기기 직전. Radix `Dialog.Content` 에 그대로 넘긴다 */
|
|
14
17
|
onOpenAutoFocus?: (event: Event) => void;
|
|
15
18
|
onCloseAutoFocus?: (event: Event) => void;
|
|
19
|
+
/** 바깥 누름·Esc 로 닫히기 직전. `preventDefault()` 하면 열린 채로 남는다 */
|
|
20
|
+
onPointerDownOutside?: (event: Event) => void;
|
|
21
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
22
|
+
onAnimationEnd?: AnimationEventHandler<HTMLDivElement>;
|
|
16
23
|
}
|
|
17
24
|
export interface ModalTriggerProps extends AsChildProps {
|
|
18
25
|
className?: string;
|
|
@@ -29,7 +36,7 @@ export interface ModalDescriptionProps extends AsChildProps {
|
|
|
29
36
|
export interface ModalCloseProps extends AsChildProps {
|
|
30
37
|
className?: string;
|
|
31
38
|
}
|
|
32
|
-
export interface ModalWithDoubleButtonProps {
|
|
39
|
+
export interface ModalWithDoubleButtonProps extends PresenceCallbackProps {
|
|
33
40
|
/**
|
|
34
41
|
* 넘기면 열림을 부모가 정한다. 열리면 포커스가 창 안으로 들어가고 닫히면 연 요소로 돌아오며,
|
|
35
42
|
* Esc·바깥 누름·X 아이콘·두 버튼이 `onOpenChange(false)` 를 부른다.
|
|
@@ -47,8 +54,12 @@ export interface ModalWithDoubleButtonProps {
|
|
|
47
54
|
left: CTAButtonProps;
|
|
48
55
|
right: CTAButtonProps;
|
|
49
56
|
size?: (typeof sizes)[number];
|
|
57
|
+
/** 창을 그릴 요소. 없으면 document.body */
|
|
58
|
+
portalContainer?: HTMLElement;
|
|
59
|
+
/** `open` 을 넘겼을 때만. 열린 동안 history 항목을 하나 쌓아 뒤로 가기가 페이지 대신 `onOpenChange(false)` 를 부른다. 기본 true */
|
|
60
|
+
closeOnBackEvent?: boolean;
|
|
50
61
|
}
|
|
51
|
-
export interface ModalProps extends ModalRootProps, StyleProps, TrackProps {
|
|
62
|
+
export interface ModalProps extends ModalRootProps, StyleProps, TrackProps, PresenceCallbackProps {
|
|
52
63
|
/** 있으면 `Modal.Trigger asChild` 로 감싸 클릭하면 열리는 요소가 된다. */
|
|
53
64
|
trigger?: ReactElement;
|
|
54
65
|
title: ReactNode;
|
|
@@ -58,4 +69,12 @@ export interface ModalProps extends ModalRootProps, StyleProps, TrackProps {
|
|
|
58
69
|
footer?: ReactNode;
|
|
59
70
|
showCloseIcon?: boolean;
|
|
60
71
|
size?: (typeof sizes)[number];
|
|
72
|
+
/** false 면 바깥을 눌러도 닫히지 않고 창이 좌우로 흔들린다. 기본 true */
|
|
73
|
+
closeOnOverlayClick?: boolean;
|
|
74
|
+
/** false 면 Esc 로 닫히지 않는다. 기본 true */
|
|
75
|
+
closeOnEscape?: boolean;
|
|
76
|
+
/** 창을 그릴 요소. 없으면 document.body */
|
|
77
|
+
portalContainer?: HTMLElement;
|
|
78
|
+
/** 열린 동안 history 항목을 하나 쌓아 브라우저·기기의 뒤로 가기가 페이지 대신 창을 닫는다. 기본 true */
|
|
79
|
+
closeOnBackEvent?: boolean;
|
|
61
80
|
}
|