@js-empire/emperor-ui 1.2.7 → 1.3.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.
Files changed (35) hide show
  1. package/dist/emperor-ui.js +160 -0
  2. package/dist/emperor-ui.umd.cjs +77 -0
  3. package/dist/globals.css +1 -0
  4. package/dist/icons/emperor-ui-logo.ico +0 -0
  5. package/dist/images/avatar-female.jpg +0 -0
  6. package/dist/images/avatar-male.jpg +0 -0
  7. package/dist/images/emperor-ui-logo.png +0 -0
  8. package/dist/index-CK7pu2VH.js +6 -0
  9. package/dist/index-DoF4sONu.js +60191 -0
  10. package/dist/index-yq9M8Mqg.js +291 -0
  11. package/dist/index.d.ts +1353 -0
  12. package/dist/src-UW24ZMRV-DZ8MyM4k.js +6 -0
  13. package/package.json +1 -4
  14. package/src/components/molecules/item-card/components/actions/index.ts +3 -0
  15. package/src/components/molecules/item-card/components/actions/item-actions-overlay.tsx +50 -0
  16. package/src/components/molecules/item-card/components/additions/index.ts +2 -0
  17. package/src/components/molecules/item-card/{item-banner.tsx → components/additions/item-banner.tsx} +1 -1
  18. package/src/components/molecules/item-card/{loading-item.tsx → components/additions/loading-item.tsx} +1 -1
  19. package/src/components/molecules/item-card/components/card/index.ts +4 -0
  20. package/src/components/molecules/item-card/{item-card-body.tsx → components/card/item-card-body.tsx} +2 -2
  21. package/src/components/molecules/item-card/{item-card-footer.tsx → components/card/item-card-footer.tsx} +6 -3
  22. package/src/components/molecules/item-card/{item-card-header.tsx → components/card/item-card-header.tsx} +6 -4
  23. package/src/components/molecules/item-card/{item-card.tsx → components/card/item-card.tsx} +14 -15
  24. package/src/components/molecules/item-card/components/index.ts +3 -0
  25. package/src/components/molecules/item-card/index.ts +2 -9
  26. package/src/components/molecules/item-card/stories/item-card.stories.tsx +2 -2
  27. package/src/components/molecules/item-card/styles/classes.ts +11 -8
  28. package/src/components/organisms/deletion-confirmor/deletion-confirmor.tsx +4 -8
  29. package/src/components/organisms/deletion-confirmor/stories/components.tsx +3 -0
  30. package/src/constants/card.tsx +15 -2
  31. package/src/index.ts +2 -0
  32. package/vite.config.ts +1 -0
  33. package/src/components/molecules/item-card/item-actions-overlay.tsx +0 -41
  34. /package/src/components/molecules/item-card/{item-actions-buttons.tsx → components/actions/item-actions-buttons.tsx} +0 -0
  35. /package/src/components/molecules/item-card/{item-actions-dropdown.tsx → components/actions/item-actions-dropdown.tsx} +0 -0
