@nurihaus/web-design-system 3.9.3 → 3.9.5
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 +2 -0
- package/dist/.storybook/migration.d.ts +1 -0
- package/dist/.storybook/usage.d.ts +23 -0
- package/dist/agreement.js +1110 -0
- package/dist/ai/components.md +3506 -250
- package/dist/ai/motion.md +58 -6
- package/dist/ai/tokens.md +53 -25
- package/dist/alphabet-keypad.js +446 -0
- package/dist/asset.js +47 -5
- package/dist/avatar.js +50 -8
- package/dist/bar-chart.js +478 -0
- package/dist/board-row.js +379 -0
- package/dist/border.js +223 -0
- package/dist/bottom-cta.js +378 -0
- package/dist/bottom-info.js +253 -0
- package/dist/bottom-nav.js +12 -64
- package/dist/bottom-sheet.js +608 -0
- package/dist/check-box.js +29 -162
- package/dist/chip-group.js +2 -2
- package/dist/{chunk-5589.js → chunk-1657.js} +2 -34
- package/dist/{chunk-9387.js → chunk-1768.js} +2 -2
- package/dist/chunk-1983.js +37 -1
- package/dist/chunk-2046.js +73 -0
- package/dist/chunk-2060.js +34 -0
- package/dist/chunk-2308.js +184 -0
- package/dist/chunk-2777.js +1 -0
- package/dist/chunk-3091.js +54 -0
- package/dist/chunk-4109.js +115 -0
- package/dist/chunk-4205.js +47 -0
- package/dist/chunk-4324.js +109 -0
- package/dist/chunk-4328.js +69 -0
- package/dist/chunk-4558.js +5 -116
- package/dist/chunk-4917.js +1 -1
- package/dist/chunk-5670.js +1 -29
- package/dist/chunk-6096.js +183 -0
- package/dist/{chunk-8377.js → chunk-6149.js} +2 -36
- package/dist/chunk-6478.js +155 -0
- package/dist/chunk-6499.js +39 -0
- package/dist/chunk-6616.js +84 -0
- package/dist/chunk-674.js +133 -0
- package/dist/chunk-7024.js +152 -0
- package/dist/chunk-7232.js +122 -0
- package/dist/chunk-7298.js +1 -1
- package/dist/chunk-7589.js +40 -0
- package/dist/chunk-7593.js +85 -0
- package/dist/chunk-7653.js +16 -0
- package/dist/chunk-7737.js +21 -0
- package/dist/chunk-7739.js +1 -5
- package/dist/chunk-829.js +38 -0
- package/dist/chunk-8491.js +43 -0
- package/dist/chunk-8787.js +0 -180
- package/dist/chunk-8982.js +186 -0
- package/dist/chunk-910.js +1 -1
- package/dist/chunk-9497.js +11 -1
- package/dist/collapsible-menu.js +3 -3
- package/dist/components/agreement/agreement-props.d.ts +44 -0
- package/dist/components/agreement/agreement-type.d.ts +107 -0
- package/dist/components/agreement/agreement.d.ts +26 -0
- package/dist/components/agreement/agreement.stories.d.ts +72 -0
- package/dist/components/agreement/base-agreement.d.ts +40 -0
- package/dist/components/asset/asset-type.d.ts +34 -1
- package/dist/components/asset/asset.d.ts +4 -2
- package/dist/components/asset/asset.stories.d.ts +6 -0
- package/dist/components/asset/base-asset.d.ts +5 -1
- package/dist/components/bar-chart/bar-chart-fill.d.ts +6 -0
- package/dist/components/bar-chart/bar-chart-props.d.ts +17 -0
- package/dist/components/bar-chart/bar-chart-type.d.ts +52 -0
- package/dist/components/bar-chart/bar-chart.d.ts +4 -0
- package/dist/components/bar-chart/bar-chart.stories.d.ts +65 -0
- package/dist/components/bar-chart/base-bar-chart.d.ts +17 -0
- package/dist/components/board-row/base-board-row.d.ts +13 -0
- package/dist/components/board-row/board-row-props.d.ts +2 -0
- package/dist/components/board-row/board-row-type.d.ts +22 -0
- package/dist/components/board-row/board-row.d.ts +8 -0
- package/dist/components/board-row/board-row.stories.d.ts +32 -0
- package/dist/components/border/base-border.d.ts +4 -0
- package/dist/components/border/border-props.d.ts +10 -0
- package/dist/components/border/border-type.d.ts +7 -0
- package/dist/components/border/border.d.ts +5 -0
- package/dist/components/border/border.stories.d.ts +19 -0
- package/dist/components/bottom-bar/bottom-bar.stories.d.ts +5 -5
- package/dist/components/bottom-cta/base-bottom-cta.d.ts +4 -0
- package/dist/components/bottom-cta/bottom-cta-props.d.ts +10 -0
- package/dist/components/bottom-cta/bottom-cta-type.d.ts +39 -0
- package/dist/components/bottom-cta/bottom-cta.d.ts +35 -0
- package/dist/components/bottom-cta/bottom-cta.stories.d.ts +79 -0
- package/dist/components/bottom-info/base-bottom-info.d.ts +4 -0
- package/dist/components/bottom-info/bottom-info-props.d.ts +1 -0
- package/dist/components/bottom-info/bottom-info-type.d.ts +6 -0
- package/dist/components/bottom-info/bottom-info.d.ts +4 -0
- package/dist/components/bottom-info/bottom-info.stories.d.ts +22 -0
- package/dist/components/bottom-sheet/base-bottom-sheet.d.ts +17 -0
- package/dist/components/bottom-sheet/bottom-sheet-props.d.ts +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-snap.d.ts +15 -0
- package/dist/components/bottom-sheet/bottom-sheet-type.d.ts +55 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +4 -0
- package/dist/components/bottom-sheet/bottom-sheet.stories.d.ts +47 -0
- package/dist/components/check-box/check-box-type.d.ts +3 -0
- package/dist/components/core/composer/index.d.ts +2 -0
- package/dist/components/elements/text/text-props.d.ts +1 -0
- package/dist/components/empty-state/empty-state-props.d.ts +5 -3
- package/dist/components/empty-state/empty-state-type.d.ts +17 -5
- package/dist/components/empty-state/empty-state.d.ts +8 -3
- package/dist/components/empty-state/empty-state.stories.d.ts +301 -9
- package/dist/components/grid-list/base-grid-list.d.ts +10 -0
- package/dist/components/grid-list/grid-list-props.d.ts +11 -0
- package/dist/components/grid-list/grid-list-type.d.ts +24 -0
- package/dist/components/grid-list/grid-list.d.ts +6 -0
- package/dist/components/grid-list/grid-list.stories.d.ts +30 -0
- package/dist/components/highlight/base-highlight.d.ts +14 -0
- package/dist/components/highlight/highlight-props.d.ts +2 -0
- package/dist/components/highlight/highlight-type.d.ts +42 -0
- package/dist/components/highlight/highlight.d.ts +4 -0
- package/dist/components/highlight/highlight.stories.d.ts +31 -0
- package/dist/components/icon/icon-paths.d.ts +16 -0
- package/dist/components/icon/icon.stories.d.ts +1 -1
- package/dist/components/icon-button/icon-button-type.d.ts +2 -0
- package/dist/components/icon-button/icon-button.stories.d.ts +2 -0
- package/dist/components/keypad/alphabet-keypad.d.ts +4 -0
- package/dist/components/keypad/alphabet-keypad.stories.d.ts +24 -0
- package/dist/components/keypad/base-keypad.d.ts +6 -0
- package/dist/components/keypad/full-secure-keypad.d.ts +4 -0
- package/dist/components/keypad/full-secure-keypad.stories.d.ts +26 -0
- package/dist/components/keypad/keypad-layout.d.ts +16 -0
- package/dist/components/keypad/keypad-props.d.ts +16 -0
- package/dist/components/keypad/keypad-type.d.ts +66 -0
- package/dist/components/keypad/number-keypad.d.ts +4 -0
- package/dist/components/keypad/number-keypad.stories.d.ts +26 -0
- package/dist/components/keypad/use-keypad-decoys.d.ts +10 -0
- package/dist/components/list/base-list.d.ts +3 -0
- package/dist/components/list/list-footer.d.ts +5 -0
- package/dist/components/list/list-footer.stories.d.ts +304 -0
- package/dist/components/list/list-group.d.ts +1 -1
- package/dist/components/list/list-group.stories.d.ts +2 -0
- package/dist/components/list/list-header.d.ts +5 -0
- package/dist/components/list/list-header.stories.d.ts +302 -0
- package/dist/components/list/list-props.d.ts +33 -1
- package/dist/components/list/list-row.d.ts +5 -4
- package/dist/components/list/list-row.stories.d.ts +22 -8
- package/dist/components/list/list-type.d.ts +44 -2
- package/dist/components/logging/logging-type.d.ts +1 -1
- package/dist/components/menu/base-menu.d.ts +21 -0
- package/dist/components/menu/menu-props.d.ts +2 -0
- package/dist/components/menu/menu-type.d.ts +70 -0
- package/dist/components/menu/menu.d.ts +8 -0
- package/dist/components/menu/menu.stories.d.ts +54 -0
- package/dist/components/message/message.stories.d.ts +9 -9
- package/dist/components/notice/notice.stories.d.ts +6 -6
- package/dist/components/numeric-spinner/base-numeric-spinner.d.ts +8 -0
- package/dist/components/numeric-spinner/numeric-spinner-props.d.ts +5 -0
- package/dist/components/numeric-spinner/numeric-spinner-type.d.ts +29 -0
- package/dist/components/numeric-spinner/numeric-spinner.d.ts +4 -0
- package/dist/components/numeric-spinner/numeric-spinner.stories.d.ts +36 -0
- package/dist/components/overlay/overlay-context.d.ts +10 -0
- package/dist/components/overlay/overlay-provider.d.ts +1 -1
- package/dist/components/overlay/overlay-type.d.ts +23 -0
- package/dist/components/overlay/overlay.d.ts +2 -1
- package/dist/components/overlay/overlay.stories.d.ts +3 -1
- package/dist/components/overlay/use-bottom-sheet.d.ts +3 -0
- package/dist/components/paragraph/base-paragraph.d.ts +14 -0
- package/dist/components/paragraph/paragraph-props.d.ts +25 -0
- package/dist/components/paragraph/paragraph-type.d.ts +33 -0
- package/dist/components/paragraph/paragraph.d.ts +9 -0
- package/dist/components/paragraph/paragraph.stories.d.ts +54 -0
- package/dist/components/post/base-post.d.ts +19 -0
- package/dist/components/post/post-props.d.ts +31 -0
- package/dist/components/post/post-type.d.ts +34 -0
- package/dist/components/post/post.d.ts +16 -0
- package/dist/components/post/post.stories.d.ts +35 -0
- package/dist/components/rating/base-rating.d.ts +11 -0
- package/dist/components/rating/rating-props.d.ts +11 -0
- package/dist/components/rating/rating-type.d.ts +46 -0
- package/dist/components/rating/rating.d.ts +4 -0
- package/dist/components/rating/rating.stories.d.ts +35 -0
- package/dist/components/search-field/base-search-field.d.ts +4 -0
- package/dist/components/search-field/search-field-props.d.ts +2 -0
- package/dist/components/search-field/search-field-type.d.ts +25 -0
- package/dist/components/search-field/search-field.d.ts +8 -0
- package/dist/components/search-field/search-field.stories.d.ts +39 -0
- package/dist/components/segmented-control/base-segmented-control.d.ts +8 -0
- package/dist/components/segmented-control/segmented-control-props.d.ts +5 -0
- package/dist/components/segmented-control/segmented-control-type.d.ts +31 -0
- package/dist/components/segmented-control/segmented-control.d.ts +4 -0
- package/dist/components/segmented-control/segmented-control.stories.d.ts +39 -0
- package/dist/components/skeleton/skeleton-group.stories.d.ts +1 -1
- package/dist/components/skeleton/skeleton.stories.d.ts +6 -6
- package/dist/components/slider/base-slider.d.ts +13 -0
- package/dist/components/slider/slider-props.d.ts +10 -0
- package/dist/components/slider/slider-type.d.ts +46 -0
- package/dist/components/slider/slider.d.ts +4 -0
- package/dist/components/slider/slider.stories.d.ts +38 -0
- package/dist/components/split-text-field/base-split-text-field.d.ts +4 -0
- package/dist/components/split-text-field/split-text-field-props.d.ts +23 -0
- package/dist/components/split-text-field/split-text-field-type.d.ts +46 -0
- package/dist/components/split-text-field/split-text-field.d.ts +7 -0
- package/dist/components/split-text-field/split-text-field.stories.d.ts +38 -0
- package/dist/components/table-row/base-table-row.d.ts +4 -0
- package/dist/components/table-row/table-row-props.d.ts +14 -0
- package/dist/components/table-row/table-row-type.d.ts +13 -0
- package/dist/components/table-row/table-row.d.ts +5 -0
- package/dist/components/table-row/table-row.stories.d.ts +24 -0
- package/dist/components/text-area/text-area-type.d.ts +3 -2
- package/dist/components/text-button/base-text-button.d.ts +3 -0
- package/dist/components/text-button/text-button-props.d.ts +19 -0
- package/dist/components/text-button/text-button-type.d.ts +17 -0
- package/dist/components/text-button/text-button.d.ts +5 -0
- package/dist/components/text-button/text-button.stories.d.ts +47 -0
- package/dist/components/text-field/text-field-type.d.ts +5 -3
- package/dist/components/toast/toast.stories.d.ts +5 -5
- package/dist/components/top/base-top.d.ts +4 -0
- package/dist/components/top/top-props.d.ts +12 -0
- package/dist/components/top/top-type.d.ts +20 -0
- package/dist/components/top/top.d.ts +5 -0
- package/dist/components/top/top.stories.d.ts +320 -0
- package/dist/components.css +2221 -116
- package/dist/cta-button.js +11 -9
- package/dist/drawer.js +18 -113
- package/dist/drop-down.js +4 -4
- package/dist/empty-state.js +16 -7
- package/dist/full-secure-keypad.js +524 -0
- package/dist/grid-list.js +378 -0
- package/dist/helpers/hooks/useIndicatorPosition.d.ts +7 -0
- package/dist/helpers/hooks/useKeyboardInset.d.ts +5 -0
- package/dist/helpers/hooks/useScrollStart.d.ts +9 -0
- package/dist/helpers/motion/use-reveal-children.d.ts +6 -0
- package/dist/helpers/types/propsDef.d.ts +4 -2
- package/dist/highlight.js +492 -0
- package/dist/icon-button.js +53 -96
- package/dist/icon-text-badge.js +5 -3
- package/dist/icon-text-option-badge.js +4 -2
- package/dist/index.d.ts +52 -4
- package/dist/index.js +11271 -4671
- package/dist/list-footer.js +339 -0
- package/dist/list-group.js +61 -18
- package/dist/list-header.js +293 -0
- package/dist/list-row.js +243 -26
- package/dist/loading.js +7 -5
- package/dist/media-thumbnail.js +6 -6
- package/dist/menu.js +527 -0
- package/dist/message-composer.js +2 -2
- package/dist/modal-with-double-button.js +17 -13
- package/dist/modal.js +9 -7
- package/dist/notice.js +14 -12
- package/dist/number-keypad.js +436 -0
- package/dist/numeric-spinner.js +396 -0
- package/dist/option-badge.js +5 -3
- package/dist/overlay.js +555 -21
- package/dist/pagination.js +2 -2
- package/dist/paragraph.js +286 -0
- package/dist/post.js +568 -0
- package/dist/radio.js +5 -3
- package/dist/rating.js +437 -0
- package/dist/scripts/usage-doc.d.mts +83 -0
- package/dist/search-field.js +523 -0
- package/dist/segmented-control.js +409 -0
- package/dist/skeleton-group.js +28 -151
- package/dist/skeleton.js +3 -1
- package/dist/slider.js +419 -0
- package/dist/split-text-field.js +498 -0
- package/dist/styles.css +1926 -159
- package/dist/switch.js +5 -3
- package/dist/table-row.js +284 -0
- package/dist/tabs.js +13 -69
- package/dist/text-area.js +26 -15
- package/dist/text-button.js +357 -0
- package/dist/text-field.js +56 -206
- package/dist/text.js +5 -7
- package/dist/toast.js +15 -13
- package/dist/tokens.css +66 -10
- package/dist/tooltip.js +2 -2
- package/dist/top.js +312 -0
- package/package.json +107 -2
- package/dist/chunk-3839.js +0 -54
|
@@ -0,0 +1,38 @@
|
|
|
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("./split-text-field-type").SplitTextFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: "inline-radio";
|
|
15
|
+
options: readonly ["xs", "s", "m", "l", "xl"];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
args: {
|
|
19
|
+
title: string;
|
|
20
|
+
width: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
/** 13자리. 앞 칸 6자리를 채우면 뒤 칸으로 넘어가고 뒤 7자리는 가려진다. */
|
|
26
|
+
export declare const RRN13: Story;
|
|
27
|
+
/** 생년월일 6자리와 성별 한 자리. 나머지 6자리는 점으로만 보인다. */
|
|
28
|
+
export declare const RRNFirst7: Story;
|
|
29
|
+
/** xs·s·m·l·xl 다섯 크기다. TextField 와 같은 높이·글자 단계다. */
|
|
30
|
+
export declare const Sizes: Story;
|
|
31
|
+
/** onChange 는 두 칸을 이은 숫자열을 받는다. 가림과 상관없이 숫자 그대로다. 아래 글이 실제 값이다. */
|
|
32
|
+
export declare const Controlled: Story;
|
|
33
|
+
/** mask 로 뒤 칸 가림을 켜고 끈다. RRN13 은 기본으로 가리고 RRNFirst7 은 기본으로 보인다. */
|
|
34
|
+
export declare const Mask: Story;
|
|
35
|
+
/** helperText 는 회색 안내, isError 면 테두리와 문구가 빨개지고 두 칸에 aria-invalid 가 붙는다. */
|
|
36
|
+
export declare const HelperAndError: Story;
|
|
37
|
+
/** disabled 는 두 칸을, first·second 의 disabled 는 한 칸만 끈다. placeholder 도 칸마다 준다. */
|
|
38
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseTableRow: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default BaseTableRow;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** space-between 은 값을 오른쪽 끝에, left 는 라벨 바로 뒤에 붙인다 */
|
|
2
|
+
export declare const align: readonly ["space-between", "left"];
|
|
3
|
+
export declare const tableRowProps: {
|
|
4
|
+
align: {
|
|
5
|
+
type: "className";
|
|
6
|
+
className: string;
|
|
7
|
+
values: readonly ["space-between", "left"];
|
|
8
|
+
default: "space-between";
|
|
9
|
+
};
|
|
10
|
+
leftRatio: {
|
|
11
|
+
type: "css";
|
|
12
|
+
key: "--table-row-left-ratio";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { align } from './table-row-props';
|
|
3
|
+
export type BaseTableRowProps = ComponentPropsWithRef<'div'>;
|
|
4
|
+
export interface TableRowProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
|
|
5
|
+
/** 왼쪽 라벨. sm 회색 */
|
|
6
|
+
left: ReactNode;
|
|
7
|
+
/** 오른쪽 값. sm medium */
|
|
8
|
+
right: ReactNode;
|
|
9
|
+
/** 값의 자리. 기본 space-between(오른쪽 끝) */
|
|
10
|
+
align?: (typeof align)[number];
|
|
11
|
+
/** 왼쪽 칸이 줄 폭에서 차지하는 퍼센트(0~100). 없으면 라벨 글자 폭 */
|
|
12
|
+
leftRatio?: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TableRowProps } from './table-row-type';
|
|
2
|
+
/** 요약 화면의 이름–값 한 줄. 라벨은 왼쪽, 값은 오른쪽 끝이나 라벨 바로 뒤 */
|
|
3
|
+
declare const TableRow: import("react").ForwardRefExoticComponent<Omit<TableRowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default TableRow;
|
|
5
|
+
export type { TableRowProps } from './table-row-type';
|
|
@@ -0,0 +1,24 @@
|
|
|
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<Omit<import("./table-row-type").TableRowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
args: {
|
|
13
|
+
left: string;
|
|
14
|
+
right: string;
|
|
15
|
+
};
|
|
16
|
+
render: (args: Omit<import("./table-row-type").TableRowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const Default: Story;
|
|
21
|
+
/** align='left' 면 값이 라벨 바로 뒤에 붙는다. leftRatio 로 라벨 칸 폭을 맞추면 줄끼리 세로로 정렬된다 */
|
|
22
|
+
export declare const AlignLeft: Story;
|
|
23
|
+
/** 값이 길면 줄을 바꾼다 */
|
|
24
|
+
export declare const LongValue: Story;
|
|
@@ -3,8 +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
|
-
value
|
|
6
|
+
/** 없으면 uncontrolled — DOM 이 값을 쥔다 (react-hook-form register 가 ref 로 넣은 값이 남는다) */
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
8
9
|
onChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
10
|
}
|
|
10
11
|
export interface TextAreaLabelProps {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const variant: readonly ["clear", "arrow", "underline"];
|
|
2
|
+
export declare const color: readonly ["primary", "neutral"];
|
|
3
|
+
export declare const sizes: readonly ["s", "m", "l"];
|
|
4
|
+
export declare const defaultSize: (typeof sizes)[number];
|
|
5
|
+
export declare const textButtonProps: {
|
|
6
|
+
variant: {
|
|
7
|
+
type: "className";
|
|
8
|
+
className: string;
|
|
9
|
+
values: readonly ["clear", "arrow", "underline"];
|
|
10
|
+
default: "clear";
|
|
11
|
+
};
|
|
12
|
+
color: {
|
|
13
|
+
type: "className";
|
|
14
|
+
className: string;
|
|
15
|
+
values: readonly ["primary", "neutral"];
|
|
16
|
+
default: "primary";
|
|
17
|
+
};
|
|
18
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
3
|
+
import { AsChildProps } from '../../helpers/types/common-props';
|
|
4
|
+
import { TrackProps } from '../logging/logging-type';
|
|
5
|
+
import { color, sizes, variant } from './text-button-props';
|
|
6
|
+
export interface BaseTextButtonProps extends ComponentPropsWithRef<'button'>, AsChildProps {
|
|
7
|
+
}
|
|
8
|
+
export interface TextButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children' | 'color'>, AsChildProps, TrackProps, PressEffectProps {
|
|
9
|
+
text: ReactNode;
|
|
10
|
+
/** `clear`(기본) 글자만, `arrow` 오른쪽 화살표, `underline` 밑줄 */
|
|
11
|
+
variant?: (typeof variant)[number];
|
|
12
|
+
/** 무슨 색. 역할 이름이고 토큰 이름이 아니다. 기본 `primary` */
|
|
13
|
+
color?: (typeof color)[number];
|
|
14
|
+
size?: (typeof sizes)[number];
|
|
15
|
+
/** asChild 일 때 링크 요소 하나(`<a>`·라우터 Link). 글자는 그 안에 들어간다 */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TextButtonProps } from './text-button-type';
|
|
2
|
+
/** 글자만 있는 버튼. 링크를 넘기면 그 링크가 버튼 모양이 된다 */
|
|
3
|
+
declare const TextButton: import("react").ForwardRefExoticComponent<Omit<TextButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export default TextButton;
|
|
5
|
+
export type { TextButtonProps } from './text-button-type';
|
|
@@ -0,0 +1,47 @@
|
|
|
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<Omit<import("./text-button-type").TextButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
args: {
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
argTypes: {
|
|
16
|
+
variant: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select";
|
|
19
|
+
};
|
|
20
|
+
options: readonly ["clear", "arrow", "underline"];
|
|
21
|
+
};
|
|
22
|
+
color: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "select";
|
|
25
|
+
};
|
|
26
|
+
options: readonly ["primary", "neutral"];
|
|
27
|
+
};
|
|
28
|
+
size: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select";
|
|
31
|
+
};
|
|
32
|
+
options: readonly ["s", "m", "l"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default meta;
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
export declare const Default: Story;
|
|
39
|
+
/** 종류 × 색 */
|
|
40
|
+
export declare const Variants: Story;
|
|
41
|
+
/** 글자 sm·base·lg */
|
|
42
|
+
export declare const Sizes: Story;
|
|
43
|
+
export declare const Disabled: Story;
|
|
44
|
+
/** 다른 화면으로 가는 버튼은 링크를 감싼다 */
|
|
45
|
+
export declare const AsLink: Story;
|
|
46
|
+
/** 누르고 있으면 흐려진다. 아래는 pressEffect={false} */
|
|
47
|
+
export declare const MotionPress: Story;
|
|
@@ -9,8 +9,9 @@ export interface TextFieldFormat {
|
|
|
9
9
|
}
|
|
10
10
|
export interface TextFieldRootProps {
|
|
11
11
|
children: ReactNode;
|
|
12
|
-
/** raw 값.
|
|
13
|
-
value
|
|
12
|
+
/** raw 값. 없으면 uncontrolled — DOM 이 값을 쥔다 (react-hook-form register 가 ref 로 넣은 값이 남는다) */
|
|
13
|
+
value?: string;
|
|
14
|
+
defaultValue?: string;
|
|
14
15
|
format?: TextFieldFormat;
|
|
15
16
|
/** event.target.value 는 이미 raw 로 되돌려져 있다 */
|
|
16
17
|
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -21,7 +22,8 @@ export interface TextFieldLabelProps {
|
|
|
21
22
|
}
|
|
22
23
|
export interface TextFieldInputProps extends Omit<ComponentPropsWithRef<'input'>, 'title' | 'size'> {
|
|
23
24
|
placeholder?: string;
|
|
24
|
-
|
|
25
|
+
/** TextField 는 늘 준다. 여러 칸이 값 하나를 이루는 조합(SplitTextField)은 칸에 주지 않고 hidden input 에 준다 */
|
|
26
|
+
name?: string;
|
|
25
27
|
className?: string;
|
|
26
28
|
disabled?: boolean;
|
|
27
29
|
}
|
|
@@ -24,11 +24,8 @@ declare const meta: {
|
|
|
24
24
|
variant: "default";
|
|
25
25
|
};
|
|
26
26
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
27
|
-
|
|
27
|
+
className?: string | undefined;
|
|
28
28
|
style?: import("react").CSSProperties | undefined;
|
|
29
|
-
title: import("react").ReactNode;
|
|
30
|
-
track?: string | undefined;
|
|
31
|
-
key?: import("react").Key | null | undefined;
|
|
32
29
|
defaultChecked?: boolean | undefined | undefined;
|
|
33
30
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
34
31
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -36,7 +33,6 @@ declare const meta: {
|
|
|
36
33
|
accessKey?: string | undefined | undefined;
|
|
37
34
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
38
35
|
autoFocus?: boolean | undefined | undefined;
|
|
39
|
-
className?: string | undefined;
|
|
40
36
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
41
37
|
contextMenu?: string | undefined | undefined;
|
|
42
38
|
dir?: string | undefined | undefined;
|
|
@@ -46,8 +42,10 @@ declare const meta: {
|
|
|
46
42
|
id?: string | undefined | undefined;
|
|
47
43
|
lang?: string | undefined | undefined;
|
|
48
44
|
nonce?: string | undefined | undefined;
|
|
45
|
+
slot?: string | undefined | undefined;
|
|
49
46
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
50
47
|
tabIndex?: number | undefined | undefined;
|
|
48
|
+
title: import("react").ReactNode;
|
|
51
49
|
translate?: "yes" | "no" | undefined | undefined;
|
|
52
50
|
radioGroup?: string | undefined | undefined;
|
|
53
51
|
role?: import("react").AriaRole | undefined;
|
|
@@ -291,6 +289,8 @@ declare const meta: {
|
|
|
291
289
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLLIElement> | undefined;
|
|
292
290
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
293
291
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
292
|
+
track?: string | undefined;
|
|
293
|
+
key?: import("react").Key | null | undefined;
|
|
294
294
|
value?: string | number | readonly string[] | undefined;
|
|
295
295
|
variant?: (typeof variants)[number] | undefined;
|
|
296
296
|
trackProps?: Record<string, string | number | boolean> | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseTop: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLElement | 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<HTMLElement> | null | undefined;
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
4
|
+
export default BaseTop;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** 제목 단계. 문서 개요에서의 자리만 정하고 글자 크기는 같다 */
|
|
2
|
+
export declare const titleLevel: readonly [1, 2, 3];
|
|
3
|
+
/** right 를 제목 묶음의 위에 맞출지 가운데에 맞출지 */
|
|
4
|
+
export declare const rightVerticalAlign: readonly ["top", "center"];
|
|
5
|
+
export declare const topProps: {
|
|
6
|
+
rightVerticalAlign: {
|
|
7
|
+
type: "className";
|
|
8
|
+
className: string;
|
|
9
|
+
values: readonly ["top", "center"];
|
|
10
|
+
default: "top";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { rightVerticalAlign, titleLevel } from './top-props';
|
|
3
|
+
export type TopTitleLevel = (typeof titleLevel)[number];
|
|
4
|
+
export type BaseTopProps = ComponentPropsWithRef<'header'>;
|
|
5
|
+
export interface TopProps extends Omit<ComponentPropsWithRef<'header'>, 'title' | 'children'> {
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
/** 1 → h1, 2 → h2, 3 → h3. 기본 1. 글자 크기는 바뀌지 않는다 */
|
|
8
|
+
titleLevel?: TopTitleLevel;
|
|
9
|
+
/** 제목 바로 위 작은 글 */
|
|
10
|
+
subtitleTop?: ReactNode;
|
|
11
|
+
/** 제목 바로 아래 작은 회색 글 */
|
|
12
|
+
subtitleBottom?: ReactNode;
|
|
13
|
+
/** 제목 묶음 위. 보통 Asset */
|
|
14
|
+
upper?: ReactNode;
|
|
15
|
+
/** 제목 묶음 아래. 보통 버튼 한두 개 */
|
|
16
|
+
lower?: ReactNode;
|
|
17
|
+
/** 제목 묶음 오른쪽. 폭을 줄이지 않고 제목이 줄바꿈한다 */
|
|
18
|
+
right?: ReactNode;
|
|
19
|
+
rightVerticalAlign?: (typeof rightVerticalAlign)[number];
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TopProps } from './top-type';
|
|
2
|
+
/** 화면 맨 위 제목 묶음. 위·아래 보조 글, 제목 위 그림, 제목 아래 버튼, 오른쪽 요소 */
|
|
3
|
+
declare const Top: import("react").ForwardRefExoticComponent<Omit<TopProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
4
|
+
export default Top;
|
|
5
|
+
export type { TopProps, TopTitleLevel } from './top-type';
|