@1d1s/design-system 1.0.0 → 1.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/dist/components/Accordion/Accordion.d.ts +47 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +8 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/AppHeader/AppHeader.d.ts +26 -0
- package/dist/components/AppHeader/AppHeader.stories.d.ts +9 -0
- package/dist/components/AppHeader/index.d.ts +1 -0
- package/dist/components/AvatarImagePicker/AvatarImagePicker.d.ts +24 -0
- package/dist/components/AvatarImagePicker/AvatarImagePicker.stories.d.ts +7 -0
- package/dist/components/AvatarImagePicker/index.d.ts +1 -0
- package/dist/components/BannerCarousel/BannerCarousel.d.ts +42 -0
- package/dist/components/BannerCarousel/BannerCarousel.stories.d.ts +10 -0
- package/dist/components/BannerCarousel/index.d.ts +1 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts +19 -0
- package/dist/components/BottomSheet/BottomSheet.stories.d.ts +7 -0
- package/dist/components/BottomSheet/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Calendar/Calendar.d.ts +4 -0
- package/dist/components/Calendar/Calendar.stories.d.ts +15 -0
- package/dist/components/Calendar/index.d.ts +1 -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 +37 -0
- package/dist/components/CheckList/CheckList.stories.d.ts +9 -0
- package/dist/components/CheckList/index.d.ts +1 -0
- package/dist/components/CommentThread/CommentThread.d.ts +31 -0
- package/dist/components/CommentThread/CommentThread.stories.d.ts +9 -0
- package/dist/components/CommentThread/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +26 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +7 -0
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +78 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +11 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/GoalAddList/GoalAddList.d.ts +16 -0
- package/dist/components/GoalAddList/GoalAddList.stories.d.ts +7 -0
- package/dist/components/GoalAddList/index.d.ts +1 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +50 -0
- package/dist/components/ImagePicker/ImagePicker.stories.d.ts +8 -0
- package/dist/components/ImagePicker/index.d.ts +1 -0
- package/dist/components/ImagePlaceholder/ImagePlaceholder.d.ts +11 -0
- package/dist/components/ImagePlaceholder/index.d.ts +1 -0
- package/dist/components/PageWatermark/PageWatermark.d.ts +1 -0
- package/dist/components/PageWatermark/PageWatermark.stories.d.ts +6 -0
- package/dist/components/PageWatermark/index.d.ts +1 -0
- package/dist/components/RightSidebar/RightSidebar.d.ts +41 -0
- package/dist/components/RightSidebar/RightSidebar.stories.d.ts +14 -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 +10 -0
- package/dist/components/ScheduleCalendar/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +53 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Snackbar/Snackbar.d.ts +20 -0
- package/dist/components/Snackbar/Snackbar.stories.d.ts +8 -0
- package/dist/components/Snackbar/SnackbarProvider.d.ts +33 -0
- package/dist/components/Snackbar/index.d.ts +4 -0
- package/dist/components/StatCard/StatCard.d.ts +1 -1
- package/dist/components/StepIndicator/StepIndicator.d.ts +19 -0
- package/dist/components/StepIndicator/StepIndicator.stories.d.ts +10 -0
- package/dist/components/StepIndicator/index.d.ts +1 -0
- package/dist/components/Streak/Streak.d.ts +31 -0
- package/dist/components/Streak/index.d.ts +1 -0
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TextField/TextField.d.ts +2 -2
- package/dist/components/Toast/Toast.d.ts +53 -0
- package/dist/components/Toast/Toast.stories.d.ts +10 -0
- package/dist/components/Toast/ToastProvider.d.ts +40 -0
- package/dist/components/Toast/index.d.ts +4 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +21 -0
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +8 -0
- package/dist/components/ToggleGroup/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +7 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +7 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/index.es.js +12933 -2593
- package/dist/index.umd.js +45 -1
- package/package.json +9 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImagePlaceholder';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PageWatermark(): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageWatermark';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type RightSidebarProgressTone = "blue" | "green" | "orange";
|
|
3
|
+
export interface RightSidebarChallenge {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
progress: number;
|
|
7
|
+
hasDeadline?: boolean;
|
|
8
|
+
tone?: RightSidebarProgressTone;
|
|
9
|
+
}
|
|
10
|
+
export interface RightSidebarProps {
|
|
11
|
+
isLoggedIn?: boolean;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
userName?: string;
|
|
14
|
+
userSubtitle?: string;
|
|
15
|
+
userImage?: string;
|
|
16
|
+
streakDays: number;
|
|
17
|
+
fixed?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
diaryButtonLabel?: string;
|
|
20
|
+
myPageButtonLabel?: string;
|
|
21
|
+
loginButtonLabel?: string;
|
|
22
|
+
loginPromptMessage?: string;
|
|
23
|
+
settingButtonLabel?: string;
|
|
24
|
+
challengeTitle?: string;
|
|
25
|
+
challenges?: RightSidebarChallenge[];
|
|
26
|
+
emptyChallengeMessage?: string;
|
|
27
|
+
joinChallengeButtonLabel?: string;
|
|
28
|
+
joinChallengeMaxUserCount?: number;
|
|
29
|
+
createChallengeButtonLabel?: string;
|
|
30
|
+
collapsible?: boolean;
|
|
31
|
+
onCollapseClick?(): void;
|
|
32
|
+
onOpenSettings?(): void;
|
|
33
|
+
onWriteDiary?(): void;
|
|
34
|
+
onGoMyPage?(): void;
|
|
35
|
+
onLogin?(): void;
|
|
36
|
+
onJoinChallenge?(): void;
|
|
37
|
+
onCreateChallenge?(): void;
|
|
38
|
+
onChallengeClick?(challenge: RightSidebarChallenge): void;
|
|
39
|
+
}
|
|
40
|
+
export declare function RightSidebar({ isLoggedIn, isLoading, userName, userSubtitle, userImage, streakDays, fixed, collapsible, className, diaryButtonLabel, myPageButtonLabel, loginButtonLabel, loginPromptMessage, settingButtonLabel, challengeTitle, challenges, emptyChallengeMessage, joinChallengeButtonLabel, joinChallengeMaxUserCount, createChallengeButtonLabel, onCollapseClick, onOpenSettings, onWriteDiary, onGoMyPage, onLogin, onJoinChallenge, onCreateChallenge, onChallengeClick, }: RightSidebarProps): React.ReactElement;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { RightSidebar } from './RightSidebar';
|
|
3
|
+
declare const meta: Meta<typeof RightSidebar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof RightSidebar>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const LoggedOut: Story;
|
|
8
|
+
export declare const EmptyChallenges: Story;
|
|
9
|
+
export declare const NotCollapsible: Story;
|
|
10
|
+
export declare const Mobile: Story;
|
|
11
|
+
export declare const EmptyChallengesJoinEnabled: Story;
|
|
12
|
+
export declare const Loading: Story;
|
|
13
|
+
export declare const LoadingLoggedOut: Story;
|
|
14
|
+
export declare const LoadingToLoadedTransition: Story;
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
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;
|
|
9
|
+
export declare const MobileOneMonth: Story;
|
|
10
|
+
export declare const MobileTwoWeeks: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ScheduleCalendar';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
/**
|
|
7
|
+
* SelectTrigger
|
|
8
|
+
* Select 기본 트리거 컴포넌트
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <SelectTrigger className="w-[180px]">
|
|
13
|
+
* <SelectValue placeholder="값을 선택해주세요" />
|
|
14
|
+
* </SelectTrigger>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
18
|
+
size?: "sm" | "default";
|
|
19
|
+
}): React.ReactElement;
|
|
20
|
+
/**
|
|
21
|
+
* SelectItem
|
|
22
|
+
* Select 기본 아이템 컴포넌트
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <SelectItem value="option1">value1</SelectItem>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.ReactElement;
|
|
30
|
+
/**
|
|
31
|
+
* SelectSeparator
|
|
32
|
+
* Select 구분선 컴포넌트
|
|
33
|
+
*/
|
|
34
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): React.ReactElement;
|
|
35
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.ReactElement;
|
|
36
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.ReactElement;
|
|
37
|
+
/**
|
|
38
|
+
* SelectContent
|
|
39
|
+
* Select 기본 컨텐츠 컴포넌트
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <SelectContent>
|
|
44
|
+
* <SelectGroup>
|
|
45
|
+
* <SelectItem value="option1">Option 1</SelectItem>
|
|
46
|
+
* <SelectItem value="option2">Option 2</SelectItem>
|
|
47
|
+
* </SelectGroup>
|
|
48
|
+
* </SelectContent>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.ReactElement;
|
|
52
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.ReactElement;
|
|
53
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Select';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SnackbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** 표시 텍스트 */
|
|
4
|
+
text: React.ReactNode;
|
|
5
|
+
/** 우측 인라인 액션 라벨 (예: "복구") */
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
/** 액션 클릭 콜백 */
|
|
8
|
+
onAction?: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Snackbar
|
|
12
|
+
* 컴팩트한 다크 톤 알림 — 보통 화면 하단에 1줄 결과 + 1액션 형태로 표시.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <Snackbar text="일지가 임시저장되었어요" action="복구" onAction={() => restore()} />
|
|
17
|
+
* <Snackbar text="링크를 복사했어요" />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function Snackbar({ text, action, onAction, className, ...props }: SnackbarProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Snackbar } from './Snackbar';
|
|
3
|
+
declare const meta: Meta<typeof Snackbar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Snackbar>;
|
|
6
|
+
export declare const WithAction: Story;
|
|
7
|
+
export declare const TextOnly: Story;
|
|
8
|
+
export declare const WithProvider: Story;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SnackbarOptions {
|
|
3
|
+
text: React.ReactNode;
|
|
4
|
+
action?: React.ReactNode;
|
|
5
|
+
onAction?: () => void;
|
|
6
|
+
/** ms 단위 자동 닫힘. 0 또는 음수면 수동 닫기 (기본 3000) */
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
interface SnackbarContextValue {
|
|
10
|
+
show: (options: SnackbarOptions) => number;
|
|
11
|
+
dismiss: (id: number) => void;
|
|
12
|
+
}
|
|
13
|
+
export type SnackbarPosition = "top" | "bottom";
|
|
14
|
+
export interface SnackbarProviderProps {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
/** 위치 (기본 `bottom`) */
|
|
17
|
+
position?: SnackbarPosition;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* SnackbarProvider
|
|
21
|
+
* 앱 루트에 한 번 감싸 두면 어디서든 `useSnackbar()`로 스낵바를 띄울 수 있어요.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <SnackbarProvider>
|
|
26
|
+
* <App />
|
|
27
|
+
* </SnackbarProvider>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function SnackbarProvider({ children, position, }: SnackbarProviderProps): React.ReactElement;
|
|
31
|
+
/** 스낵바를 띄우거나 닫을 수 있는 훅. `<SnackbarProvider>` 하위에서만 사용 */
|
|
32
|
+
export declare function useSnackbar(): SnackbarContextValue;
|
|
33
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const statCardVariants: (props?: ({
|
|
4
|
-
tone?: "mint" | "blue" | "gray" | "
|
|
4
|
+
tone?: "mint" | "blue" | "gray" | "white" | "brand" | null | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface StatCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof statCardVariants> {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StepIndicatorItem {
|
|
3
|
+
id?: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
type StepIndicatorSize = "sm" | "md" | "lg";
|
|
7
|
+
export interface StepIndicatorProps {
|
|
8
|
+
steps: StepIndicatorItem[];
|
|
9
|
+
/** 현재 단계 (1부터 시작) */
|
|
10
|
+
currentStep: number;
|
|
11
|
+
size?: StepIndicatorSize;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* StepIndicator
|
|
16
|
+
* 단계 진행 상태를 가로 라인과 원형 포인트로 표시하는 컴포넌트.
|
|
17
|
+
*/
|
|
18
|
+
export declare function StepIndicator({ steps, currentStep, size, className, }: StepIndicatorProps): React.ReactElement;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
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;
|
|
9
|
+
export declare const Small: Story;
|
|
10
|
+
export declare const Large: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StepIndicator';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StreakData {
|
|
3
|
+
/** 날짜 (YYYY-MM-DD) */
|
|
4
|
+
date: string;
|
|
5
|
+
/** 활동 레벨 (0-4) */
|
|
6
|
+
count: number;
|
|
7
|
+
}
|
|
8
|
+
export interface StreakProps {
|
|
9
|
+
/** 활동 데이터 (count 0-4 권장, 데이터 개수에 따라 가로로 길어짐) */
|
|
10
|
+
data?: StreakData[];
|
|
11
|
+
/** 각 날짜 박스의 크기 (픽셀) */
|
|
12
|
+
size?: number;
|
|
13
|
+
/** 박스 사이 간격 (픽셀) */
|
|
14
|
+
gap?: number;
|
|
15
|
+
/** 추가 클래스 */
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 셀 클릭 시 팝오버 하단에 렌더링할 액션 영역.
|
|
19
|
+
* 버튼, 링크 등 인터랙티브 요소를 넣을 수 있습니다.
|
|
20
|
+
*/
|
|
21
|
+
renderCellActions?: (item: StreakData) => React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Streak
|
|
25
|
+
* 활동 기록을 깃허브 잔디(Contribution Graph) 스타일로 보여주는 컴포넌트.
|
|
26
|
+
* 7행 그리드 구조로 요일별로 쌓이며 가로로 데이터가 추가됩니다.
|
|
27
|
+
*
|
|
28
|
+
* - 데스크탑: hover 시 날짜/활동 정보 팝오버 표시
|
|
29
|
+
* - 모바일: 클릭 시 테두리 + 정보 팝오버 표시, renderCellActions로 액션 영역 추가 가능
|
|
30
|
+
*/
|
|
31
|
+
export declare function Streak({ data, size, gap, className, renderCellActions, }: StreakProps): React.ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
declare const tagVariants: (props?: ({
|
|
3
|
-
tone?: "mint" | "blue" | "green" | "gray" | "
|
|
3
|
+
tone?: "mint" | "blue" | "green" | "gray" | "red" | "brand" | null | undefined;
|
|
4
4
|
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
5
5
|
pill?: boolean | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const textVariants: (props?: ({
|
|
3
3
|
size?: "display1" | "display2" | "heading1" | "heading2" | "body1" | "body2" | "caption1" | "caption2" | "caption3" | "pageTitle" | null | undefined;
|
|
4
|
-
weight?: "bold" | "
|
|
4
|
+
weight?: "bold" | "extrabold" | "semibold" | "medium" | "regular" | "light" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
/**
|
|
7
7
|
* Text
|
|
@@ -6,7 +6,7 @@ declare const fieldVariants: (props?: ({
|
|
|
6
6
|
hasIconLeft?: boolean | null | undefined;
|
|
7
7
|
hasSuffix?: boolean | null | undefined;
|
|
8
8
|
multiline?: boolean | null | undefined;
|
|
9
|
-
state?: "
|
|
9
|
+
state?: "disabled" | "default" | "error" | "focus" | "filled" | null | undefined;
|
|
10
10
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
11
|
export interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof fieldVariants> {
|
|
12
12
|
label?: React.ReactNode;
|
|
@@ -39,5 +39,5 @@ export interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInput
|
|
|
39
39
|
* <TextField label="기간" defaultValue="14" suffix="일" size="sm" />
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<
|
|
42
|
+
export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
43
43
|
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { IconName } from '../Icons/Icon';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare const toastIconStyles: {
|
|
5
|
+
brand: {
|
|
6
|
+
bg: string;
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
success: {
|
|
10
|
+
bg: string;
|
|
11
|
+
color: string;
|
|
12
|
+
};
|
|
13
|
+
danger: {
|
|
14
|
+
bg: string;
|
|
15
|
+
color: string;
|
|
16
|
+
};
|
|
17
|
+
info: {
|
|
18
|
+
bg: string;
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type ToastTone = keyof typeof toastIconStyles;
|
|
23
|
+
declare const toastVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
24
|
+
export interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof toastVariants> {
|
|
25
|
+
/** 톤 — `brand` (default) · `success` · `danger` · `info` */
|
|
26
|
+
tone?: ToastTone;
|
|
27
|
+
/** 좌측 원형 배지 아이콘 */
|
|
28
|
+
icon?: IconName;
|
|
29
|
+
/** 제목 (1행) */
|
|
30
|
+
title?: React.ReactNode;
|
|
31
|
+
/** 본문 (보조 1행) */
|
|
32
|
+
body?: React.ReactNode;
|
|
33
|
+
/** 우측 액션 라벨 */
|
|
34
|
+
action?: React.ReactNode;
|
|
35
|
+
/** 액션 클릭 콜백 */
|
|
36
|
+
onAction?: () => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Toast
|
|
40
|
+
* 화이트 카드 위에 컬러 아이콘 배지 + 제목/본문/액션을 보여주는 알림.
|
|
41
|
+
*
|
|
42
|
+
* 단독 표시용 프레젠테이션 컴포넌트로, `ToastProvider` + `useToast`와 함께 쓸 수 있어요.
|
|
43
|
+
*
|
|
44
|
+
* @param tone `brand` (default) · `success` · `danger` · `info`
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <Toast tone="success" icon="Check" title="일지를 저장했어요" body="응원이 도착하면 알려드릴게요" />
|
|
49
|
+
* <Toast tone="info" icon="Bell" title="새 응원 3개" action="보기" onAction={() => view()} />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function Toast({ tone, icon, title, body, action, onAction, className, ...props }: ToastProps): React.ReactElement;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Toast } from './Toast';
|
|
3
|
+
declare const meta: Meta<typeof Toast>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Toast>;
|
|
6
|
+
export declare const Brand: Story;
|
|
7
|
+
export declare const Success: Story;
|
|
8
|
+
export declare const Info: Story;
|
|
9
|
+
export declare const Danger: Story;
|
|
10
|
+
export declare const WithProvider: Story;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ToastProps, ToastTone } from './Toast';
|
|
2
|
+
import { IconName } from '../Icons/Icon';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export interface ToastOptions {
|
|
5
|
+
tone?: ToastTone;
|
|
6
|
+
icon?: IconName;
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
body?: React.ReactNode;
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
onAction?: () => void;
|
|
11
|
+
/** ms 단위 자동 닫힘. 0 또는 음수면 수동 닫기 (기본 4000) */
|
|
12
|
+
duration?: number;
|
|
13
|
+
}
|
|
14
|
+
interface ToastContextValue {
|
|
15
|
+
show: (options: ToastOptions) => number;
|
|
16
|
+
dismiss: (id: number) => void;
|
|
17
|
+
}
|
|
18
|
+
export type ToastPosition = "top" | "top-right" | "top-left" | "bottom" | "bottom-right" | "bottom-left";
|
|
19
|
+
export interface ToastProviderProps {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
/** 토스트 정렬 위치 (기본 `top-right`) */
|
|
22
|
+
position?: ToastPosition;
|
|
23
|
+
/** 동시에 표시되는 최대 토스트 수 (기본 5) */
|
|
24
|
+
max?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* ToastProvider
|
|
28
|
+
* 앱 루트에 한 번 감싸 두면 어디서든 `useToast()`로 토스트를 띄울 수 있어요.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <ToastProvider position="top-right">
|
|
33
|
+
* <App />
|
|
34
|
+
* </ToastProvider>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function ToastProvider({ children, position, max, }: ToastProviderProps): React.ReactElement;
|
|
38
|
+
/** 토스트를 띄우거나 닫을 수 있는 훅. `<ToastProvider>` 하위에서만 사용 */
|
|
39
|
+
export declare function useToast(): ToastContextValue;
|
|
40
|
+
export type { ToastProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
3
|
+
declare const toggleGroupItemVariants: (props?: ({
|
|
4
|
+
shape?: "square" | "rounded" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
interface ToggleGroupItemProps extends React.ComponentProps<typeof ToggleGroupPrimitive.Item>, VariantProps<typeof toggleGroupItemVariants> {
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ToggleGroup
|
|
13
|
+
* 토글 그룹 컴포넌트
|
|
14
|
+
*/
|
|
15
|
+
export declare function ToggleGroup({ children, className, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root>): React.ReactElement;
|
|
16
|
+
/**
|
|
17
|
+
* ToggleGroupItem
|
|
18
|
+
* 토글 그룹 안에서 사용하는 카테고리형 아이템 컴포넌트.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ToggleGroupItem({ icon, shape, children, className, ...props }: ToggleGroupItemProps): React.ReactElement;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ToggleGroup } from './ToggleGroup';
|
|
3
|
+
declare const meta: Meta<typeof ToggleGroup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ToggleGroup>;
|
|
6
|
+
export declare const SquareSingle: Story;
|
|
7
|
+
export declare const RoundedSingle: Story;
|
|
8
|
+
export declare const RoundedMultiple: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ToggleGroup';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.ReactElement;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.ReactElement;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Tooltip } from './Tooltip';
|
|
3
|
+
declare const meta: Meta<typeof Tooltip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Tooltip>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CustomSide: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tooltip';
|
|
@@ -1,26 +1,49 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
1
2
|
export * from './AchievementBadge';
|
|
3
|
+
export * from './AppHeader';
|
|
4
|
+
export * from './AvatarImagePicker';
|
|
2
5
|
export * from './Banner';
|
|
6
|
+
export * from './BannerCarousel';
|
|
3
7
|
export * from './BottomNav';
|
|
8
|
+
export * from './BottomSheet';
|
|
4
9
|
export * from './Button';
|
|
10
|
+
export * from './Calendar';
|
|
5
11
|
export * from './Card';
|
|
12
|
+
export * from './CheckContainer';
|
|
13
|
+
export * from './CheckList';
|
|
6
14
|
export * from './Checkbox';
|
|
7
15
|
export * from './CircleAvatar';
|
|
8
16
|
export * from './CircularProgress';
|
|
9
17
|
export * from './CommentRow';
|
|
18
|
+
export * from './CommentThread';
|
|
19
|
+
export * from './DatePicker';
|
|
20
|
+
export * from './Dialog';
|
|
10
21
|
export * from './Dropdown';
|
|
22
|
+
export * from './GoalAddList';
|
|
11
23
|
export * from './Heatmap';
|
|
12
24
|
export { Icon } from './Icons/Icon';
|
|
13
25
|
export type { IconName, IconProps } from './Icons/Icon';
|
|
26
|
+
export * from './ImagePicker';
|
|
27
|
+
export * from './ImagePlaceholder';
|
|
28
|
+
export * from './PageWatermark';
|
|
14
29
|
export * from './ProgressBar';
|
|
15
30
|
export * from './Radio';
|
|
31
|
+
export * from './RightSidebar';
|
|
32
|
+
export * from './ScheduleCalendar';
|
|
16
33
|
export * from './SectionHeader';
|
|
34
|
+
export * from './Select';
|
|
35
|
+
export * from './Snackbar';
|
|
17
36
|
export * from './StatCard';
|
|
18
37
|
export * from './StatusBadge';
|
|
38
|
+
export * from './StepIndicator';
|
|
19
39
|
export * from './Streak';
|
|
20
40
|
export * from './Stripe';
|
|
21
41
|
export * from './Tabs';
|
|
22
42
|
export * from './Tag';
|
|
23
43
|
export * from './Text';
|
|
24
44
|
export * from './TextField';
|
|
45
|
+
export * from './Toast';
|
|
25
46
|
export * from './Toggle';
|
|
47
|
+
export * from './ToggleGroup';
|
|
48
|
+
export * from './Tooltip';
|
|
26
49
|
export * from './TopNav';
|