@1d1s/design-system 0.1.17 → 0.2.0
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 +1 -1
- package/dist/components/AppHeader/AppHeader.d.ts +24 -0
- package/dist/components/AppHeader/AppHeader.stories.d.ts +6 -0
- package/dist/components/AppHeader/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +5 -5
- package/dist/components/Button/Button.stories.d.ts +4 -2
- package/dist/components/ChallengeCard/ChallengeCard.d.ts +8 -25
- package/dist/components/ChallengeCard/ChallengeCard.stories.d.ts +3 -0
- package/dist/components/CheckContainer/CheckContainer.d.ts +17 -0
- package/dist/components/CheckContainer/CheckContainer.stories.d.ts +9 -0
- package/dist/components/CheckContainer/index.d.ts +1 -0
- package/dist/components/CheckList/CheckList.d.ts +1 -1
- package/dist/components/CircularProgress/CircularProgress.d.ts +4 -7
- package/dist/components/CircularProgress/CircularProgress.stories.d.ts +2 -2
- package/dist/components/DatePicker/DatePicker.d.ts +23 -22
- package/dist/components/DatePicker/DatePicker.stories.d.ts +2 -1
- package/dist/components/Dropdown/Dropdown.stories.d.ts +1 -0
- package/dist/components/Icons/ChallengeDumbbell.d.ts +2 -0
- package/dist/components/Icons/ChallengeFlag.d.ts +2 -0
- package/dist/components/Icons/ChallengeFlame.d.ts +2 -0
- package/dist/components/Icons/ChallengeLaptop.d.ts +2 -0
- package/dist/components/Icons/ChallengeTarget.d.ts +2 -0
- package/dist/components/Icons/ChallengeTrophy.d.ts +2 -0
- package/dist/components/Icons/index.d.ts +6 -0
- package/dist/components/RightSidebar/RightSidebar.d.ts +28 -0
- package/dist/components/RightSidebar/RightSidebar.stories.d.ts +6 -0
- package/dist/components/RightSidebar/index.d.ts +1 -0
- package/dist/components/ScheduleCalendar/ScheduleCalendar.d.ts +31 -0
- package/dist/components/ScheduleCalendar/ScheduleCalendar.stories.d.ts +8 -0
- package/dist/components/ScheduleCalendar/index.d.ts +1 -0
- package/dist/components/StatContainer/StatContainer.d.ts +13 -0
- package/dist/components/StatContainer/StatContainer.stories.d.ts +7 -0
- package/dist/components/StatContainer/index.d.ts +1 -0
- package/dist/components/StepIndicator/StepIndicator.d.ts +16 -0
- package/dist/components/StepIndicator/StepIndicator.stories.d.ts +8 -0
- package/dist/components/StepIndicator/index.d.ts +1 -0
- package/dist/components/Streak/Streak.d.ts +3 -1
- package/dist/components/TextField/TextField.d.ts +12 -35
- package/dist/components/TextField/TextField.stories.d.ts +3 -3
- package/dist/components/Toggle/Toggle.d.ts +8 -11
- package/dist/components/Toggle/Toggle.stories.d.ts +5 -2
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +8 -20
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +3 -2
- package/dist/components/Ui/Button.d.ts +2 -2
- package/dist/components/index.d.ts +6 -4
- package/dist/index.es.js +4560 -3880
- package/dist/index.umd.js +15 -15
- package/package.json +1 -1
- package/src/styles/colors.css +15 -15
- package/src/styles/globals.css +9 -1
- package/src/styles/typography.css +16 -0
- package/dist/components/BackButton/BackButton.d.ts +0 -1
- package/dist/components/BackButton/BackButton.stories.d.ts +0 -6
- package/dist/components/BackButton/index.d.ts +0 -1
- package/dist/components/ChallengeListItem/ChallengeListItem.d.ts +0 -12
- package/dist/components/ChallengeListItem/ChallengeListItem.stories.d.ts +0 -6
- package/dist/components/ChallengeListItem/index.d.ts +0 -1
- package/dist/components/GlobalChrome/GlobalChrome.d.ts +0 -3
- package/dist/components/GlobalChrome/GlobalChrome.stories.d.ts +0 -9
- package/dist/components/GlobalChrome/index.d.ts +0 -1
- package/dist/components/Menu/Menu.d.ts +0 -2
- package/dist/components/Menu/Menu.stories.d.ts +0 -6
- package/dist/components/Menu/index.d.ts +0 -1
package/README.md
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AppHeaderNavItem {
|
|
3
|
+
key: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface AppHeaderProps {
|
|
8
|
+
brandName?: string;
|
|
9
|
+
logo?: React.ReactNode;
|
|
10
|
+
navItems?: AppHeaderNavItem[];
|
|
11
|
+
activeKey?: string;
|
|
12
|
+
profileImage?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
onLogoClick?(): void;
|
|
15
|
+
onNavChange?(key: string): void;
|
|
16
|
+
onSearchClick?(): void;
|
|
17
|
+
onNotificationClick?(): void;
|
|
18
|
+
onProfileClick?(): void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* AppHeader
|
|
22
|
+
* 로고, 주요 네비게이션, 우측 액션 아이콘을 포함한 상단 헤더 컴포넌트.
|
|
23
|
+
*/
|
|
24
|
+
export declare function AppHeader({ brandName, logo, navItems, activeKey, profileImage, className, onLogoClick, onNavChange, onSearchClick, onNotificationClick, onProfileClick, }: AppHeaderProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AppHeader';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
declare const customButtonVariants: (props?: ({
|
|
3
|
-
variant?: "
|
|
4
|
-
size?: "
|
|
3
|
+
variant?: "default" | "outlined" | "secondary" | "ghost" | null | undefined;
|
|
4
|
+
size?: "small" | "medium" | "large" | "icon" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
export interface ButtonProps extends React.ComponentProps<"button">, VariantProps<typeof customButtonVariants> {
|
|
7
7
|
asChild?: boolean;
|
|
@@ -9,12 +9,12 @@ export interface ButtonProps extends React.ComponentProps<"button">, VariantProp
|
|
|
9
9
|
/**
|
|
10
10
|
* Button
|
|
11
11
|
* 커스텀 버튼 컴포넌트
|
|
12
|
-
* @param variant 버튼스타일 : default,
|
|
13
|
-
* @param size 버튼 크기 :
|
|
12
|
+
* @param variant 버튼스타일 : default, outlined, secondary, ghost
|
|
13
|
+
* @param size 버튼 크기 : small, medium, large, icon
|
|
14
14
|
*
|
|
15
15
|
* @example 기본 버튼
|
|
16
16
|
* ```tsx
|
|
17
|
-
* <Button variant="default" size="
|
|
17
|
+
* <Button variant="default" size="large">Large Button</Button>
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
export declare function Button({ className, variant, size, asChild, disabled, ...props }: ButtonProps): React.ReactElement;
|
|
@@ -6,6 +6,8 @@ type Story = StoryObj<typeof Button>;
|
|
|
6
6
|
export declare const Large: Story;
|
|
7
7
|
export declare const Medium: Story;
|
|
8
8
|
export declare const Small: Story;
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
9
|
+
export declare const Outlined: Story;
|
|
10
|
+
export declare const Secondary: Story;
|
|
11
|
+
export declare const Ghost: Story;
|
|
11
12
|
export declare const Disabled: Story;
|
|
13
|
+
export declare const Icon: Story;
|
|
@@ -1,38 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ChallengeCardProps {
|
|
2
3
|
challengeTitle: string;
|
|
3
4
|
challengeType: string;
|
|
5
|
+
challengeCategory?: string;
|
|
6
|
+
challengeIcon?: ReactNode;
|
|
7
|
+
imageUrl?: string;
|
|
4
8
|
currentUserCount: number;
|
|
5
9
|
maxUserCount: number;
|
|
6
10
|
startDate: string;
|
|
7
11
|
endDate: string;
|
|
8
12
|
isOngoing: boolean;
|
|
13
|
+
isEnded?: boolean;
|
|
9
14
|
className?: string;
|
|
10
15
|
onClick?(): void;
|
|
11
16
|
}
|
|
12
17
|
/**
|
|
13
18
|
* ChallengeCard
|
|
14
|
-
* 챌린지 카드 컴포넌트 - 제목, 유형, 참여자 수, 기간, 상태(
|
|
15
|
-
*
|
|
16
|
-
* @param challengeTitle 챌린지 이름
|
|
17
|
-
* @param challengeType 챌린지 유형
|
|
18
|
-
* @param currentUserCount 현재 참여자 수
|
|
19
|
-
* @param maxUserCount 최대 참여자 수
|
|
20
|
-
* @param startDate 시작일 (YYYY-MM-DD)
|
|
21
|
-
* @param endDate 종료일 (YYYY-MM-DD)
|
|
22
|
-
* @param isOngoing 챌린지 진행 상태 (true: 진행중, false: 모집중)
|
|
23
|
-
*
|
|
24
|
-
* @example 기본 사용 예
|
|
25
|
-
* ```tsx
|
|
26
|
-
* <ChallengeCard
|
|
27
|
-
* challengeTitle="챌린지 제목"
|
|
28
|
-
* challengeType="고정목표형"
|
|
29
|
-
* currentUserCount={12}
|
|
30
|
-
* maxUserCount={20}
|
|
31
|
-
* startDate="2023-10-01"
|
|
32
|
-
* endDate="2023-10-31"
|
|
33
|
-
* isOngoing={true}
|
|
34
|
-
* />
|
|
35
|
-
* ```
|
|
19
|
+
* 챌린지 카드 컴포넌트 - 제목, 유형, 참여자 수, 기간, 상태(진행중/모집중/종료됨) 표시
|
|
36
20
|
*/
|
|
37
|
-
export declare function ChallengeCard({ challengeTitle, challengeType, currentUserCount, maxUserCount, startDate, endDate, isOngoing, className, onClick, }:
|
|
38
|
-
export {};
|
|
21
|
+
export declare function ChallengeCard({ challengeTitle, challengeType, challengeCategory, imageUrl, currentUserCount, maxUserCount, startDate, endDate, isOngoing, isEnded, className, onClick, }: ChallengeCardProps): React.ReactElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CheckContainerProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
onCheckedChange?(checked: boolean): void;
|
|
9
|
+
showCheckIndicator?: boolean;
|
|
10
|
+
width?: number | string;
|
|
11
|
+
height?: number | string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* CheckContainer
|
|
15
|
+
* 선택 가능한 카드형 컨테이너. 우측 상단 체크 인디케이터 표시 여부를 제어할 수 있습니다.
|
|
16
|
+
*/
|
|
17
|
+
export declare function CheckContainer({ label, icon, children, checked, defaultChecked, onCheckedChange, showCheckIndicator, width, height, className, disabled, onClick, style, "aria-label": ariaLabel, ...props }: CheckContainerProps): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckContainer } from './CheckContainer';
|
|
3
|
+
declare const meta: Meta<typeof CheckContainer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CheckContainer>;
|
|
6
|
+
export declare const WithIndicator: Story;
|
|
7
|
+
export declare const WithoutIndicator: Story;
|
|
8
|
+
export declare const CustomSize: Story;
|
|
9
|
+
export declare const WithCustomContent: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CheckContainer';
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const circularProgressVariants: (props?: ({
|
|
4
|
-
size?: "
|
|
5
|
-
strokeWidthVariant?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
4
|
+
size?: "sm" | "lg" | null | undefined;
|
|
6
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
6
|
export type CircularProgressVariants = VariantProps<typeof circularProgressVariants>;
|
|
8
7
|
interface CircularProgressProps extends CircularProgressVariants {
|
|
9
8
|
value: number;
|
|
10
|
-
color?: 'blue' | 'green' | 'red';
|
|
11
9
|
showPercentage?: boolean;
|
|
12
10
|
className?: string;
|
|
13
11
|
}
|
|
@@ -16,15 +14,14 @@ interface CircularProgressProps extends CircularProgressVariants {
|
|
|
16
14
|
* 원형 진행률 표시 컴포넌트
|
|
17
15
|
*
|
|
18
16
|
* @param value 진행률 (0~100)
|
|
19
|
-
* @param size 크기 (sm,
|
|
20
|
-
* @param color 색상 (red, blue, green)
|
|
17
|
+
* @param size 크기 (sm, lg)
|
|
21
18
|
* @param showPercentage 퍼센트 표시 여부
|
|
22
19
|
* @param className 추가 클래스 이름
|
|
23
20
|
*
|
|
24
21
|
* @example 기본 사용
|
|
25
22
|
* ```tsx
|
|
26
|
-
* <CircularProgress value={75} size="
|
|
23
|
+
* <CircularProgress value={75} size="sm" showPercentage />
|
|
27
24
|
* ```
|
|
28
25
|
*/
|
|
29
|
-
export declare function CircularProgress({ value, size,
|
|
26
|
+
export declare function CircularProgress({ value, size, showPercentage, className, }: CircularProgressProps): React.ReactElement;
|
|
30
27
|
export {};
|
|
@@ -4,5 +4,5 @@ declare const meta: Meta<typeof CircularProgress>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof CircularProgress>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const Large: Story;
|
|
8
|
+
export declare const ExtraLarge: Story;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DateRange } from 'react-day-picker';
|
|
3
|
+
interface BasePickerProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
disableClickPropagation?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface DatePickerProps extends BasePickerProps {
|
|
9
|
+
value: Date | undefined;
|
|
10
|
+
onChange(date: Date | undefined): void;
|
|
11
|
+
}
|
|
12
|
+
export interface RangeDatePickerProps extends BasePickerProps {
|
|
13
|
+
value: DateRange | undefined;
|
|
14
|
+
onChange(range: DateRange | undefined): void;
|
|
15
|
+
}
|
|
1
16
|
/**
|
|
2
17
|
* DatePicker
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @param value hook에서 관리하는 날짜 값
|
|
6
|
-
* @param onChange 날짜 선택 변경 핸들러
|
|
7
|
-
*
|
|
8
|
-
* @example 기본 사용 예
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <FormItem>
|
|
11
|
-
* <FormField
|
|
12
|
-
* control={control}
|
|
13
|
-
* name="startDate"
|
|
14
|
-
* render={({ field }) => (
|
|
15
|
-
* <DatePicker value={field.value} onChange={field.onChange} />
|
|
16
|
-
* )}
|
|
17
|
-
* />
|
|
18
|
-
* </FormItem>
|
|
19
|
-
* ```
|
|
18
|
+
* 단일 날짜를 선택하는 시안형 Date Picker 컴포넌트.
|
|
20
19
|
*/
|
|
21
|
-
export declare function DatePicker({ value, onChange, disableClickPropagation, }:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
export declare function DatePicker({ value, onChange, className, placeholder, disableClickPropagation, }: DatePickerProps): React.ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* RangeDatePicker
|
|
23
|
+
* 시작일/종료일 범위를 선택하는 시안형 Date Range Picker 컴포넌트.
|
|
24
|
+
*/
|
|
25
|
+
export declare function RangeDatePicker({ value, onChange, className, placeholder, disableClickPropagation, }: RangeDatePickerProps): React.ReactElement;
|
|
26
|
+
export {};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export * from './AddCircle';
|
|
2
2
|
export * from './Calendar';
|
|
3
|
+
export * from './ChallengeDumbbell';
|
|
4
|
+
export * from './ChallengeFlag';
|
|
5
|
+
export * from './ChallengeFlame';
|
|
6
|
+
export * from './ChallengeLaptop';
|
|
7
|
+
export * from './ChallengeTarget';
|
|
8
|
+
export * from './ChallengeTrophy';
|
|
3
9
|
export * from './Check';
|
|
4
10
|
export * from './Chevron';
|
|
5
11
|
export * from './ChevronDown';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type ChallengeTone = "blue" | "green" | "orange";
|
|
3
|
+
export interface RightSidebarChallenge {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
progress: number;
|
|
7
|
+
hasDeadline?: boolean;
|
|
8
|
+
tone?: ChallengeTone;
|
|
9
|
+
}
|
|
10
|
+
export interface RightSidebarProps {
|
|
11
|
+
userName: string;
|
|
12
|
+
userHandle: string;
|
|
13
|
+
userImage?: string;
|
|
14
|
+
streakDays: number;
|
|
15
|
+
fixed?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
diaryButtonLabel?: string;
|
|
18
|
+
myPageButtonLabel?: string;
|
|
19
|
+
settingButtonLabel?: string;
|
|
20
|
+
challengeTitle?: string;
|
|
21
|
+
challenges?: RightSidebarChallenge[];
|
|
22
|
+
onCollapseClick?(): void;
|
|
23
|
+
onOpenSettings?(): void;
|
|
24
|
+
onWriteDiary?(): void;
|
|
25
|
+
onGoMyPage?(): void;
|
|
26
|
+
}
|
|
27
|
+
export declare function RightSidebar({ userName, userHandle, userImage, streakDays, fixed, className, diaryButtonLabel, myPageButtonLabel, settingButtonLabel, challengeTitle, challenges, onCollapseClick, onOpenSettings, onWriteDiary, onGoMyPage, }: RightSidebarProps): React.ReactElement;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RightSidebar';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type DayTone = "default" | "strong" | "accent" | "muted";
|
|
3
|
+
type BarTone = "main" | "soft";
|
|
4
|
+
export interface ScheduleCalendarBar {
|
|
5
|
+
width?: number | string;
|
|
6
|
+
tone?: BarTone;
|
|
7
|
+
}
|
|
8
|
+
export interface ScheduleCalendarCell {
|
|
9
|
+
id?: string;
|
|
10
|
+
day?: React.ReactNode;
|
|
11
|
+
dayTone?: DayTone;
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
subtitle?: React.ReactNode;
|
|
14
|
+
bars?: ScheduleCalendarBar[];
|
|
15
|
+
highlighted?: boolean;
|
|
16
|
+
muted?: boolean;
|
|
17
|
+
colSpan?: number;
|
|
18
|
+
content?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface ScheduleCalendarProps {
|
|
21
|
+
rows: ScheduleCalendarCell[][];
|
|
22
|
+
weekLabels?: string[];
|
|
23
|
+
cellMinHeight?: number;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* ScheduleCalendar
|
|
28
|
+
* 주 단위 표 형태로 일정을 보여주는 커스텀 캘린더 컴포넌트.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ScheduleCalendar({ rows, weekLabels, cellMinHeight, className, }: ScheduleCalendarProps): React.ReactElement;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ScheduleCalendar } from './ScheduleCalendar';
|
|
3
|
+
declare const meta: Meta<typeof ScheduleCalendar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ScheduleCalendar>;
|
|
6
|
+
export declare const OneMonth: Story;
|
|
7
|
+
export declare const TwoWeeks: Story;
|
|
8
|
+
export declare const ThreeWeeks: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ScheduleCalendar';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StatContainerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
value: React.ReactNode;
|
|
6
|
+
unit: React.ReactNode;
|
|
7
|
+
iconClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* StatContainer
|
|
11
|
+
* 아이콘, 제목, 데이터, 단위를 표시하는 정보 카드 컴포넌트
|
|
12
|
+
*/
|
|
13
|
+
export declare function StatContainer({ icon, title, value, unit, className, iconClassName, ...props }: StatContainerProps): React.ReactElement;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { StatContainer } from './StatContainer';
|
|
3
|
+
declare const meta: Meta<typeof StatContainer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof StatContainer>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const DashboardGrid: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StatContainer';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StepIndicatorItem {
|
|
3
|
+
id?: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface StepIndicatorProps {
|
|
7
|
+
steps: StepIndicatorItem[];
|
|
8
|
+
/** 현재 단계 (1부터 시작) */
|
|
9
|
+
currentStep: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* StepIndicator
|
|
14
|
+
* 단계 진행 상태를 가로 라인과 원형 포인트로 표시하는 컴포넌트.
|
|
15
|
+
*/
|
|
16
|
+
export declare function StepIndicator({ steps, currentStep, className, }: StepIndicatorProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { StepIndicator } from './StepIndicator';
|
|
3
|
+
declare const meta: Meta<typeof StepIndicator>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof StepIndicator>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Completed: Story;
|
|
8
|
+
export declare const FirstStep: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StepIndicator';
|
|
@@ -10,6 +10,8 @@ export interface StreakProps {
|
|
|
10
10
|
data?: StreakData[];
|
|
11
11
|
/** 각 날짜 박스의 크기 (픽셀) */
|
|
12
12
|
size?: number;
|
|
13
|
+
/** 박스 사이 간격 (픽셀) */
|
|
14
|
+
gap?: number;
|
|
13
15
|
/** 추가 클래스 */
|
|
14
16
|
className?: string;
|
|
15
17
|
}
|
|
@@ -18,4 +20,4 @@ export interface StreakProps {
|
|
|
18
20
|
* 활동 기록을 깃허브 잔디(Contribution Graph) 스타일로 보여주는 컴포넌트.
|
|
19
21
|
* 7행 그리드 구조로 요일별로 쌓이며 가로로 데이터가 추가됩니다.
|
|
20
22
|
*/
|
|
21
|
-
export declare function Streak({ data, size, className, }: StreakProps): React.ReactElement;
|
|
23
|
+
export declare function Streak({ data, size, gap, className, }: StreakProps): React.ReactElement;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare const
|
|
3
|
+
declare const fieldVariants: (props?: ({
|
|
4
4
|
variant?: "search" | "default" | null | undefined;
|
|
5
|
-
|
|
5
|
+
multiline?: boolean | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof
|
|
8
|
-
label?:
|
|
7
|
+
export interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof fieldVariants> {
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
labelHint?: React.ReactNode;
|
|
9
10
|
error?: string;
|
|
10
11
|
multiline?: boolean;
|
|
11
12
|
rows?: number;
|
|
@@ -13,37 +14,13 @@ interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
|
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* TextField
|
|
16
|
-
* 입력 필드
|
|
17
|
-
*
|
|
18
|
-
* @param label 입력 필드 레이블 (선택적)
|
|
19
|
-
* @param error 입력 필드 오류 메시지 (선택적)
|
|
20
|
-
* @param variant 스타일 변형 (default | search)
|
|
21
|
-
* @param multiline 다중 행 입력 여부 (textarea 렌더링)
|
|
22
|
-
*
|
|
23
|
-
* @example 기본 사용
|
|
24
|
-
* ```tsx
|
|
25
|
-
* <TextField
|
|
26
|
-
* label="레이블"
|
|
27
|
-
* placeholder="플레이스홀더"
|
|
28
|
-
* />
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @example 검색 필드
|
|
32
|
-
* ```tsx
|
|
33
|
-
* <TextField
|
|
34
|
-
* variant="search"
|
|
35
|
-
* placeholder="검색어 입력"
|
|
36
|
-
* />
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @example 다중 행 입력
|
|
40
|
-
* ```tsx
|
|
41
|
-
* <TextField
|
|
42
|
-
* multiline
|
|
43
|
-
* rows={4}
|
|
44
|
-
* placeholder="내용을 입력하세요"
|
|
45
|
-
* />
|
|
46
|
-
* ```
|
|
17
|
+
* 시안형 입력 필드 컴포넌트. `multiline` 사용 시 TextArea 스타일로 렌더링합니다.
|
|
47
18
|
*/
|
|
48
19
|
export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
20
|
+
export type TextAreaProps = Omit<TextFieldProps, 'multiline' | 'type'>;
|
|
21
|
+
/**
|
|
22
|
+
* TextArea
|
|
23
|
+
* TextField의 multiline 전용 래퍼 컴포넌트.
|
|
24
|
+
*/
|
|
25
|
+
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
49
26
|
export {};
|
|
@@ -3,7 +3,7 @@ import { TextField } from './TextField';
|
|
|
3
3
|
declare const meta: Meta<typeof TextField>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof TextField>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const InputOnly: Story;
|
|
7
|
+
export declare const WithRequiredLabel: Story;
|
|
8
|
+
export declare const DescriptionTextArea: Story;
|
|
8
9
|
export declare const Search: Story;
|
|
9
|
-
export declare const TextArea: Story;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
1
2
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
declare const toggleVariants: (props?: ({
|
|
4
|
+
shape?: "square" | "rounded" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
interface ToggleProps extends React.ComponentProps<typeof TogglePrimitive.Root>, VariantProps<typeof toggleVariants> {
|
|
7
|
+
icon?: React.ReactNode;
|
|
4
8
|
children: React.ReactNode;
|
|
5
9
|
className?: string;
|
|
6
10
|
}
|
|
7
11
|
/**
|
|
8
12
|
* Toggle
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param icon 선택적 아이콘 이모지 텍스트
|
|
12
|
-
*
|
|
13
|
-
* @example 기본 사용
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <Toggle icon="🔥">인기</Toggle>
|
|
16
|
-
* ```
|
|
13
|
+
* 카테고리 선택형 토글 버튼 컴포넌트. `shape`로 둥근/사각 스타일을 선택할 수 있습니다.
|
|
17
14
|
*/
|
|
18
|
-
export declare function Toggle({ icon, children, className, ...props }: ToggleProps): React.ReactElement;
|
|
15
|
+
export declare function Toggle({ icon, shape, children, className, ...props }: ToggleProps): React.ReactElement;
|
|
19
16
|
export {};
|
|
@@ -3,5 +3,8 @@ import { Toggle } from './Toggle';
|
|
|
3
3
|
declare const meta: Meta<typeof Toggle>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Toggle>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const RoundedSelected: Story;
|
|
7
|
+
export declare const SquareSelected: Story;
|
|
8
|
+
export declare const RowPreview: Story;
|
|
9
|
+
export declare const RoundedRowPreview: Story;
|
|
10
|
+
export declare const CustomSizeByClassName: Story;
|