@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,54 @@
|
|
|
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("./menu-type").MenuProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
12
|
+
Item: import("react").ForwardRefExoticComponent<import("./menu-type").MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
CheckItem: import("react").ForwardRefExoticComponent<import("./menu-type").MenuCheckItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Separator: import("react").ForwardRefExoticComponent<import("../../helpers/types/common-props").StyleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
side: {
|
|
18
|
+
control: {
|
|
19
|
+
type: "select";
|
|
20
|
+
};
|
|
21
|
+
options: readonly ["top", "bottom", "left", "right"];
|
|
22
|
+
};
|
|
23
|
+
align: {
|
|
24
|
+
control: {
|
|
25
|
+
type: "select";
|
|
26
|
+
};
|
|
27
|
+
options: readonly ["start", "center", "end"];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
args: {
|
|
31
|
+
trigger: import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
children: import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
/** 더보기 버튼을 누르면 아래에 행동 목록이 펼쳐진다. 항목이 위에서부터 차례로 나타난다. */
|
|
38
|
+
export declare const Default: Story;
|
|
39
|
+
/** 맨 위 제목 줄을 단 메뉴다. */
|
|
40
|
+
export declare const WithHeader: Story;
|
|
41
|
+
/** 라벨 뒤에 단축키를 단 항목이다. */
|
|
42
|
+
export declare const WithRight: Story;
|
|
43
|
+
/** 켜고 끄는 항목이다. 켜진 항목 오른쪽에 체크가 붙는다. */
|
|
44
|
+
export declare const CheckItems: Story;
|
|
45
|
+
/** 꺼진 항목은 흐리고 눌리지 않는다. 키보드 이동도 건너뛴다. */
|
|
46
|
+
export declare const Disabled: Story;
|
|
47
|
+
/** 링크 항목이다. asChild 로 a 하나가 항목이 된다. */
|
|
48
|
+
export declare const Link: Story;
|
|
49
|
+
/** 네 방향으로 펼친다. 버튼마다 목록이 어느 쪽에서 펼쳐지는지 본다. */
|
|
50
|
+
export declare const Sides: Story;
|
|
51
|
+
/** 같은 아래 방향에서 트리거의 시작·가운데·끝에 맞춘다. */
|
|
52
|
+
export declare const Aligns: Story;
|
|
53
|
+
/** 바깥 버튼으로 열고 닫는다. 항목을 골라 닫혀도 버튼 문구가 돌아오는지 본다. */
|
|
54
|
+
export declare const Controlled: Story;
|
|
@@ -29,11 +29,9 @@ declare const meta: {
|
|
|
29
29
|
time: string;
|
|
30
30
|
};
|
|
31
31
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
32
|
-
|
|
32
|
+
className?: string | undefined | undefined;
|
|
33
33
|
style?: import("react").CSSProperties | undefined;
|
|
34
|
-
|
|
35
|
-
title?: string | undefined | undefined;
|
|
36
|
-
key?: import("react").Key | null | undefined;
|
|
34
|
+
children?: import("react").ReactNode;
|
|
37
35
|
defaultChecked?: boolean | undefined | undefined;
|
|
38
36
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
39
37
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -41,7 +39,6 @@ declare const meta: {
|
|
|
41
39
|
accessKey?: string | undefined | undefined;
|
|
42
40
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
43
41
|
autoFocus?: boolean | undefined | undefined;
|
|
44
|
-
className?: string | undefined | undefined;
|
|
45
42
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
46
43
|
contextMenu?: string | undefined | undefined;
|
|
47
44
|
dir?: string | undefined | undefined;
|
|
@@ -51,8 +48,10 @@ declare const meta: {
|
|
|
51
48
|
id?: string | undefined | undefined;
|
|
52
49
|
lang?: string | undefined | undefined;
|
|
53
50
|
nonce?: string | undefined | undefined;
|
|
51
|
+
slot?: string | undefined | undefined;
|
|
54
52
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
55
53
|
tabIndex?: number | undefined | undefined;
|
|
54
|
+
title?: string | undefined | undefined;
|
|
56
55
|
translate?: "yes" | "no" | undefined | undefined;
|
|
57
56
|
radioGroup?: string | undefined | undefined;
|
|
58
57
|
role?: import("react").AriaRole | undefined;
|
|
@@ -135,7 +134,6 @@ declare const meta: {
|
|
|
135
134
|
"aria-valuemin"?: number | undefined | undefined;
|
|
136
135
|
"aria-valuenow"?: number | undefined | undefined;
|
|
137
136
|
"aria-valuetext"?: string | undefined | undefined;
|
|
138
|
-
children?: import("react").ReactNode;
|
|
139
137
|
dangerouslySetInnerHTML?: {
|
|
140
138
|
__html: string | TrustedHTML;
|
|
141
139
|
} | undefined | undefined;
|
|
@@ -297,12 +295,14 @@ declare const meta: {
|
|
|
297
295
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLLIElement> | undefined;
|
|
298
296
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
299
297
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
300
|
-
|
|
298
|
+
time?: import("react").ReactNode;
|
|
299
|
+
key?: import("react").Key | null | undefined;
|
|
301
300
|
name?: import("react").ReactNode;
|
|
302
|
-
motion?: (typeof motion)[number] | undefined;
|
|
303
301
|
value?: string | number | readonly string[] | undefined;
|
|
304
|
-
|
|
302
|
+
motion?: (typeof motion)[number] | undefined;
|
|
303
|
+
media?: import("react").ReactNode;
|
|
305
304
|
dateTime?: string | undefined;
|
|
305
|
+
side?: (typeof side)[number] | undefined;
|
|
306
306
|
ref?: import("react").LegacyRef<HTMLLIElement> | undefined;
|
|
307
307
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
308
308
|
};
|
|
@@ -28,10 +28,9 @@ declare const meta: {
|
|
|
28
28
|
children: string;
|
|
29
29
|
};
|
|
30
30
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
31
|
-
|
|
31
|
+
className?: string | undefined | undefined;
|
|
32
32
|
style?: import("react").CSSProperties | undefined;
|
|
33
|
-
|
|
34
|
-
key?: import("react").Key | null | undefined;
|
|
33
|
+
children: import("react").ReactNode;
|
|
35
34
|
defaultChecked?: boolean | undefined | undefined;
|
|
36
35
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
37
36
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -39,7 +38,6 @@ declare const meta: {
|
|
|
39
38
|
accessKey?: string | undefined | undefined;
|
|
40
39
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
41
40
|
autoFocus?: boolean | undefined | undefined;
|
|
42
|
-
className?: string | undefined | undefined;
|
|
43
41
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
44
42
|
contextMenu?: string | undefined | undefined;
|
|
45
43
|
dir?: string | undefined | undefined;
|
|
@@ -49,8 +47,10 @@ declare const meta: {
|
|
|
49
47
|
id?: string | undefined | undefined;
|
|
50
48
|
lang?: string | undefined | undefined;
|
|
51
49
|
nonce?: string | undefined | undefined;
|
|
50
|
+
slot?: string | undefined | undefined;
|
|
52
51
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
53
52
|
tabIndex?: number | undefined | undefined;
|
|
53
|
+
title?: import("react").ReactNode;
|
|
54
54
|
translate?: "yes" | "no" | undefined | undefined;
|
|
55
55
|
radioGroup?: string | undefined | undefined;
|
|
56
56
|
role?: import("react").AriaRole | undefined;
|
|
@@ -133,7 +133,6 @@ declare const meta: {
|
|
|
133
133
|
"aria-valuemin"?: number | undefined | undefined;
|
|
134
134
|
"aria-valuenow"?: number | undefined | undefined;
|
|
135
135
|
"aria-valuetext"?: string | undefined | undefined;
|
|
136
|
-
children: import("react").ReactNode;
|
|
137
136
|
dangerouslySetInnerHTML?: {
|
|
138
137
|
__html: string | TrustedHTML;
|
|
139
138
|
} | undefined | undefined;
|
|
@@ -295,8 +294,9 @@ declare const meta: {
|
|
|
295
294
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
296
295
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
297
296
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
298
|
-
|
|
297
|
+
key?: import("react").Key | null | undefined;
|
|
299
298
|
variant?: (typeof variant)[number] | undefined;
|
|
299
|
+
motion?: (typeof motion)[number] | undefined;
|
|
300
300
|
action?: import("./notice-type").NoticeAction | undefined;
|
|
301
301
|
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
302
302
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NumericSpinnerButtonProps, NumericSpinnerRootProps } from './numeric-spinner-type';
|
|
2
|
+
declare const NumericSpinnerRoot: import("react").ForwardRefExoticComponent<Omit<NumericSpinnerRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
Button: import("react").ForwardRefExoticComponent<Omit<NumericSpinnerButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
Value: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
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>>;
|
|
7
|
+
};
|
|
8
|
+
export default NumericSpinnerRoot;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
3
|
+
import { StyleProps } from '../../helpers/types/common-props';
|
|
4
|
+
import { TrackProps } from '../logging/logging-type';
|
|
5
|
+
import { sizes } from './numeric-spinner-props';
|
|
6
|
+
export interface NumericSpinnerProps extends StyleProps, TrackProps, PressEffectProps {
|
|
7
|
+
/** 정수. 1 씩 바뀐다 */
|
|
8
|
+
value?: number;
|
|
9
|
+
defaultValue?: number;
|
|
10
|
+
onValueChange?: (value: number) => void;
|
|
11
|
+
/** 기본 0. 값이 여기면 빼기 버튼이 막힌다 */
|
|
12
|
+
min?: number;
|
|
13
|
+
/** 기본 999. 값이 여기면 더하기 버튼이 막힌다 */
|
|
14
|
+
max?: number;
|
|
15
|
+
size?: (typeof sizes)[number];
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** 빼기 버튼의 aria-label. 기본 '빼기' */
|
|
18
|
+
decreaseLabel?: string;
|
|
19
|
+
/** 더하기 버튼의 aria-label. 기본 '더하기' */
|
|
20
|
+
increaseLabel?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface NumericSpinnerRootProps extends ComponentPropsWithRef<'div'> {
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface NumericSpinnerButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'type' | 'aria-label'> {
|
|
26
|
+
/** 아이콘만 있는 버튼이라 이름이 꼭 필요하다 */
|
|
27
|
+
'aria-label': string;
|
|
28
|
+
}
|
|
29
|
+
export type NumericSpinnerValueProps = ComponentPropsWithRef<'span'>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NumericSpinnerProps } from './numeric-spinner-type';
|
|
2
|
+
declare const NumericSpinner: import("react").ForwardRefExoticComponent<NumericSpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default NumericSpinner;
|
|
4
|
+
export type { NumericSpinnerProps } from './numeric-spinner-type';
|
|
@@ -0,0 +1,36 @@
|
|
|
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("./numeric-spinner-type").NumericSpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "select";
|
|
16
|
+
};
|
|
17
|
+
options: readonly ["xs", "s", "m", "l"];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
args: {
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
/** 더하기·빼기로 1 씩 바뀐다. 0 이나 10 에 닿으면 그쪽 버튼이 막힌다. */
|
|
28
|
+
export declare const Default: Story;
|
|
29
|
+
/** 네 크기. 높이는 컨트롤 높이(28·36·40·44)다. */
|
|
30
|
+
export declare const Sizes: Story;
|
|
31
|
+
/** 값이 끝에 있다. 막힌 쪽 버튼을 누르면 전체가 흔들린다. */
|
|
32
|
+
export declare const AtBoundary: Story;
|
|
33
|
+
/** 바꿀 수 없는 상태. */
|
|
34
|
+
export declare const Disabled: Story;
|
|
35
|
+
/** 버튼을 누르고 있으면 살짝 줄어든다. 오른쪽은 pressEffect={false} */
|
|
36
|
+
export declare const MotionPress: Story;
|
|
@@ -20,12 +20,22 @@ export type OverlayEntry = {
|
|
|
20
20
|
phase: OverlayPhase;
|
|
21
21
|
render: OverlayRender;
|
|
22
22
|
resolve: (result: ConfirmResult) => void;
|
|
23
|
+
} | {
|
|
24
|
+
id: number;
|
|
25
|
+
kind: 'sheet';
|
|
26
|
+
phase: OverlayPhase;
|
|
27
|
+
render: OverlayRender;
|
|
28
|
+
resolve: (value: unknown) => void;
|
|
23
29
|
};
|
|
24
30
|
/** 같은 답을 두 번 줘도, 닫히는 중에 다시 줘도 처음 것만 남는다 */
|
|
25
31
|
export type SettleDialog = (result: ConfirmResult) => void;
|
|
32
|
+
/** 고른 값으로 닫는다. 값 없이 부르면 고르지 않고 닫은 것이다. 처음 것만 남는다 */
|
|
33
|
+
export type SettleSheet = (value?: unknown) => void;
|
|
26
34
|
export interface OverlayController {
|
|
27
35
|
openDialog: (build: (settle: SettleDialog) => OverlayRender) => Promise<ConfirmResult>;
|
|
28
36
|
closeTopDialog: () => void;
|
|
37
|
+
openSheet: (build: (settle: SettleSheet) => OverlayRender) => Promise<unknown>;
|
|
38
|
+
closeTopSheet: () => void;
|
|
29
39
|
showToast: (build: (dismiss: () => void) => OverlayRender) => number;
|
|
30
40
|
dismissToast: (id: number) => void;
|
|
31
41
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OverlayProviderProps } from './overlay-type';
|
|
2
|
-
/** 앱 루트에 한 번 둔다. useDialog · useToast 가 여는 오버레이를 children 뒤에 쌓아 그린다. ToastProvider 를 품는다 */
|
|
2
|
+
/** 앱 루트에 한 번 둔다. useDialog · useToast · useBottomSheet 가 여는 오버레이를 children 뒤에 쌓아 그린다. ToastProvider 를 품는다 */
|
|
3
3
|
export declare const OverlayProvider: {
|
|
4
4
|
(props: OverlayProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SnapPoint } from '../bottom-sheet/bottom-sheet-snap';
|
|
2
3
|
import type { Color } from '../button/button-type';
|
|
3
4
|
import type { ToastProps, ToastProviderProps } from '../toast/toast-type';
|
|
4
5
|
export interface OverlayProviderProps extends Omit<ToastProviderProps, 'portalContainer'> {
|
|
@@ -43,3 +44,25 @@ export interface UseToastReturn {
|
|
|
43
44
|
/** 그 토스트를 닫는다. 이미 닫혔으면 아무 일도 없다 */
|
|
44
45
|
dismiss: (id: number) => void;
|
|
45
46
|
}
|
|
47
|
+
/** content · footer 가 받는 것. `close(value)` 는 그 값으로, `close()` 는 값 없이 닫는다 */
|
|
48
|
+
export interface BottomSheetRenderState<T> {
|
|
49
|
+
close: (value?: T) => void;
|
|
50
|
+
}
|
|
51
|
+
export interface BottomSheetOpenOptions<T> {
|
|
52
|
+
title: ReactNode;
|
|
53
|
+
description?: ReactNode;
|
|
54
|
+
content: (state: BottomSheetRenderState<T>) => ReactNode;
|
|
55
|
+
footer?: (state: BottomSheetRenderState<T>) => ReactNode;
|
|
56
|
+
/** BottomSheet 의 snapPoints. 없으면 내용 높이 */
|
|
57
|
+
snapPoints?: SnapPoint[];
|
|
58
|
+
/** false 면 바깥 누름·아래로 끌기·Esc·뒤로 가기로 닫히지 않는다. `close()` 로만 닫는다. 기본 true */
|
|
59
|
+
dismissible?: boolean;
|
|
60
|
+
/** BottomSheet 의 `track`. 열고 닫을 때 `open` · `close` 를 보낸다 */
|
|
61
|
+
track?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UseBottomSheetReturn {
|
|
64
|
+
/** 시트를 열고 고른 값을 돌려준다. 바깥 누름 · 끌어 내리기 · Esc · 뒤로 가기 · 값 없는 `close()` 면 undefined */
|
|
65
|
+
open: <T>(options: BottomSheetOpenOptions<T>) => Promise<T | undefined>;
|
|
66
|
+
/** 맨 위 시트를 undefined 로 닫는다. 열린 것이 없으면 아무 일도 없다 */
|
|
67
|
+
close: () => void;
|
|
68
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { OverlayProvider } from './overlay-provider';
|
|
2
|
+
export { useBottomSheet } from './use-bottom-sheet';
|
|
2
3
|
export { useDialog } from './use-dialog';
|
|
3
4
|
export { useToast } from './use-toast';
|
|
4
|
-
export type { OverlayProviderProps, ConfirmResult, DialogAlertOptions, DialogConfirmOptions, UseDialogReturn, ToastShowOptions, UseToastReturn, } from './overlay-type';
|
|
5
|
+
export type { OverlayProviderProps, ConfirmResult, DialogAlertOptions, DialogConfirmOptions, UseDialogReturn, ToastShowOptions, UseToastReturn, BottomSheetOpenOptions, BottomSheetRenderState, UseBottomSheetReturn, } from './overlay-type';
|
|
@@ -18,8 +18,8 @@ declare const meta: {
|
|
|
18
18
|
};
|
|
19
19
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
20
20
|
portalContainer?: HTMLElement | undefined;
|
|
21
|
-
label?: string | undefined;
|
|
22
21
|
children: import("react").ReactNode;
|
|
22
|
+
label?: string | undefined;
|
|
23
23
|
position?: typeof import("../toast/toast-props").positions[number] | undefined;
|
|
24
24
|
duration?: number | undefined;
|
|
25
25
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
@@ -32,3 +32,5 @@ export declare const Default: Story;
|
|
|
32
32
|
export declare const AsyncConfirm: Story;
|
|
33
33
|
/** show 는 id 를 바로 돌려준다. dismiss(id) 로 그 토스트만 닫는다. */
|
|
34
34
|
export declare const Toast: Story;
|
|
35
|
+
/** 고르면 그 값이, 바깥 누름·끌어 내리기·Esc 로 닫으면 undefined 가 돌아온다. */
|
|
36
|
+
export declare const BottomSheet: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseParagraphLinkProps, ParagraphIconProps } from './paragraph-type';
|
|
2
|
+
declare const ParagraphRoot: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLParagraphElement | 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<HTMLParagraphElement> | null | undefined;
|
|
4
|
+
}, "ref"> & import("react").RefAttributes<HTMLParagraphElement>> & {
|
|
5
|
+
Text: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
6
|
+
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;
|
|
7
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
Icon: import("react").ForwardRefExoticComponent<Omit<ParagraphIconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
9
|
+
Badge: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
10
|
+
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;
|
|
11
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
Link: import("react").ForwardRefExoticComponent<Omit<BaseParagraphLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
13
|
+
};
|
|
14
|
+
export default ParagraphRoot;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** 문단 안 뱃지 색. Badge 의 variant 에서 테두리 모양(outlined)만 뺐다 */
|
|
2
|
+
export declare const badgeVariant: readonly ["neutral", "primary", "danger", "success", "warning"];
|
|
3
|
+
export declare const paragraphProps: {
|
|
4
|
+
color: {
|
|
5
|
+
type: "className";
|
|
6
|
+
className: string;
|
|
7
|
+
values: readonly ["text-primary", "text-body", "text-secondary", "text-tertiary", "text-muted", "text-placeholder", "text-disabled", "text-inverse", "text-on-brand", "text-on-brand-subtle", "text-on-overlay", "text-on-disabled", "text-brand", "text-brand-active", "text-brand-emphasis", "text-brand-secondary", "text-danger", "text-error", "text-success", "text-warning"];
|
|
8
|
+
default: "text-body";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const paragraphTextProps: {
|
|
12
|
+
color: {
|
|
13
|
+
type: "className";
|
|
14
|
+
className: string;
|
|
15
|
+
values: readonly ["text-primary", "text-body", "text-secondary", "text-tertiary", "text-muted", "text-placeholder", "text-disabled", "text-inverse", "text-on-brand", "text-on-brand-subtle", "text-on-overlay", "text-on-disabled", "text-brand", "text-brand-active", "text-brand-emphasis", "text-brand-secondary", "text-danger", "text-error", "text-success", "text-warning"];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const paragraphBadgeProps: {
|
|
19
|
+
variant: {
|
|
20
|
+
type: "className";
|
|
21
|
+
className: string;
|
|
22
|
+
values: readonly ["neutral", "primary", "danger", "success", "warning"];
|
|
23
|
+
default: "neutral";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { fontSize, semanticColor, weight } from '../elements/text/text-props';
|
|
4
|
+
import { IconProps } from '../icon/icon-type';
|
|
5
|
+
import { badgeVariant } from './paragraph-props';
|
|
6
|
+
export type BaseParagraphRootProps = ComponentPropsWithRef<'p'>;
|
|
7
|
+
export type BaseParagraphTextProps = ComponentPropsWithRef<'span'>;
|
|
8
|
+
export type BaseParagraphBadgeProps = ComponentPropsWithRef<'span'>;
|
|
9
|
+
export interface BaseParagraphLinkProps extends ComponentPropsWithRef<'a'>, AsChildProps {
|
|
10
|
+
}
|
|
11
|
+
export interface ParagraphProps extends Omit<ComponentPropsWithRef<'p'>, 'color'> {
|
|
12
|
+
/** Text 의 글자 크기 단계. 기본 `base`. 조각은 이 크기와 줄 높이를 물려받는다 */
|
|
13
|
+
size?: (typeof fontSize)[number];
|
|
14
|
+
/** 기본 `regular` */
|
|
15
|
+
weight?: (typeof weight)[number];
|
|
16
|
+
/** Text 의 의미 색 이름만. 기본 `text-body` */
|
|
17
|
+
color?: (typeof semanticColor)[number];
|
|
18
|
+
}
|
|
19
|
+
/** 크기는 문단을 따른다. 굵기·색만 덮는다 */
|
|
20
|
+
export interface ParagraphTextProps extends Omit<ComponentPropsWithRef<'span'>, 'color'> {
|
|
21
|
+
weight?: (typeof weight)[number];
|
|
22
|
+
color?: (typeof semanticColor)[number];
|
|
23
|
+
}
|
|
24
|
+
/** 크기는 글자 크기(1em)를 따른다 */
|
|
25
|
+
export type ParagraphIconProps = Omit<IconProps, 'size'>;
|
|
26
|
+
export interface ParagraphBadgeProps extends ComponentPropsWithRef<'span'> {
|
|
27
|
+
/** 기본 `neutral` */
|
|
28
|
+
variant?: (typeof badgeVariant)[number];
|
|
29
|
+
}
|
|
30
|
+
export interface ParagraphLinkProps extends BaseParagraphLinkProps {
|
|
31
|
+
/** 밑줄. 기본 true. 끄면 링크가 글자색만으로는 드러나지 않으니 Paragraph.Text 로 굵기나 색을 따로 준다 */
|
|
32
|
+
underline?: boolean;
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ParagraphBadgeProps, ParagraphIconProps, ParagraphLinkProps, ParagraphProps, ParagraphTextProps } from './paragraph-type';
|
|
2
|
+
declare const Paragraph: import("react").ForwardRefExoticComponent<Omit<ParagraphProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>> & {
|
|
3
|
+
Text: import("react").ForwardRefExoticComponent<Omit<ParagraphTextProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
Icon: import("react").ForwardRefExoticComponent<Omit<ParagraphIconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
5
|
+
Badge: import("react").ForwardRefExoticComponent<Omit<ParagraphBadgeProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
Link: import("react").ForwardRefExoticComponent<Omit<ParagraphLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
};
|
|
8
|
+
export default Paragraph;
|
|
9
|
+
export type { ParagraphBadgeProps, ParagraphIconProps, ParagraphLinkProps, ParagraphProps, ParagraphTextProps, } from './paragraph-type';
|
|
@@ -0,0 +1,54 @@
|
|
|
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("./paragraph-type").ParagraphProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>> & {
|
|
12
|
+
Text: import("react").ForwardRefExoticComponent<Omit<import("./paragraph-type").ParagraphTextProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
13
|
+
Icon: import("react").ForwardRefExoticComponent<Omit<import("./paragraph-type").ParagraphIconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
14
|
+
Badge: import("react").ForwardRefExoticComponent<Omit<import("./paragraph-type").ParagraphBadgeProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
Link: import("react").ForwardRefExoticComponent<Omit<import("./paragraph-type").ParagraphLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
size: {
|
|
19
|
+
control: {
|
|
20
|
+
type: "select";
|
|
21
|
+
};
|
|
22
|
+
options: readonly ["xsm", "sm", "base", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl"];
|
|
23
|
+
};
|
|
24
|
+
weight: {
|
|
25
|
+
control: {
|
|
26
|
+
type: "select";
|
|
27
|
+
};
|
|
28
|
+
options: readonly ["regular", "medium", "semibold", "bold", "extrabold"];
|
|
29
|
+
};
|
|
30
|
+
color: {
|
|
31
|
+
control: {
|
|
32
|
+
type: "select";
|
|
33
|
+
};
|
|
34
|
+
options: readonly ["text-primary", "text-body", "text-secondary", "text-tertiary", "text-muted", "text-placeholder", "text-disabled", "text-inverse", "text-on-brand", "text-on-brand-subtle", "text-on-overlay", "text-on-disabled", "text-brand", "text-brand-active", "text-brand-emphasis", "text-brand-secondary", "text-danger", "text-error", "text-success", "text-warning"];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
args: {
|
|
38
|
+
size: "base";
|
|
39
|
+
weight: "regular";
|
|
40
|
+
color: "text-body";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export default meta;
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
/** 뱃지·강조·링크·아이콘이 한 문장에 섞인 기본 문단이다. 컨트롤로 크기·굵기·색을 바꿔 본다. */
|
|
46
|
+
export declare const Default: Story;
|
|
47
|
+
/** 사람이 보는 줄 맞춤 확인용이다. 크기마다 아이콘(1em)과 뱃지(20px, 줄 높이를 넘지 않음)가 줄 안 가운데에 서고, 두 줄째 간격이 첫 줄과 같은지 본다. 뒤의 옅은 띠가 줄 상자다. */
|
|
48
|
+
export declare const Baseline: Story;
|
|
49
|
+
/** 뱃지 색 다섯 가지다. */
|
|
50
|
+
export declare const Badges: Story;
|
|
51
|
+
/** 조각 Text 는 굵기·색만 바꾸고 크기는 문단을 따른다. */
|
|
52
|
+
export declare const TextEmphasis: Story;
|
|
53
|
+
/** 링크는 기본으로 밑줄을 긋는다. underline={false} 면 굵기로 드러낸다. asChild 로 라우터 링크를 쓴다. */
|
|
54
|
+
export declare const Links: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BasePostHeadingProps } from './post-type';
|
|
2
|
+
declare const PostRoot: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
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;
|
|
4
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
|
+
Heading: import("react").ForwardRefExoticComponent<Omit<BasePostHeadingProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
6
|
+
Ul: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLUListElement | 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<HTMLUListElement> | null | undefined;
|
|
8
|
+
}, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
9
|
+
Ol: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLOListElement | 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<HTMLOListElement> | null | undefined;
|
|
11
|
+
}, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
12
|
+
Li: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
13
|
+
ref?: ((instance: HTMLLIElement | 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<HTMLLIElement> | null | undefined;
|
|
14
|
+
}, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
15
|
+
Hr: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
|
|
16
|
+
ref?: ((instance: HTMLHRElement | 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<HTMLHRElement> | null | undefined;
|
|
17
|
+
}, "ref"> & import("react").RefAttributes<HTMLHRElement>>;
|
|
18
|
+
};
|
|
19
|
+
export default PostRoot;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const headingTag: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
2
|
+
/** Post.H1~H4 의 기본 글자. 태그(as)를 바꿔도 이 표는 조각 이름을 따른다 */
|
|
3
|
+
export declare const HEADINGS: {
|
|
4
|
+
readonly H1: {
|
|
5
|
+
readonly tag: "h1";
|
|
6
|
+
readonly size: "2xl";
|
|
7
|
+
readonly weight: "bold";
|
|
8
|
+
};
|
|
9
|
+
readonly H2: {
|
|
10
|
+
readonly tag: "h2";
|
|
11
|
+
readonly size: "xl";
|
|
12
|
+
readonly weight: "bold";
|
|
13
|
+
};
|
|
14
|
+
readonly H3: {
|
|
15
|
+
readonly tag: "h3";
|
|
16
|
+
readonly size: "lg";
|
|
17
|
+
readonly weight: "semibold";
|
|
18
|
+
};
|
|
19
|
+
readonly H4: {
|
|
20
|
+
readonly tag: "h4";
|
|
21
|
+
readonly size: "base";
|
|
22
|
+
readonly weight: "semibold";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/** 모든 조각이 받는 아래 여백. 값은 post.tsx 의 spacingProps 가 `var(--spacing-N)` 으로 바꾼 뒤 이 정의로 style 에 넣는다 */
|
|
26
|
+
export declare const postSpacingProps: {
|
|
27
|
+
paddingBottom: {
|
|
28
|
+
type: "css";
|
|
29
|
+
key: "paddingBottom";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { fontSize } from '../elements/text/text-props';
|
|
3
|
+
import { ParagraphProps } from '../paragraph/paragraph-type';
|
|
4
|
+
import { SpacingToken } from '../skeleton/skeleton-group-type';
|
|
5
|
+
import { headingTag } from './post-props';
|
|
6
|
+
export type BasePostRootProps = ComponentPropsWithRef<'div'>;
|
|
7
|
+
export interface BasePostHeadingProps extends ComponentPropsWithRef<'h1'> {
|
|
8
|
+
as: (typeof headingTag)[number];
|
|
9
|
+
}
|
|
10
|
+
export type BasePostUlProps = ComponentPropsWithRef<'ul'>;
|
|
11
|
+
export type BasePostOlProps = ComponentPropsWithRef<'ol'>;
|
|
12
|
+
export type BasePostLiProps = ComponentPropsWithRef<'li'>;
|
|
13
|
+
export type BasePostHrProps = ComponentPropsWithRef<'hr'>;
|
|
14
|
+
export interface PostSpacingProps {
|
|
15
|
+
/** 아래 여백. `--spacing-*` 이름(`'16'` → `var(--spacing-16)`). 주지 않으면 조각마다 정한 기본 여백 */
|
|
16
|
+
paddingBottom?: SpacingToken;
|
|
17
|
+
}
|
|
18
|
+
export type PostProps = ComponentPropsWithRef<'div'>;
|
|
19
|
+
export interface PostHeadingProps extends ComponentPropsWithRef<'h1'>, PostSpacingProps {
|
|
20
|
+
/** 그릴 태그. 기본은 조각 이름(H1 → h1). 문서 구조상 단계만 바꿀 때 쓴다 */
|
|
21
|
+
as?: (typeof headingTag)[number];
|
|
22
|
+
/** Text 의 글자 크기 단계. 기본 H1 2xl · H2 xl · H3 lg · H4 base */
|
|
23
|
+
size?: (typeof fontSize)[number];
|
|
24
|
+
}
|
|
25
|
+
export interface PostParagraphProps extends ParagraphProps, PostSpacingProps {
|
|
26
|
+
}
|
|
27
|
+
export interface PostUlProps extends ComponentPropsWithRef<'ul'>, PostSpacingProps {
|
|
28
|
+
}
|
|
29
|
+
export interface PostOlProps extends ComponentPropsWithRef<'ol'>, PostSpacingProps {
|
|
30
|
+
}
|
|
31
|
+
export interface PostLiProps extends ComponentPropsWithRef<'li'>, PostSpacingProps {
|
|
32
|
+
}
|
|
33
|
+
export interface PostHrProps extends ComponentPropsWithRef<'hr'>, PostSpacingProps {
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PostHeadingProps, PostHrProps, PostLiProps, PostOlProps, PostParagraphProps, PostUlProps } from './post-type';
|
|
2
|
+
declare const Post: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
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;
|
|
4
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
|
+
H1: import("react").ForwardRefExoticComponent<Omit<PostHeadingProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
6
|
+
H2: import("react").ForwardRefExoticComponent<Omit<PostHeadingProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
7
|
+
H3: import("react").ForwardRefExoticComponent<Omit<PostHeadingProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
8
|
+
H4: import("react").ForwardRefExoticComponent<Omit<PostHeadingProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
9
|
+
Paragraph: import("react").ForwardRefExoticComponent<Omit<PostParagraphProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
10
|
+
Ul: import("react").ForwardRefExoticComponent<Omit<PostUlProps, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
11
|
+
Ol: import("react").ForwardRefExoticComponent<Omit<PostOlProps, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
12
|
+
Li: import("react").ForwardRefExoticComponent<Omit<PostLiProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
13
|
+
Hr: import("react").ForwardRefExoticComponent<Omit<PostHrProps, "ref"> & import("react").RefAttributes<HTMLHRElement>>;
|
|
14
|
+
};
|
|
15
|
+
export default Post;
|
|
16
|
+
export type { PostHeadingProps, PostHrProps, PostLiProps, PostOlProps, PostParagraphProps, PostProps, PostSpacingProps, PostUlProps, } from './post-type';
|