@farmzone/fz-react-ui 1.1.18 → 1.2.1
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/README.md +27 -0
- package/dist/index.cjs +357 -211
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -5
- package/dist/index.d.ts +18 -5
- package/dist/index.js +357 -211
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -28,7 +28,7 @@ interface BadgeProps {
|
|
|
28
28
|
}
|
|
29
29
|
declare function Badge(props: BadgeProps): react.JSX.Element;
|
|
30
30
|
|
|
31
|
-
type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal";
|
|
31
|
+
type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal" | "inkstone" | "inkstone-outline" | "inkstone-ghost" | "inkstone-danger";
|
|
32
32
|
type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
|
|
33
33
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
34
34
|
ref?: Ref<HTMLButtonElement>;
|
|
@@ -610,7 +610,7 @@ interface ModalHeaderProps {
|
|
|
610
610
|
declare function ModalHeader(props: ModalHeaderProps): react.JSX.Element;
|
|
611
611
|
|
|
612
612
|
type ModalType = "detail" | "create" | "edit" | "search" | "info" | "delete" | "warning";
|
|
613
|
-
type ModalIconHeaderVariant = "default" | "system-light" | "system-dark";
|
|
613
|
+
type ModalIconHeaderVariant = "default" | "system-light" | "system-dark" | "inkstone";
|
|
614
614
|
type ModalIconHeaderSize = "sm" | "md";
|
|
615
615
|
interface ModalIconHeaderProps {
|
|
616
616
|
type: ModalType;
|
|
@@ -737,6 +737,8 @@ interface TableProps<T> {
|
|
|
737
737
|
isDynamicHeight?: boolean;
|
|
738
738
|
showHorizontalDivider?: boolean;
|
|
739
739
|
showVerticalDivider?: boolean;
|
|
740
|
+
/** 표 스타일. inkstone: 선 없는 머리글 + 얇은 행 구분선의 흑백 미니멀 표(styles/inkstone.css). */
|
|
741
|
+
variant?: "default" | "inkstone";
|
|
740
742
|
}
|
|
741
743
|
declare function Table<T>(props: TableProps<T>): react.JSX.Element;
|
|
742
744
|
|
|
@@ -1115,7 +1117,7 @@ declare const useMultiTabStore: zustand.UseBoundStore<Omit<zustand.StoreApi<Mult
|
|
|
1115
1117
|
};
|
|
1116
1118
|
}>;
|
|
1117
1119
|
|
|
1118
|
-
type MultiTabVariant = "light" | "dark" | "system-light" | "system-dark";
|
|
1120
|
+
type MultiTabVariant = "light" | "dark" | "system-light" | "system-dark" | "inkstone";
|
|
1119
1121
|
interface MultiTabGroupInfo {
|
|
1120
1122
|
/** 그룹을 식별하는 고유 키. 같은 key를 가진 "연속된" 탭들이 하나의 그룹으로 묶입니다. */
|
|
1121
1123
|
key: string;
|
|
@@ -1266,13 +1268,15 @@ interface MenuItem {
|
|
|
1266
1268
|
icon: LucideIcon;
|
|
1267
1269
|
label: string;
|
|
1268
1270
|
path?: string;
|
|
1271
|
+
/** 라벨 오른쪽에 붙는 작은 표시(건수 등). */
|
|
1272
|
+
badge?: ReactNode;
|
|
1269
1273
|
children?: Array<MenuChild>;
|
|
1270
1274
|
}
|
|
1271
1275
|
interface MenuSection {
|
|
1272
1276
|
title?: string;
|
|
1273
1277
|
items: Array<MenuItem>;
|
|
1274
1278
|
}
|
|
1275
|
-
type SidebarVariant = "light" | "dark" | "system-dark" | "system-light";
|
|
1279
|
+
type SidebarVariant = "light" | "dark" | "system-dark" | "system-light" | "inkstone";
|
|
1276
1280
|
interface SidebarHeaderRenderProps {
|
|
1277
1281
|
isCollapsed: boolean;
|
|
1278
1282
|
toggleCollapse: () => void;
|
|
@@ -1293,6 +1297,8 @@ interface SidebarProps {
|
|
|
1293
1297
|
onClose?: () => void;
|
|
1294
1298
|
variant?: SidebarVariant;
|
|
1295
1299
|
primaryColor?: string;
|
|
1300
|
+
/** 펼쳤을 때의 너비(px). 생략하면 기본 너비(248px)를 쓴다. 접힌 너비는 그대로다. */
|
|
1301
|
+
width?: number;
|
|
1296
1302
|
}
|
|
1297
1303
|
declare function Sidebar(props: SidebarProps): react.JSX.Element;
|
|
1298
1304
|
|
|
@@ -1401,8 +1407,13 @@ interface RichEditorProps {
|
|
|
1401
1407
|
autofocus?: boolean | "start" | "end" | "all" | null;
|
|
1402
1408
|
onSubmit?: () => void;
|
|
1403
1409
|
fileFormat?: ReadonlyArray<string>;
|
|
1410
|
+
maxFiles?: number;
|
|
1404
1411
|
onFileUpload?: (file: File) => string | Promise<string>;
|
|
1405
1412
|
renderFilePreview?: (attachment: FileAttachment, onRemove: () => void) => ReactNode;
|
|
1413
|
+
fileCountUIRender?: (info: {
|
|
1414
|
+
count: number;
|
|
1415
|
+
max?: number;
|
|
1416
|
+
}) => ReactNode;
|
|
1406
1417
|
}
|
|
1407
1418
|
interface UseRichEditorOptions {
|
|
1408
1419
|
defaultValue?: string;
|
|
@@ -1420,6 +1431,7 @@ interface UseRichEditorOptions {
|
|
|
1420
1431
|
editorClassName?: string;
|
|
1421
1432
|
additionalExtensions?: Extensions;
|
|
1422
1433
|
fileFormat?: ReadonlyArray<string>;
|
|
1434
|
+
maxFiles?: number;
|
|
1423
1435
|
onFileUpload?: (file: File) => string | Promise<string>;
|
|
1424
1436
|
onChange?: (html: string) => void;
|
|
1425
1437
|
onSubmit?: () => void;
|
|
@@ -1448,6 +1460,7 @@ interface UseRichEditorReturn {
|
|
|
1448
1460
|
focus: () => void;
|
|
1449
1461
|
isEmpty: boolean;
|
|
1450
1462
|
attachments: FileAttachment[];
|
|
1463
|
+
attachmentCount: number;
|
|
1451
1464
|
removeAttachment: (id: string) => void;
|
|
1452
1465
|
hydrateAttachments: (loaded: FileAttachment[]) => void;
|
|
1453
1466
|
processFiles: (files: File[]) => void;
|
|
@@ -1673,7 +1686,7 @@ declare function ArrowIcon(props: ArrowIconProps): react.JSX.Element;
|
|
|
1673
1686
|
|
|
1674
1687
|
declare function cn(...inputs: Array<ClassValue>): string;
|
|
1675
1688
|
declare const buttonVariants: (props?: ({
|
|
1676
|
-
variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "metal" | "ghost" | "link" | null | undefined;
|
|
1689
|
+
variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "metal" | "ghost" | "link" | "inkstone" | "inkstone-outline" | "inkstone-ghost" | "inkstone-danger" | null | undefined;
|
|
1677
1690
|
size?: "link" | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
1678
1691
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1679
1692
|
declare const textVariants: (props?: ({
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ interface BadgeProps {
|
|
|
28
28
|
}
|
|
29
29
|
declare function Badge(props: BadgeProps): react.JSX.Element;
|
|
30
30
|
|
|
31
|
-
type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal";
|
|
31
|
+
type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal" | "inkstone" | "inkstone-outline" | "inkstone-ghost" | "inkstone-danger";
|
|
32
32
|
type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
|
|
33
33
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
34
34
|
ref?: Ref<HTMLButtonElement>;
|
|
@@ -610,7 +610,7 @@ interface ModalHeaderProps {
|
|
|
610
610
|
declare function ModalHeader(props: ModalHeaderProps): react.JSX.Element;
|
|
611
611
|
|
|
612
612
|
type ModalType = "detail" | "create" | "edit" | "search" | "info" | "delete" | "warning";
|
|
613
|
-
type ModalIconHeaderVariant = "default" | "system-light" | "system-dark";
|
|
613
|
+
type ModalIconHeaderVariant = "default" | "system-light" | "system-dark" | "inkstone";
|
|
614
614
|
type ModalIconHeaderSize = "sm" | "md";
|
|
615
615
|
interface ModalIconHeaderProps {
|
|
616
616
|
type: ModalType;
|
|
@@ -737,6 +737,8 @@ interface TableProps<T> {
|
|
|
737
737
|
isDynamicHeight?: boolean;
|
|
738
738
|
showHorizontalDivider?: boolean;
|
|
739
739
|
showVerticalDivider?: boolean;
|
|
740
|
+
/** 표 스타일. inkstone: 선 없는 머리글 + 얇은 행 구분선의 흑백 미니멀 표(styles/inkstone.css). */
|
|
741
|
+
variant?: "default" | "inkstone";
|
|
740
742
|
}
|
|
741
743
|
declare function Table<T>(props: TableProps<T>): react.JSX.Element;
|
|
742
744
|
|
|
@@ -1115,7 +1117,7 @@ declare const useMultiTabStore: zustand.UseBoundStore<Omit<zustand.StoreApi<Mult
|
|
|
1115
1117
|
};
|
|
1116
1118
|
}>;
|
|
1117
1119
|
|
|
1118
|
-
type MultiTabVariant = "light" | "dark" | "system-light" | "system-dark";
|
|
1120
|
+
type MultiTabVariant = "light" | "dark" | "system-light" | "system-dark" | "inkstone";
|
|
1119
1121
|
interface MultiTabGroupInfo {
|
|
1120
1122
|
/** 그룹을 식별하는 고유 키. 같은 key를 가진 "연속된" 탭들이 하나의 그룹으로 묶입니다. */
|
|
1121
1123
|
key: string;
|
|
@@ -1266,13 +1268,15 @@ interface MenuItem {
|
|
|
1266
1268
|
icon: LucideIcon;
|
|
1267
1269
|
label: string;
|
|
1268
1270
|
path?: string;
|
|
1271
|
+
/** 라벨 오른쪽에 붙는 작은 표시(건수 등). */
|
|
1272
|
+
badge?: ReactNode;
|
|
1269
1273
|
children?: Array<MenuChild>;
|
|
1270
1274
|
}
|
|
1271
1275
|
interface MenuSection {
|
|
1272
1276
|
title?: string;
|
|
1273
1277
|
items: Array<MenuItem>;
|
|
1274
1278
|
}
|
|
1275
|
-
type SidebarVariant = "light" | "dark" | "system-dark" | "system-light";
|
|
1279
|
+
type SidebarVariant = "light" | "dark" | "system-dark" | "system-light" | "inkstone";
|
|
1276
1280
|
interface SidebarHeaderRenderProps {
|
|
1277
1281
|
isCollapsed: boolean;
|
|
1278
1282
|
toggleCollapse: () => void;
|
|
@@ -1293,6 +1297,8 @@ interface SidebarProps {
|
|
|
1293
1297
|
onClose?: () => void;
|
|
1294
1298
|
variant?: SidebarVariant;
|
|
1295
1299
|
primaryColor?: string;
|
|
1300
|
+
/** 펼쳤을 때의 너비(px). 생략하면 기본 너비(248px)를 쓴다. 접힌 너비는 그대로다. */
|
|
1301
|
+
width?: number;
|
|
1296
1302
|
}
|
|
1297
1303
|
declare function Sidebar(props: SidebarProps): react.JSX.Element;
|
|
1298
1304
|
|
|
@@ -1401,8 +1407,13 @@ interface RichEditorProps {
|
|
|
1401
1407
|
autofocus?: boolean | "start" | "end" | "all" | null;
|
|
1402
1408
|
onSubmit?: () => void;
|
|
1403
1409
|
fileFormat?: ReadonlyArray<string>;
|
|
1410
|
+
maxFiles?: number;
|
|
1404
1411
|
onFileUpload?: (file: File) => string | Promise<string>;
|
|
1405
1412
|
renderFilePreview?: (attachment: FileAttachment, onRemove: () => void) => ReactNode;
|
|
1413
|
+
fileCountUIRender?: (info: {
|
|
1414
|
+
count: number;
|
|
1415
|
+
max?: number;
|
|
1416
|
+
}) => ReactNode;
|
|
1406
1417
|
}
|
|
1407
1418
|
interface UseRichEditorOptions {
|
|
1408
1419
|
defaultValue?: string;
|
|
@@ -1420,6 +1431,7 @@ interface UseRichEditorOptions {
|
|
|
1420
1431
|
editorClassName?: string;
|
|
1421
1432
|
additionalExtensions?: Extensions;
|
|
1422
1433
|
fileFormat?: ReadonlyArray<string>;
|
|
1434
|
+
maxFiles?: number;
|
|
1423
1435
|
onFileUpload?: (file: File) => string | Promise<string>;
|
|
1424
1436
|
onChange?: (html: string) => void;
|
|
1425
1437
|
onSubmit?: () => void;
|
|
@@ -1448,6 +1460,7 @@ interface UseRichEditorReturn {
|
|
|
1448
1460
|
focus: () => void;
|
|
1449
1461
|
isEmpty: boolean;
|
|
1450
1462
|
attachments: FileAttachment[];
|
|
1463
|
+
attachmentCount: number;
|
|
1451
1464
|
removeAttachment: (id: string) => void;
|
|
1452
1465
|
hydrateAttachments: (loaded: FileAttachment[]) => void;
|
|
1453
1466
|
processFiles: (files: File[]) => void;
|
|
@@ -1673,7 +1686,7 @@ declare function ArrowIcon(props: ArrowIconProps): react.JSX.Element;
|
|
|
1673
1686
|
|
|
1674
1687
|
declare function cn(...inputs: Array<ClassValue>): string;
|
|
1675
1688
|
declare const buttonVariants: (props?: ({
|
|
1676
|
-
variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "metal" | "ghost" | "link" | null | undefined;
|
|
1689
|
+
variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "metal" | "ghost" | "link" | "inkstone" | "inkstone-outline" | "inkstone-ghost" | "inkstone-danger" | null | undefined;
|
|
1677
1690
|
size?: "link" | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
1678
1691
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1679
1692
|
declare const textVariants: (props?: ({
|