@1d1s/design-system 0.2.2 → 0.2.4
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/CheckList/CheckList.d.ts +3 -1
- package/dist/components/CheckList/CheckList.stories.d.ts +1 -0
- package/dist/components/DiaryCard/DiaryCard.d.ts +5 -2
- package/dist/components/DiaryCard/DiaryCard.stories.d.ts +1 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +13 -1
- package/dist/components/ImagePicker/ImagePicker.stories.d.ts +1 -0
- package/dist/components/RightSidebar/RightSidebar.d.ts +6 -1
- package/dist/components/RightSidebar/RightSidebar.stories.d.ts +1 -0
- package/dist/index.es.js +2912 -2802
- package/dist/index.umd.js +13 -13
- package/package.json +7 -1
|
@@ -13,6 +13,8 @@ export interface CheckListProps {
|
|
|
13
13
|
onValueChange: (value: string[]) => void;
|
|
14
14
|
/** 추가 클래스 */
|
|
15
15
|
className?: string;
|
|
16
|
+
/** 읽기 전용 여부 (시각 변화 없이 토글만 비활성화) */
|
|
17
|
+
readOnly?: boolean;
|
|
16
18
|
/** 전체 비활성화 여부 */
|
|
17
19
|
disabled?: boolean;
|
|
18
20
|
}
|
|
@@ -32,4 +34,4 @@ export interface CheckListProps {
|
|
|
32
34
|
* />
|
|
33
35
|
* ```
|
|
34
36
|
*/
|
|
35
|
-
export declare function CheckList({ options, value, onValueChange, className, disabled, }: CheckListProps): React.ReactElement;
|
|
37
|
+
export declare function CheckList({ options, value, onValueChange, className, readOnly, disabled, }: CheckListProps): React.ReactElement;
|
|
@@ -4,14 +4,17 @@ export interface DiaryCardProps {
|
|
|
4
4
|
imageUrl?: string;
|
|
5
5
|
percent: number;
|
|
6
6
|
likes: number;
|
|
7
|
+
isLiked?: boolean;
|
|
8
|
+
defaultLiked?: boolean;
|
|
9
|
+
onLikeToggle?(nextLiked: boolean): void;
|
|
7
10
|
title: string;
|
|
8
11
|
user: string;
|
|
9
12
|
userImage?: string;
|
|
10
13
|
challengeLabel: string;
|
|
11
|
-
|
|
14
|
+
onChallengeClick?(): void;
|
|
12
15
|
date: string;
|
|
13
16
|
emotion: Emotion;
|
|
14
17
|
onClick?(): void;
|
|
15
18
|
}
|
|
16
|
-
export declare function DiaryCard({ imageUrl, percent, likes, title, user, userImage, challengeLabel,
|
|
19
|
+
export declare function DiaryCard({ imageUrl, percent, likes, isLiked: isLikedProp, defaultLiked, onLikeToggle, title, user, userImage, challengeLabel, onChallengeClick, date, emotion, onClick, }: DiaryCardProps): React.ReactElement;
|
|
17
20
|
export {};
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ImagePickerProps extends Omit<React.ComponentPropsWithoutRef<"input">, "size"> {
|
|
3
|
+
/** 원형 이미지 영역 지름(px) */
|
|
4
|
+
size?: number;
|
|
5
|
+
/** 초기 이미지 URL */
|
|
6
|
+
defaultImageUrl?: string;
|
|
7
|
+
/** 하단 변경 버튼 텍스트 */
|
|
8
|
+
changeLabel?: string;
|
|
9
|
+
}
|
|
1
10
|
/**
|
|
2
11
|
* ImagePicker
|
|
3
12
|
* 이미지 업로드 및 미리보기를 위한 컴포넌트
|
|
4
13
|
*
|
|
5
14
|
* @param onChange 파일 선택 시 호출되는 콜백 함수(optional)
|
|
15
|
+
* @param size 원형 이미지 영역 지름(px), 기본값 300
|
|
16
|
+
* @param defaultImageUrl 초기 이미지 URL
|
|
17
|
+
* @param changeLabel 하단 변경 버튼 텍스트(기본값: Change)
|
|
6
18
|
*
|
|
7
19
|
* @example 기본 사용
|
|
8
20
|
* ```tsx
|
|
9
21
|
* <ImagePicker onChange={(e) => console.log(e.target.files)} />
|
|
10
22
|
* ```
|
|
11
23
|
*/
|
|
12
|
-
export declare function ImagePicker({ onChange, ...props }:
|
|
24
|
+
export declare function ImagePicker({ onChange, size, defaultImageUrl, changeLabel, ...props }: ImagePickerProps): React.ReactElement;
|
|
@@ -22,11 +22,16 @@ export interface RightSidebarProps {
|
|
|
22
22
|
settingButtonLabel?: string;
|
|
23
23
|
challengeTitle?: string;
|
|
24
24
|
challenges?: RightSidebarChallenge[];
|
|
25
|
+
emptyChallengeMessage?: string;
|
|
26
|
+
joinChallengeButtonLabel?: string;
|
|
27
|
+
createChallengeButtonLabel?: string;
|
|
25
28
|
onCollapseClick?(): void;
|
|
26
29
|
onOpenSettings?(): void;
|
|
27
30
|
onWriteDiary?(): void;
|
|
28
31
|
onGoMyPage?(): void;
|
|
29
32
|
onLogin?(): void;
|
|
33
|
+
onJoinChallenge?(): void;
|
|
34
|
+
onCreateChallenge?(): void;
|
|
30
35
|
}
|
|
31
|
-
export declare function RightSidebar({ isLoggedIn, userName, userHandle, userImage, streakDays, fixed, className, diaryButtonLabel, myPageButtonLabel, loginButtonLabel, loginPromptMessage, settingButtonLabel, challengeTitle, challenges, onCollapseClick, onOpenSettings, onWriteDiary, onGoMyPage, onLogin, }: RightSidebarProps): React.ReactElement;
|
|
36
|
+
export declare function RightSidebar({ isLoggedIn, userName, userHandle, userImage, streakDays, fixed, className, diaryButtonLabel, myPageButtonLabel, loginButtonLabel, loginPromptMessage, settingButtonLabel, challengeTitle, challenges, emptyChallengeMessage, joinChallengeButtonLabel, createChallengeButtonLabel, onCollapseClick, onOpenSettings, onWriteDiary, onGoMyPage, onLogin, onJoinChallenge, onCreateChallenge, }: RightSidebarProps): React.ReactElement;
|
|
32
37
|
export {};
|