@1d1s/design-system 0.2.33 → 0.2.34
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/AchievementBadge/AchievementBadge.d.ts +29 -0
- package/dist/components/AchievementBadge/AchievementBadge.stories.d.ts +9 -0
- package/dist/components/AchievementBadge/index.d.ts +1 -0
- package/dist/components/Banner/Banner.d.ts +36 -0
- package/dist/components/Banner/Banner.stories.d.ts +9 -0
- package/dist/components/Banner/index.d.ts +1 -0
- package/dist/components/BottomNav/BottomNav.d.ts +34 -0
- package/dist/components/BottomNav/BottomNav.stories.d.ts +7 -0
- package/dist/components/BottomNav/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +23 -11
- package/dist/components/Button/Button.stories.d.ts +7 -7
- package/dist/components/Card/Card.d.ts +51 -0
- package/dist/components/Card/Card.stories.d.ts +8 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +9 -4
- package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -1
- package/dist/components/CircleAvatar/CircleAvatar.d.ts +30 -2
- package/dist/components/CircleAvatar/CircleAvatar.stories.d.ts +5 -0
- package/dist/components/CircularProgress/CircularProgress.d.ts +23 -16
- package/dist/components/CircularProgress/CircularProgress.stories.d.ts +5 -2
- package/dist/components/CommentRow/CommentRow.d.ts +30 -0
- package/dist/components/CommentRow/CommentRow.stories.d.ts +8 -0
- package/dist/components/CommentRow/index.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +24 -45
- package/dist/components/Dropdown/Dropdown.stories.d.ts +8 -4
- package/dist/components/Dropdown/DropdownMenu.d.ts +29 -0
- package/dist/components/Dropdown/MultiSelect.d.ts +26 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Heatmap/Heatmap.d.ts +35 -0
- package/dist/components/Heatmap/Heatmap.stories.d.ts +8 -0
- package/dist/components/Heatmap/index.d.ts +1 -0
- package/dist/components/Icons/Home.d.ts +2 -0
- package/dist/components/Icons/LayoutGrid.d.ts +2 -0
- package/dist/components/Icons/index.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +20 -3
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +46 -0
- package/dist/components/Radio/Radio.stories.d.ts +9 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/SectionHeader/SectionHeader.d.ts +31 -0
- package/dist/components/SectionHeader/SectionHeader.stories.d.ts +9 -0
- package/dist/components/SectionHeader/index.d.ts +1 -0
- package/dist/components/StatCard/StatCard.d.ts +29 -0
- package/dist/components/StatCard/StatCard.stories.d.ts +9 -0
- package/dist/components/StatCard/index.d.ts +1 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +28 -0
- package/dist/components/StatusBadge/StatusBadge.stories.d.ts +8 -0
- package/dist/components/StatusBadge/index.d.ts +1 -0
- package/dist/components/Streak/StreakChip.d.ts +20 -0
- package/dist/components/Streak/StreakChip.stories.d.ts +8 -0
- package/dist/components/Streak/StreakHero.d.ts +23 -0
- package/dist/components/Streak/StreakHero.stories.d.ts +8 -0
- package/dist/components/Streak/index.d.ts +2 -1
- package/dist/components/Stripe/Stripe.d.ts +29 -0
- package/dist/components/Stripe/Stripe.stories.d.ts +9 -0
- package/dist/components/Stripe/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +37 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +9 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tag/ChallengeTag.d.ts +19 -0
- package/dist/components/Tag/ChallengeTag.stories.d.ts +8 -0
- package/dist/components/Tag/FilterChip.d.ts +25 -0
- package/dist/components/Tag/Tag.d.ts +16 -14
- package/dist/components/Tag/Tag.stories.d.ts +6 -1
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Text/Text.d.ts +2 -2
- package/dist/components/TextField/TextArea.d.ts +23 -0
- package/dist/components/TextField/TextArea.stories.d.ts +10 -0
- package/dist/components/TextField/TextField.d.ts +30 -13
- package/dist/components/TextField/TextField.stories.d.ts +7 -4
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/Toggle/Toggle.d.ts +14 -13
- package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
- package/dist/components/TopNav/TopNav.d.ts +55 -0
- package/dist/components/TopNav/TopNav.stories.d.ts +8 -0
- package/dist/components/TopNav/index.d.ts +1 -0
- package/dist/components/index.d.ts +14 -25
- package/dist/index.es.js +3053 -11804
- package/dist/index.umd.js +1 -45
- package/package.json +2 -25
- package/src/styles/animation.css +109 -35
- package/src/styles/colors.css +25 -2
- package/src/styles/globals.css +1 -3
- package/src/styles/shadow.css +11 -1
- package/src/styles/shape.css +4 -0
- package/src/styles/typography.css +31 -11
- package/dist/components/Accordion/Accordion.d.ts +0 -47
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -8
- package/dist/components/Accordion/index.d.ts +0 -1
- package/dist/components/AppHeader/AppHeader.d.ts +0 -26
- package/dist/components/AppHeader/AppHeader.stories.d.ts +0 -9
- package/dist/components/AppHeader/index.d.ts +0 -1
- package/dist/components/AvatarImagePicker/AvatarImagePicker.d.ts +0 -24
- package/dist/components/AvatarImagePicker/AvatarImagePicker.stories.d.ts +0 -7
- package/dist/components/AvatarImagePicker/index.d.ts +0 -1
- package/dist/components/BannerCarousel/BannerCarousel.d.ts +0 -42
- package/dist/components/BannerCarousel/BannerCarousel.stories.d.ts +0 -10
- package/dist/components/BannerCarousel/index.d.ts +0 -1
- package/dist/components/Calendar/Calendar.d.ts +0 -4
- package/dist/components/Calendar/Calendar.stories.d.ts +0 -15
- package/dist/components/Calendar/index.d.ts +0 -1
- package/dist/components/CheckContainer/CheckContainer.d.ts +0 -17
- package/dist/components/CheckContainer/CheckContainer.stories.d.ts +0 -9
- package/dist/components/CheckContainer/index.d.ts +0 -1
- package/dist/components/CheckList/CheckList.d.ts +0 -37
- package/dist/components/CheckList/CheckList.stories.d.ts +0 -9
- package/dist/components/CheckList/index.d.ts +0 -1
- package/dist/components/CommentThread/CommentThread.d.ts +0 -31
- package/dist/components/CommentThread/CommentThread.stories.d.ts +0 -9
- package/dist/components/CommentThread/index.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts +0 -26
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -7
- package/dist/components/DatePicker/index.d.ts +0 -1
- package/dist/components/Dialog/Dialog.d.ts +0 -13
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -9
- package/dist/components/Dialog/index.d.ts +0 -1
- package/dist/components/GoalAddList/GoalAddList.d.ts +0 -16
- package/dist/components/GoalAddList/GoalAddList.stories.d.ts +0 -7
- package/dist/components/GoalAddList/index.d.ts +0 -1
- package/dist/components/ImagePicker/ImagePicker.d.ts +0 -50
- package/dist/components/ImagePicker/ImagePicker.stories.d.ts +0 -8
- package/dist/components/ImagePicker/index.d.ts +0 -1
- package/dist/components/ImagePlaceholder/ImagePlaceholder.d.ts +0 -11
- package/dist/components/ImagePlaceholder/index.d.ts +0 -1
- package/dist/components/InfoButton/InfoButton.d.ts +0 -20
- package/dist/components/InfoButton/InfoButton.stories.d.ts +0 -9
- package/dist/components/InfoButton/index.d.ts +0 -1
- package/dist/components/Layout/Layout.d.ts +0 -69
- package/dist/components/Layout/Layout.stories.d.ts +0 -7
- package/dist/components/Layout/LayoutContext.d.ts +0 -12
- package/dist/components/Layout/index.d.ts +0 -2
- package/dist/components/PageWatermark/PageWatermark.d.ts +0 -1
- package/dist/components/PageWatermark/PageWatermark.stories.d.ts +0 -6
- package/dist/components/PageWatermark/index.d.ts +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -14
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -9
- package/dist/components/Pagination/index.d.ts +0 -1
- package/dist/components/Profile/Profile.d.ts +0 -37
- package/dist/components/Profile/Profile.stories.d.ts +0 -12
- package/dist/components/Profile/index.d.ts +0 -1
- package/dist/components/RightSidebar/RightSidebar.d.ts +0 -41
- package/dist/components/RightSidebar/RightSidebar.stories.d.ts +0 -14
- package/dist/components/RightSidebar/index.d.ts +0 -1
- package/dist/components/ScheduleCalendar/ScheduleCalendar.d.ts +0 -31
- package/dist/components/ScheduleCalendar/ScheduleCalendar.stories.d.ts +0 -10
- package/dist/components/ScheduleCalendar/index.d.ts +0 -1
- package/dist/components/StatContainer/StatContainer.d.ts +0 -15
- package/dist/components/StatContainer/StatContainer.stories.d.ts +0 -7
- package/dist/components/StatContainer/index.d.ts +0 -1
- package/dist/components/StepIndicator/StepIndicator.d.ts +0 -19
- package/dist/components/StepIndicator/StepIndicator.stories.d.ts +0 -10
- package/dist/components/StepIndicator/index.d.ts +0 -1
- package/dist/components/Streak/Streak.d.ts +0 -31
- package/dist/components/Streak/Streak.stories.d.ts +0 -12
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -21
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -8
- package/dist/components/ToggleGroup/index.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -7
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -7
- package/dist/components/Tooltip/index.d.ts +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type HeatmapTone = "main" | "mint" | "blue" | "green" | "gray";
|
|
3
|
+
export interface HeatmapProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
4
|
+
/** 셀 값 배열 (각 0~4 레벨). 길이는 rows×cols 권장 */
|
|
5
|
+
cells?: number[];
|
|
6
|
+
/** 컬럼 수 (default 20) */
|
|
7
|
+
cols?: number;
|
|
8
|
+
/** 행 수 (default 7) */
|
|
9
|
+
rows?: number;
|
|
10
|
+
/** 컬러 톤 프리셋 */
|
|
11
|
+
tone?: HeatmapTone;
|
|
12
|
+
/** 5-step 컬러 직접 지정 (tone 무시). [level0, level1, level2, level3, level4] */
|
|
13
|
+
palette?: [string, string, string, string, string];
|
|
14
|
+
/** 셀 사이 간격 px */
|
|
15
|
+
gap?: number;
|
|
16
|
+
/** 셀 모서리 둥글기 px */
|
|
17
|
+
cellRadius?: number;
|
|
18
|
+
/** 호버 시 툴팁 라벨 생성 함수 (셀 인덱스 → 텍스트). 미지정 시 툴팁 비활성 */
|
|
19
|
+
ariaLabel?: (index: number, level: number) => string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Heatmap
|
|
23
|
+
* GitHub-style 활동 잔디. 7행 × N열 그리드, 각 셀 0~4 레벨.
|
|
24
|
+
*
|
|
25
|
+
* @param tone `main` (default) · `mint` · `blue` · `green` · `gray`
|
|
26
|
+
* @param cells 길이 rows×cols 의 number[] 0~4
|
|
27
|
+
* @param cols 컬럼 수 (default 20)
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Heatmap cols={20} cells={data} tone="main" />
|
|
32
|
+
* <Heatmap cols={12} tone="mint" /> {/* 빈 그리드 *\/}
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function Heatmap({ cells, cols, rows, tone, palette, gap, cellRadius, ariaLabel, className, ...props }: HeatmapProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Heatmap } from './Heatmap';
|
|
3
|
+
declare const meta: Meta<typeof Heatmap>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Heatmap>;
|
|
6
|
+
export declare const Empty: Story;
|
|
7
|
+
export declare const WithData: Story;
|
|
8
|
+
export declare const Tones: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Heatmap';
|
|
@@ -30,6 +30,8 @@ export * from './EyeOff';
|
|
|
30
30
|
export * from './HamburgerMenu';
|
|
31
31
|
export * from './Heart';
|
|
32
32
|
export * from './HeartFilled';
|
|
33
|
+
export * from './Home';
|
|
34
|
+
export * from './LayoutGrid';
|
|
33
35
|
export * from './Logo';
|
|
34
36
|
export * from './Minus';
|
|
35
37
|
export * from './People';
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
export type ProgressBarSize = "xs" | "sm" | "md" | "lg";
|
|
2
3
|
export interface ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
4
|
+
/** 진행률 0~100 */
|
|
3
5
|
value: number;
|
|
4
6
|
label?: React.ReactNode;
|
|
5
7
|
showLabel?: boolean;
|
|
6
8
|
showValueText?: boolean;
|
|
7
9
|
valueText?: React.ReactNode;
|
|
10
|
+
/** 마감 없음 — 100%로 채운 채 ∞ 표시 */
|
|
8
11
|
infinite?: boolean;
|
|
12
|
+
/** 굵기 프리셋 (xs=4 · sm=6 · md=8 · lg=12). `thickness` 우선 적용 */
|
|
13
|
+
size?: ProgressBarSize;
|
|
14
|
+
/** 픽셀 단위 굵기 (size 무시) */
|
|
9
15
|
thickness?: number;
|
|
16
|
+
/** 채움 색 (CSS color) — 미지정 시 brand */
|
|
10
17
|
fillColor?: string;
|
|
18
|
+
/** 트랙 색 (CSS color) — 미지정 시 gray-100 */
|
|
11
19
|
trackColor?: string;
|
|
12
20
|
labelClassName?: string;
|
|
13
21
|
valueClassName?: string;
|
|
@@ -15,7 +23,16 @@ export interface ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
15
23
|
fillClassName?: string;
|
|
16
24
|
}
|
|
17
25
|
/**
|
|
18
|
-
* ProgressBar
|
|
19
|
-
*
|
|
26
|
+
* ProgressBar v3
|
|
27
|
+
* 진행률 바 — 라벨 / 퍼센트 / 굵기 / 색상 제어 가능.
|
|
28
|
+
*
|
|
29
|
+
* @param size `xs` (4px) · `sm` (6px) · `md` (8px, default) · `lg` (12px)
|
|
30
|
+
* @param thickness 픽셀 단위 직접 지정 (size를 덮어씀)
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <ProgressBar value={62} size="md" />
|
|
35
|
+
* <ProgressBar label="아침 30분 러닝" value={45} size="lg" />
|
|
36
|
+
* ```
|
|
20
37
|
*/
|
|
21
|
-
export declare function ProgressBar({ value, label, showLabel, showValueText, valueText, infinite, thickness, fillColor, trackColor, className, labelClassName, valueClassName, trackClassName, fillClassName, ...props }: ProgressBarProps): React.ReactElement;
|
|
38
|
+
export declare function ProgressBar({ value, label, showLabel, showValueText, valueText, infinite, size, thickness, fillColor, trackColor, className, labelClassName, valueClassName, trackClassName, fillClassName, ...props }: ProgressBarProps): React.ReactElement;
|
|
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof ProgressBar>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof ProgressBar>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const Sizes: Story;
|
|
7
8
|
export declare const WithoutLabel: Story;
|
|
8
9
|
export declare const WithoutValueText: Story;
|
|
9
10
|
export declare const CustomThickness: Story;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Radio v3
|
|
7
|
+
* 18×18 원형 라디오 버튼. 체크 시 brand 컬러 외곽선 + 9×9 brand 내부 점.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Radio name="type" value="solo" defaultChecked label="개인 챌린지" />
|
|
12
|
+
* <Radio name="type" value="group" label="단체 챌린지" />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
16
|
+
export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "children"> {
|
|
17
|
+
/** 모든 Radio가 공유하는 name (group 식별자) */
|
|
18
|
+
name: string;
|
|
19
|
+
/** 옵션 리스트 — value/label */
|
|
20
|
+
options: Array<{
|
|
21
|
+
value: string;
|
|
22
|
+
label: React.ReactNode;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
/** 현재 선택값 (controlled) */
|
|
26
|
+
value?: string;
|
|
27
|
+
/** 기본값 (uncontrolled) */
|
|
28
|
+
defaultValue?: string;
|
|
29
|
+
/** 변경 콜백 */
|
|
30
|
+
onChange?: (value: string) => void;
|
|
31
|
+
/** 항목 사이 간격 / 방향 */
|
|
32
|
+
direction?: "vertical" | "horizontal";
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* RadioGroup
|
|
36
|
+
* 단일 선택 라디오 그룹. controlled/uncontrolled 둘 다 지원.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <RadioGroup name="type" defaultValue="solo" options={[
|
|
41
|
+
* { value: 'solo', label: '개인 챌린지' },
|
|
42
|
+
* { value: 'group', label: '단체 챌린지' },
|
|
43
|
+
* ]} />
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function RadioGroup({ name, options, value, defaultValue, onChange, direction, className, ...props }: RadioGroupProps): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Radio } from './Radio';
|
|
3
|
+
declare const meta: Meta<typeof Radio>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Radio>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Disabled: Story;
|
|
8
|
+
export declare const Group: Story;
|
|
9
|
+
export declare const HorizontalGroup: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Radio';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SectionHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
3
|
+
/** 섹션 제목 (h2 비주얼) */
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
/** 부제 — 작은 회색 보조 텍스트 */
|
|
6
|
+
subtitle?: React.ReactNode;
|
|
7
|
+
/** 우측 액션 — "전체보기 →" 버튼이나 임의 노드 */
|
|
8
|
+
action?: React.ReactNode;
|
|
9
|
+
/** `action` 미지정이고 `onActionClick` 전달 시 기본 "전체보기 →" 버튼 자동 렌더링 */
|
|
10
|
+
onActionClick?: () => void;
|
|
11
|
+
/** 기본 액션 라벨 (default `"전체보기 →"`) */
|
|
12
|
+
actionLabel?: React.ReactNode;
|
|
13
|
+
/** 폰트 크기 변형 */
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* SectionHeader
|
|
18
|
+
* 페이지 섹션 헤더 — 제목 + (선택)부제 + 우측 액션 슬롯.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <SectionHeader
|
|
23
|
+
* title="오늘 시작해볼 챌린지"
|
|
24
|
+
* subtitle="추천 4개"
|
|
25
|
+
* onActionClick={() => router.push('/challenges')}
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* <SectionHeader title="진행 중" action={<Button size="sm" variant="ghost">필터</Button>} />
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function SectionHeader({ title, subtitle, action, onActionClick, actionLabel, size, className, ...props }: SectionHeaderProps): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { SectionHeader } from './SectionHeader';
|
|
3
|
+
declare const meta: Meta<typeof SectionHeader>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SectionHeader>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const NoAction: Story;
|
|
8
|
+
export declare const NoSubtitle: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SectionHeader';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const statCardVariants: (props?: ({
|
|
4
|
+
tone?: "mint" | "blue" | "gray" | "brand" | "white" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface StatCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof statCardVariants> {
|
|
8
|
+
/** 캡션 라벨 */
|
|
9
|
+
label: React.ReactNode;
|
|
10
|
+
/** 큰 값 */
|
|
11
|
+
value: React.ReactNode;
|
|
12
|
+
/** 보조 텍스트 (값 아래 소형 메타) */
|
|
13
|
+
helper?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* StatCard
|
|
17
|
+
* 라벨 + 큰 숫자 통계 카드. 마이페이지/대시보드용.
|
|
18
|
+
*
|
|
19
|
+
* @param tone `white` (default) · `brand` · `mint` · `blue` · `gray`
|
|
20
|
+
* @param size `sm` · `md` (default) · `lg`
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <StatCard label="현재 스트릭" value="🔥 27" tone="brand" />
|
|
25
|
+
* <StatCard label="작성한 일지" value="48" helper="이번 달 +12" />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function StatCard({ label, value, helper, tone, size, className, ...props }: StatCardProps): React.ReactElement;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { StatCard } from './StatCard';
|
|
3
|
+
declare const meta: Meta<typeof StatCard>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof StatCard>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Grid: Story;
|
|
8
|
+
export declare const WithHelper: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StatCard';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type StatusBadgeKind = "NEW" | "HOT" | "TIP";
|
|
3
|
+
export type StatusBadgeTone = "brand" | "blue" | "mint" | "red" | "green" | "gray";
|
|
4
|
+
export interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
5
|
+
/** 프리셋 — 라벨 텍스트와 tone을 자동 설정 */
|
|
6
|
+
kind?: StatusBadgeKind;
|
|
7
|
+
/** wrap 색상 (kind 없을 때 기본 brand) */
|
|
8
|
+
tone?: StatusBadgeTone;
|
|
9
|
+
/** 라벨 텍스트 (kind 미지정 시 필수) */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* `standalone` — wrap + inner pill 2-layer (default)
|
|
13
|
+
* `inline` — 1-layer pill (이미 컬러 배경이 있는 컨테이너 안에 둘 때)
|
|
14
|
+
*/
|
|
15
|
+
variant?: "standalone" | "inline";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* StatusBadge
|
|
19
|
+
* NEW / HOT / TIP 상태 라벨. 배너 위 또는 단독으로 사용.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <StatusBadge kind="NEW" />
|
|
24
|
+
* <StatusBadge tone="green">UPCOMING</StatusBadge>
|
|
25
|
+
* <StatusBadge variant="inline" kind="NEW" /> {/* 컬러 배너 위에 사용 *\/}
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function StatusBadge({ kind, tone, children, variant, className, ...props }: StatusBadgeProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { StatusBadge } from './StatusBadge';
|
|
3
|
+
declare const meta: Meta<typeof StatusBadge>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof StatusBadge>;
|
|
6
|
+
export declare const Kinds: Story;
|
|
7
|
+
export declare const CustomLabel: Story;
|
|
8
|
+
export declare const InlineOnBanner: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StatusBadge';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StreakChipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
3
|
+
/** 연속 일수 */
|
|
4
|
+
days: number;
|
|
5
|
+
/** 좌측 아이콘 (기본 🔥 이모지) */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** 일수 우측 단위 (예: "일") — 미지정 시 표시 안함 */
|
|
8
|
+
unit?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* StreakChip
|
|
12
|
+
* 헤더/네비 등에 들어가는 알약형 스트릭 표시.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <StreakChip days={27} />
|
|
17
|
+
* <StreakChip days={27} unit="일" />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function StreakChip({ days, icon, unit, className, ...props }: StreakChipProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { StreakChip } from './StreakChip';
|
|
3
|
+
declare const meta: Meta<typeof StreakChip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof StreakChip>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithUnit: Story;
|
|
8
|
+
export declare const Variants: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StreakHeroProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
3
|
+
/** 현재 연속 일수 */
|
|
4
|
+
days: number;
|
|
5
|
+
/** 헤더 라벨 (default `"현재 스트릭"`) */
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
/** 일수 단위 (default `"일째"`) */
|
|
8
|
+
unit?: React.ReactNode;
|
|
9
|
+
/** 우상단 아이콘 (default 🔥 — flame-flicker 애니메이션 자동 적용) */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** 하단 메타 라인 (예: "최장 45일 · 이번주 5/7") */
|
|
12
|
+
meta?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* StreakHero
|
|
16
|
+
* 따뜻한 그라디언트 카드에 큰 스트릭 숫자를 표시.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <StreakHero days={27} meta="최장 45일 · 이번주 5/7" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function StreakHero({ days, label, unit, icon, meta, className, ...props }: StreakHeroProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { StreakHero } from './StreakHero';
|
|
3
|
+
declare const meta: Meta<typeof StreakHero>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof StreakHero>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Bare: Story;
|
|
8
|
+
export declare const Custom: Story;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './StreakChip';
|
|
2
|
+
export * from './StreakHero';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type StripeTone = "peach" | "cream" | "mint" | "blue" | "sky" | "rose" | "gray";
|
|
3
|
+
export declare function resolveStripeTone(tone: StripeTone | string | undefined): string;
|
|
4
|
+
export declare function stripeBackground(color: string): string;
|
|
5
|
+
export interface StripeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
6
|
+
/** 줄무늬 컬러 — 프리셋 또는 CSS color (default `cream` = main-200) */
|
|
7
|
+
tone?: StripeTone | string;
|
|
8
|
+
/** 가운데 라벨 — 작은 흰색 알약형 박스에 표시. 비우면 패턴만 */
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
/** 둥근 모서리 px (default `0` — 카드 내부 사용 가정) */
|
|
11
|
+
radius?: number | string;
|
|
12
|
+
/** 높이 (default `100%` — 부모를 채움) */
|
|
13
|
+
height?: number | string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Stripe (Placeholder)
|
|
17
|
+
* 이미지 자리 표시자 — 사선 줄무늬 패턴. 카드 썸네일 / 아바타 fallback / 배너 등.
|
|
18
|
+
*
|
|
19
|
+
* @param tone `peach`·`cream`(default)·`mint`·`blue`·`sky`·`rose`·`gray` 또는 임의 CSS color
|
|
20
|
+
* @param label 가운데 작은 흰색 알약 박스에 표시
|
|
21
|
+
* @param radius 둥근 모서리 px (default 0)
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <div style={{ height: 110 }}><Stripe tone="peach" label="run" /></div>
|
|
26
|
+
* <Stripe tone="#c8f4e1" />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function Stripe({ tone, label, radius, height, className, style, ...props }: StripeProps): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Stripe } from './Stripe';
|
|
3
|
+
declare const meta: Meta<typeof Stripe>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Stripe>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Tones: Story;
|
|
8
|
+
export declare const NoLabel: Story;
|
|
9
|
+
export declare const CustomColor: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Stripe';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
/** 우측 카운트 등 — 라벨 옆에 작게 표시 */
|
|
6
|
+
badge?: React.ReactNode;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> {
|
|
10
|
+
items: TabItem[];
|
|
11
|
+
/** 활성 항목 id (controlled) */
|
|
12
|
+
activeId?: string;
|
|
13
|
+
/** 활성 변경 콜백 */
|
|
14
|
+
onChange?: (id: string) => void;
|
|
15
|
+
/** 항목들이 화면 가득 차도록 균등 분할 */
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
/** 사이즈 — 폰트/패딩 */
|
|
18
|
+
size?: "sm" | "md" | "lg";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Tabs
|
|
22
|
+
* 하단 보더 + 활성 표시. 각 탭은 button 요소.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Tabs
|
|
27
|
+
* activeId={tab}
|
|
28
|
+
* onChange={setTab}
|
|
29
|
+
* items={[
|
|
30
|
+
* { id: 'challenge', label: '챌린지' },
|
|
31
|
+
* { id: 'diary', label: '일지' },
|
|
32
|
+
* { id: 'cheer', label: '응원' },
|
|
33
|
+
* ]}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function Tabs({ items, activeId, onChange, fullWidth, size, className, ...props }: TabsProps): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Tabs } from './Tabs';
|
|
3
|
+
declare const meta: Meta<typeof Tabs>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Tabs>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const FullWidth: Story;
|
|
8
|
+
export declare const WithBadges: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tabs';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ChallengeTagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
3
|
+
/** 챌린지 제목 */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** 좌측 아이콘 변경 (default Flag 아이콘) */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
size?: "sm" | "md";
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* ChallengeTag
|
|
11
|
+
* 일지 / 상세 화면에서 챌린지 출처를 표시하는 알약형 태그.
|
|
12
|
+
* Flag 아이콘 + brand-soft 컬러 (main-100 bg + main-200 border + brand text).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <ChallengeTag>아침 30분 러닝하기</ChallengeTag>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function ChallengeTag({ children, icon, size, className, ...props }: ChallengeTagProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ChallengeTag } from './ChallengeTag';
|
|
3
|
+
declare const meta: Meta<typeof ChallengeTag>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ChallengeTag>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Multiple: Story;
|
|
8
|
+
export declare const Sizes: Story;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
declare const filterChipVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
active?: boolean | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface FilterChipProps extends Omit<React.ComponentProps<"button">, "size">, VariantProps<typeof filterChipVariants> {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* FilterChip
|
|
11
|
+
* 카테고리 필터 / 토글 칩 — 클릭 가능한 button 요소.
|
|
12
|
+
*
|
|
13
|
+
* @param active 선택 상태 (default `false`)
|
|
14
|
+
* @param size `sm` · `md` (default) · `lg`
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const [cat, setCat] = useState('전체');
|
|
19
|
+
* {categories.map((c) => (
|
|
20
|
+
* <FilterChip key={c} active={cat === c} onClick={() => setCat(c)}>{c}</FilterChip>
|
|
21
|
+
* ))}
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function FilterChip({ className, size, active, children, type, ...props }: FilterChipProps): React.ReactElement;
|
|
25
|
+
export {};
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { textVariants } from '../Text';
|
|
3
2
|
declare const tagVariants: (props?: ({
|
|
4
|
-
|
|
3
|
+
tone?: "mint" | "blue" | "green" | "gray" | "brand" | "red" | null | undefined;
|
|
4
|
+
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
5
|
+
pill?: boolean | null | undefined;
|
|
5
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
|
|
7
|
+
export interface TagProps extends Omit<React.ComponentProps<"span">, "color">, VariantProps<typeof tagVariants> {
|
|
8
|
+
/** 라벨 좌측 아이콘/이모지 */
|
|
7
9
|
icon?: React.ReactNode;
|
|
8
10
|
children: React.ReactNode;
|
|
9
|
-
|
|
10
|
-
size?: VariantProps<typeof textVariants>['size'];
|
|
11
|
-
weight?: 'bold' | 'medium' | 'regular' | 'light';
|
|
12
|
-
} & VariantProps<typeof tagVariants>;
|
|
11
|
+
}
|
|
13
12
|
/**
|
|
14
|
-
* Tag
|
|
15
|
-
*
|
|
13
|
+
* Tag (a.k.a. Chip)
|
|
14
|
+
* 카테고리 / 상태 / 메타데이터 표시용 작은 라벨.
|
|
16
15
|
*
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
16
|
+
* @param tone `gray` · `brand` (default) · `mint` · `blue` · `red` · `green`
|
|
17
|
+
* @param size `xs` · `sm` · `md` (default) · `lg`
|
|
18
|
+
* @param pill 알약형 라운딩 (default `true`)
|
|
19
|
+
* @param icon 라벨 좌측 아이콘 또는 이모지
|
|
19
20
|
*
|
|
20
|
-
* @example
|
|
21
|
+
* @example
|
|
21
22
|
* ```tsx
|
|
22
|
-
* <Tag
|
|
23
|
+
* <Tag tone="brand">운동</Tag>
|
|
24
|
+
* <Tag tone="mint" size="sm" icon="🔥">14일</Tag>
|
|
23
25
|
* ```
|
|
24
26
|
*/
|
|
25
|
-
export declare function Tag({
|
|
27
|
+
export declare function Tag({ className, tone, size, pill, icon, children, ...props }: TagProps): React.ReactElement;
|
|
26
28
|
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { Tag } from './Tag';
|
|
3
|
+
import { FilterChip } from './FilterChip';
|
|
3
4
|
declare const meta: Meta<typeof Tag>;
|
|
4
5
|
export default meta;
|
|
5
6
|
type Story = StoryObj<typeof Tag>;
|
|
6
7
|
export declare const Default: Story;
|
|
8
|
+
export declare const Tones: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
7
10
|
export declare const WithIcon: Story;
|
|
8
|
-
export declare const
|
|
11
|
+
export declare const Square: Story;
|
|
12
|
+
export declare const FilterChips: StoryObj<typeof FilterChip>;
|
|
13
|
+
export declare const FilterChipSizes: StoryObj<typeof FilterChip>;
|
|
@@ -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" | "medium" | "
|
|
4
|
+
weight?: "bold" | "medium" | "light" | "extrabold" | "semibold" | "regular" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
/**
|
|
7
7
|
* Text
|
|
@@ -9,7 +9,7 @@ export declare const textVariants: (props?: ({
|
|
|
9
9
|
*
|
|
10
10
|
* @param size 텍스트 크기 : heading1, heading2, body1, body2, caption1, caption2, caption3, pageTitle
|
|
11
11
|
* @default size body2
|
|
12
|
-
* @param weight 텍스트 굵기 : bold, medium, regular, light
|
|
12
|
+
* @param weight 텍스트 굵기 : extrabold, bold, semibold, medium, regular, light
|
|
13
13
|
* @param as HTML 태그 또는 커스텀 컴포넌트로 렌더링 (기본값: span)
|
|
14
14
|
*
|
|
15
15
|
* @example 기본 사용
|