@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.
Files changed (62) hide show
  1. package/dist/cjs/components/atoms/Input/Input.d.ts +1 -1
  2. package/dist/cjs/components/atoms/index.d.ts +0 -6
  3. package/dist/cjs/components/molecules/DatePicker/DatePicker.types.d.ts +6 -8
  4. package/dist/cjs/components/molecules/DatePicker/Plugins/customTimeSelector.d.ts +4 -0
  5. package/dist/cjs/components/molecules/DatePicker/Plugins/utils.d.ts +3 -1
  6. package/dist/cjs/components/molecules/Grid/Grid.d.ts +4 -0
  7. package/dist/cjs/components/molecules/Grid/Grid.types.d.ts +9 -0
  8. package/dist/cjs/components/molecules/Grid/GridItem.d.ts +3 -0
  9. package/dist/cjs/components/molecules/Grid/index.d.ts +5 -0
  10. package/dist/cjs/components/molecules/GridList/GridList.d.ts +5 -0
  11. package/dist/cjs/components/molecules/GridList/GridList.types.d.ts +5 -0
  12. package/dist/cjs/components/molecules/GridList/index.d.ts +4 -0
  13. package/dist/cjs/components/{atoms → molecules}/List/List.types.d.ts +9 -3
  14. package/dist/cjs/components/molecules/Popover/Popover.types.d.ts +5 -0
  15. package/dist/cjs/components/molecules/index.d.ts +10 -0
  16. package/dist/cjs/library.css +635 -592
  17. package/dist/cjs/library.js +3 -3
  18. package/dist/cjs/library.js.map +1 -1
  19. package/dist/esm/components/atoms/Input/Input.d.ts +1 -1
  20. package/dist/esm/components/atoms/index.d.ts +0 -6
  21. package/dist/esm/components/molecules/DatePicker/DatePicker.types.d.ts +6 -8
  22. package/dist/esm/components/molecules/DatePicker/Plugins/customTimeSelector.d.ts +4 -0
  23. package/dist/esm/components/molecules/DatePicker/Plugins/utils.d.ts +3 -1
  24. package/dist/esm/components/molecules/Grid/Grid.d.ts +4 -0
  25. package/dist/esm/components/molecules/Grid/Grid.types.d.ts +9 -0
  26. package/dist/esm/components/molecules/Grid/GridItem.d.ts +3 -0
  27. package/dist/esm/components/molecules/Grid/index.d.ts +5 -0
  28. package/dist/esm/components/molecules/GridList/GridList.d.ts +5 -0
  29. package/dist/esm/components/molecules/GridList/GridList.types.d.ts +5 -0
  30. package/dist/esm/components/molecules/GridList/index.d.ts +4 -0
  31. package/dist/esm/components/{atoms → molecules}/List/List.types.d.ts +9 -3
  32. package/dist/esm/components/molecules/Popover/Popover.types.d.ts +5 -0
  33. package/dist/esm/components/molecules/index.d.ts +10 -0
  34. package/dist/esm/library.css +635 -592
  35. package/dist/esm/library.js +3 -3
  36. package/dist/esm/library.js.map +1 -1
  37. package/dist/index.d.ts +207 -180
  38. package/package.json +1 -1
  39. /package/dist/cjs/components/{atoms → molecules}/ActionCard/ActionCard.d.ts +0 -0
  40. /package/dist/cjs/components/{atoms → molecules}/ActionCard/ActionCard.types.d.ts +0 -0
  41. /package/dist/cjs/components/{atoms → molecules}/ActionCard/index.d.ts +0 -0
  42. /package/dist/cjs/components/{atoms → molecules}/Card/Card.d.ts +0 -0
  43. /package/dist/cjs/components/{atoms → molecules}/Card/Card.types.d.ts +0 -0
  44. /package/dist/cjs/components/{atoms → molecules}/Card/index.d.ts +0 -0
  45. /package/dist/cjs/components/{atoms → molecules}/List/List.d.ts +0 -0
  46. /package/dist/cjs/components/{atoms → molecules}/List/components/RootList.d.ts +0 -0
  47. /package/dist/cjs/components/{atoms → molecules}/List/components/RootListItem.d.ts +0 -0
  48. /package/dist/cjs/components/{atoms → molecules}/List/components/SortableList.d.ts +0 -0
  49. /package/dist/cjs/components/{atoms → molecules}/List/components/SortableListItem.d.ts +0 -0
  50. /package/dist/cjs/components/{atoms → molecules}/List/index.d.ts +0 -0
  51. /package/dist/esm/components/{atoms → molecules}/ActionCard/ActionCard.d.ts +0 -0
  52. /package/dist/esm/components/{atoms → molecules}/ActionCard/ActionCard.types.d.ts +0 -0
  53. /package/dist/esm/components/{atoms → molecules}/ActionCard/index.d.ts +0 -0
  54. /package/dist/esm/components/{atoms → molecules}/Card/Card.d.ts +0 -0
  55. /package/dist/esm/components/{atoms → molecules}/Card/Card.types.d.ts +0 -0
  56. /package/dist/esm/components/{atoms → molecules}/Card/index.d.ts +0 -0
  57. /package/dist/esm/components/{atoms → molecules}/List/List.d.ts +0 -0
  58. /package/dist/esm/components/{atoms → molecules}/List/components/RootList.d.ts +0 -0
  59. /package/dist/esm/components/{atoms → molecules}/List/components/RootListItem.d.ts +0 -0
  60. /package/dist/esm/components/{atoms → molecules}/List/components/SortableList.d.ts +0 -0
  61. /package/dist/esm/components/{atoms → molecules}/List/components/SortableListItem.d.ts +0 -0
  62. /package/dist/esm/components/{atoms → molecules}/List/index.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value"> & {
