@farmzone/fz-react-ui 1.0.3 → 1.0.5

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/index.d.cts CHANGED
@@ -26,7 +26,7 @@ interface BadgeProps {
26
26
  }
27
27
  declare function Badge(props: BadgeProps): react.JSX.Element;
28
28
 
29
- type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link";
29
+ type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal";
30
30
  type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
31
31
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
32
32
  ref?: Ref<HTMLButtonElement>;
@@ -571,6 +571,7 @@ interface ModalIconHeaderProps {
571
571
  declare function ModalIconHeader(props: ModalIconHeaderProps): react.JSX.Element;
572
572
 
573
573
  interface ModalOverlayProps {
574
+ ref?: Ref<HTMLDivElement>;
574
575
  isOpen: boolean;
575
576
  onClose?: () => void;
576
577
  className?: string;
@@ -612,7 +613,16 @@ interface TableFooterProps {
612
613
  renderRight?: ReactNode;
613
614
  }
614
615
 
616
+ interface PageParams {
617
+ page: number;
618
+ size: number;
619
+ }
615
620
  type SortOrder = "asc" | "desc";
621
+ interface SortParams {
622
+ sortBy: string;
623
+ sortOrder: SortOrder;
624
+ }
625
+ type BaseParams = PageParams & SortParams;
616
626
 
617
627
  type TableFixed = "left" | "right";
618
628
  interface SortOption {
@@ -890,6 +900,7 @@ interface FormFieldConfig<TFieldValues extends FieldValues = FieldValues> {
890
900
  selectWithInputClassNames?: SelectWithInputFieldClassNames;
891
901
  inputWithButton?: InputWithButtonFieldConfig;
892
902
  onClickInputWithButton?: () => void;
903
+ autoComplete?: string;
893
904
  }
894
905
  interface CustomFieldRenderProps<TFieldValues extends FieldValues = FieldValues> {
895
906
  field: ControllerRenderProps<TFieldValues, Path<TFieldValues>>;
@@ -909,6 +920,7 @@ interface SubmitFormProps<TSchema extends z.ZodTypeAny = z.ZodTypeAny> {
909
920
  * blur 검증은 FormField가 `trigger`로 수동 실행.
910
921
  */
911
922
  mode?: "onBlur" | "onChange" | "onSubmit" | "onTouched" | "all";
923
+ autoComplete?: string;
912
924
  }
913
925
 
914
926
  declare function FormTable<TFieldValues extends FieldValues = FieldValues>(props: FormTableProps<TFieldValues>): react.JSX.Element;
@@ -978,6 +990,7 @@ interface PageFilterProps<P> {
978
990
  submitButtonText?: string;
979
991
  resetButtonText?: string;
980
992
  values: P;
993
+ primaryColor?: string;
981
994
  }
982
995
  declare function PageFilter<P extends Record<keyof P, string>>(props: PageFilterProps<P>): react.JSX.Element;
983
996
 
@@ -1128,6 +1141,7 @@ type SidebarVariant = "light" | "dark" | "system-dark" | "system-light";
1128
1141
  interface SidebarProps {
1129
1142
  menuSections: Array<MenuSection>;
1130
1143
  header?: ReactNode;
1144
+ footer?: ReactNode;
1131
1145
  className?: string;
1132
1146
  showCollapseButton?: boolean;
1133
1147
  onClose?: () => void;
@@ -1324,6 +1338,18 @@ declare function useFilePreviewViewer<T extends string = string>(files: FilePrev
1324
1338
  viewerProps: FilePreviewViewerProps<T>;
1325
1339
  };
1326
1340
 
1341
+ interface UseParams<P extends BaseParams> {
1342
+ localParams: P;
1343
+ params: P;
1344
+ updateParam: (key: keyof P, value: P[keyof P]) => void;
1345
+ updateLocalParam: (key: keyof P, value: P[keyof P]) => void;
1346
+ update: () => void;
1347
+ reset: () => void;
1348
+ handleSortChange: (sortKey: string, sortOrder: SortOrder) => void;
1349
+ sortOption: SortOption | undefined;
1350
+ }
1351
+ declare function useParams<P extends BaseParams>(initialParams: P): UseParams<P>;
1352
+
1327
1353
  interface ArrowIconProps extends SVGProps<SVGSVGElement> {
1328
1354
  direction?: "up" | "down";
1329
1355
  }
@@ -1331,7 +1357,7 @@ declare function ArrowIcon(props: ArrowIconProps): react.JSX.Element;
1331
1357
 
1332
1358
  declare function cn(...inputs: Array<ClassValue>): string;
1333
1359
  declare const buttonVariants: (props?: ({
1334
- variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | null | undefined;
1360
+ variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "metal" | "ghost" | "link" | null | undefined;
1335
1361
  size?: "link" | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
1336
1362
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1337
1363
  declare const textVariants: (props?: ({
@@ -1368,4 +1394,4 @@ declare const Z_INDEX: {
1368
1394
  };
1369
1395
  type ZIndexKey = keyof typeof Z_INDEX;
1370
1396
 
1371
- export { ArrowIcon, Badge, type BadgeProps, BaseUploader, type BaseUploaderProps, BreadCrumb, type BreadCrumbItem, type BreadCrumbMenuItem, type BreadCrumbProps, type BreadCrumbRoot, Button, type ButtonProps, type ButtonSize, type ButtonVariant, type CalendarYearRange, Carousel, type CarouselProps, type CarouselRef, Checkbox, type CheckboxProps, type Column, type ConfirmOptions, DatePicker, DebouncedButton, type DebouncedButtonProps, DetailContent, type DetailContentProps, type DetailField, type DetailFieldOrSection, DetailModalFrame, type DetailMode, DetailPageFrame, Empty, ExcelUploader, FilePreviewViewer, FileUploader, type FilterRow, type FormFieldConfig, Input, type InputProps, Loading, LoadingOverlay, type LoadingOverlayProps, type LoadingProps, type MenuChild, type MenuGrandchild, type MenuItem, type MenuSection, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalIconHeader, type ModalIconHeaderProps, ModalOverlay, type ModalProps, type ModalType, MultiTabBar as MultiTab, type MultiTab as MultiTabItem, PageFilter, Pagination, type PaginationProps, Popover, type PopoverAlign, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, PopoverFooter, PopoverHeader, type PopoverPosition, PopoverTitle, PopoverTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioOptionType, type RadioProps, ScrollArea, ScrollBar, SearchAddress, type SearchAddressProps, SearchBar, type SearchBarProps, Select, Select$1 as SelectBase, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOptionType, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sidebar, type SidebarProps, SimplePopover, type SimplePopoverProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SortOption, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, SubmitForm, Switch, type SwitchProps, Tab, type TabItem, type TabProps, Table, Textarea, type TextareaProps, type ToastPosition, type ToastProps, ToastProvider, type ToastType, ToggleSwitch, Tooltip, type TooltipProps, type YmdDateString, type ZIndexKey, Z_INDEX, buildBreadCrumbItems, buttonVariants, cn, confirmModal, findParentMenuItem, findParentMenuName, formatDate, getFileLabel, getPreviewFileType, isCalendarDayAfterMax, isDateInRange, switchTrackSizes, textVariants, toast, useBlockModalConfirm, useBreadCrumbItems, useCustomBlocker, useDetailController, useFilePreviewViewer, useModal, useMultiTabStore, useScrollToTop, useStableImageSrc, useToast, validateAndFormatInput };
1397
+ export { ArrowIcon, Badge, type BadgeProps, type BaseParams, BaseUploader, type BaseUploaderProps, BreadCrumb, type BreadCrumbItem, type BreadCrumbMenuItem, type BreadCrumbProps, type BreadCrumbRoot, Button, type ButtonProps, type ButtonSize, type ButtonVariant, type CalendarYearRange, Carousel, type CarouselProps, type CarouselRef, Checkbox, type CheckboxProps, type Column, type ConfirmOptions, DatePicker, DebouncedButton, type DebouncedButtonProps, DetailContent, type DetailContentProps, type DetailField, type DetailFieldOrSection, DetailModalFrame, type DetailMode, DetailPageFrame, Empty, ExcelUploader, FilePreviewViewer, FileUploader, type FilterRow, type FormFieldConfig, Input, type InputProps, Loading, LoadingOverlay, type LoadingOverlayProps, type LoadingProps, type MenuChild, type MenuGrandchild, type MenuItem, type MenuSection, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalIconHeader, type ModalIconHeaderProps, ModalOverlay, type ModalProps, type ModalType, MultiTabBar as MultiTab, type MultiTab as MultiTabItem, PageFilter, type PageParams, Pagination, type PaginationProps, Popover, type PopoverAlign, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, PopoverFooter, PopoverHeader, type PopoverPosition, PopoverTitle, PopoverTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioOptionType, type RadioProps, ScrollArea, ScrollBar, SearchAddress, type SearchAddressProps, SearchBar, type SearchBarProps, Select, Select$1 as SelectBase, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOptionType, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sidebar, type SidebarProps, SimplePopover, type SimplePopoverProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SortOption, type SortOrder, type SortParams, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, SubmitForm, Switch, type SwitchProps, Tab, type TabItem, type TabProps, Table, Textarea, type TextareaProps, type ToastPosition, type ToastProps, ToastProvider, type ToastType, ToggleSwitch, Tooltip, type TooltipProps, type UseParams, type YmdDateString, type ZIndexKey, Z_INDEX, buildBreadCrumbItems, buttonVariants, cn, confirmModal, findParentMenuItem, findParentMenuName, formatDate, getFileLabel, getPreviewFileType, isCalendarDayAfterMax, isDateInRange, switchTrackSizes, textVariants, toast, useBlockModalConfirm, useBreadCrumbItems, useCustomBlocker, useDetailController, useFilePreviewViewer, useModal, useMultiTabStore, useParams, useScrollToTop, useStableImageSrc, useToast, validateAndFormatInput };
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@ interface BadgeProps {
26
26
  }
27
27
  declare function Badge(props: BadgeProps): react.JSX.Element;
28
28
 
29
- type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link";
29
+ type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | "metal";
30
30
  type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
31
31
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
32
32
  ref?: Ref<HTMLButtonElement>;
@@ -571,6 +571,7 @@ interface ModalIconHeaderProps {
571
571
  declare function ModalIconHeader(props: ModalIconHeaderProps): react.JSX.Element;
572
572
 
573
573
  interface ModalOverlayProps {
574
+ ref?: Ref<HTMLDivElement>;
574
575
  isOpen: boolean;
575
576
  onClose?: () => void;
576
577
  className?: string;
@@ -612,7 +613,16 @@ interface TableFooterProps {
612
613
  renderRight?: ReactNode;
613
614
  }
614
615
 
616
+ interface PageParams {
617
+ page: number;
618
+ size: number;
619
+ }
615
620
  type SortOrder = "asc" | "desc";
621
+ interface SortParams {
622
+ sortBy: string;
623
+ sortOrder: SortOrder;
624
+ }
625
+ type BaseParams = PageParams & SortParams;
616
626
 
617
627
  type TableFixed = "left" | "right";
618
628
  interface SortOption {
@@ -890,6 +900,7 @@ interface FormFieldConfig<TFieldValues extends FieldValues = FieldValues> {
890
900
  selectWithInputClassNames?: SelectWithInputFieldClassNames;
891
901
  inputWithButton?: InputWithButtonFieldConfig;
892
902
  onClickInputWithButton?: () => void;
903
+ autoComplete?: string;
893
904
  }
894
905
  interface CustomFieldRenderProps<TFieldValues extends FieldValues = FieldValues> {
895
906
  field: ControllerRenderProps<TFieldValues, Path<TFieldValues>>;
@@ -909,6 +920,7 @@ interface SubmitFormProps<TSchema extends z.ZodTypeAny = z.ZodTypeAny> {
909
920
  * blur 검증은 FormField가 `trigger`로 수동 실행.
910
921
  */
911
922
  mode?: "onBlur" | "onChange" | "onSubmit" | "onTouched" | "all";
923
+ autoComplete?: string;
912
924
  }
913
925
 
914
926
  declare function FormTable<TFieldValues extends FieldValues = FieldValues>(props: FormTableProps<TFieldValues>): react.JSX.Element;
@@ -978,6 +990,7 @@ interface PageFilterProps<P> {
978
990
  submitButtonText?: string;
979
991
  resetButtonText?: string;
980
992
  values: P;
993
+ primaryColor?: string;
981
994
  }
982
995
  declare function PageFilter<P extends Record<keyof P, string>>(props: PageFilterProps<P>): react.JSX.Element;
983
996
 
@@ -1128,6 +1141,7 @@ type SidebarVariant = "light" | "dark" | "system-dark" | "system-light";
1128
1141
  interface SidebarProps {
1129
1142
  menuSections: Array<MenuSection>;
1130
1143
  header?: ReactNode;
1144
+ footer?: ReactNode;
1131
1145
  className?: string;
1132
1146
  showCollapseButton?: boolean;
1133
1147
  onClose?: () => void;
@@ -1324,6 +1338,18 @@ declare function useFilePreviewViewer<T extends string = string>(files: FilePrev
1324
1338
  viewerProps: FilePreviewViewerProps<T>;
1325
1339
  };
1326
1340
 
1341
+ interface UseParams<P extends BaseParams> {
1342
+ localParams: P;
1343
+ params: P;
1344
+ updateParam: (key: keyof P, value: P[keyof P]) => void;
1345
+ updateLocalParam: (key: keyof P, value: P[keyof P]) => void;
1346
+ update: () => void;
1347
+ reset: () => void;
1348
+ handleSortChange: (sortKey: string, sortOrder: SortOrder) => void;
1349
+ sortOption: SortOption | undefined;
1350
+ }
1351
+ declare function useParams<P extends BaseParams>(initialParams: P): UseParams<P>;
1352
+
1327
1353
  interface ArrowIconProps extends SVGProps<SVGSVGElement> {
1328
1354
  direction?: "up" | "down";
1329
1355
  }
@@ -1331,7 +1357,7 @@ declare function ArrowIcon(props: ArrowIconProps): react.JSX.Element;
1331
1357
 
1332
1358
  declare function cn(...inputs: Array<ClassValue>): string;
1333
1359
  declare const buttonVariants: (props?: ({
1334
- variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | null | undefined;
1360
+ variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "metal" | "ghost" | "link" | null | undefined;
1335
1361
  size?: "link" | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
1336
1362
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1337
1363
  declare const textVariants: (props?: ({
@@ -1368,4 +1394,4 @@ declare const Z_INDEX: {
1368
1394
  };
1369
1395
  type ZIndexKey = keyof typeof Z_INDEX;
1370
1396
 
1371
- export { ArrowIcon, Badge, type BadgeProps, BaseUploader, type BaseUploaderProps, BreadCrumb, type BreadCrumbItem, type BreadCrumbMenuItem, type BreadCrumbProps, type BreadCrumbRoot, Button, type ButtonProps, type ButtonSize, type ButtonVariant, type CalendarYearRange, Carousel, type CarouselProps, type CarouselRef, Checkbox, type CheckboxProps, type Column, type ConfirmOptions, DatePicker, DebouncedButton, type DebouncedButtonProps, DetailContent, type DetailContentProps, type DetailField, type DetailFieldOrSection, DetailModalFrame, type DetailMode, DetailPageFrame, Empty, ExcelUploader, FilePreviewViewer, FileUploader, type FilterRow, type FormFieldConfig, Input, type InputProps, Loading, LoadingOverlay, type LoadingOverlayProps, type LoadingProps, type MenuChild, type MenuGrandchild, type MenuItem, type MenuSection, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalIconHeader, type ModalIconHeaderProps, ModalOverlay, type ModalProps, type ModalType, MultiTabBar as MultiTab, type MultiTab as MultiTabItem, PageFilter, Pagination, type PaginationProps, Popover, type PopoverAlign, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, PopoverFooter, PopoverHeader, type PopoverPosition, PopoverTitle, PopoverTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioOptionType, type RadioProps, ScrollArea, ScrollBar, SearchAddress, type SearchAddressProps, SearchBar, type SearchBarProps, Select, Select$1 as SelectBase, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOptionType, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sidebar, type SidebarProps, SimplePopover, type SimplePopoverProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SortOption, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, SubmitForm, Switch, type SwitchProps, Tab, type TabItem, type TabProps, Table, Textarea, type TextareaProps, type ToastPosition, type ToastProps, ToastProvider, type ToastType, ToggleSwitch, Tooltip, type TooltipProps, type YmdDateString, type ZIndexKey, Z_INDEX, buildBreadCrumbItems, buttonVariants, cn, confirmModal, findParentMenuItem, findParentMenuName, formatDate, getFileLabel, getPreviewFileType, isCalendarDayAfterMax, isDateInRange, switchTrackSizes, textVariants, toast, useBlockModalConfirm, useBreadCrumbItems, useCustomBlocker, useDetailController, useFilePreviewViewer, useModal, useMultiTabStore, useScrollToTop, useStableImageSrc, useToast, validateAndFormatInput };
1397
+ export { ArrowIcon, Badge, type BadgeProps, type BaseParams, BaseUploader, type BaseUploaderProps, BreadCrumb, type BreadCrumbItem, type BreadCrumbMenuItem, type BreadCrumbProps, type BreadCrumbRoot, Button, type ButtonProps, type ButtonSize, type ButtonVariant, type CalendarYearRange, Carousel, type CarouselProps, type CarouselRef, Checkbox, type CheckboxProps, type Column, type ConfirmOptions, DatePicker, DebouncedButton, type DebouncedButtonProps, DetailContent, type DetailContentProps, type DetailField, type DetailFieldOrSection, DetailModalFrame, type DetailMode, DetailPageFrame, Empty, ExcelUploader, FilePreviewViewer, FileUploader, type FilterRow, type FormFieldConfig, Input, type InputProps, Loading, LoadingOverlay, type LoadingOverlayProps, type LoadingProps, type MenuChild, type MenuGrandchild, type MenuItem, type MenuSection, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalIconHeader, type ModalIconHeaderProps, ModalOverlay, type ModalProps, type ModalType, MultiTabBar as MultiTab, type MultiTab as MultiTabItem, PageFilter, type PageParams, Pagination, type PaginationProps, Popover, type PopoverAlign, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, PopoverFooter, PopoverHeader, type PopoverPosition, PopoverTitle, PopoverTrigger, Radio, RadioGroup, type RadioGroupProps, type RadioOptionType, type RadioProps, ScrollArea, ScrollBar, SearchAddress, type SearchAddressProps, SearchBar, type SearchBarProps, Select, Select$1 as SelectBase, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOptionType, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sidebar, type SidebarProps, SimplePopover, type SimplePopoverProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SortOption, type SortOrder, type SortParams, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, SubmitForm, Switch, type SwitchProps, Tab, type TabItem, type TabProps, Table, Textarea, type TextareaProps, type ToastPosition, type ToastProps, ToastProvider, type ToastType, ToggleSwitch, Tooltip, type TooltipProps, type UseParams, type YmdDateString, type ZIndexKey, Z_INDEX, buildBreadCrumbItems, buttonVariants, cn, confirmModal, findParentMenuItem, findParentMenuName, formatDate, getFileLabel, getPreviewFileType, isCalendarDayAfterMax, isDateInRange, switchTrackSizes, textVariants, toast, useBlockModalConfirm, useBreadCrumbItems, useCustomBlocker, useDetailController, useFilePreviewViewer, useModal, useMultiTabStore, useParams, useScrollToTop, useStableImageSrc, useToast, validateAndFormatInput };