hi-tm 0.0.2 → 0.0.4
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/components/AutoComplete/AutoCompleteMultiSelect.d.ts +1 -1
- package/dist/components/AutoComplete/AutoCompleteMultiSelect.js +26 -19
- package/dist/components/Cards/AutoComplete&DropDown/GeographyCard.js +2 -2
- package/dist/components/Cards/AutoComplete&DropDown/PersonCard.js +2 -2
- package/dist/components/Cards/AutoComplete&DropDown/SimpleCard.js +2 -2
- package/dist/components/DropDowns/CreatableAutoComplete.d.ts +31 -0
- package/dist/components/DropDowns/CreatableAutoComplete.js +104 -0
- package/dist/components/DropDowns/CreatableDropDown.d.ts +2 -1
- package/dist/components/DropDowns/CreatableDropDown.js +89 -16
- package/dist/components/DropDowns/DropDown.js +5 -5
- package/dist/components/DropDowns/DropDownMultiSelect.js +5 -5
- package/dist/components/Inputs/Buttons/Button.d.ts +3 -3
- package/dist/components/Inputs/Buttons/Button.js +15 -15
- package/dist/components/Inputs/TextInput.d.ts +4 -1
- package/dist/components/Inputs/TextInput.js +23 -6
- package/dist/components/Inputs/Toggle.d.ts +2 -2
- package/dist/components/Inputs/Toggle.js +13 -10
- package/dist/components/Layout/Headers/HeaderLayout.js +20 -24
- package/dist/components/Layout/Sidebar.js +51 -10
- package/dist/components/Table/ModernTable/ModernTable.d.ts +2 -2
- package/dist/components/Table/ModernTable/ModernTable.js +399 -150
- package/dist/components/Table/ModernTable/ModernTableHeader.d.ts +4 -1
- package/dist/components/Table/ModernTable/ModernTableHeader.js +6 -2
- package/dist/components/Table/TableRowCards/TableRowCardChildren.js +19 -19
- package/dist/components/Table/TableRowCards/TableRowCardSimple.js +19 -19
- package/dist/components/Tabs/Tabs.d.ts +5 -3
- package/dist/components/Tabs/Tabs.js +13 -2
- package/dist/components/Wrapper/Modals/DeleteConfirmationModal.d.ts +18 -0
- package/dist/components/Wrapper/Modals/DeleteConfirmationModal.js +68 -0
- package/dist/components/sections/components/Tabs/BreadCrumbs.d.ts +1 -1
- package/dist/components/sections/components/Tabs/BreadCrumbs.js +9 -9
- package/dist/components/sections/components/Tabs/TabsComponent.js +19 -3
- package/dist/helper/formatWithCommas.d.ts +1 -0
- package/dist/helper/formatWithCommas.js +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/styles/globals.css +198 -180
- package/dist/tailwind-preset.ts +41 -41
- package/dist/types/AutoComplete/CreatableAutoComplete.d.ts +34 -0
- package/dist/types/AutoComplete/CreatableAutoComplete.js +2 -0
- package/dist/types/BreakCrumbTypes.d.ts +2 -0
- package/dist/types/Buttons/PrimaryButton.d.ts +4 -3
- package/dist/types/DropDown/CreatableDropDown.d.ts +10 -3
- package/dist/types/Inputs/TextInputType.d.ts +7 -6
- package/dist/types/Layout/Headers/HeaderLayout.d.ts +1 -0
- package/dist/types/Layout/SidebarType.d.ts +2 -1
- package/dist/types/ModernTable/index.d.ts +27 -7
- package/package.json +1 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CSSProperties } from
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
2
|
export interface DataItem {
|
|
3
3
|
id: number;
|
|
4
|
-
type:
|
|
4
|
+
type: "text" | "avatar" | "status" | "operation" | "icon" | "date" | "price" | "contactNumber";
|
|
5
5
|
value: string | number | boolean | null;
|
|
6
6
|
statusClass?: string;
|
|
7
|
-
textAlign?:
|
|
7
|
+
textAlign?: "left" | "center" | "right";
|
|
8
8
|
inlineCSS?: CSSProperties;
|
|
9
9
|
contentClass?: string;
|
|
10
10
|
isTitle?: boolean;
|
|
@@ -16,6 +16,8 @@ export interface DataItem {
|
|
|
16
16
|
imageWidth?: number;
|
|
17
17
|
imageHeight?: number;
|
|
18
18
|
imageClass?: string;
|
|
19
|
+
isPrice?: boolean;
|
|
20
|
+
onClick?: (id: number) => void;
|
|
19
21
|
}
|
|
20
22
|
export interface TableRowData {
|
|
21
23
|
id: number;
|
|
@@ -23,11 +25,13 @@ export interface TableRowData {
|
|
|
23
25
|
hasChildren?: boolean;
|
|
24
26
|
childRows?: TableRowData[];
|
|
25
27
|
isChild?: boolean;
|
|
28
|
+
level?: number;
|
|
26
29
|
}
|
|
27
30
|
export interface ModalAction {
|
|
28
31
|
id: number;
|
|
29
|
-
text: string;
|
|
32
|
+
text: string | number | boolean;
|
|
30
33
|
class?: string;
|
|
34
|
+
tailwindClassName?: string;
|
|
31
35
|
}
|
|
32
36
|
export interface MobileCardConfig {
|
|
33
37
|
enabled?: boolean;
|
|
@@ -36,7 +40,7 @@ export interface MobileCardConfig {
|
|
|
36
40
|
showFavoriteIcon?: boolean;
|
|
37
41
|
favoriteFilledIconPath?: string;
|
|
38
42
|
favoriteOutlineIconPath?: string;
|
|
39
|
-
showMoreOptions?: boolean;
|
|
43
|
+
showMoreOptions?: boolean | ((row: TableRowData) => boolean);
|
|
40
44
|
moreOptionsIconPath?: string;
|
|
41
45
|
showAvatars?: boolean;
|
|
42
46
|
maxVisibleAvatars?: number;
|
|
@@ -61,14 +65,15 @@ export interface ModernTableProps {
|
|
|
61
65
|
loadingText?: string;
|
|
62
66
|
loadingIcon?: string | React.ReactNode;
|
|
63
67
|
};
|
|
64
|
-
onEdit
|
|
68
|
+
onEdit?: (id: number) => void;
|
|
65
69
|
onDelete?: (id: number) => void;
|
|
66
70
|
onView?: (id: number) => void;
|
|
67
71
|
onAction?: (actionId: number, rowId: number) => void;
|
|
68
72
|
selectable: boolean;
|
|
69
73
|
onSelectionChange?: (id: number | number[]) => void;
|
|
70
74
|
actions?: boolean;
|
|
71
|
-
|
|
75
|
+
ShowActionModal?: boolean;
|
|
76
|
+
modalActions: ModalAction[] | ((row: TableRowData) => ModalAction[]);
|
|
72
77
|
noItemFoundProps?: NoItemFoundProps;
|
|
73
78
|
selectedItems?: number[];
|
|
74
79
|
mobileCardConfig?: MobileCardConfig;
|
|
@@ -78,10 +83,25 @@ export interface ModernTableProps {
|
|
|
78
83
|
indentSize?: string;
|
|
79
84
|
childRowClass?: string;
|
|
80
85
|
};
|
|
86
|
+
showModalIcon?: boolean | ((row: TableRowData) => boolean);
|
|
81
87
|
iconsSRC: {
|
|
82
88
|
editIcon: string | React.ReactNode;
|
|
89
|
+
editIconTailwindStyle?: string;
|
|
83
90
|
moreIcon: string | React.ReactNode;
|
|
91
|
+
moreIconTailwindStyle?: string;
|
|
84
92
|
};
|
|
85
93
|
actionButtonsStyle?: string;
|
|
86
94
|
gridClassName: string;
|
|
95
|
+
isMobileView?: boolean;
|
|
96
|
+
mobileViewGridClassName?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Number of items to display per page
|
|
99
|
+
* @default 10
|
|
100
|
+
*/
|
|
101
|
+
itemsPerPage?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Current page index (0-indexed)
|
|
104
|
+
* @default 0
|
|
105
|
+
*/
|
|
106
|
+
pageIndex?: number;
|
|
87
107
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hi-tm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"styles": "dist/styles/globals.css",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@hello-pangea/dnd": "^18.0.1",
|
|
15
|
-
"hi-tm": "^0.0.1-beta-0.0.303",
|
|
16
15
|
"next": ">=13.0.0",
|
|
17
16
|
"react": ">=18.0.0",
|
|
18
17
|
"react-dom": ">=18.0.0"
|