@dartech/arsenal-ui 1.2.5 → 1.2.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/{index.ts → index.d.ts} +5 -5
- package/index.js +1 -0
- package/package.json +12 -3
- package/src/consts/index.d.ts +12 -0
- package/src/interfaces/common.d.ts +17 -0
- package/src/interfaces/definition.d.ts +107 -0
- package/src/interfaces/{index.ts → index.d.ts} +3 -3
- package/src/interfaces/ui.d.ts +70 -0
- package/src/lib/Alert/Alert.d.ts +53 -0
- package/src/lib/Alert/index.d.ts +1 -0
- package/src/lib/Breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.d.ts +2 -0
- package/src/lib/Breadcrumbs/{index.ts → index.d.ts} +1 -1
- package/src/lib/ContentLayout/ContentLayout.d.ts +9 -0
- package/src/lib/ContentLayout/index.d.ts +1 -0
- package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +11 -0
- package/src/lib/Definition/CreateDefinition/{index.ts → index.d.ts} +1 -1
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +10 -0
- package/src/lib/Definition/DefinitionFiller/{index.ts → index.d.ts} +1 -1
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.d.ts +8 -0
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.d.ts +9 -0
- package/src/lib/Definition/DefinitionValueView/{index.ts → index.d.ts} +1 -1
- package/src/lib/Definition/{index.ts → index.d.ts} +3 -3
- package/src/lib/Forms/BackButton.d.ts +7 -0
- package/src/lib/Forms/ControlAceEditor.d.ts +24 -0
- package/src/lib/Forms/ControlAutocomplete.d.ts +69 -0
- package/src/lib/Forms/ControlCheckbox.d.ts +51 -0
- package/src/lib/Forms/ControlDate.d.ts +18 -0
- package/src/lib/Forms/ControlDateTime.d.ts +18 -0
- package/src/lib/Forms/ControlDebouncedInput.d.ts +4 -0
- package/src/lib/Forms/ControlInput.d.ts +59 -0
- package/src/lib/Forms/ControlNumberInput.d.ts +51 -0
- package/src/lib/Forms/ControlQueryAutocomplete.d.ts +16 -0
- package/src/lib/Forms/ControlRadio.d.ts +66 -0
- package/src/lib/Forms/ControlSelect.d.ts +67 -0
- package/src/lib/Forms/ControlSwitch.d.ts +19 -0
- package/src/lib/Forms/ControlTime.d.ts +18 -0
- package/src/lib/Forms/CopyButton.d.ts +20 -0
- package/src/lib/Forms/{index.ts → index.d.ts} +15 -15
- package/src/lib/Forms/useAutocomplete.d.ts +10 -0
- package/src/lib/InfoItem/InfoItem.d.ts +10 -0
- package/src/lib/InfoItem/{index.ts → index.d.ts} +1 -1
- package/src/lib/InfoItem/styles.d.ts +12 -0
- package/src/lib/JsonPathPicker/JsonPathPicker.d.ts +10 -0
- package/src/lib/JsonPathPicker/PropertyStep.d.ts +11 -0
- package/src/lib/JsonPathPicker/{index.ts → index.d.ts} +1 -1
- package/src/lib/JsonView/JsonView.d.ts +7 -0
- package/src/lib/JsonView/{index.ts → index.d.ts} +1 -1
- package/src/lib/Loader/Loader.d.ts +21 -0
- package/src/lib/Loader/{index.ts → index.d.ts} +1 -1
- package/src/lib/Modals/JsonModalView.d.ts +10 -0
- package/src/lib/Modals/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/PropertyFiller/JsonEditor.d.ts +10 -0
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.d.ts +12 -0
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.d.ts +11 -0
- package/src/lib/Property/PropertyFiller/PropertyFiller.d.ts +12 -0
- package/src/lib/Property/PropertyFiller/{index.ts → index.d.ts} +2 -2
- package/src/lib/Property/PropertyFiller/usePropertyFiller.d.ts +24 -0
- package/src/lib/Property/PropertyFiller/useStyles.d.ts +12 -0
- package/src/lib/Property/PropertyValidator/NodeValidator.d.ts +6 -0
- package/src/lib/Property/PropertyValidator/NodesList.d.ts +6 -0
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.d.ts +8 -0
- package/src/lib/Property/PropertyValidator/PropertyValidator.d.ts +6 -0
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.d.ts +3 -0
- package/src/lib/Property/PropertyValidator/StringTypeValidator.d.ts +8 -0
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.d.ts +7 -0
- package/src/lib/Property/PropertyValidator/index.d.ts +1 -0
- package/src/lib/Property/PropertyValueField/BooleanValueField.d.ts +7 -0
- package/src/lib/Property/PropertyValueField/DateTimeValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/DateValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/JsonValueField.d.ts +10 -0
- package/src/lib/Property/PropertyValueField/PropertyValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/StringValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/TimeValueField.d.ts +9 -0
- package/src/lib/Property/PropertyValueField/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +13 -0
- package/src/lib/Property/PropertyWidget/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/UpsertProperty/CreatePropertiesList.d.ts +13 -0
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +10 -0
- package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +7 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +6 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +7 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +8 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +6 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +10 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +6 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/UpsertProperty/{index.ts → index.d.ts} +2 -2
- package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +6 -0
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +8 -0
- package/src/lib/Property/ViewPropertiesList/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.d.ts +7 -0
- package/src/lib/Property/ViewProperty/EntityPropertiesView.d.ts +8 -0
- package/src/lib/Property/ViewProperty/PropertyDataTable.d.ts +7 -0
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +9 -0
- package/src/lib/Property/ViewProperty/ViewProperty.d.ts +9 -0
- package/src/lib/Property/ViewProperty/{index.ts → index.d.ts} +1 -1
- package/src/lib/Property/{index.ts → index.d.ts} +5 -5
- package/src/lib/Sidebar/Sidebar.d.ts +10 -0
- package/src/lib/Sidebar/Sidebar.styled.d.ts +117 -0
- package/src/lib/Sidebar/SidebarContext.d.ts +11 -0
- package/src/lib/Sidebar/SidebarDrawer.d.ts +9 -0
- package/src/lib/Sidebar/SidebarLink/MenuIcon.d.ts +7 -0
- package/src/lib/Sidebar/SidebarLink/SidebarLink.d.ts +7 -0
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.d.ts +8 -0
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.d.ts +10 -0
- package/src/lib/Sidebar/SidebarLink/{index.ts → index.d.ts} +2 -2
- package/src/lib/Sidebar/index.d.ts +2 -0
- package/src/lib/Status/Status.d.ts +8 -0
- package/src/lib/Status/{index.ts → index.d.ts} +1 -1
- package/src/lib/Status/styles.d.ts +12 -0
- package/src/lib/StepperView/StepperView.d.ts +11 -0
- package/src/lib/StepperView/{index.ts → index.d.ts} +1 -1
- package/src/lib/Table/DataGrid/JsonTypeCell.d.ts +7 -0
- package/src/lib/Table/DataGrid/Table.d.ts +49 -0
- package/src/lib/Table/DataGrid/TableAction.d.ts +13 -0
- package/src/lib/Table/DataGrid/TableColumnMenu.d.ts +3 -0
- package/src/lib/Table/DataGrid/TablePagination.d.ts +3 -0
- package/src/lib/Table/DataGrid/index.d.ts +2 -0
- package/src/lib/Table/DataGrid/styles.d.ts +12 -0
- package/src/lib/Table/DataGrid/usePagination.d.ts +5 -0
- package/src/lib/Table/DataGrid/useTableQueryPagination.d.ts +11 -0
- package/src/lib/Table/DataGrid/useTableQuerySorting.d.ts +6 -0
- package/src/lib/Table/SimpleTable/SimpleTable.d.ts +17 -0
- package/src/lib/Table/SimpleTable/TableActionCell.d.ts +10 -0
- package/src/lib/Table/SimpleTable/index.d.ts +2 -0
- package/src/lib/Table/SimpleTable/useTablePagination.d.ts +7 -0
- package/src/lib/Table/SimpleTable/useTableSorting.d.ts +6 -0
- package/src/lib/Table/index.d.ts +2 -0
- package/src/lib/Tabs/RouteTabs.d.ts +11 -0
- package/src/lib/Tabs/TabPanel.d.ts +25 -0
- package/src/lib/Tabs/{index.ts → index.d.ts} +2 -2
- package/src/lib/{index.ts → index.d.ts} +16 -16
- package/src/theme/baseTheme.d.ts +2 -0
- package/src/theme/index.d.ts +1 -0
- package/src/theme/inputThemeOptions.d.ts +117 -0
- package/src/theme/stepperThemeOptions.d.ts +16 -0
- package/src/theme/tableThemeOptions.d.ts +47 -0
- package/src/theme/typographyThemeOptions.d.ts +29 -0
- package/src/utils/common.d.ts +7 -0
- package/src/utils/dem.d.ts +27 -0
- package/src/utils/hooks.d.ts +7 -0
- package/src/utils/{index.ts → index.d.ts} +5 -5
- package/src/utils/ui-utils.d.ts +14 -0
- package/src/utils/validators.d.ts +5 -0
- package/.babelrc +0 -13
- package/.eslintrc.json +0 -22
- package/jest.config.ts +0 -11
- package/project.json +0 -94
- package/rollup.config.js +0 -146
- package/src/assets/chevron_left_gray.svg +0 -3
- package/src/consts/index.ts +0 -13
- package/src/interfaces/common.ts +0 -18
- package/src/interfaces/definition.ts +0 -143
- package/src/interfaces/ui.ts +0 -80
- package/src/lib/Alert/Alert.tsx +0 -108
- package/src/lib/Alert/index.ts +0 -1
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.tsx +0 -16
- package/src/lib/Breadcrumbs/Breadcrumbs.tsx +0 -40
- package/src/lib/ContentLayout/ContentLayout.tsx +0 -31
- package/src/lib/ContentLayout/index.ts +0 -1
- package/src/lib/Definition/CreateDefinition/CreateDefinition.tsx +0 -78
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.tsx +0 -71
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.tsx +0 -54
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.tsx +0 -67
- package/src/lib/Forms/BackButton.tsx +0 -46
- package/src/lib/Forms/ControlAceEditor.tsx +0 -125
- package/src/lib/Forms/ControlAutocomplete.tsx +0 -145
- package/src/lib/Forms/ControlCheckbox.tsx +0 -113
- package/src/lib/Forms/ControlDate.tsx +0 -75
- package/src/lib/Forms/ControlDateTime.tsx +0 -77
- package/src/lib/Forms/ControlDebouncedInput.tsx +0 -80
- package/src/lib/Forms/ControlInput.tsx +0 -111
- package/src/lib/Forms/ControlNumberInput.tsx +0 -121
- package/src/lib/Forms/ControlQueryAutocomplete.tsx +0 -197
- package/src/lib/Forms/ControlRadio.tsx +0 -136
- package/src/lib/Forms/ControlSelect.tsx +0 -164
- package/src/lib/Forms/ControlSwitch.tsx +0 -71
- package/src/lib/Forms/ControlTime.tsx +0 -93
- package/src/lib/Forms/CopyButton.tsx +0 -46
- package/src/lib/Forms/useAutocomplete.tsx +0 -47
- package/src/lib/InfoItem/InfoItem.tsx +0 -40
- package/src/lib/InfoItem/styles.ts +0 -17
- package/src/lib/JsonPathPicker/JsonPathPicker.tsx +0 -73
- package/src/lib/JsonPathPicker/PropertyStep.tsx +0 -70
- package/src/lib/JsonView/JsonView.tsx +0 -41
- package/src/lib/Loader/Loader.tsx +0 -41
- package/src/lib/Modals/JsonModalView.tsx +0 -53
- package/src/lib/Property/PropertyFiller/JsonEditor.tsx +0 -58
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.tsx +0 -129
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.tsx +0 -85
- package/src/lib/Property/PropertyFiller/PropertyFiller.tsx +0 -199
- package/src/lib/Property/PropertyFiller/usePropertyFiller.ts +0 -72
- package/src/lib/Property/PropertyFiller/useStyles.ts +0 -12
- package/src/lib/Property/PropertyValidator/NodeValidator.tsx +0 -92
- package/src/lib/Property/PropertyValidator/NodesList.tsx +0 -26
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.tsx +0 -59
- package/src/lib/Property/PropertyValidator/PropertyValidator.tsx +0 -42
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.tsx +0 -4
- package/src/lib/Property/PropertyValidator/StringTypeValidator.tsx +0 -36
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.tsx +0 -62
- package/src/lib/Property/PropertyValidator/index.ts +0 -1
- package/src/lib/Property/PropertyValueField/BooleanValueField.tsx +0 -49
- package/src/lib/Property/PropertyValueField/DateTimeValueField.tsx +0 -58
- package/src/lib/Property/PropertyValueField/DateValueField.tsx +0 -58
- package/src/lib/Property/PropertyValueField/JsonValueField.tsx +0 -65
- package/src/lib/Property/PropertyValueField/PropertyValueField.tsx +0 -49
- package/src/lib/Property/PropertyValueField/StringValueField.tsx +0 -50
- package/src/lib/Property/PropertyValueField/TimeValueField.tsx +0 -67
- package/src/lib/Property/PropertyWidget/PropertyWidget.tsx +0 -115
- package/src/lib/Property/UpsertProperty/CreatePropertiesList.tsx +0 -148
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.tsx +0 -158
- package/src/lib/Property/UpsertProperty/CustomPropertyField.tsx +0 -40
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.tsx +0 -41
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.tsx +0 -27
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.tsx +0 -133
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.tsx +0 -46
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.tsx +0 -52
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.tsx +0 -103
- package/src/lib/Property/UpsertProperty/useCustomFields.ts +0 -22
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.tsx +0 -37
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.tsx +0 -40
- package/src/lib/Property/ViewProperty/EntityPropertiesView.tsx +0 -48
- package/src/lib/Property/ViewProperty/PropertyDataTable.tsx +0 -148
- package/src/lib/Property/ViewProperty/PropertyItem.tsx +0 -43
- package/src/lib/Property/ViewProperty/ViewProperty.tsx +0 -52
- package/src/lib/Sidebar/Sidebar.styled.tsx +0 -157
- package/src/lib/Sidebar/Sidebar.tsx +0 -27
- package/src/lib/Sidebar/SidebarContext.tsx +0 -37
- package/src/lib/Sidebar/SidebarDrawer.tsx +0 -50
- package/src/lib/Sidebar/SidebarLink/MenuIcon.tsx +0 -16
- package/src/lib/Sidebar/SidebarLink/SidebarLink.tsx +0 -54
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.tsx +0 -54
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.tsx +0 -62
- package/src/lib/Sidebar/index.ts +0 -2
- package/src/lib/Status/Status.tsx +0 -16
- package/src/lib/Status/styles.ts +0 -21
- package/src/lib/StepperView/StepperView.tsx +0 -73
- package/src/lib/Table/DataGrid/JsonTypeCell.tsx +0 -51
- package/src/lib/Table/DataGrid/Table.tsx +0 -117
- package/src/lib/Table/DataGrid/TableAction.tsx +0 -43
- package/src/lib/Table/DataGrid/TableColumnMenu.tsx +0 -12
- package/src/lib/Table/DataGrid/TablePagination.tsx +0 -42
- package/src/lib/Table/DataGrid/index.ts +0 -2
- package/src/lib/Table/DataGrid/styles.ts +0 -59
- package/src/lib/Table/DataGrid/usePagination.ts +0 -15
- package/src/lib/Table/DataGrid/useTableQueryPagination.ts +0 -47
- package/src/lib/Table/DataGrid/useTableQuerySorting.ts +0 -47
- package/src/lib/Table/SimpleTable/SimpleTable.tsx +0 -138
- package/src/lib/Table/SimpleTable/TableActionCell.tsx +0 -67
- package/src/lib/Table/SimpleTable/index.ts +0 -2
- package/src/lib/Table/SimpleTable/useTablePagination.ts +0 -54
- package/src/lib/Table/SimpleTable/useTableSorting.ts +0 -50
- package/src/lib/Table/index.ts +0 -2
- package/src/lib/Tabs/RouteTabs.tsx +0 -54
- package/src/lib/Tabs/TabPanel.tsx +0 -42
- package/src/theme/baseTheme.ts +0 -128
- package/src/theme/fonts.d.ts +0 -2
- package/src/theme/index.ts +0 -126
- package/src/theme/inputThemeOptions.ts +0 -126
- package/src/theme/stepperThemeOptions.ts +0 -20
- package/src/theme/tableThemeOptions.ts +0 -50
- package/src/theme/typographyThemeOptions.ts +0 -32
- package/src/utils/common.ts +0 -73
- package/src/utils/dem.ts +0 -431
- package/src/utils/hooks.ts +0 -41
- package/src/utils/ui-utils.tsx +0 -102
- package/src/utils/validators.ts +0 -14
- package/tsconfig.json +0 -25
- package/tsconfig.lib.json +0 -23
- package/tsconfig.spec.json +0 -20
@@ -1,50 +0,0 @@
|
|
1
|
-
import { useCallback, useMemo } from 'react';
|
2
|
-
import { useSearchParams } from 'react-router-dom';
|
3
|
-
|
4
|
-
const useTableSorting = () => {
|
5
|
-
const [searchParams, setSearchParams] = useSearchParams();
|
6
|
-
|
7
|
-
const sortParams = useMemo(
|
8
|
-
() => searchParams.getAll('sort').map((param) => param.split(',')),
|
9
|
-
[searchParams]
|
10
|
-
);
|
11
|
-
|
12
|
-
const onSortChanged = useCallback(
|
13
|
-
(sortKey: string) => {
|
14
|
-
setSearchParams((params) => {
|
15
|
-
console.log(sortKey, params.get('page'));
|
16
|
-
params.delete('sort');
|
17
|
-
|
18
|
-
let keyFound = false;
|
19
|
-
sortParams.forEach(([key, value]) => {
|
20
|
-
if (key === sortKey) {
|
21
|
-
keyFound = true;
|
22
|
-
if (value === 'asc') {
|
23
|
-
params.append('sort', `${key},desc`);
|
24
|
-
}
|
25
|
-
} else {
|
26
|
-
params.append('sort', `${key},${value}`);
|
27
|
-
}
|
28
|
-
});
|
29
|
-
|
30
|
-
if (!keyFound) {
|
31
|
-
params.append('sort', `${sortKey},asc`);
|
32
|
-
}
|
33
|
-
|
34
|
-
return params;
|
35
|
-
});
|
36
|
-
},
|
37
|
-
[sortParams, setSearchParams]
|
38
|
-
);
|
39
|
-
|
40
|
-
const getColumnSorting = useCallback(
|
41
|
-
(sortKey: string) => {
|
42
|
-
const sort = sortParams.find(([key, _]) => key === sortKey);
|
43
|
-
return sort ? sort[1] : false;
|
44
|
-
},
|
45
|
-
[sortParams]
|
46
|
-
);
|
47
|
-
|
48
|
-
return { sortParams, onSortChanged, getColumnSorting };
|
49
|
-
};
|
50
|
-
export default useTableSorting;
|
package/src/lib/Table/index.ts
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
import { useMemo } from 'react';
|
2
|
-
import Box from '@mui/material/Box';
|
3
|
-
import Paper from '@mui/material/Paper';
|
4
|
-
import Tab from '@mui/material/Tab';
|
5
|
-
import Tabs from '@mui/material/Tabs';
|
6
|
-
import TabPanel from './TabPanel';
|
7
|
-
|
8
|
-
import { useNavigate, useLocation } from 'react-router-dom';
|
9
|
-
|
10
|
-
interface RouteTab {
|
11
|
-
name: string;
|
12
|
-
label: string;
|
13
|
-
component: React.ReactElement;
|
14
|
-
}
|
15
|
-
|
16
|
-
interface Props {
|
17
|
-
tabs: RouteTab[];
|
18
|
-
}
|
19
|
-
|
20
|
-
export const RouteTabs = (props: Props) => {
|
21
|
-
const { tabs } = props;
|
22
|
-
|
23
|
-
const navigate = useNavigate();
|
24
|
-
const location = useLocation();
|
25
|
-
|
26
|
-
const queryParams = useMemo(() => new URLSearchParams(location.search), [location.search]);
|
27
|
-
const value = queryParams.get('tab');
|
28
|
-
|
29
|
-
const handleChange = (event, newValue: string) => {
|
30
|
-
queryParams.set('tab', newValue);
|
31
|
-
navigate({ pathname: location.pathname, search: queryParams.toString() }, { replace: true });
|
32
|
-
};
|
33
|
-
|
34
|
-
return (
|
35
|
-
<Box>
|
36
|
-
<Paper>
|
37
|
-
<Tabs value={value || tabs[0]?.name} indicatorColor="primary" textColor="primary" onChange={handleChange}>
|
38
|
-
{tabs.map((tab) => (
|
39
|
-
<Tab key={tab.name} value={tab.name} label={tab.label} />
|
40
|
-
))}
|
41
|
-
</Tabs>
|
42
|
-
</Paper>
|
43
|
-
<Box mt={2}>
|
44
|
-
{tabs.map((tab) => (
|
45
|
-
<TabPanel key={tab.name} value={value || tabs[0]?.name} index={tab.name}>
|
46
|
-
{tab.component}
|
47
|
-
</TabPanel>
|
48
|
-
))}
|
49
|
-
</Box>
|
50
|
-
</Box>
|
51
|
-
);
|
52
|
-
};
|
53
|
-
|
54
|
-
export default RouteTabs;
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* This interface is referencing the [[TabPanel]] component props.
|
5
|
-
* @category Common UI components
|
6
|
-
*/
|
7
|
-
export interface TabPanelProps {
|
8
|
-
/**
|
9
|
-
* Active tab value
|
10
|
-
*/
|
11
|
-
value: number | string;
|
12
|
-
/**
|
13
|
-
* Index of current panel
|
14
|
-
*/
|
15
|
-
index: number | string;
|
16
|
-
/**
|
17
|
-
* Rendered children component
|
18
|
-
*/
|
19
|
-
children: React.ReactElement;
|
20
|
-
}
|
21
|
-
|
22
|
-
/**
|
23
|
-
* Tab panel component. Used with tabs component
|
24
|
-
* @category Common UI components
|
25
|
-
*/
|
26
|
-
export const TabPanel = (props: TabPanelProps) => {
|
27
|
-
const { children, value, index, ...other } = props;
|
28
|
-
|
29
|
-
return (
|
30
|
-
<div
|
31
|
-
role="tabpanel"
|
32
|
-
hidden={value !== index}
|
33
|
-
id={`simple-tabpanel-${index}`}
|
34
|
-
aria-labelledby={`simple-tab-${index}`}
|
35
|
-
{...other}
|
36
|
-
>
|
37
|
-
{value === index ? children : null}
|
38
|
-
</div>
|
39
|
-
);
|
40
|
-
};
|
41
|
-
|
42
|
-
export default TabPanel;
|
package/src/theme/baseTheme.ts
DELETED
@@ -1,128 +0,0 @@
|
|
1
|
-
import { createTheme } from '@mui/material/styles';
|
2
|
-
import Euclid from '../assets/fonts/Euclid/EuclidCircularB-Regular.woff2';
|
3
|
-
import EuclidItalic from '../assets/fonts/Euclid/EuclidCircularB-RegularItalic.woff2';
|
4
|
-
import EuclidBold from '../assets/fonts/Euclid/EuclidCircularB-Bold.woff2';
|
5
|
-
import EuclidBoldItalic from '../assets/fonts/Euclid/EuclidCircularB-BoldItalic.woff2';
|
6
|
-
import EuclidLight from '../assets/fonts/Euclid/EuclidCircularB-Light.woff2';
|
7
|
-
import EuclidLightItalic from '../assets/fonts/Euclid/EuclidCircularB-LightItalic.woff2';
|
8
|
-
import EuclidMedium from '../assets/fonts/Euclid/EuclidCircularB-Medium.woff2';
|
9
|
-
import EuclidMediumItalic from '../assets/fonts/Euclid/EuclidCircularB-MediumItalic.woff2';
|
10
|
-
import EuclidSemiBold from '../assets/fonts/Euclid/EuclidCircularB-Semibold.woff2';
|
11
|
-
import EuclidSemiBoldItalic from '../assets/fonts/Euclid/EuclidCircularB-SemiboldItalic.woff2';
|
12
|
-
|
13
|
-
const baseThemeOptions = {
|
14
|
-
spacing: 4,
|
15
|
-
palette: {
|
16
|
-
primary: {
|
17
|
-
main: '#E0613A',
|
18
|
-
dark: '#d9512e',
|
19
|
-
light: '#E0613A',
|
20
|
-
},
|
21
|
-
secondary: {
|
22
|
-
main: '#007994',
|
23
|
-
dark: '#262842',
|
24
|
-
light: '#cbe8ee',
|
25
|
-
},
|
26
|
-
text: {
|
27
|
-
disabled: '#A9A9B8'
|
28
|
-
|
29
|
-
},
|
30
|
-
success: {
|
31
|
-
main: '#2DB77B',
|
32
|
-
light: '#DBFCEE',
|
33
|
-
},
|
34
|
-
grey: {
|
35
|
-
700: '#101F2B'
|
36
|
-
}
|
37
|
-
|
38
|
-
},
|
39
|
-
typography: {
|
40
|
-
fontFamily: 'Euclid,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"',
|
41
|
-
fontSize: 14,
|
42
|
-
h1: {
|
43
|
-
fontWeight: 400,
|
44
|
-
},
|
45
|
-
h3: {
|
46
|
-
fontWeight: 500,
|
47
|
-
},
|
48
|
-
h4: {
|
49
|
-
fontWeight: 500,
|
50
|
-
}
|
51
|
-
},
|
52
|
-
components: {
|
53
|
-
MuiCssBaseline: {
|
54
|
-
styleOverrides: `
|
55
|
-
@font-face {
|
56
|
-
font-family: 'Euclid';
|
57
|
-
font-display: swap;
|
58
|
-
src: url(${EuclidLight}) format('woff2');
|
59
|
-
font-weight: 300;
|
60
|
-
}
|
61
|
-
@font-face {
|
62
|
-
font-family: 'Euclid';
|
63
|
-
font-display: swap;
|
64
|
-
src: url(${EuclidLightItalic}) format('woff2');
|
65
|
-
font-weight: 300;
|
66
|
-
font-style: italic;
|
67
|
-
}
|
68
|
-
@font-face {
|
69
|
-
font-family: 'Euclid';
|
70
|
-
font-display: swap;
|
71
|
-
src: url(${Euclid}) format('woff2');
|
72
|
-
font-weight: 400;
|
73
|
-
}
|
74
|
-
@font-face {
|
75
|
-
font-family: 'Euclid';
|
76
|
-
font-display: swap;
|
77
|
-
src: url(${EuclidItalic}) format('woff2');
|
78
|
-
font-weight: 400;
|
79
|
-
font-style: italic;
|
80
|
-
}
|
81
|
-
@font-face {
|
82
|
-
font-family: 'Euclid';
|
83
|
-
font-display: swap;
|
84
|
-
src: url(${EuclidMedium}) format('woff2');
|
85
|
-
font-weight: 500;
|
86
|
-
}
|
87
|
-
|
88
|
-
@font-face {
|
89
|
-
font-family: 'Euclid';
|
90
|
-
font-display: swap;
|
91
|
-
src: url(${EuclidMediumItalic}) format('woff2');
|
92
|
-
font-style: italic;
|
93
|
-
font-weight: 500;
|
94
|
-
}
|
95
|
-
@font-face {
|
96
|
-
font-family: 'Euclid';
|
97
|
-
font-display: swap;
|
98
|
-
src: url(${EuclidSemiBold}) format('woff2');
|
99
|
-
font-weight: 600;
|
100
|
-
}
|
101
|
-
@font-face {
|
102
|
-
font-family: 'Euclid';
|
103
|
-
font-display: swap;
|
104
|
-
src: url(${EuclidSemiBoldItalic}) format('woff2');
|
105
|
-
font-style: italic;
|
106
|
-
font-weight: 600;
|
107
|
-
}
|
108
|
-
@font-face {
|
109
|
-
font-family: 'Euclid';
|
110
|
-
font-display: swap;
|
111
|
-
src: url(${EuclidBold}) format('woff2');
|
112
|
-
font-weight: 700;
|
113
|
-
}
|
114
|
-
|
115
|
-
@font-face {
|
116
|
-
font-family: 'Euclid';
|
117
|
-
font-display: swap;
|
118
|
-
src: url(${EuclidBoldItalic}) format('woff2');
|
119
|
-
font-style: italic;
|
120
|
-
font-weight: 700;
|
121
|
-
}
|
122
|
-
|
123
|
-
`
|
124
|
-
}
|
125
|
-
}
|
126
|
-
};
|
127
|
-
|
128
|
-
export default createTheme(baseThemeOptions);
|
package/src/theme/fonts.d.ts
DELETED
package/src/theme/index.ts
DELETED
@@ -1,126 +0,0 @@
|
|
1
|
-
import { createTheme, responsiveFontSizes } from '@mui/material/styles';
|
2
|
-
import baseTheme from './baseTheme';
|
3
|
-
import inputThemeOptions from './inputThemeOptions';
|
4
|
-
import tableThemeOptions from './tableThemeOptions';
|
5
|
-
import stepperThemeOptions from './stepperThemeOptions';
|
6
|
-
import typographyThemeOptions from './typographyThemeOptions';
|
7
|
-
|
8
|
-
export const theme = responsiveFontSizes(
|
9
|
-
createTheme(baseTheme, {
|
10
|
-
components: {
|
11
|
-
...inputThemeOptions.components,
|
12
|
-
...tableThemeOptions.components,
|
13
|
-
...stepperThemeOptions.components,
|
14
|
-
...typographyThemeOptions.components,
|
15
|
-
MuiToolbar: {
|
16
|
-
styleOverrides: {
|
17
|
-
root: {
|
18
|
-
[baseTheme.breakpoints.up('sm')]: {
|
19
|
-
minHeight: '56px',
|
20
|
-
},
|
21
|
-
},
|
22
|
-
},
|
23
|
-
},
|
24
|
-
// MuiBackdrop: {
|
25
|
-
// styleOverrides: {
|
26
|
-
// root: {
|
27
|
-
// backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
28
|
-
// },
|
29
|
-
// },
|
30
|
-
// },
|
31
|
-
MuiAppBar: {
|
32
|
-
styleOverrides: {
|
33
|
-
root: {
|
34
|
-
boxShadow: 'none',
|
35
|
-
backgroundColor: '#007F9B',
|
36
|
-
},
|
37
|
-
},
|
38
|
-
},
|
39
|
-
MuiButton: {
|
40
|
-
styleOverrides: {
|
41
|
-
root: {
|
42
|
-
borderRadius: baseTheme.spacing(2.5),
|
43
|
-
padding: baseTheme.spacing(2.5, 4),
|
44
|
-
lineHeight: '20px',
|
45
|
-
fontSize: '1rem',
|
46
|
-
textTransform: 'none'
|
47
|
-
},
|
48
|
-
outlined: {
|
49
|
-
color: '#262842',
|
50
|
-
backgroundColor: '#FFFFFF !important',
|
51
|
-
border: '1px solid rgba(38, 40, 66, 0.12)',
|
52
|
-
},
|
53
|
-
text: {
|
54
|
-
color: baseTheme.palette.secondary.dark
|
55
|
-
}
|
56
|
-
},
|
57
|
-
},
|
58
|
-
MuiDialog: {
|
59
|
-
styleOverrides: {
|
60
|
-
root: {
|
61
|
-
'& .MuiModal-backdrop': {
|
62
|
-
background: 'rgba(28, 55, 77, 0.5)',
|
63
|
-
backdropFilter: 'blur(2px)',
|
64
|
-
},
|
65
|
-
},
|
66
|
-
paper: {
|
67
|
-
borderRadius: baseTheme.spacing(3)
|
68
|
-
},
|
69
|
-
paperWidthXs: {
|
70
|
-
maxWidth: 500
|
71
|
-
}
|
72
|
-
},
|
73
|
-
},
|
74
|
-
// MuiPaper: {
|
75
|
-
// styleOverrides: {
|
76
|
-
// root: {
|
77
|
-
// borderRadius: baseTheme.spacing(3),
|
78
|
-
// },
|
79
|
-
// },
|
80
|
-
// },
|
81
|
-
MuiDialogContent: {
|
82
|
-
styleOverrides: {
|
83
|
-
root: {
|
84
|
-
color: '#6D6E85',
|
85
|
-
},
|
86
|
-
},
|
87
|
-
},
|
88
|
-
MuiDialogActions: {
|
89
|
-
styleOverrides: {
|
90
|
-
root: {
|
91
|
-
background: '#F7F8FC',
|
92
|
-
borderTop: '1px solid rgba(38, 40, 66, 0.08)',
|
93
|
-
padding: baseTheme.spacing(3, 6)
|
94
|
-
},
|
95
|
-
},
|
96
|
-
},
|
97
|
-
MuiTabs: {
|
98
|
-
styleOverrides: {
|
99
|
-
root: {
|
100
|
-
minHeight: '38px',
|
101
|
-
},
|
102
|
-
indicator: {
|
103
|
-
backgroundColor: baseTheme.palette.secondary.main
|
104
|
-
}
|
105
|
-
}
|
106
|
-
},
|
107
|
-
MuiTab: {
|
108
|
-
styleOverrides: {
|
109
|
-
root: {
|
110
|
-
fontSize: 14,
|
111
|
-
fontWeight: 500,
|
112
|
-
textTransform: 'none',
|
113
|
-
padding: '10px 12px',
|
114
|
-
lineHeight: '1.125rem',
|
115
|
-
minHeight: '38px',
|
116
|
-
color: '#8B8C9E',
|
117
|
-
'&.Mui-selected': {
|
118
|
-
color: baseTheme.palette.secondary.main
|
119
|
-
}
|
120
|
-
}
|
121
|
-
}
|
122
|
-
}
|
123
|
-
},
|
124
|
-
})
|
125
|
-
);
|
126
|
-
|
@@ -1,126 +0,0 @@
|
|
1
|
-
import baseTheme from './baseTheme';
|
2
|
-
|
3
|
-
const inputThemeOptions = {
|
4
|
-
components: {
|
5
|
-
MuiButton: {
|
6
|
-
styleOverrides: {
|
7
|
-
root: {
|
8
|
-
lineHeight: 1.429,
|
9
|
-
},
|
10
|
-
},
|
11
|
-
},
|
12
|
-
MuiInputBase: {
|
13
|
-
styleOverrides: {
|
14
|
-
root: {
|
15
|
-
borderRadius: baseTheme.spacing(3),
|
16
|
-
minWidth: baseTheme.spacing(25),
|
17
|
-
background: baseTheme.palette.background.default
|
18
|
-
// height: 40
|
19
|
-
},
|
20
|
-
// sizeSmall: {
|
21
|
-
// padding: baseTheme.spacing(1, 0, 1, 4),
|
22
|
-
// },
|
23
|
-
input: {
|
24
|
-
minWidth: baseTheme.spacing(25),
|
25
|
-
// padding: 0,
|
26
|
-
// height: '32px',
|
27
|
-
},
|
28
|
-
},
|
29
|
-
},
|
30
|
-
MuiSelect: {
|
31
|
-
styleOverrides: {
|
32
|
-
nativeInput: {
|
33
|
-
padding: 0,
|
34
|
-
height: '32px',
|
35
|
-
},
|
36
|
-
},
|
37
|
-
},
|
38
|
-
MuiTextField: {
|
39
|
-
styleOverrides: {
|
40
|
-
root: {
|
41
|
-
minWidth: baseTheme.spacing(25),
|
42
|
-
},
|
43
|
-
},
|
44
|
-
},
|
45
|
-
MuiInputLabel: {
|
46
|
-
styleOverrides: {
|
47
|
-
root: {
|
48
|
-
position: 'relative',
|
49
|
-
overflow: 'initial',
|
50
|
-
transform: 'none',
|
51
|
-
marginBottom: baseTheme.spacing(1),
|
52
|
-
fontWeight: 500,
|
53
|
-
fontSize: '14px',
|
54
|
-
lineHeight: '20px',
|
55
|
-
},
|
56
|
-
},
|
57
|
-
},
|
58
|
-
MuiOutlinedInput: {
|
59
|
-
styleOverrides: {
|
60
|
-
root: {
|
61
|
-
borderRadius: baseTheme.spacing(3),
|
62
|
-
minWidth: baseTheme.spacing(25),
|
63
|
-
},
|
64
|
-
notchedOutline: {
|
65
|
-
top: 0,
|
66
|
-
'& legend': {
|
67
|
-
display: 'none',
|
68
|
-
transition: 'none',
|
69
|
-
},
|
70
|
-
},
|
71
|
-
},
|
72
|
-
},
|
73
|
-
MuiAutocomplete: {
|
74
|
-
styleOverrides: {
|
75
|
-
paper: {
|
76
|
-
marginTop: 8,
|
77
|
-
borderRadius: 12,
|
78
|
-
boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.04)',
|
79
|
-
},
|
80
|
-
listbox: {
|
81
|
-
'::-webkit-scrollbar': {
|
82
|
-
width: '6px',
|
83
|
-
backgroundColor: 'white',
|
84
|
-
},
|
85
|
-
'::-webkit-scrollbar-thumb': {
|
86
|
-
borderRadius: '10px',
|
87
|
-
backgroundColor: 'rgba(38, 40, 66, 0.24)',
|
88
|
-
},
|
89
|
-
},
|
90
|
-
},
|
91
|
-
},
|
92
|
-
MuiMenu: {
|
93
|
-
styleOverrides: {
|
94
|
-
list: {
|
95
|
-
paddingTop: 0,
|
96
|
-
paddingBottom: 0,
|
97
|
-
background: 'white',
|
98
|
-
'& li.Mui-selected': {
|
99
|
-
background: 'rgba(38, 40, 66, 0.08) !important',
|
100
|
-
},
|
101
|
-
},
|
102
|
-
},
|
103
|
-
},
|
104
|
-
MuiPopover: {
|
105
|
-
styleOverrides: {
|
106
|
-
paper: {
|
107
|
-
marginTop: 8,
|
108
|
-
borderRadius: 12,
|
109
|
-
boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.04)',
|
110
|
-
},
|
111
|
-
},
|
112
|
-
},
|
113
|
-
MuiFormLabel: {
|
114
|
-
styleOverrides: {
|
115
|
-
asterisk: {
|
116
|
-
color: '#D6331F',
|
117
|
-
'&$error': {
|
118
|
-
color: '#D6331F',
|
119
|
-
},
|
120
|
-
},
|
121
|
-
},
|
122
|
-
},
|
123
|
-
},
|
124
|
-
};
|
125
|
-
|
126
|
-
export default inputThemeOptions;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import baseTheme from './baseTheme';
|
2
|
-
|
3
|
-
const stepperThemeOptions = {
|
4
|
-
components: {
|
5
|
-
MuiStepIcon: {
|
6
|
-
styleOverrides: {
|
7
|
-
root: {
|
8
|
-
fontSize: '20px',
|
9
|
-
color: baseTheme.palette.text.disabled,
|
10
|
-
'&.Mui-active, &.Mui-completed': {
|
11
|
-
color: baseTheme.palette.secondary.main
|
12
|
-
}
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
}
|
17
|
-
}
|
18
|
-
}
|
19
|
-
|
20
|
-
export default stepperThemeOptions;
|
@@ -1,50 +0,0 @@
|
|
1
|
-
import baseTheme from './baseTheme';
|
2
|
-
|
3
|
-
const tableThemeOptions = {
|
4
|
-
components: {
|
5
|
-
MuiTableContainer: {
|
6
|
-
styleOverrides: {
|
7
|
-
root: {
|
8
|
-
borderRadius: baseTheme.spacing(3),
|
9
|
-
border: '1px solid rgba(38, 40, 66, 0.08)',
|
10
|
-
},
|
11
|
-
},
|
12
|
-
},
|
13
|
-
MuiTableHead: {
|
14
|
-
styleOverrides: {
|
15
|
-
root: {
|
16
|
-
backgroundColor: '#F7F8FC',
|
17
|
-
},
|
18
|
-
},
|
19
|
-
},
|
20
|
-
MuiTableCell: {
|
21
|
-
styleOverrides: {
|
22
|
-
root: {
|
23
|
-
minHeight: 48,
|
24
|
-
padding: baseTheme.spacing(1, 2),
|
25
|
-
'&:first-of-type': {
|
26
|
-
paddingLeft: baseTheme.spacing(4),
|
27
|
-
}
|
28
|
-
},
|
29
|
-
head: {
|
30
|
-
maxHeight: '40px',
|
31
|
-
padding: baseTheme.spacing(2.75, 2),
|
32
|
-
color: '#6D6E85'
|
33
|
-
},
|
34
|
-
body: {
|
35
|
-
wordBreak: 'break-all'
|
36
|
-
},
|
37
|
-
},
|
38
|
-
},
|
39
|
-
MuiTableSortLabel: {
|
40
|
-
styleOverrides: {
|
41
|
-
root: {
|
42
|
-
maxHeight: '24px',
|
43
|
-
lineHeight: 1,
|
44
|
-
},
|
45
|
-
},
|
46
|
-
},
|
47
|
-
},
|
48
|
-
};
|
49
|
-
|
50
|
-
export default tableThemeOptions;
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import baseTheme from './baseTheme';
|
2
|
-
|
3
|
-
const typographyThemeOptions = {
|
4
|
-
components: {
|
5
|
-
MuiTypography: {
|
6
|
-
styleOverrides: {
|
7
|
-
h1: {
|
8
|
-
[baseTheme.breakpoints.up('lg')]: {
|
9
|
-
fontSize: '1.5rem'
|
10
|
-
}
|
11
|
-
},
|
12
|
-
h3: {
|
13
|
-
fontSize: '1.25rem',
|
14
|
-
[baseTheme.breakpoints.up('lg')]: {
|
15
|
-
fontSize: '1.125rem'
|
16
|
-
}
|
17
|
-
},
|
18
|
-
h4: {
|
19
|
-
fontSize: '1rem',
|
20
|
-
[baseTheme.breakpoints.up('lg')]: {
|
21
|
-
fontSize: '1rem'
|
22
|
-
}
|
23
|
-
},
|
24
|
-
subtitle2: {
|
25
|
-
color: '#6D6E85'
|
26
|
-
}
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
export default typographyThemeOptions;
|