@conboai/storybook.components 0.1.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/README.md +98 -0
- package/dist/assets/icons/ThreeDotsIcon.d.ts +4 -0
- package/dist/assets/icons/index.d.ts +1 -0
- package/dist/assets/styles/colors.d.ts +26 -0
- package/dist/assets/styles/common.d.ts +7 -0
- package/dist/build/index.d.ts +46 -0
- package/dist/components/ActionButton/ActionButton.d.ts +5 -0
- package/dist/components/ActionButton/index.d.ts +1 -0
- package/dist/components/ActionButton/styles.d.ts +1 -0
- package/dist/components/ActionSelect/ActionSelect.d.ts +5 -0
- package/dist/components/ActionSelect/index.d.ts +1 -0
- package/dist/components/ActionSelect/styles.d.ts +3 -0
- package/dist/components/AppTitleBar/AppTitleBar.d.ts +5 -0
- package/dist/components/AppTitleBar/index.d.ts +1 -0
- package/dist/components/ChipsBar/ChipsBar.d.ts +5 -0
- package/dist/components/ChipsBar/index.d.ts +1 -0
- package/dist/components/ChipsMultiSelect/ChipsMultiSelect.d.ts +5 -0
- package/dist/components/ChipsMultiSelect/index.d.ts +1 -0
- package/dist/components/ChipsMultiSelect/styles.d.ts +3 -0
- package/dist/components/CircularProgressBar/CircularProgressBar.d.ts +3 -0
- package/dist/components/CircularProgressBar/CircularProgressWithLabel.d.ts +7 -0
- package/dist/components/CircularProgressBar/index.d.ts +1 -0
- package/dist/components/CircularProgressBar/styles.d.ts +4 -0
- package/dist/components/CustomSelect/CustomSelect.d.ts +12 -0
- package/dist/components/CustomSelect/index.d.ts +1 -0
- package/dist/components/DatePicker/ActionBar.d.ts +5 -0
- package/dist/components/DatePicker/DatePicker.d.ts +5 -0
- package/dist/components/DatePicker/constants.d.ts +20 -0
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/styles.d.ts +5 -0
- package/dist/components/DatePicker/utils.d.ts +1 -0
- package/dist/components/Delimiter/Delimiter.d.ts +4 -0
- package/dist/components/Delimiter/index.d.ts +1 -0
- package/dist/components/DetailsView/DetailsView.d.ts +5 -0
- package/dist/components/DetailsView/index.d.ts +1 -0
- package/dist/components/DetailsViewPanel/DetailsViewPanel.d.ts +7 -0
- package/dist/components/DetailsViewPanel/index.d.ts +1 -0
- package/dist/components/Filter/components/Filter.d.ts +5 -0
- package/dist/components/Filter/components/FilterActionButtons.d.ts +5 -0
- package/dist/components/Filter/components/FilterBody.d.ts +5 -0
- package/dist/components/Filter/components/FilterContent.d.ts +5 -0
- package/dist/components/Filter/components/FilterContentFooter.d.ts +5 -0
- package/dist/components/Filter/components/FilterFooter.d.ts +5 -0
- package/dist/components/Filter/components/FilterHeader.d.ts +5 -0
- package/dist/components/Filter/components/FilterTabPanels.d.ts +5 -0
- package/dist/components/Filter/components/FilterTabs.d.ts +5 -0
- package/dist/components/Filter/constants.d.ts +6 -0
- package/dist/components/Filter/context/index.d.ts +13 -0
- package/dist/components/Filter/index.d.ts +1 -0
- package/dist/components/Filter/styles.d.ts +13 -0
- package/dist/components/FilterBox/FilterBox.d.ts +5 -0
- package/dist/components/FilterBox/index.d.ts +1 -0
- package/dist/components/FilterBox/utils.d.ts +17 -0
- package/dist/components/Header/Header.d.ts +7 -0
- package/dist/components/Header/index.d.ts +1 -0
- package/dist/components/HomeLink/HomeLink.d.ts +8 -0
- package/dist/components/HomeLink/index.d.ts +1 -0
- package/dist/components/Logo/Logo.d.ts +8 -0
- package/dist/components/Logo/index.d.ts +1 -0
- package/dist/components/Logo/styles.d.ts +4 -0
- package/dist/components/MainTable/MainTable.d.ts +5 -0
- package/dist/components/MainTable/index.d.ts +1 -0
- package/dist/components/MainTable/styles.d.ts +1126 -0
- package/dist/components/NotificationBar/NotificationBar.d.ts +8 -0
- package/dist/components/NotificationBar/index.d.ts +1 -0
- package/dist/components/SearchInput/SearchInput.d.ts +9 -0
- package/dist/components/SearchInput/index.d.ts +1 -0
- package/dist/components/SearchInput/styles.d.ts +3 -0
- package/dist/components/Svg/Svg.d.ts +12 -0
- package/dist/components/Svg/icons.d.ts +27 -0
- package/dist/components/Svg/index.d.ts +1 -0
- package/dist/components/Tab/Tab.d.ts +5 -0
- package/dist/components/Tab/index.d.ts +1 -0
- package/dist/components/Tab/styles.d.ts +25 -0
- package/dist/components/TabsBar/TabsBar.d.ts +5 -0
- package/dist/components/TabsBar/index.d.ts +1 -0
- package/dist/components/TabsBox/TabsBox.d.ts +5 -0
- package/dist/components/TabsBox/TabsContainer.d.ts +5 -0
- package/dist/components/TabsBox/TabsContent.d.ts +5 -0
- package/dist/components/TabsBox/index.d.ts +1 -0
- package/dist/components/Toggle/Toggle.d.ts +11 -0
- package/dist/components/Toggle/index.d.ts +1 -0
- package/dist/components/Toggle/styles.d.ts +4 -0
- package/dist/components/UserAvatar/UserAvatar.d.ts +8 -0
- package/dist/components/UserAvatar/index.d.ts +1 -0
- package/dist/components/VerticalTable/VerticalTable.d.ts +17 -0
- package/dist/components/VerticalTable/index.d.ts +1 -0
- package/dist/components/VerticalTable/styles.d.ts +1072 -0
- package/dist/components/VerticalTable/utils.d.ts +1 -0
- package/dist/components/VideoBox/VideoBox.d.ts +7 -0
- package/dist/components/VideoBox/VideoPlayer.d.ts +8 -0
- package/dist/components/VideoBox/index.d.ts +1 -0
- package/dist/components/VideoBox/styles.d.ts +3 -0
- package/dist/helpers/constants.d.ts +14 -0
- package/dist/helpers/utils/date.d.ts +6 -0
- package/dist/helpers/utils/utils.d.ts +1 -0
- package/dist/interfaces/actionButton.d.ts +8 -0
- package/dist/interfaces/actionSelect.d.ts +12 -0
- package/dist/interfaces/appTitleBar.d.ts +4 -0
- package/dist/interfaces/chipsBar.d.ts +9 -0
- package/dist/interfaces/chipsMultiSelect.d.ts +6 -0
- package/dist/interfaces/datePicker.d.ts +21 -0
- package/dist/interfaces/detailsView.d.ts +6 -0
- package/dist/interfaces/filter.d.ts +105 -0
- package/dist/interfaces/mainTable.d.ts +21 -0
- package/dist/interfaces/tab.d.ts +22 -0
- package/dist/interfaces/tabsContainer.d.ts +24 -0
- package/dist/mocks/chipsMultiSelect.d.ts +1 -0
- package/dist/mocks/detailsView.d.ts +25 -0
- package/dist/mocks/filter.d.ts +16 -0
- package/dist/mocks/table.d.ts +33 -0
- package/dist/mocks/tabs.d.ts +5 -0
- package/dist/mocks/time.d.ts +8 -0
- package/dist/storybook.components.mjs +41744 -0
- package/package.json +97 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const renderCellContent: (value: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as VideoBox } from './VideoBox';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum PLACEMENTS {
|
|
2
|
+
TOP = "top",
|
|
3
|
+
TOP_START = "top-start",
|
|
4
|
+
TOP_END = "top-end",
|
|
5
|
+
LEFT = "left",
|
|
6
|
+
LEFT_START = "left-start",
|
|
7
|
+
LEFT_END = "left-end",
|
|
8
|
+
BOTTOM = "bottom",
|
|
9
|
+
BOTTOM_START = "bottom-start",
|
|
10
|
+
BOTTOM_END = "bottom-end",
|
|
11
|
+
RIGHT = "right",
|
|
12
|
+
RIGHT_START = "right-start",
|
|
13
|
+
RIGHT_END = "right-end"
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as dayjs, ManipulateType, OpUnitType, UnitType } from 'dayjs';
|
|
2
|
+
|
|
3
|
+
export declare const getStartTime: (type: OpUnitType, timeType: UnitType, time: number) => dayjs.Dayjs;
|
|
4
|
+
export declare const getEndTime: (type: OpUnitType, timeType: UnitType, time: number) => dayjs.Dayjs;
|
|
5
|
+
export declare const getStartTimeOfYesterday: (time: number) => dayjs.Dayjs;
|
|
6
|
+
export declare const subtractTime: (time: number, timeType: ManipulateType | undefined) => dayjs.Dayjs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const snakeCaseToTitleCase: (input: string) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TypeDatePickerValue } from './datePicker';
|
|
2
|
+
import { Dayjs } from 'dayjs';
|
|
3
|
+
|
|
4
|
+
export type TypeOption = {
|
|
5
|
+
value: number;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
export interface IActionSelect {
|
|
9
|
+
options: Array<TypeOption> | undefined;
|
|
10
|
+
setValue: (value: TypeDatePickerValue) => void;
|
|
11
|
+
value?: Dayjs | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { PickersShortcutsItem } from '@mui/x-date-pickers';
|
|
3
|
+
import { TypeOption } from './actionSelect';
|
|
4
|
+
|
|
5
|
+
export type TypeDatePickerValue = Dayjs | null;
|
|
6
|
+
export type TypeShortcuts = Array<PickersShortcutsItem<TypeDatePickerValue>> | undefined;
|
|
7
|
+
export interface IDatePicker {
|
|
8
|
+
label: string;
|
|
9
|
+
onChange: (value: Date | undefined) => void;
|
|
10
|
+
value: Date;
|
|
11
|
+
showTime?: boolean;
|
|
12
|
+
showShortcuts?: boolean;
|
|
13
|
+
showAmPmFormat?: boolean;
|
|
14
|
+
showActionSelect?: boolean;
|
|
15
|
+
shortcuts?: TypeShortcuts;
|
|
16
|
+
selectOptions?: Array<TypeOption>;
|
|
17
|
+
format?: string;
|
|
18
|
+
readonly?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
timezone: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { PLACEMENTS } from '../helpers/constants';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface ISubItemValue {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface IFilterSourceData {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
kit: string;
|
|
14
|
+
groups: string[];
|
|
15
|
+
subItemValues?: ISubItemValue[];
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
show?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface IFilterBox {
|
|
21
|
+
title?: string;
|
|
22
|
+
filterTitle?: string;
|
|
23
|
+
data: TypeFilterData;
|
|
24
|
+
readonly?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type TypeCriterias = {
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
};
|
|
30
|
+
export type TypeFilterData = {
|
|
31
|
+
data: Array<IFilterSourceData>;
|
|
32
|
+
criterias: Array<TypeCriterias>;
|
|
33
|
+
};
|
|
34
|
+
export interface IFilter {
|
|
35
|
+
open: boolean;
|
|
36
|
+
anchor?: null | HTMLElement;
|
|
37
|
+
title?: string;
|
|
38
|
+
placement?: PLACEMENTS | undefined;
|
|
39
|
+
width?: string;
|
|
40
|
+
height?: string;
|
|
41
|
+
onClose: Dispatch<SetStateAction<HTMLElement | null>>;
|
|
42
|
+
onDone: (value: Array<IFilterSourceData> | []) => void;
|
|
43
|
+
data: TypeFilterData;
|
|
44
|
+
readonly: boolean;
|
|
45
|
+
notificationText?: string;
|
|
46
|
+
filterData?: Array<IFilterSourceData>;
|
|
47
|
+
}
|
|
48
|
+
export type TypeSelectedFilterData = {
|
|
49
|
+
data: Array<IFilterSourceData> | [];
|
|
50
|
+
criterias: Array<TypeCriterias>;
|
|
51
|
+
};
|
|
52
|
+
export interface IFilterBody {
|
|
53
|
+
data: TypeFilterData | TypeSelectedFilterData;
|
|
54
|
+
helperText?: string;
|
|
55
|
+
setSelectedValues: (value: TypeFilterData) => void;
|
|
56
|
+
selectedItems: TypeFilterData;
|
|
57
|
+
readonly?: boolean;
|
|
58
|
+
filterData: TypeSelectedFilterData;
|
|
59
|
+
subItemsFlag: boolean;
|
|
60
|
+
setSubItemsFlag: (value: boolean) => void;
|
|
61
|
+
isFilterBlock?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface IFilterTabs {
|
|
64
|
+
value: string;
|
|
65
|
+
setValue: (value: string) => void;
|
|
66
|
+
data: TypeSelectedFilterData;
|
|
67
|
+
setFilterKey: (value: string) => void;
|
|
68
|
+
setSubItemsFlag: (value: boolean) => void;
|
|
69
|
+
}
|
|
70
|
+
export interface IFilterTabPanels {
|
|
71
|
+
data: Array<IFilterSourceData>;
|
|
72
|
+
tabs: Array<TypeCriterias>;
|
|
73
|
+
filterKey: string;
|
|
74
|
+
}
|
|
75
|
+
export interface IFilterHeader {
|
|
76
|
+
title: string | undefined;
|
|
77
|
+
onClose: () => void;
|
|
78
|
+
}
|
|
79
|
+
export interface IFilterContentFooter {
|
|
80
|
+
data: Array<IFilterSourceData>;
|
|
81
|
+
checkedItems: Array<string>;
|
|
82
|
+
setCheckedItems: (value: Array<string>) => void;
|
|
83
|
+
setMasterCheckboxStates: (value: Array<boolean>) => void;
|
|
84
|
+
}
|
|
85
|
+
export interface IFilterActionButtons {
|
|
86
|
+
onAdd: () => void;
|
|
87
|
+
onRemove: () => void;
|
|
88
|
+
onAddDisabled?: boolean;
|
|
89
|
+
onRemovedDisabled?: boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface IFilterFooter {
|
|
92
|
+
onCancel: () => void;
|
|
93
|
+
onDone: () => void;
|
|
94
|
+
isNotificationShown?: boolean;
|
|
95
|
+
notificationText?: string;
|
|
96
|
+
onDoneDisabled?: boolean;
|
|
97
|
+
}
|
|
98
|
+
export interface IFilterContent {
|
|
99
|
+
data: Array<IFilterSourceData>;
|
|
100
|
+
checkedItems: string[];
|
|
101
|
+
setCheckedItems: (items: string[]) => void;
|
|
102
|
+
filterKey: string;
|
|
103
|
+
masterCheckboxStates: Array<boolean>;
|
|
104
|
+
setMasterCheckboxStates: (value: Array<boolean>) => void;
|
|
105
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export interface Column {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Data {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface IMainTable {
|
|
11
|
+
columns: Column[];
|
|
12
|
+
data: Data[];
|
|
13
|
+
rowsPerPageOptions?: number[];
|
|
14
|
+
withPagination?: boolean;
|
|
15
|
+
withDownload?: boolean;
|
|
16
|
+
sortable?: boolean;
|
|
17
|
+
sx?: SxProps;
|
|
18
|
+
onCellClick?: (cellData: object | undefined, rowData: object | undefined) => void;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
selectedRowId?: number | string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type TypeTab = {
|
|
2
|
+
id: string;
|
|
3
|
+
color: string;
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
6
|
+
export type TypeTabs = Array<TypeTab>;
|
|
7
|
+
export interface ITab {
|
|
8
|
+
value?: string;
|
|
9
|
+
onEdit: (value: string) => void;
|
|
10
|
+
onDelete?: () => void;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
color?: string;
|
|
13
|
+
showDelete: boolean;
|
|
14
|
+
isActive?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ITabsBar {
|
|
17
|
+
tabs: TypeTabs;
|
|
18
|
+
onDelete: (id: string) => void;
|
|
19
|
+
onEdit: (id: string, value: string) => void;
|
|
20
|
+
onAdd: () => void;
|
|
21
|
+
onClick: (id: string) => void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type TypeTabContainer = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type TypeTabsContainer = Array<TypeTabContainer>;
|
|
9
|
+
export type TypeTabContent = {
|
|
10
|
+
value: string;
|
|
11
|
+
content: React.ReactNode | string;
|
|
12
|
+
};
|
|
13
|
+
export type TypeTabsContent = Array<TypeTabContent>;
|
|
14
|
+
export interface ITabsBox {
|
|
15
|
+
setValue: (value: string) => void;
|
|
16
|
+
value: string;
|
|
17
|
+
tabs: TypeTabsContainer;
|
|
18
|
+
tabsContent: TypeTabsContent;
|
|
19
|
+
}
|
|
20
|
+
export interface ITabsContainer extends Omit<ITabsBox, "tabsContent"> {
|
|
21
|
+
}
|
|
22
|
+
export interface ITabsContent {
|
|
23
|
+
tabsContent: TypeTabsContent;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dataMock: string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IMainTable } from '../interfaces/mainTable';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const columnDefs: {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const TABS: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
export declare const detailsViewDataMock: {
|
|
14
|
+
classifier: string;
|
|
15
|
+
value: string;
|
|
16
|
+
count: number;
|
|
17
|
+
score: string;
|
|
18
|
+
}[];
|
|
19
|
+
export declare const getTabsContent: (tableProps: IMainTable) => ({
|
|
20
|
+
value: string;
|
|
21
|
+
content: React.JSX.Element;
|
|
22
|
+
} | {
|
|
23
|
+
value: string;
|
|
24
|
+
content: string;
|
|
25
|
+
})[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const columns: {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const mainTableDataMock: {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
age: number;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const verticalTableDataMock: {
|
|
11
|
+
feed: number;
|
|
12
|
+
conbo_key: string;
|
|
13
|
+
event_id: string;
|
|
14
|
+
straddle_id: number;
|
|
15
|
+
move: string;
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
cargo: string;
|
|
19
|
+
zones: string[];
|
|
20
|
+
};
|
|
21
|
+
export declare const verticalTableColumnDefs: ({
|
|
22
|
+
headerName: string;
|
|
23
|
+
field: string;
|
|
24
|
+
renderCell?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
headerName: string;
|
|
27
|
+
field: string;
|
|
28
|
+
renderCell: (value: string) => string;
|
|
29
|
+
} | {
|
|
30
|
+
headerName: string;
|
|
31
|
+
field: string;
|
|
32
|
+
renderCell: (value: Date) => string;
|
|
33
|
+
})[];
|