1mpacto-react-ui 0.0.6 → 0.0.7
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/assets/core.css +1 -1
- package/dist/assets/icons/arrow-narrow-down.svg +3 -0
- package/dist/assets/style.css +1 -1
- package/dist/index.es.js +20389 -417
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +76 -9
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/Badges/Badges.d.ts +4 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +5 -0
- package/dist/src/components/Button/Button.d.ts +2 -9
- package/dist/src/components/ButtonIcon/ButtonIcon.d.ts +4 -0
- package/dist/src/components/Calendar/Calendar.d.ts +42 -0
- package/dist/src/components/Calendar/CalendarButton.d.ts +8 -0
- package/dist/src/components/Calendar/CalendarCell.d.ts +9 -0
- package/dist/src/components/Calendar/CalendarMonth.d.ts +9 -0
- package/dist/src/components/Calendar/CalendarRange.d.ts +16 -0
- package/dist/src/components/Calendar/CalendarYear.d.ts +15 -0
- package/dist/src/components/Chips/Chips.d.ts +4 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +16 -0
- package/dist/src/components/DatePicker/DateRangePicker.d.ts +17 -0
- package/dist/src/components/DatePicker/FilterDate.d.ts +19 -0
- package/dist/src/components/Input/InputFloatingInner.d.ts +4 -0
- package/dist/src/components/Input/InputReguler.d.ts +4 -0
- package/dist/src/components/Pagination/Pagination.d.ts +19 -0
- package/dist/src/components/Popover/Popover.d.ts +5 -0
- package/dist/src/components/RadioCheckbox/RadioCheckbox.d.ts +4 -0
- package/dist/src/components/RadioCheckbox/RadioCheckboxLabel.d.ts +4 -0
- package/dist/src/components/SelectDropdownContainer/SelectDropdownContainer.d.ts +4 -0
- package/dist/src/components/SelectDropdownContainer/styleConfig.d.ts +4 -0
- package/dist/src/components/Switch/Switch.d.ts +12 -0
- package/dist/src/components/Table/Table.d.ts +6 -0
- package/dist/src/components/Tabs/TabPanel.d.ts +12 -0
- package/dist/src/components/Tabs/Tabs.d.ts +14 -0
- package/dist/src/components/Virtualization/ListVirtualization.d.ts +5 -0
- package/dist/src/components/Virtualization/TableVirtualization.d.ts +5 -0
- package/dist/src/components/index.d.ts +29 -1
- package/dist/src/config/components/borderRadius.d.ts +12 -0
- package/dist/src/config/components/gap.d.ts +51 -0
- package/dist/src/config/components/typography.d.ts +37 -0
- package/dist/src/interfaces/components/Badges/index.d.ts +10 -0
- package/dist/src/interfaces/components/Breadcrumbs/index.d.ts +19 -0
- package/dist/src/interfaces/components/Button/index.d.ts +10 -0
- package/dist/src/interfaces/components/ButtonIcon/index.d.ts +8 -0
- package/dist/src/interfaces/components/Chips/index.d.ts +11 -0
- package/dist/src/interfaces/components/Input/index.d.ts +25 -0
- package/dist/src/interfaces/components/Popover/index.d.ts +22 -0
- package/dist/src/interfaces/components/RadioCheckbox/RadioCheckbox.d.ts +17 -0
- package/dist/src/interfaces/components/RadioCheckbox/RadioCheckboxLabel.d.ts +16 -0
- package/dist/src/interfaces/components/SelectDropdownContainer/index.d.ts +44 -0
- package/dist/src/interfaces/components/Table/index.d.ts +64 -0
- package/dist/src/interfaces/components/Virtualization/ListVirtualization.d.ts +36 -0
- package/dist/src/interfaces/components/Virtualization/TableVirtualization.d.ts +36 -0
- package/package.json +7 -5
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { Props as SelectProps, ActionMeta } from 'react-select';
|
3
|
+
import { AutoPlacementOptions, FlipOptions } from '@floating-ui/react';
|
4
|
+
|
5
|
+
export interface ISelectDropdownContainer extends SelectProps {
|
6
|
+
width?: number | string;
|
7
|
+
children: ((params: IChildrenSelectDropdownContainer) => ReactNode) | ((params: IChildrenSelectDropdownContainer) => ReactNode[]);
|
8
|
+
classNameContainer?: string;
|
9
|
+
classNameContainerShowSelect?: string;
|
10
|
+
classNameContainerSelect?: string;
|
11
|
+
classNameLabelError?: string;
|
12
|
+
error?: string;
|
13
|
+
onChange?: (newValue: unknown, actionMeta: ActionMeta<unknown>) => void;
|
14
|
+
externalValue?: boolean;
|
15
|
+
defaultValueButtonDropdown?: object | unknown[];
|
16
|
+
autoClose?: boolean;
|
17
|
+
onMenuOpen?: () => void;
|
18
|
+
autoCloseOutside?: boolean;
|
19
|
+
styleInnerPopper?: React.CSSProperties;
|
20
|
+
onMenuClose?: () => void;
|
21
|
+
zIndexPopper?: number;
|
22
|
+
id?: string;
|
23
|
+
idPopover?: string;
|
24
|
+
useAutoPlacement?: boolean;
|
25
|
+
flipOptions?: FlipOptions;
|
26
|
+
autoPlacementOptions?: AutoPlacementOptions;
|
27
|
+
withSearch?: boolean;
|
28
|
+
}
|
29
|
+
export interface IChildrenSelectDropdownContainer {
|
30
|
+
selectValue: unknown;
|
31
|
+
setSelectValue: React.Dispatch<unknown>;
|
32
|
+
handlerClose: () => void;
|
33
|
+
handlerShow: () => void;
|
34
|
+
show: boolean;
|
35
|
+
setShow: React.Dispatch<React.SetStateAction<boolean>>;
|
36
|
+
}
|
37
|
+
export interface IRefSelectDropdownContainer {
|
38
|
+
selectValue: unknown;
|
39
|
+
setSelectValue: React.Dispatch<React.SetStateAction<object | unknown[]>>;
|
40
|
+
handlerClose: () => void;
|
41
|
+
handlerShow: () => void;
|
42
|
+
show: boolean;
|
43
|
+
setShow: React.Dispatch<React.SetStateAction<boolean>>;
|
44
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { Table as ITableTanstack, Row, RowData, ColumnDef } from '@tanstack/react-table';
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
3
|
+
import { ITableVirtualization } from '../Virtualization/TableVirtualization';
|
4
|
+
|
5
|
+
export type ITableColumnDef<T = unknown> = ColumnDef<T>;
|
6
|
+
export interface ITable<T = unknown> {
|
7
|
+
tableInstance: ITableTanstack<T>;
|
8
|
+
classNameWrapperTable?: string;
|
9
|
+
classNameTable?: string;
|
10
|
+
collapseAll?: boolean;
|
11
|
+
handlerRowClick?: (original: RowData, row: Row<T>) => void;
|
12
|
+
privillageRowClick?: boolean;
|
13
|
+
virtualization?: boolean;
|
14
|
+
virtualizationProps?: ITableVirtualization;
|
15
|
+
headerId?: string;
|
16
|
+
tbodyTrId?: (row: Row<T>) => string | undefined;
|
17
|
+
maxHeight?: number;
|
18
|
+
idCalculateHeight?: string;
|
19
|
+
kind?: 'laba-reguler' | 'payhere-reguler';
|
20
|
+
componentSortASC?: Element | ReactNode | ReactNode[];
|
21
|
+
componentSortDESC?: Element | ReactNode | ReactNode[];
|
22
|
+
scrollTop?: boolean;
|
23
|
+
}
|
24
|
+
export interface INonVirtualization<T = unknown> {
|
25
|
+
tableInstance: ITableTanstack<T>;
|
26
|
+
classNameWrapperTable?: string;
|
27
|
+
classNameTable?: string;
|
28
|
+
handlerRowClick?: (original: RowData, row: Row<T>) => void;
|
29
|
+
privillageRowClick?: boolean;
|
30
|
+
headerId?: string;
|
31
|
+
tbodyTrId: (row: Row<T>) => string | undefined;
|
32
|
+
maxHeight?: number;
|
33
|
+
idCalculateHeight?: string;
|
34
|
+
componentSortASC: Element | ReactNode | ReactNode[];
|
35
|
+
componentSortDESC: Element | ReactNode | ReactNode[];
|
36
|
+
classNamePointer: string;
|
37
|
+
}
|
38
|
+
export interface IVirtualization<T = unknown> {
|
39
|
+
tableInstance: ITableTanstack<T>;
|
40
|
+
classNameWrapperTable?: string;
|
41
|
+
handlerRowClick?: (original: RowData, row: Row<T>) => void;
|
42
|
+
privillageRowClick?: boolean;
|
43
|
+
virtualizationProps?: ITableVirtualization;
|
44
|
+
headerId?: string;
|
45
|
+
tbodyTrId: (row: Row<T>) => string | undefined;
|
46
|
+
classNameTable?: string;
|
47
|
+
componentSortASC: Element | ReactNode | ReactNode[];
|
48
|
+
componentSortDESC: Element | ReactNode | ReactNode[];
|
49
|
+
classNamePointer: string;
|
50
|
+
}
|
51
|
+
export interface IVirtualizationHead extends HTMLAttributes<HTMLTableSectionElement> {
|
52
|
+
context?: {
|
53
|
+
headerId?: string;
|
54
|
+
[key: string]: unknown;
|
55
|
+
};
|
56
|
+
[key: string]: unknown;
|
57
|
+
}
|
58
|
+
export interface IVirtualizationTable extends HTMLAttributes<HTMLTableElement> {
|
59
|
+
context?: {
|
60
|
+
classNameTable?: string;
|
61
|
+
[key: string]: unknown;
|
62
|
+
};
|
63
|
+
[key: string]: unknown;
|
64
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { Components } from 'react-virtuoso';
|
3
|
+
|
4
|
+
export interface IStyleHeight {
|
5
|
+
height?: number;
|
6
|
+
}
|
7
|
+
export interface IWrapperProps {
|
8
|
+
children: (props: Record<string, unknown>) => ReactNode;
|
9
|
+
[key: string]: unknown;
|
10
|
+
}
|
11
|
+
export interface IItemProps {
|
12
|
+
children: ReactNode;
|
13
|
+
[key: string]: unknown;
|
14
|
+
}
|
15
|
+
export interface IListVirtualization {
|
16
|
+
classNameContainer?: string;
|
17
|
+
computeItemKey?: () => string;
|
18
|
+
itemSize?: (el: HTMLElement) => number;
|
19
|
+
totalCount?: number;
|
20
|
+
typeHight: 'min-max' | 'container';
|
21
|
+
minHeightItem?: number;
|
22
|
+
maxHeightTable?: number;
|
23
|
+
minLengthItem?: number;
|
24
|
+
itemContent: (Wrapper: React.ComponentType<IWrapperProps>, index: number, data: unknown, context: unknown) => ReactNode;
|
25
|
+
typeCalculateItemSize?: 'auto' | 'manual';
|
26
|
+
itemSizeNames: string[];
|
27
|
+
overscan?: (value?: number) => number;
|
28
|
+
component?: Components;
|
29
|
+
idContainer?: string;
|
30
|
+
triggerCalCulateContainer?: number | string | boolean | object | Date;
|
31
|
+
accumulationHeight?: number;
|
32
|
+
delayTriggerCalculateHeight?: number;
|
33
|
+
increaseViewportBy?: (value?: number) => number;
|
34
|
+
context?: object;
|
35
|
+
endReached?: (value: number) => void;
|
36
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { TableComponents } from 'react-virtuoso';
|
3
|
+
|
4
|
+
export interface IStyleHeight {
|
5
|
+
height?: number;
|
6
|
+
}
|
7
|
+
export interface IWrapperProps {
|
8
|
+
children: (props: Record<string, unknown>) => ReactNode;
|
9
|
+
[key: string]: unknown;
|
10
|
+
}
|
11
|
+
export interface ITableRowProps {
|
12
|
+
children: ReactNode;
|
13
|
+
[key: string]: unknown;
|
14
|
+
}
|
15
|
+
export interface ITableVirtualization {
|
16
|
+
classNameContainer?: string;
|
17
|
+
computeItemKey?: () => string;
|
18
|
+
itemSize?: (el: HTMLElement) => number;
|
19
|
+
totalCount?: number;
|
20
|
+
typeHight: 'min-max' | 'container';
|
21
|
+
minHeightItem?: number;
|
22
|
+
maxHeightTable?: number;
|
23
|
+
minLengthItem?: number;
|
24
|
+
fixedHeaderContent: (() => ReactNode) | (() => ReactNode[]);
|
25
|
+
itemContent: (Wrapper: React.ComponentType<IWrapperProps>, index: number, data: unknown, context: unknown) => ReactNode;
|
26
|
+
typeCalculateItemSize?: 'auto' | 'manual';
|
27
|
+
itemSizeNames: string[];
|
28
|
+
overscan?: (value?: number) => number;
|
29
|
+
component?: TableComponents;
|
30
|
+
idContainer?: string;
|
31
|
+
triggerCalCulateContainer?: number | string | boolean | object | Date;
|
32
|
+
accumulationHeight?: number;
|
33
|
+
delayTriggerCalculateHeight?: number;
|
34
|
+
increaseViewportBy?: (value?: number) => number;
|
35
|
+
context?: object;
|
36
|
+
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "1mpacto-react-ui",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.7",
|
5
5
|
"type": "module",
|
6
6
|
"scripts": {
|
7
7
|
"dev": "vite",
|
@@ -52,8 +52,8 @@
|
|
52
52
|
"require": "./dist/index.umd.js",
|
53
53
|
"types": "./dist/index.d.ts"
|
54
54
|
},
|
55
|
-
"./dist/assets/core.css"
|
56
|
-
"./dist/assets/style.css"
|
55
|
+
"./dist/assets/core.css": "./dist/assets/core.css",
|
56
|
+
"./dist/assets/style.css": "./dist/assets/style.css"
|
57
57
|
},
|
58
58
|
"files": [
|
59
59
|
"/dist"
|
@@ -70,14 +70,16 @@
|
|
70
70
|
]
|
71
71
|
},
|
72
72
|
"dependencies": {
|
73
|
-
"@
|
74
|
-
"@
|
73
|
+
"@floating-ui/react": "^0.26.19",
|
74
|
+
"@internationalized/date": "^3.5.4",
|
75
75
|
"@tanstack/react-table": "^8.19.2",
|
76
76
|
"chart.js": "^4.4.3",
|
77
|
+
"react-aria": "^3.33.1",
|
77
78
|
"react-chartjs-2": "^5.2.0",
|
78
79
|
"react-number-format": "^5.4.0",
|
79
80
|
"react-select": "^5.8.0",
|
80
81
|
"react-select-async-paginate": "^0.7.4",
|
82
|
+
"react-stately": "^3.31.1",
|
81
83
|
"react-virtuoso": "^4.7.11"
|
82
84
|
}
|
83
85
|
}
|