1mpacto-react-ui 0.0.1-2.1
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 -0
- package/dist/assets/fonts/Inter-Regular.ttf +0 -0
- package/dist/assets/fonts/Lato-Regular.ttf +0 -0
- package/dist/assets/icons/arrow-narrow-down.svg +3 -0
- package/dist/assets/style.css +1 -0
- package/dist/index.cjs +98 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +20982 -0
- package/dist/index.mjs.map +1 -0
- 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 +4 -0
- 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/Collapse/Collapse.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/TPublish/TPublish.d.ts +2 -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 +33 -0
- 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/config/tailwind/colors.d.ts +3 -0
- package/dist/src/config/tailwind/index.d.ts +4 -0
- package/dist/src/config/tailwind/typography.d.ts +7 -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/Collapse/index.d.ts +7 -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/dist/src/main.d.ts +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +83 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
2
|
+
import { IBorderRadius } from '../../../config/components/borderRadius';
|
3
|
+
import { Itypography } from '../../../config/components/typography';
|
4
|
+
|
5
|
+
export interface IRadioCheckbox extends InputHTMLAttributes<HTMLInputElement> {
|
6
|
+
classNameContainer?: string | undefined;
|
7
|
+
classNameLabel?: string | undefined;
|
8
|
+
sizeInput?: 'reguler' | 's';
|
9
|
+
variants?: 'laba-blue-10' | 'blue-700' | 'blue-700-hv_bg_transparent' | 'laba-blue-10-hv_bg_transparent';
|
10
|
+
variantDisableds?: 'default-disabled-checkbox' | 'default-disabled-radio';
|
11
|
+
borderRadius?: IBorderRadius;
|
12
|
+
checkedIcon?: ReactNode | ReactNode[];
|
13
|
+
type?: 'checkbox' | 'radio';
|
14
|
+
fonts?: 'lato' | 'inter';
|
15
|
+
label?: string;
|
16
|
+
typography?: Itypography;
|
17
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
2
|
+
import { Itypography } from '../../../config/components/typography';
|
3
|
+
import { IRadioCheckbox } from './RadioCheckbox';
|
4
|
+
import { IBorderRadius } from '../../../config/components/borderRadius';
|
5
|
+
|
6
|
+
export interface IRadioCheckboxLabel extends InputHTMLAttributes<HTMLInputElement> {
|
7
|
+
typographyLabel?: Itypography;
|
8
|
+
typographyDesc?: Itypography;
|
9
|
+
borderRadius?: IBorderRadius;
|
10
|
+
type?: 'checkbox' | 'radio';
|
11
|
+
fonts?: 'lato' | 'inter';
|
12
|
+
radioCheckboxProps?: IRadioCheckbox;
|
13
|
+
variants?: 'blue-50' | 'laba-blue-01';
|
14
|
+
label: string | ReactNode | ReactNode[];
|
15
|
+
desc?: string | ReactNode | ReactNode[];
|
16
|
+
}
|
@@ -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
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
package/dist/vite.svg
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"name": "1mpacto-react-ui",
|
3
|
+
"private": false,
|
4
|
+
"version": "0.0.12.1",
|
5
|
+
"type": "module",
|
6
|
+
"scripts": {
|
7
|
+
"dev": "vite",
|
8
|
+
"build": "tsc -b && vite build && npm run build:css",
|
9
|
+
"build:css": "tailwindcss -i ./src/styles/index.scss -o ./dist/assets/core.css --minify",
|
10
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
11
|
+
"preview": "vite preview",
|
12
|
+
"prepare": "husky && npm run build"
|
13
|
+
},
|
14
|
+
"devDependencies": {
|
15
|
+
"@types/node": "^20.14.10",
|
16
|
+
"@types/react": "^18.3.3",
|
17
|
+
"@types/react-dom": "^18.3.0",
|
18
|
+
"@typescript-eslint/eslint-plugin": "^7.13.1",
|
19
|
+
"@typescript-eslint/parser": "^7.13.1",
|
20
|
+
"@vitejs/plugin-react-swc": "^3.5.0",
|
21
|
+
"autoprefixer": "^10.4.19",
|
22
|
+
"eslint": "^8.57.0",
|
23
|
+
"eslint-config-prettier": "^9.1.0",
|
24
|
+
"eslint-plugin-prettier": "^5.1.3",
|
25
|
+
"eslint-plugin-react": "^7.34.3",
|
26
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
27
|
+
"eslint-plugin-react-refresh": "^0.4.7",
|
28
|
+
"husky": "^9.0.11",
|
29
|
+
"lint-staged": "^15.2.7",
|
30
|
+
"postcss": "^8.4.39",
|
31
|
+
"prettier": "^3.3.2",
|
32
|
+
"react": "^18.3.1",
|
33
|
+
"react-dom": "^18.3.1",
|
34
|
+
"sass": "^1.77.6",
|
35
|
+
"tailwindcss": "^3.4.4",
|
36
|
+
"typescript": "^5.2.2",
|
37
|
+
"vite": "^5.3.1",
|
38
|
+
"vite-plugin-dts": "^3.9.1"
|
39
|
+
},
|
40
|
+
"peerDependencies": {
|
41
|
+
"react": ">=17.0.0 <19.0.0",
|
42
|
+
"react-dom": ">=17.0.0 <19.0.0"
|
43
|
+
},
|
44
|
+
"main": "./dist/index.cjs",
|
45
|
+
"module": "dist/index.mjs",
|
46
|
+
"types": "./dist/index.d.ts",
|
47
|
+
"exports": {
|
48
|
+
".": {
|
49
|
+
"import": "./dist/index.mjs",
|
50
|
+
"require": "./dist/index.cjs",
|
51
|
+
"types": "./dist/index.d.ts"
|
52
|
+
},
|
53
|
+
"./dist/assets/core.css": "./dist/assets/core.css",
|
54
|
+
"./dist/assets/style.css": "./dist/assets/style.css"
|
55
|
+
},
|
56
|
+
"files": [
|
57
|
+
"/dist"
|
58
|
+
],
|
59
|
+
"publishConfig": {
|
60
|
+
"access": "public"
|
61
|
+
},
|
62
|
+
"lint-staged": {
|
63
|
+
"*.{js,jsx,ts,tsx}": [
|
64
|
+
"eslint --quiet --fix"
|
65
|
+
],
|
66
|
+
"*.{json,js,ts,jsx,tsx,html}": [
|
67
|
+
"prettier --write --ignore-unknown"
|
68
|
+
]
|
69
|
+
},
|
70
|
+
"dependencies": {
|
71
|
+
"@floating-ui/react": "^0.26.19",
|
72
|
+
"@internationalized/date": "^3.5.4",
|
73
|
+
"@tanstack/react-table": "^8.19.2",
|
74
|
+
"chart.js": "^4.4.3",
|
75
|
+
"react-aria": "^3.33.1",
|
76
|
+
"react-chartjs-2": "^5.2.0",
|
77
|
+
"react-number-format": "^5.4.0",
|
78
|
+
"react-select": "^5.8.0",
|
79
|
+
"react-select-async-paginate": "^0.7.4",
|
80
|
+
"react-stately": "^3.31.1",
|
81
|
+
"react-virtuoso": "^4.7.11"
|
82
|
+
}
|
83
|
+
}
|