@@ -0,0 +1,1353 @@
1
+ import { AutocompleteItemProps } from '@heroui/autocomplete';
2
+ import { AutocompleteProps } from '@heroui/autocomplete';
3
+ import { ButtonProps } from '@heroui/button';
4
+ import { CardProps } from '@heroui/card';
5
+ import { CheckboxGroupProps } from '@heroui/checkbox';
6
+ import { CheckboxProps } from '@heroui/checkbox';
7
+ import { ChipProps } from '@heroui/chip';
8
+ import { ClassAttributes } from 'react';
9
+ import { ClassProp } from 'class-variance-authority/types';
10
+ import { ClassValue } from 'clsx';
11
+ import { ComponentProps } from 'react';
12
+ import { Context } from 'react';
13
+ import { Control } from 'react-hook-form';
14
+ import { CSSProperties } from 'react';
15
+ import { DatePickerProps } from '@heroui/date-picker';
16
+ import { Dispatch } from 'react';
17
+ import { DropdownItemProps } from '@heroui/dropdown';
18
+ import { DropdownProps } from '@heroui/dropdown';
19
+ import { ElementType } from 'react';
20
+ import { FieldErrors } from 'react-hook-form';
21
+ import { FieldValues } from 'react-hook-form';
22
+ import { ForwardRefExoticComponent } from 'react';
23
+ import { HTMLAttributes } from 'react';
24
+ import { InputProps } from '@heroui/input';
25
+ import { JSX } from 'react/jsx-runtime';
26
+ import { LiHTMLAttributes } from 'react';
27
+ import { ModalProps } from '@heroui/modal';
28
+ import { MotionProps } from 'framer-motion';
29
+ import { Path } from 'react-hook-form';
30
+ import { RadioGroupProps } from '@heroui/radio';
31
+ import { RadioProps } from '@heroui/radio';
32
+ import { ReactNode } from 'react';
33
+ import { ReactPortal } from 'react';
34
+ import { RefAttributes } from 'react';
35
+ import { SelectItemProps } from '@heroui/select';
36
+ import { SelectProps } from '@heroui/select';
37
+ import { SetStateAction } from 'react';
38
+ import { SliderProps } from '@heroui/slider';
39
+ import { SwitchProps } from '@heroui/switch';
40
+ import { TextAreaProps } from '@heroui/input';
41
+ import { ToastProps } from '@heroui/toast';
42
+ import { UseFormProps } from 'react-hook-form';
43
+ import { UseFormReturn } from 'react-hook-form';
44
+ import { VariantProps } from 'class-variance-authority';
45
+ import { Variants } from 'framer-motion';
46
+ import { z } from 'zod';
47
+ import { ZodType } from 'zod';
48
+
49
+ export declare type Address = {
50
+ country?: string;
51
+ street?: string;
52
+ city?: string;
53
+ state?: string;
54
+ zip?: string;
55
+ };
56
+
57
+ export declare const ALLOWED_DOC_TYPES: string[];
58
+
59
+ export declare const ALLOWED_IMAGES_TYPES: string[];
60
+
61
+ export declare const ALLOWED_PDF_TYPES: string[];
62
+
63
+ export declare type AppDirection = "ltr" | "rtl";
64
+
65
+ declare const ar: {
66
+ common: {};
67
+ toasts: {};
68
+ atoms: {
69
+ colorPicker: {
70
+ invalidColorFormat: string;
71
+ };
72
+ uploader: {
73
+ dropHere: string;
74
+ selectFile: string;
75
+ selectionTypes: string;
76
+ selectBtn: string;
77
+ errorUploadingFile: string;
78
+ maxNumImages: string;
79
+ errorUploadedTypes: string;
80
+ maxSizeExceededError: string;
81
+ duplicatesDenied: string;
82
+ };
83
+ };
84
+ molecules: {};
85
+ organisms: {
86
+ deletionConfirmor: {
87
+ confirm: string;
88
+ decline: string;
89
+ };
90
+ listings: {
91
+ emptyTitle: string;
92
+ emptyDescription: string;
93
+ };
94
+ };
95
+ templates: {};
96
+ };
97
+
98
+ export declare function AutocompleteField<TSchema extends FieldValues>({ autocompleteItemProps, autocompleteProps, options, name, }: Pick<FieldProps<TSchema>, "autocompleteItemProps" | "autocompleteProps" | "options" | "name">): JSX.Element;
99
+
100
+ export declare function AutocompleteFilter({ classNames, autocompleteProps, autocompleteItemProps, paramKey, options, }: Pick<FilterProps, "classNames" | "autocompleteProps" | "autocompleteItemProps" | "paramKey" | "options">): JSX.Element;
101
+
102
+ export declare function AvatarLabel(): JSX.Element | null;
103
+
104
+ export declare const Brand: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
105
+ variant?: null | undefined;
106
+ } & ClassProp) | undefined) => string> & SharedComponentProps & {
107
+ src?: string;
108
+ alt?: string;
109
+ name?: string;
110
+ isIconOnly?: boolean;
111
+ classNames?: {
112
+ base?: string;
113
+ logo?: string;
114
+ name?: string;
115
+ };
116
+ }, "ref"> & RefAttributes<HTMLElement>>;
117
+
118
+ export declare type BrandProps = SharedComponentProps & {
119
+ src?: string;
120
+ alt?: string;
121
+ name?: string;
122
+ isIconOnly?: boolean;
123
+ classNames?: {
124
+ base?: string;
125
+ logo?: string;
126
+ name?: string;
127
+ };
128
+ };
129
+
130
+ export declare function CheckboxField<TSchema extends FieldValues>({ checkboxProps, name, children, }: Pick<FieldProps<TSchema>, "checkboxProps" | "name" | "children">): JSX.Element;
131
+
132
+ export declare function CheckboxFilter({ classNames, checkboxProps, paramKey, }: Pick<FilterProps, "classNames" | "checkboxProps" | "paramKey">): JSX.Element;
133
+
134
+ export declare function CheckboxGroupFilter({ classNames, checkboxGroupProps, paramKey, options, }: Pick<FilterProps, "classNames" | "checkboxGroupProps" | "paramKey" | "options">): JSX.Element;
135
+
136
+ export declare function cn(...classes: ClassValue[]): string;
137
+
138
+ export declare function ColorPicker({ ...props }: ColorPickerProps): JSX.Element;
139
+
140
+ export declare type ColorPickerInputType = "free" | "preset";
141
+
142
+ export declare type ColorPickerProps = Omit<InputProps & SelectProps, "onChange" | "onValueChange" | "onSelectionChange" | "children" | "selectedKeys" | "defaultSelectedKeys" | "value"> & {
143
+ inputType: ColorPickerInputType;
144
+ presets?: string[];
145
+ onChange?: (value: string) => void;
146
+ value?: string;
147
+ defaultValue?: string;
148
+ };
149
+
150
+ export declare const Column: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & VariantProps<(props?: ({} & ClassProp) | undefined) => string> & SharedComponentProps, "ref"> & RefAttributes<HTMLElement>>;
151
+
152
+ export declare type ColumnProps = SharedComponentProps & {};
153
+
154
+ export declare type CompactSideBarProps = SideBarProps & {};
155
+
156
+ export declare type ComponentRadius = "none" | "sm" | "md" | "lg" | "full";
157
+
158
+ export declare type ComponentSize = "xs" | "sm" | "base" | "md" | "lg" | "xl";
159
+
160
+ export declare function compressImage(fileObject: FileObject, maxSizeMB?: number): Promise<FileObject | null>;
161
+
162
+ export declare type ConfigContextState = {
163
+ config: EmperorUIConfig;
164
+ };
165
+
166
+ export declare function ConfigProvider({ children, config, }: ConfigProviderProps): JSX.Element;
167
+
168
+ export declare type ConfigProviderProps = {
169
+ children: ReactNode;
170
+ config?: EmperorUIConfig;
171
+ };
172
+
173
+ export declare type Contacts = {
174
+ mobile?: string;
175
+ email?: string;
176
+ addresses?: Address[];
177
+ website?: string;
178
+ workingHours?: string;
179
+ };
180
+
181
+ export declare const contacts: Contacts;
182
+
183
+ export declare const Container: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & VariantProps<(props?: ({} & ClassProp) | undefined) => string> & SharedComponentProps, "ref"> & RefAttributes<HTMLElement>>;
184
+
185
+ export declare type ContainerProps = SharedComponentProps & {};
186
+
187
+ export declare function CopyButton({ value }: {
188
+ value: string;
189
+ }): JSX.Element;
190
+
191
+ export declare type CopyRights = {
192
+ year: number;
193
+ text: string;
194
+ };
195
+
196
+ export declare const copyRights: CopyRights;
197
+
198
+ export declare function CopyRightsBox({ copyRights, classNames }: FooterProps): JSX.Element;
199
+
200
+ export declare function DateFilter({ classNames, dateProps, paramKey, }: Pick<FilterProps, "classNames" | "dateProps" | "paramKey">): JSX.Element;
201
+
202
+ export declare const defaultEmperorUIConfig: EmperorUIConfig;
203
+
204
+ export declare function DeletionConfirmor({ isOpen, onClose, title, description, className, classNames, confirmProps, declineProps, }: DeletionConfirmorProps): JSX.Element;
205
+
206
+ export declare const deletionConfirmorBodyClasses: (props?: ({} & ClassProp) | undefined) => string;
207
+
208
+ export declare type DeletionConfirmorClassnames = {
209
+ base?: string;
210
+ content?: string;
211
+ header?: string;
212
+ body?: string;
213
+ footer?: string;
214
+ confirmButton?: string;
215
+ declineButton?: string;
216
+ };
217
+
218
+ export declare const deletionConfirmorContentClasses: (props?: ({} & ClassProp) | undefined) => string;
219
+
220
+ export declare const deletionConfirmorFooterClasses: (props?: ({} & ClassProp) | undefined) => string;
221
+
222
+ export declare const deletionConfirmorHeaderClasses: (props?: ({} & ClassProp) | undefined) => string;
223
+
224
+ export declare type DeletionConfirmorProps = {
225
+ isOpen: boolean;
226
+ onClose: () => void;
227
+ title: string;
228
+ description: string;
229
+ className?: string;
230
+ classNames?: DeletionConfirmorClassnames;
231
+ confirmProps?: ButtonProps;
232
+ declineProps?: ButtonProps;
233
+ };
234
+
235
+ export declare const deletionConfirmorStyles: ({}: {}) => CSSProperties;
236
+
237
+ export declare const DeletionConfirmorWithTrigger: (args: DeletionConfirmorProps) => JSX.Element;
238
+
239
+ export declare type EmperorUIConfig = {
240
+ layout?: Partial<EmperorUILayout>;
241
+ interLocalization?: Partial<EmperorUIInterLocalization>;
242
+ toast?: ToastProps;
243
+ theme?: Partial<EmperorUITheme>;
244
+ };
245
+
246
+ export declare const EmperorUIContext: Context<ConfigContextState | undefined>;
247
+
248
+ export declare type EmperorUIInterLocalization = {
249
+ lang?: EmperorUILang;
250
+ languages?: EmperorUILang[];
251
+ defaultLanguage?: EmperorUILang;
252
+ isMultiLingual?: boolean;
253
+ dir?: AppDirection;
254
+ locales?: EmperorUILocales;
255
+ };
256
+
257
+ export declare type EmperorUILang = "en" | "ar";
258
+
259
+ export declare type EmperorUILayout = {
260
+ withScaffold: boolean;
261
+ };
262
+
263
+ export declare type EmperorUILocales = Record<EmperorUILang, Partial<{
264
+ atoms?: {
265
+ uploader?: Partial<Locale["atoms"]["uploader"]>;
266
+ colorPicker?: Partial<Locale["atoms"]["colorPicker"]>;
267
+ };
268
+ }>>;
269
+
270
+ export declare function EmperorUIProvider({ children, ...props }: EmperorUIProviderProps): JSX.Element;
271
+
272
+ declare type EmperorUIProviderProps = ConfigProviderProps & {};
273
+
274
+ export declare type EmperorUITheme = {
275
+ components?: {
276
+ input?: InputProps;
277
+ textarea?: TextAreaProps;
278
+ button?: ButtonProps;
279
+ card?: CardProps;
280
+ dropdown?: DropdownProps;
281
+ modal?: ModalProps;
282
+ checkbox?: CheckboxProps;
283
+ checkboxGroup?: CheckboxGroupProps;
284
+ autocomplete?: Omit<AutocompleteProps, "children">;
285
+ autocompleteItem?: Omit<AutocompleteItemProps, "children">;
286
+ radio?: Omit<RadioProps, "children">;
287
+ select?: Omit<SelectProps, "children">;
288
+ selectItem?: Omit<SelectItemProps, "children">;
289
+ switch?: SwitchProps;
290
+ datePicker?: DatePickerProps;
291
+ slider?: SliderProps;
292
+ };
293
+ };
294
+
295
+ export declare function EmptyListings({ className, classNames, }: {
296
+ className?: string;
297
+ classNames?: {
298
+ wrapper?: string;
299
+ iconWrapper?: string;
300
+ title?: string;
301
+ description?: string;
302
+ };
303
+ }): JSX.Element;
304
+
305
+ export declare const emptyListingsClasses: (props?: ({} & ClassProp) | undefined) => string;
306
+
307
+ declare const en: {
308
+ common: {};
309
+ toasts: {};
310
+ atoms: {
311
+ colorPicker: {
312
+ invalidColorFormat: string;
313
+ };
314
+ uploader: {
315
+ dropHere: string;
316
+ selectFile: string;
317
+ selectionTypes: string;
318
+ selectBtn: string;
319
+ errorUploadingFile: string;
320
+ maxNumImages: string;
321
+ errorUploadedTypes: string;
322
+ maxSizeExceededError: string;
323
+ duplicatesDenied: string;
324
+ };
325
+ };
326
+ molecules: {};
327
+ organisms: {
328
+ deletionConfirmor: {
329
+ confirm: string;
330
+ decline: string;
331
+ };
332
+ listings: {
333
+ emptyTitle: string;
334
+ emptyDescription: string;
335
+ };
336
+ };
337
+ templates: {};
338
+ };
339
+
340
+ export declare const FAKE_PARAGRAPH = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,";
341
+
342
+ export declare const FAKE_SENTENCE = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.";
343
+
344
+ export declare function Field<TSchema extends FieldValues>({ className, classNames, name, type, inputProps, textareaProps, checkboxProps, selectProps, selectItemProps, autocompleteProps, autocompleteItemProps, switchProps, radioGroupProps, options, children, }: FieldProps<TSchema>): JSX.Element;
345
+
346
+ export declare const fieldClasses: (props?: ({
347
+ variant?: null | undefined;
348
+ } & ClassProp) | undefined) => string;
349
+
350
+ export declare type FieldClassnames = {
351
+ base?: string;
352
+ field?: string;
353
+ };
354
+
355
+ export declare type FieldOption = {
356
+ key: string;
357
+ label: string;
358
+ };
359
+
360
+ export declare type FieldProps<TFieldValues extends FieldValues = FieldValues> = SharedComponentProps & FieldTypesProps & SharedFieldProps<TFieldValues>;
361
+
362
+ export declare type FieldType = "input" | "textarea" | "checkbox" | "select" | "autocomplete" | "switch" | "radio";
363
+
364
+ declare type FieldTypesProps = {
365
+ inputProps?: InputProps;
366
+ textareaProps?: TextAreaProps;
367
+ checkboxProps?: CheckboxProps;
368
+ selectProps?: Omit<SelectProps, "children" | "selectedKeys" | "onSelectionChange">;
369
+ selectItemProps?: SelectItemProps;
370
+ autocompleteProps?: Omit<AutocompleteProps, "children" | "selectedKey" | "onSelectionChange">;
371
+ autocompleteItemProps?: AutocompleteItemProps;
372
+ switchProps?: SwitchProps;
373
+ radioGroupProps?: Omit<RadioGroupProps, "children" | "value" | "onValueChange">;
374
+ };
375
+
376
+ export declare type FileObject = {
377
+ view?: string;
378
+ type?: FileType;
379
+ file?: File;
380
+ url?: string;
381
+ };
382
+
383
+ export declare type FileType = "image" | "doc" | "pdf" | "video" | "sheet";
384
+
385
+ export declare const fileTypesMapping: {
386
+ [key: string]: string[];
387
+ };
388
+
389
+ export declare function Filter({ className, type, searchProps, selectProps, autocompleteProps, dateProps, numericProps, checkboxProps, checkboxGroupProps, radioProps, switchProps, rangeProps, paramKey, options, ...props }: FilterProps): JSX.Element;
390
+
391
+ export declare const filterClasses: (props?: ({
392
+ type?: "search" | "select" | "switch" | "checkbox" | "radio" | "date" | "autocomplete" | "numeric" | "checkboxGroup" | "range" | null | undefined;
393
+ } & ClassProp) | undefined) => string;
394
+
395
+ export declare type FilterClassnames = {
396
+ base?: string;
397
+ field?: string;
398
+ };
399
+
400
+ export declare type FilterProps = SharedComponentProps & SelectFilterProps & FilterTypesProps & SharedFilterProps;
401
+
402
+ export declare type FiltersClassnames = {
403
+ base?: string;
404
+ };
405
+
406
+ export declare type FiltersProps = Omit<SharedComponentProps, "children"> & {
407
+ classNames?: FiltersClassnames;
408
+ children: ReactNode;
409
+ };
410
+
411
+ export declare type FilterType = "search" | "select" | "autocomplete" | "date" | "numeric" | "checkbox" | "checkboxGroup" | "switch" | "range";
412
+
413
+ declare type FilterTypesProps = {
414
+ searchProps?: InputProps;
415
+ selectProps?: Omit<SelectProps, "children">;
416
+ selectItemProps?: SelectItemProps;
417
+ autocompleteProps?: Omit<AutocompleteProps, "children">;
418
+ autocompleteItemProps?: AutocompleteItemProps;
419
+ dateProps?: DatePickerProps;
420
+ numericProps?: InputProps;
421
+ checkboxProps?: CheckboxProps;
422
+ checkboxGroupProps?: Omit<CheckboxGroupProps, "children">;
423
+ radioProps?: RadioProps;
424
+ switchProps?: SwitchProps;
425
+ rangeProps?: SliderProps;
426
+ };
427
+
428
+ export declare const Footer: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
429
+ variant?: "default" | null | undefined;
430
+ } & ClassProp) | undefined) => string> & SharedComponentProps & {
431
+ classNames?: FooterClassnames;
432
+ policies?: QuickLink[];
433
+ quickLinks?: QuickLinkCollection[];
434
+ socialLinks?: SocialLink[];
435
+ copyRights?: CopyRights;
436
+ contacts?: Contacts;
437
+ }, "ref"> & RefAttributes<HTMLElement>>;
438
+
439
+ export declare type FooterClassnames = {
440
+ base?: string;
441
+ content?: string;
442
+ policiesWrapper?: string;
443
+ policy?: string;
444
+ quickLinksWrapper?: string;
445
+ quickLinksTitle?: string;
446
+ quickLinksList?: string;
447
+ quickLinksItem?: string;
448
+ quickLinksLink?: string;
449
+ socialLinksWrapper?: string;
450
+ socialLink?: string;
451
+ copyRightsWrapper?: string;
452
+ copyRightsText?: string;
453
+ contactsWrapper?: string;
454
+ contact?: string;
455
+ };
456
+
457
+ export declare type FooterProps = SharedComponentProps & {
458
+ classNames?: FooterClassnames;
459
+ policies?: QuickLink[];
460
+ quickLinks?: QuickLinkCollection[];
461
+ socialLinks?: SocialLink[];
462
+ copyRights?: CopyRights;
463
+ contacts?: Contacts;
464
+ };
465
+
466
+ export declare function FormBuilder<TSchema extends ZodType<any, any, any>>({ children, className, classNames, formProps, onSubmit, onSuccess, onError, onValuesChange, }: FormBuilderProps<TSchema>): JSX.Element;
467
+
468
+ export declare const FormBuilderContext: Context<FormBuilderValue<FieldValues> | null>;
469
+
470
+ export declare type FormBuilderErrorArgs<TFieldValues extends FieldValues> = {
471
+ error?: unknown;
472
+ errors?: FieldErrors<TFieldValues>;
473
+ form: UseFormReturn<TFieldValues>;
474
+ };
475
+
476
+ export declare type FormBuilderProps<TSchema extends ZodType<any, any, any>> = Omit<SharedComponentProps, "children"> & {
477
+ children: ReactNode;
478
+ formProps?: UseFormProps<z.infer<TSchema>>;
479
+ onSubmit: (values: z.infer<TSchema>) => Promise<unknown> | unknown;
480
+ onSuccess?: (values: z.infer<TSchema>) => void;
481
+ onError?: (error: unknown) => void;
482
+ /** Called whenever form values change. Use this to read values outside FormBuilder (e.g. in parent state). */
483
+ onValuesChange?: (values: Partial<z.infer<TSchema>>) => void;
484
+ };
485
+
486
+ export declare function FormBuilderProvider<TSchema extends FieldValues>({ children, value, }: {
487
+ children: ReactNode;
488
+ value: FormBuilderValue<TSchema>;
489
+ }): JSX.Element;
490
+
491
+ export declare type FormBuilderSubmitArgs<TFieldValues extends FieldValues> = {
492
+ values: TFieldValues;
493
+ form: UseFormReturn<TFieldValues>;
494
+ };
495
+
496
+ export declare type FormBuilderSuccessArgs<TFieldValues extends FieldValues> = {
497
+ values: TFieldValues;
498
+ form: UseFormReturn<TFieldValues>;
499
+ };
500
+
501
+ export declare type FormBuilderValue<TSchema extends FieldValues> = {
502
+ control: Control<TSchema, any, TSchema>;
503
+ formValues: Partial<TSchema>;
504
+ };
505
+
506
+ export declare function FreeColorPicker({ className, classNames, value, onChange, defaultValue, inputType, ...props }: ColorPickerProps): JSX.Element;
507
+
508
+ export declare const getAllowedTypes: (fileTypes: FileType[]) => string[];
509
+
510
+ export declare const getCardMotion: ({}: {
511
+ hoverEffect: ItemCardHoverEffect;
512
+ }) => MotionProps;
513
+
514
+ export declare const getListing: () => Promise<{
515
+ item?: MockItemType | null | undefined;
516
+ }>;
517
+
518
+ export declare const getListings: ({ page, pageSize, }: {
519
+ page?: number;
520
+ pageSize?: number;
521
+ }) => Promise<{
522
+ items: MockItemType[];
523
+ }>;
524
+
525
+ export declare const getStorybookDecorators: ({ config, }: {
526
+ config?: EmperorUIConfig;
527
+ }) => ((Story: any) => JSX.Element)[];
528
+
529
+ export declare const Header: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
530
+ variant?: "default" | "floating" | "light" | "segmented-floating" | null | undefined;
531
+ } & ClassProp) | undefined) => string> & SharedComponentProps & {
532
+ variant?: HeaderVariant;
533
+ classNames?: HeaderClassnames;
534
+ glassEffect?: HeaderGlassEffect;
535
+ }, "ref"> & RefAttributes<HTMLElement>>;
536
+
537
+ export declare type HeaderActivations = {
538
+ hideLog?: boolean;
539
+ hideNavbar?: boolean;
540
+ hideUserDropdown?: boolean;
541
+ hideSideMenu?: boolean;
542
+ };
543
+
544
+ export declare type HeaderClassnames = {
545
+ base?: string;
546
+ logo?: string;
547
+ navbar?: string;
548
+ userDropdown?: string;
549
+ sideMenu?: string;
550
+ };
551
+
552
+ export declare type HeaderDropdownProps = SharedComponentProps & {};
553
+
554
+ export declare type HeaderGlassEffect = {
555
+ enabled?: boolean;
556
+ blur?: number;
557
+ backgroundColor?: string;
558
+ foregroundColor?: string;
559
+ opacity?: number;
560
+ };
561
+
562
+ export declare type HeaderProps = SharedComponentProps & {
563
+ variant?: HeaderVariant;
564
+ classNames?: HeaderClassnames;
565
+ glassEffect?: HeaderGlassEffect;
566
+ };
567
+
568
+ export declare type HeaderStylesProps = {
569
+ primaryColor?: string;
570
+ foregroundColor?: string;
571
+ variant?: HeaderVariant;
572
+ glassEffect?: HeaderGlassEffect;
573
+ };
574
+
575
+ export declare type HeaderVariant = "default" | "floating" | "light" | "segmented-floating";
576
+
577
+ export declare function InputField<TSchema extends FieldValues>({ inputProps, name, }: Pick<FieldProps<TSchema>, "inputProps" | "name">): JSX.Element;
578
+
579
+ export declare const isFileDuplicated: ({ files, fileName, }: {
580
+ files: FileObject[];
581
+ fileName: string;
582
+ }) => boolean;
583
+
584
+ export declare const isMaxFileSizeExceeded: ({ fileSize, maxFileSize, }: {
585
+ fileSize: number;
586
+ maxFileSize: number;
587
+ }) => boolean;
588
+
589
+ export declare const ITEM_CARD_ACTIONS: ItemCardAction[];
590
+
591
+ export declare const ITEM_CARD_ACTIONS_OVERLAY: ItemCardAction[];
592
+
593
+ export declare function ItemActionsButtons({ actions, classNames, onActionClick, className, }: ItemActionsButtonsProps): JSX.Element | null;
594
+
595
+ declare type ItemActionsButtonsProps = Pick<ItemCardProps, "actions" | "classNames" | "onActionClick"> & {
596
+ className?: string;
597
+ };
598
+
599
+ export declare function ItemActionsDropdown({ actions, classNames, onActionClick, }: Pick<ItemCardProps, "actions" | "classNames" | "onActionClick">): JSX.Element | null;
600
+
601
+ export declare function ItemActionsOverlay({ actions, classNames, onActionClick, orientation, }: ItemActionsOverlayProps): JSX.Element | null;
602
+
603
+ declare type ItemActionsOverlayProps = Pick<ItemCardProps, "actions" | "classNames" | "onActionClick" | "orientation">;
604
+
605
+ export declare function ItemBanner({ item, orientation, classNames, }: Pick<ItemCardProps, "item" | "orientation" | "classNames">): JSX.Element | null;
606
+
607
+ export declare const itemBannerClasses: (props?: ({
608
+ orientation?: "horizontal" | "vertical" | null | undefined;
609
+ } & ClassProp) | undefined) => string;
610
+
611
+ export declare const itemBodyClasses: (props?: ({
612
+ orientation?: "horizontal" | "vertical" | null | undefined;
613
+ } & ClassProp) | undefined) => string;
614
+
615
+ export declare function ItemCard({ variants, isLoading, className, classNames, item, actions, hoverEffect, onActionClick, orientation: defaultOrientation, actionsViewVariant, }: ItemCardProps): JSX.Element;
616
+
617
+ export declare type ItemCardAction = DropdownItemProps & ButtonProps & {
618
+ key: string;
619
+ label: string;
620
+ };
621
+
622
+ export declare type ItemCardActionsViewVariant = "dropdown" | "buttons" | "hover-overlay";
623
+
624
+ export declare function ItemCardBody({ item, orientation, classNames, actions, onActionClick, actionsViewVariant, }: Pick<ItemCardProps, "item" | "orientation" | "classNames" | "actions" | "onActionClick" | "actionsViewVariant">): JSX.Element;
625
+
626
+ export declare type ItemCardClassnames = {
627
+ base?: string;
628
+ image?: string;
629
+ header?: string;
630
+ footer?: string;
631
+ imageWrapper?: string;
632
+ mainWrapper?: string;
633
+ banner?: string;
634
+ dropdown?: string;
635
+ body?: string;
636
+ title?: string;
637
+ price?: string;
638
+ description?: string;
639
+ chips?: string;
640
+ chip?: string;
641
+ actions?: string;
642
+ action?: string;
643
+ };
644
+
645
+ export declare function ItemCardFooter({ item, orientation, classNames, actions, onActionClick, actionsViewVariant, }: Pick<ItemCardProps, "item" | "orientation" | "classNames" | "actions" | "onActionClick" | "actionsViewVariant">): JSX.Element;
646
+
647
+ export declare function ItemCardHeader({ item, orientation, classNames, actions, onActionClick, actionsViewVariant, }: Pick<ItemCardProps, "item" | "orientation" | "classNames" | "actions" | "onActionClick" | "actionsViewVariant">): JSX.Element;
648
+
649
+ export declare type ItemCardHoverEffect = "none" | "zoom" | "rotate";
650
+
651
+ export declare const itemCardMotionClasses: (props?: ({
652
+ orientation?: "horizontal" | "vertical" | null | undefined;
653
+ } & ClassProp) | undefined) => string;
654
+
655
+ export declare type ItemCardOrientation = "horizontal" | "vertical";
656
+
657
+ export declare type ItemCardProps = SharedComponentProps & {
658
+ variants?: Variants;
659
+ isLoading?: boolean;
660
+ hoverEffect?: ItemCardHoverEffect;
661
+ classNames?: ItemCardClassnames;
662
+ item: ItemProps;
663
+ actions?: ItemCardAction[];
664
+ onActionClick?: (key: string) => void;
665
+ orientation?: ItemCardOrientation;
666
+ actionsViewVariant?: ItemCardActionsViewVariant;
667
+ };
668
+
669
+ export declare type ItemChipProps = ChipProps & {
670
+ label: string;
671
+ };
672
+
673
+ export declare const itemChipsClasses: (props?: ({
674
+ orientation?: "horizontal" | "vertical" | null | undefined;
675
+ } & ClassProp) | undefined) => string;
676
+
677
+ export declare const itemDescriptionClasses: (props?: ({
678
+ orientation?: "horizontal" | "vertical" | null | undefined;
679
+ } & ClassProp) | undefined) => string;
680
+
681
+ export declare function ItemDetails({ className }: ItemDetailsProps): JSX.Element;
682
+
683
+ export declare type ItemDetailsClassnames = {
684
+ base?: string;
685
+ };
686
+
687
+ export declare type ItemDetailsProps = SharedComponentProps & {
688
+ classNames?: ItemDetailsClassnames;
689
+ };
690
+
691
+ export declare const itemFooterClasses: (props?: ({
692
+ orientation?: "horizontal" | "vertical" | null | undefined;
693
+ } & ClassProp) | undefined) => string;
694
+
695
+ export declare const itemHeaderClasses: (props?: ({
696
+ orientation?: "horizontal" | "vertical" | null | undefined;
697
+ } & ClassProp) | undefined) => string;
698
+
699
+ export declare const itemImageWrapperClasses: (props?: ({
700
+ orientation?: "horizontal" | "vertical" | null | undefined;
701
+ } & ClassProp) | undefined) => string;
702
+
703
+ export declare const itemMainWrapperClasses: (props?: ({
704
+ orientation?: "horizontal" | "vertical" | null | undefined;
705
+ } & ClassProp) | undefined) => string;
706
+
707
+ export declare const itemPriceClasses: (props?: ({
708
+ orientation?: "horizontal" | "vertical" | null | undefined;
709
+ } & ClassProp) | undefined) => string;
710
+
711
+ export declare type ItemProps = {
712
+ key: string;
713
+ title?: ReactNode;
714
+ description?: ReactNode;
715
+ image?: {
716
+ src: string;
717
+ alt: string;
718
+ };
719
+ chips?: ItemChipProps[];
720
+ banner?: ReactNode;
721
+ price?: ReactNode;
722
+ };
723
+
724
+ export declare const itemTitleClasses: (props?: ({
725
+ orientation?: "horizontal" | "vertical" | null | undefined;
726
+ } & ClassProp) | undefined) => string;
727
+
728
+ /**
729
+ * This component is not for general use nor it is reusable, it is intended to be used as a demo page.
730
+ */
731
+ export declare const LandingPage: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
732
+ variant?: "default" | null | undefined;
733
+ } & ClassProp) | undefined) => string> & SharedComponentProps & {
734
+ classNames?: LandingPageClassnames;
735
+ variant?: "default";
736
+ }, "ref"> & RefAttributes<HTMLDivElement>>;
737
+
738
+ export declare type LandingPageClassnames = {
739
+ base?: string;
740
+ };
741
+
742
+ export declare type LandingPageProps = SharedComponentProps & {
743
+ classNames?: LandingPageClassnames;
744
+ variant?: "default";
745
+ };
746
+
747
+ declare enum LangKey {
748
+ ARABIC = "ar",
749
+ ENGLISH = "en"
750
+ }
751
+
752
+ export declare function Listings({ items, isLoading, className, classNames, layout, actions, onActionClick, pagination, }: ListingsProps): JSX.Element;
753
+
754
+ export declare const listingsClasses: (props?: ({
755
+ layout?: "grid" | "list" | "carousel" | null | undefined;
756
+ } & ClassProp) | undefined) => string;
757
+
758
+ export declare type ListingsClassnames = {
759
+ base?: string;
760
+ item?: string;
761
+ pagination?: string;
762
+ };
763
+
764
+ export declare const listingsItemClasses: (props?: ({
765
+ layout?: "grid" | "list" | "carousel" | null | undefined;
766
+ } & ClassProp) | undefined) => string;
767
+
768
+ export declare type ListingsLayout = "grid" | "list" | "carousel";
769
+
770
+ export declare const listingsPaginationClasses: (props?: ({
771
+ layout?: "grid" | "list" | "carousel" | null | undefined;
772
+ } & ClassProp) | undefined) => string;
773
+
774
+ export declare type ListingsProps = SharedComponentProps & {
775
+ classNames?: ListingsClassnames;
776
+ layout?: ListingsLayout;
777
+ items: ItemCardProps[];
778
+ isLoading?: boolean;
779
+ actions?: ItemCardAction[];
780
+ onActionClick?: (key: string) => void;
781
+ pagination?: {
782
+ page: number;
783
+ setPage: (page: number) => void;
784
+ pageSize: number;
785
+ totalItemsCount: number;
786
+ pagesCount: number;
787
+ };
788
+ };
789
+
790
+ export declare const listingsStyles: ({}: {}) => CSSProperties;
791
+
792
+ export declare function LoadingItem({ className, classNames, hoverEffect, orientation, }: Pick<ItemCardProps, "className" | "classNames" | "hoverEffect" | "orientation">): JSX.Element;
793
+
794
+ declare type Locale = typeof ar | typeof en;
795
+
796
+ export declare const mapFileType: (fileType: string) => FileType | null;
797
+
798
+ /**
799
+ * Deep-merges config locales into default locales. Default values are used as base,
800
+ * and config values override only the keys they provide. Nested objects are merged
801
+ * recursively so unrelated keys at any level remain unchanged.
802
+ */
803
+ export declare const mergeLocales: ({ defaultLocales, configLocales, }: {
804
+ defaultLocales: Locale;
805
+ configLocales?: Partial<Locale>;
806
+ }) => Locale;
807
+
808
+ /**
809
+ * Merges uploader-specific locales with priority:
810
+ * 1) context-level overrides, 2) config-level locales, 3) default static locales.
811
+ */
812
+ export declare const mergeUploaderLocale: ({ defaultUploaderLocale, configUploaderLocale, contextUploaderLocale, }: {
813
+ defaultUploaderLocale: Locale["atoms"]["uploader"];
814
+ configUploaderLocale?: Locale["atoms"]["uploader"];
815
+ contextUploaderLocale?: Partial<Locale["atoms"]["uploader"]>;
816
+ }) => Locale["atoms"]["uploader"];
817
+
818
+ /** Default delay in ms for mock awaiting delete (e.g. in Storybook). */
819
+ export declare const MOCK_AWAITING_DELETE_MS = 2000;
820
+
821
+ export declare const MOCK_BASE_DATE: Date;
822
+
823
+ export declare const MOCK_COLORS: MockColor[];
824
+
825
+ export declare const MOCK_HEADER_ACTIONS: SideBarAction[];
826
+
827
+ export declare const MOCK_HEADER_ITEMS: NavigationItem[];
828
+
829
+ export declare const MOCK_HEADER_ITEMS_WITH_SUB_ITEMS: NavigationItem[];
830
+
831
+ export declare const MOCK_HEADER_SUB_ITEMS: NavigationItem[];
832
+
833
+ export declare const MOCK_ITEM_BRANDS: MockItemBrand[];
834
+
835
+ export declare const MOCK_ITEM_CATEGORIES: MockItemCategory[];
836
+
837
+ export declare const MOCK_ITEM_REVIEWS_1: MockReview[];
838
+
839
+ export declare const MOCK_ITEM_REVIEWS_2: MockReview[];
840
+
841
+ export declare const MOCK_ITEM_REVIEWS_3: MockReview[];
842
+
843
+ export declare const MOCK_LISTING_DESCRIPTIONS: string[];
844
+
845
+ export declare const MOCK_LISTING_IMAGES: string[];
846
+
847
+ export declare const MOCK_LISTING_TITLES: string[];
848
+
849
+ export declare const MOCK_LISTINGS: MockItemType[];
850
+
851
+ export declare const MOCK_REVIEW_AUTHORS: string[];
852
+
853
+ export declare const MOCK_REVIEW_COMMENTS: readonly string[];
854
+
855
+ /**
856
+ * Mocks an async delete: returns a function that resolves after a delay then calls onClose.
857
+ * Used for Storybook to simulate confirm-button loading state.
858
+ */
859
+ export declare const mockAwaitingDelete: (onClose: () => void, delayMs?: number) => () => Promise<void>;
860
+
861
+ export declare type MockColor = "red" | "blue" | "green" | "yellow" | "purple" | "orange" | "pink" | "brown" | "gray" | "black" | "white";
862
+
863
+ export declare type MockItemBrand = "Apple" | "Dell" | "HP" | "Lenovo" | "Asus" | "Acer" | "MSI" | "Razer" | "Samsung" | "Microsoft";
864
+
865
+ export declare type MockItemCategory = "laptops" | "desktops" | "monitors" | "keyboards" | "mice" | "headsets" | "printers" | "storage" | "components" | "networking";
866
+
867
+ export declare type MockItemType = {
868
+ id: number;
869
+ title: string;
870
+ description: string;
871
+ image: string;
872
+ price: number;
873
+ categories: ItemChipProps[];
874
+ isAvailable: boolean;
875
+ isBestSeller: boolean;
876
+ averageRating: number;
877
+ reviews: MockReview[];
878
+ brand: MockItemBrand;
879
+ color: MockColor;
880
+ createdAt: Date;
881
+ updatedAt: Date;
882
+ };
883
+
884
+ export declare type MockReview = {
885
+ id: number;
886
+ rating: number;
887
+ comment: string;
888
+ author: string;
889
+ createdAt: Date;
890
+ updatedAt: Date;
891
+ };
892
+
893
+ export declare const NavBar: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
894
+ hoverEffect?: "default" | "underline" | "solid" | "ghost" | "bordered" | "none" | null | undefined;
895
+ variant?: "default" | "solid" | "bordered" | null | undefined;
896
+ } & ClassProp) | undefined) => string> & SharedComponentProps & {
897
+ items: NavigationItem[];
898
+ classNames?: NavBarClassnames;
899
+ hoverEffect?: NavBarHoverEffect;
900
+ radius?: ComponentRadius;
901
+ size?: ComponentSize;
902
+ variant?: NavBarVariant;
903
+ subItemsColumns?: number;
904
+ }, "ref"> & RefAttributes<HTMLDivElement>>;
905
+
906
+ export declare type NavBarClassnames = {
907
+ base?: string;
908
+ };
909
+
910
+ export declare type NavBarHoverEffect = "default" | "underline" | "solid" | "ghost" | "bordered" | "none";
911
+
912
+ export declare const NavBarItem: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLLIElement> & LiHTMLAttributes<HTMLLIElement> & VariantProps<(props?: ({
913
+ hoverEffect?: "default" | "underline" | "solid" | "ghost" | "bordered" | "none" | null | undefined;
914
+ variant?: "default" | "solid" | "bordered" | null | undefined;
915
+ } & ClassProp) | undefined) => string> & NavBarItemProps, "ref"> & RefAttributes<HTMLLIElement>>;
916
+
917
+ export declare type NavBarItemProps = {
918
+ item: NavigationItem;
919
+ variant: NavBarVariant;
920
+ hoverEffect: NavBarHoverEffect;
921
+ };
922
+
923
+ export declare type NavBarItemStylesProps = {
924
+ foregroundColor?: string;
925
+ primaryColor?: string;
926
+ hoverEffect: NavBarHoverEffect;
927
+ isHovered?: boolean;
928
+ variant?: NavBarVariant;
929
+ };
930
+
931
+ export declare type NavBarMenuStylesProps = {};
932
+
933
+ export declare type NavBarProps = SharedComponentProps & {
934
+ items: NavigationItem[];
935
+ classNames?: NavBarClassnames;
936
+ hoverEffect?: NavBarHoverEffect;
937
+ radius?: ComponentRadius;
938
+ size?: ComponentSize;
939
+ variant?: NavBarVariant;
940
+ subItemsColumns?: number;
941
+ };
942
+
943
+ export declare type NavBarStylesProps = {
944
+ primaryColor?: string;
945
+ foregroundColor?: string;
946
+ variant?: NavBarVariant;
947
+ };
948
+
949
+ export declare type NavBarVariant = "default" | "solid" | "bordered";
950
+
951
+ export declare const NavigationContext: Context<NavigationContextState | undefined>;
952
+
953
+ export declare type NavigationContextState = {
954
+ hoveredItemId: string | null;
955
+ subItems: NavigationItem[];
956
+ isSubItemsBoxOpen: boolean;
957
+ subItemsBoxIsHovered: boolean;
958
+ setHoveredItemId: (id: string | null) => void;
959
+ setSubItems: (items: NavigationItem[]) => void;
960
+ setIsSubItemsBoxOpen: (isOpen: boolean) => void;
961
+ setSubItemsBoxIsHovered: (isHovered: boolean) => void;
962
+ };
963
+
964
+ export declare type NavigationItem = {
965
+ id: string;
966
+ label?: string;
967
+ href?: string;
968
+ subItems?: NavigationItem[];
969
+ onClick?: () => void;
970
+ Icon?: ElementType;
971
+ };
972
+
973
+ export declare function NavigationProvider({ children }: NavigationProviderProps): JSX.Element;
974
+
975
+ export declare type NavigationProviderProps = {
976
+ children: ReactNode;
977
+ };
978
+
979
+ export declare function NumericFilter({ classNames, numericProps, paramKey, }: Pick<FilterProps, "classNames" | "numericProps" | "paramKey">): JSX.Element;
980
+
981
+ export declare const ONE_MEGABYTE = 1024;
982
+
983
+ export declare enum Placeholders {
984
+ PLACEHOLDER_MALE_AVATAR = "/images/placeholder-male-avatar.png",
985
+ PLACEHOLDER_FEMALE_AVATAR = "/images/placeholder-female-avatar.png"
986
+ }
987
+
988
+ export declare const policies: QuickLink[];
989
+
990
+ export declare function PoliciesBox({ policies, classNames }: FooterProps): JSX.Element;
991
+
992
+ export declare function Portal({ children, containerId, isVisible, }: PortalProps): ReactPortal | null;
993
+
994
+ export declare type PortalProps = SharedComponentProps & {
995
+ containerId: string;
996
+ isVisible?: boolean;
997
+ };
998
+
999
+ export declare enum PreservedKeys {
1000
+ COMPACT_SIDEBAR_ID = "emperor-compact-sidebar"
1001
+ }
1002
+
1003
+ export declare function PresetColorPicker({ className, classNames, value, onChange, defaultValue, inputType, presets, ...props }: ColorPickerProps): JSX.Element;
1004
+
1005
+ export declare type QuickLink = {
1006
+ label: string;
1007
+ href: string;
1008
+ isExternal?: boolean;
1009
+ };
1010
+
1011
+ export declare type QuickLinkCollection = {
1012
+ title?: string;
1013
+ links: QuickLink[];
1014
+ };
1015
+
1016
+ export declare const quickLinks: QuickLinkCollection[];
1017
+
1018
+ export declare function QuickLinksBox({ quickLinks, classNames }: FooterProps): JSX.Element;
1019
+
1020
+ export declare function RadioField<TSchema extends FieldValues>({ options, radioGroupProps, name, }: Pick<FieldProps<TSchema>, "options" | "radioGroupProps" | "name">): JSX.Element;
1021
+
1022
+ export declare function RangeFilter({ classNames, rangeProps, paramKey, }: Pick<FilterProps, "classNames" | "rangeProps" | "paramKey">): JSX.Element;
1023
+
1024
+ export declare function refineUploadedFiles({ uploadedFiles, uploaderLocale, allowedTypes, isMulti, setFiles, }: {
1025
+ uploadedFiles: (File | undefined)[];
1026
+ uploaderLocale: Locale["atoms"]["uploader"];
1027
+ allowedTypes: string[];
1028
+ isMulti: boolean;
1029
+ setFiles: Dispatch<SetStateAction<FileObject[]>>;
1030
+ }): Promise<void[]>;
1031
+
1032
+ export declare const Row: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLElement> & HTMLAttributes<HTMLElement> & VariantProps<(props?: ({} & ClassProp) | undefined) => string> & SharedComponentProps, "ref"> & RefAttributes<HTMLElement>>;
1033
+
1034
+ export declare type RowProps = SharedComponentProps & {};
1035
+
1036
+ export declare const Scaffold: ForwardRefExoticComponent<SharedComponentProps & {
1037
+ classNames?: ScaffoldClassnames;
1038
+ } & RefAttributes<HTMLDivElement>>;
1039
+
1040
+ export declare const scaffoldClasses: (props?: ({} & ClassProp) | undefined) => string;
1041
+
1042
+ export declare type ScaffoldClassnames = {
1043
+ base?: string;
1044
+ };
1045
+
1046
+ export declare type ScaffoldProps = SharedComponentProps & {
1047
+ classNames?: ScaffoldClassnames;
1048
+ };
1049
+
1050
+ export declare function SearchFilter({ classNames, searchProps, paramKey, }: Pick<FilterProps, "classNames" | "searchProps" | "paramKey">): JSX.Element;
1051
+
1052
+ export declare type SegmentedHeaderContentProps = SharedComponentProps & {
1053
+ glassEffect?: HeaderGlassEffect;
1054
+ };
1055
+
1056
+ export declare function SelectField<TSchema extends FieldValues>({ options, selectItemProps, selectProps, name, }: Pick<FieldProps<TSchema>, "options" | "selectItemProps" | "selectProps" | "name">): JSX.Element;
1057
+
1058
+ export declare function SelectFilter({ classNames, selectProps, selectItemProps, paramKey, options, }: Pick<FilterProps, "classNames" | "selectProps" | "selectItemProps" | "paramKey" | "options">): JSX.Element;
1059
+
1060
+ export declare type SelectFilterProps = {
1061
+ options?: SelectOption[];
1062
+ };
1063
+
1064
+ export declare type SelectOption = {
1065
+ key: string;
1066
+ label: string;
1067
+ };
1068
+
1069
+ export declare type SharedComponentProps = {
1070
+ className?: string;
1071
+ classNames?: {
1072
+ base?: string;
1073
+ };
1074
+ children?: ReactNode;
1075
+ };
1076
+
1077
+ declare type SharedFieldProps<TFieldValues extends FieldValues> = {
1078
+ classNames?: FieldClassnames;
1079
+ type: FieldType;
1080
+ name: Path<TFieldValues>;
1081
+ options?: FieldOption[];
1082
+ };
1083
+
1084
+ export declare type SharedFilesType = FileObject[];
1085
+
1086
+ declare type SharedFilterProps = {
1087
+ classNames?: FilterClassnames;
1088
+ type: FilterType;
1089
+ paramKey: string;
1090
+ };
1091
+
1092
+ export declare type SharedLabelIdType = string;
1093
+
1094
+ export declare type SharedOnInputChangeType = (event: React.ChangeEvent<HTMLInputElement> & React.DragEvent<HTMLLabelElement>) => Promise<void | string | null>;
1095
+
1096
+ export declare const SideBar: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
1097
+ variant?: "default" | "compact" | null | undefined;
1098
+ } & ClassProp) | undefined) => string> & SharedComponentProps & {
1099
+ classNames?: SideBarClassnames;
1100
+ variant?: SideBarVariant;
1101
+ items: NavigationItem[];
1102
+ actions?: SideBarAction[];
1103
+ triggerProps?: Omit<ButtonProps, "content"> & {
1104
+ content?: ReactNode;
1105
+ };
1106
+ isOpen?: boolean;
1107
+ onOpenChange?: (isOpen: boolean) => void;
1108
+ header?: ReactNode;
1109
+ }, "ref"> & RefAttributes<HTMLDivElement>>;
1110
+
1111
+ export declare type SideBarAction = ButtonProps & {
1112
+ key: string;
1113
+ label?: string;
1114
+ };
1115
+
1116
+ export declare type SideBarClassnames = {
1117
+ base?: string;
1118
+ trigger?: string;
1119
+ title?: string;
1120
+ menu?: string;
1121
+ menuItem?: string;
1122
+ actionsWrapper?: string;
1123
+ actionItem?: string;
1124
+ };
1125
+
1126
+ export declare type SideBarItemStylesProps = {
1127
+ foregroundColor?: string;
1128
+ primaryColor?: string;
1129
+ isHovered?: boolean;
1130
+ variant?: SideBarVariant;
1131
+ };
1132
+
1133
+ export declare type SideBarProps = SharedComponentProps & {
1134
+ classNames?: SideBarClassnames;
1135
+ variant?: SideBarVariant;
1136
+ items: NavigationItem[];
1137
+ actions?: SideBarAction[];
1138
+ triggerProps?: Omit<ButtonProps, "content"> & {
1139
+ content?: ReactNode;
1140
+ };
1141
+ isOpen?: boolean;
1142
+ onOpenChange?: (isOpen: boolean) => void;
1143
+ header?: ReactNode;
1144
+ };
1145
+
1146
+ export declare type SideBarVariant = "default" | "compact";
1147
+
1148
+ export declare type SocialLink = {
1149
+ label?: string;
1150
+ href: string;
1151
+ icon?: ReactNode;
1152
+ isExternal?: boolean;
1153
+ };
1154
+
1155
+ export declare const socialLinks: SocialLink[];
1156
+
1157
+ export declare function SocialLinksBox({ socialLinks, classNames }: FooterProps): JSX.Element;
1158
+
1159
+ export declare const SubItemsBox: ({ subItemsColumns }: SubItemsBoxProps) => JSX.Element;
1160
+
1161
+ export declare type SubItemsBoxProps = {
1162
+ subItemsColumns?: number;
1163
+ };
1164
+
1165
+ export declare function SwitchField<TSchema extends FieldValues>({ switchProps, name, children, }: Pick<FieldProps<TSchema>, "switchProps" | "name" | "children">): JSX.Element;
1166
+
1167
+ export declare function SwitchFilter({ classNames, switchProps, paramKey, }: Pick<FilterProps, "classNames" | "switchProps" | "paramKey">): JSX.Element;
1168
+
1169
+ export declare function TextareaField<TSchema extends FieldValues>({ textareaProps, name, }: Pick<FieldProps<TSchema>, "textareaProps" | "name">): JSX.Element;
1170
+
1171
+ export declare function ThemeProvider({ children }: ThemeProviderProps): JSX.Element;
1172
+
1173
+ export declare type ThemeProviderProps = {
1174
+ children: ReactNode;
1175
+ };
1176
+
1177
+ export declare function ThemeSwitch({ className, classNames, ...props }: ThemeSwitchProps): JSX.Element;
1178
+
1179
+ export declare type ThemeSwitchClassnames = {
1180
+ base?: string;
1181
+ };
1182
+
1183
+ export declare type ThemeSwitchProps = SharedComponentProps & {
1184
+ classNames?: ThemeSwitchClassnames;
1185
+ };
1186
+
1187
+ /**
1188
+ * @usage
1189
+ * ```
1190
+ * const uploadProps = useUpload({
1191
+ labelId: "uploaded-file",
1192
+ fileTypes: ["image", "pdf"],
1193
+ isRequired: true,
1194
+ isMulti: true,
1195
+ });
1196
+
1197
+ <Uploader {...uploadProps} />
1198
+ * ```
1199
+ */
1200
+ export declare const Uploader: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({} & ClassProp) | undefined) => string> & SharedComponentProps & UploaderContextState & {
1201
+ className?: string;
1202
+ hideListing?: boolean;
1203
+ isAvatar?: boolean;
1204
+ }, "ref"> & RefAttributes<HTMLDivElement>>;
1205
+
1206
+ export declare const UploaderContext: Context<UploaderContextState | undefined>;
1207
+
1208
+ export declare type UploaderContextState = {
1209
+ selectedFile?: FileObject | null;
1210
+ setSelectedFile?: (file: FileObject | null) => void;
1211
+ labelId: SharedLabelIdType;
1212
+ labelContent?: ReactNode;
1213
+ avatarLabelContent?: ReactNode;
1214
+ title?: ReactNode;
1215
+ errorMessage?: ReactNode;
1216
+ isFileViewable?: boolean;
1217
+ isRequired?: boolean;
1218
+ isDraggable?: boolean;
1219
+ isLoading: boolean;
1220
+ hideErrorMessage?: boolean;
1221
+ isMulti: boolean;
1222
+ placeholderImage?: string;
1223
+ files: SharedFilesType;
1224
+ fileTypes: FileType[];
1225
+ onInputChange: SharedOnInputChangeType;
1226
+ handleClearFile: (fileName?: string) => void;
1227
+ modal?: Omit<ModalProps, "children"> & {
1228
+ onOpen?: () => void;
1229
+ };
1230
+ classNames?: {
1231
+ label?: string;
1232
+ avatar?: string;
1233
+ listing?: string;
1234
+ listingItem?: string;
1235
+ error?: string;
1236
+ input?: string;
1237
+ title?: string;
1238
+ };
1239
+ locales?: Partial<Locale["atoms"]["uploader"]>;
1240
+ };
1241
+
1242
+ export declare const uploaderLocalesMock: Record<LangKey, Partial<Locale["atoms"]["uploader"]>>;
1243
+
1244
+ export declare type UploaderProps = SharedComponentProps & UploaderContextState & {
1245
+ className?: string;
1246
+ hideListing?: boolean;
1247
+ isAvatar?: boolean;
1248
+ };
1249
+
1250
+ export declare function UploaderProvider({ children, ...props }: UploaderProviderProps): JSX.Element;
1251
+
1252
+ export declare type UploaderProviderProps = UploaderContextState & {
1253
+ children: ReactNode;
1254
+ };
1255
+
1256
+ export declare function UploaderTitle({ ...props }: ComponentProps<"h3">): JSX.Element | null;
1257
+
1258
+ export declare function UploadFileErrorBox(): JSX.Element | null;
1259
+
1260
+ export declare function UploadFileInput(): JSX.Element;
1261
+
1262
+ export declare function UploadFileLabel(): JSX.Element | null;
1263
+
1264
+ export declare function UploadFileListing(): JSX.Element;
1265
+
1266
+ export declare function useEmperorUI(): ConfigContextState;
1267
+
1268
+ export declare function useFilters<FiltersType extends Record<string, string | number | boolean>>(): {
1269
+ filters: FiltersType | null;
1270
+ clearFilters: () => void;
1271
+ };
1272
+
1273
+ export declare function useFormBuilder<TSchema extends FieldValues>(): FormBuilderValue<TSchema>;
1274
+
1275
+ export declare function useNavigation(): NavigationContextState;
1276
+
1277
+ export declare type UserDropdownProps = SharedComponentProps & {};
1278
+
1279
+ export declare function useSearchParamsHandler(): {
1280
+ getParam: (name: string) => string | null;
1281
+ allParams: Record<string, string>;
1282
+ setParams: ({ params, options, }: {
1283
+ params: Record<string, string | number | boolean | undefined | null>;
1284
+ options?: {
1285
+ replace?: boolean;
1286
+ };
1287
+ }) => void;
1288
+ deleteParam: ({ key }: {
1289
+ key: string;
1290
+ }) => void;
1291
+ deleteParams: ({ keys }: {
1292
+ keys: string[];
1293
+ }) => void;
1294
+ clearParams: () => void;
1295
+ };
1296
+
1297
+ export declare const useUploader: ({ labelContent, labelId, fileTypes, isRequired, isDraggable, isMulti, preventDuplicates, maxCount, maxFileSize, compressFiles, onChange, locales, }: UseUploadFileProps) => UseUploadFileReturn;
1298
+
1299
+ export declare function useUploaderContext(): UploaderContextState;
1300
+
1301
+ export declare type UseUploadFileProps = {
1302
+ labelId: string;
1303
+ fileTypes: FileType[];
1304
+ labelContent?: ReactNode;
1305
+ isRequired?: boolean;
1306
+ isMulti?: boolean;
1307
+ isDraggable?: boolean;
1308
+ maxCount?: number;
1309
+ maxFileSize?: number;
1310
+ compressFiles?: boolean;
1311
+ preventDuplicates?: boolean;
1312
+ onChange?: () => void;
1313
+ locales?: Partial<Locale["atoms"]["uploader"]>;
1314
+ };
1315
+
1316
+ export declare type UseUploadFileReturn = {
1317
+ files: FileObject[];
1318
+ fileTypes: FileType[];
1319
+ labelId: string;
1320
+ isRequired: boolean;
1321
+ labelContent: ReactNode;
1322
+ isDraggable: boolean;
1323
+ isMulti: boolean;
1324
+ isLoading: boolean;
1325
+ setFiles: Dispatch<SetStateAction<FileObject[]>>;
1326
+ handleClearFile: (fileName?: string) => void;
1327
+ onInputChange: SharedOnInputChangeType;
1328
+ locales?: Partial<Locale["atoms"]["uploader"]>;
1329
+ };
1330
+
1331
+ export declare const useWindowSize: () => {
1332
+ viewportWidth: number;
1333
+ viewportHeight: number;
1334
+ currentScreen: "base" | "sm" | "md" | "lg" | "xl" | "2xl";
1335
+ isSmallDevice: boolean;
1336
+ isExtraSmallDevice: boolean;
1337
+ };
1338
+
1339
+ export declare function validateUploadedFiles({ uploadedFiles, maxFileSize, compressFiles, uploaderLocale, preventDuplicates, files, }: {
1340
+ uploadedFiles: File[];
1341
+ maxFileSize?: number;
1342
+ compressFiles?: boolean;
1343
+ uploaderLocale: Locale["atoms"]["uploader"];
1344
+ preventDuplicates?: boolean;
1345
+ files: FileObject[];
1346
+ }): Promise<{
1347
+ compressedFiles: (File | undefined)[];
1348
+ isInValid: boolean;
1349
+ }>;
1350
+
1351
+ export declare function ViewImageModal(): JSX.Element | null;
1352
+
1353
+ export { }