@sonamu-kit/react-components 0.1.9 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,6 +40,8 @@ export { Pagination } from './ui/pagination';
40
40
  export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from './ui/popover';
41
41
  export { Progress } from './ui/progress';
42
42
  export { RadioGroup, RadioGroupItem } from './ui/radio-group';
43
+ export type { RangeNumberInputProps } from './ui/range-number-input';
44
+ export { RangeNumberInput } from './ui/range-number-input';
43
45
  export { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from './ui/resizable';
44
46
  export { ScrollArea, ScrollBar } from './ui/scroll-area';
45
47
  export type { EnumSelectProps } from './ui/select/enum-select';
@@ -53,9 +55,15 @@ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHe
53
55
  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';
54
56
  export { Skeleton } from './ui/skeleton';
55
57
  export { Slider } from './ui/slider';
58
+ export { SonamuFilterModal } from './ui/sonamu-filter/sonamu-filter-modal';
59
+ export { SonamuFilterPopover, SonamuFilterPopover as SonamuFilterTooltip, } from './ui/sonamu-filter/sonamu-filter-popover';
60
+ export type { FieldMeta, Rule, SonamuFilterBadgeProps, SonamuFilterModalProps, SonamuFilterPopoverProps, SonamuFilterTooltipProps, } from './ui/sonamu-filter/types';
61
+ export { extractFieldMetaFromSchema } from './ui/sonamu-filter/utils';
56
62
  export { Switch } from './ui/switch';
57
63
  export { Table, TableBody, TableCaption, TableCell, type TableCol, TableFooter, TableHead, TableHeader, TableRow, } from './ui/table';
58
64
  export { Tabs, TabsContent, TabsList, TabsTrigger } from './ui/tabs';
65
+ export type { TagInputProps } from './ui/tag-input';
66
+ export { TagInput } from './ui/tag-input';
59
67
  export { Textarea } from './ui/textarea';
60
68
  export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from './ui/toast';
61
69
  export { Toaster } from './ui/toaster';
@@ -1,4 +1,5 @@
1
1
  import { DialogProps } from '@radix-ui/react-dialog';
2
+ import { Command as CommandPrimitive } from 'cmdk';
2
3
  import * as React from "react";
3
4
  declare const Command: React.ForwardRefExoticComponent<Omit<{
4
5
  children?: React.ReactNode;
@@ -17,7 +18,10 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
17
18
  disablePointerSelection?: boolean;
18
19
  vimBindings?: boolean;
19
20
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
- declare const CommandDialog: ({ children, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
21
+ type CommandDialogProps = DialogProps & {
22
+ commandProps?: React.ComponentPropsWithoutRef<typeof CommandPrimitive>;
23
+ };
24
+ declare const CommandDialog: ({ children, commandProps, ...props }: CommandDialogProps) => import("react/jsx-runtime").JSX.Element;
21
25
  declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
22
26
  ref?: React.Ref<HTMLInputElement>;
23
27
  } & {
@@ -0,0 +1,14 @@
1
+ export type RangeNumberInputProps = {
2
+ value?: [number | undefined, number | undefined];
3
+ onChange?: (value: [number | undefined, number | undefined]) => void;
4
+ placeholder?: [string, string];
5
+ disabled?: boolean;
6
+ className?: string;
7
+ };
8
+ /**
9
+ * Range Number Input 컴포넌트
10
+ *
11
+ * between 연산자에서 사용
12
+ * [min, max] 두 개의 숫자 입력
13
+ */
14
+ export declare function RangeNumberInput({ value, onChange, placeholder, disabled, className, }: RangeNumberInputProps): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,24 @@
1
1
  import { UseQueryResult } from '@tanstack/react-query';
2
- export type AsyncIdConfig<TSubsetKey extends string = string, _TSubsetMapping = Record<string, unknown>> = {
2
+ export type AsyncIdConfig<TSubsetKey extends string = string, _TSubsetMapping = Record<string, unknown>, _TListParams extends Record<string, unknown> = Record<string, unknown>> = {
3
3
  placeholderKey: string;
4
4
  useList: <T extends TSubsetKey>(subset: T, params?: any, options?: {
5
5
  enabled?: boolean;
6
6
  }) => UseQueryResult<Record<string, unknown>, Error>;
7
7
  };
8
+ type SubsetFieldKeys<TSubsetKey extends string, TSubsetMapping> = TSubsetKey extends keyof TSubsetMapping ? TSubsetMapping[TSubsetKey] extends Record<string, unknown> ? string & keyof TSubsetMapping[TSubsetKey] : string : string;
9
+ type SubsetRow<TSubsetKey extends string, TSubsetMapping> = TSubsetKey extends keyof TSubsetMapping ? TSubsetMapping[TSubsetKey] : Record<string, unknown>;
10
+ type DisplayFieldAsString<TSubsetKey extends string, TSubsetMapping> = {
11
+ displayField?: SubsetFieldKeys<TSubsetKey, TSubsetMapping>;
12
+ };
13
+ type DisplayFieldAsCallback<TSubsetKey extends string, TSubsetMapping> = {
14
+ displayField: (row: SubsetRow<TSubsetKey, TSubsetMapping>) => string;
15
+ };
8
16
  type OnRowChangeType<TSubsetKey extends string, TSubsetMapping> = TSubsetKey extends keyof TSubsetMapping ? TSubsetMapping[TSubsetKey] | TSubsetMapping[TSubsetKey][] | undefined : unknown;
9
- export type IdAsyncSelectProps<TSubsetKey extends string = string, TSubsetMapping = Record<string, unknown>, TValue extends string | number = string> = {
10
- config: AsyncIdConfig<TSubsetKey, TSubsetMapping>;
11
- subset: TSubsetKey;
12
- baseListParams?: Record<string, unknown>;
13
- displayField?: string;
14
- valueField?: string;
17
+ type IdAsyncSelectBaseProps<TSubsetKey extends string = string, TSubsetMapping = Record<string, unknown>, TValue extends string | number = string, TListParams extends Record<string, unknown> = Record<string, unknown>, TSubset extends TSubsetKey = TSubsetKey> = {
18
+ config: AsyncIdConfig<TSubsetKey, TSubsetMapping, TListParams>;
19
+ subset: TSubset;
20
+ baseListParams?: Partial<Omit<TListParams, "keyword" | "page">>;
21
+ valueField?: SubsetFieldKeys<TSubset, TSubsetMapping>;
15
22
  placeholder?: string;
16
23
  clearable?: boolean;
17
24
  disabled?: boolean;
@@ -19,7 +26,8 @@ export type IdAsyncSelectProps<TSubsetKey extends string = string, TSubsetMappin
19
26
  multiple?: boolean;
20
27
  value?: TValue | TValue[] | null;
21
28
  onValueChange?: (value: TValue | TValue[] | undefined) => void;
22
- onRowChange?: (row: OnRowChangeType<TSubsetKey, TSubsetMapping>) => void;
29
+ onRowChange?: (row: OnRowChangeType<TSubset, TSubsetMapping>) => void;
23
30
  };
24
- export declare function IdAsyncSelect<TSubsetKey extends string = string, TSubsetMapping = Record<string, unknown>, TValue extends string | number = string>({ config, subset, baseListParams, displayField, valueField, placeholder, clearable, disabled, className, multiple, value, onValueChange, onRowChange, }: IdAsyncSelectProps<TSubsetKey, TSubsetMapping, TValue>): import("react/jsx-runtime").JSX.Element;
31
+ export type IdAsyncSelectProps<TSubsetKey extends string = string, TSubsetMapping = Record<string, unknown>, TValue extends string | number = string, TListParams extends Record<string, unknown> = Record<string, unknown>, TSubset extends TSubsetKey = TSubsetKey> = IdAsyncSelectBaseProps<TSubsetKey, TSubsetMapping, TValue, TListParams, TSubset> & (DisplayFieldAsString<TSubset, TSubsetMapping> | DisplayFieldAsCallback<TSubset, TSubsetMapping>);
32
+ export declare function IdAsyncSelect<TSubsetKey extends string = string, TSubsetMapping = Record<string, unknown>, TValue extends string | number = string, TListParams extends Record<string, unknown> = Record<string, unknown>, TSubset extends TSubsetKey = TSubsetKey>({ config, subset, baseListParams, displayField, valueField, placeholder, clearable, disabled, className, multiple, value, onValueChange, onRowChange, }: IdAsyncSelectProps<TSubsetKey, TSubsetMapping, TValue, TListParams, TSubset>): import("react/jsx-runtime").JSX.Element;
25
33
  export {};
@@ -0,0 +1,9 @@
1
+ import { FilterOperator, FilterPropType } from '../../../lib/types';
2
+ /**
3
+ * Operator UI 라벨
4
+ */
5
+ export declare const operatorLabels: Record<FilterOperator, string>;
6
+ /**
7
+ * Zod 타입 이름 정의
8
+ */
9
+ export declare const zodTypeToFilterPropTypeMap: Record<string, FilterPropType>;
@@ -0,0 +1,5 @@
1
+ import { RuleRowProps } from './types';
2
+ /**
3
+ * Rule Row Input 컴포넌트
4
+ */
5
+ export declare function RuleRowInput({ rule, fieldMeta, onUpdate, onRemove }: RuleRowProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { SonamuFilterModalProps } from './types';
2
+ /**
3
+ * SonamuFilterModal
4
+ *
5
+ * Zod 스키마 기반 필터 UI 생성
6
+ */
7
+ export declare function SonamuFilterModal({ baseSchema, open, onOpenChange, initialRules, onApply, }: SonamuFilterModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { SonamuFilterPopoverProps } from './types';
2
+ /**
3
+ * SonamuFilterPopover
4
+ *
5
+ * 필터 버튼에 적용된 필터를 Popover로 표시하는 컴포넌트
6
+ * 필터가 적용되어 있으면 hover 없이도 항상 보임
7
+ */
8
+ export declare function SonamuFilterPopover({ rules, fieldMeta, children, side, align, }: SonamuFilterPopoverProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,85 @@
1
+ import { z } from 'zod';
2
+ import { FilterOperator, FilterPropType } from '../../../lib/types';
3
+ /**
4
+ * 필드 메타 정보
5
+ */
6
+ export type FieldMeta = {
7
+ propType: FilterPropType;
8
+ nullable: boolean;
9
+ enumData?: {
10
+ options: string[];
11
+ labels: Record<string, string>;
12
+ };
13
+ };
14
+ /**
15
+ * Rule 타입 정의
16
+ */
17
+ export type Rule = {
18
+ id: string;
19
+ field: string | null;
20
+ operator: FilterOperator | null;
21
+ value: unknown;
22
+ };
23
+ /**
24
+ * Zod 내부 API 접근을 위한 타입 정의
25
+ */
26
+ export type ZodDef = {
27
+ type: string;
28
+ innerType?: z.ZodTypeAny;
29
+ meta?: Record<string, unknown>;
30
+ };
31
+ export type ZodWithDef = z.ZodTypeAny & {
32
+ _def: ZodDef;
33
+ };
34
+ /**
35
+ * SonamuFilterModal Props
36
+ */
37
+ export type SonamuFilterModalProps = {
38
+ baseSchema: z.ZodObject<z.ZodRawShape>;
39
+ open: boolean;
40
+ onOpenChange: (open: boolean) => void;
41
+ initialRules?: Rule[];
42
+ onApply?: (filters: Record<string, unknown>, rules: Rule[]) => void;
43
+ };
44
+ /**
45
+ * ValueInput Props
46
+ */
47
+ export type ValueInputProps = {
48
+ propType: FilterPropType;
49
+ operator: FilterOperator;
50
+ value: unknown;
51
+ onChange: (value: unknown) => void;
52
+ fieldMeta?: FieldMeta;
53
+ };
54
+ /**
55
+ * RuleRow Props
56
+ */
57
+ export type RuleRowProps = {
58
+ rule: Rule;
59
+ fieldMeta: Record<string, FieldMeta>;
60
+ onUpdate: (updates: Partial<Rule>) => void;
61
+ onRemove: () => void;
62
+ };
63
+ /**
64
+ * SonamuFilterBadge Props
65
+ */
66
+ export type SonamuFilterBadgeProps = {
67
+ rules: Rule[];
68
+ fieldMeta: Record<string, FieldMeta>;
69
+ onRemove: (ruleId: string) => void;
70
+ onClearAll: () => void;
71
+ };
72
+ /**
73
+ * SonamuFilterTooltip Props (deprecated - use SonamuFilterPopoverProps)
74
+ */
75
+ export type SonamuFilterTooltipProps = SonamuFilterPopoverProps;
76
+ /**
77
+ * SonamuFilterPopover Props
78
+ */
79
+ export type SonamuFilterPopoverProps = {
80
+ rules: Rule[];
81
+ fieldMeta: Record<string, FieldMeta>;
82
+ children: React.ReactNode;
83
+ side?: "top" | "bottom" | "left" | "right";
84
+ align?: "start" | "center" | "end";
85
+ };
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ import { FilterPropType } from '../../../lib/types';
3
+ import { FieldMeta } from './types';
4
+ /**
5
+ * ZodNullable, ZodOptional 등의 래퍼를 벗겨내고 내부 타입을 반환
6
+ * nullable/optional 여부도 함께 반환
7
+ */
8
+ export declare function unwrapZodType(zodType: z.ZodTypeAny): {
9
+ innerType: z.ZodTypeAny;
10
+ nullable: boolean;
11
+ };
12
+ /**
13
+ * Zod 타입 이름을 FilterPropType으로 변환
14
+ */
15
+ export declare function zodTypeNameToPropType(typeName: string): FilterPropType;
16
+ /**
17
+ * Zod enum에서 options와 labels를 추출
18
+ * SD 함수를 사용하여 enum.{EnumName}.{value} 형태로 라벨 조회
19
+ */
20
+ export declare function extractEnumData(zodEnum: z.ZodTypeAny, SD: (key: string) => string): FieldMeta["enumData"];
21
+ /**
22
+ * Zod 스키마에서 각 필드의 타입 정보를 추출하여 FieldMeta 형태로 변환
23
+ */
24
+ export declare function extractFieldMetaFromSchema(schema: z.ZodObject<z.ZodRawShape>, SD: (key: string) => string): Record<string, FieldMeta>;
@@ -0,0 +1,6 @@
1
+ import { ValueInputProps } from './types';
2
+ /**
3
+ * ValueInput 컴포넌트
4
+ * operator와 propType에 따라 적절한 입력 UI 렌더링
5
+ */
6
+ export declare function ValueInput({ propType, operator, value, onChange, fieldMeta }: ValueInputProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ export type TagInputProps = {
2
+ value?: string[];
3
+ onChange?: (value: string[]) => void;
4
+ type?: "text" | "number";
5
+ placeholder?: string;
6
+ disabled?: boolean;
7
+ className?: string;
8
+ };
9
+ /**
10
+ * Tag Input 컴포넌트
11
+ *
12
+ * 콤마 또는 Enter로 태그 추가
13
+ * X 버튼으로 태그 제거
14
+ */
15
+ export declare function TagInput({ value, onChange, type, placeholder, disabled, className, }: TagInputProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- export { type SonamuContextValue, SonamuProvider, useSonamuBaseContext, } from './sonamu-context';
2
- export type { Dictionary, SDReturnType, SonamuAuth, SonamuFile } from './types';
1
+ export { type SonamuAuthClient, type SonamuContextValue, SonamuProvider, useSonamuBaseContext, } from './sonamu-context';
2
+ export type { Dictionary, SDReturnType, SonamuFile } from './types';
@@ -1,21 +1,26 @@
1
+ import { BetterAuthClientOptions } from 'better-auth/client';
2
+ import { createAuthClient } from 'better-auth/react';
1
3
  import { ReactNode } from 'react';
2
- import { Dictionary, SDReturnType, SonamuAuth, SonamuFile } from './types';
3
- export interface SonamuContextValue<D extends Dictionary = Dictionary, TUser = any, TLoginParams = any> {
4
+ import { Dictionary, SDReturnType, SonamuFile } from './types';
5
+ /** createAuthClient의 반환 타입을 옵션으로부터 추론하는 유틸리티 타입 */
6
+ export type SonamuAuthClient<O extends BetterAuthClientOptions> = ReturnType<typeof createAuthClient<O>>;
7
+ export interface SonamuContextValue<D extends Dictionary = Dictionary, O extends BetterAuthClientOptions = BetterAuthClientOptions> {
4
8
  uploader?: (files: File[]) => Promise<SonamuFile[]>;
5
- auth?: SonamuAuth<TUser, TLoginParams>;
9
+ auth?: SonamuAuthClient<O>;
6
10
  SD?: <K extends keyof D>(key: K) => SDReturnType<D, K>;
7
11
  }
8
- export interface SonamuProviderProps<D extends Dictionary = Dictionary, TUser = any, TLoginParams = any> extends SonamuContextValue<D, TUser, TLoginParams> {
12
+ export interface SonamuProviderProps<D extends Dictionary = Dictionary, O extends BetterAuthClientOptions = BetterAuthClientOptions> extends SonamuContextValue<D, O> {
9
13
  children: ReactNode;
14
+ authOptions?: O;
10
15
  }
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;
16
+ export declare function SonamuProvider<D extends Dictionary = Dictionary, O extends BetterAuthClientOptions = BetterAuthClientOptions>({ children, authOptions, ...value }: SonamuProviderProps<D, O>): import("react/jsx-runtime").JSX.Element;
12
17
  /**
13
18
  * 타입이 지정된 useSonamuContext를 만들기 위한 베이스 훅
14
19
  *
15
20
  * @example
16
21
  * // contexts/sonamu-provider.tsx
17
22
  * export function useSonamuContext() {
18
- * return useSonamuBaseContext<MergedDictionary, UserSubsetSS, UserLoginParams>();
23
+ * return useSonamuBaseContext<MergedDictionary>();
19
24
  * }
20
25
  */
21
- export declare function useSonamuBaseContext<D extends Dictionary = Dictionary, TUser = any, TLoginParams = any>(): Required<SonamuContextValue<D, TUser, TLoginParams>>;
26
+ export declare function useSonamuBaseContext<D extends Dictionary = Dictionary, O extends BetterAuthClientOptions = BetterAuthClientOptions>(): Required<SonamuContextValue<D, O>>;
@@ -8,13 +8,6 @@ export type SonamuFile = {
8
8
  mime_type: string;
9
9
  size: number;
10
10
  };
11
- export type SonamuAuth<TUser = any, TLoginParams = any> = {
12
- user: TUser | null;
13
- loading: boolean;
14
- login: (params: TLoginParams) => void;
15
- logout: () => void;
16
- refetch: () => void;
17
- };
18
11
  export type Dictionary = Record<string, string | ((...args: any[]) => string)>;
19
12
  /**
20
13
  * SD 반환 타입 - 제네릭으로 키에 따라 정확한 타입 반환
@@ -57,6 +57,20 @@ export declare const rcKeysKo: {
57
57
  "rc.calendar.month.9": string;
58
58
  "rc.calendar.month.10": string;
59
59
  "rc.calendar.month.11": string;
60
+ "rc.sonamuFilter.title": string;
61
+ "rc.sonamuFilter.apply": string;
62
+ "rc.sonamuFilter.reset": string;
63
+ "rc.sonamuFilter.addRule": string;
64
+ "rc.sonamuFilter.noRulesYet": string;
65
+ "rc.sonamuFilter.selectField": string;
66
+ "rc.sonamuFilter.selectOperator": string;
67
+ "rc.sonamuFilter.selectOperatorFirst": string;
68
+ "rc.sonamuFilter.enterValue": string;
69
+ "rc.sonamuFilter.enterNumber": string;
70
+ "rc.sonamuFilter.notSupported": string;
71
+ "rc.sonamuFilter.startDate": string;
72
+ "rc.sonamuFilter.endDate": string;
73
+ "rc.sonamuFilter.appliedFilters": string;
60
74
  "rc.common.cancel": string;
61
75
  "rc.common.save": string;
62
76
  };
@@ -115,6 +129,20 @@ export declare const rcKeysEn: {
115
129
  "rc.calendar.month.9": string;
116
130
  "rc.calendar.month.10": string;
117
131
  "rc.calendar.month.11": string;
132
+ "rc.sonamuFilter.title": string;
133
+ "rc.sonamuFilter.apply": string;
134
+ "rc.sonamuFilter.reset": string;
135
+ "rc.sonamuFilter.addRule": string;
136
+ "rc.sonamuFilter.noRulesYet": string;
137
+ "rc.sonamuFilter.selectField": string;
138
+ "rc.sonamuFilter.selectOperator": string;
139
+ "rc.sonamuFilter.selectOperatorFirst": string;
140
+ "rc.sonamuFilter.enterValue": string;
141
+ "rc.sonamuFilter.enterNumber": string;
142
+ "rc.sonamuFilter.notSupported": string;
143
+ "rc.sonamuFilter.startDate": string;
144
+ "rc.sonamuFilter.endDate": string;
145
+ "rc.sonamuFilter.appliedFilters": string;
118
146
  "rc.common.cancel": string;
119
147
  "rc.common.save": string;
120
148
  };
@@ -14,7 +14,6 @@ export type FormRegisterReturn = {
14
14
  export declare function useTypeForm<T extends z.ZodObject<any> | z.ZodArray<any>, U extends z.infer<T>>(zType: T, defaultValue: U): {
15
15
  form: z.core.output<T>;
16
16
  setForm: import('react').Dispatch<import('react').SetStateAction<z.core.output<T>>>;
17
- row: Record<string, any>;
18
17
  register: (objPath: string, _emptyStringTo?: "normal" | "nullable" | "optional") => FormRegisterReturn;
19
18
  submit: <R>(callback: (formData: z.infer<T>) => Promise<R>) => () => Promise<R>;
20
19
  addError: (objPath: string, errorMessage: string | ErrorObj) => void;
@@ -3,6 +3,7 @@ export { caster, fastifyCaster } from './caster';
3
3
  export { useTypeForm } from './form-helpers';
4
4
  export { useListParams, useSelection } from './list-helpers';
5
5
  export { useModal } from './modal-helpers';
6
- export type { ControlledModalProps, DistributiveOmit, ErrorObj, Override, PaginationProps, SonamuCol, TableColumnWidth, } from './types';
6
+ export type { ControlledModalProps, DistributiveOmit, ErrorObj, FilterOperator, FilterPropType, Override, PaginationProps, SonamuCol, TableColumnWidth, } from './types';
7
+ export { defaultOperatorByPropType, operatorsByPropType } from './types';
7
8
  export { useIsMobile } from './use-mobile';
8
9
  export { cn } from './utils';
@@ -24,3 +24,28 @@ export type SonamuCol<T> = {
24
24
  };
25
25
  export type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
26
26
  export type Override<T, U> = Omit<T, keyof U> & U;
27
+ /**
28
+ * Sonamu Filter 관련 타입 정의
29
+ */
30
+ export declare const operatorsByPropType: {
31
+ readonly string: readonly ["eq", "ne", "contains", "startsWith", "endsWith", "in", "notIn", "isNull", "isNotNull"];
32
+ readonly integer: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "in", "notIn", "between", "isNull", "isNotNull"];
33
+ readonly numeric: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "in", "notIn", "between", "isNull", "isNotNull"];
34
+ readonly boolean: readonly ["eq", "ne", "isNull", "isNotNull"];
35
+ readonly date: readonly ["eq", "ne", "before", "after", "between", "isNull", "isNotNull"];
36
+ readonly datetime: readonly ["eq", "ne", "before", "after", "between", "isNull", "isNotNull"];
37
+ readonly enum: readonly ["eq", "ne", "in", "notIn", "isNull", "isNotNull"];
38
+ readonly json: readonly ["isNull", "isNotNull"];
39
+ };
40
+ export declare const defaultOperatorByPropType: {
41
+ readonly string: "contains";
42
+ readonly integer: "eq";
43
+ readonly numeric: "eq";
44
+ readonly boolean: "eq";
45
+ readonly date: "eq";
46
+ readonly datetime: "eq";
47
+ readonly enum: "eq";
48
+ readonly json: "isNull";
49
+ };
50
+ export type FilterPropType = keyof typeof operatorsByPropType;
51
+ export type FilterOperator = (typeof operatorsByPropType)[keyof typeof operatorsByPropType][number];