@1d1s/design-system 0.2.1 → 0.2.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/dist/components/BannerCarousel/BannerCarousel.d.ts +41 -0
- package/dist/components/BannerCarousel/BannerCarousel.stories.d.ts +9 -0
- package/dist/components/BannerCarousel/index.d.ts +1 -0
- package/dist/components/GoalAddList/GoalAddList.d.ts +15 -0
- package/dist/components/GoalAddList/GoalAddList.stories.d.ts +7 -0
- package/dist/components/GoalAddList/index.d.ts +1 -0
- package/dist/components/Icons/Bell.d.ts +2 -0
- package/dist/components/Icons/BookOpen.d.ts +2 -0
- package/dist/components/Icons/Code2.d.ts +2 -0
- package/dist/components/Icons/Icon.d.ts +9 -0
- package/dist/components/Icons/LogIn.d.ts +2 -0
- package/dist/components/Icons/Palette.d.ts +2 -0
- package/dist/components/Icons/PencilLine.d.ts +2 -0
- package/dist/components/Icons/Plane.d.ts +2 -0
- package/dist/components/Icons/ProgressRing.d.ts +10 -0
- package/dist/components/Icons/Salad.d.ts +2 -0
- package/dist/components/Icons/Settings.d.ts +2 -0
- package/dist/components/Icons/index.d.ts +10 -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 +7 -3
- package/dist/components/RightSidebar/RightSidebar.stories.d.ts +1 -0
- package/dist/components/Tag/Tag.d.ts +3 -2
- package/dist/components/index.d.ts +2 -1
- package/dist/index.es.js +3865 -3582
- package/dist/index.umd.js +10 -10
- package/package.json +1 -1
- package/dist/components/ProfileCard/ProfileCard.d.ts +0 -6
- package/dist/components/ProfileCard/ProfileCard.stories.d.ts +0 -7
- package/dist/components/ProfileCard/index.d.ts +0 -1
- package/dist/components/Ui/Button.d.ts +0 -11
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface BannerCarouselItem {
|
|
3
|
+
id?: string | number;
|
|
4
|
+
type: string;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
backgroundImageUrl?: string;
|
|
8
|
+
/** @deprecated `backgroundImageUrl`을 사용하세요. */
|
|
9
|
+
backgroundImage?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BannerTrackingPayload {
|
|
12
|
+
event: "impression" | "click" | "change";
|
|
13
|
+
componentId?: string;
|
|
14
|
+
bannerId: string;
|
|
15
|
+
bannerIndex: number;
|
|
16
|
+
bannerType: string;
|
|
17
|
+
bannerTitle: string;
|
|
18
|
+
bannerSubtitle: string;
|
|
19
|
+
timestamp: number;
|
|
20
|
+
}
|
|
21
|
+
export interface BannerCarouselProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
items: BannerCarouselItem[];
|
|
23
|
+
autoSlideIntervalMs?: number;
|
|
24
|
+
initialIndex?: number;
|
|
25
|
+
enableLoop?: boolean;
|
|
26
|
+
showIndicators?: boolean;
|
|
27
|
+
aspectRatioClassName?: string;
|
|
28
|
+
componentId?: string;
|
|
29
|
+
enableDataLayerTracking?: boolean;
|
|
30
|
+
impressionMode?: "once" | "always";
|
|
31
|
+
onBannerClick?(payload: BannerTrackingPayload): void;
|
|
32
|
+
onBannerImpression?(payload: BannerTrackingPayload): void;
|
|
33
|
+
onBannerChange?(payload: BannerTrackingPayload): void;
|
|
34
|
+
onItemClick?(item: BannerCarouselItem, index: number): void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* BannerCarousel
|
|
38
|
+
* 메인 배너 슬라이더 컴포넌트. 자동 슬라이드, 무한 루프, 인디케이터를 지원하며
|
|
39
|
+
* 클릭/노출 추적 콜백 및 dataLayer 이벤트 전송 포인트를 제공합니다.
|
|
40
|
+
*/
|
|
41
|
+
export declare function BannerCarousel({ items, autoSlideIntervalMs, initialIndex, enableLoop, showIndicators, aspectRatioClassName, componentId, enableDataLayerTracking, impressionMode, onBannerClick, onBannerImpression, onBannerChange, onItemClick, className, ...props }: BannerCarouselProps): React.ReactElement | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BannerCarousel } from './BannerCarousel';
|
|
3
|
+
declare const meta: Meta<typeof BannerCarousel>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BannerCarousel>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const ImageBackground: Story;
|
|
8
|
+
export declare const NoAutoSlide: Story;
|
|
9
|
+
export declare const NoIndicators: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BannerCarousel';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface GoalAddListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
3
|
+
goals?: string[];
|
|
4
|
+
defaultGoals?: string[];
|
|
5
|
+
onGoalsChange?(goals: string[]): void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
addOnBlur?: boolean;
|
|
9
|
+
inputAriaLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GoalAddList
|
|
13
|
+
* 목표 문자열 목록을 보여주고 하단 입력창에서 Enter로 새 목표를 추가하는 컴포넌트.
|
|
14
|
+
*/
|
|
15
|
+
export declare function GoalAddList({ goals, defaultGoals, onGoalsChange, placeholder, disabled, addOnBlur, inputAriaLabel, className, ...props }: GoalAddListProps): React.ReactElement;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { GoalAddList } from './GoalAddList';
|
|
3
|
+
declare const meta: Meta<typeof GoalAddList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof GoalAddList>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Controlled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GoalAddList';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
declare const iconComponents: {
|
|
3
3
|
readonly AddCircle: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
readonly Bell: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
readonly BookOpen: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
readonly Calendar: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
readonly Check: ({ strokeWidth, ...props }: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
readonly Code2: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
6
9
|
readonly Chevron: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
7
10
|
readonly ChevronDown: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
readonly ChevronLeft: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,13 +22,19 @@ declare const iconComponents: {
|
|
|
19
22
|
readonly Heart: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
20
23
|
readonly HeartFilled: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
21
24
|
readonly Laptop: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
readonly LogIn: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
22
26
|
readonly Logo: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
23
27
|
readonly Minus: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
readonly Palette: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
24
29
|
readonly People: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
readonly PencilLine: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
25
31
|
readonly Person: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
26
32
|
readonly Pin: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
readonly Plane: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
27
34
|
readonly Plus: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
readonly Salad: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
28
36
|
readonly Search: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
readonly Settings: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
29
38
|
readonly Target: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
30
39
|
readonly Trophy: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
31
40
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ProgressRingProps {
|
|
3
|
+
baseSize: number;
|
|
4
|
+
radius: number;
|
|
5
|
+
strokeWidth: number;
|
|
6
|
+
circumference: number;
|
|
7
|
+
dashOffset: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ProgressRing({ baseSize, radius, strokeWidth, circumference, dashOffset, className, }: ProgressRingProps): React.ReactElement;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
export * from './AddCircle';
|
|
2
|
+
export * from './Bell';
|
|
3
|
+
export * from './BookOpen';
|
|
2
4
|
export * from './Calendar';
|
|
3
5
|
export * from './Dumbbell';
|
|
4
6
|
export * from './Flag';
|
|
5
7
|
export * from './Flame';
|
|
8
|
+
export * from './Code2';
|
|
6
9
|
export * from './Icon';
|
|
7
10
|
export * from './Laptop';
|
|
11
|
+
export * from './LogIn';
|
|
12
|
+
export * from './Palette';
|
|
13
|
+
export * from './PencilLine';
|
|
14
|
+
export * from './Plane';
|
|
15
|
+
export * from './ProgressRing';
|
|
16
|
+
export * from './Salad';
|
|
17
|
+
export * from './Settings';
|
|
8
18
|
export * from './Target';
|
|
9
19
|
export * from './Trophy';
|
|
10
20
|
export * from './Check';
|
|
@@ -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;
|
|
@@ -8,14 +8,17 @@ export interface RightSidebarChallenge {
|
|
|
8
8
|
tone?: RightSidebarProgressTone;
|
|
9
9
|
}
|
|
10
10
|
export interface RightSidebarProps {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
isLoggedIn?: boolean;
|
|
12
|
+
userName?: string;
|
|
13
|
+
userHandle?: string;
|
|
13
14
|
userImage?: string;
|
|
14
15
|
streakDays: number;
|
|
15
16
|
fixed?: boolean;
|
|
16
17
|
className?: string;
|
|
17
18
|
diaryButtonLabel?: string;
|
|
18
19
|
myPageButtonLabel?: string;
|
|
20
|
+
loginButtonLabel?: string;
|
|
21
|
+
loginPromptMessage?: string;
|
|
19
22
|
settingButtonLabel?: string;
|
|
20
23
|
challengeTitle?: string;
|
|
21
24
|
challenges?: RightSidebarChallenge[];
|
|
@@ -23,6 +26,7 @@ export interface RightSidebarProps {
|
|
|
23
26
|
onOpenSettings?(): void;
|
|
24
27
|
onWriteDiary?(): void;
|
|
25
28
|
onGoMyPage?(): void;
|
|
29
|
+
onLogin?(): void;
|
|
26
30
|
}
|
|
27
|
-
export declare function RightSidebar({ userName, userHandle, userImage, streakDays, fixed, className, diaryButtonLabel, myPageButtonLabel, settingButtonLabel, challengeTitle, challenges, onCollapseClick, onOpenSettings, onWriteDiary, onGoMyPage, }: RightSidebarProps): React.ReactElement;
|
|
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;
|
|
28
32
|
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { textVariants } from '../Text';
|
|
2
3
|
declare const tagVariants: (props?: ({
|
|
3
4
|
hasIcon?: boolean | null | undefined;
|
|
4
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
6
|
type TagProps = {
|
|
6
|
-
icon?:
|
|
7
|
+
icon?: React.ReactNode;
|
|
7
8
|
children: React.ReactNode;
|
|
8
9
|
className?: string;
|
|
9
|
-
size?:
|
|
10
|
+
size?: VariantProps<typeof textVariants>['size'];
|
|
10
11
|
weight?: 'bold' | 'medium' | 'regular' | 'light';
|
|
11
12
|
} & VariantProps<typeof tagVariants>;
|
|
12
13
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './Accordion';
|
|
2
2
|
export * from './AppHeader';
|
|
3
|
+
export * from './BannerCarousel';
|
|
3
4
|
export * from './Button';
|
|
4
5
|
export * from './Calendar';
|
|
5
6
|
export * from './ChallengeCard';
|
|
@@ -12,6 +13,7 @@ export * from './DatePicker';
|
|
|
12
13
|
export * from './Dialog';
|
|
13
14
|
export * from './DiaryCard';
|
|
14
15
|
export * from './Dropdown';
|
|
16
|
+
export * from './GoalAddList';
|
|
15
17
|
export { Icon } from './Icons/Icon';
|
|
16
18
|
export type { IconName, IconProps } from './Icons/Icon';
|
|
17
19
|
export * from './ImagePlaceholder';
|
|
@@ -21,7 +23,6 @@ export * from './Text';
|
|
|
21
23
|
export * from './PageWatermark';
|
|
22
24
|
export * from './Pagination';
|
|
23
25
|
export * from './ProgressBar';
|
|
24
|
-
export * from './ProfileCard';
|
|
25
26
|
export * from './RightSidebar';
|
|
26
27
|
export * from './ScheduleCalendar';
|
|
27
28
|
export * from './StatContainer';
|