@farmzone/fz-react-ui 1.0.13 → 1.0.15
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.cjs +85 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +85 -54
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1152,9 +1152,19 @@ interface MenuSection {
|
|
|
1152
1152
|
items: Array<MenuItem>;
|
|
1153
1153
|
}
|
|
1154
1154
|
type SidebarVariant = "light" | "dark" | "system-dark" | "system-light";
|
|
1155
|
+
interface SidebarHeaderRenderProps {
|
|
1156
|
+
isCollapsed: boolean;
|
|
1157
|
+
toggleCollapse: () => void;
|
|
1158
|
+
}
|
|
1155
1159
|
interface SidebarProps {
|
|
1156
1160
|
menuSections: Array<MenuSection>;
|
|
1157
|
-
|
|
1161
|
+
/**
|
|
1162
|
+
* ReactNode로 넘기면 기존과 동일하게 nav와 함께 collapse 시 fade-out 됨.
|
|
1163
|
+
* 함수로 넘기면 collapse 상태와 무관하게 항상 렌더링되며, { isCollapsed, toggleCollapse }를
|
|
1164
|
+
* 전달받아 헤더 내부에 자체 collapse 토글 UI를 둘 수 있음 — 이 경우 showCollapseButton은 무시되고
|
|
1165
|
+
* 기본 floating 버튼은 렌더링되지 않음.
|
|
1166
|
+
*/
|
|
1167
|
+
header?: ReactNode | ((props: SidebarHeaderRenderProps) => ReactNode);
|
|
1158
1168
|
footer?: ReactNode;
|
|
1159
1169
|
className?: string;
|
|
1160
1170
|
showCollapseButton?: boolean;
|
|
@@ -1415,4 +1425,4 @@ declare const Z_INDEX: {
|
|
|
1415
1425
|
};
|
|
1416
1426
|
type ZIndexKey = keyof typeof Z_INDEX;
|
|
1417
1427
|
|
|
1418
|
-
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 };
|
|
1428
|
+
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 SidebarHeaderRenderProps, 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
|
@@ -1152,9 +1152,19 @@ interface MenuSection {
|
|
|
1152
1152
|
items: Array<MenuItem>;
|
|
1153
1153
|
}
|
|
1154
1154
|
type SidebarVariant = "light" | "dark" | "system-dark" | "system-light";
|
|
1155
|
+
interface SidebarHeaderRenderProps {
|
|
1156
|
+
isCollapsed: boolean;
|
|
1157
|
+
toggleCollapse: () => void;
|
|
1158
|
+
}
|
|
1155
1159
|
interface SidebarProps {
|
|
1156
1160
|
menuSections: Array<MenuSection>;
|
|
1157
|
-
|
|
1161
|
+
/**
|
|
1162
|
+
* ReactNode로 넘기면 기존과 동일하게 nav와 함께 collapse 시 fade-out 됨.
|
|
1163
|
+
* 함수로 넘기면 collapse 상태와 무관하게 항상 렌더링되며, { isCollapsed, toggleCollapse }를
|
|
1164
|
+
* 전달받아 헤더 내부에 자체 collapse 토글 UI를 둘 수 있음 — 이 경우 showCollapseButton은 무시되고
|
|
1165
|
+
* 기본 floating 버튼은 렌더링되지 않음.
|
|
1166
|
+
*/
|
|
1167
|
+
header?: ReactNode | ((props: SidebarHeaderRenderProps) => ReactNode);
|
|
1158
1168
|
footer?: ReactNode;
|
|
1159
1169
|
className?: string;
|
|
1160
1170
|
showCollapseButton?: boolean;
|
|
@@ -1415,4 +1425,4 @@ declare const Z_INDEX: {
|
|
|
1415
1425
|
};
|
|
1416
1426
|
type ZIndexKey = keyof typeof Z_INDEX;
|
|
1417
1427
|
|
|
1418
|
-
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 };
|
|
1428
|
+
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 SidebarHeaderRenderProps, 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.js
CHANGED
|
@@ -412,7 +412,7 @@ function Input({ className, type, ...props }) {
|
|
|
412
412
|
"data-slot": "input",
|
|
413
413
|
className: cn(
|
|
414
414
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input border-gray-300 flex h-8 w-full min-w-0 rounded-sm border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
415
|
-
"focus-visible:border-
|
|
415
|
+
"focus-visible:border-blue-600 focus-visible:ring-blue-600/30 focus-visible:ring-[1px]",
|
|
416
416
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
417
417
|
className
|
|
418
418
|
),
|
|
@@ -1062,43 +1062,50 @@ function Radio(props) {
|
|
|
1062
1062
|
"--radio-checked": checkColor,
|
|
1063
1063
|
"--radio-unchecked": unCheckColor
|
|
1064
1064
|
};
|
|
1065
|
-
const control = /* @__PURE__ */ jsxs(
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
"border-(--radio-unchecked) data-[state=checked]:border-(--radio-checked)",
|
|
1075
|
-
"data-[state=unchecked]:hover:opacity-80",
|
|
1076
|
-
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
1077
|
-
),
|
|
1078
|
-
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "relative flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
1079
|
-
CircleIcon,
|
|
1065
|
+
const control = /* @__PURE__ */ jsxs(
|
|
1066
|
+
"label",
|
|
1067
|
+
{
|
|
1068
|
+
htmlFor: inputId,
|
|
1069
|
+
className: cn("flex items-center gap-1.5", disabled ? "cursor-not-allowed" : "cursor-pointer", wrapperClassName),
|
|
1070
|
+
style: colorVars,
|
|
1071
|
+
children: [
|
|
1072
|
+
/* @__PURE__ */ jsx(
|
|
1073
|
+
RadioGroupPrimitive.Item,
|
|
1080
1074
|
{
|
|
1075
|
+
value,
|
|
1076
|
+
disabled,
|
|
1077
|
+
id: inputId,
|
|
1081
1078
|
className: cn(
|
|
1082
|
-
"
|
|
1083
|
-
|
|
1084
|
-
|
|
1079
|
+
"group relative size-4 shrink-0 rounded-full border box-border transition-colors duration-200 outline-none",
|
|
1080
|
+
"border-(--radio-unchecked) data-[state=checked]:border-(--radio-checked)",
|
|
1081
|
+
"data-[state=unchecked]:hover:opacity-80",
|
|
1082
|
+
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
1083
|
+
),
|
|
1084
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "relative flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
1085
|
+
CircleIcon,
|
|
1086
|
+
{
|
|
1087
|
+
className: cn(
|
|
1088
|
+
"absolute top-1/2 left-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 fill-(--radio-checked) text-(--radio-checked) transition-opacity duration-200",
|
|
1089
|
+
indicatorClassName
|
|
1090
|
+
)
|
|
1091
|
+
}
|
|
1092
|
+
) })
|
|
1085
1093
|
}
|
|
1086
|
-
) })
|
|
1087
|
-
}
|
|
1088
|
-
),
|
|
1089
|
-
/* @__PURE__ */ jsx(
|
|
1090
|
-
"label",
|
|
1091
|
-
{
|
|
1092
|
-
htmlFor: inputId,
|
|
1093
|
-
className: cn(
|
|
1094
|
-
"text-sm font-medium cursor-pointer text-black select-none",
|
|
1095
|
-
disabled && "cursor-not-allowed text-gray-400 opacity-50",
|
|
1096
|
-
labelClassName
|
|
1097
1094
|
),
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1095
|
+
/* @__PURE__ */ jsx(
|
|
1096
|
+
"span",
|
|
1097
|
+
{
|
|
1098
|
+
className: cn(
|
|
1099
|
+
"text-sm font-medium text-black select-none",
|
|
1100
|
+
disabled && "text-gray-400 opacity-50",
|
|
1101
|
+
labelClassName
|
|
1102
|
+
),
|
|
1103
|
+
children: label
|
|
1104
|
+
}
|
|
1105
|
+
)
|
|
1106
|
+
]
|
|
1107
|
+
}
|
|
1108
|
+
);
|
|
1102
1109
|
const withTooltip = (node) => {
|
|
1103
1110
|
if (!disabled || !disabledMessage) return node;
|
|
1104
1111
|
return /* @__PURE__ */ jsx(Tooltip2, { content: disabledMessage, position: "bottom", asChild: true, sideOffset: 4, children: /* @__PURE__ */ jsx("span", { className: "inline-flex", children: node }) });
|
|
@@ -1145,11 +1152,7 @@ function RadioGroup(props) {
|
|
|
1145
1152
|
value,
|
|
1146
1153
|
onValueChange: (newValue) => onChange(newValue),
|
|
1147
1154
|
disabled,
|
|
1148
|
-
className: cn(
|
|
1149
|
-
"flex flex-wrap gap-3",
|
|
1150
|
-
direction === "horizontal" ? "flex-row" : "flex-col",
|
|
1151
|
-
containerClassName
|
|
1152
|
-
),
|
|
1155
|
+
className: cn("flex flex-wrap gap-3", direction === "horizontal" ? "flex-row" : "flex-col", containerClassName),
|
|
1153
1156
|
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
1154
1157
|
Radio,
|
|
1155
1158
|
{
|
|
@@ -2528,9 +2531,11 @@ function DatePickerRange(props) {
|
|
|
2528
2531
|
const dateToShow = position === "end" ? endInputValue || startInputValue : startInputValue || endInputValue;
|
|
2529
2532
|
toggleCalendar(dateToShow);
|
|
2530
2533
|
};
|
|
2531
|
-
const handleFieldEnter = () => {
|
|
2532
|
-
onKeyDownEnter?.();
|
|
2534
|
+
const handleFieldEnter = (value) => {
|
|
2533
2535
|
closeCalendar();
|
|
2536
|
+
if (onKeyDownEnter && value.length === 10) {
|
|
2537
|
+
onKeyDownEnter();
|
|
2538
|
+
}
|
|
2534
2539
|
};
|
|
2535
2540
|
const inputClassName = cn(
|
|
2536
2541
|
"w-full px-2 py-1.25 border border-gray-300 shadow-xs outline-none text-sm rounded-sm pr-7 transition-colors",
|
|
@@ -2590,7 +2595,10 @@ function DatePickerRange(props) {
|
|
|
2590
2595
|
className: inputClassName,
|
|
2591
2596
|
maxLength: 10,
|
|
2592
2597
|
onKeyDown: (e) => {
|
|
2593
|
-
if (e.key === "Enter")
|
|
2598
|
+
if (e.key === "Enter") {
|
|
2599
|
+
e.preventDefault();
|
|
2600
|
+
handleFieldEnter(startInputValue);
|
|
2601
|
+
}
|
|
2594
2602
|
}
|
|
2595
2603
|
}
|
|
2596
2604
|
),
|
|
@@ -2618,7 +2626,10 @@ function DatePickerRange(props) {
|
|
|
2618
2626
|
className: inputClassName,
|
|
2619
2627
|
maxLength: 10,
|
|
2620
2628
|
onKeyDown: (e) => {
|
|
2621
|
-
if (e.key === "Enter")
|
|
2629
|
+
if (e.key === "Enter") {
|
|
2630
|
+
e.preventDefault();
|
|
2631
|
+
handleFieldEnter(endInputValue);
|
|
2632
|
+
}
|
|
2622
2633
|
}
|
|
2623
2634
|
}
|
|
2624
2635
|
),
|
|
@@ -2713,9 +2724,11 @@ function DatePickerSingle(props) {
|
|
|
2713
2724
|
onBlur?.(formatted);
|
|
2714
2725
|
closeCalendar();
|
|
2715
2726
|
};
|
|
2716
|
-
const handleFieldEnter = () => {
|
|
2717
|
-
onKeyDownEnter?.();
|
|
2727
|
+
const handleFieldEnter = (value2) => {
|
|
2718
2728
|
closeCalendar();
|
|
2729
|
+
if (onKeyDownEnter && value2.length === 10) {
|
|
2730
|
+
onKeyDownEnter();
|
|
2731
|
+
}
|
|
2719
2732
|
};
|
|
2720
2733
|
const calendarNode = /* @__PURE__ */ jsx(
|
|
2721
2734
|
CalendarPortal,
|
|
@@ -2764,12 +2777,15 @@ function DatePickerSingle(props) {
|
|
|
2764
2777
|
disabled,
|
|
2765
2778
|
className: cn(
|
|
2766
2779
|
"w-full px-2 py-1.25 border text-sm rounded-sm outline-none shadow-xs transition-colors",
|
|
2767
|
-
validation ? "border-red-600 focus:border-
|
|
2780
|
+
validation ? "border-red-600 focus:border-blue-600 focus-visible:border-blue-600 focus-visible:ring-1 focus-visible:ring-blue-600/30 focus-visible:outline-none" : "border-gray-300 focus:border-blue-600 focus-visible:border-blue-600 focus-visible:ring-1 focus-visible:ring-blue-600/30 focus-visible:outline-none",
|
|
2768
2781
|
disabled ? DATE_PICKER_FIELD_DISABLED_CLASS : "bg-white text-gray-900"
|
|
2769
2782
|
),
|
|
2770
2783
|
maxLength: 10,
|
|
2771
2784
|
onKeyDown: (e) => {
|
|
2772
|
-
if (e.key === "Enter")
|
|
2785
|
+
if (e.key === "Enter") {
|
|
2786
|
+
e.preventDefault();
|
|
2787
|
+
handleFieldEnter(inputValue);
|
|
2788
|
+
}
|
|
2773
2789
|
},
|
|
2774
2790
|
"data-date-input": "true"
|
|
2775
2791
|
}
|
|
@@ -4544,7 +4560,7 @@ function TableEmpty(props) {
|
|
|
4544
4560
|
const { columnCount } = props;
|
|
4545
4561
|
return /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columnCount, className: "border-none bg-white p-0 align-middle", children: /* @__PURE__ */ jsxs(Empty, { className: "flex min-h-72 w-full flex-col items-center justify-center gap-1", children: [
|
|
4546
4562
|
/* @__PURE__ */ jsx(TriangleAlert, { className: "size-8 shrink-0 text-gray-400", strokeWidth: 1.5 }),
|
|
4547
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
4563
|
+
/* @__PURE__ */ jsx("span", { className: "text-md text-gray-500", children: "\uB4F1\uB85D\uB41C \uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." })
|
|
4548
4564
|
] }) }) });
|
|
4549
4565
|
}
|
|
4550
4566
|
function TableCellContent(props) {
|
|
@@ -7799,7 +7815,8 @@ function PageFilter(props) {
|
|
|
7799
7815
|
{
|
|
7800
7816
|
value: currentValue,
|
|
7801
7817
|
onChange: handleDateChange(optionKey),
|
|
7802
|
-
placeholder: option.placeholder
|
|
7818
|
+
placeholder: option.placeholder,
|
|
7819
|
+
onKeyDownEnter: handleSubmit
|
|
7803
7820
|
}
|
|
7804
7821
|
) }, String(optionKey));
|
|
7805
7822
|
case "date-range":
|
|
@@ -7808,7 +7825,8 @@ function PageFilter(props) {
|
|
|
7808
7825
|
{
|
|
7809
7826
|
startValue: currentValue,
|
|
7810
7827
|
endValue: String(values[option.endKey] ?? ""),
|
|
7811
|
-
onRangeChange: handleRangeChangeCurried(optionKey, option.endKey)
|
|
7828
|
+
onRangeChange: handleRangeChangeCurried(optionKey, option.endKey),
|
|
7829
|
+
onKeyDownEnter: handleSubmit
|
|
7812
7830
|
}
|
|
7813
7831
|
) }, String(optionKey));
|
|
7814
7832
|
case "checkbox":
|
|
@@ -9193,6 +9211,9 @@ function Sidebar(props) {
|
|
|
9193
9211
|
const [overflowVisible, setOverflowVisible] = useState(true);
|
|
9194
9212
|
const [expandedItems, setExpandedItems] = useState(/* @__PURE__ */ new Set());
|
|
9195
9213
|
const [expandedSubItems, setExpandedSubItems] = useState(/* @__PURE__ */ new Set());
|
|
9214
|
+
const toggleCollapse = () => setIsCollapsed((prev) => !prev);
|
|
9215
|
+
const isHeaderRenderProp = typeof header === "function";
|
|
9216
|
+
const headerContent = isHeaderRenderProp ? header({ isCollapsed, toggleCollapse }) : header;
|
|
9196
9217
|
useEffect(() => {
|
|
9197
9218
|
if (isCollapsed) {
|
|
9198
9219
|
setOverflowVisible(false);
|
|
@@ -9267,21 +9288,22 @@ function Sidebar(props) {
|
|
|
9267
9288
|
${className ?? ""}
|
|
9268
9289
|
`,
|
|
9269
9290
|
children: [
|
|
9270
|
-
showCollapseButton && /* @__PURE__ */ jsx(
|
|
9291
|
+
showCollapseButton && !isHeaderRenderProp && /* @__PURE__ */ jsx(
|
|
9271
9292
|
"button",
|
|
9272
9293
|
{
|
|
9273
|
-
onClick:
|
|
9294
|
+
onClick: toggleCollapse,
|
|
9274
9295
|
className: `absolute top-4 z-20 w-6.5 h-6.5 rounded-full flex items-center justify-center transition-colors cursor-pointer ${s.collapseBtn} ${collapseButtonPlacement === "left" ? "left-2" : "right-2"}`,
|
|
9275
9296
|
children: isCollapsed ? /* @__PURE__ */ jsx(PanelRightClose, { size: 18, color: primaryColor ?? s.collapseIcon }) : /* @__PURE__ */ jsx(PanelLeftClose, { size: 18, color: primaryColor ?? s.collapseIcon })
|
|
9276
9297
|
}
|
|
9277
9298
|
),
|
|
9299
|
+
isHeaderRenderProp && headerContent,
|
|
9278
9300
|
/* @__PURE__ */ jsx("div", { className: `flex-1 min-h-0 hide-scrollbar ${overflowVisible ? "overflow-y-auto" : "overflow-hidden"}`, children: /* @__PURE__ */ jsxs(
|
|
9279
9301
|
"div",
|
|
9280
9302
|
{
|
|
9281
9303
|
className: `transition-opacity duration-200 ease-in-out ${isCollapsed ? "opacity-0 pointer-events-none select-none" : "opacity-100"} ${variant === "system-dark" || variant === "system-light" ? "pb-6" : "px-4 pb-6"}`,
|
|
9282
9304
|
style: { transitionDelay: isCollapsed ? "0ms" : "150ms" },
|
|
9283
9305
|
children: [
|
|
9284
|
-
|
|
9306
|
+
!isHeaderRenderProp && headerContent,
|
|
9285
9307
|
/* @__PURE__ */ jsx("nav", { className: `space-y-6 ${variant === "system-dark" || variant === "system-light" ? "px-1" : ""}`, children: menuSections.map((section, sectionIndex) => /* @__PURE__ */ jsxs("div", { children: [
|
|
9286
9308
|
section.title && /* @__PURE__ */ jsx("div", { className: s.sectionTitle, children: section.title }),
|
|
9287
9309
|
/* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: section.items.map((item) => {
|
|
@@ -9761,7 +9783,16 @@ function DetailModalFrame(props) {
|
|
|
9761
9783
|
] }),
|
|
9762
9784
|
/* @__PURE__ */ jsx(ModalFooter, { className: "flex justify-end", children: isEditMode ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9763
9785
|
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleCancelEdit, disabled: controller.isSaving, children: "\uCDE8\uC18C" }),
|
|
9764
|
-
/* @__PURE__ */ jsx(
|
|
9786
|
+
/* @__PURE__ */ jsx(
|
|
9787
|
+
Button,
|
|
9788
|
+
{
|
|
9789
|
+
type: "submit",
|
|
9790
|
+
form: controller.formId,
|
|
9791
|
+
variant: "save",
|
|
9792
|
+
disabled: controller.isSaving || !controller.isDirty,
|
|
9793
|
+
children: "\uC800\uC7A5"
|
|
9794
|
+
}
|
|
9795
|
+
)
|
|
9765
9796
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9766
9797
|
canEdit && /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleEdit, children: "\uC218\uC815" }),
|
|
9767
9798
|
renderFooterExtra,
|