@delightui/components 0.1.26 → 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/DatePicker/DatePicker.types.d.ts +6 -8
- package/dist/cjs/components/molecules/DatePicker/Plugins/customTimeSelector.d.ts +4 -0
- package/dist/cjs/components/molecules/DatePicker/Plugins/utils.d.ts +3 -1
- 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/Popover/Popover.types.d.ts +5 -0
- package/dist/cjs/components/molecules/index.d.ts +10 -0
- package/dist/cjs/library.css +635 -592
- 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/DatePicker/DatePicker.types.d.ts +6 -8
- package/dist/esm/components/molecules/DatePicker/Plugins/customTimeSelector.d.ts +4 -0
- package/dist/esm/components/molecules/DatePicker/Plugins/utils.d.ts +3 -1
- 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/Popover/Popover.types.d.ts +5 -0
- package/dist/esm/components/molecules/index.d.ts +10 -0
- package/dist/esm/library.css +635 -592
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +207 -180
- 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
|
*/
|
|
@@ -635,6 +511,11 @@ type PopoverProps = {
|
|
|
635
511
|
* Additional class for overlay container styling.
|
|
636
512
|
*/
|
|
637
513
|
overlayClassName?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Position of the Popover.
|
|
516
|
+
* @default 'absolute'
|
|
517
|
+
*/
|
|
518
|
+
contentPosition?: 'absolute' | 'fixed';
|
|
638
519
|
};
|
|
639
520
|
type PopoverHandle = {
|
|
640
521
|
close: () => void;
|
|
@@ -648,11 +529,11 @@ type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
|
|
|
648
529
|
/**
|
|
649
530
|
* The content to be rendered inside the context menu.
|
|
650
531
|
*/
|
|
651
|
-
children:
|
|
532
|
+
children: React__default.ReactNode;
|
|
652
533
|
/**
|
|
653
534
|
* The element that triggers the display of the context menu.
|
|
654
535
|
*/
|
|
655
|
-
target:
|
|
536
|
+
target: React__default.ReactNode;
|
|
656
537
|
/**
|
|
657
538
|
* Alignment of the menu relative to its target.
|
|
658
539
|
* @default 'Center'
|
|
@@ -705,7 +586,7 @@ type ContextMenuProps = HTMLAttributes<HTMLUListElement> & {
|
|
|
705
586
|
/**
|
|
706
587
|
* ContextMenu component that renders a popover menu.
|
|
707
588
|
*/
|
|
708
|
-
declare const ContextMenu: (props: ContextMenuProps) =>
|
|
589
|
+
declare const ContextMenu: (props: ContextMenuProps) => React__default.JSX.Element;
|
|
709
590
|
|
|
710
591
|
/**
|
|
711
592
|
* Props for the MenuItem component.
|
|
@@ -736,7 +617,7 @@ type MenuItemProps = HTMLAttributes<HTMLLIElement> & {
|
|
|
736
617
|
*
|
|
737
618
|
* Renders a menu item (`<li>`) with optional disabled and selected states.
|
|
738
619
|
*/
|
|
739
|
-
declare const MenuItem: (props: MenuItemProps) =>
|
|
620
|
+
declare const MenuItem: (props: MenuItemProps) => React__default.JSX.Element;
|
|
740
621
|
|
|
741
622
|
type DatePickerPosition = 'auto' | 'above' | 'below' | 'auto left' | 'auto center' | 'auto right' | 'above left' | 'above center' | 'above right' | 'below left' | 'below center' | 'below right';
|
|
742
623
|
type DatePickerProps = {
|
|
@@ -820,10 +701,6 @@ type DatePickerProps = {
|
|
|
820
701
|
* @default false
|
|
821
702
|
*/
|
|
822
703
|
allowInput?: boolean;
|
|
823
|
-
/**
|
|
824
|
-
* Container element for the calendar when used inside a Popover
|
|
825
|
-
*/
|
|
826
|
-
container?: HTMLElement | null;
|
|
827
704
|
/**
|
|
828
705
|
* Custom time picker plugin
|
|
829
706
|
*/
|
|
@@ -832,16 +709,18 @@ type DatePickerProps = {
|
|
|
832
709
|
* Custom time picker plugin
|
|
833
710
|
*/
|
|
834
711
|
customDateTimePickerPlugin?: (config: CustomTimePickerConfig) => Plugin;
|
|
712
|
+
/**
|
|
713
|
+
* Use custom time input same as date picker input
|
|
714
|
+
* This is useful when the datepicker is inline and is re-added to the DOM after closing
|
|
715
|
+
* For example using this inside a Popover as content
|
|
716
|
+
*/
|
|
717
|
+
useCustomTimeInputForTimePicker?: boolean;
|
|
835
718
|
};
|
|
836
719
|
type CustomTimePickerConfig = {
|
|
837
720
|
minuteStep: number;
|
|
838
|
-
/**
|
|
839
|
-
* Container element for the calendar when used inside a Popover
|
|
840
|
-
*/
|
|
841
|
-
container?: HTMLElement | null;
|
|
842
721
|
};
|
|
843
722
|
|
|
844
|
-
declare const DatePicker: (props: DatePickerProps) =>
|
|
723
|
+
declare const DatePicker: (props: DatePickerProps) => React__default.JSX.Element;
|
|
845
724
|
|
|
846
725
|
/**
|
|
847
726
|
* Type representing the allowed values for form fields
|
|
@@ -963,13 +842,13 @@ type FormContextValues<T extends FormState = FormState> = {
|
|
|
963
842
|
updateFieldValue: (name: string, value: FieldValue) => void;
|
|
964
843
|
formErrors: FormErrors<T>;
|
|
965
844
|
updateFieldError: (name: keyof T, errorMessage: string) => void;
|
|
966
|
-
onFormSubmit:
|
|
845
|
+
onFormSubmit: React__default.FormEventHandler<HTMLFormElement>;
|
|
967
846
|
updateFieldValidators: (name: keyof T, validate?: FieldValidationFunction) => void;
|
|
968
847
|
updateRequiredFields: (name: keyof T, required?: boolean) => void;
|
|
969
848
|
};
|
|
970
849
|
type FormProviderProps<T extends FormState = FormState> = {
|
|
971
850
|
formRef?: Ref<HTMLFormElement>;
|
|
972
|
-
children?:
|
|
851
|
+
children?: React__default.ReactNode;
|
|
973
852
|
formState?: T;
|
|
974
853
|
onFormStateChange?: FormStateChangeHandler<T>;
|
|
975
854
|
formValidator?: FormValidator<T>;
|
|
@@ -1077,7 +956,7 @@ declare const useField: <T extends FieldValue = FieldValue>(props: UseFieldProps
|
|
|
1077
956
|
formFieldId: string | undefined;
|
|
1078
957
|
};
|
|
1079
958
|
|
|
1080
|
-
declare const FormField: (props: FormFieldProviderProps & FormFieldProps) =>
|
|
959
|
+
declare const FormField: (props: FormFieldProviderProps & FormFieldProps) => React__default.JSX.Element;
|
|
1081
960
|
|
|
1082
961
|
/**
|
|
1083
962
|
* Enum defining the possible sizes for the Modal component.
|
|
@@ -1136,15 +1015,15 @@ type ModalProps = {
|
|
|
1136
1015
|
/**
|
|
1137
1016
|
* Modal component for displaying a dialog window.
|
|
1138
1017
|
*/
|
|
1139
|
-
declare const Modal: (props: ModalProps) =>
|
|
1018
|
+
declare const Modal: (props: ModalProps) => React__default.JSX.Element;
|
|
1140
1019
|
|
|
1141
1020
|
type NavProps = HTMLAttributes<HTMLElement> & {};
|
|
1142
1021
|
|
|
1143
|
-
declare const Nav: (props: NavProps) =>
|
|
1022
|
+
declare const Nav: (props: NavProps) => React__default.JSX.Element;
|
|
1144
1023
|
|
|
1145
1024
|
type NavItemProps = LiHTMLAttributes<HTMLElement> & {};
|
|
1146
1025
|
|
|
1147
|
-
declare const NavItem: (props: NavItemProps) =>
|
|
1026
|
+
declare const NavItem: (props: NavItemProps) => React__default.JSX.Element;
|
|
1148
1027
|
|
|
1149
1028
|
type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'appearance' | 'size' | 'style' | 'type'> & {
|
|
1150
1029
|
/**
|
|
@@ -1166,13 +1045,13 @@ type NavLinkProps = Omit<LinkProps, 'to'> & Pick<ButtonProps, 'appearance' | 'si
|
|
|
1166
1045
|
'component-variant'?: string;
|
|
1167
1046
|
};
|
|
1168
1047
|
|
|
1169
|
-
declare const NavLink: (props: NavLinkProps) =>
|
|
1048
|
+
declare const NavLink: (props: NavLinkProps) => React__default.JSX.Element;
|
|
1170
1049
|
|
|
1171
1050
|
/**
|
|
1172
1051
|
* Popover component that displays a floating content element in relation to a target element.
|
|
1173
1052
|
* It can be triggered via different user actions like 'Click' or 'Hover'.
|
|
1174
1053
|
*/
|
|
1175
|
-
declare const Popover:
|
|
1054
|
+
declare const Popover: React__default.ForwardRefExoticComponent<PopoverProps & React__default.RefAttributes<PopoverHandle>>;
|
|
1176
1055
|
|
|
1177
1056
|
/**
|
|
1178
1057
|
* Props for the Option component, extending LiHTMLAttributes<HTMLLIElement>.
|
|
@@ -1212,7 +1091,7 @@ type OptionProps = LiHTMLAttributes<HTMLLIElement> & {
|
|
|
1212
1091
|
* @param props - Props for configuring the Option component.
|
|
1213
1092
|
* @returns Element representing the option.
|
|
1214
1093
|
*/
|
|
1215
|
-
declare const Option: (props: OptionProps) =>
|
|
1094
|
+
declare const Option: (props: OptionProps) => React__default.JSX.Element;
|
|
1216
1095
|
|
|
1217
1096
|
/**
|
|
1218
1097
|
* Represents the context provided by the Select component.
|
|
@@ -1363,7 +1242,7 @@ declare const useSelectContext: () => SelectContextType;
|
|
|
1363
1242
|
* @param props - Props for configuring the SelectProvider.
|
|
1364
1243
|
* @returns JSX element that provides context to its children.
|
|
1365
1244
|
*/
|
|
1366
|
-
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;
|
|
1367
1246
|
|
|
1368
1247
|
/**
|
|
1369
1248
|
* Select component that wraps SelectComponent with SelectProvider.
|
|
@@ -1395,7 +1274,7 @@ interface TabContentProps {
|
|
|
1395
1274
|
className?: string;
|
|
1396
1275
|
}
|
|
1397
1276
|
|
|
1398
|
-
declare const TabContent: (props: TabContentProps) =>
|
|
1277
|
+
declare const TabContent: (props: TabContentProps) => React__default.JSX.Element | null;
|
|
1399
1278
|
|
|
1400
1279
|
type TabItemStyleEnum = 'Filled' | 'Underlined';
|
|
1401
1280
|
type TabItemProps = Omit<ButtonProps, 'actionType' | 'appearance' | 'size' | 'style' | 'type'> & {
|
|
@@ -1422,23 +1301,23 @@ type TabItemProps = Omit<ButtonProps, 'actionType' | 'appearance' | 'size' | 'st
|
|
|
1422
1301
|
style?: TabItemStyleEnum;
|
|
1423
1302
|
};
|
|
1424
1303
|
|
|
1425
|
-
declare const TabItem: (props: TabItemProps) =>
|
|
1304
|
+
declare const TabItem: (props: TabItemProps) => React__default.JSX.Element;
|
|
1426
1305
|
|
|
1427
1306
|
type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1428
1307
|
|
|
1429
|
-
declare const TableBody: (props: TableBodyProps) =>
|
|
1308
|
+
declare const TableBody: (props: TableBodyProps) => React__default.JSX.Element;
|
|
1430
1309
|
|
|
1431
1310
|
type TableCellProps = TdHTMLAttributes<HTMLTableCellElement>;
|
|
1432
1311
|
|
|
1433
|
-
declare const TableCell: (props: TableCellProps) =>
|
|
1312
|
+
declare const TableCell: (props: TableCellProps) => React__default.JSX.Element;
|
|
1434
1313
|
|
|
1435
1314
|
type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1436
1315
|
|
|
1437
|
-
declare const TableHeader: (props: TableHeaderProps) =>
|
|
1316
|
+
declare const TableHeader: (props: TableHeaderProps) => React__default.JSX.Element;
|
|
1438
1317
|
|
|
1439
1318
|
type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
|
|
1440
1319
|
|
|
1441
|
-
declare const TableRow: (props: TableRowProps) =>
|
|
1320
|
+
declare const TableRow: (props: TableRowProps) => React__default.JSX.Element;
|
|
1442
1321
|
|
|
1443
1322
|
type TabsStyleEnum = 'Filled' | 'Underlined';
|
|
1444
1323
|
type TabsTypeEnum = 'Horizontal' | 'Vertical';
|
|
@@ -1506,13 +1385,161 @@ type TabsProps = TabProviderProps & TabsViewProps;
|
|
|
1506
1385
|
*/
|
|
1507
1386
|
declare const useTab: () => TabContextType;
|
|
1508
1387
|
|
|
1509
|
-
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;
|
|
1510
1537
|
|
|
1511
|
-
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;
|
|
1512
1539
|
|
|
1513
1540
|
type TableProps = TableHTMLAttributes<HTMLTableElement>;
|
|
1514
1541
|
|
|
1515
|
-
declare const Table: (props: TableProps) =>
|
|
1542
|
+
declare const Table: (props: TableProps) => React__default.JSX.Element;
|
|
1516
1543
|
|
|
1517
1544
|
type ThemeContextType = {
|
|
1518
1545
|
theme: string;
|
|
@@ -1523,7 +1550,7 @@ type ThemeProviderProps = {
|
|
|
1523
1550
|
children?: ReactNode;
|
|
1524
1551
|
};
|
|
1525
1552
|
|
|
1526
|
-
declare const ThemeContext:
|
|
1527
|
-
declare const ThemeProvider:
|
|
1553
|
+
declare const ThemeContext: React__default.Context<ThemeContextType>;
|
|
1554
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
1528
1555
|
|
|
1529
|
-
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
|