@delightui/components 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/atoms/Image/image.types.d.ts +5 -0
- package/dist/cjs/components/atoms/Input/Input.d.ts +1 -1
- package/dist/cjs/components/atoms/index.d.ts +0 -6
- package/dist/cjs/components/molecules/Grid/Grid.d.ts +4 -0
- package/dist/cjs/components/molecules/Grid/Grid.types.d.ts +9 -0
- package/dist/cjs/components/molecules/Grid/GridItem.d.ts +3 -0
- package/dist/cjs/components/molecules/Grid/index.d.ts +5 -0
- package/dist/cjs/components/molecules/GridList/GridList.d.ts +5 -0
- package/dist/cjs/components/molecules/GridList/GridList.types.d.ts +5 -0
- package/dist/cjs/components/molecules/GridList/index.d.ts +4 -0
- package/dist/cjs/components/{atoms → molecules}/List/List.types.d.ts +9 -3
- package/dist/cjs/components/molecules/index.d.ts +10 -0
- package/dist/cjs/library.css +624 -592
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/atoms/Image/image.types.d.ts +5 -0
- package/dist/esm/components/atoms/Input/Input.d.ts +1 -1
- package/dist/esm/components/atoms/index.d.ts +0 -6
- package/dist/esm/components/molecules/Grid/Grid.d.ts +4 -0
- package/dist/esm/components/molecules/Grid/Grid.types.d.ts +9 -0
- package/dist/esm/components/molecules/Grid/GridItem.d.ts +3 -0
- package/dist/esm/components/molecules/Grid/index.d.ts +5 -0
- package/dist/esm/components/molecules/GridList/GridList.d.ts +5 -0
- package/dist/esm/components/molecules/GridList/GridList.types.d.ts +5 -0
- package/dist/esm/components/molecules/GridList/index.d.ts +4 -0
- package/dist/esm/components/{atoms → molecules}/List/List.types.d.ts +9 -3
- package/dist/esm/components/molecules/index.d.ts +10 -0
- package/dist/esm/library.css +624 -592
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +201 -172
- package/package.json +1 -1
- /package/dist/cjs/components/{atoms → molecules}/ActionCard/ActionCard.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/ActionCard/ActionCard.types.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/ActionCard/index.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/Card/Card.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/Card/Card.types.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/Card/index.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/List/List.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/List/components/RootList.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/List/components/RootListItem.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/List/components/SortableList.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/List/components/SortableListItem.d.ts +0 -0
- /package/dist/cjs/components/{atoms → molecules}/List/index.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/ActionCard/ActionCard.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/ActionCard/ActionCard.types.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/ActionCard/index.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/Card/Card.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/Card/Card.types.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/Card/index.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/List/List.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/List/components/RootList.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/List/components/RootListItem.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/List/components/SortableList.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/List/components/SortableListItem.d.ts +0 -0
- /package/dist/esm/components/{atoms → molecules}/List/index.d.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,42 +1,9 @@
|
|
|
1
|
-
import React$1
|
|
2
|
-
import {
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { ImgHTMLAttributes, SyntheticEvent, HTMLAttributes, ReactNode, MouseEvent, InputHTMLAttributes, TextareaHTMLAttributes, CSSProperties, FormHTMLAttributes, Ref, LiHTMLAttributes, TdHTMLAttributes, Dispatch, SetStateAction, TableHTMLAttributes } from 'react';
|
|
3
3
|
import { Offset } from 'react-overlays/usePopper';
|
|
4
4
|
import { Plugin } from 'flatpickr/dist/types/options';
|
|
5
5
|
import FlatPickr from 'react-flatpickr';
|
|
6
|
-
|
|
7
|
-
type ActionCardProps = HTMLAttributes<HTMLDivElement> & Omit<LinkProps, 'to'> & {
|
|
8
|
-
/**
|
|
9
|
-
* The content to be displayed within the action card.
|
|
10
|
-
*/
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Specifies if the action card is disabled.
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Additional class for styling.
|
|
19
|
-
*/
|
|
20
|
-
className?: string;
|
|
21
|
-
/**
|
|
22
|
-
* The destination URL or path for the navigation link.
|
|
23
|
-
* If the URL starts with "https", it will be treated as an external link and rendered as an <a> tag.
|
|
24
|
-
* Otherwise, it will be treated as an internal link and rendered as a <RouterNavLink> component.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* // Internal link
|
|
28
|
-
* <NavLink to="/home">Home</NavLink>
|
|
29
|
-
*
|
|
30
|
-
* // External link
|
|
31
|
-
* <NavLink to="https://www.example.com">External</NavLink>
|
|
32
|
-
*/
|
|
33
|
-
to?: string | -1;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* ActionCard component definition.
|
|
38
|
-
*/
|
|
39
|
-
declare const ActionCard: (props: ActionCardProps) => React$1.JSX.Element;
|
|
6
|
+
import { LinkProps } from 'react-router-dom';
|
|
40
7
|
|
|
41
8
|
/**
|
|
42
9
|
* Enum for different image fit options.
|
|
@@ -69,6 +36,11 @@ interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
|
69
36
|
* Additional class for styling.
|
|
70
37
|
*/
|
|
71
38
|
className?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The aspect ratio of the image.
|
|
41
|
+
* @default natural aspect ratio of the image
|
|
42
|
+
*/
|
|
43
|
+
aspectRatio?: string;
|
|
72
44
|
}
|
|
73
45
|
|
|
74
46
|
declare const Image: (props: ImageProps) => JSX.Element;
|
|
@@ -88,7 +60,7 @@ type ActionImageProps = ImageProps & {
|
|
|
88
60
|
/**
|
|
89
61
|
* ActionImage component definition.
|
|
90
62
|
*/
|
|
91
|
-
declare const ActionImage: (props: ActionImageProps) =>
|
|
63
|
+
declare const ActionImage: (props: ActionImageProps) => React__default.JSX.Element;
|
|
92
64
|
|
|
93
65
|
type ButtonAppearanceEnum = 'Default' | 'Inverse';
|
|
94
66
|
type ButtonTypeEnum = 'Filled' | 'Outlined' | 'Ghost';
|
|
@@ -152,23 +124,7 @@ type ButtonProps = Omit<HTMLAttributes<HTMLButtonElement>, 'style'> & {
|
|
|
152
124
|
/**
|
|
153
125
|
* Button component definition.
|
|
154
126
|
*/
|
|
155
|
-
declare const Button: (props: ButtonProps) =>
|
|
156
|
-
|
|
157
|
-
type CardProps = {
|
|
158
|
-
/**
|
|
159
|
-
* The content to be displayed within the card.
|
|
160
|
-
*/
|
|
161
|
-
children: ReactNode;
|
|
162
|
-
/**
|
|
163
|
-
* Additional class for styling.
|
|
164
|
-
*/
|
|
165
|
-
className?: string;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Card component definition.
|
|
170
|
-
*/
|
|
171
|
-
declare const Card: (props: CardProps) => React$1.JSX.Element;
|
|
127
|
+
declare const Button: (props: ButtonProps) => React__default.JSX.Element;
|
|
172
128
|
|
|
173
129
|
type IconStyleEnum = 'Outlined' | 'Filled' | 'Round';
|
|
174
130
|
type IconSizeEnum = 'Small' | 'Medium' | 'Large';
|
|
@@ -193,7 +149,7 @@ interface IconProps {
|
|
|
193
149
|
className?: string;
|
|
194
150
|
}
|
|
195
151
|
|
|
196
|
-
declare const Icon: (props: IconProps) =>
|
|
152
|
+
declare const Icon: (props: IconProps) => React__default.JSX.Element | null;
|
|
197
153
|
|
|
198
154
|
type IconButtonAppearanceEnum = 'Default' | 'Inverse';
|
|
199
155
|
type IconButtonStyleEnum = 'Primary' | 'Secondary';
|
|
@@ -220,7 +176,7 @@ interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIco
|
|
|
220
176
|
size?: IconButtonSizeEnum;
|
|
221
177
|
}
|
|
222
178
|
|
|
223
|
-
declare const IconButton: (props: IconButtonProps) =>
|
|
179
|
+
declare const IconButton: (props: IconButtonProps) => React__default.JSX.Element;
|
|
224
180
|
|
|
225
181
|
/**
|
|
226
182
|
* Enum for different input types.
|
|
@@ -260,102 +216,27 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value'>
|
|
|
260
216
|
'component-variant'?: string;
|
|
261
217
|
};
|
|
262
218
|
|
|
263
|
-
declare const Input:
|
|
219
|
+
declare const Input: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "value" | "type"> & {
|
|
264
220
|
inputType?: InputTypeEnum;
|
|
265
221
|
value?: string;
|
|
266
222
|
onValueChanged?: (value: string) => void;
|
|
267
223
|
invalid?: boolean;
|
|
268
|
-
leadingIcon?:
|
|
269
|
-
trailingIcon?:
|
|
224
|
+
leadingIcon?: React__default.ReactNode;
|
|
225
|
+
trailingIcon?: React__default.ReactNode;
|
|
270
226
|
'component-variant'?: string;
|
|
271
|
-
} &
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Enum for the alignment of the list.
|
|
275
|
-
*
|
|
276
|
-
* @typedef {'Horizontal' | 'Vertical'} ListAlignEnum
|
|
277
|
-
*/
|
|
278
|
-
type ListAlignEnum = 'Horizontal' | 'Vertical';
|
|
279
|
-
/**
|
|
280
|
-
* Represents a generic list item.
|
|
281
|
-
*
|
|
282
|
-
* @property {string | number} [id] - A unique identifier for the list item. This is optional and can be auto-generated if not provided.
|
|
283
|
-
*/
|
|
284
|
-
type ListItemType = object & {
|
|
285
|
-
id?: string | number;
|
|
286
|
-
};
|
|
287
|
-
/**
|
|
288
|
-
* Props for the list wrapper component.
|
|
289
|
-
*
|
|
290
|
-
* @template T - The type of the list items.
|
|
291
|
-
* @property {T[]} [data] - The data to be rendered in the list.
|
|
292
|
-
* @property {React.FC<any>} component - The React functional component used to render each list item.
|
|
293
|
-
* @property {(item: T, index: number) => string | number} [keyExtractor] - A function to extract unique keys for each item.
|
|
294
|
-
* @property {'Horizontal' | 'Vertical'} [align='Vertical'] - The alignment of the list. Defaults to `'Vertical'`.
|
|
295
|
-
* @property {boolean} [wrap] - Whether the list content should wrap.
|
|
296
|
-
* @property {string} [className] - Additional class for styling the list.
|
|
297
|
-
* @property {boolean} [sortable] - Whether the list items can be sorted using drag-and-drop.
|
|
298
|
-
* @property {Dispatch<SetStateAction<T[]>>} [updateSortOrder] - Callback function to update the order of the list items after sorting.
|
|
299
|
-
*/
|
|
300
|
-
type ListProps<T extends ListItemType> = HTMLAttributes<HTMLUListElement> & {
|
|
301
|
-
/**
|
|
302
|
-
* The data to be rendered in the list.
|
|
303
|
-
*/
|
|
304
|
-
data?: T[];
|
|
305
|
-
/**
|
|
306
|
-
* The component used to render each item in the list.
|
|
307
|
-
*/
|
|
308
|
-
component: React.FC<any>;
|
|
309
|
-
/**
|
|
310
|
-
* Function to extract keys.
|
|
311
|
-
*/
|
|
312
|
-
keyExtractor?: (item: T, index: number) => string | number;
|
|
313
|
-
/**
|
|
314
|
-
* The alignment of the list.
|
|
315
|
-
* @default 'Vertical'
|
|
316
|
-
*/
|
|
317
|
-
align?: ListAlignEnum;
|
|
318
|
-
/**
|
|
319
|
-
* Flag to control if the content should wrap.
|
|
320
|
-
*/
|
|
321
|
-
wrap?: boolean;
|
|
322
|
-
/**
|
|
323
|
-
* Additional class for styling.
|
|
324
|
-
*/
|
|
325
|
-
className?: string;
|
|
326
|
-
/**
|
|
327
|
-
* Flag to enable sorting of list items
|
|
328
|
-
*/
|
|
329
|
-
sortable?: boolean;
|
|
330
|
-
/**
|
|
331
|
-
* callback function to update the current order of data
|
|
332
|
-
*
|
|
333
|
-
* @param data
|
|
334
|
-
* @returns
|
|
335
|
-
*/
|
|
336
|
-
updateSortOrder?: Dispatch<SetStateAction<T[]>>;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* A wrapper component that manages the rendering of either a sortable or regular list based on the provided props.
|
|
341
|
-
*
|
|
342
|
-
* @template T - The type of the list items.
|
|
343
|
-
* @param {ListProps<T>} props - The properties for the list wrapper.
|
|
344
|
-
* @returns {JSX.Element} The rendered list component.
|
|
345
|
-
*/
|
|
346
|
-
declare const List: <T extends ListItemType>(props: ListProps<T>) => React$1.JSX.Element;
|
|
227
|
+
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
347
228
|
|
|
348
229
|
type PasswordProps = Omit<InputProps, 'inputType' | 'trailingIcon'> & {
|
|
349
230
|
hideTrailingIcon?: boolean;
|
|
350
231
|
};
|
|
351
232
|
|
|
352
|
-
declare const Password: (props: PasswordProps) =>
|
|
233
|
+
declare const Password: (props: PasswordProps) => React__default.JSX.Element;
|
|
353
234
|
|
|
354
235
|
type SpinnerProps = {
|
|
355
236
|
className?: string;
|
|
356
237
|
};
|
|
357
238
|
|
|
358
|
-
declare const Spinner: ({ className }: SpinnerProps) =>
|
|
239
|
+
declare const Spinner: ({ className }: SpinnerProps) => React__default.JSX.Element;
|
|
359
240
|
|
|
360
241
|
declare const types: readonly ["Heading1", "Heading2", "Heading3", "Heading4", "Heading5", "Heading6", "BodyLarge", "BodyMedium", "BodySmall"];
|
|
361
242
|
declare const weights: readonly ["Thin", "ExtraLight", "Light", "Regular", "Medium", "SemiBold", "Bold", "ExtraBold", "Black", "ExtraBlack", 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
@@ -435,7 +316,7 @@ interface TextProps {
|
|
|
435
316
|
/**
|
|
436
317
|
* Text component definition.
|
|
437
318
|
*/
|
|
438
|
-
declare const Text: (props: TextProps) =>
|
|
319
|
+
declare const Text: (props: TextProps) => React__default.JSX.Element;
|
|
439
320
|
|
|
440
321
|
type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value'> & {
|
|
441
322
|
/**
|
|
@@ -458,12 +339,12 @@ type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value'>
|
|
|
458
339
|
className?: string;
|
|
459
340
|
};
|
|
460
341
|
|
|
461
|
-
declare const TextArea:
|
|
342
|
+
declare const TextArea: React__default.ForwardRefExoticComponent<Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "value"> & {
|
|
462
343
|
value?: string;
|
|
463
344
|
onValueChanged?: (value: string) => void;
|
|
464
345
|
invalid?: boolean;
|
|
465
346
|
className?: string;
|
|
466
|
-
} &
|
|
347
|
+
} & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
467
348
|
|
|
468
349
|
type ResponsiveComponentProps<T> = {
|
|
469
350
|
component: React.FC<T>;
|
|
@@ -474,8 +355,8 @@ type BreakpointProps<T> = {
|
|
|
474
355
|
children: React.ReactElement<T>;
|
|
475
356
|
};
|
|
476
357
|
|
|
477
|
-
declare const Breakpoint: <T>({ children }: BreakpointProps<T>) =>
|
|
478
|
-
declare const ResponsiveComponent: <T>(props: ResponsiveComponentProps<T>) =>
|
|
358
|
+
declare const Breakpoint: <T>({ children }: BreakpointProps<T>) => React__default.JSX.Element;
|
|
359
|
+
declare const ResponsiveComponent: <T>(props: ResponsiveComponentProps<T>) => React__default.JSX.Element;
|
|
479
360
|
|
|
480
361
|
type ListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
481
362
|
/**
|
|
@@ -500,7 +381,7 @@ type ListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
|
500
381
|
className?: string;
|
|
501
382
|
};
|
|
502
383
|
|
|
503
|
-
declare const ListItem: (props: ListItemProps) =>
|
|
384
|
+
declare const ListItem: (props: ListItemProps) => React__default.JSX.Element;
|
|
504
385
|
|
|
505
386
|
/**
|
|
506
387
|
* Enum for the alignment of the button-group.
|
|
@@ -534,7 +415,7 @@ type ButtonGroupProps = {
|
|
|
534
415
|
/**
|
|
535
416
|
* ButtonGroup component definition.
|
|
536
417
|
*/
|
|
537
|
-
declare const ButtonGroup: (props: ButtonGroupProps) =>
|
|
418
|
+
declare const ButtonGroup: (props: ButtonGroupProps) => React__default.JSX.Element;
|
|
538
419
|
|
|
539
420
|
/**
|
|
540
421
|
* Enum for the action type of the Popover.
|
|
@@ -562,7 +443,7 @@ type PopoverProps = {
|
|
|
562
443
|
/**
|
|
563
444
|
* Ref or Element for the Popover component to render in.
|
|
564
445
|
*/
|
|
565
|
-
container?: HTMLElement |
|
|
446
|
+
container?: HTMLElement | React__default.RefObject<HTMLElement> | null;
|
|
566
447
|
/**
|
|
567
448
|
* The content to display in the Popover.
|
|
568
449
|
*/
|
|
@@ -653,11 +534,11 @@ type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
|
|
|
653
534
|
/**
|
|
654
535
|
* The content to be rendered inside the context menu.
|
|
655
536
|
*/
|
|
656
|
-
children:
|
|
537
|
+
children: React__default.ReactNode;
|
|
657
538
|
/**
|
|
658
539
|
* The element that triggers the display of the context menu.
|
|
659
540
|
*/
|
|
660
|
-
target:
|
|
541
|
+
target: React__default.ReactNode;
|
|
661
542
|
/**
|
|
662
543
|
* Alignment of the menu relative to its target.
|
|
663
544
|
* @default 'Center'
|
|
@@ -710,7 +591,7 @@ type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
|
|
|
710
591
|
/**
|
|
711
592
|
* ContextMenu component that renders a popover menu.
|
|
712
593
|
*/
|
|
713
|
-
declare const ContextMenu: (props: ContextMenuProps) =>
|
|
594
|
+
declare const ContextMenu: (props: ContextMenuProps) => React__default.JSX.Element;
|
|
714
595
|
|
|
715
596
|
/**
|
|
716
597
|
* Props for the MenuItem component.
|
|
@@ -741,7 +622,7 @@ type MenuItemProps = HTMLAttributes<HTMLLIElement> & {
|
|
|
741
622
|
*
|
|
742
623
|
* Renders a menu item (`<li>`) with optional disabled and selected states.
|
|
743
624
|
*/
|
|
744
|
-
declare const MenuItem: (props: MenuItemProps) =>
|
|
625
|
+
declare const MenuItem: (props: MenuItemProps) => React__default.JSX.Element;
|
|
745
626
|
|
|
746
627
|
type DatePickerPosition = 'auto' | 'above' | 'below' | 'auto left' | 'auto center' | 'auto right' | 'above left' | 'above center' | 'above right' | 'below left' | 'below center' | 'below right';
|
|
747
628
|
type DatePickerProps = {
|
|
@@ -844,7 +725,7 @@ type CustomTimePickerConfig = {
|
|
|
844
725
|
minuteStep: number;
|
|
845
726
|
};
|
|
846
727
|
|
|
847
|
-
declare const DatePicker: (props: DatePickerProps) =>
|
|
728
|
+
declare const DatePicker: (props: DatePickerProps) => React__default.JSX.Element;
|
|
848
729
|
|
|
849
730
|
/**
|
|
850
731
|
* Type representing the allowed values for form fields
|
|
@@ -966,13 +847,13 @@ type FormContextValues<T extends FormState = FormState> = {
|
|
|
966
847
|
updateFieldValue: (name: string, value: FieldValue) => void;
|
|
967
848
|
formErrors: FormErrors<T>;
|
|
968
849
|
updateFieldError: (name: keyof T, errorMessage: string) => void;
|
|
969
|
-
onFormSubmit:
|
|
850
|
+
onFormSubmit: React__default.FormEventHandler<HTMLFormElement>;
|
|
970
851
|
updateFieldValidators: (name: keyof T, validate?: FieldValidationFunction) => void;
|
|
971
852
|
updateRequiredFields: (name: keyof T, required?: boolean) => void;
|
|
972
853
|
};
|
|
973
854
|
type FormProviderProps<T extends FormState = FormState> = {
|
|
974
855
|
formRef?: Ref<HTMLFormElement>;
|
|
975
|
-
children?:
|
|
856
|
+
children?: React__default.ReactNode;
|
|
976
857
|
formState?: T;
|
|
977
858
|
onFormStateChange?: FormStateChangeHandler<T>;
|
|
978
859
|
formValidator?: FormValidator<T>;
|
|
@@ -1080,7 +961,7 @@ declare const useField: <T extends FieldValue = FieldValue>(props: UseFieldProps
|
|
|
1080
961
|
formFieldId: string | undefined;
|
|
1081
962
|
};
|
|
1082
963
|
|
|
1083
|
-
declare const FormField: (props: FormFieldProviderProps & FormFieldProps) =>
|
|
964
|
+
declare const FormField: (props: FormFieldProviderProps & FormFieldProps) => React__default.JSX.Element;
|
|
1084
965
|
|
|
1085
966
|
/**
|
|
1086
967
|
* Enum defining the possible sizes for the Modal component.
|
|
@@ -1139,15 +1020,15 @@ type ModalProps = {
|
|
|
1139
1020
|
/**
|
|
1140
1021
|
* Modal component for displaying a dialog window.
|
|
1141
1022
|
*/
|
|
1142
|
-
declare const Modal: (props: ModalProps) =>
|
|
1023
|
+
declare const Modal: (props: ModalProps) => React__default.JSX.Element;
|
|
1143
1024
|
|
|
1144
1025
|
type NavProps = HTMLAttributes<HTMLElement> & {};
|
|
1145
1026
|
|
|
1146
|
-
declare const Nav: (props: NavProps) =>
|
|
1027
|
+
declare const Nav: (props: NavProps) => React__default.JSX.Element;
|
|
1147
1028
|
|
|
1148
1029
|
type NavItemProps = LiHTMLAttributes<HTMLElement> & {};
|
|
1149
1030
|
|
|
1150
|
-
declare const NavItem: (props: NavItemProps) =>
|
|
1031
|
+
declare const NavItem: (props: NavItemProps) => React__default.JSX.Element;
|
|
1151
1032
|
|
|
1152
1033
|
type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'appearance' | 'size' | 'style' | 'type'> & {
|
|
1153
1034
|
/**
|
|
@@ -1169,13 +1050,13 @@ type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'appearance' | 'si
|
|
|
1169
1050
|
'component-variant'?: string;
|
|
1170
1051
|
};
|
|
1171
1052
|
|
|
1172
|
-
declare const NavLink: (props: NavLinkProps) =>
|
|
1053
|
+
declare const NavLink: (props: NavLinkProps) => React__default.JSX.Element;
|
|
1173
1054
|
|
|
1174
1055
|
/**
|
|
1175
1056
|
* Popover component that displays a floating content element in relation to a target element.
|
|
1176
1057
|
* It can be triggered via different user actions like 'Click' or 'Hover'.
|
|
1177
1058
|
*/
|
|
1178
|
-
declare const Popover:
|
|
1059
|
+
declare const Popover: React__default.ForwardRefExoticComponent<PopoverProps & React__default.RefAttributes<PopoverHandle>>;
|
|
1179
1060
|
|
|
1180
1061
|
/**
|
|
1181
1062
|
* Props for the Option component, extending LiHTMLAttributes<HTMLLIElement>.
|
|
@@ -1215,7 +1096,7 @@ type OptionProps = LiHTMLAttributes<HTMLLIElement> & {
|
|
|
1215
1096
|
* @param props - Props for configuring the Option component.
|
|
1216
1097
|
* @returns Element representing the option.
|
|
1217
1098
|
*/
|
|
1218
|
-
declare const Option: (props: OptionProps) =>
|
|
1099
|
+
declare const Option: (props: OptionProps) => React__default.JSX.Element;
|
|
1219
1100
|
|
|
1220
1101
|
/**
|
|
1221
1102
|
* Represents the context provided by the Select component.
|
|
@@ -1366,7 +1247,7 @@ declare const useSelectContext: () => SelectContextType;
|
|
|
1366
1247
|
* @param props - Props for configuring the SelectProvider.
|
|
1367
1248
|
* @returns JSX element that provides context to its children.
|
|
1368
1249
|
*/
|
|
1369
|
-
declare const SelectProvider: ({ children, value, defaultValue, multiple, disabled, onValueChanged, }: SelectProviderProps) =>
|
|
1250
|
+
declare const SelectProvider: ({ children, value, defaultValue, multiple, disabled, onValueChanged, }: SelectProviderProps) => React__default.JSX.Element;
|
|
1370
1251
|
|
|
1371
1252
|
/**
|
|
1372
1253
|
* Select component that wraps SelectComponent with SelectProvider.
|
|
@@ -1398,7 +1279,7 @@ interface TabContentProps {
|
|
|
1398
1279
|
className?: string;
|
|
1399
1280
|
}
|
|
1400
1281
|
|
|
1401
|
-
declare const TabContent: (props: TabContentProps) =>
|
|
1282
|
+
declare const TabContent: (props: TabContentProps) => React__default.JSX.Element | null;
|
|
1402
1283
|
|
|
1403
1284
|
type TabItemStyleEnum = 'Filled' | 'Underlined';
|
|
1404
1285
|
type TabItemProps = Omit<ButtonProps, 'actionType' | 'appearance' | 'size' | 'style' | 'type'> & {
|
|
@@ -1425,23 +1306,23 @@ type TabItemProps = Omit<ButtonProps, 'actionType' | 'appearance' | 'size' | 'st
|
|
|
1425
1306
|
style?: TabItemStyleEnum;
|
|
1426
1307
|
};
|
|
1427
1308
|
|
|
1428
|
-
declare const TabItem: (props: TabItemProps) =>
|
|
1309
|
+
declare const TabItem: (props: TabItemProps) => React__default.JSX.Element;
|
|
1429
1310
|
|
|
1430
1311
|
type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1431
1312
|
|
|
1432
|
-
declare const TableBody: (props: TableBodyProps) =>
|
|
1313
|
+
declare const TableBody: (props: TableBodyProps) => React__default.JSX.Element;
|
|
1433
1314
|
|
|
1434
1315
|
type TableCellProps = TdHTMLAttributes<HTMLTableCellElement>;
|
|
1435
1316
|
|
|
1436
|
-
declare const TableCell: (props: TableCellProps) =>
|
|
1317
|
+
declare const TableCell: (props: TableCellProps) => React__default.JSX.Element;
|
|
1437
1318
|
|
|
1438
1319
|
type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1439
1320
|
|
|
1440
|
-
declare const TableHeader: (props: TableHeaderProps) =>
|
|
1321
|
+
declare const TableHeader: (props: TableHeaderProps) => React__default.JSX.Element;
|
|
1441
1322
|
|
|
1442
1323
|
type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
|
|
1443
1324
|
|
|
1444
|
-
declare const TableRow: (props: TableRowProps) =>
|
|
1325
|
+
declare const TableRow: (props: TableRowProps) => React__default.JSX.Element;
|
|
1445
1326
|
|
|
1446
1327
|
type TabsStyleEnum = 'Filled' | 'Underlined';
|
|
1447
1328
|
type TabsTypeEnum = 'Horizontal' | 'Vertical';
|
|
@@ -1509,13 +1390,161 @@ type TabsProps = TabProviderProps & TabsViewProps;
|
|
|
1509
1390
|
*/
|
|
1510
1391
|
declare const useTab: () => TabContextType;
|
|
1511
1392
|
|
|
1512
|
-
declare const Tabs: (props: TabsProps) =>
|
|
1393
|
+
declare const Tabs: (props: TabsProps) => React__default.JSX.Element;
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Enum for the alignment of the list.
|
|
1397
|
+
*
|
|
1398
|
+
* @typedef {'Horizontal' | 'Vertical'} ListAlignEnum
|
|
1399
|
+
*/
|
|
1400
|
+
type ListAlignEnum = 'Horizontal' | 'Vertical';
|
|
1401
|
+
/**
|
|
1402
|
+
* Represents a generic list item.
|
|
1403
|
+
*
|
|
1404
|
+
* @property {string | number} [id] - A unique identifier for the list item. This is optional and can be auto-generated if not provided.
|
|
1405
|
+
* @property {string} [itemClassName] - Additional class for styling the list item.
|
|
1406
|
+
* @property {React.CSSProperties} [itemStyle] - Additional styles for the list item.
|
|
1407
|
+
*/
|
|
1408
|
+
type ListItemType = object & {
|
|
1409
|
+
id?: string | number;
|
|
1410
|
+
itemClassName?: string;
|
|
1411
|
+
itemStyle?: React.CSSProperties;
|
|
1412
|
+
};
|
|
1413
|
+
/**
|
|
1414
|
+
* Props for the list wrapper component.
|
|
1415
|
+
*
|
|
1416
|
+
* @template T - The type of the list items.
|
|
1417
|
+
* @property {T[]} [data] - The data to be rendered in the list.
|
|
1418
|
+
* @property {React.FC<any>} component - The React functional component used to render each list item.
|
|
1419
|
+
* @property {(item: T, index: number) => string | number} [keyExtractor] - A function to extract unique keys for each item.
|
|
1420
|
+
* @property {'Horizontal' | 'Vertical'} [align='Vertical'] - The alignment of the list. Defaults to `'Vertical'`.
|
|
1421
|
+
* @property {boolean} [wrap] - Whether the list content should wrap.
|
|
1422
|
+
* @property {string} [className] - Additional class for styling the list.
|
|
1423
|
+
* @property {boolean} [sortable] - Whether the list items can be sorted using drag-and-drop.
|
|
1424
|
+
* @property {Dispatch<SetStateAction<T[]>>} [updateSortOrder] - Callback function to update the order of the list items after sorting.
|
|
1425
|
+
*/
|
|
1426
|
+
type ListProps<T extends ListItemType> = Omit<HTMLAttributes<HTMLUListElement>, 'children'> & {
|
|
1427
|
+
/**
|
|
1428
|
+
* The data to be rendered in the list.
|
|
1429
|
+
*/
|
|
1430
|
+
data?: T[];
|
|
1431
|
+
/**
|
|
1432
|
+
* The component used to render each item in the list.
|
|
1433
|
+
*/
|
|
1434
|
+
component: React.FC<any>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Function to extract keys.
|
|
1437
|
+
*/
|
|
1438
|
+
keyExtractor?: (item: T, index: number) => string | number;
|
|
1439
|
+
/**
|
|
1440
|
+
* The alignment of the list.
|
|
1441
|
+
* @default 'Vertical'
|
|
1442
|
+
*/
|
|
1443
|
+
align?: ListAlignEnum;
|
|
1444
|
+
/**
|
|
1445
|
+
* Flag to control if the content should wrap.
|
|
1446
|
+
*/
|
|
1447
|
+
wrap?: boolean;
|
|
1448
|
+
/**
|
|
1449
|
+
* Additional class for styling.
|
|
1450
|
+
*/
|
|
1451
|
+
className?: string;
|
|
1452
|
+
/**
|
|
1453
|
+
* Flag to enable sorting of list items
|
|
1454
|
+
*/
|
|
1455
|
+
sortable?: boolean;
|
|
1456
|
+
/**
|
|
1457
|
+
* callback function to update the current order of data
|
|
1458
|
+
*
|
|
1459
|
+
* @param data
|
|
1460
|
+
* @returns
|
|
1461
|
+
*/
|
|
1462
|
+
updateSortOrder?: Dispatch<SetStateAction<T[]>>;
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* A wrapper component that manages the rendering of either a sortable or regular list based on the provided props.
|
|
1467
|
+
*
|
|
1468
|
+
* @template T - The type of the list items.
|
|
1469
|
+
* @param {ListProps<T>} props - The properties for the list wrapper.
|
|
1470
|
+
* @returns {JSX.Element} The rendered list component.
|
|
1471
|
+
*/
|
|
1472
|
+
declare const List: <T extends ListItemType>(props: ListProps<T>) => React__default.JSX.Element;
|
|
1473
|
+
|
|
1474
|
+
type ActionCardProps = HTMLAttributes<HTMLDivElement> & Omit<LinkProps, 'to'> & {
|
|
1475
|
+
/**
|
|
1476
|
+
* The content to be displayed within the action card.
|
|
1477
|
+
*/
|
|
1478
|
+
children: ReactNode;
|
|
1479
|
+
/**
|
|
1480
|
+
* Specifies if the action card is disabled.
|
|
1481
|
+
* @default false
|
|
1482
|
+
*/
|
|
1483
|
+
disabled?: boolean;
|
|
1484
|
+
/**
|
|
1485
|
+
* Additional class for styling.
|
|
1486
|
+
*/
|
|
1487
|
+
className?: string;
|
|
1488
|
+
/**
|
|
1489
|
+
* The destination URL or path for the navigation link.
|
|
1490
|
+
* If the URL starts with "https", it will be treated as an external link and rendered as an <a> tag.
|
|
1491
|
+
* Otherwise, it will be treated as an internal link and rendered as a <RouterNavLink> component.
|
|
1492
|
+
*
|
|
1493
|
+
* @example
|
|
1494
|
+
* // Internal link
|
|
1495
|
+
* <NavLink to="/home">Home</NavLink>
|
|
1496
|
+
*
|
|
1497
|
+
* // External link
|
|
1498
|
+
* <NavLink to="https://www.example.com">External</NavLink>
|
|
1499
|
+
*/
|
|
1500
|
+
to?: string | -1;
|
|
1501
|
+
};
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
* ActionCard component definition.
|
|
1505
|
+
*/
|
|
1506
|
+
declare const ActionCard: (props: ActionCardProps) => React__default.JSX.Element;
|
|
1507
|
+
|
|
1508
|
+
type CardProps = {
|
|
1509
|
+
/**
|
|
1510
|
+
* The content to be displayed within the card.
|
|
1511
|
+
*/
|
|
1512
|
+
children: ReactNode;
|
|
1513
|
+
/**
|
|
1514
|
+
* Additional class for styling.
|
|
1515
|
+
*/
|
|
1516
|
+
className?: string;
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* Card component definition.
|
|
1521
|
+
*/
|
|
1522
|
+
declare const Card: (props: CardProps) => React__default.JSX.Element;
|
|
1523
|
+
|
|
1524
|
+
type GridListProps<T extends ListItemType> = Omit<ListProps<T>, 'style'> & {
|
|
1525
|
+
columns?: number;
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
declare const GridList: <T extends ListItemType>(props: GridListProps<T>) => React__default.JSX.Element;
|
|
1529
|
+
|
|
1530
|
+
type GridProps = HTMLAttributes<HTMLDivElement> & {
|
|
1531
|
+
columns?: number;
|
|
1532
|
+
rows?: number;
|
|
1533
|
+
};
|
|
1534
|
+
type GridItemProps = HTMLAttributes<HTMLDivElement> & {
|
|
1535
|
+
columnSpan?: number;
|
|
1536
|
+
rowSpan?: number;
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1539
|
+
declare const Grid: (props: GridProps) => React__default.JSX.Element;
|
|
1540
|
+
|
|
1541
|
+
declare const GridItem: (props: GridItemProps) => React$1.JSX.Element;
|
|
1513
1542
|
|
|
1514
|
-
declare const Form: <T extends FormState>(props: FormProviderProps<T> & FormProps) =>
|
|
1543
|
+
declare const Form: <T extends FormState>(props: FormProviderProps<T> & FormProps) => React__default.JSX.Element;
|
|
1515
1544
|
|
|
1516
1545
|
type TableProps = TableHTMLAttributes<HTMLTableElement>;
|
|
1517
1546
|
|
|
1518
|
-
declare const Table: (props: TableProps) =>
|
|
1547
|
+
declare const Table: (props: TableProps) => React__default.JSX.Element;
|
|
1519
1548
|
|
|
1520
1549
|
type ThemeContextType = {
|
|
1521
1550
|
theme: string;
|
|
@@ -1526,7 +1555,7 @@ type ThemeProviderProps = {
|
|
|
1526
1555
|
children?: ReactNode;
|
|
1527
1556
|
};
|
|
1528
1557
|
|
|
1529
|
-
declare const ThemeContext:
|
|
1530
|
-
declare const ThemeProvider:
|
|
1558
|
+
declare const ThemeContext: React__default.Context<ThemeContextType>;
|
|
1559
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
1531
1560
|
|
|
1532
|
-
export { ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Breakpoint, type BreakpointProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, DatePicker, type DatePickerProps, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, ListItem, type ListItemProps, type ListProps, MenuItem, type MenuItemProps, Modal, type ModalProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, Option, type OptionProps, type OverlayDirectionEnum, Password, Popover, type PopoverHandle, type PopoverProps, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Select, type SelectProps, SelectProvider, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, useField, useSelectContext, useTab };
|
|
1561
|
+
export { ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Breakpoint, type BreakpointProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, DatePicker, type DatePickerProps, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Grid, GridItem, type GridItemProps, GridList, type GridListProps, type GridProps, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, ListItem, type ListItemProps, type ListProps, MenuItem, type MenuItemProps, Modal, type ModalProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, Option, type OptionProps, type OverlayDirectionEnum, Password, Popover, type PopoverHandle, type PopoverProps, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Select, type SelectProps, SelectProvider, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, useField, useSelectContext, useTab };
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|