@komensal/ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +420 -0
- package/dist/index.js +1710 -0
- package/dist/index.js.map +1 -0
- package/dist/locales/index.d.ts +34 -0
- package/dist/locales/index.js +40 -0
- package/dist/locales/index.js.map +1 -0
- package/package.json +24 -8
- package/src/components/alert.tsx +0 -45
- package/src/components/auth-header.tsx +0 -26
- package/src/components/button.tsx +0 -121
- package/src/components/command.tsx +0 -125
- package/src/components/dialog.tsx +0 -118
- package/src/components/form-fields/index.ts +0 -5
- package/src/components/form-fields/input-field.tsx +0 -131
- package/src/components/form-fields/label-field.tsx +0 -20
- package/src/components/form-fields/map-picker-field.tsx +0 -49
- package/src/components/form-fields/otp-field.tsx +0 -76
- package/src/components/form-fields/select-field.tsx +0 -77
- package/src/components/form.tsx +0 -138
- package/src/components/google-map-picker.tsx +0 -243
- package/src/components/input.tsx +0 -40
- package/src/components/label.tsx +0 -17
- package/src/components/loading.tsx +0 -19
- package/src/components/otp-input.tsx +0 -62
- package/src/components/password-checklist.tsx +0 -37
- package/src/components/popover.tsx +0 -31
- package/src/components/select-input.tsx +0 -236
- package/src/components/select.tsx +0 -143
- package/src/components/spinner.tsx +0 -61
- package/src/components/step-header.tsx +0 -16
- package/src/components/stepper.tsx +0 -69
- package/src/components/toast/index.ts +0 -2
- package/src/components/toast/toast-provider.tsx +0 -123
- package/src/components/toast/toast.tsx +0 -106
- package/src/components/tooltip.tsx +0 -56
- package/src/components/wrapper.tsx +0 -12
- package/src/index.ts +0 -27
- package/src/locales/es/ui.json +0 -28
- package/src/locales/index.ts +0 -7
- package/src/types/password.ts +0 -12
- package/src/types/toast.ts +0 -19
- package/src/utils/cn.ts +0 -6
- package/src/utils/index.ts +0 -3
- package/src/utils/styles.ts +0 -19
- package/src/utils/toast-emitter.ts +0 -37
- package/src/vite-env.d.ts +0 -3
- /package/{src → dist}/styles/index.css +0 -0
- /package/{src → dist}/styles/theme.css +0 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { ReactNode, JSX } from 'react';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
7
|
+
import * as react_hook_form from 'react-hook-form';
|
|
8
|
+
import { FieldValues, FieldPath, ControllerProps, Control, Path, FieldError, Noop } from 'react-hook-form';
|
|
9
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
10
|
+
import { OTPInput } from 'input-otp';
|
|
11
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
12
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
13
|
+
import { ClassValue } from 'clsx';
|
|
14
|
+
|
|
15
|
+
interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
variant?: AlertVariant;
|
|
17
|
+
}
|
|
18
|
+
type AlertVariant = 'error' | 'info' | 'success' | 'warning';
|
|
19
|
+
declare const Alert: ({ children, className, variant, ...props }: AlertProps) => React.JSX.Element;
|
|
20
|
+
|
|
21
|
+
interface AuthHeaderProps {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
logoAlt: string;
|
|
24
|
+
mobileClassName?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const AuthHeader: ({ children, logoAlt, mobileClassName }: AuthHeaderProps) => React.JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare const buttonVariants: (props?: ({
|
|
29
|
+
hoverStyle?: "none" | "highlight" | "shine" | null | undefined;
|
|
30
|
+
size?: "lg" | "sm" | "default" | "icon" | null | undefined;
|
|
31
|
+
variant?: "link" | "primary" | "destructive" | "ghost" | "invisible" | "outline" | "tertiary" | "underline" | null | undefined;
|
|
32
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
33
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
childrenClassName?: string;
|
|
36
|
+
hoverStyle?: 'highlight' | 'none' | 'shine';
|
|
37
|
+
icon?: React.ReactNode;
|
|
38
|
+
iconLeft?: React.ReactNode;
|
|
39
|
+
iconRight?: React.ReactNode;
|
|
40
|
+
isLoading?: boolean;
|
|
41
|
+
sideTooltip?: 'bottom' | 'left' | 'right' | 'top';
|
|
42
|
+
tooltip?: string;
|
|
43
|
+
}
|
|
44
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
45
|
+
|
|
46
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
47
|
+
children?: React.ReactNode;
|
|
48
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
49
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
50
|
+
} & {
|
|
51
|
+
asChild?: boolean;
|
|
52
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
53
|
+
label?: string;
|
|
54
|
+
shouldFilter?: boolean;
|
|
55
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
56
|
+
defaultValue?: string;
|
|
57
|
+
value?: string;
|
|
58
|
+
onValueChange?: (value: string) => void;
|
|
59
|
+
loop?: boolean;
|
|
60
|
+
disablePointerSelection?: boolean;
|
|
61
|
+
vimBindings?: boolean;
|
|
62
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
type CommandDialogProps = DialogProps;
|
|
64
|
+
declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => React.JSX.Element;
|
|
65
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
66
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
67
|
+
} & {
|
|
68
|
+
asChild?: boolean;
|
|
69
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
|
|
70
|
+
value?: string;
|
|
71
|
+
onValueChange?: (search: string) => void;
|
|
72
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
73
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
74
|
+
children?: React.ReactNode;
|
|
75
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
76
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
77
|
+
} & {
|
|
78
|
+
asChild?: boolean;
|
|
79
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
80
|
+
label?: string;
|
|
81
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
83
|
+
children?: React.ReactNode;
|
|
84
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
85
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
86
|
+
} & {
|
|
87
|
+
asChild?: boolean;
|
|
88
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
89
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
90
|
+
children?: React.ReactNode;
|
|
91
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
92
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
93
|
+
} & {
|
|
94
|
+
asChild?: boolean;
|
|
95
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
|
|
96
|
+
heading?: React.ReactNode;
|
|
97
|
+
value?: string;
|
|
98
|
+
forceMount?: boolean;
|
|
99
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
100
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
101
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
102
|
+
} & {
|
|
103
|
+
asChild?: boolean;
|
|
104
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
105
|
+
alwaysRender?: boolean;
|
|
106
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
108
|
+
children?: React.ReactNode;
|
|
109
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
110
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
111
|
+
} & {
|
|
112
|
+
asChild?: boolean;
|
|
113
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
114
|
+
disabled?: boolean;
|
|
115
|
+
onSelect?: (value: string) => void;
|
|
116
|
+
value?: string;
|
|
117
|
+
keywords?: string[];
|
|
118
|
+
forceMount?: boolean;
|
|
119
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
120
|
+
declare const CommandShortcut: {
|
|
121
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
122
|
+
displayName: string;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
126
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
127
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
128
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
129
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
130
|
+
isAbsolute?: boolean;
|
|
131
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
132
|
+
interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
133
|
+
container?: HTMLElement | null;
|
|
134
|
+
isAbsolute?: boolean;
|
|
135
|
+
isCloseIcon?: boolean;
|
|
136
|
+
overlayClassName?: string;
|
|
137
|
+
}
|
|
138
|
+
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
139
|
+
declare const DialogHeader: {
|
|
140
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
141
|
+
displayName: string;
|
|
142
|
+
};
|
|
143
|
+
declare const DialogFooter: {
|
|
144
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
145
|
+
displayName: string;
|
|
146
|
+
};
|
|
147
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
148
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
149
|
+
|
|
150
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
151
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
152
|
+
declare const useFormField: () => {
|
|
153
|
+
invalid: boolean;
|
|
154
|
+
isDirty: boolean;
|
|
155
|
+
isTouched: boolean;
|
|
156
|
+
isValidating: boolean;
|
|
157
|
+
error?: react_hook_form.FieldError;
|
|
158
|
+
formDescriptionId: string;
|
|
159
|
+
formItemId: string;
|
|
160
|
+
formMessageId: string;
|
|
161
|
+
id: string;
|
|
162
|
+
name: string;
|
|
163
|
+
};
|
|
164
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
165
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
166
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement> & {
|
|
167
|
+
children?: React.ReactNode;
|
|
168
|
+
} & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
169
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
170
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
171
|
+
|
|
172
|
+
interface InputFieldProps<T extends FieldValues = FieldValues> {
|
|
173
|
+
control: Control<T>;
|
|
174
|
+
disabled?: boolean;
|
|
175
|
+
inputClassName?: string;
|
|
176
|
+
isClearable?: boolean;
|
|
177
|
+
label?: string;
|
|
178
|
+
labelClassName?: string;
|
|
179
|
+
mainClassName?: string;
|
|
180
|
+
name: Path<T>;
|
|
181
|
+
onClear?: () => void;
|
|
182
|
+
placeholder?: string;
|
|
183
|
+
type?: string;
|
|
184
|
+
visualRequired?: boolean;
|
|
185
|
+
}
|
|
186
|
+
declare const InputField: <T extends FieldValues = FieldValues>({ control, disabled, inputClassName, isClearable, label, labelClassName, mainClassName, name, onClear, placeholder, type, visualRequired }: InputFieldProps<T>) => React.JSX.Element;
|
|
187
|
+
|
|
188
|
+
interface LabelFieldProps {
|
|
189
|
+
label?: string;
|
|
190
|
+
labelClassName?: string;
|
|
191
|
+
name: string;
|
|
192
|
+
visualRequired?: boolean;
|
|
193
|
+
}
|
|
194
|
+
declare const LabelField: ({ label, labelClassName, name, visualRequired }: LabelFieldProps) => React.JSX.Element;
|
|
195
|
+
|
|
196
|
+
interface GoogleMapPickerProps {
|
|
197
|
+
centerOn?: google.maps.LatLngLiteral;
|
|
198
|
+
disabled?: boolean;
|
|
199
|
+
hasError?: boolean;
|
|
200
|
+
locationQuery?: string;
|
|
201
|
+
locationZoom?: number;
|
|
202
|
+
onChange: (address: string) => void;
|
|
203
|
+
placeholder?: string;
|
|
204
|
+
value: string;
|
|
205
|
+
}
|
|
206
|
+
declare const GoogleMapPicker: (props: GoogleMapPickerProps) => React.JSX.Element;
|
|
207
|
+
|
|
208
|
+
type MapPickerFieldProps<T extends FieldValues> = Omit<GoogleMapPickerProps, 'hasError' | 'onChange' | 'value'> & {
|
|
209
|
+
control: Control<T>;
|
|
210
|
+
label?: string;
|
|
211
|
+
labelClassName?: string;
|
|
212
|
+
mainClassName?: string;
|
|
213
|
+
name: Path<T>;
|
|
214
|
+
visualRequired?: boolean;
|
|
215
|
+
};
|
|
216
|
+
declare const MapPickerField: <T extends FieldValues>({ control, label, labelClassName, mainClassName, name, visualRequired, ...pickerProps }: MapPickerFieldProps<T>) => React.JSX.Element;
|
|
217
|
+
|
|
218
|
+
interface OtpInputFormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
|
|
219
|
+
autoFocus?: boolean;
|
|
220
|
+
className?: string;
|
|
221
|
+
containerClassName?: string;
|
|
222
|
+
control: Control<TFieldValues>;
|
|
223
|
+
disabled?: boolean;
|
|
224
|
+
label?: string;
|
|
225
|
+
labelClassName?: string;
|
|
226
|
+
name: TName;
|
|
227
|
+
otpLength?: number;
|
|
228
|
+
}
|
|
229
|
+
declare function OTPField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ autoFocus, className, containerClassName, control, disabled, label, labelClassName, name, otpLength }: OtpInputFormFieldProps<TFieldValues, TName>): React__default.JSX.Element;
|
|
230
|
+
|
|
231
|
+
interface Options {
|
|
232
|
+
label: string;
|
|
233
|
+
value: number | string;
|
|
234
|
+
}
|
|
235
|
+
interface SelectFieldProps<T extends FieldValues = FieldValues> {
|
|
236
|
+
ableDeleteOption?: boolean;
|
|
237
|
+
className?: string;
|
|
238
|
+
control: Control<T>;
|
|
239
|
+
disabled?: boolean;
|
|
240
|
+
label?: string;
|
|
241
|
+
labelClassName?: string;
|
|
242
|
+
mainClassName?: string;
|
|
243
|
+
name: Path<T>;
|
|
244
|
+
onChange?: (...event: unknown[]) => void;
|
|
245
|
+
options: Options[] | undefined;
|
|
246
|
+
placeholder?: string;
|
|
247
|
+
search?: boolean;
|
|
248
|
+
visualRequired?: boolean;
|
|
249
|
+
}
|
|
250
|
+
declare const SelectField: <T extends FieldValues = FieldValues>({ ableDeleteOption, className, control, disabled, label, labelClassName, mainClassName, name, options, placeholder, search, visualRequired }: SelectFieldProps<T>) => React.JSX.Element;
|
|
251
|
+
|
|
252
|
+
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
253
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
254
|
+
|
|
255
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
256
|
+
|
|
257
|
+
interface LoadingProps {
|
|
258
|
+
className?: string;
|
|
259
|
+
isSpinner?: boolean;
|
|
260
|
+
}
|
|
261
|
+
declare function Loading({ className, isSpinner }: Readonly<LoadingProps>): React.JSX.Element;
|
|
262
|
+
|
|
263
|
+
declare function InputOTP({ className, containerClassName, ...props }: React__default.ComponentProps<typeof OTPInput> & {
|
|
264
|
+
containerClassName?: string;
|
|
265
|
+
}): React__default.JSX.Element;
|
|
266
|
+
declare function InputOTPGroup({ className, ...props }: React__default.ComponentProps<'div'>): React__default.JSX.Element;
|
|
267
|
+
declare function InputOTPSlot({ className, index, ...props }: React__default.ComponentProps<'div'> & {
|
|
268
|
+
index: number;
|
|
269
|
+
}): React__default.JSX.Element;
|
|
270
|
+
|
|
271
|
+
interface PasswordRule {
|
|
272
|
+
key: string;
|
|
273
|
+
label: string;
|
|
274
|
+
test: (value: string) => boolean;
|
|
275
|
+
}
|
|
276
|
+
interface PasswordRulesConfig {
|
|
277
|
+
hasNumber?: boolean;
|
|
278
|
+
hasSpecialChar?: boolean;
|
|
279
|
+
hasUpperAndLower?: boolean;
|
|
280
|
+
minLength?: false | number;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
interface PasswordChecklistProps {
|
|
284
|
+
className?: string;
|
|
285
|
+
rules: PasswordRule[];
|
|
286
|
+
value: string;
|
|
287
|
+
}
|
|
288
|
+
declare const PasswordChecklist: ({ className, rules, value }: PasswordChecklistProps) => React__default.JSX.Element | null;
|
|
289
|
+
|
|
290
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
291
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
292
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
293
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
294
|
+
|
|
295
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
296
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
297
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
298
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
299
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
300
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
301
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
302
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
303
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
304
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
305
|
+
|
|
306
|
+
interface SelectInputProps<Label extends string, Value extends string> {
|
|
307
|
+
ableDeleteOption?: boolean;
|
|
308
|
+
className?: string;
|
|
309
|
+
disabled?: boolean;
|
|
310
|
+
error?: FieldError;
|
|
311
|
+
items?: null | Record<Label | Value, number | string>[];
|
|
312
|
+
labelKey?: string;
|
|
313
|
+
leftIcon?: JSX.Element;
|
|
314
|
+
loading?: boolean;
|
|
315
|
+
onBlur?: Noop;
|
|
316
|
+
onChange?: (...event: unknown[]) => void;
|
|
317
|
+
onValueChangeCallBack?: (item: {
|
|
318
|
+
label: string;
|
|
319
|
+
value: string;
|
|
320
|
+
}) => void;
|
|
321
|
+
placeholder?: string;
|
|
322
|
+
placeholderClassName?: string;
|
|
323
|
+
search?: boolean;
|
|
324
|
+
timeField?: boolean;
|
|
325
|
+
value?: string;
|
|
326
|
+
valueKey?: string;
|
|
327
|
+
}
|
|
328
|
+
declare const SelectInput: <Label extends string, Value extends string>(props: SelectInputProps<Label, Value>) => JSX.Element;
|
|
329
|
+
|
|
330
|
+
declare const sizes: {
|
|
331
|
+
lg: string;
|
|
332
|
+
md: string;
|
|
333
|
+
sm: string;
|
|
334
|
+
xl: string;
|
|
335
|
+
xs: string;
|
|
336
|
+
};
|
|
337
|
+
declare const variants: {
|
|
338
|
+
light: string;
|
|
339
|
+
primary: string;
|
|
340
|
+
secondary: string;
|
|
341
|
+
};
|
|
342
|
+
interface SpinnerProps {
|
|
343
|
+
className?: string;
|
|
344
|
+
size?: keyof typeof sizes;
|
|
345
|
+
variant?: keyof typeof variants;
|
|
346
|
+
}
|
|
347
|
+
declare const Spinner: ({ className, size, variant }: SpinnerProps) => React.JSX.Element;
|
|
348
|
+
|
|
349
|
+
interface StepHeaderProps {
|
|
350
|
+
subtitle?: ReactNode;
|
|
351
|
+
subtitleClassName?: string;
|
|
352
|
+
title: string;
|
|
353
|
+
}
|
|
354
|
+
declare const StepHeader: ({ subtitle, subtitleClassName, title }: StepHeaderProps) => React.JSX.Element;
|
|
355
|
+
|
|
356
|
+
interface StepperStep {
|
|
357
|
+
label: string;
|
|
358
|
+
}
|
|
359
|
+
interface StepperProps {
|
|
360
|
+
activeIndex: number;
|
|
361
|
+
className?: string;
|
|
362
|
+
intermediate?: boolean;
|
|
363
|
+
steps: StepperStep[];
|
|
364
|
+
}
|
|
365
|
+
declare const Stepper: ({ activeIndex, className, intermediate, steps }: StepperProps) => React.JSX.Element;
|
|
366
|
+
|
|
367
|
+
interface ToastOptions {
|
|
368
|
+
duration?: number;
|
|
369
|
+
position?: ToastPosition;
|
|
370
|
+
subtitle?: string;
|
|
371
|
+
title: string;
|
|
372
|
+
}
|
|
373
|
+
type ToastPosition = 'bottom' | 'bottom-left' | 'bottom-right' | 'center' | 'middle-bottom' | 'middle-top' | 'top' | 'top-left' | 'top-right';
|
|
374
|
+
type ToastType = 'error' | 'info' | 'success' | 'wait' | 'warning';
|
|
375
|
+
|
|
376
|
+
interface ToastProps {
|
|
377
|
+
duration?: number;
|
|
378
|
+
id: string;
|
|
379
|
+
onClose: (id: string) => void;
|
|
380
|
+
subtitle?: string;
|
|
381
|
+
title: string;
|
|
382
|
+
type: ToastType;
|
|
383
|
+
}
|
|
384
|
+
declare function Toast({ duration, id, onClose, subtitle, title, type }: ToastProps): React.JSX.Element;
|
|
385
|
+
|
|
386
|
+
declare function ToastProvider(): React.JSX.Element;
|
|
387
|
+
|
|
388
|
+
interface TooltipProps {
|
|
389
|
+
children: React.ReactNode;
|
|
390
|
+
childrenClassName?: string;
|
|
391
|
+
className?: string;
|
|
392
|
+
message: string;
|
|
393
|
+
sideTooltip?: 'bottom' | 'left' | 'right' | 'top';
|
|
394
|
+
}
|
|
395
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
396
|
+
|
|
397
|
+
interface WrapperProps {
|
|
398
|
+
children: ReactNode;
|
|
399
|
+
className?: string;
|
|
400
|
+
}
|
|
401
|
+
declare const Wrapper: ({ children, className }: WrapperProps) => React.JSX.Element;
|
|
402
|
+
|
|
403
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
404
|
+
|
|
405
|
+
declare const inputBase: string;
|
|
406
|
+
declare const inputPlaceholder: string;
|
|
407
|
+
declare const inputDisabled: string;
|
|
408
|
+
declare const inputFocus: string;
|
|
409
|
+
|
|
410
|
+
type ToastEmitter = ((type: ToastType, options: ToastOptions) => void) | null;
|
|
411
|
+
declare const toast: {
|
|
412
|
+
error(options: string | ToastOptions): void;
|
|
413
|
+
info(options: string | ToastOptions): void;
|
|
414
|
+
success(options: string | ToastOptions): void;
|
|
415
|
+
wait(options: string | ToastOptions): void;
|
|
416
|
+
warning(options: string | ToastOptions): void;
|
|
417
|
+
};
|
|
418
|
+
declare function registerToastEmitter(fn: ToastEmitter): void;
|
|
419
|
+
|
|
420
|
+
export { Alert, AuthHeader, Button, type ButtonProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GoogleMapPicker, type GoogleMapPickerProps, Input, InputField, InputOTP, InputOTPGroup, InputOTPSlot, type InputProps, Label, LabelField, Loading, MapPickerField, OTPField, type Options, PasswordChecklist, type PasswordRule, type PasswordRulesConfig, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Select, SelectContent, SelectField, SelectGroup, SelectInput, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Spinner, type SpinnerProps, StepHeader, Stepper, type StepperStep, Toast, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, Tooltip, Wrapper, type WrapperProps, buttonVariants, cn, inputBase, inputDisabled, inputFocus, inputPlaceholder, registerToastEmitter, toast, useFormField };
|