@farmzone/fz-react-ui 0.0.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 +93 -0
- package/dist/index.cjs +9101 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1277 -0
- package/dist/index.d.ts +1277 -0
- package/dist/index.js +8985 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +112 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1277 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { ReactNode, ButtonHTMLAttributes, Ref, CSSProperties, InputHTMLAttributes, TextareaHTMLAttributes, ComponentProps, HTMLAttributes, RefObject } from 'react';
|
|
3
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
4
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
import { VariantProps } from 'class-variance-authority';
|
|
7
|
+
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
import { FieldValues, Path, ControllerRenderProps, ControllerFieldState, UseFormReturn } from 'react-hook-form';
|
|
10
|
+
import * as zustand_middleware from 'zustand/middleware';
|
|
11
|
+
import * as zustand from 'zustand';
|
|
12
|
+
import { Address } from 'react-daum-postcode';
|
|
13
|
+
import { Location } from 'react-router';
|
|
14
|
+
import { ClassValue } from 'clsx';
|
|
15
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
16
|
+
|
|
17
|
+
interface BadgeProps {
|
|
18
|
+
text?: string;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
textClassName?: string;
|
|
22
|
+
badgeCount?: number;
|
|
23
|
+
badgeCountClassName?: string;
|
|
24
|
+
maxCount?: number;
|
|
25
|
+
}
|
|
26
|
+
declare function Badge(props: BadgeProps): React$1.JSX.Element;
|
|
27
|
+
|
|
28
|
+
type ButtonVariant = "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link";
|
|
29
|
+
type ButtonSize = "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | "link";
|
|
30
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
31
|
+
ref?: Ref<HTMLButtonElement>;
|
|
32
|
+
asChild?: boolean;
|
|
33
|
+
variant?: ButtonVariant;
|
|
34
|
+
size?: ButtonSize;
|
|
35
|
+
tooltip?: ReactNode;
|
|
36
|
+
tooltipPosition?: "top" | "bottom";
|
|
37
|
+
tooltipClassName?: string;
|
|
38
|
+
tooltipContentClassName?: string;
|
|
39
|
+
}
|
|
40
|
+
declare function Button(props: ButtonProps): React$1.JSX.Element;
|
|
41
|
+
|
|
42
|
+
interface TooltipProps {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
text?: ReactNode;
|
|
45
|
+
content: ReactNode;
|
|
46
|
+
position?: "top" | "bottom";
|
|
47
|
+
className?: string;
|
|
48
|
+
triggerClassName?: string;
|
|
49
|
+
arrowClassName?: string;
|
|
50
|
+
contentClassName?: string;
|
|
51
|
+
contentStyle?: CSSProperties;
|
|
52
|
+
offsetX?: number;
|
|
53
|
+
offsetY?: number;
|
|
54
|
+
delayDuration?: number;
|
|
55
|
+
asChild?: boolean;
|
|
56
|
+
disableHoverableContent?: boolean;
|
|
57
|
+
sideOffset?: number;
|
|
58
|
+
}
|
|
59
|
+
declare function Tooltip(props: TooltipProps): React$1.JSX.Element;
|
|
60
|
+
|
|
61
|
+
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "defaultChecked" | "checked"> {
|
|
62
|
+
checked: boolean;
|
|
63
|
+
label?: string;
|
|
64
|
+
indeterminate?: boolean;
|
|
65
|
+
ref?: Ref<HTMLDivElement>;
|
|
66
|
+
onChange?: (checked: boolean) => void;
|
|
67
|
+
tooltipConfig?: Pick<TooltipProps, "content" | "position">;
|
|
68
|
+
wrapperClassName?: string;
|
|
69
|
+
labelClassName?: string;
|
|
70
|
+
iconClassName?: string;
|
|
71
|
+
checkedClassName?: string;
|
|
72
|
+
uncheckedClassName?: string;
|
|
73
|
+
disabledCheckedClassName?: string;
|
|
74
|
+
disabledUncheckedClassName?: string;
|
|
75
|
+
}
|
|
76
|
+
declare function Checkbox(props: CheckboxProps): React$1.JSX.Element;
|
|
77
|
+
|
|
78
|
+
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
79
|
+
ref?: Ref<HTMLInputElement>;
|
|
80
|
+
placeholder?: string;
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
status?: "default" | "success" | "error";
|
|
83
|
+
message?: string;
|
|
84
|
+
label?: string;
|
|
85
|
+
bare?: boolean;
|
|
86
|
+
type?: "text" | "number" | "date" | "password" | "email" | "money";
|
|
87
|
+
leftIcon?: ReactNode;
|
|
88
|
+
rightIcon?: ReactNode;
|
|
89
|
+
showPasswordToggle?: boolean;
|
|
90
|
+
}
|
|
91
|
+
declare function Input(props: InputProps): React$1.JSX.Element;
|
|
92
|
+
|
|
93
|
+
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
94
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
95
|
+
status?: "default" | "success" | "error";
|
|
96
|
+
message?: string;
|
|
97
|
+
label?: string;
|
|
98
|
+
bare?: boolean;
|
|
99
|
+
}
|
|
100
|
+
declare function Textarea(props: TextareaProps): React$1.JSX.Element;
|
|
101
|
+
|
|
102
|
+
type SwitchTrackSize = {
|
|
103
|
+
width: string | number;
|
|
104
|
+
height: string | number;
|
|
105
|
+
dotSize: string | number;
|
|
106
|
+
};
|
|
107
|
+
type SwitchTrackSizeInput = Partial<SwitchTrackSize>;
|
|
108
|
+
declare const switchTrackSizes: {
|
|
109
|
+
readonly sm: {
|
|
110
|
+
readonly width: "1.75rem";
|
|
111
|
+
readonly height: "1rem";
|
|
112
|
+
readonly dotSize: "0.75rem";
|
|
113
|
+
};
|
|
114
|
+
readonly md: {
|
|
115
|
+
readonly width: "2rem";
|
|
116
|
+
readonly height: "1.15rem";
|
|
117
|
+
readonly dotSize: "1rem";
|
|
118
|
+
};
|
|
119
|
+
readonly lg: {
|
|
120
|
+
readonly width: "2.75rem";
|
|
121
|
+
readonly height: "1.5rem";
|
|
122
|
+
readonly dotSize: "1.25rem";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
interface BaseSwitchProps extends React$1.ComponentProps<typeof SwitchPrimitive.Root> {
|
|
127
|
+
activeColor?: string;
|
|
128
|
+
dotColor?: string;
|
|
129
|
+
trackSize?: SwitchTrackSizeInput;
|
|
130
|
+
}
|
|
131
|
+
declare function BaseSwitch({ className, activeColor, dotColor, trackSize, style, ...props }: BaseSwitchProps): React$1.JSX.Element;
|
|
132
|
+
|
|
133
|
+
interface SwitchProps extends ComponentProps<typeof BaseSwitch> {
|
|
134
|
+
label?: string;
|
|
135
|
+
labelClassName?: string;
|
|
136
|
+
contentClassName?: string;
|
|
137
|
+
activeColor?: string;
|
|
138
|
+
dotColor?: string;
|
|
139
|
+
trackSize?: SwitchTrackSizeInput;
|
|
140
|
+
}
|
|
141
|
+
declare function Switch(props: SwitchProps): React$1.JSX.Element;
|
|
142
|
+
|
|
143
|
+
interface SliderProps {
|
|
144
|
+
value?: Array<number>;
|
|
145
|
+
defaultValue?: Array<number>;
|
|
146
|
+
onValueChange?: (value: Array<number>) => void;
|
|
147
|
+
min?: number;
|
|
148
|
+
max?: number;
|
|
149
|
+
step?: number;
|
|
150
|
+
disabled?: boolean;
|
|
151
|
+
orientation?: "horizontal" | "vertical";
|
|
152
|
+
className?: string;
|
|
153
|
+
trackClassName?: string;
|
|
154
|
+
rangeClassName?: string;
|
|
155
|
+
thumbClassName?: string;
|
|
156
|
+
ariaLabel?: string;
|
|
157
|
+
name?: string;
|
|
158
|
+
}
|
|
159
|
+
declare function Slider(props: SliderProps): React$1.JSX.Element;
|
|
160
|
+
|
|
161
|
+
type SkeletonProps = ComponentProps<"div">;
|
|
162
|
+
declare function Skeleton(props: SkeletonProps): React$1.JSX.Element;
|
|
163
|
+
|
|
164
|
+
interface ScrollAreaProps extends HTMLAttributes<HTMLDivElement> {
|
|
165
|
+
children: ReactNode;
|
|
166
|
+
height?: string | number;
|
|
167
|
+
maxHeight?: string | number;
|
|
168
|
+
orientation?: "vertical" | "horizontal" | "both";
|
|
169
|
+
}
|
|
170
|
+
declare const ScrollArea: React$1.ForwardRefExoticComponent<ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
171
|
+
|
|
172
|
+
declare function Select$1({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Root>): React$1.JSX.Element;
|
|
173
|
+
declare function SelectValue({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Value>): React$1.JSX.Element;
|
|
174
|
+
declare function SelectTrigger({ className, size, children, value, resetValue, canReset, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
175
|
+
size?: "sm" | "default";
|
|
176
|
+
value?: string;
|
|
177
|
+
canReset?: boolean;
|
|
178
|
+
resetValue: () => void;
|
|
179
|
+
}): React$1.JSX.Element;
|
|
180
|
+
declare function SelectContent({ className, children, position, disableScrollButtonEvents, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Content> & {
|
|
181
|
+
disableScrollButtonEvents?: boolean;
|
|
182
|
+
}): React$1.JSX.Element;
|
|
183
|
+
declare function SelectLabel({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Label>): React$1.JSX.Element;
|
|
184
|
+
declare function SelectItem({ className, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Item>): React$1.JSX.Element;
|
|
185
|
+
declare function SelectSeparator({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Separator>): React$1.JSX.Element;
|
|
186
|
+
declare function SelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React$1.JSX.Element;
|
|
187
|
+
declare function SelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React$1.JSX.Element;
|
|
188
|
+
|
|
189
|
+
interface SelectOptionType {
|
|
190
|
+
label: string | ReactNode;
|
|
191
|
+
value: string;
|
|
192
|
+
disabled?: boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
interface SelectProps<T extends SelectOptionType = SelectOptionType> extends Omit<React.ComponentProps<typeof Select$1>, "onValueChange" | "value" | "defaultValue"> {
|
|
196
|
+
value: string;
|
|
197
|
+
onChange: (value: string) => void;
|
|
198
|
+
containerClass?: string;
|
|
199
|
+
options: Array<T>;
|
|
200
|
+
placeholder?: string;
|
|
201
|
+
triggerClassName?: string;
|
|
202
|
+
contentClassName?: string;
|
|
203
|
+
itemClassName?: string;
|
|
204
|
+
disabledItemClassName?: string;
|
|
205
|
+
label?: ReactNode | string;
|
|
206
|
+
labelClassName?: string;
|
|
207
|
+
disabled?: boolean;
|
|
208
|
+
className?: string;
|
|
209
|
+
hasError?: boolean;
|
|
210
|
+
canReset?: boolean;
|
|
211
|
+
disableScrollButtonEvents?: boolean;
|
|
212
|
+
onReset?: () => void;
|
|
213
|
+
}
|
|
214
|
+
declare function Select<T extends SelectOptionType = SelectOptionType>(props: SelectProps<T>): React$1.JSX.Element;
|
|
215
|
+
|
|
216
|
+
interface SelectGroupProps extends ComponentProps<typeof SelectPrimitive.Root> {
|
|
217
|
+
children: ReactNode;
|
|
218
|
+
className?: string;
|
|
219
|
+
label?: string;
|
|
220
|
+
labelClassName?: string;
|
|
221
|
+
}
|
|
222
|
+
declare function SelectGroup(props: SelectGroupProps): React$1.JSX.Element;
|
|
223
|
+
|
|
224
|
+
interface RadioOptionType<T extends string = string> {
|
|
225
|
+
label: string | ReactNode;
|
|
226
|
+
value: T;
|
|
227
|
+
disabled?: boolean;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
interface RadioProps<T extends string = string> {
|
|
231
|
+
name: string;
|
|
232
|
+
value: T;
|
|
233
|
+
label: ReactNode;
|
|
234
|
+
checked?: boolean;
|
|
235
|
+
onChange?: (value: T) => void;
|
|
236
|
+
disabled?: boolean;
|
|
237
|
+
checkColor?: string;
|
|
238
|
+
unCheckColor?: string;
|
|
239
|
+
labelClassName?: string;
|
|
240
|
+
indicatorClassName?: string;
|
|
241
|
+
wrapperClassName?: string;
|
|
242
|
+
}
|
|
243
|
+
declare function Radio<T extends string = string>(props: RadioProps<T>): React$1.JSX.Element;
|
|
244
|
+
interface RadioGroupProps<T extends string = string> {
|
|
245
|
+
name: string;
|
|
246
|
+
value: T;
|
|
247
|
+
onChange: (value: T) => void;
|
|
248
|
+
options: Array<RadioOptionType<T>>;
|
|
249
|
+
direction?: "horizontal" | "vertical";
|
|
250
|
+
disabled?: boolean;
|
|
251
|
+
checkColor?: string;
|
|
252
|
+
unCheckColor?: string;
|
|
253
|
+
containerClassName?: string;
|
|
254
|
+
labelClassName?: string;
|
|
255
|
+
indicatorClassName?: string;
|
|
256
|
+
wrapperClassName?: string;
|
|
257
|
+
}
|
|
258
|
+
declare function RadioGroup<T extends string = string>(props: RadioGroupProps<T>): React$1.JSX.Element;
|
|
259
|
+
|
|
260
|
+
type PopoverContentPrimitiveProps = React$1.ComponentProps<typeof PopoverPrimitive.Content>;
|
|
261
|
+
type PopoverAlign = NonNullable<PopoverContentPrimitiveProps["align"]>;
|
|
262
|
+
type PopoverPosition = NonNullable<PopoverContentPrimitiveProps["side"]>;
|
|
263
|
+
type PopoverContentProps = Omit<PopoverContentPrimitiveProps, "side"> & {
|
|
264
|
+
position?: PopoverPosition;
|
|
265
|
+
};
|
|
266
|
+
declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
267
|
+
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
268
|
+
declare const PopoverAnchor: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
269
|
+
declare function PopoverContent({ className, align, position, sideOffset, ...props }: PopoverContentProps): React$1.JSX.Element;
|
|
270
|
+
declare function PopoverHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
271
|
+
declare function PopoverTitle({ className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): React$1.JSX.Element;
|
|
272
|
+
declare function PopoverDescription({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): React$1.JSX.Element;
|
|
273
|
+
declare function PopoverFooter({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
274
|
+
declare function PopoverClose({ className, ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Close>): React$1.JSX.Element;
|
|
275
|
+
|
|
276
|
+
interface SimplePopoverProps {
|
|
277
|
+
trigger: ReactNode;
|
|
278
|
+
title?: string;
|
|
279
|
+
description?: string;
|
|
280
|
+
children?: ReactNode;
|
|
281
|
+
align?: "start" | "center" | "end";
|
|
282
|
+
position?: "top" | "right" | "bottom" | "left";
|
|
283
|
+
className?: string;
|
|
284
|
+
contentClassName?: string;
|
|
285
|
+
open?: boolean;
|
|
286
|
+
onOpenChange?: (open: boolean) => void;
|
|
287
|
+
}
|
|
288
|
+
declare function SimplePopover(props: SimplePopoverProps): React$1.JSX.Element;
|
|
289
|
+
|
|
290
|
+
type SpinnerSize = "sm" | "md" | "lg" | "xl";
|
|
291
|
+
type SpinnerColor = "blue" | "purple" | "green" | "red";
|
|
292
|
+
interface SpinnerProps {
|
|
293
|
+
className?: string;
|
|
294
|
+
size?: SpinnerSize;
|
|
295
|
+
color?: SpinnerColor;
|
|
296
|
+
ariaLabel?: string;
|
|
297
|
+
}
|
|
298
|
+
declare function Spinner(props: SpinnerProps): React$1.JSX.Element;
|
|
299
|
+
|
|
300
|
+
interface LoadingOverlayProps {
|
|
301
|
+
isVisible: boolean;
|
|
302
|
+
children: ReactNode;
|
|
303
|
+
fullScreen?: boolean;
|
|
304
|
+
blur?: boolean;
|
|
305
|
+
opacity?: number;
|
|
306
|
+
backdropColor?: "white" | "black";
|
|
307
|
+
zIndex?: number;
|
|
308
|
+
}
|
|
309
|
+
declare function LoadingOverlay(props: LoadingOverlayProps): React$1.JSX.Element | null;
|
|
310
|
+
|
|
311
|
+
type LoadingSize = SpinnerSize;
|
|
312
|
+
type LoadingColor = SpinnerColor;
|
|
313
|
+
type LoadingOverlayConfig = Omit<LoadingOverlayProps, "children">;
|
|
314
|
+
interface LoadingProps {
|
|
315
|
+
size?: LoadingSize;
|
|
316
|
+
color?: LoadingColor;
|
|
317
|
+
label?: string;
|
|
318
|
+
className?: string;
|
|
319
|
+
ariaLabel?: string;
|
|
320
|
+
overlayConfig?: LoadingOverlayConfig;
|
|
321
|
+
}
|
|
322
|
+
declare function Loading(props: LoadingProps): React$1.JSX.Element;
|
|
323
|
+
|
|
324
|
+
interface PaginationProps {
|
|
325
|
+
page: number;
|
|
326
|
+
totalPages: number;
|
|
327
|
+
onPageChange?: (page: number) => void;
|
|
328
|
+
showTotalCount?: boolean;
|
|
329
|
+
}
|
|
330
|
+
declare function Pagination(props: PaginationProps): React$1.JSX.Element | null;
|
|
331
|
+
|
|
332
|
+
type BreadCrumbItem = {
|
|
333
|
+
label: string;
|
|
334
|
+
to: string;
|
|
335
|
+
href?: never;
|
|
336
|
+
onClick?: () => void;
|
|
337
|
+
} | {
|
|
338
|
+
label: string;
|
|
339
|
+
href: string;
|
|
340
|
+
to?: never;
|
|
341
|
+
onClick?: () => void;
|
|
342
|
+
} | {
|
|
343
|
+
label: string;
|
|
344
|
+
onClick: () => void;
|
|
345
|
+
to?: never;
|
|
346
|
+
href?: never;
|
|
347
|
+
} | {
|
|
348
|
+
label: string;
|
|
349
|
+
to?: never;
|
|
350
|
+
href?: never;
|
|
351
|
+
onClick?: never;
|
|
352
|
+
};
|
|
353
|
+
interface BreadCrumbRoot {
|
|
354
|
+
displayName: string;
|
|
355
|
+
basePath: string;
|
|
356
|
+
pathPrefixes: readonly string[];
|
|
357
|
+
}
|
|
358
|
+
interface BreadCrumbMenuItem {
|
|
359
|
+
label: string;
|
|
360
|
+
path?: string;
|
|
361
|
+
children?: BreadCrumbMenuItem[];
|
|
362
|
+
}
|
|
363
|
+
interface BuildBreadCrumbItemsParams {
|
|
364
|
+
pathname: string;
|
|
365
|
+
title: string;
|
|
366
|
+
rootConfig?: Record<string, BreadCrumbRoot>;
|
|
367
|
+
/** 미지정 시 pathname으로 rootConfig에서 자동 매칭 */
|
|
368
|
+
rootKey?: string;
|
|
369
|
+
menuList?: BreadCrumbMenuItem[];
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
interface BreadCrumbProps<T extends BreadCrumbItem = BreadCrumbItem> {
|
|
373
|
+
items: Array<T>;
|
|
374
|
+
separator?: ReactNode;
|
|
375
|
+
className?: string;
|
|
376
|
+
listClassName?: string;
|
|
377
|
+
itemClassName?: string;
|
|
378
|
+
linkClassName?: string;
|
|
379
|
+
activeItemClassName?: string;
|
|
380
|
+
separatorClassName?: string;
|
|
381
|
+
}
|
|
382
|
+
declare function BreadCrumb<T extends BreadCrumbItem = BreadCrumbItem>(props: BreadCrumbProps<T>): React$1.JSX.Element | null;
|
|
383
|
+
|
|
384
|
+
declare function findParentMenuItem(pathname: string, menuList: BreadCrumbMenuItem[]): BreadCrumbMenuItem | undefined;
|
|
385
|
+
declare function findParentMenuName(pathname: string, menuList: BreadCrumbMenuItem[]): string | undefined;
|
|
386
|
+
declare function buildBreadCrumbItems({ pathname, title, rootConfig, rootKey, menuList, }: BuildBreadCrumbItemsParams): BreadCrumbItem[];
|
|
387
|
+
|
|
388
|
+
declare function useBreadCrumbItems(params: Omit<BuildBreadCrumbItemsParams, "pathname"> & {
|
|
389
|
+
pathname?: string;
|
|
390
|
+
}): BreadCrumbItem[];
|
|
391
|
+
|
|
392
|
+
declare function ToastProvider(): React$1.JSX.Element;
|
|
393
|
+
|
|
394
|
+
type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
395
|
+
type ToastType = "success" | "error" | "warning" | "info" | "loading";
|
|
396
|
+
interface ToastProps {
|
|
397
|
+
toast: string;
|
|
398
|
+
id?: string;
|
|
399
|
+
type?: ToastType;
|
|
400
|
+
position?: ToastPosition;
|
|
401
|
+
duration?: number;
|
|
402
|
+
showCloseButton?: boolean;
|
|
403
|
+
className?: string;
|
|
404
|
+
icon?: ReactNode;
|
|
405
|
+
onClose?: () => void;
|
|
406
|
+
onClick?: () => void;
|
|
407
|
+
}
|
|
408
|
+
interface ToastHookReturn {
|
|
409
|
+
showToast: (props: ToastProps) => string;
|
|
410
|
+
dismissToast: (toastId: string) => void;
|
|
411
|
+
dismissAllToast: () => void;
|
|
412
|
+
dismissAllExcept: (type: ToastType) => void;
|
|
413
|
+
}
|
|
414
|
+
declare const useToast: () => ToastHookReturn;
|
|
415
|
+
declare const toast: {
|
|
416
|
+
success: (toast: string, options?: Omit<ToastProps, "toast" | "type">) => string;
|
|
417
|
+
error: (toast: string, options?: Omit<ToastProps, "toast" | "type">) => string;
|
|
418
|
+
warning: (toast: string, options?: Omit<ToastProps, "toast" | "type">) => string;
|
|
419
|
+
info: (toast: string, options?: Omit<ToastProps, "toast" | "type">) => string;
|
|
420
|
+
loading: (toast: string, options?: Omit<ToastProps, "toast" | "type">) => string;
|
|
421
|
+
dismissToast: (toastId: string) => void;
|
|
422
|
+
dismissAllToast: () => void;
|
|
423
|
+
dismissAllExcept: (type: ToastType) => void;
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
interface CalendarYearRange {
|
|
427
|
+
minYear: string;
|
|
428
|
+
maxYear: string;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
type YmdDateString = string & {
|
|
432
|
+
readonly __brand: "YmdDateString";
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
type DatePickerBaseProps = {
|
|
436
|
+
className?: string;
|
|
437
|
+
editDateSelect?: boolean;
|
|
438
|
+
onKeyDownEnter?: () => void;
|
|
439
|
+
datePosition?: "top" | "bottom";
|
|
440
|
+
disabled?: boolean;
|
|
441
|
+
maxDate?: YmdDateString;
|
|
442
|
+
calendarYearRange?: CalendarYearRange;
|
|
443
|
+
showTodayButton?: boolean;
|
|
444
|
+
};
|
|
445
|
+
type DatePickerSingleMode = DatePickerBaseProps & {
|
|
446
|
+
isRange?: false;
|
|
447
|
+
value?: string;
|
|
448
|
+
onChange?: (date: string) => void;
|
|
449
|
+
placeholder?: string;
|
|
450
|
+
validation?: boolean;
|
|
451
|
+
onBlur?: (value: string) => void;
|
|
452
|
+
};
|
|
453
|
+
type DatePickerRangeMode = DatePickerBaseProps & {
|
|
454
|
+
isRange: true;
|
|
455
|
+
startValue?: string;
|
|
456
|
+
endValue?: string;
|
|
457
|
+
onRangeChange?: (startDate: string, endDate: string) => void;
|
|
458
|
+
};
|
|
459
|
+
type CalendarInputProps = DatePickerSingleMode | DatePickerRangeMode;
|
|
460
|
+
declare function DatePicker(props: CalendarInputProps): React$1.JSX.Element;
|
|
461
|
+
|
|
462
|
+
interface SearchBarProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onSearch"> {
|
|
463
|
+
ref?: Ref<HTMLInputElement>;
|
|
464
|
+
placeholder?: string;
|
|
465
|
+
onSearch?: (value: string) => void;
|
|
466
|
+
className?: string;
|
|
467
|
+
value?: string;
|
|
468
|
+
defaultValue?: string;
|
|
469
|
+
}
|
|
470
|
+
declare function SearchBar(props: SearchBarProps): React$1.JSX.Element;
|
|
471
|
+
|
|
472
|
+
interface DebouncedButtonProps extends ButtonProps {
|
|
473
|
+
debounceDelay?: number;
|
|
474
|
+
}
|
|
475
|
+
declare function DebouncedButton(props: DebouncedButtonProps): React$1.JSX.Element;
|
|
476
|
+
|
|
477
|
+
interface TabItem {
|
|
478
|
+
label: string;
|
|
479
|
+
value: string;
|
|
480
|
+
disabled?: boolean;
|
|
481
|
+
content?: ReactNode;
|
|
482
|
+
icon?: ReactNode;
|
|
483
|
+
children?: TabItem[];
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
interface TabProps {
|
|
487
|
+
tabs: TabItem[];
|
|
488
|
+
activeTab: string;
|
|
489
|
+
onChange: (value: string) => void;
|
|
490
|
+
direction?: "row" | "col";
|
|
491
|
+
className?: string;
|
|
492
|
+
tabListClassName?: string;
|
|
493
|
+
tabClassName?: string;
|
|
494
|
+
childTabListClassName?: string;
|
|
495
|
+
childTabClassName?: string;
|
|
496
|
+
contentClassName?: string;
|
|
497
|
+
showContent?: boolean;
|
|
498
|
+
showIndicator?: boolean;
|
|
499
|
+
indicatorClassName?: string;
|
|
500
|
+
children?: ReactNode;
|
|
501
|
+
}
|
|
502
|
+
declare function Tab(props: TabProps): React$1.JSX.Element;
|
|
503
|
+
|
|
504
|
+
declare const emptyIconVariants: (props?: ({
|
|
505
|
+
iconVariant?: "plain" | "boxed" | null | undefined;
|
|
506
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
507
|
+
type EmptyIconVariant = NonNullable<VariantProps<typeof emptyIconVariants>["iconVariant"]>;
|
|
508
|
+
|
|
509
|
+
type EmptyProps = Omit<ComponentProps<"div">, "title"> & {
|
|
510
|
+
defaultUI?: boolean;
|
|
511
|
+
icon?: ReactNode;
|
|
512
|
+
iconVariant?: EmptyIconVariant;
|
|
513
|
+
title?: ReactNode;
|
|
514
|
+
description?: ReactNode;
|
|
515
|
+
action?: ReactNode;
|
|
516
|
+
titleClassName?: string;
|
|
517
|
+
descriptionClassName?: string;
|
|
518
|
+
iconClassName?: string;
|
|
519
|
+
actionClassName?: string;
|
|
520
|
+
fullScreen?: boolean;
|
|
521
|
+
};
|
|
522
|
+
declare function Empty(props: EmptyProps): React$1.JSX.Element;
|
|
523
|
+
|
|
524
|
+
interface ModalBodyProps {
|
|
525
|
+
ref?: Ref<HTMLDivElement>;
|
|
526
|
+
children: ReactNode;
|
|
527
|
+
className?: string;
|
|
528
|
+
}
|
|
529
|
+
declare function ModalBody(props: ModalBodyProps): React$1.JSX.Element;
|
|
530
|
+
|
|
531
|
+
interface ModalContentProps {
|
|
532
|
+
ref?: Ref<HTMLDivElement>;
|
|
533
|
+
children: ReactNode;
|
|
534
|
+
className?: string;
|
|
535
|
+
zIndex?: number;
|
|
536
|
+
}
|
|
537
|
+
declare function ModalContent(props: ModalContentProps): React$1.JSX.Element;
|
|
538
|
+
|
|
539
|
+
interface ModalFooterProps {
|
|
540
|
+
ref?: Ref<HTMLDivElement>;
|
|
541
|
+
children: ReactNode;
|
|
542
|
+
className?: string;
|
|
543
|
+
}
|
|
544
|
+
declare function ModalFooter(props: ModalFooterProps): React$1.JSX.Element;
|
|
545
|
+
|
|
546
|
+
interface ModalHeaderProps {
|
|
547
|
+
ref?: Ref<HTMLDivElement>;
|
|
548
|
+
children: ReactNode;
|
|
549
|
+
className?: string;
|
|
550
|
+
}
|
|
551
|
+
declare function ModalHeader(props: ModalHeaderProps): React$1.JSX.Element;
|
|
552
|
+
|
|
553
|
+
type ModalType = "detail" | "create" | "edit" | "search" | "info" | "delete" | "warning";
|
|
554
|
+
interface ModalIconHeaderProps {
|
|
555
|
+
type: ModalType;
|
|
556
|
+
title: string;
|
|
557
|
+
description?: string;
|
|
558
|
+
onClose: () => void;
|
|
559
|
+
className?: string;
|
|
560
|
+
}
|
|
561
|
+
declare function ModalIconHeader(props: ModalIconHeaderProps): React$1.JSX.Element;
|
|
562
|
+
|
|
563
|
+
interface ModalOverlayProps {
|
|
564
|
+
isOpen: boolean;
|
|
565
|
+
onClose?: () => void;
|
|
566
|
+
className?: string;
|
|
567
|
+
closeOnOverlayClick?: boolean;
|
|
568
|
+
zIndex?: number;
|
|
569
|
+
}
|
|
570
|
+
declare function ModalOverlay(props: ModalOverlayProps): React$1.JSX.Element | null;
|
|
571
|
+
|
|
572
|
+
interface ModalProps {
|
|
573
|
+
isOpen: boolean;
|
|
574
|
+
onClose?: () => void;
|
|
575
|
+
children: ReactNode;
|
|
576
|
+
overlayClassName?: string;
|
|
577
|
+
contentClassName?: string;
|
|
578
|
+
closeOnOverlayClick?: boolean;
|
|
579
|
+
closeOnEscape?: boolean;
|
|
580
|
+
}
|
|
581
|
+
declare function Modal(props: ModalProps): React$1.JSX.Element | null;
|
|
582
|
+
|
|
583
|
+
interface ConfirmOptions<T = void> {
|
|
584
|
+
content: string;
|
|
585
|
+
title?: string;
|
|
586
|
+
okText?: string;
|
|
587
|
+
cancelText?: string;
|
|
588
|
+
subContent?: string;
|
|
589
|
+
variant?: "danger" | "warning" | "info" | "success";
|
|
590
|
+
data?: T;
|
|
591
|
+
onOk?: (data?: T) => void | Promise<void>;
|
|
592
|
+
onCancel?: () => void | Promise<void>;
|
|
593
|
+
isHideOkButton?: boolean;
|
|
594
|
+
isHideCancelButton?: boolean;
|
|
595
|
+
className?: string;
|
|
596
|
+
}
|
|
597
|
+
declare function confirmModal<T = void>(options: ConfirmOptions<T>): Promise<T | undefined>;
|
|
598
|
+
|
|
599
|
+
interface TableFooterProps {
|
|
600
|
+
paginationInfo?: PaginationProps;
|
|
601
|
+
renderLeft?: ReactNode;
|
|
602
|
+
renderRight?: ReactNode;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
type SortOrder = "asc" | "desc";
|
|
606
|
+
|
|
607
|
+
type TableFixed = "left" | "right";
|
|
608
|
+
interface SortOption {
|
|
609
|
+
sortKey: string;
|
|
610
|
+
sortOrder: SortOrder;
|
|
611
|
+
visibleType?: "always" | "hovered";
|
|
612
|
+
}
|
|
613
|
+
interface Column<T> {
|
|
614
|
+
key: string;
|
|
615
|
+
mainTitle?: string;
|
|
616
|
+
mainTitleRowSpan?: number;
|
|
617
|
+
subTitle?: string;
|
|
618
|
+
title: string | ReactNode;
|
|
619
|
+
render?: (value: unknown, record: T, index: number) => ReactNode;
|
|
620
|
+
width?: string | number;
|
|
621
|
+
minWidth?: string | number;
|
|
622
|
+
maxWidth?: string | number;
|
|
623
|
+
align?: "left" | "center" | "right";
|
|
624
|
+
sortable?: boolean;
|
|
625
|
+
sort?: "asc" | "desc" | null;
|
|
626
|
+
fixed?: TableFixed;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
interface CheckboxInfo {
|
|
630
|
+
selectedKeys: Array<string | number>;
|
|
631
|
+
onSelectionChange: (keys: Array<string | number>) => void;
|
|
632
|
+
fixed?: boolean;
|
|
633
|
+
}
|
|
634
|
+
type DragEndResult = {
|
|
635
|
+
type: "row" | "column";
|
|
636
|
+
order: Array<string>;
|
|
637
|
+
movedKey: string;
|
|
638
|
+
targetKey: string;
|
|
639
|
+
};
|
|
640
|
+
interface TableProps<T> {
|
|
641
|
+
columns: Array<Column<T>>;
|
|
642
|
+
data: Array<T>;
|
|
643
|
+
isLoading?: boolean;
|
|
644
|
+
onRowClick?: (record: T, index: number) => void;
|
|
645
|
+
rowKey?: keyof T | ((record: T, index: number) => string | number);
|
|
646
|
+
sortOption?: SortOption;
|
|
647
|
+
onSortChange?: (sortKey: string, sortOrder: SortOrder) => void;
|
|
648
|
+
paginationInfo?: PaginationProps;
|
|
649
|
+
checkboxInfo?: CheckboxInfo;
|
|
650
|
+
renderFooter?: Pick<TableFooterProps, "renderLeft" | "renderRight">;
|
|
651
|
+
rowDraggable?: boolean;
|
|
652
|
+
columnDraggable?: boolean;
|
|
653
|
+
onRowDragEnd?: (result: DragEndResult) => void;
|
|
654
|
+
onColumnDragEnd?: (result: DragEndResult) => void;
|
|
655
|
+
tooltipConfig?: "always" | "overflow" | false;
|
|
656
|
+
isDynamicHeight?: boolean;
|
|
657
|
+
}
|
|
658
|
+
declare function Table<T>(props: TableProps<T>): React$1.JSX.Element;
|
|
659
|
+
|
|
660
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
661
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
662
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
663
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
664
|
+
type CarouselProps$1 = {
|
|
665
|
+
opts?: CarouselOptions;
|
|
666
|
+
plugins?: CarouselPlugin;
|
|
667
|
+
orientation?: "horizontal" | "vertical";
|
|
668
|
+
setApi?: (api: CarouselApi) => void;
|
|
669
|
+
};
|
|
670
|
+
declare function Carousel$1({ orientation, opts, setApi, plugins, className, children, ...props }: React$1.ComponentProps<"div"> & CarouselProps$1): React$1.JSX.Element;
|
|
671
|
+
|
|
672
|
+
interface CarouselRef {
|
|
673
|
+
/** 현재 선택된 슬라이드 인덱스 */
|
|
674
|
+
currentIndex: number;
|
|
675
|
+
/** Embla Carousel API 인스턴스 */
|
|
676
|
+
api: CarouselApi | undefined;
|
|
677
|
+
/** 특정 인덱스로 이동 */
|
|
678
|
+
scrollTo: (index: number) => void;
|
|
679
|
+
/** 이전 슬라이드로 이동 */
|
|
680
|
+
scrollPrev: () => void;
|
|
681
|
+
/** 다음 슬라이드로 이동 */
|
|
682
|
+
scrollNext: () => void;
|
|
683
|
+
/** 이전 슬라이드로 이동 가능한지 여부 */
|
|
684
|
+
canScrollPrev: boolean;
|
|
685
|
+
/** 다음 슬라이드로 이동 가능한지 여부 */
|
|
686
|
+
canScrollNext: boolean;
|
|
687
|
+
}
|
|
688
|
+
interface CarouselProps {
|
|
689
|
+
/** 캐러셀에 표시할 아이템들 */
|
|
690
|
+
children: React__default.ReactNode;
|
|
691
|
+
/** 화살표 버튼 표시 여부 (기본: true) */
|
|
692
|
+
showArrows?: boolean;
|
|
693
|
+
/** 인디케이터(도트) 표시 여부 (기본: false) */
|
|
694
|
+
showDots?: boolean;
|
|
695
|
+
/** 자동 재생 여부 (기본: false) 3000ms 마다 자동 재생 */
|
|
696
|
+
autoPlay?: boolean;
|
|
697
|
+
/** 자동 재생 간격 (ms, 기본: 3000) */
|
|
698
|
+
autoPlayInterval?: number;
|
|
699
|
+
/** 무한 루프 여부 (기본: false) */
|
|
700
|
+
loop?: boolean;
|
|
701
|
+
/** 아이템 간격 (px, 기본: 16) */
|
|
702
|
+
spacing?: number;
|
|
703
|
+
/** 화살표 버튼 위치 (기본: "outside") */
|
|
704
|
+
arrowsPosition?: "inside" | "outside";
|
|
705
|
+
/** 커스텀 이전 버튼 (제공하지 않으면 기본 버튼 사용) */
|
|
706
|
+
previousButton?: React__default.ReactNode;
|
|
707
|
+
/** 커스텀 다음 버튼 (제공하지 않으면 기본 버튼 사용) */
|
|
708
|
+
nextButton?: React__default.ReactNode;
|
|
709
|
+
/** 슬라이드 변경 시 호출되는 콜백 */
|
|
710
|
+
onSlideChange?: (index: number) => void;
|
|
711
|
+
/** 초기 슬라이드 인덱스 (기본: 0) */
|
|
712
|
+
initialSlide?: number;
|
|
713
|
+
/** 컨테이너 커스텀 클래스 */
|
|
714
|
+
containerClassName?: string;
|
|
715
|
+
/** 컨텐츠 영역 커스텀 클래스 */
|
|
716
|
+
contentClassName?: string;
|
|
717
|
+
/** 아이템 커스텀 클래스 */
|
|
718
|
+
itemClassName?: string;
|
|
719
|
+
/** 인디케이터 커스텀 클래스 */
|
|
720
|
+
dotsClassName?: string;
|
|
721
|
+
/** 인디케이터 활성화 상태 커스텀 클래스 */
|
|
722
|
+
dotActiveClassName?: string;
|
|
723
|
+
/** Embla 캐러셀 옵션 */
|
|
724
|
+
carouselOptions?: Parameters<typeof Carousel$1>[0]["opts"];
|
|
725
|
+
/** Embla 캐러셀 플러그인 */
|
|
726
|
+
plugins?: Parameters<typeof Carousel$1>[0]["plugins"];
|
|
727
|
+
}
|
|
728
|
+
declare const Carousel: React__default.ForwardRefExoticComponent<CarouselProps & React__default.RefAttributes<CarouselRef>>;
|
|
729
|
+
|
|
730
|
+
interface FilePreviewViewerFeatures {
|
|
731
|
+
zoom?: boolean;
|
|
732
|
+
rotate?: boolean;
|
|
733
|
+
download?: boolean;
|
|
734
|
+
navigation?: boolean;
|
|
735
|
+
}
|
|
736
|
+
type PreviewFileType = "image" | "pdf" | "unsupported";
|
|
737
|
+
|
|
738
|
+
interface FilePreviewViewerProps<T extends string = string> {
|
|
739
|
+
isOpen: boolean;
|
|
740
|
+
onClose: () => void;
|
|
741
|
+
files: T | Array<T>;
|
|
742
|
+
/** 각 파일의 타입을 명시적으로 지정합니다. blob URL처럼 URL에서 타입을 추론할 수 없을 때 사용합니다. */
|
|
743
|
+
fileTypes?: Array<PreviewFileType>;
|
|
744
|
+
/** 각 파일의 원본 파일명을 지정합니다. blob URL처럼 URL에서 파일명을 추출할 수 없을 때 사용합니다. */
|
|
745
|
+
fileNames?: Array<string>;
|
|
746
|
+
initialIndex?: number;
|
|
747
|
+
features?: Partial<FilePreviewViewerFeatures>;
|
|
748
|
+
}
|
|
749
|
+
declare function FilePreviewViewer<T extends string = string>(props: FilePreviewViewerProps<T>): React$1.JSX.Element | null;
|
|
750
|
+
|
|
751
|
+
interface TableCellRenderContext {
|
|
752
|
+
value: unknown;
|
|
753
|
+
rowIndex: number;
|
|
754
|
+
rowId: string;
|
|
755
|
+
fieldKey: string;
|
|
756
|
+
onChange: (value: string) => void;
|
|
757
|
+
onBlur: () => void;
|
|
758
|
+
onDelete: () => void;
|
|
759
|
+
isFirstRow: boolean;
|
|
760
|
+
disabled?: boolean;
|
|
761
|
+
hasError?: boolean;
|
|
762
|
+
errorClassName?: string;
|
|
763
|
+
/** submit 후 셀 하단에 표시할 메시지 (FormTable이 렌더; 커스텀 render에서도 사용 가능) */
|
|
764
|
+
errorMessage?: string;
|
|
765
|
+
}
|
|
766
|
+
interface SubmitTableColumn {
|
|
767
|
+
key: string;
|
|
768
|
+
title: ReactNode;
|
|
769
|
+
className?: string;
|
|
770
|
+
rowClassName?: string;
|
|
771
|
+
required?: boolean;
|
|
772
|
+
/** Plus 헤더 클릭 → 행 추가, Trash 셀 → 행 삭제 */
|
|
773
|
+
type?: "add";
|
|
774
|
+
cellType?: "text" | "number";
|
|
775
|
+
align?: "left" | "center" | "right";
|
|
776
|
+
maxLength?: number;
|
|
777
|
+
placeholder?: string;
|
|
778
|
+
render?: (ctx: TableCellRenderContext) => ReactNode;
|
|
779
|
+
}
|
|
780
|
+
interface FormTableProps<TFieldValues extends FieldValues = FieldValues> {
|
|
781
|
+
/** React Hook Form 배열 필드 경로 */
|
|
782
|
+
name?: Path<TFieldValues>;
|
|
783
|
+
/** gg-livestock formKey (name과 동일) */
|
|
784
|
+
formKey?: Path<TFieldValues>;
|
|
785
|
+
label: string;
|
|
786
|
+
columns?: SubmitTableColumn[];
|
|
787
|
+
/** gg-livestock column */
|
|
788
|
+
column?: SubmitTableColumn[];
|
|
789
|
+
colspan?: number;
|
|
790
|
+
isLabel?: boolean;
|
|
791
|
+
/** 첫 행 수정 시 모든 행에 동일 값 반영 (수정란 분류 등) */
|
|
792
|
+
firstRowAppliesAll?: boolean;
|
|
793
|
+
containerClassName?: string;
|
|
794
|
+
minRows?: number;
|
|
795
|
+
/** 첫 행 삭제 불가 (약품 수불 기본 행) */
|
|
796
|
+
protectFirstRow?: boolean;
|
|
797
|
+
createEmptyRow: () => Record<string, unknown>;
|
|
798
|
+
disabled?: boolean;
|
|
799
|
+
}
|
|
800
|
+
type FormFieldType = "input" | "email" | "password" | "number" | "money" | "phone" | "textarea" | "select" | "radio" | "checkbox" | "date" | "date-range" | "switch" | "file" | "address" | "input-with-button" | "cascading-select" | "select-with-input";
|
|
801
|
+
interface SelectOption$1 {
|
|
802
|
+
label: string;
|
|
803
|
+
value: string | number;
|
|
804
|
+
}
|
|
805
|
+
interface SubmitFormSelectClassNames {
|
|
806
|
+
containerClassName?: string;
|
|
807
|
+
triggerClassName?: string;
|
|
808
|
+
}
|
|
809
|
+
type SubmitFormSelectClassNameProp = string | SubmitFormSelectClassNames;
|
|
810
|
+
interface AddressFieldClassNames {
|
|
811
|
+
controlClassName?: string;
|
|
812
|
+
inputClassName?: string;
|
|
813
|
+
buttonClassName?: string;
|
|
814
|
+
}
|
|
815
|
+
interface CascadingSelectFieldClassNames {
|
|
816
|
+
controlClassName?: string;
|
|
817
|
+
firstClassName?: SubmitFormSelectClassNameProp;
|
|
818
|
+
secondClassName?: SubmitFormSelectClassNameProp;
|
|
819
|
+
}
|
|
820
|
+
interface SelectWithInputFieldClassNames {
|
|
821
|
+
controlClassName?: string;
|
|
822
|
+
selectClassName?: SubmitFormSelectClassNameProp;
|
|
823
|
+
inputClassName?: string;
|
|
824
|
+
}
|
|
825
|
+
interface CascadingSelectFieldConfig {
|
|
826
|
+
primaryOptions: SelectOption$1[];
|
|
827
|
+
getSecondaryOptions: (primaryValue: string) => SelectOption$1[];
|
|
828
|
+
primaryPlaceholder?: string;
|
|
829
|
+
secondaryPlaceholder?: string;
|
|
830
|
+
separator?: string;
|
|
831
|
+
}
|
|
832
|
+
interface SelectWithInputFieldConfig {
|
|
833
|
+
inputMode?: "number" | "text";
|
|
834
|
+
}
|
|
835
|
+
interface InputWithButtonFieldConfig {
|
|
836
|
+
buttonLabel?: string;
|
|
837
|
+
}
|
|
838
|
+
interface FormFieldConfig<TFieldValues extends FieldValues = FieldValues> {
|
|
839
|
+
name: Path<TFieldValues>;
|
|
840
|
+
label: string;
|
|
841
|
+
type?: FormFieldType;
|
|
842
|
+
placeholder?: string;
|
|
843
|
+
required?: boolean;
|
|
844
|
+
disabled?: boolean;
|
|
845
|
+
readOnly?: boolean;
|
|
846
|
+
maxLength?: number;
|
|
847
|
+
options?: SelectOption$1[];
|
|
848
|
+
className?: string;
|
|
849
|
+
allowDecimal?: boolean;
|
|
850
|
+
canReset?: boolean;
|
|
851
|
+
datePosition?: "top" | "bottom";
|
|
852
|
+
disableFutureDates?: boolean;
|
|
853
|
+
/**
|
|
854
|
+
* 이 필드 값이 바뀌거나 blur될 때 함께 재검증할 필드 경로.
|
|
855
|
+
* 비밀번호 확인·시작/종료일 등 객체 superRefine 연동에 사용.
|
|
856
|
+
*/
|
|
857
|
+
revalidateFields?: Path<TFieldValues>[];
|
|
858
|
+
renderCustomField?: (props: CustomFieldRenderProps<TFieldValues>) => ReactNode;
|
|
859
|
+
colspan?: number;
|
|
860
|
+
checkboxLabel?: string;
|
|
861
|
+
contentAlign?: "left" | "center" | "right";
|
|
862
|
+
addressDetailKey?: Path<TFieldValues>;
|
|
863
|
+
addressClassNames?: AddressFieldClassNames;
|
|
864
|
+
cascadingSelect?: CascadingSelectFieldConfig;
|
|
865
|
+
cascadingSelectClassNames?: CascadingSelectFieldClassNames;
|
|
866
|
+
selectWithInput?: SelectWithInputFieldConfig;
|
|
867
|
+
selectWithInputClassNames?: SelectWithInputFieldClassNames;
|
|
868
|
+
inputWithButton?: InputWithButtonFieldConfig;
|
|
869
|
+
onClickInputWithButton?: () => void;
|
|
870
|
+
}
|
|
871
|
+
interface CustomFieldRenderProps<TFieldValues extends FieldValues = FieldValues> {
|
|
872
|
+
field: ControllerRenderProps<TFieldValues, Path<TFieldValues>>;
|
|
873
|
+
fieldState: ControllerFieldState;
|
|
874
|
+
}
|
|
875
|
+
interface SubmitFormProps<TSchema extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
876
|
+
schema: TSchema;
|
|
877
|
+
formId: string;
|
|
878
|
+
defaultValues?: z.input<TSchema>;
|
|
879
|
+
onSubmit: (data: z.infer<TSchema>) => void | Promise<void>;
|
|
880
|
+
children: ReactNode;
|
|
881
|
+
className?: string;
|
|
882
|
+
formClassName?: string;
|
|
883
|
+
gridClassName?: string;
|
|
884
|
+
/**
|
|
885
|
+
* React Hook Form validation mode. 기본 `onSubmit` — blur 시 자동 zod 검증 없음.
|
|
886
|
+
* blur 검증은 FormField가 `trigger`로 수동 실행.
|
|
887
|
+
*/
|
|
888
|
+
mode?: "onBlur" | "onChange" | "onSubmit" | "onTouched" | "all";
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
declare function FormTable<TFieldValues extends FieldValues = FieldValues>(props: FormTableProps<TFieldValues>): React$1.JSX.Element;
|
|
892
|
+
|
|
893
|
+
type SubmitFormRowProps<TFieldValues extends FieldValues = FieldValues> = Omit<FormFieldConfig<TFieldValues>, "name" | "type"> & {
|
|
894
|
+
formKey: Path<TFieldValues>;
|
|
895
|
+
name?: Path<TFieldValues>;
|
|
896
|
+
formType?: FormFieldType;
|
|
897
|
+
type?: FormFieldType;
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
declare function SubmitFormRow<TFieldValues extends FieldValues = FieldValues>(props: SubmitFormRowProps<TFieldValues>): React$1.JSX.Element;
|
|
901
|
+
|
|
902
|
+
declare function SubmitFormRoot<TSchema extends z.ZodTypeAny = z.ZodTypeAny>(props: SubmitFormProps<TSchema>): React$1.JSX.Element;
|
|
903
|
+
declare const SubmitForm: typeof SubmitFormRoot & {
|
|
904
|
+
Row: typeof SubmitFormRow;
|
|
905
|
+
Table: typeof FormTable;
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
type SelectableOption = {
|
|
909
|
+
label: string;
|
|
910
|
+
value: string;
|
|
911
|
+
};
|
|
912
|
+
interface BaseOption<P> {
|
|
913
|
+
label?: string;
|
|
914
|
+
key: keyof P;
|
|
915
|
+
}
|
|
916
|
+
type InputOption<P> = BaseOption<P> & {
|
|
917
|
+
type: "input";
|
|
918
|
+
placeholder?: string;
|
|
919
|
+
};
|
|
920
|
+
type SelectOption<P> = BaseOption<P> & {
|
|
921
|
+
type: "select";
|
|
922
|
+
options: Array<SelectableOption>;
|
|
923
|
+
placeholder?: string;
|
|
924
|
+
};
|
|
925
|
+
type RadioOption<P> = BaseOption<P> & {
|
|
926
|
+
type: "radio";
|
|
927
|
+
options: Array<SelectableOption>;
|
|
928
|
+
};
|
|
929
|
+
type DateOption<P> = BaseOption<P> & {
|
|
930
|
+
type: "date";
|
|
931
|
+
placeholder?: string;
|
|
932
|
+
};
|
|
933
|
+
type DateRangeOption<P> = BaseOption<P> & {
|
|
934
|
+
type: "date-range";
|
|
935
|
+
endKey: keyof P;
|
|
936
|
+
};
|
|
937
|
+
type CheckboxOption<P> = BaseOption<P> & {
|
|
938
|
+
type: "checkbox";
|
|
939
|
+
options: Array<SelectableOption>;
|
|
940
|
+
};
|
|
941
|
+
type FilterOption<P> = InputOption<P> | SelectOption<P> | RadioOption<P> | DateOption<P> | DateRangeOption<P> | CheckboxOption<P>;
|
|
942
|
+
interface FilterRow<P> {
|
|
943
|
+
options: Array<FilterOption<P>>;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
interface PageFilterProps<P> {
|
|
947
|
+
rows: Array<FilterRow<P>>;
|
|
948
|
+
onChange: (updates: Partial<P>) => void;
|
|
949
|
+
onSubmit: () => void;
|
|
950
|
+
onReset?: () => void;
|
|
951
|
+
containerClassName?: string;
|
|
952
|
+
rowGap?: number;
|
|
953
|
+
colGap?: number;
|
|
954
|
+
submitButtonText?: string;
|
|
955
|
+
resetButtonText?: string;
|
|
956
|
+
values: P;
|
|
957
|
+
}
|
|
958
|
+
declare function PageFilter<P extends Record<keyof P, string>>(props: PageFilterProps<P>): React$1.JSX.Element;
|
|
959
|
+
|
|
960
|
+
type MultiTab = {
|
|
961
|
+
id: string;
|
|
962
|
+
basePath: string;
|
|
963
|
+
label: string;
|
|
964
|
+
currentPath: string;
|
|
965
|
+
};
|
|
966
|
+
interface MultiTabStore {
|
|
967
|
+
tabs: MultiTab[];
|
|
968
|
+
activeTabId: string | null;
|
|
969
|
+
hasHydrated: boolean;
|
|
970
|
+
/**
|
|
971
|
+
* 탭 열기 (메뉴 클릭용)
|
|
972
|
+
* - 동일 basePath 탭이 있으면 활성화 후 currentPath 반환
|
|
973
|
+
* - 없으면 새 탭 생성 후 null 반환
|
|
974
|
+
*/
|
|
975
|
+
openTab: (basePath: string, label: string, initialPath?: string) => string | null;
|
|
976
|
+
/**
|
|
977
|
+
* 탭 강제 추가 ([+] 버튼용)
|
|
978
|
+
* - 동일 basePath가 있어도 항상 새 탭 생성
|
|
979
|
+
*/
|
|
980
|
+
addTab: (basePath: string, label: string, currentPath: string) => string;
|
|
981
|
+
/**
|
|
982
|
+
* 탭 전환
|
|
983
|
+
* - 이전 탭의 currentPath를 fromPath로 갱신 후 대상 탭 활성화
|
|
984
|
+
* - 전환할 탭의 currentPath 반환
|
|
985
|
+
*/
|
|
986
|
+
switchToTab: (toId: string, fromPath: string) => string;
|
|
987
|
+
closeTab: (id: string) => string | null;
|
|
988
|
+
updateCurrentPath: (id: string, path: string) => void;
|
|
989
|
+
setActiveTabId: (id: string) => void;
|
|
990
|
+
setHasHydrated: (v: boolean) => void;
|
|
991
|
+
}
|
|
992
|
+
declare const useMultiTabStore: zustand.UseBoundStore<Omit<zustand.StoreApi<MultiTabStore>, "persist"> & {
|
|
993
|
+
persist: {
|
|
994
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<MultiTabStore, unknown>>) => void;
|
|
995
|
+
clearStorage: () => void;
|
|
996
|
+
rehydrate: () => Promise<void> | void;
|
|
997
|
+
hasHydrated: () => boolean;
|
|
998
|
+
onHydrate: (fn: (state: MultiTabStore) => void) => () => void;
|
|
999
|
+
onFinishHydration: (fn: (state: MultiTabStore) => void) => () => void;
|
|
1000
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<MultiTabStore, unknown>>;
|
|
1001
|
+
};
|
|
1002
|
+
}>;
|
|
1003
|
+
|
|
1004
|
+
interface MultiTabBarProps {
|
|
1005
|
+
tabs: Array<MultiTab>;
|
|
1006
|
+
activeTabId: string | null;
|
|
1007
|
+
onTabClick: (tabId: string) => void;
|
|
1008
|
+
onTabClose: (tabId: string) => void;
|
|
1009
|
+
onTabAdd?: () => void;
|
|
1010
|
+
}
|
|
1011
|
+
declare function MultiTabBar(props: MultiTabBarProps): React$1.JSX.Element | null;
|
|
1012
|
+
|
|
1013
|
+
type SearchAddressProps = {
|
|
1014
|
+
ref?: Ref<HTMLButtonElement>;
|
|
1015
|
+
handleComplete: (data: Address) => void;
|
|
1016
|
+
disabled?: boolean;
|
|
1017
|
+
label?: string;
|
|
1018
|
+
buttonClassName?: string;
|
|
1019
|
+
};
|
|
1020
|
+
declare function SearchAddress(props: SearchAddressProps): React$1.JSX.Element;
|
|
1021
|
+
|
|
1022
|
+
interface ScrollBarProps {
|
|
1023
|
+
direction: "horizontal" | "vertical";
|
|
1024
|
+
scrollRef: RefObject<HTMLDivElement | null>;
|
|
1025
|
+
}
|
|
1026
|
+
declare function ScrollBar(props: ScrollBarProps): React$1.JSX.Element | null;
|
|
1027
|
+
|
|
1028
|
+
interface ToggleSwitchProps {
|
|
1029
|
+
isOn: boolean;
|
|
1030
|
+
toggleSwitch: () => void;
|
|
1031
|
+
offText?: string;
|
|
1032
|
+
onText?: string;
|
|
1033
|
+
width?: string;
|
|
1034
|
+
height?: string;
|
|
1035
|
+
circleSize?: string;
|
|
1036
|
+
onColor?: {
|
|
1037
|
+
from: string;
|
|
1038
|
+
to: string;
|
|
1039
|
+
};
|
|
1040
|
+
offColor?: {
|
|
1041
|
+
from: string;
|
|
1042
|
+
to: string;
|
|
1043
|
+
};
|
|
1044
|
+
textPosition?: {
|
|
1045
|
+
on: string;
|
|
1046
|
+
off: string;
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
declare function ToggleSwitch(props: ToggleSwitchProps): React$1.JSX.Element;
|
|
1050
|
+
|
|
1051
|
+
interface ExcelUploaderProps {
|
|
1052
|
+
files: Array<File>;
|
|
1053
|
+
onChange: (files: Array<File>) => void;
|
|
1054
|
+
disabled?: boolean;
|
|
1055
|
+
className?: string;
|
|
1056
|
+
}
|
|
1057
|
+
declare function ExcelUploader(props: ExcelUploaderProps): React$1.JSX.Element;
|
|
1058
|
+
|
|
1059
|
+
interface FileUploaderProps {
|
|
1060
|
+
files: Array<File>;
|
|
1061
|
+
onChange: (files: Array<File>) => void;
|
|
1062
|
+
multiple?: boolean;
|
|
1063
|
+
disabled?: boolean;
|
|
1064
|
+
className?: string;
|
|
1065
|
+
}
|
|
1066
|
+
declare function FileUploader(props: FileUploaderProps): React$1.JSX.Element;
|
|
1067
|
+
|
|
1068
|
+
type DetailMode = "read" | "edit";
|
|
1069
|
+
type DetailFieldType = "text" | "badge" | "tag" | "link" | "image" | "date" | "number" | "boolean";
|
|
1070
|
+
type BadgeTone = "success" | "warning" | "error" | "info" | "default";
|
|
1071
|
+
interface DetailRenderContext<T> {
|
|
1072
|
+
value: T[keyof T];
|
|
1073
|
+
row: T;
|
|
1074
|
+
mode: DetailMode;
|
|
1075
|
+
}
|
|
1076
|
+
interface DetailField<T> {
|
|
1077
|
+
kind?: "field";
|
|
1078
|
+
key: keyof T & string;
|
|
1079
|
+
label: string;
|
|
1080
|
+
type?: DetailFieldType;
|
|
1081
|
+
tone?: (value: T[keyof T]) => BadgeTone;
|
|
1082
|
+
render?: (ctx: DetailRenderContext<T>) => ReactNode;
|
|
1083
|
+
colspan?: number;
|
|
1084
|
+
}
|
|
1085
|
+
interface DetailSection<T> {
|
|
1086
|
+
kind: "section";
|
|
1087
|
+
render: (ctx: {
|
|
1088
|
+
data: T;
|
|
1089
|
+
mode: DetailMode;
|
|
1090
|
+
}) => ReactNode;
|
|
1091
|
+
colspan?: number;
|
|
1092
|
+
}
|
|
1093
|
+
type DetailFieldOrSection<T> = DetailField<T> | DetailSection<T>;
|
|
1094
|
+
interface DetailEditBodyContext<TFieldValues extends FieldValues, S extends z.ZodTypeAny> {
|
|
1095
|
+
methods: UseFormReturn<z.infer<S>>;
|
|
1096
|
+
data: TFieldValues;
|
|
1097
|
+
}
|
|
1098
|
+
interface DetailController {
|
|
1099
|
+
mode: DetailMode;
|
|
1100
|
+
isDirty: boolean;
|
|
1101
|
+
isSaving: boolean;
|
|
1102
|
+
/** <form id> 연결용 — SubmitForm + 외부 submit 버튼 패턴 */
|
|
1103
|
+
formId: string;
|
|
1104
|
+
toEdit: () => void;
|
|
1105
|
+
toRead: () => void;
|
|
1106
|
+
/** DetailEditView 내부 FormDirtyBridge 에서 호출 */
|
|
1107
|
+
handleDirtyChange: (dirty: boolean) => void;
|
|
1108
|
+
/** onSave 시작/완료 신호 — DetailEditView 에서 호출 */
|
|
1109
|
+
handleSaveStart: () => void;
|
|
1110
|
+
handleSaveEnd: () => void;
|
|
1111
|
+
}
|
|
1112
|
+
interface UseDetailControllerParams {
|
|
1113
|
+
/** controlled mode: URL params 등 외부에서 mode 관리 시 주입 */
|
|
1114
|
+
mode?: DetailMode;
|
|
1115
|
+
onModeChange?: (mode: DetailMode) => void;
|
|
1116
|
+
}
|
|
1117
|
+
interface DetailContentProps<T, S extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
1118
|
+
controller: DetailController;
|
|
1119
|
+
data: T | undefined;
|
|
1120
|
+
readFields: Array<DetailFieldOrSection<T>>;
|
|
1121
|
+
editSchema?: S;
|
|
1122
|
+
editFields?: Array<FormFieldConfig<z.infer<S>>>;
|
|
1123
|
+
onSave?: (data: z.infer<S>) => Promise<void>;
|
|
1124
|
+
/** Body 전면 교체 — schema로 표현 불가한 read 영역 */
|
|
1125
|
+
renderReadBody?: (ctx: {
|
|
1126
|
+
data: T;
|
|
1127
|
+
}) => ReactNode;
|
|
1128
|
+
/** Body 전면 교체 — edit 영역 (RHF methods 포함) */
|
|
1129
|
+
renderEditBody?: (ctx: DetailEditBodyContext<z.infer<S>, S>) => ReactNode;
|
|
1130
|
+
layout?: "compact" | "full";
|
|
1131
|
+
className?: string;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
interface DetailModalFrameProps<T, S extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
1135
|
+
open: boolean;
|
|
1136
|
+
title: string;
|
|
1137
|
+
data: T | undefined;
|
|
1138
|
+
readFields: Array<DetailFieldOrSection<T>>;
|
|
1139
|
+
editSchema?: S;
|
|
1140
|
+
editFields?: Array<FormFieldConfig<z.infer<S>>>;
|
|
1141
|
+
onSave?: (data: z.infer<S>) => Promise<void>;
|
|
1142
|
+
onDone: () => void;
|
|
1143
|
+
renderReadBody?: DetailContentProps<T, S>["renderReadBody"];
|
|
1144
|
+
renderEditBody?: DetailContentProps<T, S>["renderEditBody"];
|
|
1145
|
+
/** controlled mode 주입 (URL query 등으로 외부에서 mode 관리 시) */
|
|
1146
|
+
mode?: UseDetailControllerParams["mode"];
|
|
1147
|
+
onModeChange?: UseDetailControllerParams["onModeChange"];
|
|
1148
|
+
contentClassName?: string;
|
|
1149
|
+
}
|
|
1150
|
+
declare function DetailModalFrame<T, S extends z.ZodTypeAny = z.ZodTypeAny>(props: DetailModalFrameProps<T, S>): React$1.JSX.Element;
|
|
1151
|
+
|
|
1152
|
+
interface DetailPageFrameProps<T, S extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
1153
|
+
data: T | undefined;
|
|
1154
|
+
readFields: Array<DetailFieldOrSection<T>>;
|
|
1155
|
+
editSchema?: S;
|
|
1156
|
+
editFields?: Array<FormFieldConfig<z.infer<S>>>;
|
|
1157
|
+
onSave?: (data: z.infer<S>) => Promise<void>;
|
|
1158
|
+
/** 닫기/뒤로가기 — navigate(-1) 또는 라우터 이동 */
|
|
1159
|
+
onDone: () => void;
|
|
1160
|
+
renderReadBody?: DetailContentProps<T, S>["renderReadBody"];
|
|
1161
|
+
renderEditBody?: DetailContentProps<T, S>["renderEditBody"];
|
|
1162
|
+
/** controlled mode 주입 (URL ?mode=edit 등) */
|
|
1163
|
+
mode?: UseDetailControllerParams["mode"];
|
|
1164
|
+
onModeChange?: UseDetailControllerParams["onModeChange"];
|
|
1165
|
+
className?: string;
|
|
1166
|
+
}
|
|
1167
|
+
declare function DetailPageFrame<T, S extends z.ZodTypeAny = z.ZodTypeAny>(props: DetailPageFrameProps<T, S>): React$1.JSX.Element;
|
|
1168
|
+
|
|
1169
|
+
declare function DetailContent<T, S extends z.ZodTypeAny = z.ZodTypeAny>(props: DetailContentProps<T, S>): React$1.JSX.Element;
|
|
1170
|
+
|
|
1171
|
+
declare function useDetailController(params?: UseDetailControllerParams): DetailController;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* URL query parameter를 사용하여 모달을 관리하는 hook
|
|
1175
|
+
* @param modalKey - URL query parameter에 사용될 키 (예: "modal", "dialog")
|
|
1176
|
+
* @returns { isOpen, openModal, closeModal }
|
|
1177
|
+
* 모달 open 시 URL query parameter에 modalKey를 true로 설정 닫을 시 삭제
|
|
1178
|
+
*/
|
|
1179
|
+
declare function useModal(modalKey?: string): {
|
|
1180
|
+
isOpen: boolean;
|
|
1181
|
+
openModal: () => void;
|
|
1182
|
+
closeModal: () => void;
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
interface ConfirmArgs {
|
|
1186
|
+
currentLocation: Location;
|
|
1187
|
+
nextLocation: Location;
|
|
1188
|
+
}
|
|
1189
|
+
interface UseCustomBlockerOptions {
|
|
1190
|
+
enabled: boolean;
|
|
1191
|
+
isDirty: boolean;
|
|
1192
|
+
bypass?: boolean;
|
|
1193
|
+
message?: string;
|
|
1194
|
+
confirm?: (args: ConfirmArgs) => boolean | Promise<boolean>;
|
|
1195
|
+
excludedPaths?: Array<string>;
|
|
1196
|
+
}
|
|
1197
|
+
type CustomBlockerState = "idle" | "blocked" | "confirming";
|
|
1198
|
+
interface UseCustomBlockerResult {
|
|
1199
|
+
proceed: () => void;
|
|
1200
|
+
reset: () => void;
|
|
1201
|
+
state: CustomBlockerState;
|
|
1202
|
+
}
|
|
1203
|
+
declare function useCustomBlocker(options: UseCustomBlockerOptions): UseCustomBlockerResult;
|
|
1204
|
+
|
|
1205
|
+
interface BlockModalConfirmOptions {
|
|
1206
|
+
content?: string;
|
|
1207
|
+
onOk?: () => void | Promise<void>;
|
|
1208
|
+
onCancel?: () => void | Promise<void>;
|
|
1209
|
+
okText?: string;
|
|
1210
|
+
cancelText?: string;
|
|
1211
|
+
}
|
|
1212
|
+
declare function useBlockModalConfirm(): {
|
|
1213
|
+
promiseConfirm: (options: BlockModalConfirmOptions) => Promise<boolean>;
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* 스크롤을 맨 위로 이동시키는 함수를 반환하는 hook
|
|
1218
|
+
* @param containerId - 스크롤할 컨테이너의 id (없으면 window 스크롤)
|
|
1219
|
+
* @returns scrollToTop - 호출 시 스크롤을 맨 위로 이동
|
|
1220
|
+
*
|
|
1221
|
+
* @example
|
|
1222
|
+
* // window 스크롤
|
|
1223
|
+
* const scrollToTop = useScrollToTop();
|
|
1224
|
+
*
|
|
1225
|
+
* // 특정 컨테이너 스크롤
|
|
1226
|
+
* const scrollToTop = useScrollToTop("doc-scroll-container");
|
|
1227
|
+
*
|
|
1228
|
+
* // 버튼 클릭 시 스크롤 이동
|
|
1229
|
+
* <button onClick={scrollToTop}>맨 위로</button>
|
|
1230
|
+
*
|
|
1231
|
+
* // 또는 함수 내에서 직접 호출
|
|
1232
|
+
* const handleSubmit = () => {
|
|
1233
|
+
* // ... 로직
|
|
1234
|
+
* scrollToTop();
|
|
1235
|
+
* }
|
|
1236
|
+
*/
|
|
1237
|
+
declare function useScrollToTop(containerId?: string): () => void;
|
|
1238
|
+
|
|
1239
|
+
declare function cn(...inputs: Array<ClassValue>): string;
|
|
1240
|
+
declare const buttonVariants: (props?: ({
|
|
1241
|
+
variant?: "outline" | "save" | "delete" | "reset" | "search" | "file" | "carousel" | "accent" | "ghost" | "link" | null | undefined;
|
|
1242
|
+
size?: "link" | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
1243
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1244
|
+
declare const textVariants: (props?: ({
|
|
1245
|
+
variant?: "default" | "muted" | "danger" | "success" | "info" | null | undefined;
|
|
1246
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | null | undefined;
|
|
1247
|
+
weight?: "normal" | "medium" | "semibold" | "bold" | null | undefined;
|
|
1248
|
+
color?: "default" | "main" | "lightGray" | "basicGray" | "darkGray" | "white" | "black" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "inherit" | null | undefined;
|
|
1249
|
+
textLine?: "underline" | "strikethrough" | null | undefined;
|
|
1250
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1251
|
+
|
|
1252
|
+
declare const Z_INDEX: {
|
|
1253
|
+
readonly TABLE_COL_STICKY: 1;
|
|
1254
|
+
readonly TABLE_FIXED_CELL: 5;
|
|
1255
|
+
readonly TABLE_FIXED_HEADER_CELL: 10;
|
|
1256
|
+
readonly LOCAL_OVERLAY: 10;
|
|
1257
|
+
readonly LAYOUT_HEADER: 20;
|
|
1258
|
+
readonly DROPDOWN_LOCAL: 20;
|
|
1259
|
+
readonly SIDEBAR_CONTAINER: 30;
|
|
1260
|
+
readonly SIDEBAR_BACKDROP: 40;
|
|
1261
|
+
readonly SIDEBAR: 50;
|
|
1262
|
+
readonly DROPDOWN: 50;
|
|
1263
|
+
readonly CALENDAR_ANCHORED: 50;
|
|
1264
|
+
readonly LOADING_OVERLAY_DEFAULT: 50;
|
|
1265
|
+
readonly DRAWING_CANVAS_1: 51;
|
|
1266
|
+
readonly DRAWING_CANVAS_2: 52;
|
|
1267
|
+
readonly DRAWING: 53;
|
|
1268
|
+
readonly MODAL_OVERLAY: 54;
|
|
1269
|
+
readonly MODAL: 55;
|
|
1270
|
+
readonly CALENDAR_PORTAL: 60;
|
|
1271
|
+
readonly SELECT_CONTENT: 100;
|
|
1272
|
+
readonly TOP: 9999;
|
|
1273
|
+
readonly MODAL_Z_STEP: 10;
|
|
1274
|
+
};
|
|
1275
|
+
type ZIndexKey = keyof typeof Z_INDEX;
|
|
1276
|
+
|
|
1277
|
+
export { Badge, type BadgeProps, BreadCrumb, type BreadCrumbItem, type BreadCrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Carousel, type CarouselProps, type CarouselRef, Checkbox, type CheckboxProps, type ConfirmOptions, DatePicker, DebouncedButton, type DebouncedButtonProps, DetailContent, type DetailContentProps, type DetailFieldOrSection, DetailModalFrame, type DetailMode, DetailPageFrame, Empty, ExcelUploader, FilePreviewViewer, FileUploader, Input, type InputProps, Loading, LoadingOverlay, type LoadingOverlayProps, type LoadingProps, 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, SimplePopover, type SimplePopoverProps, Skeleton, type SkeletonProps, Slider, type SliderProps, 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 ZIndexKey, Z_INDEX, buildBreadCrumbItems, buttonVariants, cn, confirmModal, findParentMenuItem, findParentMenuName, switchTrackSizes, textVariants, toast, useBlockModalConfirm, useBreadCrumbItems, useCustomBlocker, useDetailController, useModal, useMultiTabStore, useScrollToTop, useToast };
|