2
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "type"> & {
3
3
  inputType?: import("./Input.types").InputTypeEnum;
4
4
  value?: string;
5
5
  onValueChanged?: (value: string) => void;
@@ -1,27 +1,21 @@
1
- export { default as ActionCard } from './ActionCard';
2
1
  export { default as ActionImage } from './ActionImage';
3
2
  export { default as Button } from './Button';
4
- export { default as Card } from './Card';
5
3
  export { default as Icon } from './Icon';
6
4
  export { default as IconButton } from './IconButton';
7
5
  export { default as Image } from './Image';
8
6
  export { default as Input } from './Input';
9
- export { default as List } from './List';
10
7
  export { default as Password } from './Password';
11
8
  export { default as Spinner } from './Spinner';
12
9
  export { default as Text } from './Text';
13
10
  export { default as TextArea } from './TextArea';
14
11
  export { default as ResponsiveComponent } from './ResponsiveComponent';
15
12
  export { default as ListItem } from './ListItem';
16
- export * from './ActionCard';
17
13
  export * from './ActionImage';
18
14
  export * from './Button';
19
- export * from './Card';
20
15
  export * from './Icon';
21
16
  export * from './IconButton';
22
17
  export * from './Image';
23
18
  export * from './Input';
24
- export * from './List';
25
19
  export * from './Password';
26
20
  export * from './Spinner';
27
21
  export * from './Text';
@@ -82,10 +82,6 @@ export type DatePickerProps = {
82
82
  * @default false
83
83
  */
84
84
  allowInput?: boolean;
85
- /**
86
- * Container element for the calendar when used inside a Popover
87
- */
88
- container?: HTMLElement | null;
89
85
  /**
90
86
  * Custom time picker plugin
91
87
  */
@@ -94,12 +90,14 @@ export type DatePickerProps = {
94
90
  * Custom time picker plugin
95
91
  */
96
92
  customDateTimePickerPlugin?: (config: CustomTimePickerConfig) => Plugin;
93
+ /**
94
+ * Use custom time input same as date picker input
95
+ * This is useful when the datepicker is inline and is re-added to the DOM after closing
96
+ * For example using this inside a Popover as content
97
+ */
98
+ useCustomTimeInputForTimePicker?: boolean;
97
99
  };
98
100
  export type CustomTimePickerConfig = {
99
101
  minuteStep: number;
100
- /**
101
- * Container element for the calendar when used inside a Popover
102
- */
103
- container?: HTMLElement | null;
104
102
  };
105
103
  export {};
@@ -0,0 +1,4 @@
1
+ import { Plugin } from "flatpickr/dist/types/options";
2
+ import { CustomTimePickerConfig } from '../DatePicker.types';
3
+ declare const timeDropdownPlugin: (config: CustomTimePickerConfig) => Plugin;
4
+ export default timeDropdownPlugin;
@@ -15,8 +15,10 @@ export declare const filterDropdownOptions: (dropdown: HTMLDivElement, query: st
15
15
  * Positions the dropdown relative to the input field.
16
16
  * @param dropdown - The dropdown element to position.
17
17
  * @param inputElement - The input element to base the dropdown positioning on.
18
+ * @param wrapperElement - The wrapper element to base the dropdown positioning on. This will take precedence over the input element.
19
+ * @param dropdownPosition - The position of the dropdown. 'fixed' or 'absolute'.
18
20
  */
19
- export declare const positionDropdownRelativeToInput: (dropdown: HTMLDivElement, inputElement: HTMLInputElement, wrapperElement?: HTMLElement) => void;
21
+ export declare const positionDropdownRelativeToInput: (dropdown: HTMLDivElement, inputElement: HTMLInputElement, wrapperElement?: HTMLElement, dropdownPosition?: "fixed" | "absolute") => void;
20
22
  /**
21
23
  * Formats a Date object into a time string (HH:MM AM/PM).
22
24
  * @param date - The Date object to format.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { GridProps } from './Grid.types';
3
+ declare const Grid: (props: GridProps) => React.JSX.Element;
4
+ export default Grid;
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from "react";
2
+ export type GridProps = HTMLAttributes<HTMLDivElement> & {
3
+ columns?: number;
4
+ rows?: number;
5
+ };
6
+ export type GridItemProps = HTMLAttributes<HTMLDivElement> & {
7
+ columnSpan?: number;
8
+ rowSpan?: number;
9
+ };
@@ -0,0 +1,3 @@
1
+ import { GridItemProps } from './Grid.types';
2
+ declare const GridItem: (props: GridItemProps) => import("react").JSX.Element;
3
+ export default GridItem;
@@ -0,0 +1,5 @@
1
+ import Grid from './Grid';
2
+ import GridItem from './GridItem';
3
+ import { GridProps, GridItemProps } from './Grid.types';
4
+ export default Grid;
5
+ export type { GridProps, GridItem, GridItemProps };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { GridListProps } from './GridList.types';
3
+ import { ListItemType } from '../List/List.types';
4
+ declare const GridList: <T extends ListItemType>(props: GridListProps<T>) => React.JSX.Element;
5
+ export default GridList;
@@ -0,0 +1,5 @@
1
+ import { ListProps } from "../List";
2
+ import { ListItemType } from "../List/List.types";
3
+ export type GridListProps<T extends ListItemType> = Omit<ListProps<T>, 'style'> & {
4
+ columns?: number;
5
+ };
@@ -0,0 +1,4 @@
1
+ import GridList from './GridList';
2
+ import { GridListProps } from './GridList.types';
3
+ export default GridList;
4
+ export type { GridListProps };
@@ -9,9 +9,13 @@ export type ListAlignEnum = 'Horizontal' | 'Vertical';
9
9
  * Represents a generic list item.
10
10
  *
11
11
  * @property {string | number} [id] - A unique identifier for the list item. This is optional and can be auto-generated if not provided.
12
+ * @property {string} [itemClassName] - Additional class for styling the list item.
13
+ * @property {React.CSSProperties} [itemStyle] - Additional styles for the list item.
12
14
  */
13
15
  export type ListItemType = object & {
14
16
  id?: string | number;
17
+ itemClassName?: string;
18
+ itemStyle?: React.CSSProperties;
15
19
  };
16
20
  /**
17
21
  * Props for an individual list item component.
@@ -21,7 +25,7 @@ export type ListItemType = object & {
21
25
  * @property {React.FC<any>} component - The React functional component used to render the list item.
22
26
  * @property {T} item - The data for the list item.
23
27
  */
24
- export type ListItemProps<T extends ListItemType> = {
28
+ export type ListItemProps<T extends ListItemType> = Omit<HTMLAttributes<HTMLLIElement>, 'id' | 'children'> & {
25
29
  id: string | number;
26
30
  component: React.FC<any>;
27
31
  item: T;
@@ -31,7 +35,9 @@ export type ListItemProps<T extends ListItemType> = {
31
35
  *
32
36
  * @template T - The type of the list items.
33
37
  */
34
- export type RootListProps<T extends ListItemType> = Omit<ListProps<T>, 'data' | 'component' | 'keyExtractor' | 'sortable'>;
38
+ export type RootListProps<T extends ListItemType> = Omit<ListProps<T>, 'data' | 'component' | 'keyExtractor' | 'sortable'> & {
39
+ children: React.ReactNode;
40
+ };
35
41
  /**
36
42
  * Props for the sortable list component.
37
43
  *
@@ -56,7 +62,7 @@ export type SortableListProps<T extends {
56
62
  * @property {boolean} [sortable] - Whether the list items can be sorted using drag-and-drop.
57
63
  * @property {Dispatch<SetStateAction<T[]>>} [updateSortOrder] - Callback function to update the order of the list items after sorting.
58
64
  */
59
- export type ListProps<T extends ListItemType> = HTMLAttributes<HTMLUListElement> & {
65
+ export type ListProps<T extends ListItemType> = Omit<HTMLAttributes<HTMLUListElement>, 'children'> & {
60
66
  /**
61
67
  * The data to be rendered in the list.
62
68
  */
@@ -100,6 +100,11 @@ export type PopoverProps = {
100
100
  * Additional class for overlay container styling.
101
101
  */
102
102
  overlayClassName?: string;
103
+ /**
104
+ * Position of the Popover.
105
+ * @default 'absolute'
106
+ */
107
+ contentPosition?: 'absolute' | 'fixed';
103
108
  };
104
109
  export type PopoverHandle = {
105
110
  close: () => void;
@@ -13,6 +13,13 @@ export { default as TableCell } from './TableCell';
13
13
  export { default as TableHeader } from './TableHeader';
14
14
  export { default as TableRow } from './TableRow';
15
15
  export { default as Tabs } from './Tabs';
16
+ export { default as List } from './List';
17
+ export { default as ActionCard } from './ActionCard';
18
+ export { default as Card } from './Card';
19
+ export { default as GridList } from './GridList';
20
+ export { default as Grid } from './Grid';
21
+ export * from './ActionCard';
22
+ export * from './Card';
16
23
  export * from './ButtonGroup';
17
24
  export * from './ContextMenu';
18
25
  export * from './DatePicker';
@@ -28,3 +35,6 @@ export * from './TableCell';
28
35
  export * from './TableHeader';
29
36
  export * from './TableRow';
30
37
  export * from './Tabs';
38
+ export * from './List';
39
+ export * from './GridList';
40
+ export * from './Grid';