@sonamu-kit/react-components 0.1.6 → 0.1.8
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/components/index.d.ts +2 -1
- package/dist/components/ui/checkbox.d.ts +2 -1
- package/dist/components/ui/date-selector-multiple.d.ts +2 -4
- package/dist/components/ui/month-picker-multiple.d.ts +2 -4
- package/dist/components/ui/multi-select.d.ts +5 -9
- package/dist/components/ui/select.d.ts +25 -13
- package/dist/components/ui/switch.d.ts +2 -1
- package/dist/components/ui/toggle.d.ts +5 -2
- package/dist/contexts/index.d.ts +2 -2
- package/dist/contexts/sonamu-context.d.ts +15 -6
- package/dist/i18n/rc-keys.d.ts +120 -0
- package/dist/lib/utils.d.ts +13 -0
- package/dist/react-components.es.js +8749 -8713
- package/dist/react-components.es.js.map +1 -1
- package/package.json +3 -2
|
@@ -46,7 +46,8 @@ export { Progress } from './ui/progress';
|
|
|
46
46
|
export { RadioGroup, RadioGroupItem } from './ui/radio-group';
|
|
47
47
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from './ui/resizable';
|
|
48
48
|
export { ScrollArea, ScrollBar } from './ui/scroll-area';
|
|
49
|
-
export {
|
|
49
|
+
export type { SelectItemDef, SelectProps } from './ui/select';
|
|
50
|
+
export { Select } from './ui/select';
|
|
50
51
|
export { Separator } from './ui/separator';
|
|
51
52
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, } from './ui/sheet';
|
|
52
53
|
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './ui/sidebar';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const Checkbox: React.ForwardRefExoticComponent<Omit<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref">, "label" | "onBlur" | "name" | "onValueChange" | "labelClassName"> & {
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref">, "label" | "onBlur" | "value" | "name" | "onValueChange" | "labelClassName"> & {
|
|
4
4
|
name?: string;
|
|
5
|
+
value?: boolean;
|
|
5
6
|
onValueChange?: (checked: boolean) => void;
|
|
6
7
|
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
7
8
|
label?: React.ReactNode;
|
|
@@ -20,9 +20,7 @@ interface DateSelectorMultipleProps {
|
|
|
20
20
|
/** Current value */
|
|
21
21
|
value?: DateSelectorValue;
|
|
22
22
|
/** Callback when value changes */
|
|
23
|
-
|
|
24
|
-
value: DateSelectorValue | undefined;
|
|
25
|
-
}) => void;
|
|
23
|
+
onValueChange?: (value: DateSelectorValue | undefined) => void;
|
|
26
24
|
/** Placeholder text when no value */
|
|
27
25
|
placeholder?: string;
|
|
28
26
|
/** Date format string for display */
|
|
@@ -34,5 +32,5 @@ interface DateSelectorMultipleProps {
|
|
|
34
32
|
/** Default to range mode when opening */
|
|
35
33
|
defaultRangeMode?: boolean;
|
|
36
34
|
}
|
|
37
|
-
export declare function DateSelectorMultiple({ CalendarIcon, ChevronDownIcon, value,
|
|
35
|
+
export declare function DateSelectorMultiple({ CalendarIcon, ChevronDownIcon, value, onValueChange, placeholder, dateFormat, className, numberOfMonths, defaultRangeMode, }: DateSelectorMultipleProps): import("react/jsx-runtime").JSX.Element;
|
|
38
36
|
export {};
|
|
@@ -20,9 +20,7 @@ interface MonthPickerMultipleProps {
|
|
|
20
20
|
/** Current value */
|
|
21
21
|
value?: MonthPickerValue;
|
|
22
22
|
/** Callback when value changes */
|
|
23
|
-
|
|
24
|
-
value: MonthPickerValue | undefined;
|
|
25
|
-
}) => void;
|
|
23
|
+
onValueChange?: (value: MonthPickerValue | undefined) => void;
|
|
26
24
|
/** Placeholder text when no value */
|
|
27
25
|
placeholder?: string;
|
|
28
26
|
/** Date format string for display */
|
|
@@ -37,5 +35,5 @@ interface MonthPickerMultipleProps {
|
|
|
37
35
|
/** Default to range mode when opening */
|
|
38
36
|
defaultRangeMode?: boolean;
|
|
39
37
|
}
|
|
40
|
-
export declare function MonthPickerMultiple({ CalendarIcon, ChevronDownIcon, value,
|
|
38
|
+
export declare function MonthPickerMultiple({ CalendarIcon, ChevronDownIcon, value, onValueChange, placeholder, dateFormat, className, yearRange, defaultRangeMode, }: MonthPickerMultipleProps): import("react/jsx-runtime").JSX.Element;
|
|
41
39
|
export {};
|
|
@@ -69,8 +69,10 @@ interface MultiSelectProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonEle
|
|
|
69
69
|
* Receives an array of the new selected values.
|
|
70
70
|
*/
|
|
71
71
|
onValueChange: (value: string[]) => void;
|
|
72
|
-
/**
|
|
73
|
-
|
|
72
|
+
/**
|
|
73
|
+
* The current selected values.
|
|
74
|
+
*/
|
|
75
|
+
value: string[];
|
|
74
76
|
/**
|
|
75
77
|
* Placeholder text to be displayed when no values are selected.
|
|
76
78
|
* Optional, defaults to "Select options".
|
|
@@ -187,12 +189,6 @@ interface MultiSelectProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonEle
|
|
|
187
189
|
* Optional, defaults to false (shows warning in dev mode instead).
|
|
188
190
|
*/
|
|
189
191
|
deduplicateOptions?: boolean;
|
|
190
|
-
/**
|
|
191
|
-
* If true, the component will reset its internal state when defaultValue changes.
|
|
192
|
-
* Useful for React Hook Form integration and form reset functionality.
|
|
193
|
-
* Optional, defaults to true.
|
|
194
|
-
*/
|
|
195
|
-
resetOnDefaultValueChange?: boolean;
|
|
196
192
|
/**
|
|
197
193
|
* If true, automatically closes the popover after selecting an option.
|
|
198
194
|
* Useful for single-selection-like behavior or mobile UX.
|
|
@@ -215,7 +211,7 @@ export interface MultiSelectRef {
|
|
|
215
211
|
/**
|
|
216
212
|
* Set selected values programmatically
|
|
217
213
|
*/
|
|
218
|
-
|
|
214
|
+
handleValueChange: (values: string[]) => void;
|
|
219
215
|
/**
|
|
220
216
|
* Clear all selected values
|
|
221
217
|
*/
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
import { Override } from '../../lib/types';
|
|
2
2
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
type
|
|
4
|
+
type ExtractValue<Item> = Item extends {
|
|
5
|
+
value: infer V;
|
|
6
|
+
} ? V : Item;
|
|
7
|
+
type SelectItemDef<V> = V | {
|
|
8
|
+
value: V;
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type SelectPropsBase<Item> = Override<Omit<React.ComponentProps<typeof SelectPrimitive.Root>, "value" | "defaultValue" | "onValueChange" | "children">, {
|
|
5
13
|
name?: string;
|
|
6
|
-
|
|
14
|
+
value?: ExtractValue<Item>;
|
|
15
|
+
defaultValue?: ExtractValue<Item>;
|
|
16
|
+
onValueChange?: (value: ExtractValue<Item> | undefined) => void;
|
|
7
17
|
onBlur?: React.FocusEventHandler<HTMLSelectElement>;
|
|
18
|
+
items: Item[];
|
|
19
|
+
placeholder?: string;
|
|
8
20
|
clearable?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
contentClassName?: string;
|
|
23
|
+
renderItem?: (value: ExtractValue<Item>) => React.ReactNode;
|
|
9
24
|
}>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
25
|
+
type SelectProps<Item> = ExtractValue<Item> extends string | number ? SelectPropsBase<Item> & {
|
|
26
|
+
valueKey?: (value: ExtractValue<Item>) => string;
|
|
27
|
+
} : SelectPropsBase<Item> & {
|
|
28
|
+
valueKey: (value: ExtractValue<Item>) => string;
|
|
29
|
+
};
|
|
30
|
+
declare const Select: <Item>(props: SelectProps<Item> & React.RefAttributes<HTMLSelectElement>) => React.ReactElement;
|
|
31
|
+
export { Select };
|
|
32
|
+
export type { SelectProps, SelectItemDef, ExtractValue };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const Switch: React.ForwardRefExoticComponent<Omit<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref">, "onBlur" | "name" | "onValueChange"> & {
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref">, "onBlur" | "value" | "name" | "onValueChange"> & {
|
|
4
4
|
name?: string;
|
|
5
|
+
value?: boolean;
|
|
5
6
|
onValueChange?: (checked: boolean) => void;
|
|
6
7
|
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
7
8
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -5,8 +5,11 @@ declare const toggleVariants: (props?: ({
|
|
|
5
5
|
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
8
|
+
declare const Toggle: React.ForwardRefExoticComponent<Omit<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
9
|
variant?: "default" | "outline" | null | undefined;
|
|
10
10
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string> &
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "value" | "onValueChange"> & {
|
|
12
|
+
value?: boolean;
|
|
13
|
+
onValueChange?: (pressed: boolean) => void;
|
|
14
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
12
15
|
export { Toggle, toggleVariants };
|
package/dist/contexts/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type SonamuContextValue, SonamuProvider,
|
|
2
|
-
export type { SonamuAuth, SonamuFile } from './types';
|
|
1
|
+
export { type SonamuContextValue, SonamuProvider, useSonamuBaseContext, } from './sonamu-context';
|
|
2
|
+
export type { Dictionary, SDReturnType, SonamuAuth, SonamuFile } from './types';
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Dictionary, SDReturnType, SonamuAuth, SonamuFile } from './types';
|
|
3
|
-
export interface SonamuContextValue<D extends Dictionary = Dictionary> {
|
|
3
|
+
export interface SonamuContextValue<D extends Dictionary = Dictionary, TUser = any, TLoginParams = any> {
|
|
4
4
|
uploader?: (files: File[]) => Promise<SonamuFile[]>;
|
|
5
|
-
auth?: SonamuAuth
|
|
6
|
-
SD
|
|
5
|
+
auth?: SonamuAuth<TUser, TLoginParams>;
|
|
6
|
+
SD?: <K extends keyof D>(key: K) => SDReturnType<D, K>;
|
|
7
7
|
}
|
|
8
|
-
export interface SonamuProviderProps<D extends Dictionary = Dictionary> extends SonamuContextValue<D> {
|
|
8
|
+
export interface SonamuProviderProps<D extends Dictionary = Dictionary, TUser = any, TLoginParams = any> extends SonamuContextValue<D, TUser, TLoginParams> {
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare function SonamuProvider<D extends Dictionary = Dictionary>({ children, ...value }: SonamuProviderProps<D>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
|
|
11
|
+
export declare function SonamuProvider<D extends Dictionary = Dictionary, TUser = any, TLoginParams = any>({ children, ...value }: SonamuProviderProps<D, TUser, TLoginParams>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* 타입이 지정된 useSonamuContext를 만들기 위한 베이스 훅
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // contexts/sonamu-provider.tsx
|
|
17
|
+
* export function useSonamuContext() {
|
|
18
|
+
* return useSonamuBaseContext<MergedDictionary, UserSubsetSS, UserLoginParams>();
|
|
19
|
+
* }
|
|
20
|
+
*/
|
|
21
|
+
export declare function useSonamuBaseContext<D extends Dictionary = Dictionary, TUser = any, TLoginParams = any>(): Required<SonamuContextValue<D, TUser, TLoginParams>>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Components i18n Keys
|
|
3
|
+
*
|
|
4
|
+
* react-components의 i18n 키를 관리하는 Single Source of Truth
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare const rcKeysKo: {
|
|
8
|
+
"rc.asyncSelect.loading": string;
|
|
9
|
+
"rc.asyncSelect.noOptions": string;
|
|
10
|
+
"rc.asyncSelect.noResults": string;
|
|
11
|
+
"rc.asyncSelect.selectPlaceholder": string;
|
|
12
|
+
"rc.combobox.noResults": string;
|
|
13
|
+
"rc.combobox.selectPlaceholder": string;
|
|
14
|
+
"rc.datePicker.pickDate": string;
|
|
15
|
+
"rc.datePicker.placeholder": string;
|
|
16
|
+
"rc.datePicker.selectDate": string;
|
|
17
|
+
"rc.dateSelectorMultiple.addDate": string;
|
|
18
|
+
"rc.dateSelectorMultiple.dateRange": string;
|
|
19
|
+
"rc.dateSelectorMultiple.placeholder": string;
|
|
20
|
+
"rc.dateSelectorMultiple.singleDate": string;
|
|
21
|
+
"rc.fileInput.browseFiles": string;
|
|
22
|
+
"rc.fileInput.dropZone": string;
|
|
23
|
+
"rc.fileInput.filePlaceholder": string;
|
|
24
|
+
"rc.fileInput.imagePlaceholder": string;
|
|
25
|
+
"rc.fileInput.maxFilesExceeded": (maxFiles: number) => string;
|
|
26
|
+
"rc.fileInput.pending": string;
|
|
27
|
+
"rc.fileInput.remove": string;
|
|
28
|
+
"rc.fileInput.uploadFailed": string;
|
|
29
|
+
"rc.fileInput.uploading": string;
|
|
30
|
+
"rc.monthPickerMultiple.addMonth": string;
|
|
31
|
+
"rc.monthPickerMultiple.dateRange": string;
|
|
32
|
+
"rc.monthPickerMultiple.endDate": string;
|
|
33
|
+
"rc.monthPickerMultiple.placeholder": string;
|
|
34
|
+
"rc.monthPickerMultiple.singleDate": string;
|
|
35
|
+
"rc.monthPickerMultiple.startDate": string;
|
|
36
|
+
"rc.multiSelect.clear": string;
|
|
37
|
+
"rc.multiSelect.close": string;
|
|
38
|
+
"rc.multiSelect.moreItems": (count: number) => string;
|
|
39
|
+
"rc.multiSelect.noOptions": string;
|
|
40
|
+
"rc.multiSelect.noOptionsSelected": string;
|
|
41
|
+
"rc.multiSelect.noResults": string;
|
|
42
|
+
"rc.multiSelect.optionsCount": (count: number) => string;
|
|
43
|
+
"rc.multiSelect.selectAll": string;
|
|
44
|
+
"rc.multiSelect.selectPlaceholder": string;
|
|
45
|
+
"rc.pagination.next": string;
|
|
46
|
+
"rc.pagination.previous": string;
|
|
47
|
+
"rc.pagination.showing": (start: number, end: number, total: number) => string;
|
|
48
|
+
"rc.calendar.month.0": string;
|
|
49
|
+
"rc.calendar.month.1": string;
|
|
50
|
+
"rc.calendar.month.2": string;
|
|
51
|
+
"rc.calendar.month.3": string;
|
|
52
|
+
"rc.calendar.month.4": string;
|
|
53
|
+
"rc.calendar.month.5": string;
|
|
54
|
+
"rc.calendar.month.6": string;
|
|
55
|
+
"rc.calendar.month.7": string;
|
|
56
|
+
"rc.calendar.month.8": string;
|
|
57
|
+
"rc.calendar.month.9": string;
|
|
58
|
+
"rc.calendar.month.10": string;
|
|
59
|
+
"rc.calendar.month.11": string;
|
|
60
|
+
"rc.common.cancel": string;
|
|
61
|
+
"rc.common.save": string;
|
|
62
|
+
};
|
|
63
|
+
export type RCKeys = typeof rcKeysKo;
|
|
64
|
+
export type RCKeyName = keyof RCKeys;
|
|
65
|
+
export declare const rcKeysEn: {
|
|
66
|
+
"rc.asyncSelect.loading": string;
|
|
67
|
+
"rc.asyncSelect.noOptions": string;
|
|
68
|
+
"rc.asyncSelect.noResults": string;
|
|
69
|
+
"rc.asyncSelect.selectPlaceholder": string;
|
|
70
|
+
"rc.combobox.noResults": string;
|
|
71
|
+
"rc.combobox.selectPlaceholder": string;
|
|
72
|
+
"rc.datePicker.pickDate": string;
|
|
73
|
+
"rc.datePicker.placeholder": string;
|
|
74
|
+
"rc.datePicker.selectDate": string;
|
|
75
|
+
"rc.dateSelectorMultiple.addDate": string;
|
|
76
|
+
"rc.dateSelectorMultiple.dateRange": string;
|
|
77
|
+
"rc.dateSelectorMultiple.placeholder": string;
|
|
78
|
+
"rc.dateSelectorMultiple.singleDate": string;
|
|
79
|
+
"rc.fileInput.browseFiles": string;
|
|
80
|
+
"rc.fileInput.dropZone": string;
|
|
81
|
+
"rc.fileInput.filePlaceholder": string;
|
|
82
|
+
"rc.fileInput.imagePlaceholder": string;
|
|
83
|
+
"rc.fileInput.maxFilesExceeded": (maxFiles: number) => string;
|
|
84
|
+
"rc.fileInput.pending": string;
|
|
85
|
+
"rc.fileInput.remove": string;
|
|
86
|
+
"rc.fileInput.uploadFailed": string;
|
|
87
|
+
"rc.fileInput.uploading": string;
|
|
88
|
+
"rc.monthPickerMultiple.addMonth": string;
|
|
89
|
+
"rc.monthPickerMultiple.dateRange": string;
|
|
90
|
+
"rc.monthPickerMultiple.endDate": string;
|
|
91
|
+
"rc.monthPickerMultiple.placeholder": string;
|
|
92
|
+
"rc.monthPickerMultiple.singleDate": string;
|
|
93
|
+
"rc.monthPickerMultiple.startDate": string;
|
|
94
|
+
"rc.multiSelect.clear": string;
|
|
95
|
+
"rc.multiSelect.close": string;
|
|
96
|
+
"rc.multiSelect.moreItems": (count: number) => string;
|
|
97
|
+
"rc.multiSelect.noOptions": string;
|
|
98
|
+
"rc.multiSelect.noOptionsSelected": string;
|
|
99
|
+
"rc.multiSelect.noResults": string;
|
|
100
|
+
"rc.multiSelect.optionsCount": (count: number) => string;
|
|
101
|
+
"rc.multiSelect.selectAll": string;
|
|
102
|
+
"rc.multiSelect.selectPlaceholder": string;
|
|
103
|
+
"rc.pagination.next": string;
|
|
104
|
+
"rc.pagination.previous": string;
|
|
105
|
+
"rc.pagination.showing": (start: number, end: number, total: number) => string;
|
|
106
|
+
"rc.calendar.month.0": string;
|
|
107
|
+
"rc.calendar.month.1": string;
|
|
108
|
+
"rc.calendar.month.2": string;
|
|
109
|
+
"rc.calendar.month.3": string;
|
|
110
|
+
"rc.calendar.month.4": string;
|
|
111
|
+
"rc.calendar.month.5": string;
|
|
112
|
+
"rc.calendar.month.6": string;
|
|
113
|
+
"rc.calendar.month.7": string;
|
|
114
|
+
"rc.calendar.month.8": string;
|
|
115
|
+
"rc.calendar.month.9": string;
|
|
116
|
+
"rc.calendar.month.10": string;
|
|
117
|
+
"rc.calendar.month.11": string;
|
|
118
|
+
"rc.common.cancel": string;
|
|
119
|
+
"rc.common.save": string;
|
|
120
|
+
};
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
|
+
/**
|
|
4
|
+
* 값을 배열로 정규화합니다.
|
|
5
|
+
* 이미 배열이면 그대로 반환하고, 단일 값이면 배열로 감싸서 반환합니다.
|
|
6
|
+
*
|
|
7
|
+
* @param value - 정규화할 값 (단일 값 또는 배열)
|
|
8
|
+
* @returns 배열로 정규화된 값 (undefined면 undefined 반환)
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* normalizeToArray(50) // [50]
|
|
12
|
+
* normalizeToArray([20, 80]) // [20, 80]
|
|
13
|
+
* normalizeToArray(undefined) // undefined
|
|
14
|
+
*/
|
|
15
|
+
export declare function normalizeToArray<T>(value: T | T[] | undefined): T[] | undefined;
|
|
3
16
|
/**
|
|
4
17
|
* useObjectUrls 훅
|
|
5
18
|
*
|