@pylerai/design-system 1.1.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.
@@ -0,0 +1,15 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const labelVariants: (props?: ({
4
+ variant?: "label-1-r" | null | undefined;
5
+ as?: "p" | "span" | "label" | "div" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface LabelProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof labelVariants> {
8
+ /** 렌더링할 HTML 태그. 기본값: "label" */
9
+ as?: "label" | "span" | "div" | "p";
10
+ /** HTML label 요소의 for 속성 (as="label"일 때 사용) */
11
+ htmlFor?: string;
12
+ asChild?: boolean;
13
+ }
14
+ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLElement>>;
15
+ export { Label, labelVariants };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ export interface LoadingBarProps {
3
+ size?: "sm" | "md" | "lg" | "xl";
4
+ label?: string;
5
+ className?: string;
6
+ }
7
+ declare const LoadingBar: React.ForwardRefExoticComponent<LoadingBarProps & React.RefAttributes<HTMLDivElement>>;
8
+ export { LoadingBar };
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ export interface InformationModalProps {
3
+ open: boolean;
4
+ title: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ /** 확인 버튼 텍스트. 기본값: "확인" */
7
+ confirmLabel?: string;
8
+ onConfirm?: () => void;
9
+ onClose: () => void;
10
+ className?: string;
11
+ }
12
+ declare function InformationModal({ open, title, description, confirmLabel, onConfirm, onClose, className, }: InformationModalProps): React.ReactPortal | null;
13
+ export interface ActionModalProps {
14
+ open: boolean;
15
+ title: React.ReactNode;
16
+ description?: React.ReactNode;
17
+ /** 취소 버튼 텍스트. 기본값: "닫기" */
18
+ cancelLabel?: string;
19
+ /** 확인 버튼 텍스트. 기본값: "확인" */
20
+ confirmLabel?: string;
21
+ onCancel?: () => void;
22
+ onConfirm?: () => void;
23
+ onClose: () => void;
24
+ className?: string;
25
+ }
26
+ declare function ActionModal({ open, title, description, cancelLabel, confirmLabel, onCancel, onConfirm, onClose, className, }: ActionModalProps): React.ReactPortal | null;
27
+ export type ContentModalSize = "large" | "medium" | "small";
28
+ export interface ContentModalProps {
29
+ open: boolean;
30
+ title: React.ReactNode;
31
+ description?: React.ReactNode;
32
+ /** 모달 크기. 기본값: "small" */
33
+ size?: ContentModalSize;
34
+ /** 취소 버튼 텍스트. 기본값: "닫기" */
35
+ cancelLabel?: string;
36
+ /** 확인 버튼 텍스트. 기본값: "확인" */
37
+ confirmLabel?: string;
38
+ onCancel?: () => void;
39
+ onConfirm?: () => void;
40
+ onClose: () => void;
41
+ children?: React.ReactNode;
42
+ className?: string;
43
+ }
44
+ declare function ContentModal({ open, title, description, size, cancelLabel, confirmLabel, onCancel, onConfirm, onClose, children, className, }: ContentModalProps): React.ReactPortal | null;
45
+ export { InformationModal, ActionModal, ContentModal };
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ export interface PaginationProps {
3
+ /** 현재 페이지 (1-indexed) */
4
+ page: number;
5
+ /** 전체 페이지 수 */
6
+ totalPages: number;
7
+ /** 페이지 변경 핸들러 */
8
+ onPageChange: (page: number) => void;
9
+ /** TOP 버튼 표시 여부. 기본값: false */
10
+ showTopButton?: boolean;
11
+ /** TOP 버튼 클릭 핸들러 */
12
+ onTopClick?: () => void;
13
+ className?: string;
14
+ }
15
+ declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>;
16
+ export { Pagination };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
3
+ /** 선택 시 value를 전달하는 핸들러 */
4
+ onChange?: (value: string) => void;
5
+ }
6
+ declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
7
+ export { Radio };
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ export interface SearchFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
3
+ /** 라벨 텍스트 */
4
+ label?: string;
5
+ /** 라벨 표시 여부. 기본값: true */
6
+ showLabel?: boolean;
7
+ /** 검색 아이콘 표시 여부. 기본값: true */
8
+ showIcon?: boolean;
9
+ /** 크기. 기본값: "large" */
10
+ size?: "large" | "medium" | "small";
11
+ /** 에러 메시지. 표시 시 필드에 빨간 테두리 적용 */
12
+ error?: string;
13
+ /** 필드 하단 힌트 텍스트 */
14
+ hint?: string;
15
+ /** 지우기 버튼 클릭 핸들러. 정의 시 지우기 버튼 표시 */
16
+ onClear?: () => void;
17
+ /** 외부 컨테이너 className */
18
+ wrapperClassName?: string;
19
+ }
20
+ declare const SearchField: React.ForwardRefExoticComponent<SearchFieldProps & React.RefAttributes<HTMLInputElement>>;
21
+ export { SearchField };
@@ -0,0 +1,67 @@
1
+ import * as React from "react";
2
+ declare const TableRoot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const TableHead: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
5
+ interface TableRowProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ hoverable?: boolean;
7
+ selected?: boolean;
8
+ }
9
+ declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLDivElement>>;
10
+ export interface TableHeaderCellProps extends React.HTMLAttributes<HTMLDivElement> {
11
+ sortable?: boolean;
12
+ sortDirection?: "asc" | "desc" | null;
13
+ onSort?: () => void;
14
+ /** 헤더에 info 아이콘 표시 */
15
+ info?: boolean;
16
+ /** 오른쪽에 고정 구분선(3px 보더) 표시 */
17
+ fixedLine?: boolean;
18
+ align?: "left" | "right";
19
+ /** px 숫자 또는 '120px', '10%' 등 CSS 값 */
20
+ width?: string | number;
21
+ }
22
+ declare const TableHeaderCell: React.ForwardRefExoticComponent<TableHeaderCellProps & React.RefAttributes<HTMLDivElement>>;
23
+ export interface TableCellProps extends React.HTMLAttributes<HTMLDivElement> {
24
+ align?: "left" | "right";
25
+ /** 오른쪽에 고정 구분선(3px 보더) 표시 */
26
+ fixedLine?: boolean;
27
+ /** px 숫자 또는 '120px', '10%' 등 CSS 값 */
28
+ width?: string | number;
29
+ }
30
+ declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLDivElement>>;
31
+ export type TableColumn<T = Record<string, unknown>> = {
32
+ /** data 객체의 키 또는 고유 식별자 */
33
+ key: string;
34
+ /** 헤더 텍스트 */
35
+ header: React.ReactNode;
36
+ /** 셀 렌더러. 없으면 row[key] 를 문자열로 출력 */
37
+ cell?: (row: T, index: number) => React.ReactNode;
38
+ align?: "left" | "right";
39
+ /** px 숫자 또는 '120px', '10%' 등 CSS 값 */
40
+ width?: string | number;
41
+ /** 정렬 가능 여부 */
42
+ sortable?: boolean;
43
+ /** 헤더에 info 아이콘 표시 */
44
+ info?: boolean;
45
+ /** 오른쪽에 고정 구분선(3px 보더) 표시 */
46
+ fixedLine?: boolean;
47
+ };
48
+ export interface TableProps<T extends object = Record<string, unknown>> {
49
+ columns: TableColumn<T>[];
50
+ data: T[];
51
+ /** 현재 정렬 중인 컬럼 key */
52
+ sortKey?: string;
53
+ /** 현재 정렬 방향 */
54
+ sortDirection?: "asc" | "desc";
55
+ /** 정렬 클릭 시 호출. 프로젝트에서 상태 관리 */
56
+ onSort?: (key: string, direction: "asc" | "desc") => void;
57
+ /** 선택된 행 인덱스 배열. 정의되면 체크박스 컬럼이 자동 추가 */
58
+ selectedRows?: number[];
59
+ onRowSelect?: (index: number, checked: boolean) => void;
60
+ onSelectAll?: (checked: boolean) => void;
61
+ /** 행 key 생성 함수. 기본값: rowIndex */
62
+ getRowKey?: (row: T, index: number) => React.Key;
63
+ onRowClick?: (row: T, index: number) => void;
64
+ className?: string;
65
+ }
66
+ declare function Table<T extends object>({ columns, data, sortKey, sortDirection, onSort, selectedRows, onRowSelect, onSelectAll, getRowKey, onRowClick, className, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
67
+ export { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRoot, TableRow, };
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ type TabVariant = "underline" | "box" | "outline" | "round";
3
+ export interface TabsProps {
4
+ value?: string;
5
+ defaultValue?: string;
6
+ onValueChange?: (value: string) => void;
7
+ variant?: TabVariant;
8
+ children?: React.ReactNode;
9
+ className?: string;
10
+ }
11
+ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
12
+ export interface TabsListProps {
13
+ children: React.ReactNode;
14
+ className?: string;
15
+ }
16
+ declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
17
+ export interface TabsTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
18
+ value: string;
19
+ }
20
+ declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
21
+ export { Tabs, TabsList, TabsTrigger };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export type TagSize = "medium" | "small" | "xsmall";
3
+ export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
4
+ size?: TagSize;
5
+ }
6
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
7
+ export { Tag };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ export type TipsColor = "white" | "black";
3
+ export type TipsSize = "medium" | "small";
4
+ export interface TipsProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ color?: TipsColor;
6
+ size?: TipsSize;
7
+ }
8
+ declare const Tips: React.ForwardRefExoticComponent<TipsProps & React.RefAttributes<HTMLDivElement>>;
9
+ export { Tips };
@@ -0,0 +1,23 @@
1
+ export interface ToasterProps {
2
+ position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
3
+ }
4
+ export declare function Toaster({ position }: ToasterProps): import("react/jsx-runtime").JSX.Element;
5
+ export interface ToastOptions {
6
+ duration?: number;
7
+ id?: string | number;
8
+ }
9
+ export declare const toast: {
10
+ success: (message: string, options?: ToastOptions) => string | number;
11
+ error: (message: string, options?: ToastOptions) => string | number;
12
+ caution: (message: string, options?: ToastOptions) => string | number;
13
+ };
14
+ export interface SnackbarAction {
15
+ label: string;
16
+ withIcon?: boolean;
17
+ onClick?: () => void;
18
+ }
19
+ export declare const snackbar: {
20
+ success: (message: string, action?: SnackbarAction, options?: ToastOptions) => string | number;
21
+ error: (message: string, action?: SnackbarAction, options?: ToastOptions) => string | number;
22
+ caution: (message: string, action?: SnackbarAction, options?: ToastOptions) => string | number;
23
+ };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ export interface ToggleProps {
3
+ checked?: boolean;
4
+ neutral?: boolean;
5
+ disabled?: boolean;
6
+ onChange?: (checked: boolean) => void;
7
+ className?: string;
8
+ }
9
+ declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export { Toggle };
@@ -0,0 +1,36 @@
1
+ import { ContentModalSize } from './modal';
2
+ import * as React from "react";
3
+ interface InformationModalConfig {
4
+ title: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ confirmLabel?: string;
7
+ onConfirm?: () => void;
8
+ }
9
+ interface ActionModalConfig {
10
+ title: React.ReactNode;
11
+ description?: React.ReactNode;
12
+ cancelLabel?: string;
13
+ confirmLabel?: string;
14
+ onCancel?: () => void;
15
+ onConfirm?: () => void;
16
+ }
17
+ interface ContentModalConfig {
18
+ title: React.ReactNode;
19
+ description?: React.ReactNode;
20
+ size?: ContentModalSize;
21
+ cancelLabel?: string;
22
+ confirmLabel?: string;
23
+ onCancel?: () => void;
24
+ onConfirm?: () => void;
25
+ content?: React.ReactNode;
26
+ }
27
+ interface ModalContextValue {
28
+ openInformationModal: (config: InformationModalConfig) => Promise<boolean>;
29
+ openActionModal: (config: ActionModalConfig) => Promise<boolean>;
30
+ openContentModal: (config: ContentModalConfig) => Promise<boolean>;
31
+ }
32
+ export declare function ModalProvider({ children }: {
33
+ children: React.ReactNode;
34
+ }): import("react/jsx-runtime").JSX.Element;
35
+ export declare function useModal(): ModalContextValue;
36
+ export {};
File without changes
@@ -0,0 +1,45 @@
1
+ export { PYLER_LIGHT_COLOR_TOKENS, flatPylerLightTokens, PYLER_LIGHT_GROUP_ORDER, getDsCssVar, getPylerCssVar, formatPylerPathForDisplay, } from './tokens/pyler-light';
2
+ export type { HexColor, DsCssVar, PylerLightCssVar, PylerLightGroup, PylerLightFlatToken, } from './tokens/pyler-light';
3
+ export { PYLER_TYPOGRAPHY_STYLE } from './tokens/typography';
4
+ export type { PylerTypographyStyleKey, PylerTypographyScale, PylerTypographyUtilityClass, } from './tokens/typography';
5
+ export { Button, ButtonIndicator, buttonVariants } from './components/ui/button';
6
+ export type { ButtonProps, ButtonIndicatorProps } from './components/ui/button';
7
+ export { InputField, TextField } from './components/ui/input';
8
+ export type { InputFieldProps, TextFieldProps } from './components/ui/input';
9
+ export { SearchField } from './components/ui/search-field';
10
+ export type { SearchFieldProps } from './components/ui/search-field';
11
+ export { Dropdown } from './components/ui/dropdown';
12
+ export type { DropdownProps, DropdownOption } from './components/ui/dropdown';
13
+ export { Checkbox } from './components/ui/checkbox';
14
+ export type { CheckboxProps } from './components/ui/checkbox';
15
+ export { Radio } from './components/ui/radio';
16
+ export type { RadioProps } from './components/ui/radio';
17
+ export { Toggle } from './components/ui/toggle';
18
+ export type { ToggleProps } from './components/ui/toggle';
19
+ export { Table, TableRoot, TableHead, TableBody, TableRow, TableHeaderCell, TableCell, } from './components/ui/table';
20
+ export type { TableProps, TableColumn, TableHeaderCellProps, TableCellProps } from './components/ui/table';
21
+ export { LoadingBar } from './components/ui/loading-bar';
22
+ export type { LoadingBarProps } from './components/ui/loading-bar';
23
+ export { Tabs, TabsList, TabsTrigger } from './components/ui/tabs';
24
+ export type { TabsProps, TabsListProps, TabsTriggerProps } from './components/ui/tabs';
25
+ export { Pagination } from './components/ui/pagination';
26
+ export type { PaginationProps } from './components/ui/pagination';
27
+ export { Badge } from './components/ui/badge';
28
+ export type { BadgeProps, BadgeColor, BadgeSize } from './components/ui/badge';
29
+ export { Tag } from './components/ui/tag';
30
+ export type { TagProps, TagSize } from './components/ui/tag';
31
+ export { Chip } from './components/ui/chip';
32
+ export type { ChipProps, ChipSize } from './components/ui/chip';
33
+ export { Toaster, toast, snackbar } from './components/ui/toast';
34
+ export type { ToasterProps, ToastOptions, SnackbarAction } from './components/ui/toast';
35
+ export { Tips } from './components/ui/tips';
36
+ export type { TipsProps, TipsColor, TipsSize } from './components/ui/tips';
37
+ export { InformationModal, ActionModal, ContentModal } from './components/ui/modal';
38
+ export type { InformationModalProps, ActionModalProps, ContentModalProps, ContentModalSize, } from './components/ui/modal';
39
+ export { ModalProvider, useModal } from './components/ui/use-modal';
40
+ export { Headline, headlineVariants } from './components/ui/headline';
41
+ export type { HeadlineProps } from './components/ui/headline';
42
+ export { Body, bodyVariants } from './components/ui/body';
43
+ export type { BodyProps } from './components/ui/body';
44
+ export { Label, labelVariants } from './components/ui/label';
45
+ export type { LabelProps } from './components/ui/label';