@northlight/ui 1.0.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.
@@ -0,0 +1,1132 @@
1
+ import { AvatarProps as AvatarProps$1, AlertProps as AlertProps$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, IconButtonProps as IconButtonProps$1, StackDirection, InputProps, FlexProps, BoxProps, StackProps, TagProps as TagProps$1, IconProps as IconProps$1, SystemStyleObject, HeadingProps as HeadingProps$1, TextProps, FormLabelProps as FormLabelProps$1, Heading, Text, ModalProps as ModalProps$1, NumberInputProps as NumberInputProps$1, PinInputProps as PinInputProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, SpinnerProps as SpinnerProps$1, SwitchProps as SwitchProps$1, TabsProps as TabsProps$1, TabPanelProps as TabPanelProps$1, TextareaProps as TextareaProps$1, FadeProps as FadeProps$1, ScaleFadeProps as ScaleFadeProps$1, SlideProps as SlideProps$1, SlideFadeProps as SlideFadeProps$1, CollapseProps as CollapseProps$1, TabListProps, TabProps, GridProps, GridItemProps, EditableProps as EditableProps$1 } from '@chakra-ui/react';
2
+ export { AbsoluteCenter, Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AlertDescription, AlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertIcon, AlertTitle, AspectRatio, AvatarGroup, Badge, Box, BreadcrumbItem as Breadcrumb, BreadcrumbLink, BreadcrumbSeparator, Breadcrumb as Breadcrumbs, ButtonGroup, Card, CardBody, CardFooter, CardHeader, Center, Modal as ChakraModal, CheckboxGroup, Circle, CircularProgress, CircularProgressLabel, CloseButton, Code, Container, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, Editable, EditableInput, EditablePreview, Flex, FormControl, FormErrorMessage, FormHelperText, Grid, GridItem, HStack, Heading, Highlight, Image, Input, InputAddon, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkOverlay, List, ListIcon, ListItem, Menu, MenuButton, MenuCommand, MenuDivider, MenuGroup, MenuIcon, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, NumberDecrementStepper, NumberIncrementStepper, OrderedList, PinInputField, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, RadioGroup, RangeSlider, RangeSliderFilledTrack, RangeSliderMark, RangeSliderThumb, RangeSliderTrack, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slider, SliderFilledTrack, SliderMark, SliderThumb, SliderTrack, Spacer, Stack, StackDivider, Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber, TabIndicator as StepIndicator, TabPanels as StepPanels, Tab, TabIndicator, TabList, TabPanels, Table, TableCaption, TableContainer, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon, Tbody, Td, Text, Tfoot, Th, Thead, Tooltip, Tr, UnorderedList, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, useBoolean, useBreakpoint, useBreakpointValue, useClipboard, useControllableProp, useControllableState, useDisclosure, useEditable, useEditableControls, useEditableState, useMediaQuery, useMergeRefs, useNumberInput, useOutsideClick, usePrefersReducedMotion, useRadio, useRadioGroup, useTab, useTabs, useTheme, useToast, useToken } from '@chakra-ui/react';
3
+ import React$1, { ChangeEvent, ComponentType, InputHTMLAttributes, HTMLAttributes, ReactNode, ChangeEventHandler, ReactElement } from 'react';
4
+ import { RegisterOptions, SetValueConfig, ControllerRenderProps, FieldValues, UseFormReturn, UseFormProps, FieldError, Merge, FieldErrorsImpl } from 'react-hook-form';
5
+ export { useController, useFieldArray, useForm, useFormContext, useFormState, useWatch } from 'react-hook-form';
6
+ import { CheckboxGroupState } from '@react-stately/checkbox';
7
+ import { RadioGroupState } from '@react-stately/radio';
8
+ import { CSSObject } from '@emotion/react';
9
+ import { DateValue, CalendarDate } from '@internationalized/date';
10
+ import { AriaDateFieldProps, AriaDatePickerProps, AriaDateRangePickerProps } from '@react-aria/datepicker';
11
+ import { DateRange } from '@react-types/calendar';
12
+ import { Props, GroupBase, ActionMeta, ChakraStylesConfig, SelectInstance, MenuListProps, MultiValue, SingleValue } from 'chakra-react-select';
13
+ export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect } from 'chakra-react-select';
14
+ import { InputFieldProps as InputFieldProps$1 } from '~/lib/types';
15
+ import { DndContextProps, UseDroppableArguments, UseDraggableArguments, UniqueIdentifier, CollisionDetection, SensorDescriptor, SensorOptions } from '@dnd-kit/core';
16
+ export * from '@dnd-kit/core';
17
+ import { UseSortableArguments, SortingStrategy, SortableContextProps } from '@dnd-kit/sortable';
18
+ export * from '@dnd-kit/sortable';
19
+ import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
20
+ export * from '@dnd-kit/utilities';
21
+ export * from '@dnd-kit/modifiers';
22
+ import { VariableSizeListProps, VariableSizeList, VariableSizeGridProps, VariableSizeGrid } from 'react-window';
23
+ import * as _chakra_ui_icon from '@chakra-ui/icon';
24
+ import * as _chakra_ui_system from '@chakra-ui/system';
25
+ import { Props as Props$1 } from 'react-input-mask';
26
+ import { LinkProps, NavLinkProps } from 'react-router-dom';
27
+ import { UseClickableProps } from '@chakra-ui/clickable';
28
+ import * as _react_types_shared from '@react-types/shared';
29
+ import * as _react_aria_focus from '@react-aria/focus';
30
+ import { FieldErrorType as FieldErrorType$1 } from 'lib/components/form/types';
31
+ import { DateSegment, DateFieldState } from '@react-stately/datepicker';
32
+ import { AriaButtonProps } from '@react-aria/button';
33
+ import { RangeCalendarState, CalendarState } from '@react-stately/calendar';
34
+
35
+ interface OrganizationLogoProps extends AvatarProps$1 {
36
+ name: string;
37
+ image?: string;
38
+ }
39
+
40
+ declare const OrganizationLogo: ({ name, image, variant, ...rest }: OrganizationLogoProps) => JSX.Element;
41
+
42
+ declare type AlertVariants = 'success' | 'warning' | 'error' | 'info';
43
+ interface AlertProps extends AlertProps$1 {
44
+ variant?: AlertVariants;
45
+ }
46
+
47
+ declare const Alert: ({ variant, children, ...rest }: AlertProps) => JSX.Element;
48
+
49
+ interface AvatarProps extends AvatarProps$1 {
50
+ name?: string;
51
+ image?: string;
52
+ notificationCount?: number;
53
+ size?: 'sm' | 'md' | 'lg';
54
+ }
55
+ interface AvatarBadgeProps {
56
+ notificationCount?: number;
57
+ }
58
+
59
+ declare const Avatar: ({ variant, notificationCount, name, image, size, ...rest }: AvatarProps) => JSX.Element;
60
+
61
+ declare const AvatarBadge: ({ notificationCount, }: AvatarBadgeProps) => JSX.Element;
62
+
63
+ declare type BlinkerProps = {
64
+ color?: string;
65
+ size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg';
66
+ isBlinking?: boolean;
67
+ };
68
+
69
+ declare const Blinker: ({ color, size, isBlinking, ...rest }: BlinkerProps) => JSX.Element;
70
+
71
+ declare type ButtonVariants = 'default' | 'danger' | 'success' | 'brand' | 'link' | 'ghost';
72
+ interface ButtonProps extends ButtonProps$1 {
73
+ variant?: ButtonVariants;
74
+ }
75
+
76
+ declare const Button: (props: ButtonProps & React$1.RefAttributes<unknown>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
77
+
78
+ declare type CheckboxVariants = 'default' | 'rounded';
79
+ declare type CheckboxProps = CheckboxProps$1 & {
80
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
81
+ value?: boolean;
82
+ variant?: CheckboxVariants;
83
+ };
84
+ declare type CheckboxFieldProps = CheckboxProps$1 & {
85
+ name: string;
86
+ label: string;
87
+ validate?: RegisterOptions;
88
+ isRequired?: boolean;
89
+ variant?: CheckboxVariants;
90
+ };
91
+
92
+ declare const Checkbox: ({ value, onChange, name, size, variant, ...rest }: CheckboxProps) => JSX.Element;
93
+
94
+ declare const CheckboxField: ({ name, label, variant, isRequired, validate, ...rest }: CheckboxFieldProps) => JSX.Element;
95
+
96
+ declare type ColorPickerSize = 'sm' | 'md' | 'lg';
97
+ interface ColorPickerProps extends Omit<IconButtonProps$1, 'onChange' | 'value' | 'aria-label' | 'variant'> {
98
+ onChange?: (value: string) => void;
99
+ colors?: string[];
100
+ expandedColors?: string[];
101
+ value?: string | null;
102
+ size?: ColorPickerSize;
103
+ name?: string;
104
+ }
105
+ declare type ColorButtonProps = {
106
+ color: string;
107
+ onClick: () => void;
108
+ size?: ColorPickerSize;
109
+ selected?: boolean;
110
+ };
111
+ declare type ColorsExpandButtonProps = {
112
+ onClick: () => void;
113
+ size: ColorPickerSize;
114
+ expanded: boolean;
115
+ };
116
+ declare type ColorPickerFieldProps = ColorPickerProps & {
117
+ name: string;
118
+ label: string;
119
+ validate?: RegisterOptions;
120
+ size?: ColorPickerSize;
121
+ isRequired?: boolean;
122
+ direction?: StackDirection;
123
+ };
124
+
125
+ declare const ColorPicker: ({ onChange, colors, expandedColors, value, name, size, ...rest }: ColorPickerProps) => JSX.Element;
126
+
127
+ declare const ColorPickerField: ({ name, label, direction, isRequired, validate, ...rest }: ColorPickerFieldProps) => JSX.Element;
128
+
129
+ declare type FlipButtonSize = 'xs' | 'sm' | 'md' | 'lg';
130
+ declare type FlipButtonVariant = 'default' | 'brand';
131
+ declare type StyleType = {
132
+ opacity: '0';
133
+ width: '0';
134
+ height: '0';
135
+ };
136
+ declare type InputPropsType = InputHTMLAttributes<HTMLInputElement>;
137
+ declare type FocusPropsType = React$1.DOMAttributes<Element>;
138
+ declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
139
+ declare type TupleTypes<T> = {
140
+ [P in keyof T]: T[P];
141
+ } extends {
142
+ [key: number]: infer V;
143
+ } ? V : never;
144
+ declare type MergedFocusAndInputProps = UnionToIntersection<TupleTypes<[InputPropsType, FocusPropsType]>>;
145
+ interface CustomFlipButtonPropsType extends MergedFocusAndInputProps {
146
+ ref: React$1.MutableRefObject<null>;
147
+ style: StyleType;
148
+ 'aria-label': string;
149
+ }
150
+ declare type FocusRingType = {
151
+ outline?: string;
152
+ ring?: string;
153
+ ringColor?: string;
154
+ ringOffset?: string;
155
+ };
156
+ declare type CustomContainerPropsType = {
157
+ 'aria-checked': boolean;
158
+ 'aria-disabled': boolean;
159
+ sx: FocusRingType;
160
+ as: 'label';
161
+ cursor: 'pointer';
162
+ };
163
+ interface CustomFlipButtonProps {
164
+ state: CheckboxGroupState | RadioGroupState | null;
165
+ flipButtonProps: CustomFlipButtonPropsType;
166
+ containerProps: CustomContainerPropsType;
167
+ isFocused: boolean;
168
+ isSelected: boolean;
169
+ isDisabled: boolean;
170
+ isMulti: boolean;
171
+ focusRing: FocusRingType;
172
+ label?: string;
173
+ value: string;
174
+ }
175
+ interface FlipButtonProps {
176
+ size?: FlipButtonSize;
177
+ variant?: FlipButtonVariant;
178
+ isMulti?: boolean;
179
+ isDisabled?: boolean;
180
+ icon?: ComponentType<any>;
181
+ value: string;
182
+ label?: string;
183
+ children: ((props: CustomFlipButtonProps) => JSX.Element) | string;
184
+ }
185
+ interface FlipButtonGroupProps extends Omit<FlipButtonProps, 'value' | 'children' | 'label'> {
186
+ onChange?: (val: string | string[]) => void;
187
+ direction?: StackDirection;
188
+ children?: React$1.ReactNode[] | React$1.ReactNode;
189
+ name?: string;
190
+ value?: string | string[];
191
+ sx?: CSSObject;
192
+ }
193
+ interface FlipButtonGroupFieldProps extends FlipButtonGroupProps {
194
+ name: string;
195
+ label: string;
196
+ isRequired?: boolean;
197
+ validate?: RegisterOptions;
198
+ value?: string;
199
+ }
200
+
201
+ declare const FlipButton: (props: FlipButtonProps) => JSX.Element;
202
+
203
+ declare const FlipButtonGroup: (props: FlipButtonGroupProps) => JSX.Element;
204
+
205
+ declare const FlipButtonGroupField: ({ name, label, children, direction, isRequired, onChange: onChangeCallback, validate, ...rest }: FlipButtonGroupFieldProps) => JSX.Element;
206
+
207
+ declare type Color = 'blue' | 'gray' | 'red' | 'pink' | 'green' | 'orange' | 'purple' | 'yellow' | 'mediatoolBlue';
208
+ declare type ColorGrade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
209
+ declare type ColorShades = Record<ColorGrade, string>;
210
+
211
+ interface InputFieldProps {
212
+ inputLeftElement?: React.ReactNode;
213
+ inputRightElement?: React.ReactNode;
214
+ }
215
+
216
+ declare type DateSegmentType = DateSegment;
217
+ interface DateFieldProps extends AriaDateFieldProps<DateValue> {
218
+ dateFormat?: string;
219
+ }
220
+ interface DateSegmentProps {
221
+ segment: DateSegment;
222
+ state: DateFieldState;
223
+ }
224
+ interface StyledFieldProps extends HTMLAttributes<HTMLElement> {
225
+ isInvalid?: boolean;
226
+ isDisabled?: boolean;
227
+ children: ReactNode;
228
+ }
229
+ interface TriggerProps extends AriaButtonProps {
230
+ handleClick: () => void;
231
+ }
232
+
233
+ declare const Trigger: (props: TriggerProps) => JSX.Element;
234
+
235
+ declare const DateField: (props: DateFieldProps) => JSX.Element;
236
+
237
+ declare const StyledField: (props: StyledFieldProps & React$1.RefAttributes<unknown>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
238
+
239
+ interface MonthSelectProps {
240
+ state: RangeCalendarState;
241
+ offset: number;
242
+ }
243
+ interface YearSelectCalendarProps {
244
+ state: CalendarState;
245
+ }
246
+ interface YearSelectRangeCalendarProps extends MonthSelectProps {
247
+ }
248
+ interface YearValue {
249
+ value: CalendarDate;
250
+ formatted: string;
251
+ }
252
+ interface UseYearsCalendarProps {
253
+ state: CalendarState;
254
+ }
255
+ interface UseYearsRangeCalendarProps extends MonthSelectProps {
256
+ }
257
+ interface YearSelectProps {
258
+ onChange: ChangeEventHandler<HTMLSelectElement>;
259
+ years: YearValue[];
260
+ }
261
+
262
+ declare const MonthSelect: ({ state, offset, }: MonthSelectProps) => JSX.Element;
263
+
264
+ declare const YearSelectCalendar: ({ state }: YearSelectCalendarProps) => JSX.Element;
265
+
266
+ declare const YearSelectRangeCalendar: ({ state, offset, }: YearSelectRangeCalendarProps) => JSX.Element;
267
+
268
+ declare type MonthButtonProps = AriaButtonProps;
269
+ interface CalendarGridProps {
270
+ state: CalendarState;
271
+ locale: string;
272
+ }
273
+
274
+ declare const CalendarGrid: React$1.MemoExoticComponent<({ state, locale, ...rest }: CalendarGridProps) => JSX.Element>;
275
+
276
+ declare const MonthButton: ({ children, ...rest }: MonthButtonProps) => JSX.Element;
277
+
278
+ declare type DatePickerSettings = {
279
+ firstDayOfWeek: 'sunday' | 'monday';
280
+ resetDate: () => void;
281
+ isInvalid?: boolean;
282
+ dateFormat?: string;
283
+ isClearable?: boolean;
284
+ };
285
+ declare type DatePickerMode = 'simple' | 'advanced';
286
+ interface DatePickerProps extends AriaDatePickerProps<DateValue>, DatePickerSettings {
287
+ }
288
+ interface DateRangePickerProps extends AriaDateRangePickerProps<DateValue>, DatePickerSettings {
289
+ fiscalStartMonth?: number;
290
+ mode?: DatePickerMode;
291
+ }
292
+ interface DatePickerFieldProps extends Omit<InputProps, 'onChange'>, InputFieldProps {
293
+ name: string;
294
+ label: string;
295
+ minValue?: string;
296
+ maxValue?: string;
297
+ validate?: RegisterOptions;
298
+ firstDayOfWeek?: 'sunday' | 'monday';
299
+ direction?: StackDirection;
300
+ dateFormat?: string;
301
+ onChange?: (date: DateValue) => void;
302
+ isClearable?: boolean;
303
+ fiscalStartMonth?: number;
304
+ }
305
+ interface DateRangePickerFieldProps extends Omit<DatePickerFieldProps, 'onChange'> {
306
+ onChange?: (date: DateRange) => void;
307
+ mode?: DatePickerMode;
308
+ }
309
+ interface DateRangeFormatted {
310
+ startDate: string;
311
+ endDate: string;
312
+ }
313
+ declare type FormBody = Record<string, DateRangeFormatted>;
314
+
315
+ declare const DatePicker: (props: DatePickerProps) => JSX.Element;
316
+
317
+ declare const DateRangePicker: (props: DateRangePickerProps) => JSX.Element;
318
+
319
+ declare const DatePickerField: ({ name, minValue, maxValue, isRequired, direction, label, validate, firstDayOfWeek, onChange: onChangeCallback, inputLeftElement, inputRightElement, ...rest }: DatePickerFieldProps) => JSX.Element;
320
+
321
+ declare const DateRangePickerField: ({ name, minValue, maxValue, isRequired, direction, label, validate, firstDayOfWeek, onChange: onChangeCallback, ...rest }: DateRangePickerFieldProps) => JSX.Element;
322
+
323
+ interface ToolboxProps extends Omit<FlexProps, 'direction'> {
324
+ isOpen: boolean;
325
+ direction?: 'right' | 'left';
326
+ shouldPush?: boolean;
327
+ children: JSX.Element[] | JSX.Element;
328
+ size?: 'sm' | 'md' | 'lg';
329
+ onClose: () => void;
330
+ autoFocus?: boolean;
331
+ }
332
+ interface ToolboxHeaderProps extends FlexProps {
333
+ onClose?: () => void;
334
+ children: JSX.Element | string;
335
+ }
336
+ interface ToolboxContentProps extends FlexProps {
337
+ children: JSX.Element | string;
338
+ }
339
+ interface ToolboxFooterProps extends FlexProps {
340
+ children: JSX.Element | JSX.Element[] | string;
341
+ }
342
+
343
+ declare const Toolbox: ({ isOpen, children, direction, shouldPush, size, onClose, autoFocus, ...rest }: ToolboxProps) => JSX.Element;
344
+
345
+ declare const ToolboxHeader: ({ children, onClose, ...rest }: ToolboxHeaderProps) => JSX.Element;
346
+
347
+ declare const ToolboxContent: ({ children, ...rest }: ToolboxContentProps) => JSX.Element;
348
+
349
+ declare const ToolboxFooter: ({ children, ...rest }: ToolboxFooterProps) => JSX.Element;
350
+
351
+ interface CarouselProps extends Omit<BoxProps, 'onChange'> {
352
+ children: JSX.Element[];
353
+ showArrows?: boolean;
354
+ showRadio?: boolean;
355
+ itemWidth?: number;
356
+ itemHeight?: number;
357
+ spacing?: number;
358
+ value?: number;
359
+ onChange?: (value: number) => void;
360
+ carouselStyles?: StackProps;
361
+ }
362
+
363
+ declare const Carousel: ({ children, showArrows, showRadio, value: controlledIndex, onChange, itemWidth, itemHeight, spacing, carouselStyles, ...rest }: CarouselProps) => JSX.Element;
364
+
365
+ declare type Size$1 = 'sm' | 'md' | 'lg';
366
+ interface SearchBarOptionType {
367
+ label: string;
368
+ value: any;
369
+ }
370
+ interface DebounceOptionsType {
371
+ leading?: boolean;
372
+ maxWait?: number;
373
+ trailing?: boolean;
374
+ }
375
+ declare type CustomElementType<T extends SearchBarOptionType> = ((props: T) => JSX.Element) | null;
376
+ interface SearchBarProps<T extends SearchBarOptionType> extends Omit<Props<T, boolean, GroupBase<T>>, 'onChange' | 'value'> {
377
+ value?: T | T[];
378
+ onChange?: (val: any, event: ActionMeta<T>) => void;
379
+ onAdd?: (val: unknown) => void;
380
+ onRemove?: (val: unknown) => void;
381
+ size?: Size$1;
382
+ 'data-testid'?: string;
383
+ debouncedWaitTime?: number;
384
+ debouncedOptions?: DebounceOptionsType;
385
+ clearInputOnSelect?: boolean;
386
+ closeMenuonSelect?: boolean;
387
+ defaultOptions?: T[];
388
+ sx?: ChakraStylesConfig<any>;
389
+ isMulti?: boolean;
390
+ customOption?: CustomElementType<T>;
391
+ customTag?: CustomElementType<T>;
392
+ loadOptions?: ((query: string) => Promise<T[]>) | null;
393
+ onSearchInputChange?: (input: string) => void;
394
+ icon?: ComponentType<any>;
395
+ }
396
+ interface SearchBarFieldProps<T extends SearchBarOptionType> extends Omit<SearchBarProps<T>, 'onChange'>, InputFieldProps$1 {
397
+ onChange?: (val: T | T[], event: ActionMeta<T>) => void;
398
+ direction?: StackDirection;
399
+ name: string;
400
+ label: string;
401
+ validate?: RegisterOptions;
402
+ isRequired?: boolean;
403
+ }
404
+
405
+ declare const SearchBar: <T extends SearchBarOptionType>(props: SearchBarProps<T> & React$1.RefAttributes<SelectInstance<T, boolean, GroupBase<T>>>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
406
+
407
+ declare const SearchBarField: <T extends SearchBarOptionType>({ name, label, direction, isMulti, isRequired, validate, isClearable, onChange: onChangeCallback, inputLeftElement, inputRightElement, ...rest }: SearchBarFieldProps<T>) => JSX.Element;
408
+
409
+ declare const DragAndDrop: (props: DndContextProps) => JSX.Element;
410
+
411
+ declare type ListenersType = SyntheticListenerMap;
412
+ declare type ChildrenType$1<PropType = any, PropTypeTwo = any> = ((props: PropType, secondProp: PropTypeTwo, thirdProp?: any) => JSX.Element | JSX.Element[] | undefined) | (JSX.Element | JSX.Element[]);
413
+ declare type MultiItemType<itemKeys extends string | number | symbol> = Record<itemKeys, string[]>;
414
+ interface DroppableProps extends UseDroppableArguments {
415
+ children?: ((props: any) => JSX.Element | JSX.Element[]) | (JSX.Element | JSX.Element[]);
416
+ }
417
+ interface DraggableProps extends UseDraggableArguments {
418
+ itemLabel?: string;
419
+ children?: ChildrenType$1<ListenersType>;
420
+ disableDrag?: boolean;
421
+ }
422
+ interface SortableItemProps extends UseSortableArguments {
423
+ children?: ChildrenType$1<ListenersType>;
424
+ itemLabel?: UniqueIdentifier;
425
+ dblClickThreshold?: number;
426
+ disableDrag?: boolean;
427
+ }
428
+ declare type MovedItemType<T> = {
429
+ item: T;
430
+ oldIndex: number;
431
+ newIndex: number;
432
+ };
433
+ interface SortableListProps<T> {
434
+ children?: ChildrenType$1<T, ListenersType>;
435
+ items: T[];
436
+ collisionDetection?: CollisionDetection;
437
+ strategy?: SortingStrategy;
438
+ onChange?: (items: T[]) => void;
439
+ createKey?: (item: T) => UniqueIdentifier;
440
+ displayOverlay?: boolean;
441
+ sensors?: SensorDescriptor<SensorOptions>[];
442
+ dblClickThreshold?: number;
443
+ disableDrag?: boolean;
444
+ onMovedItem?: ({ item, oldIndex, newIndex }: MovedItemType<T>) => void;
445
+ }
446
+ interface MultiSortProps<itemKeys extends string | number | symbol> {
447
+ children?: ChildrenType$1;
448
+ items: MultiItemType<itemKeys>;
449
+ collisionDetection?: CollisionDetection;
450
+ onChange?: (items: MultiItemType<itemKeys>) => void;
451
+ sensors?: SensorDescriptor<SensorOptions>[];
452
+ }
453
+ interface DragItemProps extends Omit<TagProps$1, 'variant'> {
454
+ isDragging?: boolean;
455
+ itemLabel?: UniqueIdentifier;
456
+ bgColor?: string;
457
+ }
458
+ interface DragHandleProps extends IconProps$1 {
459
+ isDragging?: boolean;
460
+ icon?: ComponentType<any>;
461
+ }
462
+ interface DropZoneProps {
463
+ sx?: SystemStyleObject;
464
+ name: UniqueIdentifier;
465
+ children?: JSX.Element;
466
+ }
467
+ interface SortableContainerProps {
468
+ items: UniqueIdentifier[];
469
+ strategy?: SortingStrategy;
470
+ children?: (id: UniqueIdentifier) => JSX.Element;
471
+ }
472
+
473
+ declare const Draggable: ({ itemLabel, children, disableDrag, ...rest }: DraggableProps) => JSX.Element;
474
+
475
+ declare const Droppable: ({ children, ...rest }: DroppableProps) => JSX.Element;
476
+
477
+ declare const Sortable: (props: SortableContextProps) => JSX.Element;
478
+
479
+ declare const SortableItem: ({ itemLabel, dblClickThreshold, children, disableDrag, ...rest }: SortableItemProps) => JSX.Element;
480
+
481
+ declare const DragItem: (props: DragItemProps & React$1.RefAttributes<unknown>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
482
+
483
+ declare const DragHandle: ({ icon, isDragging, ...rest }: DragHandleProps) => JSX.Element;
484
+
485
+ declare const DropZone: ({ sx, name, children, ...rest }: DropZoneProps) => JSX.Element;
486
+
487
+ declare function MultiSort<itemKeys extends string | number | symbol>({ items: sortableItems, onChange, children, collisionDetection, sensors, }: MultiSortProps<itemKeys>): JSX.Element;
488
+
489
+ declare function SortableList<T>({ children, items: sortableItems, collisionDetection, createKey, strategy, onChange, onMovedItem, displayOverlay, sensors, dblClickThreshold, disableDrag, }: SortableListProps<T>): JSX.Element;
490
+
491
+ declare const SortableContainer: ({ children, items, strategy }: SortableContainerProps) => JSX.Element;
492
+
493
+ interface HeadingProps extends HeadingProps$1 {
494
+ }
495
+
496
+ declare const H1: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
497
+
498
+ declare const H2: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
499
+
500
+ declare const H3: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
501
+
502
+ declare const H4: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
503
+
504
+ declare const H5: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
505
+
506
+ declare const H6: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
507
+
508
+ interface PProps extends TextProps {
509
+ variant?: '14' | '16';
510
+ }
511
+
512
+ declare const P: ({ children, variant, sx, ...rest }: PProps) => JSX.Element;
513
+
514
+ declare const Blockquote: ({ children, sx, ...rest }: TextProps) => JSX.Element;
515
+
516
+ declare const Capitalized: ({ children, sx, ...rest }: TextProps) => JSX.Element;
517
+
518
+ declare const Lead: ({ children, sx, ...rest }: TextProps) => JSX.Element;
519
+
520
+ declare const Small: ({ children, sx, ...rest }: TextProps) => JSX.Element;
521
+
522
+ declare const Tiny: ({ children, sx, ...rest }: TextProps) => JSX.Element;
523
+
524
+ declare type LabelSizes = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
525
+ interface LabelProps extends FormLabelProps$1 {
526
+ size?: LabelSizes;
527
+ }
528
+
529
+ declare const Label: ({ children, size, sx, ...rest }: LabelProps) => JSX.Element;
530
+
531
+ declare type HeadingType = typeof Heading;
532
+ declare type BodyType = typeof P;
533
+ declare type StylizedType = typeof Text;
534
+ declare type LabelType = typeof Label;
535
+
536
+ interface FormLabelProps extends LabelProps {
537
+ size?: LabelSizes;
538
+ }
539
+
540
+ declare const FormLabel: ({ children: label, ...rest }: FormLabelProps) => JSX.Element;
541
+
542
+ interface FastListProps extends Omit<VariableSizeListProps, 'itemSize' | 'children' | 'height' | 'width' | 'direction'> {
543
+ itemSize: number | ((index: number) => number);
544
+ itemCount: number;
545
+ direction?: StackDirection;
546
+ children: JSX.Element | ((index: number) => JSX.Element | string) | string;
547
+ width?: number;
548
+ height?: number;
549
+ initialScrollOffset?: number;
550
+ overscanCount?: number;
551
+ }
552
+
553
+ declare const FastList: (props: FastListProps & React$1.RefAttributes<VariableSizeList<any>>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
554
+
555
+ interface FastGridProps extends Omit<VariableSizeGridProps, 'children' | 'height' | 'width' | 'columnWidth' | 'rowHeight' | 'columnCount' | 'rowCount'> {
556
+ columnSize: number | ((index: number) => number);
557
+ rowSize: number | ((index: number) => number);
558
+ columns: number;
559
+ rows: number;
560
+ children: JSX.Element | ((rowIndex: number, columnIndex: number) => JSX.Element | string | null) | string;
561
+ width?: number;
562
+ height?: number;
563
+ overscanRowCount?: number;
564
+ overscanColumnCount?: number;
565
+ }
566
+
567
+ declare const FastGrid: (props: FastGridProps & React$1.RefAttributes<VariableSizeGrid<any>>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
568
+
569
+ declare const Icon: _chakra_ui_system.ComponentWithAs<_chakra_ui_system.As<any>, _chakra_ui_icon.IconProps & {
570
+ as?: React$1.ComponentType<any> | undefined;
571
+ size?: "sm" | "md" | "lg" | "xs" | undefined;
572
+ }>;
573
+
574
+ declare type IconProps = IconProps$1 & {
575
+ as?: ComponentType<any>;
576
+ size?: 'xs' | 'sm' | 'md' | 'lg';
577
+ };
578
+
579
+ interface IconButtonProps extends IconButtonProps$1 {
580
+ variant?: ButtonVariants;
581
+ }
582
+
583
+ declare const IconButton: (props: IconButtonProps & React$1.RefAttributes<unknown>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
584
+
585
+ declare type ModalSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full' | 'huge';
586
+ interface ModalProps extends ModalProps$1 {
587
+ size?: ModalSizes;
588
+ }
589
+
590
+ interface CompressionType {
591
+ width: number;
592
+ height: number;
593
+ quality: number;
594
+ }
595
+ interface EditFileOptionsType {
596
+ canEdit: boolean;
597
+ canEditImage: boolean;
598
+ canEditName: boolean;
599
+ }
600
+ interface FileFormat {
601
+ src: string | null;
602
+ name: string;
603
+ type: string;
604
+ _id: string;
605
+ isLazy?: boolean;
606
+ size: number | null;
607
+ isUploading?: boolean;
608
+ uploaded?: number;
609
+ lastModified?: number;
610
+ }
611
+ declare type FileWithType = Pick<FileFormat, 'type'>;
612
+ declare type FileWithSrcNameType = Pick<FileFormat, 'src' | 'name' | 'type'>;
613
+ declare type FileWithSizeAndType = Pick<FileFormat, 'type' | 'size'>;
614
+ declare type ModalBooleans = {
615
+ canCropImage?: boolean;
616
+ canEditFile?: boolean;
617
+ confirmDelete?: boolean;
618
+ canEditFileName?: boolean;
619
+ };
620
+ interface FilePickerProps {
621
+ acceptFormat?: string;
622
+ onChange?: (image: File | null) => void;
623
+ compression?: CompressionType;
624
+ isUploading?: boolean;
625
+ uploaded?: number;
626
+ maxFileSize?: number;
627
+ value?: string | null;
628
+ loadWithSpinner?: boolean;
629
+ confirmDelete?: boolean;
630
+ editFileOptions?: EditFileOptionsType;
631
+ showProgress?: boolean;
632
+ }
633
+ interface FilePickerFieldProps extends Omit<FilePickerProps, 'onChange'> {
634
+ name: string;
635
+ label: string;
636
+ validate?: RegisterOptions;
637
+ isRequired?: boolean;
638
+ direction?: StackDirection;
639
+ onChange?: (File: string | null) => void;
640
+ }
641
+ interface MultiFilePickerFieldProps extends Omit<FilePickerFieldProps, 'onChange'> {
642
+ onChange?: (File: string[]) => void;
643
+ }
644
+ interface MultiFilePickerProps<T extends FileFormat> extends Omit<FilePickerProps, 'onChange'> {
645
+ onChange?: (files: File[]) => void;
646
+ compression?: CompressionType;
647
+ files?: T[] | null;
648
+ uploadingFiles?: T[];
649
+ deleteFile?: ((file: T | FileFormat) => void) | null;
650
+ enablePreLoad?: boolean;
651
+ enableSmartLoad?: boolean;
652
+ confirmDelete?: boolean;
653
+ }
654
+ interface MultiFileUploaderProps<T extends FileFormat> {
655
+ acceptFormat?: string;
656
+ compression?: CompressionType;
657
+ maxFileSize?: number;
658
+ addFilesToQueue?: (files: T[]) => void;
659
+ updatePreviewFiles?: (files: any[]) => void;
660
+ onChange?: (files: File[]) => void;
661
+ }
662
+ interface MultiFileListProps<T extends FileFormat> {
663
+ files?: T[];
664
+ uploadingFiles?: T[];
665
+ deleteFile?: (file: T | FileFormat) => void;
666
+ onChange?: (files: File[]) => void;
667
+ addFile?: (file: File, id: string) => void;
668
+ enableSmartLoad?: boolean;
669
+ editFileOptions?: EditFileOptionsType;
670
+ confirmDelete?: boolean;
671
+ }
672
+ interface FileItemProps<T> {
673
+ file: T | FileFormat;
674
+ deleteFile: (file: T | FileFormat) => void;
675
+ onChangeCallback: (files: File[]) => void;
676
+ addFile?: (file: File, id: string) => void;
677
+ isLazy?: boolean;
678
+ editFileOptions?: EditFileOptionsType;
679
+ confirmDelete?: boolean;
680
+ }
681
+ interface ConfirmDeleteModalProps extends Omit<ModalProps, 'children'> {
682
+ confirmDelete: () => void;
683
+ fileName: string;
684
+ }
685
+ interface FileEditorModalProps extends Omit<ModalProps, 'children'> {
686
+ fileName: string;
687
+ canEditFileName?: boolean;
688
+ canCropImage?: boolean;
689
+ isImage: boolean;
690
+ handleCrop: () => void;
691
+ image: File | string | null;
692
+ setFileName: (value: string) => void;
693
+ }
694
+ interface FileIconButtonProps extends Omit<IconButtonProps$1, 'icon' | 'ButtonVariants'> {
695
+ icon: ComponentType<any>;
696
+ variant?: ButtonVariants;
697
+ }
698
+
699
+ declare const FilePicker: ({ acceptFormat, onChange, compression, uploaded: uploadedInitial, maxFileSize, showProgress, value, loadWithSpinner, confirmDelete, editFileOptions, }: FilePickerProps) => JSX.Element;
700
+
701
+ declare const FilePickerField: ({ name, label, direction, isRequired, validate, onChange: onChangeCallback, ...rest }: FilePickerFieldProps) => JSX.Element;
702
+
703
+ declare function MultiFileUploader<T extends FileFormat>({ acceptFormat, compression, onChange, addFilesToQueue, updatePreviewFiles, maxFileSize, }: MultiFileUploaderProps<T>): JSX.Element;
704
+
705
+ declare function MultiFilePicker<T extends FileFormat>({ acceptFormat, compression, onChange, files, uploadingFiles, deleteFile, confirmDelete, maxFileSize, enablePreLoad, enableSmartLoad, editFileOptions, }: MultiFilePickerProps<T>): JSX.Element;
706
+
707
+ declare function MultiFileList<T extends FileFormat>({ files, uploadingFiles, onChange, deleteFile, addFile, confirmDelete, editFileOptions, enableSmartLoad, }: MultiFileListProps<T>): JSX.Element;
708
+
709
+ declare const MultiFilePickerField: ({ name, label, direction, isRequired, validate, onChange: onChangeCallback, ...rest }: MultiFilePickerFieldProps) => JSX.Element;
710
+
711
+ interface MediatoolThemeProviderProps {
712
+ children: ReactNode;
713
+ theme?: Record<string, any>;
714
+ }
715
+
716
+ declare const MediatoolThemeProvider: ({ children, theme, }: MediatoolThemeProviderProps) => JSX.Element;
717
+
718
+ declare type NumberInputSizeProps = 'sm' | 'md' | 'lg';
719
+ declare type NumberInputProps = NumberInputProps$1 & {
720
+ size?: NumberInputSizeProps;
721
+ onChange?: (...event: any[]) => void;
722
+ onlyAcceptPercentage?: boolean;
723
+ onInputChange?: (input: string) => void;
724
+ };
725
+ declare type NumberInputFieldProps = Omit<NumberInputProps, 'onChange'> & InputFieldProps & {
726
+ name: string;
727
+ label: string;
728
+ validate?: RegisterOptions;
729
+ size?: NumberInputSizeProps;
730
+ isRequired?: boolean;
731
+ unit?: string;
732
+ direction?: StackDirection;
733
+ onChange?: (e: number | string) => void;
734
+ inputLeftElement?: React.ReactNode;
735
+ inputRightElement?: React.ReactNode;
736
+ };
737
+ interface NumberInputStepperProps {
738
+ includePercentage?: boolean;
739
+ }
740
+
741
+ declare const NumberInput: ({ variant, size, onChange, onInputChange, name, onlyAcceptPercentage, ...rest }: NumberInputProps) => JSX.Element;
742
+
743
+ declare const NumberInputStepper: ({ includePercentage, }: NumberInputStepperProps) => JSX.Element;
744
+
745
+ declare const NumberInputField: ({ name, label, direction, isRequired, validate, onChange: onChangeCallback, onlyAcceptPercentage, inputLeftElement, inputRightElement, ...rest }: NumberInputFieldProps) => JSX.Element;
746
+
747
+ declare const advancedParseFloat: (value: number | string) => string | number;
748
+
749
+ interface NotificationIconButtonProps extends IconButtonProps$1 {
750
+ variant?: ButtonVariants;
751
+ blinkerColor?: string;
752
+ hasNotification?: boolean;
753
+ }
754
+
755
+ declare const NotificationIconButton: (props: NotificationIconButtonProps & React$1.RefAttributes<unknown>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
756
+
757
+ interface PageLayoutProps {
758
+ title: ReactNode;
759
+ subtitle?: ReactNode;
760
+ children: ReactNode;
761
+ }
762
+ declare const PageLayout: ({ children, title, subtitle, }: PageLayoutProps) => JSX.Element;
763
+
764
+ declare type PinVariant = 'green' | 'yellow' | 'gray' | 'red';
765
+ declare type PinSize = 'sm' | 'md' | 'lg';
766
+ declare type PinSizeTuple = [number, number];
767
+ interface PinInputProps extends PinInputProps$1 {
768
+ size?: PinSize;
769
+ hidden?: boolean;
770
+ }
771
+
772
+ declare const PinInput: ({ variant, hidden, children, ...rest }: PinInputProps) => JSX.Element;
773
+
774
+ interface ProgressBarProps extends StackProps {
775
+ loaded: number;
776
+ hideDisplay?: boolean;
777
+ onLoadEnd?: () => void;
778
+ }
779
+
780
+ declare const ProgressBar: ({ loaded, onLoadEnd, hideDisplay, ...rest }: ProgressBarProps) => JSX.Element;
781
+
782
+ declare type RadioProps = RadioProps$1 & {
783
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
784
+ value?: string;
785
+ };
786
+ declare type RadioFieldProps = RadioProps$1 & {
787
+ value: string;
788
+ };
789
+ declare type RadioGroupProps = RadioGroupProps$1 & {
790
+ direction?: StackDirection;
791
+ };
792
+ declare type RadioFieldGroupProps = RadioGroupProps$1 & {
793
+ direction?: StackDirection;
794
+ name: string;
795
+ label: string;
796
+ validate?: RegisterOptions;
797
+ isRequired?: boolean;
798
+ value?: string;
799
+ };
800
+
801
+ declare const Radio: ({ size, onChange, name, value, ...rest }: RadioProps) => JSX.Element;
802
+
803
+ declare const RadioGroupField: ({ name, label, children, direction, isRequired, validate, onChange: onChangeCallback, ...rest }: RadioFieldGroupProps) => JSX.Element;
804
+
805
+ declare type Size = 'sm' | 'md' | 'lg';
806
+ interface Option {
807
+ label: string;
808
+ value: string;
809
+ }
810
+ interface SelectProps<T> extends Omit<Props<T, boolean, GroupBase<T>>, 'onChange' | 'value'> {
811
+ value?: Option | Option[];
812
+ onChange?: (val: any, event: ActionMeta<T>) => void;
813
+ onAdd?: (val: unknown) => void;
814
+ onRemove?: (val: unknown) => void;
815
+ name?: string;
816
+ size?: Size;
817
+ 'data-testid'?: string;
818
+ loadingList?: ComponentType<MenuListProps<T, boolean, GroupBase<T>>> | undefined;
819
+ icon?: ComponentType<any>;
820
+ }
821
+ declare type SelectFieldProps<T> = Omit<SelectProps<T>, 'onChange'> & InputFieldProps & {
822
+ onChange?: (val: T | T[], event: ActionMeta<T>) => void;
823
+ direction?: StackDirection;
824
+ name: string;
825
+ label: string;
826
+ validate?: RegisterOptions;
827
+ isRequired?: boolean;
828
+ isMulti?: boolean;
829
+ };
830
+
831
+ declare function Select<T extends Option>({ options, isMulti, onChange, onAdd, onRemove, isLoading, loadingList, 'data-testid': testId, customOption, customTag, value, icon, ...rest }: SelectProps<T>): JSX.Element;
832
+
833
+ declare function SelectField<T extends Option>({ name, label, options, direction, isMulti, isRequired, validate, isClearable, onChange: onChangeCallback, inputLeftElement, inputRightElement, ...rest }: SelectFieldProps<T>): JSX.Element;
834
+
835
+ interface SpinnerProps extends SpinnerProps$1 {
836
+ }
837
+
838
+ declare const Spinner: ({ ...rest }: SpinnerProps) => JSX.Element;
839
+
840
+ declare type SwitchProps = SwitchProps$1 & {
841
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
842
+ value?: boolean;
843
+ };
844
+ declare type SwitchFieldProps = SwitchProps$1 & {
845
+ name: string;
846
+ label: string;
847
+ validate?: RegisterOptions;
848
+ isRequired?: boolean;
849
+ };
850
+
851
+ declare const Switch: ({ value, onChange, name, size, ...rest }: SwitchProps) => JSX.Element;
852
+
853
+ declare const SwitchField: ({ name, label, isRequired, validate, onChange: onChangeCallback, ...rest }: SwitchFieldProps) => JSX.Element;
854
+
855
+ interface TabsProps extends TabsProps$1 {
856
+ }
857
+ interface TabPanelProps extends TabPanelProps$1 {
858
+ }
859
+
860
+ declare const TabPanel: (props: TabPanelProps) => JSX.Element;
861
+
862
+ declare const Tabs: ({ children, variant, isManual, ...rest }: TabsProps) => JSX.Element;
863
+
864
+ interface TagProps extends TagProps$1 {
865
+ bgColor?: string;
866
+ variant?: 'solid' | 'subtle';
867
+ }
868
+
869
+ declare const Tag: (props: TagProps & React$1.RefAttributes<unknown>) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
870
+
871
+ declare type TextSizeProps = 'sm' | 'md';
872
+ declare type TextareaProps = TextareaProps$1 & {
873
+ onChange?: (...event: any[]) => void | ((e: ChangeEvent<HTMLInputElement>) => void);
874
+ value?: boolean;
875
+ size?: TextSizeProps;
876
+ };
877
+ declare type TextareaFieldProps = TextareaProps$1 & {
878
+ name: string;
879
+ label: string;
880
+ validate?: RegisterOptions;
881
+ isRequired?: boolean;
882
+ size?: TextSizeProps;
883
+ direction?: StackDirection;
884
+ };
885
+
886
+ declare const Textarea: ({ size, onChange, name, value, ...rest }: TextareaProps) => JSX.Element;
887
+
888
+ declare const TextareaField: ({ name, label, isRequired, validate, direction, onChange: onChangeCallback, ...rest }: TextareaFieldProps) => JSX.Element;
889
+
890
+ interface TextInputFormatter {
891
+ format: (value: string) => string;
892
+ unFormat: (value: string) => string;
893
+ }
894
+ declare type TextFieldProps = Omit<InputProps, 'onChange'> & InputFieldProps & {
895
+ name: string;
896
+ label: string;
897
+ mask?: string;
898
+ formatter?: TextInputFormatter;
899
+ validate?: RegisterOptions;
900
+ direction?: StackDirection;
901
+ onChange?: (e: React.ChangeEvent<HTMLInputElement> | string) => void;
902
+ };
903
+ declare type MaskedTextInputProps = InputProps & Props$1 & {
904
+ maskPlaceholder?: string;
905
+ };
906
+ declare type FormattedNumberInputProps = Omit<InputProps, 'onChange'> & {
907
+ formatter: TextInputFormatter;
908
+ onChange?: (value: string) => void;
909
+ value?: string;
910
+ };
911
+
912
+ declare const FormattedNumberInput: ({ onChange, formatter, ...rest }: FormattedNumberInputProps) => JSX.Element;
913
+
914
+ declare const MaskedTextInput: ({ mask, maskPlaceholder, alwaysShowMask, name, value, placeholder, onChange, onBlur, ...rest }: MaskedTextInputProps) => JSX.Element;
915
+
916
+ declare const TextField: ({ name, label, as: As, isRequired, validate, direction, onChange: onChangeCallback, inputLeftElement, inputRightElement, ...rest }: TextFieldProps) => JSX.Element;
917
+
918
+ interface ToastProps extends AlertProps {
919
+ title?: string;
920
+ variant?: AlertVariants;
921
+ description?: string;
922
+ onClose?: () => void;
923
+ }
924
+
925
+ declare const Toast: ({ variant, title, description, onClose, ...rest }: ToastProps) => JSX.Element;
926
+
927
+ declare type DurationType = number | null;
928
+ declare type OffsetType = number | string;
929
+ declare type ChildrenType = React.ReactNode | React.ReactNode[];
930
+ declare type TransitionDirection = 'right' | 'bottom' | 'left' | 'top' | null;
931
+ interface FadeProps extends FadeProps$1 {
932
+ duration?: DurationType;
933
+ enterDuration?: DurationType;
934
+ exitDuration?: DurationType;
935
+ disableFocus?: boolean;
936
+ hideDisplay?: boolean;
937
+ enterDelay?: number;
938
+ exitDelay?: number;
939
+ onTransitionComplete?: (isHidden: boolean) => void;
940
+ }
941
+ interface ScaleFadeProps extends FadeProps, Omit<ScaleFadeProps$1, 'delay'> {
942
+ }
943
+ interface SlideProps extends FadeProps, Omit<SlideProps$1, 'delay'> {
944
+ }
945
+ interface SlideFadeProps extends FadeProps, Omit<SlideFadeProps$1, 'delay'> {
946
+ direction?: TransitionDirection;
947
+ offset?: number;
948
+ }
949
+ interface CollapseProps extends FadeProps, Omit<CollapseProps$1, 'delay'> {
950
+ }
951
+
952
+ declare const Fade: ({ children, enterDuration, exitDuration, duration, in: show, disableFocus, hideDisplay, enterDelay, exitDelay, onTransitionComplete, ...rest }: FadeProps) => JSX.Element;
953
+
954
+ declare const ScaleFade: ({ children, enterDuration, exitDuration, duration, in: show, disableFocus, hideDisplay, enterDelay, exitDelay, onTransitionComplete, ...rest }: ScaleFadeProps) => JSX.Element;
955
+
956
+ declare const Slide: ({ children, enterDuration, exitDuration, duration, in: show, disableFocus, hideDisplay, enterDelay, exitDelay, direction, onTransitionComplete, ...rest }: SlideProps) => JSX.Element;
957
+
958
+ declare const SlideFade: ({ children, enterDuration, exitDuration, duration, in: show, disableFocus, hideDisplay, direction, offset: delta, offsetX: deltaX, offsetY: deltaY, enterDelay, exitDelay, onTransitionComplete, ...rest }: SlideFadeProps) => JSX.Element;
959
+
960
+ declare const Collapse: ({ children, enterDuration, exitDuration, duration, in: show, disableFocus, hideDisplay, enterDelay, exitDelay, onTransitionComplete, ...rest }: CollapseProps) => JSX.Element;
961
+
962
+ interface StatusPinProps {
963
+ size?: PinSize;
964
+ variant: PinVariant;
965
+ }
966
+
967
+ declare const StatusPin: ({ size, variant }: StatusPinProps) => JSX.Element;
968
+
969
+ declare type NavbarItemProps = LinkProps & NavLinkProps & {
970
+ to: string;
971
+ icon: ComponentType;
972
+ renderTitle?: boolean;
973
+ };
974
+
975
+ declare const NavbarItem: ({ to, icon, title, renderTitle, }: NavbarItemProps) => JSX.Element;
976
+
977
+ declare type BlockVariant = 'working' | 'pending' | 'approved' | 'rejected';
978
+ declare type StatusBlockProps = {
979
+ variant: BlockVariant;
980
+ };
981
+ declare type BlockVariantColorTuple = [`${Color}.${ColorGrade}`, `${Color}.${ColorGrade}`];
982
+ declare const statusIconMap: Record<BlockVariant, any>;
983
+
984
+ declare const StatusBlock: ({ variant }: StatusBlockProps) => JSX.Element;
985
+
986
+ interface AsyncErrorProps extends AlertProps {
987
+ message?: string;
988
+ }
989
+
990
+ declare const AsyncError: ({ message, ...rest }: AsyncErrorProps) => JSX.Element;
991
+
992
+ declare const Modal: ({ isCentered, children, ...rest }: ModalProps) => JSX.Element;
993
+
994
+ declare type Maybe<T> = T | undefined;
995
+ declare type CustomSubmitHandler<TFieldValues extends FieldValues> = (data: TFieldValues, event: UseFormReturn<TFieldValues>) => any | Promise<any>;
996
+ declare type SetValueOptionsType = Maybe<SetValueConfig>;
997
+ declare type FieldProps = {
998
+ name: string;
999
+ label: string;
1000
+ direction?: StackDirection;
1001
+ isRequired?: boolean;
1002
+ isSelect?: boolean;
1003
+ validate?: RegisterOptions;
1004
+ children: (field: ControllerRenderProps<FieldValues, string>, methods: UseFormReturn<FieldValues>) => JSX.Element | JSX.Element;
1005
+ };
1006
+ declare type FormProps<FormValues extends FieldValues> = {
1007
+ initialValues: FormValues;
1008
+ enableReinitialize?: boolean;
1009
+ onSubmit: CustomSubmitHandler<FormValues>;
1010
+ methods?: UseFormReturn<FormValues>;
1011
+ formSettings?: UseFormProps<FormValues>;
1012
+ validate?: any;
1013
+ shouldTrim?: boolean;
1014
+ children: ((methods: UseFormReturn<FormValues>) => ReactNode) | ReactNode;
1015
+ };
1016
+ declare type FieldErrorType<T extends FieldValues> = FieldError | Merge<FieldError, FieldErrorsImpl<T>> | undefined;
1017
+
1018
+ declare function Form<FormValues extends FieldValues>({ initialValues, onSubmit, children, validate, formSettings, methods, enableReinitialize, shouldTrim, ...rest }: FormProps<FormValues>): JSX.Element;
1019
+
1020
+ declare function Field({ name, label, children, direction, isRequired, isSelect, validate, }: FieldProps): JSX.Element;
1021
+
1022
+ declare const useSetValueRefreshed: () => (name: any, value: any, options: SetValueOptionsType) => void;
1023
+
1024
+ declare const trimFormValues: <T extends FieldValues>(obj: FieldValues) => T;
1025
+
1026
+ interface StepListProps extends TabListProps {
1027
+ }
1028
+ interface StepPanelProps extends TabPanelProps$1 {
1029
+ }
1030
+ interface StepsProps extends TabsProps$1 {
1031
+ }
1032
+ interface StepProps extends TabProps {
1033
+ label: string;
1034
+ description?: string;
1035
+ }
1036
+
1037
+ declare const StepPanel: (props: StepPanelProps) => JSX.Element;
1038
+
1039
+ declare const Steps: (props: StepsProps) => JSX.Element;
1040
+
1041
+ declare const Step: ({ label, description, ...rest }: StepProps) => JSX.Element;
1042
+
1043
+ declare const StepList: ({ children, ...rest }: StepListProps) => JSX.Element;
1044
+
1045
+ interface ClipboardInputProps extends InputProps {
1046
+ value: string;
1047
+ size?: 'sm' | 'md' | 'lg';
1048
+ }
1049
+
1050
+ declare const ClipboardInput: ({ size, value, "aria-label": ariaLabel, ...rest }: ClipboardInputProps) => JSX.Element;
1051
+
1052
+ interface ClickableProps extends UseClickableProps {
1053
+ href?: string;
1054
+ }
1055
+
1056
+ declare const Clickable: (props: ClickableProps) => JSX.Element;
1057
+
1058
+ interface SplitPaneProps extends GridProps {
1059
+ isOpen: boolean;
1060
+ children: ReactElement[];
1061
+ initialSplit?: number;
1062
+ minLeftWidth?: number;
1063
+ minRightWidth?: number;
1064
+ }
1065
+
1066
+ declare const SplitPane: ({ children, initialSplit, isOpen, minLeftWidth, minRightWidth, }: SplitPaneProps) => JSX.Element;
1067
+
1068
+ declare const PaneItem: ({ children, ...rest }: GridItemProps) => JSX.Element;
1069
+
1070
+ declare const PaneDivider: _chakra_ui_system.ComponentWithAs<_chakra_ui_system.As<any>, BoxProps>;
1071
+
1072
+ declare type EditableSizes = 'sm' | 'md' | 'lg';
1073
+ interface EditableProps extends EditableProps$1 {
1074
+ value?: string;
1075
+ size?: EditableSizes;
1076
+ leftItem?: ReactElement;
1077
+ }
1078
+ interface EditableControlsProps {
1079
+ size: EditableSizes;
1080
+ }
1081
+
1082
+ declare const EditableText: ({ size, value: inputValue, onSubmit, leftItem, ...rest }: EditableProps) => JSX.Element;
1083
+
1084
+ declare const useArrowFocus: (columns: number) => {
1085
+ defaultArrows: (e: any) => void;
1086
+ focusPrevious: ({ repeat, wrap, }?: {
1087
+ wrap: boolean;
1088
+ repeat: number;
1089
+ }) => void;
1090
+ focusNext: ({ repeat, wrap, }?: {
1091
+ wrap: boolean;
1092
+ repeat: number;
1093
+ }) => void;
1094
+ focusFirst: (opts?: _react_aria_focus.FocusManagerOptions | undefined) => _react_types_shared.FocusableElement;
1095
+ focusLast: (opts?: _react_aria_focus.FocusManagerOptions | undefined) => _react_types_shared.FocusableElement;
1096
+ };
1097
+
1098
+ interface UseSelectCallbacksProps<T> extends Omit<Props<T, boolean, GroupBase<T>>, 'onChange' | 'value'> {
1099
+ onChange: (val: unknown, event: ActionMeta<T>) => void;
1100
+ onAdd: (val: unknown) => void;
1101
+ onRemove: (val: unknown) => void;
1102
+ isMulti: boolean;
1103
+ value: T | T[];
1104
+ }
1105
+ interface BasicOption {
1106
+ label: string;
1107
+ value: unknown;
1108
+ }
1109
+ declare type SelectActionMeta<T> = ActionMeta<T>;
1110
+
1111
+ declare const useSelectCallbacks: <T extends BasicOption>({ onChange, onAdd, onRemove, isMulti, value, }: UseSelectCallbacksProps<T>) => (val: MultiValue<T> | SingleValue<T>, event: ActionMeta<T>) => void;
1112
+
1113
+ declare const theme: Record<string, any>;
1114
+ declare const tottTheme: Record<string, any>;
1115
+
1116
+ declare const getContrastColor: (color: string) => "text.default" | "text.inverted";
1117
+
1118
+ declare const luminosity: (hexcolor: string) => number;
1119
+
1120
+ declare const ring: CSSObject;
1121
+
1122
+ declare const highlight: CSSObject;
1123
+
1124
+ declare const getShades: (startShade: number, endShade?: number) => string[];
1125
+
1126
+ declare const getInitials: (name: string) => string;
1127
+
1128
+ declare function getFieldError<T extends FieldValues>(name: string, errors: FieldErrorsImpl<T>): FieldErrorType$1<T>;
1129
+
1130
+ declare const getChildrenWithProps: (children: React$1.ReactNode | React$1.ReactNode[], styles: Record<string, any>, predicate?: (child: React$1.ReactNode, index: number) => boolean) => (string | number | boolean | React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | React$1.ReactFragment | null | undefined)[];
1131
+
1132
+ export { Alert, AlertProps, AlertVariants, AsyncError, AsyncErrorProps, Avatar, AvatarBadge, AvatarBadgeProps, AvatarProps, BasicOption, Blinker, BlinkerProps, BlockVariant, BlockVariantColorTuple, Blockquote, BodyType, Button, ButtonProps, ButtonVariants, CalendarGrid, Capitalized, Carousel, Checkbox, CheckboxField, CheckboxFieldProps, CheckboxProps, CheckboxVariants, ChildrenType, Clickable, ClickableProps, ClipboardInput, ClipboardInputProps, Collapse, CollapseProps, Color, ColorButtonProps, ColorGrade, ColorPicker, ColorPickerField, ColorPickerFieldProps, ColorPickerProps, ColorShades, ColorsExpandButtonProps, ConfirmDeleteModalProps, CustomContainerPropsType, CustomElementType, CustomFlipButtonProps, CustomFlipButtonPropsType, DateField, DateFieldProps, DatePicker, DatePickerField, DatePickerFieldProps, DatePickerProps, DateRangePicker, DateRangePickerField, DateRangePickerFieldProps, DateRangePickerProps, DateSegmentProps, DateSegmentType, DragAndDrop, DragHandle, DragHandleProps, DragItem, DragItemProps, Draggable, DraggableProps, DropZone, DropZoneProps, Droppable, DroppableProps, DurationType, EditableControlsProps, EditableProps, EditableSizes, EditableText, Fade, FadeProps, FastGrid, FastGridProps, FastList, FastListProps, Field, FieldErrorType, FieldProps, FileEditorModalProps, FileFormat, FileIconButtonProps, FileItemProps, FilePicker, FilePickerField, FilePickerFieldProps, FilePickerProps, FileWithSizeAndType, FileWithSrcNameType, FileWithType, FlipButton, FlipButtonGroup, FlipButtonGroupField, FlipButtonGroupFieldProps, FlipButtonGroupProps, FlipButtonProps, Form, FormBody, FormLabel, FormLabelProps, FormProps, FormattedNumberInput, FormattedNumberInputProps, H1, H2, H3, H4, H5, H6, HeadingProps, HeadingType, Icon, IconButton, IconButtonProps, IconProps, InputFieldProps, Label, LabelProps, LabelSizes, LabelType, Lead, ListenersType, MaskedTextInput, MaskedTextInputProps, MediatoolThemeProvider, MediatoolThemeProviderProps, Modal, ModalBooleans, ModalProps, ModalSizes, MonthButton, MonthSelect, MonthSelectProps, MultiFileList, MultiFileListProps, MultiFilePicker, MultiFilePickerField, MultiFilePickerFieldProps, MultiFilePickerProps, MultiFileUploader, MultiFileUploaderProps, MultiItemType, MultiSort, MultiSortProps, NavbarItem, NavbarItemProps, NotificationIconButton, NotificationIconButtonProps, NumberInput, NumberInputField, NumberInputFieldProps, NumberInputProps, NumberInputSizeProps, NumberInputStepper, NumberInputStepperProps, OffsetType, Option, OrganizationLogo, OrganizationLogoProps, P, PProps, PageLayout, PageLayoutProps, PaneDivider, PaneItem, PinInput, PinInputProps, PinSize, PinSizeTuple, PinVariant, ProgressBar, Radio, RadioFieldGroupProps, RadioFieldProps, RadioGroupField, RadioGroupProps, RadioProps, ScaleFade, ScaleFadeProps, SearchBar, SearchBarField, SearchBarFieldProps, SearchBarOptionType, SearchBarProps, Select, SelectActionMeta, SelectField, SelectFieldProps, SelectProps, SetValueOptionsType, Slide, SlideFade, SlideFadeProps, SlideProps, Small, Sortable, SortableContainer, SortableContainerProps, SortableItem, SortableItemProps, SortableList, SortableListProps, Spinner, SpinnerProps, SplitPane, SplitPaneProps, StatusBlock, StatusBlockProps, StatusPin, StatusPinProps, Step, StepList, StepListProps, StepPanel, StepPanelProps, StepProps, Steps, StepsProps, StyledField, StyledFieldProps, StylizedType, Switch, SwitchField, SwitchFieldProps, SwitchProps, TabPanel, TabPanelProps, Tabs, TabsProps, Tag, TagProps, TextField, TextFieldProps, TextInputFormatter, TextSizeProps, Textarea, TextareaField, TextareaFieldProps, TextareaProps, Tiny, Toast, ToastProps, Toolbox, ToolboxContent, ToolboxContentProps, ToolboxFooter, ToolboxFooterProps, ToolboxHeader, ToolboxHeaderProps, ToolboxProps, TransitionDirection, Trigger, TriggerProps, UseSelectCallbacksProps, UseYearsCalendarProps, UseYearsRangeCalendarProps, YearSelectCalendar, YearSelectCalendarProps, YearSelectProps, YearSelectRangeCalendar, YearSelectRangeCalendarProps, YearValue, advancedParseFloat, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useSelectCallbacks, useSetValueRefreshed };