@nurihaus/web-design-system 3.0.0 → 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 +785 -559
- 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,9 +1,25 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react
|
|
2
|
-
import
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { CollapsibleMenuItem } from './collapsible-menu-type';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<import("./collapsible-menu").CollapsibleMenuProps & import("react").RefAttributes<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<import("./collapsible-menu-type").CollapsibleMenuProps & import("react").RefAttributes<HTMLElement>>;
|
|
6
|
+
argTypes: {
|
|
7
|
+
size: {
|
|
8
|
+
control: {
|
|
9
|
+
type: "select";
|
|
10
|
+
};
|
|
11
|
+
options: readonly ["s", "m"];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
args: {
|
|
15
|
+
items: CollapsibleMenuItem[];
|
|
16
|
+
width: number;
|
|
17
|
+
};
|
|
6
18
|
};
|
|
7
19
|
export default meta;
|
|
8
|
-
type Story = StoryObj<typeof
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
9
21
|
export declare const Default: Story;
|
|
22
|
+
export declare const Sizes: Story;
|
|
23
|
+
/** 자식이 있는 항목에 disabled 를 주면 그룹(Radix Collapsible root)이 접히지도 펼쳐지지도 않는다. */
|
|
24
|
+
export declare const Disabled: Story;
|
|
25
|
+
export declare const CustomLink: Story;
|
|
@@ -2,9 +2,17 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { DropDownContentProps, DropDownItemProps, DropDownRootProps, DropDownTriggerProps, DropDownValueProps } from './drop-down-type';
|
|
3
3
|
declare const DropDownRoot: {
|
|
4
4
|
(props: PropsWithChildren<DropDownRootProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
Trigger: import("react").ForwardRefExoticComponent<DropDownTriggerProps & {
|
|
8
|
+
children?: import("react").ReactNode | undefined;
|
|
9
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
10
|
Value: import("react").ForwardRefExoticComponent<DropDownValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
|
-
Content:
|
|
8
|
-
|
|
11
|
+
Content: import("react").ForwardRefExoticComponent<DropDownContentProps & {
|
|
12
|
+
children?: import("react").ReactNode | undefined;
|
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Item: import("react").ForwardRefExoticComponent<DropDownItemProps & {
|
|
15
|
+
children?: import("react").ReactNode | undefined;
|
|
16
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
17
|
};
|
|
10
18
|
export default DropDownRoot;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const sizes: readonly ["s", "m"];
|
|
2
2
|
export declare const dropDownSingleProps: {
|
|
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,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { sizes } from './drop-down-props';
|
|
2
4
|
export interface DropDownRootProps {
|
|
3
5
|
defaultOpen?: boolean;
|
|
4
6
|
open?: boolean;
|
|
@@ -8,30 +10,47 @@ export interface DropDownRootProps {
|
|
|
8
10
|
onValueChange?: (value: string) => void;
|
|
9
11
|
disabled?: boolean;
|
|
10
12
|
}
|
|
11
|
-
export interface DropDownTriggerProps {
|
|
12
|
-
asChild?: boolean;
|
|
13
|
-
className?: string;
|
|
14
|
-
style?: CSSProperties;
|
|
13
|
+
export interface DropDownTriggerProps extends AsChildProps, StyleProps {
|
|
15
14
|
}
|
|
16
|
-
export interface DropDownValueProps {
|
|
17
|
-
asChild?: boolean;
|
|
15
|
+
export interface DropDownValueProps extends AsChildProps, StyleProps {
|
|
18
16
|
defaultValue?: string;
|
|
19
|
-
className?: string;
|
|
20
17
|
placeholder?: ReactNode;
|
|
21
|
-
style?: CSSProperties;
|
|
22
18
|
}
|
|
23
|
-
export interface DropDownContentProps {
|
|
24
|
-
asChild?: boolean;
|
|
25
|
-
className?: string;
|
|
19
|
+
export interface DropDownContentProps extends AsChildProps, StyleProps {
|
|
26
20
|
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
27
21
|
align?: 'start' | 'center' | 'end';
|
|
28
22
|
position?: 'popper' | 'item-aligned';
|
|
29
|
-
style?: CSSProperties;
|
|
30
23
|
}
|
|
31
|
-
export interface DropDownItemProps {
|
|
32
|
-
asChild?: boolean;
|
|
24
|
+
export interface DropDownItemProps extends AsChildProps {
|
|
33
25
|
className?: string;
|
|
34
26
|
value: string;
|
|
35
27
|
disabled?: boolean;
|
|
36
28
|
onClick?: () => void;
|
|
37
29
|
}
|
|
30
|
+
export interface DropDownProps extends StyleProps {
|
|
31
|
+
size?: (typeof sizes)[number];
|
|
32
|
+
defaultValue?: string;
|
|
33
|
+
value?: string;
|
|
34
|
+
onValueChange?: (value: string) => void;
|
|
35
|
+
renderValue?: (value?: string) => ReactNode;
|
|
36
|
+
options?: {
|
|
37
|
+
label: ReactNode;
|
|
38
|
+
value: string;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
}[];
|
|
41
|
+
renderOption?: (props: {
|
|
42
|
+
isOpen: boolean;
|
|
43
|
+
close: () => void;
|
|
44
|
+
}) => ReactNode;
|
|
45
|
+
placeholder?: ReactNode;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
defaultOpen?: boolean;
|
|
48
|
+
open?: boolean;
|
|
49
|
+
onOpenChange?: (open: boolean) => void;
|
|
50
|
+
leftIcon?: ReactNode;
|
|
51
|
+
rightIcon?: ReactNode;
|
|
52
|
+
width?: number | string;
|
|
53
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
54
|
+
align?: 'start' | 'center' | 'end';
|
|
55
|
+
position?: 'popper' | 'item-aligned';
|
|
56
|
+
}
|
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface DropDownProps {
|
|
4
|
-
size?: (typeof size)[number];
|
|
5
|
-
defaultValue?: string;
|
|
6
|
-
value?: string;
|
|
7
|
-
onValueChange?: (value: string) => void;
|
|
8
|
-
renderValue?: (value?: string) => ReactNode;
|
|
9
|
-
options?: {
|
|
10
|
-
label: ReactNode;
|
|
11
|
-
value: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
}[];
|
|
14
|
-
renderOption?: (props: {
|
|
15
|
-
isOpen: boolean;
|
|
16
|
-
close: () => void;
|
|
17
|
-
}) => ReactNode;
|
|
18
|
-
placeholder?: ReactNode;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
defaultOpen?: boolean;
|
|
21
|
-
open?: boolean;
|
|
22
|
-
onOpenChange?: (open: boolean) => void;
|
|
23
|
-
leftIcon?: ReactNode;
|
|
24
|
-
rightIcon?: ReactNode;
|
|
25
|
-
width?: string;
|
|
26
|
-
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
27
|
-
align?: 'start' | 'center' | 'end';
|
|
28
|
-
position?: 'popper' | 'item-aligned';
|
|
29
|
-
style?: CSSProperties;
|
|
30
|
-
className?: string;
|
|
31
|
-
}
|
|
32
|
-
declare const DropDown: import("react").ForwardRefExoticComponent<DropDownProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { DropDownProps } from './drop-down-type';
|
|
2
|
+
declare const DropDown: import("react").ForwardRefExoticComponent<DropDownProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
33
3
|
export default DropDown;
|
|
4
|
+
export type { DropDownProps } from './drop-down-type';
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react
|
|
2
|
-
import DropDown from './drop-down';
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
3
2
|
declare const meta: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<import("./drop-down").DropDownProps & import("react").RefAttributes<
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./drop-down-type").DropDownProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
size: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "select";
|
|
9
|
+
};
|
|
10
|
+
options: readonly ["s", "m"];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
width: string;
|
|
15
|
+
placeholder: import("react/jsx-runtime").JSX.Element;
|
|
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
|
+
/** renderOption 을 쓰면 항목 선택과 닫기(close)를 직접 처리한다. */
|
|
22
|
+
export declare const CustomOptionRender: Story;
|
|
23
|
+
export declare const WithIcons: Story;
|
|
24
|
+
export declare const Sizes: Story;
|
|
25
|
+
export declare const Selected: Story;
|
|
26
|
+
export declare const Disabled: Story;
|
|
27
|
+
/** 세 번째 항목은 disabled 라 고를 수 없다. */
|
|
28
|
+
export declare const Open: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { colors } from '../../../styles/token/colors';
|
|
2
|
+
export declare const fontSize: readonly ["xsm", "sm", "base", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl"];
|
|
3
|
+
export declare const weight: readonly ["regular", "medium", "semibold", "bold", "extrabold"];
|
|
4
|
+
export declare const color: (keyof typeof colors)[];
|
|
5
|
+
export declare const textAlign: readonly ["left", "center"];
|
|
6
|
+
export declare const textDecoration: readonly ["underline", "none", "line-through", "overline", "blink"];
|
|
7
|
+
export declare const wordBreak: readonly ["normal", "break-all", "break-word", "keep-all"];
|
|
8
|
+
export declare const whiteSpace: readonly ["normal", "nowrap", "pre", "pre-line", "pre-wrap"];
|
|
9
|
+
export declare const styleClassProps: readonly ["textAlign", "textDecoration", "wordBreak", "whiteSpace"];
|
|
10
|
+
export declare const textProps: {
|
|
11
|
+
color: {
|
|
12
|
+
type: "className";
|
|
13
|
+
className: string;
|
|
14
|
+
values: ("grey-scale-600" | "transparent" | "purple-50" | "purple-100" | "purple-200" | "purple-300" | "purple-400" | "purple-500" | "purple-600" | "purple-700" | "purple-800" | "purple-900" | "grey-scale-50" | "grey-scale-100" | "grey-scale-200" | "grey-scale-300" | "grey-scale-400" | "grey-scale-500" | "grey-scale-700" | "grey-scale-800" | "grey-scale-900" | "accent-red-50" | "accent-red-100" | "accent-red-200" | "accent-red-300" | "accent-red-400" | "accent-red-500" | "accent-red-600" | "accent-red-700" | "accent-red-800" | "accent-red-900" | "accent-pink-50" | "accent-pink-100" | "accent-pink-200" | "accent-pink-300" | "accent-pink-400" | "accent-pink-500" | "accent-pink-600" | "accent-pink-700" | "accent-pink-800" | "accent-pink-900" | "accent-magenta-50" | "accent-magenta-100" | "accent-magenta-200" | "accent-magenta-300" | "accent-magenta-400" | "accent-magenta-500" | "accent-magenta-600" | "accent-magenta-700" | "accent-magenta-800" | "accent-magenta-900" | "accent-blue-50" | "accent-blue-100" | "accent-blue-200" | "accent-blue-300" | "accent-blue-400" | "accent-blue-500" | "accent-blue-600" | "accent-blue-700" | "accent-blue-800" | "accent-blue-900" | "accent-mint-50" | "accent-mint-100" | "accent-mint-200" | "accent-mint-300" | "accent-mint-400" | "accent-mint-500" | "accent-mint-600" | "accent-mint-700" | "accent-mint-800" | "accent-mint-900" | "accent-green-50" | "accent-green-100" | "accent-green-200" | "accent-green-300" | "accent-green-400" | "accent-green-500" | "accent-green-600" | "accent-green-700" | "accent-green-800" | "accent-green-900" | "accent-yellow-50" | "accent-yellow-100" | "accent-yellow-200" | "accent-yellow-300" | "accent-yellow-400" | "accent-yellow-500" | "accent-yellow-600" | "accent-yellow-700" | "accent-yellow-800" | "accent-yellow-900" | "accent-orange-50" | "accent-orange-100" | "accent-orange-200" | "accent-orange-300" | "accent-orange-400" | "accent-orange-500" | "accent-orange-600" | "accent-orange-700" | "accent-orange-800" | "accent-orange-900" | "black" | "white")[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { colors } from '../../../styles/token/colors';
|
|
3
|
+
import { fontSize, weight } from './text-props';
|
|
3
4
|
export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
4
5
|
text: ReactNode;
|
|
5
|
-
size:
|
|
6
|
-
weight:
|
|
6
|
+
size: (typeof fontSize)[number];
|
|
7
|
+
weight: (typeof weight)[number];
|
|
7
8
|
color?: keyof typeof colors;
|
|
8
9
|
textDecoration?: CSSProperties['textDecoration'];
|
|
9
10
|
textAlign?: CSSProperties['textAlign'];
|
|
@@ -11,3 +12,6 @@ export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
|
11
12
|
whiteSpace?: CSSProperties['whiteSpace'];
|
|
12
13
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'strong';
|
|
13
14
|
}
|
|
15
|
+
export interface BaseTextProps extends HTMLAttributes<HTMLElement> {
|
|
16
|
+
as?: TextProps['as'];
|
|
17
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { TextProps } from './text-type';
|
|
2
|
-
declare const Text: (
|
|
2
|
+
declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<HTMLElement>>;
|
|
3
3
|
export default Text;
|
|
4
|
+
export type { TextProps } from './text-type';
|
|
@@ -1,9 +1,49 @@
|
|
|
1
|
-
import { StoryObj } from
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./text-type").TextProps & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
size: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "select";
|
|
9
|
+
};
|
|
10
|
+
options: readonly ["xsm", "sm", "base", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl"];
|
|
11
|
+
};
|
|
12
|
+
weight: {
|
|
13
|
+
control: {
|
|
14
|
+
type: "select";
|
|
15
|
+
};
|
|
16
|
+
options: readonly ["regular", "medium", "semibold", "bold", "extrabold"];
|
|
17
|
+
};
|
|
18
|
+
textAlign: {
|
|
19
|
+
control: {
|
|
20
|
+
type: "select";
|
|
21
|
+
};
|
|
22
|
+
options: readonly ["left", "center"];
|
|
23
|
+
};
|
|
24
|
+
textDecoration: {
|
|
25
|
+
control: {
|
|
26
|
+
type: "select";
|
|
27
|
+
};
|
|
28
|
+
options: readonly ["underline", "none", "line-through", "overline", "blink"];
|
|
29
|
+
};
|
|
30
|
+
color: {
|
|
31
|
+
control: {
|
|
32
|
+
type: "select";
|
|
33
|
+
};
|
|
34
|
+
options: ("grey-scale-600" | "transparent" | "purple-50" | "purple-100" | "purple-200" | "purple-300" | "purple-400" | "purple-500" | "purple-600" | "purple-700" | "purple-800" | "purple-900" | "grey-scale-50" | "grey-scale-100" | "grey-scale-200" | "grey-scale-300" | "grey-scale-400" | "grey-scale-500" | "grey-scale-700" | "grey-scale-800" | "grey-scale-900" | "accent-red-50" | "accent-red-100" | "accent-red-200" | "accent-red-300" | "accent-red-400" | "accent-red-500" | "accent-red-600" | "accent-red-700" | "accent-red-800" | "accent-red-900" | "accent-pink-50" | "accent-pink-100" | "accent-pink-200" | "accent-pink-300" | "accent-pink-400" | "accent-pink-500" | "accent-pink-600" | "accent-pink-700" | "accent-pink-800" | "accent-pink-900" | "accent-magenta-50" | "accent-magenta-100" | "accent-magenta-200" | "accent-magenta-300" | "accent-magenta-400" | "accent-magenta-500" | "accent-magenta-600" | "accent-magenta-700" | "accent-magenta-800" | "accent-magenta-900" | "accent-blue-50" | "accent-blue-100" | "accent-blue-200" | "accent-blue-300" | "accent-blue-400" | "accent-blue-500" | "accent-blue-600" | "accent-blue-700" | "accent-blue-800" | "accent-blue-900" | "accent-mint-50" | "accent-mint-100" | "accent-mint-200" | "accent-mint-300" | "accent-mint-400" | "accent-mint-500" | "accent-mint-600" | "accent-mint-700" | "accent-mint-800" | "accent-mint-900" | "accent-green-50" | "accent-green-100" | "accent-green-200" | "accent-green-300" | "accent-green-400" | "accent-green-500" | "accent-green-600" | "accent-green-700" | "accent-green-800" | "accent-green-900" | "accent-yellow-50" | "accent-yellow-100" | "accent-yellow-200" | "accent-yellow-300" | "accent-yellow-400" | "accent-yellow-500" | "accent-yellow-600" | "accent-yellow-700" | "accent-yellow-800" | "accent-yellow-900" | "accent-orange-50" | "accent-orange-100" | "accent-orange-200" | "accent-orange-300" | "accent-orange-400" | "accent-orange-500" | "accent-orange-600" | "accent-orange-700" | "accent-orange-800" | "accent-orange-900" | "black" | "white")[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
args: {
|
|
38
|
+
text: string;
|
|
39
|
+
size: "base";
|
|
40
|
+
weight: "regular";
|
|
41
|
+
};
|
|
5
42
|
};
|
|
6
43
|
export default meta;
|
|
7
44
|
type Story = StoryObj<typeof meta>;
|
|
8
45
|
export declare const Default: Story;
|
|
9
|
-
export declare const
|
|
46
|
+
export declare const Sizes: Story;
|
|
47
|
+
export declare const Weights: Story;
|
|
48
|
+
export declare const Colors: Story;
|
|
49
|
+
export declare const AlignAndDecoration: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as Spinner } from
|
|
2
|
-
export { default as InlineLoading } from
|
|
3
|
-
export { default as OverlayLoading } from
|
|
4
|
-
export type { SpinnerProps } from
|
|
5
|
-
export type { InlineLoadingProps } from
|
|
6
|
-
export type { OverlayLoadingProps } from
|
|
1
|
+
export { default as Spinner } from './spinner/spinner';
|
|
2
|
+
export { default as InlineLoading } from './inline-loading/inline-loading';
|
|
3
|
+
export { default as OverlayLoading } from './overlay-loading/overlay-loading';
|
|
4
|
+
export type { SpinnerProps } from './spinner/spinner-type';
|
|
5
|
+
export type { InlineLoadingProps } from './inline-loading/inline-loading-type';
|
|
6
|
+
export type { OverlayLoadingProps } from './overlay-loading/overlay-loading-type';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const justifyContent: readonly ["flex-start", "center", "flex-end", "space-between"];
|
|
2
|
+
export declare const inlineLoadingProps: {
|
|
3
|
+
justifyContent: {
|
|
4
|
+
type: "css";
|
|
5
|
+
key: "justifyContent";
|
|
6
|
+
values: readonly ["flex-start", "center", "flex-end", "space-between"];
|
|
7
|
+
default: "flex-start";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
+
import { justifyContent } from './inline-loading-props';
|
|
4
|
+
export interface InlineLoadingProps extends StyleProps {
|
|
4
5
|
size: number;
|
|
5
|
-
justifyContent?:
|
|
6
|
-
|
|
6
|
+
justifyContent?: (typeof justifyContent)[number];
|
|
7
|
+
}
|
|
8
|
+
export interface BaseInlineLoadingProps extends ComponentPropsWithRef<'div'> {
|
|
9
|
+
ringStyle?: CSSProperties;
|
|
7
10
|
}
|
|
8
|
-
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { InlineLoadingProps } from
|
|
2
|
-
declare const InlineLoading: (
|
|
1
|
+
import { InlineLoadingProps } from './inline-loading-type';
|
|
2
|
+
declare const InlineLoading: import("react").ForwardRefExoticComponent<InlineLoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export default InlineLoading;
|
|
4
|
+
export type { InlineLoadingProps } from './inline-loading-type';
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (
|
|
5
|
-
tags: string[];
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./inline-loading-type").InlineLoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
5
|
argTypes: {
|
|
7
6
|
justifyContent: {
|
|
8
7
|
control: "inline-radio";
|
|
9
|
-
options:
|
|
10
|
-
};
|
|
11
|
-
indicatorColor: {
|
|
12
|
-
control: "select";
|
|
13
|
-
options: string[];
|
|
8
|
+
options: readonly ["flex-start", "center", "flex-end", "space-between"];
|
|
14
9
|
};
|
|
15
10
|
};
|
|
16
11
|
args: {
|
|
17
12
|
size: number;
|
|
18
13
|
justifyContent: "flex-start";
|
|
19
|
-
indicatorColor: "grey-scale-200";
|
|
20
14
|
};
|
|
21
15
|
};
|
|
22
16
|
export default meta;
|
|
23
17
|
type Story = StoryObj<typeof meta>;
|
|
24
18
|
export declare const Default: Story;
|
|
19
|
+
export declare const Justify: Story;
|
|
20
|
+
export declare const Sizes: Story;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
+
export interface OverlayLoadingProps extends StyleProps {
|
|
3
4
|
open?: boolean;
|
|
4
5
|
message?: string;
|
|
5
|
-
spinnerColor?: keyof typeof colors;
|
|
6
6
|
backdropOpacity?: number;
|
|
7
7
|
zIndex?: number;
|
|
8
8
|
}
|
|
9
|
+
export interface BaseOverlayLoadingProps extends ComponentPropsWithRef<'div'> {
|
|
10
|
+
backdropStyle?: CSSProperties;
|
|
11
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const OverlayLoading: (
|
|
1
|
+
import { OverlayLoadingProps } from './overlay-loading-type';
|
|
2
|
+
declare const OverlayLoading: import("react").ForwardRefExoticComponent<OverlayLoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export default OverlayLoading;
|
|
4
|
-
export type { OverlayLoadingProps };
|
|
4
|
+
export type { OverlayLoadingProps } from './overlay-loading-type';
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (
|
|
5
|
-
tags: string[];
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./overlay-loading-type").OverlayLoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
5
|
argTypes: {
|
|
7
|
-
spinnerColor: {
|
|
8
|
-
control: "select";
|
|
9
|
-
options: string[];
|
|
10
|
-
};
|
|
11
6
|
backdropOpacity: {
|
|
12
7
|
control: {
|
|
13
8
|
type: "range";
|
|
@@ -23,7 +18,6 @@ declare const meta: {
|
|
|
23
18
|
args: {
|
|
24
19
|
open: true;
|
|
25
20
|
message: string;
|
|
26
|
-
spinnerColor: "grey-scale-200";
|
|
27
21
|
backdropOpacity: number;
|
|
28
22
|
zIndex: number;
|
|
29
23
|
};
|
|
@@ -31,3 +25,9 @@ declare const meta: {
|
|
|
31
25
|
export default meta;
|
|
32
26
|
type Story = StoryObj<typeof meta>;
|
|
33
27
|
export declare const Default: Story;
|
|
28
|
+
export declare const WithoutMessage: Story;
|
|
29
|
+
export declare const LightBackdrop: Story;
|
|
30
|
+
/** open 이 false 면 아무것도 그리지 않는다. */
|
|
31
|
+
export declare const Closed: Story;
|
|
32
|
+
/** 화면 전체를 덮어 뒤의 본문을 누를 수 없게 한다. */
|
|
33
|
+
export declare const OverContent: Story;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseSpinner: 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 BaseSpinner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const spinnerProps: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
+
export type SpinnerProps = StyleProps;
|
|
4
|
+
export type BaseSpinnerProps = ComponentPropsWithRef<'div'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const Spinner: ({ color }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
declare const Spinner: import("react").ForwardRefExoticComponent<import("../../../helpers/types/common-props").StyleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
2
|
export default Spinner;
|
|
3
|
+
export type { SpinnerProps } from './spinner-type';
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (
|
|
5
|
-
tags: string[];
|
|
6
|
-
argTypes: {
|
|
7
|
-
color: {
|
|
8
|
-
control: "select";
|
|
9
|
-
options: string[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
args: {
|
|
13
|
-
color: "grey-scale-200";
|
|
14
|
-
};
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("../../../helpers/types/common-props").StyleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
5
|
};
|
|
16
6
|
export default meta;
|
|
17
7
|
type Story = StoryObj<typeof meta>;
|
|
18
8
|
export declare const Default: Story;
|
|
9
|
+
export declare const Colors: Story;
|
|
10
|
+
/** 링은 currentColor 다. 어두운 배경에서는 className 이나 style 로 color 를 준다. */
|
|
11
|
+
export declare const OnDark: Story;
|
|
@@ -2,10 +2,22 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { ModalCloseProps, ModalContainerProps, ModalRootProps, ModalSubTitleProps, ModalTitleProps, ModalTriggerProps } from './modal-type';
|
|
3
3
|
declare const ModalRoot: {
|
|
4
4
|
(props: PropsWithChildren<ModalRootProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
Container: import("react").ForwardRefExoticComponent<ModalContainerProps & {
|
|
8
|
+
children?: import("react").ReactNode | undefined;
|
|
9
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Trigger: import("react").ForwardRefExoticComponent<ModalTriggerProps & {
|
|
11
|
+
children?: import("react").ReactNode | undefined;
|
|
12
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
Title: import("react").ForwardRefExoticComponent<ModalTitleProps & {
|
|
14
|
+
children?: import("react").ReactNode | undefined;
|
|
15
|
+
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
16
|
+
SubTitle: import("react").ForwardRefExoticComponent<ModalSubTitleProps & {
|
|
17
|
+
children?: import("react").ReactNode | undefined;
|
|
18
|
+
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
Close: import("react").ForwardRefExoticComponent<ModalCloseProps & {
|
|
20
|
+
children?: import("react").ReactNode | undefined;
|
|
21
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
22
|
};
|
|
11
23
|
export default ModalRoot;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const sizes: readonly ["s", "m", "l"];
|
|
2
2
|
export declare const modalWithDoubleButtonProps: {
|
|
3
|
-
size:
|
|
4
|
-
type: "className";
|
|
5
|
-
className: string;
|
|
6
|
-
values: readonly ["s", "m", "l"];
|
|
7
|
-
default: "m";
|
|
8
|
-
};
|
|
3
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
9
4
|
};
|
|
@@ -1,25 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { CTAButtonProps } from '../button/button-type';
|
|
4
|
+
import { sizes } from './modal-props';
|
|
1
5
|
export interface ModalRootProps {
|
|
2
6
|
open?: boolean;
|
|
3
7
|
onOpenChange?: (open: boolean) => void;
|
|
4
8
|
}
|
|
5
|
-
export interface ModalContainerProps {
|
|
9
|
+
export interface ModalContainerProps extends AsChildProps {
|
|
6
10
|
forceMount?: true;
|
|
7
|
-
asChild?: boolean;
|
|
8
11
|
className?: string;
|
|
9
12
|
}
|
|
10
|
-
export interface ModalTriggerProps {
|
|
11
|
-
asChild?: boolean;
|
|
13
|
+
export interface ModalTriggerProps extends AsChildProps {
|
|
12
14
|
className?: string;
|
|
13
15
|
}
|
|
14
|
-
export interface ModalTitleProps {
|
|
15
|
-
asChild?: boolean;
|
|
16
|
+
export interface ModalTitleProps extends AsChildProps {
|
|
16
17
|
className?: string;
|
|
17
18
|
}
|
|
18
|
-
export interface ModalSubTitleProps {
|
|
19
|
-
asChild?: boolean;
|
|
19
|
+
export interface ModalSubTitleProps extends AsChildProps {
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
-
export interface ModalCloseProps {
|
|
23
|
-
asChild?: boolean;
|
|
22
|
+
export interface ModalCloseProps extends AsChildProps {
|
|
24
23
|
className?: string;
|
|
25
24
|
}
|
|
25
|
+
export interface ModalWithDoubleButtonProps {
|
|
26
|
+
title?: string;
|
|
27
|
+
subTitle?: string | ReactNode;
|
|
28
|
+
titleIcon?: ReactNode;
|
|
29
|
+
content?: ReactNode;
|
|
30
|
+
showCloseIcon?: boolean;
|
|
31
|
+
showTitleLine?: boolean;
|
|
32
|
+
left: CTAButtonProps;
|
|
33
|
+
right: CTAButtonProps;
|
|
34
|
+
size?: (typeof sizes)[number];
|
|
35
|
+
}
|