@delightui/components 0.1.27 → 0.1.28
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/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 +608 -590
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- 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 +608 -590
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +196 -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.
|
|
@@ -88,7 +55,7 @@ type ActionImageProps = ImageProps & {
|
|
|
88
55
|
/**
|
|
89
56
|
* ActionImage component definition.
|
|
90
57
|
*/
|
|
91
|
-
declare const ActionImage: (props: ActionImageProps) =>
|
|
58
|
+
declare const ActionImage: (props: ActionImageProps) => React__default.JSX.Element;
|
|
92
59
|
|
|
93
60
|
type ButtonAppearanceEnum = 'Default' | 'Inverse';
|
|
94
61
|
type ButtonTypeEnum = 'Filled' | 'Outlined' | 'Ghost';
|
|
@@ -152,23 +119,7 @@ type ButtonProps = Omit<HTMLAttributes<HTMLButtonElement>, 'style'> & {
|
|
|
152
119
|
/**
|
|
153
120
|
* Button component definition.
|
|
154
121
|
*/
|
|
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;
|
|
122
|
+
declare const Button: (props: ButtonProps) => React__default.JSX.Element;
|
|
172
123
|
|
|
173
124
|
type IconStyleEnum = 'Outlined' | 'Filled' | 'Round';
|
|
174
125
|
type IconSizeEnum = 'Small' | 'Medium' | 'Large';
|
|
@@ -193,7 +144,7 @@ interface IconProps {
|
|
|
193
144
|
className?: string;
|
|
194
145
|
}
|
|
195
146
|
|
|
196
|
-
declare const Icon: (props: IconProps) =>
|
|
147
|
+
declare const Icon: (props: IconProps) => React__default.JSX.Element | null;
|
|
197
148
|
|
|
198
149
|
type IconButtonAppearanceEnum = 'Default' | 'Inverse';
|
|
199
150
|
type IconButtonStyleEnum = 'Primary' | 'Secondary';
|
|
@@ -220,7 +171,7 @@ interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIco
|
|
|
220
171
|
size?: IconButtonSizeEnum;
|
|
221
172
|
}
|
|
222
173
|
|
|
223
|
-
declare const IconButton: (props: IconButtonProps) =>
|
|
174
|
+
declare const IconButton: (props: IconButtonProps) => React__default.JSX.Element;
|
|
224
175
|
|
|
225
176
|
/**
|
|
226
177
|
* Enum for different input types.
|
|
@@ -260,102 +211,27 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value'>
|
|
|
260
211
|
'component-variant'?: string;
|
|
261
212
|
};
|
|
262
213
|
|
|
263
|
-
declare const Input:
|
|
214
|
+
declare const Input: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "value" | "type"> & {
|
|
264
215
|
inputType?: InputTypeEnum;
|
|
265
216
|
value?: string;
|
|
266
217
|
onValueChanged?: (value: string) => void;
|
|
267
218
|
invalid?: boolean;
|
|
268
|
-
leadingIcon?:
|
|
269
|
-
trailingIcon?:
|
|
219
|
+
leadingIcon?: React__default.ReactNode;
|
|
220
|
+
trailingIcon?: React__default.ReactNode;
|
|
270
221
|
'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;
|
|
222
|
+
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
347
223
|
|
|
348
224
|
type PasswordProps = Omit<InputProps, 'inputType' | 'trailingIcon'> & {
|
|
349
225
|
hideTrailingIcon?: boolean;
|
|
350
226
|
};
|
|
351
227
|
|
|
352
|
-
declare const Password: (props: PasswordProps) =>
|
|
228
|
+
declare const Password: (props: PasswordProps) => React__default.JSX.Element;
|
|
353
229
|
|
|
354
230
|
type SpinnerProps = {
|
|
355
231
|
className?: string;
|
|
356
232
|
};
|
|
357
233
|
|
|
358
|
-
declare const Spinner: ({ className }: SpinnerProps) =>
|
|
234
|
+
declare const Spinner: ({ className }: SpinnerProps) => React__default.JSX.Element;
|
|
359
235
|
|
|
360
236
|
declare const types: readonly ["Heading1", "Heading2", "Heading3", "Heading4", "Heading5", "Heading6", "BodyLarge", "BodyMedium", "BodySmall"];
|
|
361
237
|
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 +311,7 @@ interface TextProps {
|
|
|
435
311
|
/**
|
|
436
312
|
* Text component definition.
|
|
437
313
|
*/
|
|
438
|
-
declare const Text: (props: TextProps) =>
|
|
314
|
+
declare const Text: (props: TextProps) => React__default.JSX.Element;
|
|
439
315
|
|
|
440
316
|
type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value'> & {
|
|
441
317
|
/**
|
|
@@ -458,12 +334,12 @@ type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value'>
|
|
|
458
334
|
className?: string;
|
|
459
335
|
};
|
|
460
336
|
|
|
461
|
-
declare const TextArea:
|
|
337
|
+
declare const TextArea: React__default.ForwardRefExoticComponent<Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "value"> & {
|
|
462
338
|
value?: string;
|
|
463
339
|
onValueChanged?: (value: string) => void;
|
|
464
340
|
invalid?: boolean;
|
|
465
341
|
className?: string;
|
|
466
|
-
} &
|
|
342
|
+
} & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
467
343
|
|
|
468
344
|
type ResponsiveComponentProps<T> = {
|
|
469
345
|
component: React.FC<T>;
|
|
@@ -474,8 +350,8 @@ type BreakpointProps<T> = {
|
|
|
474
350
|
children: React.ReactElement<T>;
|
|
475
351
|
};
|
|
476
352
|
|
|
477
|
-
declare const Breakpoint: <T>({ children }: BreakpointProps<T>) =>
|
|
478
|
-
declare const ResponsiveComponent: <T>(props: ResponsiveComponentProps<T>) =>
|
|
353
|
+
declare const Breakpoint: <T>({ children }: BreakpointProps<T>) => React__default.JSX.Element;
|
|
354
|
+
declare const ResponsiveComponent: <T>(props: ResponsiveComponentProps<T>) => React__default.JSX.Element;
|
|
479
355
|
|
|
480
356
|
type ListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
481
357
|
/**
|
|
@@ -500,7 +376,7 @@ type ListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
|
500
376
|
className?: string;
|
|
501
377
|
};
|
|
502
378
|
|
|
503
|
-
declare const ListItem: (props: ListItemProps) =>
|
|
379
|
+
declare const ListItem: (props: ListItemProps) => React__default.JSX.Element;
|
|
504
380
|
|
|
505
381
|
/**
|
|
506
382
|
* Enum for the alignment of the button-group.
|
|
@@ -534,7 +410,7 @@ type ButtonGroupProps = {
|
|
|
534
410
|
/**
|
|
535
411
|
* ButtonGroup component definition.
|
|
536
412
|
*/
|
|
537
|
-
declare const ButtonGroup: (props: ButtonGroupProps) =>
|
|
413
|
+
declare const ButtonGroup: (props: ButtonGroupProps) => React__default.JSX.Element;
|
|
538
414
|
|
|
539
415
|
/**
|
|
540
416
|
* Enum for the action type of the Popover.
|
|
@@ -562,7 +438,7 @@ type PopoverProps = {
|
|
|
562
438
|
/**
|
|
563
439
|
* Ref or Element for the Popover component to render in.
|
|
564
440
|
*/
|
|
565
|
-
container?: HTMLElement |
|
|
441
|
+
container?: HTMLElement | React__default.RefObject<HTMLElement> | null;
|
|
566
442
|
/**
|
|
567
443
|
* The content to display in the Popover.
|
|
568
444
|
*/
|
|
@@ -653,11 +529,11 @@ type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
|
|
|
653
529
|
/**
|
|
654
530
|
* The content to be rendered inside the context menu.
|
|
655
531
|
*/
|
|
656
|
-
children:
|
|
532
|
+
children: React__default.ReactNode;
|
|
657
533
|
/**
|
|
658
534
|
* The element that triggers the display of the context menu.
|
|
659
535
|
*/
|
|
660
|
-
target:
|
|
536
|
+
target: React__default.ReactNode;
|
|
661
537
|
/**
|
|
662
538
|
* Alignment of the menu relative to its target.
|
|
663
539
|
* @default 'Center'
|
|
@@ -710,7 +586,7 @@ type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
|
|
|
710
586
|
/**
|
|
711
587
|
* ContextMenu component that renders a popover menu.
|
|
712
588
|
*/
|
|
713
|
-
declare const ContextMenu: (props: ContextMenuProps) =>
|
|
589
|
+
declare const ContextMenu: (props: ContextMenuProps) => React__default.JSX.Element;
|
|
714
590
|
|
|
715
591
|
/**
|
|
716
592
|
* Props for the MenuItem component.
|
|
@@ -741,7 +617,7 @@ type MenuItemProps = HTMLAttributes<HTMLLIElement> & {
|
|
|
741
617
|
*
|
|
742
618
|
* Renders a menu item (`<li>`) with optional disabled and selected states.
|
|
743
619
|
*/
|
|
744
|
-
declare const MenuItem: (props: MenuItemProps) =>
|
|
620
|
+
declare const MenuItem: (props: MenuItemProps) => React__default.JSX.Element;
|
|
745
621
|
|
|
746
622
|
type DatePickerPosition = 'auto' | 'above' | 'below' | 'auto left' | 'auto center' | 'auto right' | 'above left' | 'above center' | 'above right' | 'below left' | 'below center' | 'below right';
|
|
747
623
|
type DatePickerProps = {
|
|
@@ -844,7 +720,7 @@ type CustomTimePickerConfig = {
|
|
|
844
720
|
minuteStep: number;
|
|
845
721
|
};
|
|
846
722
|
|
|
847
|
-
declare const DatePicker: (props: DatePickerProps) =>
|
|
723
|
+
declare const DatePicker: (props: DatePickerProps) => React__default.JSX.Element;
|
|
848
724
|
|
|
849
725
|
/**
|
|
850
726
|
* Type representing the allowed values for form fields
|
|
@@ -966,13 +842,13 @@ type FormContextValues<T extends FormState = FormState> = {
|
|
|
966
842
|
updateFieldValue: (name: string, value: FieldValue) => void;
|
|
967
843
|
formErrors: FormErrors<T>;
|
|
968
844
|
updateFieldError: (name: keyof T, errorMessage: string) => void;
|
|
969
|
-
onFormSubmit:
|
|
845
|
+
onFormSubmit: React__default.FormEventHandler<HTMLFormElement>;
|
|
970
846
|
updateFieldValidators: (name: keyof T, validate?: FieldValidationFunction) => void;
|
|
971
847
|
updateRequiredFields: (name: keyof T, required?: boolean) => void;
|
|
972
848
|
};
|
|
973
849
|
type FormProviderProps<T extends FormState = FormState> = {
|
|
974
850
|
formRef?: Ref<HTMLFormElement>;
|
|
975
|
-
children?:
|
|
851
|
+
children?: React__default.ReactNode;
|
|
976
852
|
formState?: T;
|
|
977
853
|
onFormStateChange?: FormStateChangeHandler<T>;
|
|
978
854
|
formValidator?: FormValidator<T>;
|
|
@@ -1080,7 +956,7 @@ declare const useField: <T extends FieldValue = FieldValue>(props: UseFieldProps
|
|
|
1080
956
|
formFieldId: string | undefined;
|
|
1081
957
|
};
|
|
1082
958
|
|
|
1083
|
-
declare const FormField: (props: FormFieldProviderProps & FormFieldProps) =>
|
|
959
|
+
declare const FormField: (props: FormFieldProviderProps & FormFieldProps) => React__default.JSX.Element;
|
|
1084
960
|
|
|
1085
961
|
/**
|
|
1086
962
|
* Enum defining the possible sizes for the Modal component.
|
|
@@ -1139,15 +1015,15 @@ type ModalProps = {
|
|
|
1139
1015
|
/**
|
|
1140
1016
|
* Modal component for displaying a dialog window.
|
|
1141
1017
|
*/
|
|
1142
|
-
declare const Modal: (props: ModalProps) =>
|
|
1018
|
+
declare const Modal: (props: ModalProps) => React__default.JSX.Element;
|
|
1143
1019
|
|
|
1144
1020
|
type NavProps = HTMLAttributes<HTMLElement> & {};
|
|
1145
1021
|
|
|
1146
|
-
declare const Nav: (props: NavProps) =>
|
|
1022
|
+
declare const Nav: (props: NavProps) => React__default.JSX.Element;
|
|
1147
1023
|
|
|
1148
1024
|
type NavItemProps = LiHTMLAttributes<HTMLElement> & {};
|
|
1149
1025
|
|
|
1150
|
-
declare const NavItem: (props: NavItemProps) =>
|
|
1026
|
+
declare const NavItem: (props: NavItemProps) => React__default.JSX.Element;
|
|
1151
1027
|
|
|
1152
1028
|
type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'appearance' | 'size' | 'style' | 'type'> & {
|
|
1153
1029
|
/**
|
|
@@ -1169,13 +1045,13 @@ type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'appearance' | 'si
|
|
|
1169
1045
|
'component-variant'?: string;
|
|
1170
1046
|
};
|
|
1171
1047
|
|
|
1172
|
-
declare const NavLink: (props: NavLinkProps) =>
|
|
1048
|
+
declare const NavLink: (props: NavLinkProps) => React__default.JSX.Element;
|
|
1173
1049
|
|
|
1174
1050
|
/**
|
|
1175
1051
|
* Popover component that displays a floating content element in relation to a target element.
|
|
1176
1052
|
* It can be triggered via different user actions like 'Click' or 'Hover'.
|
|
1177
1053
|
*/
|
|
1178
|
-
declare const Popover:
|
|
1054
|
+
declare const Popover: React__default.ForwardRefExoticComponent<PopoverProps & React__default.RefAttributes<PopoverHandle>>;
|
|
1179
1055
|
|
|
1180
1056
|
/**
|
|
1181
1057
|
* Props for the Option component, extending LiHTMLAttributes<HTMLLIElement>.
|
|
@@ -1215,7 +1091,7 @@ type OptionProps = LiHTMLAttributes<HTMLLIElement> & {
|
|
|
1215
1091
|
* @param props - Props for configuring the Option component.
|
|
1216
1092
|
* @returns Element representing the option.
|
|
1217
1093
|
*/
|
|
1218
|
-
declare const Option: (props: OptionProps) =>
|
|
1094
|
+
declare const Option: (props: OptionProps) => React__default.JSX.Element;
|
|
1219
1095
|
|
|
1220
1096
|
/**
|
|
1221
1097
|
* Represents the context provided by the Select component.
|
|
@@ -1366,7 +1242,7 @@ declare const useSelectContext: () => SelectContextType;
|
|
|
1366
1242
|
* @param props - Props for configuring the SelectProvider.
|
|
1367
1243
|
* @returns JSX element that provides context to its children.
|
|
1368
1244
|
*/
|
|
1369
|
-
declare const SelectProvider: ({ children, value, defaultValue, multiple, disabled, onValueChanged, }: SelectProviderProps) =>
|
|
1245
|
+
declare const SelectProvider: ({ children, value, defaultValue, multiple, disabled, onValueChanged, }: SelectProviderProps) => React__default.JSX.Element;
|
|
1370
1246
|
|
|
1371
1247
|
/**
|
|
1372
1248
|
* Select component that wraps SelectComponent with SelectProvider.
|
|
@@ -1398,7 +1274,7 @@ interface TabContentProps {
|
|
|
1398
1274
|
className?: string;
|
|
1399
1275
|
}
|
|
1400
1276
|
|
|
1401
|
-
declare const TabContent: (props: TabContentProps) =>
|
|
1277
|
+
declare const TabContent: (props: TabContentProps) => React__default.JSX.Element | null;
|
|
1402
1278
|
|
|
1403
1279
|
type TabItemStyleEnum = 'Filled' | 'Underlined';
|
|
1404
1280
|
type TabItemProps = Omit<ButtonProps, 'actionType' | 'appearance' | 'size' | 'style' | 'type'> & {
|
|
@@ -1425,23 +1301,23 @@ type TabItemProps = Omit<ButtonProps, 'actionType' | 'appearance' | 'size' | 'st
|
|
|
1425
1301
|
style?: TabItemStyleEnum;
|
|
1426
1302
|
};
|
|
1427
1303
|
|
|
1428
|
-
declare const TabItem: (props: TabItemProps) =>
|
|
1304
|
+
declare const TabItem: (props: TabItemProps) => React__default.JSX.Element;
|
|
1429
1305
|
|
|
1430
1306
|
type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1431
1307
|
|
|
1432
|
-
declare const TableBody: (props: TableBodyProps) =>
|
|
1308
|
+
declare const TableBody: (props: TableBodyProps) => React__default.JSX.Element;
|
|
1433
1309
|
|
|
1434
1310
|
type TableCellProps = TdHTMLAttributes<HTMLTableCellElement>;
|
|
1435
1311
|
|
|
1436
|
-
declare const TableCell: (props: TableCellProps) =>
|
|
1312
|
+
declare const TableCell: (props: TableCellProps) => React__default.JSX.Element;
|
|
1437
1313
|
|
|
1438
1314
|
type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1439
1315
|
|
|
1440
|
-
declare const TableHeader: (props: TableHeaderProps) =>
|
|
1316
|
+
declare const TableHeader: (props: TableHeaderProps) => React__default.JSX.Element;
|
|
1441
1317
|
|
|
1442
1318
|
type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
|
|
1443
1319
|
|
|
1444
|
-
declare const TableRow: (props: TableRowProps) =>
|
|
1320
|
+
declare const TableRow: (props: TableRowProps) => React__default.JSX.Element;
|
|
1445
1321
|
|
|
1446
1322
|
type TabsStyleEnum = 'Filled' | 'Underlined';
|
|
1447
1323
|
type TabsTypeEnum = 'Horizontal' | 'Vertical';
|
|
@@ -1509,13 +1385,161 @@ type TabsProps = TabProviderProps & TabsViewProps;
|
|
|
1509
1385
|
*/
|
|
1510
1386
|
declare const useTab: () => TabContextType;
|
|
1511
1387
|
|
|
1512
|
-
declare const Tabs: (props: TabsProps) =>
|
|
1388
|
+
declare const Tabs: (props: TabsProps) => React__default.JSX.Element;
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* Enum for the alignment of the list.
|
|
1392
|
+
*
|
|
1393
|
+
* @typedef {'Horizontal' | 'Vertical'} ListAlignEnum
|
|
1394
|
+
*/
|
|
1395
|
+
type ListAlignEnum = 'Horizontal' | 'Vertical';
|
|
1396
|
+
/**
|
|
1397
|
+
* Represents a generic list item.
|
|
1398
|
+
*
|
|
1399
|
+
* @property {string | number} [id] - A unique identifier for the list item. This is optional and can be auto-generated if not provided.
|
|
1400
|
+
* @property {string} [itemClassName] - Additional class for styling the list item.
|
|
1401
|
+
* @property {React.CSSProperties} [itemStyle] - Additional styles for the list item.
|
|
1402
|
+
*/
|
|
1403
|
+
type ListItemType = object & {
|
|
1404
|
+
id?: string | number;
|
|
1405
|
+
itemClassName?: string;
|
|
1406
|
+
itemStyle?: React.CSSProperties;
|
|
1407
|
+
};
|
|
1408
|
+
/**
|
|
1409
|
+
* Props for the list wrapper component.
|
|
1410
|
+
*
|
|
1411
|
+
* @template T - The type of the list items.
|
|
1412
|
+
* @property {T[]} [data] - The data to be rendered in the list.
|
|
1413
|
+
* @property {React.FC<any>} component - The React functional component used to render each list item.
|
|
1414
|
+
* @property {(item: T, index: number) => string | number} [keyExtractor] - A function to extract unique keys for each item.
|
|
1415
|
+
* @property {'Horizontal' | 'Vertical'} [align='Vertical'] - The alignment of the list. Defaults to `'Vertical'`.
|
|
1416
|
+
* @property {boolean} [wrap] - Whether the list content should wrap.
|
|
1417
|
+
* @property {string} [className] - Additional class for styling the list.
|
|
1418
|
+
* @property {boolean} [sortable] - Whether the list items can be sorted using drag-and-drop.
|
|
1419
|
+
* @property {Dispatch<SetStateAction<T[]>>} [updateSortOrder] - Callback function to update the order of the list items after sorting.
|
|
1420
|
+
*/
|
|
1421
|
+
type ListProps<T extends ListItemType> = Omit<HTMLAttributes<HTMLUListElement>, 'children'> & {
|
|
1422
|
+
/**
|
|
1423
|
+
* The data to be rendered in the list.
|
|
1424
|
+
*/
|
|
1425
|
+
data?: T[];
|
|
1426
|
+
/**
|
|
1427
|
+
* The component used to render each item in the list.
|
|
1428
|
+
*/
|
|
1429
|
+
component: React.FC<any>;
|
|
1430
|
+
/**
|
|
1431
|
+
* Function to extract keys.
|
|
1432
|
+
*/
|
|
1433
|
+
keyExtractor?: (item: T, index: number) => string | number;
|
|
1434
|
+
/**
|
|
1435
|
+
* The alignment of the list.
|
|
1436
|
+
* @default 'Vertical'
|
|
1437
|
+
*/
|
|
1438
|
+
align?: ListAlignEnum;
|
|
1439
|
+
/**
|
|
1440
|
+
* Flag to control if the content should wrap.
|
|
1441
|
+
*/
|
|
1442
|
+
wrap?: boolean;
|
|
1443
|
+
/**
|
|
1444
|
+
* Additional class for styling.
|
|
1445
|
+
*/
|
|
1446
|
+
className?: string;
|
|
1447
|
+
/**
|
|
1448
|
+
* Flag to enable sorting of list items
|
|
1449
|
+
*/
|
|
1450
|
+
sortable?: boolean;
|
|
1451
|
+
/**
|
|
1452
|
+
* callback function to update the current order of data
|
|
1453
|
+
*
|
|
1454
|
+
* @param data
|
|
1455
|
+
* @returns
|
|
1456
|
+
*/
|
|
1457
|
+
updateSortOrder?: Dispatch<SetStateAction<T[]>>;
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* A wrapper component that manages the rendering of either a sortable or regular list based on the provided props.
|
|
1462
|
+
*
|
|
1463
|
+
* @template T - The type of the list items.
|
|
1464
|
+
* @param {ListProps<T>} props - The properties for the list wrapper.
|
|
1465
|
+
* @returns {JSX.Element} The rendered list component.
|
|
1466
|
+
*/
|
|
1467
|
+
declare const List: <T extends ListItemType>(props: ListProps<T>) => React__default.JSX.Element;
|
|
1468
|
+
|
|
1469
|
+
type ActionCardProps = HTMLAttributes<HTMLDivElement> & Omit<LinkProps, 'to'> & {
|
|
1470
|
+
/**
|
|
1471
|
+
* The content to be displayed within the action card.
|
|
1472
|
+
*/
|
|
1473
|
+
children: ReactNode;
|
|
1474
|
+
/**
|
|
1475
|
+
* Specifies if the action card is disabled.
|
|
1476
|
+
* @default false
|
|
1477
|
+
*/
|
|
1478
|
+
disabled?: boolean;
|
|
1479
|
+
/**
|
|
1480
|
+
* Additional class for styling.
|
|
1481
|
+
*/
|
|
1482
|
+
className?: string;
|
|
1483
|
+
/**
|
|
1484
|
+
* The destination URL or path for the navigation link.
|
|
1485
|
+
* If the URL starts with "https", it will be treated as an external link and rendered as an <a> tag.
|
|
1486
|
+
* Otherwise, it will be treated as an internal link and rendered as a <RouterNavLink> component.
|
|
1487
|
+
*
|
|
1488
|
+
* @example
|
|
1489
|
+
* // Internal link
|
|
1490
|
+
* <NavLink to="/home">Home</NavLink>
|
|
1491
|
+
*
|
|
1492
|
+
* // External link
|
|
1493
|
+
* <NavLink to="https://www.example.com">External</NavLink>
|
|
1494
|
+
*/
|
|
1495
|
+
to?: string | -1;
|
|
1496
|
+
};
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* ActionCard component definition.
|
|
1500
|
+
*/
|
|
1501
|
+
declare const ActionCard: (props: ActionCardProps) => React__default.JSX.Element;
|
|
1502
|
+
|
|
1503
|
+
type CardProps = {
|
|
1504
|
+
/**
|
|
1505
|
+
* The content to be displayed within the card.
|
|
1506
|
+
*/
|
|
1507
|
+
children: ReactNode;
|
|
1508
|
+
/**
|
|
1509
|
+
* Additional class for styling.
|
|
1510
|
+
*/
|
|
1511
|
+
className?: string;
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* Card component definition.
|
|
1516
|
+
*/
|
|
1517
|
+
declare const Card: (props: CardProps) => React__default.JSX.Element;
|
|
1518
|
+
|
|
1519
|
+
type GridListProps<T extends ListItemType> = Omit<ListProps<T>, 'style'> & {
|
|
1520
|
+
columns?: number;
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1523
|
+
declare const GridList: <T extends ListItemType>(props: GridListProps<T>) => React__default.JSX.Element;
|
|
1524
|
+
|
|
1525
|
+
type GridProps = HTMLAttributes<HTMLDivElement> & {
|
|
1526
|
+
columns?: number;
|
|
1527
|
+
rows?: number;
|
|
1528
|
+
};
|
|
1529
|
+
type GridItemProps = HTMLAttributes<HTMLDivElement> & {
|
|
1530
|
+
columnSpan?: number;
|
|
1531
|
+
rowSpan?: number;
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1534
|
+
declare const Grid: (props: GridProps) => React__default.JSX.Element;
|
|
1535
|
+
|
|
1536
|
+
declare const GridItem: (props: GridItemProps) => React$1.JSX.Element;
|
|
1513
1537
|
|
|
1514
|
-
declare const Form: <T extends FormState>(props: FormProviderProps<T> & FormProps) =>
|
|
1538
|
+
declare const Form: <T extends FormState>(props: FormProviderProps<T> & FormProps) => React__default.JSX.Element;
|
|
1515
1539
|
|
|
1516
1540
|
type TableProps = TableHTMLAttributes<HTMLTableElement>;
|
|
1517
1541
|
|
|
1518
|
-
declare const Table: (props: TableProps) =>
|
|
1542
|
+
declare const Table: (props: TableProps) => React__default.JSX.Element;
|
|
1519
1543
|
|
|
1520
1544
|
type ThemeContextType = {
|
|
1521
1545
|
theme: string;
|
|
@@ -1526,7 +1550,7 @@ type ThemeProviderProps = {
|
|
|
1526
1550
|
children?: ReactNode;
|
|
1527
1551
|
};
|
|
1528
1552
|
|
|
1529
|
-
declare const ThemeContext:
|
|
1530
|
-
declare const ThemeProvider:
|
|
1553
|
+
declare const ThemeContext: React__default.Context<ThemeContextType>;
|
|
1554
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
1531
1555
|
|
|
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 };
|
|
1556
|
+
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
|
|
File without changes
|
|
File without changes
|