@1d1s/design-system 0.1.11 → 0.1.13
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 +35 -0
- package/dist/components/CheckList/CheckList.stories.d.ts +8 -0
- package/dist/components/CheckList/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +14 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +10 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/GlobalChrome/GlobalChrome.stories.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +14 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +9 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Streak/Streak.d.ts +21 -0
- package/dist/components/Streak/Streak.stories.d.ts +8 -0
- package/dist/components/Streak/index.d.ts +1 -0
- package/dist/components/ToggleCheck/ToggleCheck.d.ts +15 -0
- package/dist/components/ToggleCheck/ToggleCheck.stories.d.ts +7 -0
- package/dist/components/ToggleCheck/index.d.ts +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/index.es.js +3804 -3298
- package/dist/index.umd.js +10 -10
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CheckListOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface CheckListProps {
|
|
8
|
+
/** 체크박스 옵션 목록 */
|
|
9
|
+
options: CheckListOption[];
|
|
10
|
+
/** 선택된 옵션의 ID 목록 */
|
|
11
|
+
value: string[];
|
|
12
|
+
/** 선택 변경 시 호출되는 콜백 */
|
|
13
|
+
onValueChange: (value: string[]) => void;
|
|
14
|
+
/** 추가 클래스 */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** 전체 비활성화 여부 */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* CheckList
|
|
21
|
+
* 여러 개의 ToggleCheck를 리스트 형태로 보여주고 다중 선택을 관리하는 컴포넌트
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <CheckList
|
|
26
|
+
* options={[
|
|
27
|
+
* { id: '1', label: '옵션 1' },
|
|
28
|
+
* { id: '2', label: '옵션 2' }
|
|
29
|
+
* ]}
|
|
30
|
+
* value={selectedIds}
|
|
31
|
+
* onValueChange={setSelectedIds}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function CheckList({ options, value, onValueChange, className, disabled, }: CheckListProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckList } from './CheckList';
|
|
3
|
+
declare const meta: Meta<typeof CheckList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CheckList>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Empty: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CheckList';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
+
export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
|
4
|
+
label?: string;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Checkbox
|
|
9
|
+
* 왼쪽의 네모 박스 안에 체크 표시가 들어가는 전형적인 체크박스 컴포넌트
|
|
10
|
+
*
|
|
11
|
+
* @param label 선택적 텍스트 라벨
|
|
12
|
+
* @param readOnly 읽기 전용 여부 (클릭 불가, 시각적 변경 없음)
|
|
13
|
+
*/
|
|
14
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Checkbox } from './Checkbox';
|
|
3
|
+
declare const meta: Meta<typeof Checkbox>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Checkbox>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithoutLabel: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const ReadOnly: Story;
|
|
10
|
+
export declare const List: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
/** 현재 페이지 (1부터 시작) */
|
|
4
|
+
currentPage: number;
|
|
5
|
+
/** 총 페이지 수 */
|
|
6
|
+
totalPages: number;
|
|
7
|
+
/** 페이지 변경 핸들러 */
|
|
8
|
+
onPageChange: (page: number) => void;
|
|
9
|
+
/** 현재 페이지 양옆에 보여줄 페이지 개수 */
|
|
10
|
+
siblingCount?: number;
|
|
11
|
+
/** 추가 클래스 */
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function Pagination({ currentPage, totalPages, onPageChange, siblingCount, className, }: PaginationProps): React.ReactElement | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Pagination } from './Pagination';
|
|
3
|
+
declare const meta: Meta<typeof Pagination>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Pagination>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Short: Story;
|
|
8
|
+
export declare const ManyPages: Story;
|
|
9
|
+
export declare const MobileView: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Pagination';
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Streak
|
|
18
|
+
* 활동 기록을 깃허브 잔디(Contribution Graph) 스타일로 보여주는 컴포넌트.
|
|
19
|
+
* 7행 그리드 구조로 요일별로 쌓이며 가로로 데이터가 추가됩니다.
|
|
20
|
+
*/
|
|
21
|
+
export declare function Streak({ data, size, className, }: StreakProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Streak } from './Streak';
|
|
3
|
+
declare const meta: Meta<typeof Streak>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Streak>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const OneYear: Story;
|
|
8
|
+
export declare const Empty: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Streak';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3
|
+
export interface ToggleCheckProps extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* ToggleCheck
|
|
8
|
+
* 체크 표시가 포함된 토글 버튼 컴포넌트. 선택 상태에 따라 체크 아이콘과 배경색이 변경됩니다.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <ToggleCheck>선택지 1</ToggleCheck>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function ToggleCheck({ children, className, ...props }: ToggleCheckProps): React.ReactElement;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ToggleCheck } from './ToggleCheck';
|
|
3
|
+
declare const meta: Meta<typeof ToggleCheck>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ToggleCheck>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const MultiSelect: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ToggleCheck';
|
|
@@ -4,6 +4,8 @@ export * from './Button';
|
|
|
4
4
|
export * from './Calendar';
|
|
5
5
|
export * from './ChallengeCard';
|
|
6
6
|
export * from './ChallengeListItem';
|
|
7
|
+
export * from './CheckList';
|
|
8
|
+
export * from './Checkbox';
|
|
7
9
|
export * from './CircleAvatar';
|
|
8
10
|
export * from './CircularProgress';
|
|
9
11
|
export * from './DatePicker';
|
|
@@ -20,11 +22,14 @@ export * from './Menu';
|
|
|
20
22
|
export * from './PageBackground';
|
|
21
23
|
export * from './PageTitle';
|
|
22
24
|
export * from './PageWatermark';
|
|
25
|
+
export * from './Pagination';
|
|
23
26
|
export * from './ProfileCard';
|
|
24
27
|
export * from './Spacing';
|
|
28
|
+
export * from './Streak';
|
|
25
29
|
export * from './Tag';
|
|
26
30
|
export * from './TextField';
|
|
27
31
|
export * from './Toggle';
|
|
32
|
+
export * from './ToggleCheck';
|
|
28
33
|
export * from './ToggleGroup';
|
|
29
34
|
export * from './Tooltip';
|
|
30
35
|
export * from './UserListItem';
|