@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
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { shapes } from './skeleton-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("./skeleton-type").SkeletonProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
6
13
|
argTypes: {
|
|
7
14
|
shape: {
|
|
@@ -38,17 +45,10 @@ declare const meta: {
|
|
|
38
45
|
animated: true;
|
|
39
46
|
};
|
|
40
47
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
41
|
-
|
|
42
|
-
children?: import("react").ReactNode;
|
|
43
|
-
className?: string | undefined | undefined;
|
|
48
|
+
slot?: string | undefined | undefined;
|
|
44
49
|
style?: import("react").CSSProperties | undefined;
|
|
50
|
+
title?: string | undefined | undefined;
|
|
45
51
|
key?: import("react").Key | null | undefined;
|
|
46
|
-
color?: string | undefined | undefined;
|
|
47
|
-
content?: string | undefined | undefined;
|
|
48
|
-
height?: number | string | undefined;
|
|
49
|
-
translate?: "yes" | "no" | undefined | undefined;
|
|
50
|
-
width?: number | string | undefined;
|
|
51
|
-
slot?: string | undefined | undefined;
|
|
52
52
|
defaultChecked?: boolean | undefined | undefined;
|
|
53
53
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
54
54
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -56,6 +56,7 @@ declare const meta: {
|
|
|
56
56
|
accessKey?: string | undefined | undefined;
|
|
57
57
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
58
58
|
autoFocus?: boolean | undefined | undefined;
|
|
59
|
+
className?: string | undefined | undefined;
|
|
59
60
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
60
61
|
contextMenu?: string | undefined | undefined;
|
|
61
62
|
dir?: string | undefined | undefined;
|
|
@@ -67,9 +68,11 @@ declare const meta: {
|
|
|
67
68
|
nonce?: string | undefined | undefined;
|
|
68
69
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
69
70
|
tabIndex?: number | undefined | undefined;
|
|
71
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
70
72
|
radioGroup?: string | undefined | undefined;
|
|
71
73
|
role?: import("react").AriaRole | undefined;
|
|
72
74
|
about?: string | undefined | undefined;
|
|
75
|
+
content?: string | undefined | undefined;
|
|
73
76
|
datatype?: string | undefined | undefined;
|
|
74
77
|
inlist?: any;
|
|
75
78
|
prefix?: string | undefined | undefined;
|
|
@@ -81,6 +84,7 @@ declare const meta: {
|
|
|
81
84
|
vocab?: string | undefined | undefined;
|
|
82
85
|
autoCorrect?: string | undefined | undefined;
|
|
83
86
|
autoSave?: string | undefined | undefined;
|
|
87
|
+
color?: string | undefined | undefined;
|
|
84
88
|
itemProp?: string | undefined | undefined;
|
|
85
89
|
itemScope?: boolean | undefined | undefined;
|
|
86
90
|
itemType?: string | undefined | undefined;
|
|
@@ -146,6 +150,7 @@ declare const meta: {
|
|
|
146
150
|
"aria-valuemin"?: number | undefined | undefined;
|
|
147
151
|
"aria-valuenow"?: number | undefined | undefined;
|
|
148
152
|
"aria-valuetext"?: string | undefined | undefined;
|
|
153
|
+
children?: import("react").ReactNode;
|
|
149
154
|
dangerouslySetInnerHTML?: {
|
|
150
155
|
__html: string | TrustedHTML;
|
|
151
156
|
} | undefined | undefined;
|
|
@@ -308,6 +313,8 @@ declare const meta: {
|
|
|
308
313
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
309
314
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
310
315
|
shape?: (typeof shapes)[number] | undefined;
|
|
316
|
+
height?: number | string | undefined;
|
|
317
|
+
width?: number | string | undefined;
|
|
311
318
|
lines?: number | undefined;
|
|
312
319
|
animated?: boolean | undefined;
|
|
313
320
|
ref?: import("react").LegacyRef<HTMLSpanElement> | undefined;
|
|
@@ -315,11 +322,15 @@ declare const meta: {
|
|
|
315
322
|
};
|
|
316
323
|
export default meta;
|
|
317
324
|
type Story = StoryObj<typeof meta>;
|
|
325
|
+
/** 한 줄 텍스트 모양 스켈레톤이다. 반짝이며 흐르는 애니메이션을 본다. */
|
|
318
326
|
export declare const Default: Story;
|
|
327
|
+
/** 모양별 스켈레톤이다. */
|
|
319
328
|
export declare const Shapes: Story;
|
|
320
329
|
/** text 는 lines 로 여러 줄을 그리고 마지막 줄이 짧다. */
|
|
321
330
|
export declare const Lines: Story;
|
|
331
|
+
/** 200×120 사각형 스켈레톤이다. */
|
|
322
332
|
export declare const Rect: Story;
|
|
333
|
+
/** 지름 48px 원 스켈레톤이다. */
|
|
323
334
|
export declare const Circle: Story;
|
|
324
335
|
/** animated 를 끄면 shimmer 없이 회색 바탕만 보인다. */
|
|
325
336
|
export declare const Static: Story;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
/** all: 단계 이름을 모두 보인다. current: 지금 단계 이름만(카드 안처럼 좁을 때) */
|
|
2
2
|
export declare const labelVisibility: readonly ["all", "current"];
|
|
3
|
+
/** bar: 단계마다 막대(기본). icon: 단계마다 둥근 표시를 이음선으로 잇는다 */
|
|
4
|
+
export declare const variants: readonly ["bar", "icon"];
|
|
5
|
+
/** 막대 두께는 ProgressBar 와 같은 이름·값(--progress-thickness-*)이다 */
|
|
6
|
+
export declare const sizes: readonly ["s", "m", "l"];
|
|
3
7
|
export declare const stepProgressProps: {
|
|
8
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
9
|
+
variant: {
|
|
10
|
+
type: "className";
|
|
11
|
+
className: string;
|
|
12
|
+
values: readonly ["bar", "icon"];
|
|
13
|
+
};
|
|
4
14
|
labelVisibility: {
|
|
5
15
|
type: "className";
|
|
6
16
|
className: string;
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
|
-
import { labelVisibility } from './step-progress-props';
|
|
3
|
+
import { labelVisibility, sizes, variants } from './step-progress-props';
|
|
4
4
|
export type StepState = 'done' | 'current' | 'todo';
|
|
5
|
+
/** 아이콘이 있는 단계. icon 은 variant='icon' 의 둥근 표시 안에 들어간다 */
|
|
6
|
+
export interface StepItem {
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
}
|
|
5
10
|
export interface StepProgressProps extends StyleProps {
|
|
6
|
-
/** 단계
|
|
7
|
-
steps: ReactNode
|
|
11
|
+
/** 단계 이름 또는 { label, icon }. 순서대로 */
|
|
12
|
+
steps: Array<ReactNode | StepItem>;
|
|
8
13
|
/** 지금 단계의 순번(0부터). steps.length 면 모두 끝난 것이다 */
|
|
9
14
|
current: number;
|
|
15
|
+
/** 막대 두께·이름 글자·간격. s 2px·m 4px(기본)·l 8px, ProgressBar 와 같은 두께다 */
|
|
16
|
+
size?: (typeof sizes)[number];
|
|
10
17
|
labelVisibility?: (typeof labelVisibility)[number];
|
|
18
|
+
/** bar: 단계마다 막대(기본). icon: 단계마다 둥근 표시(아이콘이나 1부터의 번호)를 이음선으로 잇는다 */
|
|
19
|
+
variant?: (typeof variants)[number];
|
|
20
|
+
/** variant='icon' 에서 끝난 단계에 체크를 그린다. false 면 단계의 아이콘·번호를 끝남 색으로 둔다. 기본 true */
|
|
21
|
+
checkForFinish?: boolean;
|
|
11
22
|
/** 'aria-label' 로 붙는다 (예: '진행 단계') */
|
|
12
23
|
label: string;
|
|
24
|
+
/** current 가 바뀌면 막대가 차오른다. 처음 그릴 때는 전환 없이 그린다. 기본 true */
|
|
25
|
+
animated?: boolean;
|
|
26
|
+
/** 처음 그릴 때 단계를 차례로 보인다. 숫자면 단계 사이 간격(ms). animated 일 때만 돈다. 기본 false */
|
|
27
|
+
stagger?: boolean | number;
|
|
28
|
+
/** stagger 의 첫 단계가 나타나기 전 기다리는 시간(ms) */
|
|
29
|
+
delay?: number;
|
|
13
30
|
}
|
|
14
31
|
export type StepProgressRootProps = ComponentPropsWithRef<'ol'>;
|
|
15
32
|
export interface StepProgressStepProps extends ComponentPropsWithRef<'li'> {
|
|
16
33
|
state: StepState;
|
|
34
|
+
/** 막대 앞 둥근 표시의 내용. 주면 표시를 그린다 */
|
|
35
|
+
marker?: ReactNode;
|
|
17
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { StepProgressProps } from './step-progress-type';
|
|
2
2
|
declare const StepProgress: import("react").ForwardRefExoticComponent<StepProgressProps & import("react").RefAttributes<HTMLOListElement>>;
|
|
3
3
|
export default StepProgress;
|
|
4
|
-
export type { StepProgressProps } from './step-progress-type';
|
|
4
|
+
export type { StepItem, StepProgressProps } from './step-progress-type';
|
|
@@ -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("./step-progress-type").StepProgressProps & import("react").RefAttributes<HTMLOListElement>>;
|
|
5
12
|
args: {
|
|
6
13
|
label: string;
|
|
@@ -15,15 +22,48 @@ declare const meta: {
|
|
|
15
22
|
max: number;
|
|
16
23
|
};
|
|
17
24
|
};
|
|
25
|
+
size: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "inline-radio";
|
|
28
|
+
};
|
|
29
|
+
options: readonly ["s", "m", "l"];
|
|
30
|
+
};
|
|
18
31
|
labelVisibility: {
|
|
19
32
|
control: {
|
|
20
33
|
type: "inline-radio";
|
|
21
34
|
};
|
|
22
35
|
options: readonly ["all", "current"];
|
|
23
36
|
};
|
|
37
|
+
variant: {
|
|
38
|
+
control: {
|
|
39
|
+
type: "inline-radio";
|
|
40
|
+
};
|
|
41
|
+
options: readonly ["bar", "icon"];
|
|
42
|
+
};
|
|
43
|
+
checkForFinish: {
|
|
44
|
+
control: {
|
|
45
|
+
type: "boolean";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
24
48
|
};
|
|
25
49
|
};
|
|
26
50
|
export default meta;
|
|
27
51
|
type Story = StoryObj<typeof meta>;
|
|
52
|
+
/** 다섯 단계 중 세 번째(결과 제출)가 지금 단계인 진행 막대다. 끝남·지금·남음 색 구분을 본다. */
|
|
28
53
|
export declare const Default: Story;
|
|
54
|
+
/** current 를 바꾸면 막대가 차오르거나 줄어든다. animated 를 끄면 바로 바뀐다 */
|
|
55
|
+
export declare const MotionProgress: Story;
|
|
56
|
+
/** 처음 그릴 때 단계가 차례로 나타난다. stagger 는 간격(ms), delay 는 첫 단계 전 기다림 */
|
|
57
|
+
export declare const MotionStagger: Story;
|
|
58
|
+
/** s·m·l 세 크기다. 막대 두께 2·4·8px 는 ProgressBar 와 같고 이름 글자와 간격이 함께 바뀐다. */
|
|
59
|
+
export declare const Sizes: Story;
|
|
60
|
+
/** labelVisibility 값별 진행 막대다. 단계 이름이 모두 보이는지, 지금 단계만 보이는지 비교한다. */
|
|
29
61
|
export declare const LabelVisibility: Story;
|
|
62
|
+
/** variant='icon' 이다. 단계마다 아이콘이 든 둥근 표시를 이음선으로 잇고, 끝난 단계는 체크로 바뀐다. */
|
|
63
|
+
export declare const IconVariant: Story;
|
|
64
|
+
/** 아이콘이 없으면 1부터의 번호를 보인다. checkForFinish 를 끄면 끝난 단계도 번호를 그대로 둔다. */
|
|
65
|
+
export declare const IconCheckForFinishOff: Story;
|
|
66
|
+
/** current 가 단계 수와 같으면 모든 단계가 끝남이다. 표시가 모두 체크다. */
|
|
67
|
+
export declare const IconAllFinished: Story;
|
|
68
|
+
/** variant='icon' 의 s·m·l 과 긴 이름이다. 긴 이름은 표시 아래에서 줄을 바꾼다. */
|
|
69
|
+
export declare const IconSizes: Story;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { SwitchLabelProps, SwitchRootProps } from './switch-type';
|
|
2
|
+
import { SwitchLabelProps, SwitchRootProps, SwitchThumbProps } from './switch-type';
|
|
3
3
|
declare const SwitchRoot: import("react").ForwardRefExoticComponent<Omit<PropsWithChildren<SwitchRootProps>, "ref"> & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
4
|
-
Thumb: import("react").ForwardRefExoticComponent<
|
|
5
|
-
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;
|
|
6
|
-
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
Thumb: import("react").ForwardRefExoticComponent<SwitchThumbProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
5
|
Label: import("react").ForwardRefExoticComponent<SwitchLabelProps & {
|
|
8
6
|
children?: import("react").ReactNode | undefined;
|
|
9
7
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { ConfirmMotionProps, PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { TrackProps } from '../logging/logging-type';
|
|
4
5
|
import { sizes } from './switch-props';
|
|
@@ -10,11 +11,13 @@ export interface SwitchRootProps extends Omit<ComponentPropsWithRef<'button'>, '
|
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
className?: string;
|
|
12
13
|
}
|
|
13
|
-
export
|
|
14
|
+
export interface SwitchThumbProps extends ConfirmMotionProps {
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
14
17
|
export interface SwitchLabelProps extends AsChildProps {
|
|
15
18
|
className?: string;
|
|
16
19
|
}
|
|
17
|
-
export interface SwitchProps extends SwitchRootProps, TrackProps {
|
|
20
|
+
export interface SwitchProps extends SwitchRootProps, TrackProps, PressEffectProps, ConfirmMotionProps {
|
|
18
21
|
label?: ReactNode;
|
|
19
22
|
size?: (typeof sizes)[number];
|
|
20
23
|
}
|
|
@@ -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<Omit<import("./switch-type").SwitchProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
size: {
|
|
@@ -17,8 +24,23 @@ declare const meta: {
|
|
|
17
24
|
};
|
|
18
25
|
export default meta;
|
|
19
26
|
type Story = StoryObj<typeof meta>;
|
|
27
|
+
/** 누를 때마다 켜고 꺼지는 기본 스위치다. */
|
|
20
28
|
export declare const Default: Story;
|
|
29
|
+
/** 크기별 스위치다. 모두 켜진 채로 시작한다. */
|
|
21
30
|
export declare const Sizes: Story;
|
|
31
|
+
/** 켜진 상태로 고정된 스위치다. */
|
|
22
32
|
export declare const Checked: Story;
|
|
33
|
+
/** disabled 스위치를 꺼짐과 켜짐으로 나란히 그렸다. 두 상태 모두 흐려지는지 본다. */
|
|
23
34
|
export declare const Disabled: Story;
|
|
35
|
+
/** 라벨 없는 스위치다. 화면에 글이 없고 화면 낭독기는 알림 받기로 읽는다. */
|
|
24
36
|
export declare const WithoutLabel: Story;
|
|
37
|
+
/** 트랙을 누르고 있으면 줄어든다. 오른쪽은 pressEffect={false} */
|
|
38
|
+
export declare const MotionPress: Story;
|
|
39
|
+
/** 손잡이 스프링. weak(기본)과 strong 을 나란히 눌러 본다 */
|
|
40
|
+
export declare const MotionStrength: Story;
|
|
41
|
+
/** 연타. 버튼은 70ms 마다 다섯 번 바꾼다. 손잡이가 지금 위치에서 끊기지 않고 이어 가야 한다 */
|
|
42
|
+
export declare const MotionRapidToggle: Story;
|
|
43
|
+
/** delay 로 차례로 켜진다. 맨 위를 켜면 아래가 80ms 간격으로 따라온다 */
|
|
44
|
+
export declare const MotionDelay: Story;
|
|
45
|
+
/** disabled 를 누르면 흔들린다(pointerdown, Chromium) */
|
|
46
|
+
export declare const MotionDisabledShake: Story;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export declare const variants: readonly ["plain", "padded"];
|
|
2
|
+
export declare const dataTableProps: {
|
|
3
|
+
variant: {
|
|
4
|
+
type: "className";
|
|
5
|
+
className: string;
|
|
6
|
+
values: readonly ["plain", "padded"];
|
|
7
|
+
default: "plain";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
1
10
|
export declare const dataTableHeaderProps: {
|
|
2
11
|
headerHeight: {
|
|
3
12
|
type: "css";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { TrackProps } from '../logging/logging-type';
|
|
4
|
+
import { variants } from './table-props';
|
|
3
5
|
export interface TableProps {
|
|
4
6
|
children: React.ReactNode;
|
|
5
7
|
}
|
|
@@ -17,6 +19,8 @@ export interface RowItem {
|
|
|
17
19
|
id: string;
|
|
18
20
|
value: ReactNode;
|
|
19
21
|
onClickRow?: (id: RowItem['id']) => void;
|
|
22
|
+
/** 열 너비. 헤더 칸과 본문 셀에 같이 붙는다. 숫자는 px. */
|
|
23
|
+
width?: number | string;
|
|
20
24
|
}
|
|
21
25
|
type ColumnsType<T extends readonly RowItem[]> = Array<{
|
|
22
26
|
[K in T[number]['id']]: {
|
|
@@ -24,9 +28,11 @@ type ColumnsType<T extends readonly RowItem[]> = Array<{
|
|
|
24
28
|
onClickCell?: () => void;
|
|
25
29
|
};
|
|
26
30
|
}>;
|
|
27
|
-
export interface DataTableProps<T extends readonly RowItem[]> extends TrackProps {
|
|
31
|
+
export interface DataTableProps<T extends readonly RowItem[]> extends TrackProps, PressEffectProps {
|
|
28
32
|
rows: T;
|
|
29
33
|
columns: ColumnsType<T>;
|
|
34
|
+
/** `padded` 면 셀 여백·글자 기본값과 마지막 고정 열 경계선을 그린다. 기본 `plain` 은 셀 내용이 모양을 정한다. */
|
|
35
|
+
variant?: (typeof variants)[number];
|
|
30
36
|
fixedRowsIndex?: number;
|
|
31
37
|
headerHeight?: number;
|
|
32
38
|
rowHeight?: number;
|
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { DataTableProps } from './table-type';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
5
12
|
component: <T extends readonly import("./table-type").RowItem[]>(props: DataTableProps<T> & import("react").RefAttributes<HTMLTableElement>) => ReturnType<import("react").ForwardRefExoticComponent<DataTableProps<readonly import("./table-type").RowItem[]> & import("react").RefAttributes<HTMLTableElement>>>;
|
|
6
13
|
};
|
|
7
14
|
export default meta;
|
|
@@ -54,6 +61,28 @@ declare const rowItems: readonly [{
|
|
|
54
61
|
readonly id: "15";
|
|
55
62
|
readonly value: import("react/jsx-runtime").JSX.Element;
|
|
56
63
|
}];
|
|
64
|
+
declare const paddedRows: readonly [{
|
|
65
|
+
readonly id: "id";
|
|
66
|
+
readonly value: "ID";
|
|
67
|
+
readonly width: 60;
|
|
68
|
+
}, {
|
|
69
|
+
readonly id: "name";
|
|
70
|
+
readonly value: "Name";
|
|
71
|
+
readonly width: 160;
|
|
72
|
+
}, {
|
|
73
|
+
readonly id: "email";
|
|
74
|
+
readonly value: "Email";
|
|
75
|
+
readonly width: 240;
|
|
76
|
+
}, {
|
|
77
|
+
readonly id: "address";
|
|
78
|
+
readonly value: "Address";
|
|
79
|
+
readonly width: 400;
|
|
80
|
+
}, {
|
|
81
|
+
readonly id: "status";
|
|
82
|
+
readonly value: "Status";
|
|
83
|
+
readonly width: 120;
|
|
84
|
+
}];
|
|
85
|
+
/** 데이터 30행짜리 표다. 스크롤할 때 머리글은 위에, 왼쪽 열은 제자리에 고정되는지 본다. */
|
|
57
86
|
export declare const Default: StoryObj<DataTableProps<typeof rowItems>>;
|
|
58
87
|
declare const smallRows: readonly [{
|
|
59
88
|
readonly id: "id";
|
|
@@ -65,9 +94,26 @@ declare const smallRows: readonly [{
|
|
|
65
94
|
readonly id: "status";
|
|
66
95
|
readonly value: import("react/jsx-runtime").JSX.Element;
|
|
67
96
|
}];
|
|
97
|
+
/** 열 세 개, 행 두 개인 작은 표다. 컨트롤로 머리글 높이와 행 높이를 바꿔 본다. */
|
|
68
98
|
export declare const Small: StoryObj<DataTableProps<typeof smallRows>>;
|
|
69
99
|
/** 행 높이와 헤더 높이는 css prop 이다. */
|
|
70
100
|
export declare const Heights: StoryObj<DataTableProps<typeof smallRows>>;
|
|
71
101
|
/** 행에 마우스를 올리면 배경이 바뀌고, 고정 열은 가로 스크롤에도 남는다. */
|
|
72
102
|
export declare const FixedColumns: StoryObj<DataTableProps<typeof rowItems>>;
|
|
103
|
+
/** padded: 셀 여백·글자 기본값, 마지막 고정 열 경계선. 열 너비는 rows 의 width 로 준다. */
|
|
104
|
+
export declare const Padded: StoryObj<DataTableProps<typeof paddedRows>>;
|
|
105
|
+
/** 데이터가 없는 표다. 빈 상태 문구 없이 머리글만 남는다. */
|
|
73
106
|
export declare const Empty: StoryObj<DataTableProps<typeof smallRows>>;
|
|
107
|
+
declare const pressRows: readonly [{
|
|
108
|
+
readonly id: "id";
|
|
109
|
+
readonly value: import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
}, {
|
|
111
|
+
readonly id: "name";
|
|
112
|
+
readonly value: import("react/jsx-runtime").JSX.Element;
|
|
113
|
+
readonly onClickRow: () => void;
|
|
114
|
+
}, {
|
|
115
|
+
readonly id: "status";
|
|
116
|
+
readonly value: import("react/jsx-runtime").JSX.Element;
|
|
117
|
+
}];
|
|
118
|
+
/** onClickRow 가 있는 헤더 칸(Name)과 onClickCell 이 있는 셀(ID·Status)만 누르는 동안 어두워진다 */
|
|
119
|
+
export declare const MotionPress: StoryObj<DataTableProps<typeof pressRows>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } 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 { variant } from './tabs-props';
|
|
@@ -11,12 +12,14 @@ export interface TabsItem {
|
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
leftIcon?: ReactNode;
|
|
13
14
|
}
|
|
14
|
-
export interface TabsProps extends StyleProps, TrackProps {
|
|
15
|
+
export interface TabsProps extends StyleProps, TrackProps, PressEffectProps {
|
|
15
16
|
items: TabsItem[];
|
|
16
17
|
variant?: TabsVariant;
|
|
17
18
|
value?: TabsValue;
|
|
18
19
|
defaultValue?: TabsValue;
|
|
19
20
|
onValueChange?: (id: TabsValue) => void;
|
|
21
|
+
/** 탭들이 목록 너비를 똑같이 나눠 갖는다(탭 두세 개짜리 모바일 화면). 기본 `false` — 글자 너비로 왼쪽부터 놓이고 넘치면 가로로 민다 */
|
|
22
|
+
fullWidth?: boolean;
|
|
20
23
|
}
|
|
21
24
|
export interface TabsRootProps {
|
|
22
25
|
value?: TabsValue;
|
|
@@ -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("./tabs-type").TabsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
variant: {
|
|
@@ -23,7 +30,17 @@ declare const meta: {
|
|
|
23
30
|
};
|
|
24
31
|
export default meta;
|
|
25
32
|
type Story = StoryObj<typeof meta>;
|
|
33
|
+
/** 탭이 열 개인 underline 탭이다. 목록이 넘쳐 가로로 밀었을 때 왼쪽 끝 화살표를 본다. */
|
|
26
34
|
export declare const Default: Story;
|
|
35
|
+
/** variant 별 탭이다. 골라진 탭을 표시하는 방식 차이를 본다. */
|
|
27
36
|
export declare const Variants: Story;
|
|
37
|
+
/** Option B 가 골라진 채 시작하는 filled 탭이다. */
|
|
28
38
|
export declare const Filled: Story;
|
|
39
|
+
/** 세 번째 탭이 disabled 인 underline 탭이다. 눌러도 골라지지 않는지 본다. */
|
|
29
40
|
export declare const DisabledTab: Story;
|
|
41
|
+
/** 탭을 누르고 있으면 크기는 그대로이고 보라 딤만 진해진다. 아래는 pressEffect={false}. */
|
|
42
|
+
export declare const MotionPress: Story;
|
|
43
|
+
/** 탭을 바꾸면 인디케이터가 옛 자리에서 새 자리로 옮겨 간다(indicate). 폭이 다른 탭 사이에서 폭도 함께 바뀐다. */
|
|
44
|
+
export declare const MotionIndicate: Story;
|
|
45
|
+
/** 좁은 폭에서 목록을 오른쪽으로 밀면 왼쪽 끝에 화살표가 나타나고, 누르면 처음 탭으로 돌아간다 */
|
|
46
|
+
export declare const MotionScrollStart: Story;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
export type TagRootProps = ComponentPropsWithRef<'span'>;
|
|
4
5
|
export type TagRemoveProps = ComponentPropsWithRef<'button'>;
|
|
5
|
-
export interface TagBaseProps extends Omit<ComponentPropsWithRef<'span'>, 'children'>, TrackProps {
|
|
6
|
+
export interface TagBaseProps extends Omit<ComponentPropsWithRef<'span'>, 'children'>, TrackProps, PressEffectProps {
|
|
6
7
|
text: ReactNode;
|
|
7
8
|
}
|
|
8
9
|
/** 지울 수 없는 태그 */
|
|
@@ -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<(Omit<import("./tag-type").StaticTagProps, "ref"> | Omit<import("./tag-type").RemovableTagProps, "ref">) & import("react").RefAttributes<HTMLSpanElement>>;
|
|
5
12
|
args: {
|
|
6
13
|
text: string;
|
|
@@ -12,3 +19,5 @@ export declare const Default: Story;
|
|
|
12
19
|
export declare const Removable: Story;
|
|
13
20
|
/** 여러 값을 고른 모습. X 를 누르면 그 값이 빠진다 */
|
|
14
21
|
export declare const Multiple: Story;
|
|
22
|
+
/** X 를 누르고 있으면 줄어든다. 아래는 pressEffect={false} */
|
|
23
|
+
export declare const MotionPress: Story;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { TextAreaHelperTextProps, TextAreaLabelProps, TextAreaRootProps, TextAreaTextareaProps } from './text-area-type';
|
|
1
|
+
import { TextAreaActionProps, TextAreaHelperTextProps, TextAreaLabelProps, TextAreaRootProps, TextAreaTextareaProps } from './text-area-type';
|
|
2
2
|
declare const TextAreaRoot: {
|
|
3
3
|
(props: TextAreaRootProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
} & {
|
|
6
6
|
Label: import("react").ForwardRefExoticComponent<TextAreaLabelProps & import("react").RefAttributes<HTMLElement>>;
|
|
7
7
|
Textarea: import("react").ForwardRefExoticComponent<Omit<TextAreaTextareaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
8
|
+
Action: import("react").ForwardRefExoticComponent<Omit<TextAreaActionProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
9
|
HelperText: import("react").ForwardRefExoticComponent<TextAreaHelperTextProps & import("react").RefAttributes<HTMLElement>>;
|
|
9
10
|
};
|
|
10
11
|
export default TextAreaRoot;
|
|
@@ -3,9 +3,9 @@ import { TrackProps } from '../logging/logging-type';
|
|
|
3
3
|
import { resize, sizes } from './text-area-props';
|
|
4
4
|
export interface TextAreaRootProps {
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
onChange
|
|
6
|
+
/** controlled·uncontrolled 는 조합형이 정한다 */
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
9
|
}
|
|
10
10
|
export interface TextAreaLabelProps {
|
|
11
11
|
text: ReactNode;
|
|
@@ -17,6 +17,10 @@ export interface TextAreaTextareaProps extends Omit<ComponentPropsWithRef<'texta
|
|
|
17
17
|
className?: string;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
}
|
|
20
|
+
/** 입력 상자 안의 아이콘 버튼. 아이콘뿐이라 읽어 줄 이름이 꼭 있어야 한다 */
|
|
21
|
+
export interface TextAreaActionProps extends Omit<ComponentPropsWithRef<'button'>, 'aria-label' | 'type'> {
|
|
22
|
+
'aria-label': string;
|
|
23
|
+
}
|
|
20
24
|
export interface TextAreaHelperTextProps {
|
|
21
25
|
text: ReactNode;
|
|
22
26
|
className?: string;
|
|
@@ -29,6 +33,10 @@ export interface TextAreaProps extends Omit<ComponentPropsWithRef<'textarea'>, '
|
|
|
29
33
|
title?: ReactNode;
|
|
30
34
|
helperText?: ReactNode;
|
|
31
35
|
isError?: boolean;
|
|
36
|
+
/** 값이 있고 포커스가 안에 있으면 지우기 버튼(X)을 띄운다 */
|
|
37
|
+
clearable?: boolean;
|
|
38
|
+
/** 지우기 버튼으로 지운 뒤 불린다. onChange 는 그 앞에 '' 로 불린다 */
|
|
39
|
+
onClear?: () => void;
|
|
32
40
|
value?: string;
|
|
33
41
|
defaultValue?: string;
|
|
34
42
|
className?: 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<Omit<import("./text-area-type").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
size: {
|
|
@@ -24,9 +31,17 @@ declare const meta: {
|
|
|
24
31
|
};
|
|
25
32
|
export default meta;
|
|
26
33
|
type Story = StoryObj<typeof meta>;
|
|
34
|
+
/** 제목·자리 글·도움말을 단 기본 여러 줄 입력이다. */
|
|
27
35
|
export declare const Default: Story;
|
|
36
|
+
/** 크기별 여러 줄 입력이다. */
|
|
28
37
|
export declare const Sizes: Story;
|
|
38
|
+
/** resize 값별 여러 줄 입력이다. 오른쪽 아래 모서리를 끌어 늘어나는 방향을 본다. */
|
|
29
39
|
export declare const Resize: Story;
|
|
40
|
+
/** 오류 상태 여러 줄 입력이다. 테두리와 도움말이 오류 색으로 바뀌는지 본다. */
|
|
30
41
|
export declare const ErrorState: Story;
|
|
42
|
+
/** disabled 여러 줄 입력이다. */
|
|
31
43
|
export declare const Disabled: Story;
|
|
44
|
+
/** clearable 이면 값이 있고 포커스가 안에 있을 때 첫 줄 오른쪽에 지우기 버튼이 뜬다. */
|
|
45
|
+
export declare const Clearable: Story;
|
|
46
|
+
/** 20자까지만 들어가는 여러 줄 입력이다. 20자를 넘겨 입력해 본다. */
|
|
32
47
|
export declare const MaxLength: Story;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TextFieldHelperTextProps, TextFieldInputProps, TextFieldLabelProps, TextFieldRootProps } from './text-field-type';
|
|
1
|
+
import { TextFieldActionProps, TextFieldHelperTextProps, TextFieldInputProps, TextFieldLabelProps, TextFieldRootProps } from './text-field-type';
|
|
3
2
|
declare const TextFieldRoot: {
|
|
4
|
-
(props:
|
|
3
|
+
(props: TextFieldRootProps): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
displayName: string;
|
|
6
5
|
} & {
|
|
7
|
-
Label:
|
|
8
|
-
Input:
|
|
9
|
-
|
|
6
|
+
Label: import("react").ForwardRefExoticComponent<TextFieldLabelProps & import("react").RefAttributes<HTMLElement>>;
|
|
7
|
+
Input: import("react").ForwardRefExoticComponent<Omit<TextFieldInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
|
+
Prefix: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
9
|
+
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;
|
|
10
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
Suffix: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
12
|
+
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;
|
|
13
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
Action: import("react").ForwardRefExoticComponent<Omit<TextFieldActionProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
HelperText: import("react").ForwardRefExoticComponent<TextFieldHelperTextProps & import("react").RefAttributes<HTMLElement>>;
|
|
10
16
|
};
|
|
11
17
|
export default TextFieldRoot;
|