@nurihaus/web-design-system 3.0.3 → 3.1.1
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/dist/ai/components.md +305 -11
- package/dist/ai/tokens.md +38 -13
- package/dist/avatar.js +10 -9
- package/dist/breadcrumb.js +364 -0
- package/dist/check-box.js +16 -35
- package/dist/chunk-149.js +4 -4
- package/dist/chunk-298.js +1 -1
- package/dist/chunk-302.js +4 -4
- package/dist/chunk-309.js +1 -1
- package/dist/chunk-364.js +2 -2
- package/dist/chunk-387.js +23 -4
- package/dist/chunk-436.js +34 -0
- package/dist/chunk-558.js +6 -6
- package/dist/chunk-563.js +7 -7
- package/dist/chunk-657.js +143 -0
- package/dist/chunk-713.js +39 -0
- package/dist/chunk-739.js +6 -6
- package/dist/chunk-77.js +35 -0
- package/dist/chunk-777.js +2 -2
- package/dist/chunk-910.js +64 -0
- package/dist/chunk-917.js +1 -1
- package/dist/chunk-933.js +4 -4
- package/dist/chunk-976.js +2 -2
- package/dist/collapsible-menu.js +7 -7
- package/dist/components/breadcrumb/base-breadcrumb.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb-props.d.ts +4 -0
- package/dist/components/breadcrumb/breadcrumb-type.d.ts +33 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +4 -0
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts +25 -0
- package/dist/components/check-box/base-check-box.d.ts +1 -1
- package/dist/components/drawer/base-drawer.d.ts +15 -0
- package/dist/components/drawer/drawer-props.d.ts +11 -0
- package/dist/components/drawer/drawer-type.d.ts +28 -0
- package/dist/components/drawer/drawer.d.ts +4 -0
- package/dist/components/drawer/drawer.stories.d.ts +34 -0
- package/dist/components/drop-down/drop-down-props.d.ts +2 -2
- package/dist/components/drop-down/drop-down.stories.d.ts +1 -1
- package/dist/components/elements/text/text-props.d.ts +1 -1
- package/dist/components/elements/text/text.stories.d.ts +1 -1
- package/dist/components/modal/base-modal.d.ts +4 -1
- package/dist/components/modal/modal-props.d.ts +3 -0
- package/dist/components/modal/modal-type.d.ts +18 -4
- package/dist/components/modal/modal-with-double-button.stories.d.ts +22 -0
- package/dist/components/modal/modal.d.ts +4 -0
- package/dist/components/modal/modal.stories.d.ts +11 -6
- package/dist/components/pagination/base-pagination.d.ts +9 -0
- package/dist/components/pagination/pagination-props.d.ts +4 -0
- package/dist/components/pagination/pagination-type.d.ts +20 -0
- package/dist/components/pagination/pagination.d.ts +4 -0
- package/dist/components/pagination/pagination.stories.d.ts +25 -0
- package/dist/components/skeleton/base-skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton-props.d.ts +15 -0
- package/dist/components/skeleton/skeleton-type.d.ts +12 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.stories.d.ts +327 -0
- package/dist/components/switch/base-switch.d.ts +11 -0
- package/dist/components/switch/switch-props.d.ts +4 -0
- package/dist/components/switch/switch-type.d.ts +19 -0
- package/dist/components/switch/switch.d.ts +4 -0
- package/dist/components/switch/switch.stories.d.ts +24 -0
- package/dist/components/text-area/base-text-area.d.ts +10 -0
- package/dist/components/text-area/text-area-props.d.ts +12 -0
- package/dist/components/text-area/text-area-type.d.ts +34 -0
- package/dist/components/text-area/text-area.d.ts +4 -0
- package/dist/components/text-area/text-area.stories.d.ts +32 -0
- package/dist/components/text-field/text-field-props.d.ts +2 -2
- package/dist/components/text-field/text-field.stories.d.ts +1 -1
- package/dist/components/toast/base-toast.d.ts +20 -0
- package/dist/components/toast/toast-props.d.ts +18 -0
- package/dist/components/toast/toast-type.d.ts +45 -0
- package/dist/components/toast/toast.d.ts +5 -0
- package/dist/components/toast/toast.stories.d.ts +310 -0
- package/dist/components.css +1089 -56
- package/dist/cta-button.js +12 -11
- package/dist/data-table.js +6 -6
- package/dist/drawer.js +390 -0
- package/dist/drop-down.js +15 -29
- package/dist/helpers/hooks/useExternalState.d.ts +5 -0
- package/dist/icon-text-badge.js +11 -11
- package/dist/icon-text-option-badge.js +10 -10
- package/dist/index.d.ts +16 -0
- package/dist/index.js +2097 -477
- package/dist/loading.js +8 -8
- package/dist/modal-with-double-button.js +60 -255
- package/dist/modal.js +288 -0
- package/dist/option-badge.js +11 -11
- package/dist/pagination.js +412 -0
- package/dist/radio.js +10 -10
- package/dist/skeleton.js +331 -0
- package/dist/styles.css +921 -29
- package/dist/switch.js +349 -0
- package/dist/tabs.js +6 -6
- package/dist/text-area.js +374 -0
- package/dist/text-field.js +7 -7
- package/dist/text.js +8 -8
- package/dist/toast.js +497 -0
- package/dist/tokens.css +32 -5
- package/dist/tooltip.js +9 -9
- package/package.json +33 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const sizes: readonly ["s", "m", "l"];
|
|
2
|
+
export declare const sides: readonly ["right", "left", "bottom"];
|
|
3
|
+
export declare const drawerContentProps: {
|
|
4
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
5
|
+
side: {
|
|
6
|
+
type: "className";
|
|
7
|
+
className: string;
|
|
8
|
+
values: readonly ["right", "left", "bottom"];
|
|
9
|
+
default: "right";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { sides, sizes } from './drawer-props';
|
|
4
|
+
export interface DrawerRootProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface DrawerTriggerProps extends ComponentPropsWithRef<'button'>, AsChildProps {
|
|
10
|
+
}
|
|
11
|
+
export type DrawerContentProps = ComponentPropsWithRef<'div'>;
|
|
12
|
+
export interface DrawerTitleProps extends ComponentPropsWithRef<'h2'>, AsChildProps {
|
|
13
|
+
}
|
|
14
|
+
export interface DrawerDescriptionProps extends ComponentPropsWithRef<'p'>, AsChildProps {
|
|
15
|
+
}
|
|
16
|
+
export interface DrawerCloseProps extends ComponentPropsWithRef<'button'>, AsChildProps {
|
|
17
|
+
}
|
|
18
|
+
export interface DrawerProps extends DrawerRootProps, StyleProps {
|
|
19
|
+
/** asChild 로 감싸 클릭하면 열리는 요소. 없으면 open·defaultOpen 으로만 연다 */
|
|
20
|
+
trigger?: ReactElement;
|
|
21
|
+
title: ReactNode;
|
|
22
|
+
description?: ReactNode;
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
footer?: ReactNode;
|
|
25
|
+
side?: (typeof sides)[number];
|
|
26
|
+
size?: (typeof sizes)[number];
|
|
27
|
+
showCloseIcon?: boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./drawer-type").DrawerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
side: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "select";
|
|
9
|
+
};
|
|
10
|
+
options: readonly ["right", "left", "bottom"];
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
control: {
|
|
14
|
+
type: "select";
|
|
15
|
+
};
|
|
16
|
+
options: readonly ["s", "m", "l"];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
args: {
|
|
20
|
+
title: string;
|
|
21
|
+
children: string;
|
|
22
|
+
trigger: import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
export declare const Default: Story;
|
|
28
|
+
export declare const Sides: Story;
|
|
29
|
+
export declare const Sizes: Story;
|
|
30
|
+
export declare const Bottom: Story;
|
|
31
|
+
export declare const WithDescriptionAndFooter: Story;
|
|
32
|
+
export declare const WithoutCloseIcon: Story;
|
|
33
|
+
export declare const LongContent: Story;
|
|
34
|
+
export declare const Controlled: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const sizes: readonly ["s", "m"];
|
|
1
|
+
export declare const sizes: readonly ["xs", "s", "m", "l", "xl"];
|
|
2
2
|
export declare const dropDownSingleProps: {
|
|
3
|
-
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m"]>;
|
|
3
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s", "m", "l", "xl"]>;
|
|
4
4
|
width: import("../../helpers/types/propsDef").CSSPropsTypeWithoutValues<string | number>;
|
|
5
5
|
};
|
|
@@ -11,6 +11,6 @@ export declare const textProps: {
|
|
|
11
11
|
color: {
|
|
12
12
|
type: "className";
|
|
13
13
|
className: string;
|
|
14
|
-
values: ("
|
|
14
|
+
values: ("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-600" | "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
15
|
};
|
|
16
16
|
};
|
|
@@ -31,7 +31,7 @@ declare const meta: {
|
|
|
31
31
|
control: {
|
|
32
32
|
type: "select";
|
|
33
33
|
};
|
|
34
|
-
options: ("
|
|
34
|
+
options: ("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-600" | "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
35
|
};
|
|
36
36
|
};
|
|
37
37
|
args: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { ModalCloseProps, ModalContainerProps, ModalRootProps, ModalSubTitleProps, ModalTitleProps, ModalTriggerProps } from './modal-type';
|
|
2
|
+
import { ModalCloseProps, ModalContainerProps, ModalDescriptionProps, ModalRootProps, ModalSubTitleProps, ModalTitleProps, ModalTriggerProps } from './modal-type';
|
|
3
3
|
declare const ModalRoot: {
|
|
4
4
|
(props: PropsWithChildren<ModalRootProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
@@ -16,6 +16,9 @@ declare const ModalRoot: {
|
|
|
16
16
|
SubTitle: import("react").ForwardRefExoticComponent<ModalSubTitleProps & {
|
|
17
17
|
children?: import("react").ReactNode | undefined;
|
|
18
18
|
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
Description: import("react").ForwardRefExoticComponent<ModalDescriptionProps & {
|
|
20
|
+
children?: import("react").ReactNode | undefined;
|
|
21
|
+
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
19
22
|
Close: import("react").ForwardRefExoticComponent<ModalCloseProps & {
|
|
20
23
|
children?: import("react").ReactNode | undefined;
|
|
21
24
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -2,3 +2,6 @@ export declare const sizes: readonly ["s", "m", "l"];
|
|
|
2
2
|
export declare const modalWithDoubleButtonProps: {
|
|
3
3
|
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
4
4
|
};
|
|
5
|
+
export declare const modalProps: {
|
|
6
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
7
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { AsChildProps } from '../../helpers/types/common-props';
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
3
|
import { CTAButtonProps } from '../button/button-type';
|
|
4
4
|
import { sizes } from './modal-props';
|
|
5
5
|
export interface ModalRootProps {
|
|
6
6
|
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
7
8
|
onOpenChange?: (open: boolean) => void;
|
|
8
9
|
}
|
|
9
|
-
export interface ModalContainerProps extends AsChildProps {
|
|
10
|
+
export interface ModalContainerProps extends AsChildProps, StyleProps {
|
|
10
11
|
forceMount?: true;
|
|
11
|
-
className?: string;
|
|
12
12
|
}
|
|
13
13
|
export interface ModalTriggerProps extends AsChildProps {
|
|
14
14
|
className?: string;
|
|
@@ -19,6 +19,9 @@ export interface ModalTitleProps extends AsChildProps {
|
|
|
19
19
|
export interface ModalSubTitleProps extends AsChildProps {
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
+
export interface ModalDescriptionProps extends AsChildProps {
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
22
25
|
export interface ModalCloseProps extends AsChildProps {
|
|
23
26
|
className?: string;
|
|
24
27
|
}
|
|
@@ -33,3 +36,14 @@ export interface ModalWithDoubleButtonProps {
|
|
|
33
36
|
right: CTAButtonProps;
|
|
34
37
|
size?: (typeof sizes)[number];
|
|
35
38
|
}
|
|
39
|
+
export interface ModalProps extends ModalRootProps, StyleProps {
|
|
40
|
+
/** 있으면 `Modal.Trigger asChild` 로 감싸 클릭하면 열리는 요소가 된다. */
|
|
41
|
+
trigger?: ReactElement;
|
|
42
|
+
title: ReactNode;
|
|
43
|
+
description?: ReactNode;
|
|
44
|
+
children?: ReactNode;
|
|
45
|
+
/** 버튼 영역. 쓰는 쪽이 CTAButton 을 넣는다. */
|
|
46
|
+
footer?: ReactNode;
|
|
47
|
+
showCloseIcon?: boolean;
|
|
48
|
+
size?: (typeof sizes)[number];
|
|
49
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import ModalWithDoubleButton from './modal-with-double-button';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<import("./modal-type").ModalWithDoubleButtonProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
argTypes: {
|
|
7
|
+
size: {
|
|
8
|
+
control: {
|
|
9
|
+
type: "select";
|
|
10
|
+
};
|
|
11
|
+
options: readonly ["s", "m", "l"];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof ModalWithDoubleButton.Column>;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const Row: Story;
|
|
19
|
+
/** 모달은 화면 가운데 하나만 뜨므로 size 는 Controls 에서 바꿔 본다. */
|
|
20
|
+
export declare const Size: Story;
|
|
21
|
+
export declare const WithCloseIconAndTitleLine: Story;
|
|
22
|
+
export declare const DisabledButton: Story;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import ModalWithDoubleButton from './modal-with-double-button';
|
|
3
2
|
declare const meta: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<import("./modal-type").
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./modal-type").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
5
|
argTypes: {
|
|
7
6
|
size: {
|
|
8
7
|
control: {
|
|
@@ -11,12 +10,18 @@ declare const meta: {
|
|
|
11
10
|
options: readonly ["s", "m", "l"];
|
|
12
11
|
};
|
|
13
12
|
};
|
|
13
|
+
args: {
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
children: string;
|
|
17
|
+
};
|
|
14
18
|
};
|
|
15
19
|
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
17
21
|
export declare const Default: Story;
|
|
18
|
-
export declare const Row: Story;
|
|
19
22
|
/** 모달은 화면 가운데 하나만 뜨므로 size 는 Controls 에서 바꿔 본다. */
|
|
20
23
|
export declare const Size: Story;
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
24
|
+
export declare const Controlled: Story;
|
|
25
|
+
export declare const WithoutCloseIcon: Story;
|
|
26
|
+
export declare const WithoutDescriptionAndFooter: Story;
|
|
27
|
+
export declare const LongContent: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PaginationItemProps, PaginationRootProps } from './pagination-type';
|
|
3
|
+
declare const PaginationRoot: import("react").ForwardRefExoticComponent<Omit<PropsWithChildren<PaginationRootProps>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
|
|
4
|
+
Item: import("react").ForwardRefExoticComponent<Omit<PropsWithChildren<PaginationItemProps>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
Ellipsis: 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
|
+
};
|
|
9
|
+
export default PaginationRoot;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { sizes } from './pagination-props';
|
|
3
|
+
export interface PaginationRootProps extends ComponentPropsWithRef<'nav'> {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface PaginationItemProps extends ComponentPropsWithRef<'button'> {
|
|
7
|
+
/** 현재 페이지면 `aria-current="page"` 와 `data-state="active"` 가 붙는다 */
|
|
8
|
+
active?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type PaginationEllipsisProps = ComponentPropsWithRef<'span'>;
|
|
12
|
+
export interface PaginationProps extends PaginationRootProps {
|
|
13
|
+
totalPages: number;
|
|
14
|
+
page?: number;
|
|
15
|
+
defaultPage?: number;
|
|
16
|
+
onPageChange?: (page: number) => void;
|
|
17
|
+
/** 현재 페이지 양옆에 보일 페이지 수. 기본 1 */
|
|
18
|
+
siblingCount?: number;
|
|
19
|
+
size?: (typeof sizes)[number];
|
|
20
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PaginationProps } from './pagination-type';
|
|
2
|
+
declare const Pagination: import("react").ForwardRefExoticComponent<Omit<PaginationProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
3
|
+
export default Pagination;
|
|
4
|
+
export type { PaginationProps } from './pagination-type';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("./pagination-type").PaginationProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
size: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "select";
|
|
9
|
+
};
|
|
10
|
+
options: readonly ["s", "m"];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
totalPages: number;
|
|
15
|
+
defaultPage: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const Default: Story;
|
|
21
|
+
export declare const Controlled: Story;
|
|
22
|
+
export declare const Sizes: Story;
|
|
23
|
+
export declare const SiblingCount: Story;
|
|
24
|
+
export declare const FewPages: Story;
|
|
25
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseSkeleton: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
2
|
+
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;
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default BaseSkeleton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSPropsTypeWithoutValues } from '../../helpers/types/propsDef';
|
|
2
|
+
export declare const shapes: readonly ["text", "rect", "circle"];
|
|
3
|
+
export declare const skeletonProps: {
|
|
4
|
+
shape: {
|
|
5
|
+
type: "className";
|
|
6
|
+
className: string;
|
|
7
|
+
values: readonly ["text", "rect", "circle"];
|
|
8
|
+
default: "text";
|
|
9
|
+
};
|
|
10
|
+
width: CSSPropsTypeWithoutValues<string | number>;
|
|
11
|
+
height: {
|
|
12
|
+
type: "css";
|
|
13
|
+
key: "height";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { shapes } from './skeleton-props';
|
|
3
|
+
export type BaseSkeletonProps = ComponentPropsWithRef<'span'>;
|
|
4
|
+
export interface SkeletonProps extends BaseSkeletonProps {
|
|
5
|
+
shape?: (typeof shapes)[number];
|
|
6
|
+
width?: number | string;
|
|
7
|
+
/** circle 이면 비울 때 width 와 같다. */
|
|
8
|
+
height?: number | string;
|
|
9
|
+
/** shape 가 text 일 때 줄 수. 2 이상이면 줄마다 하나씩 그리고 마지막 줄은 짧다. */
|
|
10
|
+
lines?: number;
|
|
11
|
+
animated?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SkeletonProps } from './skeleton-type';
|
|
2
|
+
declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<SkeletonProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
3
|
+
export default Skeleton;
|
|
4
|
+
export type { SkeletonProps } from './skeleton-type';
|