@nurihaus/web-design-system 3.0.1 → 3.0.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 +104 -5
- package/dist/.storybook/story-kit.d.ts +18 -0
- package/dist/ai/components.md +742 -0
- package/dist/ai/tokens.md +319 -0
- package/dist/avatar.js +336 -0
- package/dist/check-box.js +379 -0
- package/dist/chunk-149.js +57 -0
- package/dist/chunk-298.js +34 -0
- package/dist/chunk-302.js +105 -0
- package/dist/chunk-309.js +36 -0
- package/dist/chunk-364.js +126 -0
- package/dist/chunk-387.js +37 -0
- package/dist/chunk-558.js +200 -0
- package/dist/chunk-563.js +181 -0
- package/dist/chunk-739.js +68 -0
- package/dist/chunk-777.js +117 -0
- package/dist/chunk-917.js +35 -0
- package/dist/chunk-933.js +70 -0
- package/dist/chunk-976.js +29 -0
- package/dist/collapsible-menu.js +394 -0
- package/dist/components/avatar/avatar-props.d.ts +2 -6
- package/dist/components/avatar/avatar-type.d.ts +4 -5
- package/dist/components/avatar/avatar.d.ts +1 -0
- package/dist/components/avatar/avatar.stories.d.ts +17 -1
- package/dist/components/badge/badge-props.d.ts +17 -80
- package/dist/components/badge/badge-type.d.ts +38 -2
- package/dist/components/badge/badge.stories.d.ts +25 -2
- package/dist/components/badge/base-badge.d.ts +2 -1
- package/dist/components/badge/icon-text-badge.d.ts +3 -21
- package/dist/components/badge/icon-text-option-badge.d.ts +2 -15
- package/dist/components/badge/option-badge.d.ts +3 -20
- package/dist/components/button/button-props.d.ts +2 -7
- package/dist/components/button/button-type.d.ts +11 -3
- package/dist/components/button/button.stories.d.ts +13 -10
- package/dist/components/button/cta-button.d.ts +3 -12
- package/dist/components/check-box/base-check-box.d.ts +9 -5
- package/dist/components/check-box/check-box-props.d.ts +2 -7
- package/dist/components/check-box/check-box-type.d.ts +11 -4
- package/dist/components/check-box/check-box.d.ts +3 -10
- package/dist/components/check-box/check-box.stories.d.ts +19 -4
- package/dist/components/collapsible-menu/base-collapsible-menu.d.ts +9 -5
- package/dist/components/collapsible-menu/collapsible-menu-props.d.ts +3 -12
- package/dist/components/collapsible-menu/collapsible-menu-type.d.ts +33 -9
- package/dist/components/collapsible-menu/collapsible-menu.d.ts +3 -23
- package/dist/components/collapsible-menu/collapsible-menu.stories.d.ts +20 -4
- package/dist/components/drop-down/base-drop-down.d.ts +11 -3
- package/dist/components/drop-down/drop-down-props.d.ts +3 -12
- package/dist/components/drop-down/drop-down-type.d.ts +34 -15
- package/dist/components/drop-down/drop-down.d.ts +3 -32
- package/dist/components/drop-down/drop-down.stories.d.ts +23 -4
- package/dist/components/elements/text/base-text.d.ts +3 -0
- package/dist/components/elements/text/text-props.d.ts +16 -0
- package/dist/components/elements/text/text-type.d.ts +6 -2
- package/dist/components/elements/text/text.d.ts +2 -1
- package/dist/components/elements/text/text.stories.d.ts +43 -3
- package/dist/components/loading/index.d.ts +6 -6
- package/dist/components/loading/inline-loading/base-inline-loading.d.ts +3 -0
- package/dist/components/loading/inline-loading/inline-loading-props.d.ts +9 -0
- package/dist/components/loading/inline-loading/inline-loading-type.d.ts +8 -6
- package/dist/components/loading/inline-loading/inline-loading.d.ts +3 -2
- package/dist/components/loading/inline-loading/inline-loading.stories.d.ts +5 -9
- package/dist/components/loading/overlay-loading/base-overlay-loading.d.ts +3 -0
- package/dist/components/loading/overlay-loading/overlay-loading-props.d.ts +7 -0
- package/dist/components/loading/overlay-loading/overlay-loading-type.d.ts +6 -3
- package/dist/components/loading/overlay-loading/overlay-loading.d.ts +3 -3
- package/dist/components/loading/overlay-loading/overlay-loading.stories.d.ts +8 -8
- package/dist/components/loading/spinner/base-spinner.d.ts +4 -0
- package/dist/components/loading/spinner/spinner-props.d.ts +1 -0
- package/dist/components/loading/spinner/spinner-type.d.ts +4 -4
- package/dist/components/loading/spinner/spinner.d.ts +2 -2
- package/dist/components/loading/spinner/spinner.stories.d.ts +5 -12
- package/dist/components/modal/base-modal.d.ts +17 -5
- package/dist/components/modal/modal-props.d.ts +2 -7
- package/dist/components/modal/modal-type.d.ts +20 -10
- package/dist/components/modal/modal-with-double-button.d.ts +4 -16
- package/dist/components/modal/modal.stories.d.ts +15 -2
- package/dist/components/radio/base-radio.d.ts +9 -5
- package/dist/components/radio/radio-props.d.ts +1 -0
- package/dist/components/radio/radio-type.d.ts +6 -8
- package/dist/components/radio/radio.d.ts +2 -2
- package/dist/components/radio/radio.stories.d.ts +13 -4
- package/dist/components/table/base-table.d.ts +4 -5
- package/dist/components/table/data-table.d.ts +5 -22
- package/dist/components/table/table-type.d.ts +22 -1
- package/dist/components/table/table.stories.d.ts +19 -3
- package/dist/components/tabs/base-tabs.d.ts +7 -7
- package/dist/components/tabs/tabs-props.d.ts +1 -1
- package/dist/components/tabs/tabs-type.d.ts +9 -13
- package/dist/components/tabs/tabs.d.ts +3 -3
- package/dist/components/tabs/tabs.stories.d.ts +16 -10
- package/dist/components/text-field/base-text-field.d.ts +5 -3
- package/dist/components/text-field/text-field-props.d.ts +3 -12
- package/dist/components/text-field/text-field-type.d.ts +14 -0
- package/dist/components/text-field/text-field.d.ts +3 -16
- package/dist/components/text-field/text-field.stories.d.ts +24 -0
- package/dist/components/tooltip/base-tooltip.d.ts +13 -3
- package/dist/components/tooltip/tooltip-props.d.ts +3 -2
- package/dist/components/tooltip/tooltip-type.d.ts +17 -5
- package/dist/components/tooltip/tooltip.d.ts +4 -7
- package/dist/components/tooltip/tooltip.stories.d.ts +21 -4
- package/dist/components.css +1984 -0
- package/dist/cta-button.js +236 -0
- package/dist/data-table.js +386 -0
- package/dist/drop-down.js +433 -0
- package/dist/helpers/props/common-props.d.ts +7 -0
- package/dist/helpers/types/common-props.d.ts +8 -0
- package/dist/icon-text-badge.js +294 -0
- package/dist/icon-text-option-badge.js +270 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +3021 -10637
- package/dist/loading.js +383 -0
- package/dist/modal-with-double-button.js +527 -0
- package/dist/option-badge.js +293 -0
- package/dist/radio.js +363 -0
- package/dist/reset.css +45 -0
- package/dist/styles.css +465 -219
- package/dist/tabs.js +421 -0
- package/dist/text-field.js +369 -0
- package/dist/text.js +233 -0
- package/dist/tokens.css +73 -0
- package/dist/tokens.js +4 -6
- package/dist/tooltip.js +360 -0
- package/package.json +91 -14
- package/dist/components/text-field/text-filed.stories.d.ts +0 -8
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import("react").ForwardRefExoticComponent<import("./avatar-type").AvatarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
size: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "select";
|
|
9
|
+
};
|
|
10
|
+
options: readonly ["s", "m", "l", "xl"];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
size: "m";
|
|
15
|
+
src: string;
|
|
16
|
+
};
|
|
5
17
|
};
|
|
6
18
|
export default meta;
|
|
7
19
|
type Story = StoryObj<typeof meta>;
|
|
8
20
|
export declare const Default: Story;
|
|
21
|
+
export declare const Sizes: Story;
|
|
22
|
+
/** 이미지를 불러오지 못하면 기본 아바타 아이콘이 보인다. */
|
|
23
|
+
export declare const Fallback: Story;
|
|
24
|
+
export declare const WithoutBadge: Story;
|
|
@@ -1,95 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const variant: readonly ["neutral", "primary", "danger", "outlined"];
|
|
2
|
+
export declare const sizes: readonly ["xs", "s", "m", "l", "xl"];
|
|
3
3
|
export declare const iconTextBadgeProps: {
|
|
4
|
-
|
|
4
|
+
variant: {
|
|
5
5
|
type: "className";
|
|
6
6
|
className: string;
|
|
7
|
-
values: readonly ["
|
|
8
|
-
default: "
|
|
9
|
-
};
|
|
10
|
-
borderColor: {
|
|
11
|
-
type: "css";
|
|
12
|
-
key: "borderColor";
|
|
13
|
-
values: (keyof typeof colors)[];
|
|
14
|
-
default: "transparent";
|
|
15
|
-
};
|
|
16
|
-
color: {
|
|
17
|
-
type: "css";
|
|
18
|
-
key: "color";
|
|
19
|
-
values: (keyof typeof colors)[];
|
|
20
|
-
default: "black";
|
|
21
|
-
};
|
|
22
|
-
backgroundColor: {
|
|
23
|
-
type: "css";
|
|
24
|
-
key: "backgroundColor";
|
|
25
|
-
values: (keyof typeof colors)[];
|
|
26
|
-
default: "white";
|
|
27
|
-
};
|
|
28
|
-
width: {
|
|
29
|
-
type: "css";
|
|
30
|
-
key: "width";
|
|
31
|
-
default: string;
|
|
7
|
+
values: readonly ["neutral", "primary", "danger", "outlined"];
|
|
8
|
+
default: "neutral";
|
|
32
9
|
};
|
|
10
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s", "m", "l", "xl"]>;
|
|
11
|
+
width: import("../../helpers/types/propsDef").CSSPropsTypeWithoutValues<string | number>;
|
|
33
12
|
};
|
|
34
13
|
export declare const iconTextOptionBadgeProps: {
|
|
35
|
-
|
|
14
|
+
variant: {
|
|
36
15
|
type: "className";
|
|
37
16
|
className: string;
|
|
38
|
-
values: readonly ["
|
|
39
|
-
default: "
|
|
40
|
-
};
|
|
41
|
-
borderColor: {
|
|
42
|
-
type: "css";
|
|
43
|
-
key: "borderColor";
|
|
44
|
-
values: (keyof typeof colors)[];
|
|
45
|
-
default: "transparent";
|
|
46
|
-
};
|
|
47
|
-
color: {
|
|
48
|
-
type: "css";
|
|
49
|
-
key: "color";
|
|
50
|
-
values: (keyof typeof colors)[];
|
|
51
|
-
default: "black";
|
|
52
|
-
};
|
|
53
|
-
backgroundColor: {
|
|
54
|
-
type: "css";
|
|
55
|
-
key: "backgroundColor";
|
|
56
|
-
values: (keyof typeof colors)[];
|
|
57
|
-
default: "white";
|
|
58
|
-
};
|
|
59
|
-
width: {
|
|
60
|
-
type: "css";
|
|
61
|
-
key: "width";
|
|
62
|
-
default: string;
|
|
17
|
+
values: readonly ["neutral", "primary", "danger", "outlined"];
|
|
18
|
+
default: "neutral";
|
|
63
19
|
};
|
|
20
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s", "m", "l", "xl"]>;
|
|
21
|
+
width: import("../../helpers/types/propsDef").CSSPropsTypeWithoutValues<string | number>;
|
|
64
22
|
};
|
|
65
23
|
export declare const optionBadgeProps: {
|
|
66
|
-
|
|
24
|
+
variant: {
|
|
67
25
|
type: "className";
|
|
68
26
|
className: string;
|
|
69
|
-
values: readonly ["
|
|
70
|
-
default: "
|
|
71
|
-
};
|
|
72
|
-
borderColor: {
|
|
73
|
-
type: "css";
|
|
74
|
-
key: "borderColor";
|
|
75
|
-
values: (keyof typeof colors)[];
|
|
76
|
-
default: "transparent";
|
|
77
|
-
};
|
|
78
|
-
color: {
|
|
79
|
-
type: "css";
|
|
80
|
-
key: "color";
|
|
81
|
-
values: (keyof typeof colors)[];
|
|
82
|
-
default: "black";
|
|
83
|
-
};
|
|
84
|
-
backgroundColor: {
|
|
85
|
-
type: "css";
|
|
86
|
-
key: "backgroundColor";
|
|
87
|
-
values: (keyof typeof colors)[];
|
|
88
|
-
default: "white";
|
|
89
|
-
};
|
|
90
|
-
width: {
|
|
91
|
-
type: "css";
|
|
92
|
-
key: "width";
|
|
93
|
-
default: string;
|
|
27
|
+
values: readonly ["neutral", "primary", "danger", "outlined"];
|
|
28
|
+
default: "neutral";
|
|
94
29
|
};
|
|
30
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s", "m", "l", "xl"]>;
|
|
31
|
+
width: import("../../helpers/types/propsDef").CSSPropsTypeWithoutValues<string | number>;
|
|
95
32
|
};
|
|
@@ -1,8 +1,44 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { direction } from '../tooltip/tooltip-props';
|
|
4
|
+
import { sizes, variant } from './badge-props';
|
|
5
|
+
export interface CommonBadgeProps extends AsChildProps {
|
|
4
6
|
children?: ReactNode;
|
|
5
7
|
className?: string;
|
|
6
8
|
}
|
|
7
9
|
export interface BaseBadgeProps extends React.HTMLAttributes<HTMLDivElement>, CommonBadgeProps {
|
|
8
10
|
}
|
|
11
|
+
export interface OptionBadgeProps extends Pick<CommonBadgeProps, 'asChild' | 'className'> {
|
|
12
|
+
variant?: (typeof variant)[number];
|
|
13
|
+
width?: number | string;
|
|
14
|
+
size?: (typeof sizes)[number];
|
|
15
|
+
option: ReactNode;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
tooltip?: {
|
|
18
|
+
content: React.ReactNode;
|
|
19
|
+
position?: (typeof direction)[number];
|
|
20
|
+
delayDuration?: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface IconTextBadgeProps extends Pick<CommonBadgeProps, 'asChild' | 'className'> {
|
|
24
|
+
variant?: (typeof variant)[number];
|
|
25
|
+
width?: number | string;
|
|
26
|
+
size?: (typeof sizes)[number];
|
|
27
|
+
icon: ReactNode;
|
|
28
|
+
text: ReactNode;
|
|
29
|
+
style?: React.CSSProperties;
|
|
30
|
+
tooltip?: {
|
|
31
|
+
content: React.ReactNode;
|
|
32
|
+
position?: (typeof direction)[number];
|
|
33
|
+
delayDuration?: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface IconTextOptionBadgeProps extends Pick<CommonBadgeProps, 'className'> {
|
|
37
|
+
variant?: (typeof variant)[number];
|
|
38
|
+
width?: number | string;
|
|
39
|
+
size?: (typeof sizes)[number];
|
|
40
|
+
icon: ReactNode;
|
|
41
|
+
text: ReactNode;
|
|
42
|
+
option: ReactNode;
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
}
|
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<import("./
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./badge-type").IconTextBadgeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
variant: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "select";
|
|
9
|
+
};
|
|
10
|
+
options: readonly ["neutral", "primary", "danger", "outlined"];
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
control: {
|
|
14
|
+
type: "select";
|
|
15
|
+
};
|
|
16
|
+
options: readonly ["xs", "s", "m", "l", "xl"];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
args: {
|
|
20
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
text: string;
|
|
22
|
+
};
|
|
5
23
|
};
|
|
6
24
|
export default meta;
|
|
7
25
|
type Story = StoryObj<typeof meta>;
|
|
8
26
|
export declare const Default: Story;
|
|
27
|
+
export declare const IconText: Story;
|
|
28
|
+
export declare const Option: Story;
|
|
29
|
+
export declare const IconTextOption: Story;
|
|
30
|
+
export declare const Variants: Story;
|
|
31
|
+
export declare const WithTooltip: Story;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { BaseBadgeProps } from './badge-type';
|
|
2
|
-
|
|
2
|
+
declare const BaseBadge: import("react").ForwardRefExoticComponent<BaseBadgeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default BaseBadge;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { colors } from '../../styles/token/colors';
|
|
4
|
-
import { size } from './badge-props';
|
|
5
|
-
import { CommonBadgeProps } from './badge-type';
|
|
6
|
-
export interface IconTextBadgeProps extends Pick<CommonBadgeProps, 'asChild'> {
|
|
7
|
-
borderColor?: keyof typeof colors;
|
|
8
|
-
color?: keyof typeof colors;
|
|
9
|
-
backgroundColor?: keyof typeof colors;
|
|
10
|
-
width?: number | string;
|
|
11
|
-
size?: (typeof size)[number];
|
|
12
|
-
icon: ReactNode;
|
|
13
|
-
text: ReactNode;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
-
tooltip?: {
|
|
16
|
-
content: React.ReactNode;
|
|
17
|
-
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
18
|
-
delayDuration?: number;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
declare const IconTextBadge: React.ForwardRefExoticComponent<IconTextBadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { IconTextBadgeProps } from './badge-type';
|
|
2
|
+
declare const IconTextBadge: import("react").ForwardRefExoticComponent<IconTextBadgeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
3
|
export default IconTextBadge;
|
|
4
|
+
export type { IconTextBadgeProps } from './badge-type';
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { colors } from '../../styles/token/colors';
|
|
3
|
-
import { size } from './badge-props';
|
|
4
|
-
import { CommonBadgeProps } from './badge-type';
|
|
5
|
-
export interface IconTextOptionBadgeProps extends Pick<CommonBadgeProps, 'className'> {
|
|
6
|
-
borderColor?: keyof typeof colors;
|
|
7
|
-
color?: keyof typeof colors;
|
|
8
|
-
backgroundColor?: keyof typeof colors;
|
|
9
|
-
width?: number | string;
|
|
10
|
-
size?: (typeof size)[number];
|
|
11
|
-
icon: ReactNode;
|
|
12
|
-
text: ReactNode;
|
|
13
|
-
option: ReactNode;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
-
}
|
|
1
|
+
import { IconTextOptionBadgeProps } from './badge-type';
|
|
16
2
|
declare const IconTextOptionBadge: import("react").ForwardRefExoticComponent<IconTextOptionBadgeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
3
|
export default IconTextOptionBadge;
|
|
4
|
+
export type { IconTextOptionBadgeProps } from './badge-type';
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { colors } from '../../styles/token/colors';
|
|
4
|
-
import { size } from './badge-props';
|
|
5
|
-
import { CommonBadgeProps } from './badge-type';
|
|
6
|
-
export interface OptionBadgeProps extends Pick<CommonBadgeProps, 'asChild'> {
|
|
7
|
-
borderColor?: keyof typeof colors;
|
|
8
|
-
color?: keyof typeof colors;
|
|
9
|
-
backgroundColor?: keyof typeof colors;
|
|
10
|
-
width?: number | string;
|
|
11
|
-
size?: (typeof size)[number];
|
|
12
|
-
option: ReactNode;
|
|
13
|
-
style?: React.CSSProperties;
|
|
14
|
-
tooltip?: {
|
|
15
|
-
content: React.ReactNode;
|
|
16
|
-
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
17
|
-
delayDuration?: number;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
declare const OptionBadge: React.ForwardRefExoticComponent<OptionBadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { OptionBadgeProps } from './badge-type';
|
|
2
|
+
declare const OptionBadge: import("react").ForwardRefExoticComponent<OptionBadgeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
3
|
export default OptionBadge;
|
|
4
|
+
export type { OptionBadgeProps } from './badge-type';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const variant: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined"];
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const sizes: readonly ["xs", "s", "m", "l", "xl"];
|
|
3
3
|
export declare const ctaButtonProps: {
|
|
4
4
|
variant: {
|
|
5
5
|
type: "className";
|
|
@@ -7,10 +7,5 @@ export declare const ctaButtonProps: {
|
|
|
7
7
|
values: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined"];
|
|
8
8
|
default: "primary";
|
|
9
9
|
};
|
|
10
|
-
size:
|
|
11
|
-
type: "className";
|
|
12
|
-
className: string;
|
|
13
|
-
values: readonly ["xl", "l", "r", "m", "s", "xs"];
|
|
14
|
-
default: "m";
|
|
15
|
-
};
|
|
10
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s", "m", "l", "xl"]>;
|
|
16
11
|
};
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { sizes, variant } from './button-props';
|
|
2
4
|
export interface CommonButtonProps {
|
|
3
5
|
loading?: boolean;
|
|
4
6
|
}
|
|
5
|
-
export interface BaseButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps {
|
|
6
|
-
children?:
|
|
7
|
-
asChild?: boolean;
|
|
7
|
+
export interface BaseButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps, AsChildProps {
|
|
8
|
+
children?: ReactNode;
|
|
8
9
|
loadingComponent?: ReactNode;
|
|
9
10
|
}
|
|
11
|
+
export interface CTAButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps {
|
|
12
|
+
variant?: (typeof variant)[number];
|
|
13
|
+
size?: (typeof sizes)[number];
|
|
14
|
+
text: string | ReactNode;
|
|
15
|
+
leftIcon?: ReactNode;
|
|
16
|
+
rightIcon?: ReactNode;
|
|
17
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react
|
|
2
|
-
import { CTAButtonProps } from './cta-button';
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
3
2
|
declare const meta: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: (
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("./button-type").CTAButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
5
|
argTypes: {
|
|
7
6
|
variant: {
|
|
8
7
|
control: {
|
|
@@ -14,16 +13,20 @@ declare const meta: {
|
|
|
14
13
|
control: {
|
|
15
14
|
type: "select";
|
|
16
15
|
};
|
|
17
|
-
options: readonly ["
|
|
16
|
+
options: readonly ["xs", "s", "m", "l", "xl"];
|
|
18
17
|
};
|
|
19
18
|
};
|
|
19
|
+
args: {
|
|
20
|
+
text: string;
|
|
21
|
+
variant: "primary";
|
|
22
|
+
size: "l";
|
|
23
|
+
};
|
|
20
24
|
};
|
|
21
25
|
export default meta;
|
|
22
26
|
type Story = StoryObj<typeof meta>;
|
|
23
27
|
export declare const Default: Story;
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const Outlined: StoryObj<CTAButtonProps>;
|
|
28
|
+
export declare const Variants: Story;
|
|
29
|
+
export declare const Sizes: Story;
|
|
30
|
+
export declare const Loading: Story;
|
|
31
|
+
export declare const Disabled: Story;
|
|
32
|
+
export declare const WithIcons: Story;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { size, variant } from './button-props';
|
|
4
|
-
import { CommonButtonProps } from './button-type';
|
|
5
|
-
export interface CTAButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps {
|
|
6
|
-
variant?: (typeof variant)[number];
|
|
7
|
-
size?: (typeof size)[number];
|
|
8
|
-
text: string | ReactNode;
|
|
9
|
-
leftIcon?: ReactNode;
|
|
10
|
-
rightIcon?: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
declare const CTAButton: (props: CTAButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { CTAButtonProps } from './button-type';
|
|
2
|
+
declare const CTAButton: import("react").ForwardRefExoticComponent<Omit<CTAButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
3
|
export default CTAButton;
|
|
4
|
+
export type { CTAButtonProps } from './button-type';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
1
|
import { CheckBoxIndicatorProps, CheckBoxLabelProps, CheckBoxRootProps } from './check-box-type';
|
|
3
|
-
declare const CheckBoxRoot: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
declare const CheckBoxRoot: import("react").ForwardRefExoticComponent<CheckBoxRootProps & {
|
|
3
|
+
children?: import("react").ReactNode | undefined;
|
|
4
|
+
} & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
5
|
+
Label: import("react").ForwardRefExoticComponent<CheckBoxLabelProps & {
|
|
6
|
+
children?: import("react").ReactNode | undefined;
|
|
7
|
+
} & import("react").RefAttributes<HTMLLabelElement>>;
|
|
8
|
+
Indicator: import("react").ForwardRefExoticComponent<CheckBoxIndicatorProps & {
|
|
9
|
+
children?: import("react").ReactNode | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
11
|
};
|
|
8
12
|
export default CheckBoxRoot;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const sizes: readonly ["s", "m", "l"];
|
|
2
2
|
export declare const checkBoxIndicatorProps: {
|
|
3
|
-
size:
|
|
4
|
-
type: "className";
|
|
5
|
-
className: string;
|
|
6
|
-
values: string[];
|
|
7
|
-
default: string;
|
|
8
|
-
};
|
|
3
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
9
4
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { sizes } from './check-box-props';
|
|
1
4
|
export interface CheckBoxRootProps {
|
|
2
5
|
checked?: boolean;
|
|
3
6
|
onChange?: (checked: boolean) => void;
|
|
@@ -5,12 +8,16 @@ export interface CheckBoxRootProps {
|
|
|
5
8
|
disabled?: boolean;
|
|
6
9
|
className?: string;
|
|
7
10
|
}
|
|
8
|
-
export interface CheckBoxIndicatorProps {
|
|
9
|
-
asChild?: boolean;
|
|
11
|
+
export interface CheckBoxIndicatorProps extends AsChildProps {
|
|
10
12
|
className?: string;
|
|
11
13
|
}
|
|
12
|
-
export interface CheckBoxLabelProps {
|
|
13
|
-
asChild?: boolean;
|
|
14
|
+
export interface CheckBoxLabelProps extends AsChildProps {
|
|
14
15
|
preventChangeOnClick?: boolean;
|
|
15
16
|
className?: string;
|
|
16
17
|
}
|
|
18
|
+
export interface CheckBoxProps extends CheckBoxRootProps {
|
|
19
|
+
label: string | ReactNode;
|
|
20
|
+
size?: (typeof sizes)[number];
|
|
21
|
+
className?: string;
|
|
22
|
+
onClick?: (checked: boolean) => void;
|
|
23
|
+
}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { CheckBoxRootProps } from './check-box-type';
|
|
4
|
-
export interface CheckBoxProps extends CheckBoxRootProps {
|
|
5
|
-
label: string | ReactNode;
|
|
6
|
-
size?: (typeof size)[number];
|
|
7
|
-
className?: string;
|
|
8
|
-
onClick?: (checked: boolean) => void;
|
|
9
|
-
}
|
|
10
|
-
declare const CheckBox: (props: CheckBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { CheckBoxProps } from './check-box-type';
|
|
2
|
+
declare const CheckBox: import("react").ForwardRefExoticComponent<CheckBoxProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
3
|
export default CheckBox;
|
|
4
|
+
export type { CheckBoxProps } from './check-box-type';
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react
|
|
2
|
-
import CheckBox from './check-box';
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
3
2
|
declare const meta: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: (
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./check-box-type").CheckBoxProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
size: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "select";
|
|
9
|
+
};
|
|
10
|
+
options: readonly ["s", "m", "l"];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
6
17
|
};
|
|
7
18
|
export default meta;
|
|
8
|
-
type Story = StoryObj<typeof
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
9
20
|
export declare const Default: Story;
|
|
21
|
+
export declare const Sizes: Story;
|
|
22
|
+
export declare const Checked: Story;
|
|
23
|
+
export declare const Disabled: Story;
|
|
24
|
+
export declare const WithoutLabel: Story;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
1
|
import { CollapsibleMenuContentProps, CollapsibleMenuRootProps, CollapsibleMenuTriggerProps } from './collapsible-menu-type';
|
|
3
|
-
declare const CollapsibleMenuRoot: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
declare const CollapsibleMenuRoot: import("react").ForwardRefExoticComponent<CollapsibleMenuRootProps & {
|
|
3
|
+
children?: import("react").ReactNode | undefined;
|
|
4
|
+
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
|
+
Trigger: import("react").ForwardRefExoticComponent<CollapsibleMenuTriggerProps & {
|
|
6
|
+
children?: import("react").ReactNode | undefined;
|
|
7
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
Content: import("react").ForwardRefExoticComponent<CollapsibleMenuContentProps & {
|
|
9
|
+
children?: import("react").ReactNode | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
11
|
};
|
|
8
12
|
export default CollapsibleMenuRoot;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const sizes: readonly ["s", "m"];
|
|
2
2
|
export declare const collapsibleMenuProps: {
|
|
3
|
-
size:
|
|
4
|
-
|
|
5
|
-
className: string;
|
|
6
|
-
values: readonly ["m", "l"];
|
|
7
|
-
default: "m";
|
|
8
|
-
};
|
|
9
|
-
width: {
|
|
10
|
-
type: "css";
|
|
11
|
-
key: "width";
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
3
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m"]>;
|
|
4
|
+
width: import("../../helpers/types/propsDef").CSSPropsTypeWithoutValues<string | number>;
|
|
14
5
|
};
|
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentType, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { sizes } from './collapsible-menu-props';
|
|
2
4
|
export interface CollapsibleMenuRootProps {
|
|
3
5
|
defaultOpen?: boolean;
|
|
4
6
|
open?: boolean;
|
|
5
7
|
onOpenChange?: (open: boolean) => void;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
}
|
|
8
|
-
export interface CollapsibleMenuTriggerProps {
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
style?: CSSProperties;
|
|
10
|
+
export interface CollapsibleMenuTriggerProps extends AsChildProps, StyleProps {
|
|
12
11
|
disabled?: boolean;
|
|
13
12
|
}
|
|
14
|
-
export interface CollapsibleMenuContentProps {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
export interface CollapsibleMenuContentProps extends AsChildProps, StyleProps {
|
|
14
|
+
}
|
|
15
|
+
export interface CollapsibleMenuItem {
|
|
16
|
+
key: string;
|
|
17
|
+
item: ReactNode;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
href?: string;
|
|
20
|
+
onSelect?: () => void;
|
|
21
|
+
children?: CollapsibleMenuItem[];
|
|
22
|
+
defaultOpen?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** `href` 가 있는 항목을 그릴 때 `linkComponent` 가 받는 props. next/link 의 Link 를 그대로 넘길 수 있다. */
|
|
25
|
+
export interface CollapsibleMenuLinkProps {
|
|
26
|
+
href: string;
|
|
27
|
+
className: string;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
onClick: (e: MouseEvent) => void;
|
|
30
|
+
'aria-current'?: 'page';
|
|
31
|
+
'aria-disabled'?: 'true';
|
|
32
|
+
}
|
|
33
|
+
export interface CollapsibleMenuProps extends StyleProps {
|
|
34
|
+
size?: (typeof sizes)[number];
|
|
35
|
+
items: CollapsibleMenuItem[];
|
|
36
|
+
activeKey?: string;
|
|
37
|
+
onActiveKeyChange?: (key: string) => void;
|
|
38
|
+
indent?: number;
|
|
39
|
+
chevron?: ReactNode;
|
|
40
|
+
width?: number | string;
|
|
41
|
+
linkComponent?: ComponentType<CollapsibleMenuLinkProps>;
|
|
18
42
|
}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface CollapsibleMenuItem {
|
|
4
|
-
key: string;
|
|
5
|
-
item: ReactNode;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
href?: string;
|
|
8
|
-
onSelect?: () => void;
|
|
9
|
-
children?: CollapsibleMenuItem[];
|
|
10
|
-
defaultOpen?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface CollapsibleMenuProps {
|
|
13
|
-
size?: typeof size;
|
|
14
|
-
items: CollapsibleMenuItem[];
|
|
15
|
-
activeKey?: string;
|
|
16
|
-
onActiveKeyChange?: (key: string) => void;
|
|
17
|
-
indent?: number;
|
|
18
|
-
chevron?: ReactNode;
|
|
19
|
-
width?: string;
|
|
20
|
-
style?: CSSProperties;
|
|
21
|
-
className?: string;
|
|
22
|
-
}
|
|
23
|
-
declare const CollapsibleMenu: import("react").ForwardRefExoticComponent<CollapsibleMenuProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { CollapsibleMenuProps } from './collapsible-menu-type';
|
|
2
|
+
declare const CollapsibleMenu: import("react").ForwardRefExoticComponent<CollapsibleMenuProps & import("react").RefAttributes<HTMLElement>>;
|
|
24
3
|
export default CollapsibleMenu;
|
|
4
|
+
export type { CollapsibleMenuProps, CollapsibleMenuItem, CollapsibleMenuLinkProps, } from './collapsible-menu-type';
|