@dartech/arsenal-ui 1.2.3 → 1.2.5
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/.babelrc +13 -0
- package/.eslintrc.json +22 -0
- package/{index.d.ts → index.ts} +5 -5
- package/jest.config.ts +11 -0
- package/package.json +3 -12
- package/project.json +94 -0
- package/rollup.config.js +146 -0
- package/src/assets/chevron_left_gray.svg +3 -0
- package/src/consts/index.ts +13 -0
- package/src/interfaces/common.ts +18 -0
- package/src/interfaces/definition.ts +143 -0
- package/src/interfaces/{index.d.ts → index.ts} +3 -3
- package/src/interfaces/ui.ts +80 -0
- package/src/lib/Alert/Alert.tsx +108 -0
- package/src/lib/Alert/index.ts +1 -0
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.tsx +16 -0
- package/src/lib/Breadcrumbs/Breadcrumbs.tsx +40 -0
- package/src/lib/Breadcrumbs/{index.d.ts → index.ts} +1 -1
- package/src/lib/ContentLayout/ContentLayout.tsx +31 -0
- package/src/lib/ContentLayout/index.ts +1 -0
- package/src/lib/Definition/CreateDefinition/CreateDefinition.tsx +78 -0
- package/src/lib/Definition/CreateDefinition/{index.d.ts → index.ts} +1 -1
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.tsx +71 -0
- package/src/lib/Definition/DefinitionFiller/{index.d.ts → index.ts} +1 -1
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.tsx +54 -0
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.tsx +67 -0
- package/src/lib/Definition/DefinitionValueView/{index.d.ts → index.ts} +1 -1
- package/src/lib/Definition/{index.d.ts → index.ts} +3 -3
- package/src/lib/Forms/BackButton.tsx +46 -0
- package/src/lib/Forms/ControlAceEditor.tsx +125 -0
- package/src/lib/Forms/ControlAutocomplete.tsx +145 -0
- package/src/lib/Forms/ControlCheckbox.tsx +113 -0
- package/src/lib/Forms/ControlDate.tsx +75 -0
- package/src/lib/Forms/ControlDateTime.tsx +77 -0
- package/src/lib/Forms/ControlDebouncedInput.tsx +80 -0
- package/src/lib/Forms/ControlInput.tsx +111 -0
- package/src/lib/Forms/ControlNumberInput.tsx +121 -0
- package/src/lib/Forms/ControlQueryAutocomplete.tsx +197 -0
- package/src/lib/Forms/ControlRadio.tsx +136 -0
- package/src/lib/Forms/ControlSelect.tsx +164 -0
- package/src/lib/Forms/ControlSwitch.tsx +71 -0
- package/src/lib/Forms/ControlTime.tsx +93 -0
- package/src/lib/Forms/CopyButton.tsx +46 -0
- package/src/lib/Forms/{index.d.ts → index.ts} +15 -15
- package/src/lib/Forms/useAutocomplete.tsx +47 -0
- package/src/lib/InfoItem/InfoItem.tsx +40 -0
- package/src/lib/InfoItem/{index.d.ts → index.ts} +1 -1
- package/src/lib/InfoItem/styles.ts +17 -0
- package/src/lib/JsonPathPicker/JsonPathPicker.tsx +73 -0
- package/src/lib/JsonPathPicker/PropertyStep.tsx +70 -0
- package/src/lib/JsonPathPicker/{index.d.ts → index.ts} +1 -1
- package/src/lib/JsonView/JsonView.tsx +41 -0
- package/src/lib/JsonView/{index.d.ts → index.ts} +1 -1
- package/src/lib/Loader/Loader.tsx +41 -0
- package/src/lib/Loader/{index.d.ts → index.ts} +1 -1
- package/src/lib/Modals/JsonModalView.tsx +53 -0
- package/src/lib/Modals/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/PropertyFiller/JsonEditor.tsx +58 -0
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.tsx +129 -0
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.tsx +85 -0
- package/src/lib/Property/PropertyFiller/PropertyFiller.tsx +199 -0
- package/src/lib/Property/PropertyFiller/{index.d.ts → index.ts} +2 -2
- package/src/lib/Property/PropertyFiller/usePropertyFiller.ts +72 -0
- package/src/lib/Property/PropertyFiller/useStyles.ts +12 -0
- package/src/lib/Property/PropertyValidator/NodeValidator.tsx +92 -0
- package/src/lib/Property/PropertyValidator/NodesList.tsx +26 -0
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.tsx +59 -0
- package/src/lib/Property/PropertyValidator/PropertyValidator.tsx +42 -0
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.tsx +4 -0
- package/src/lib/Property/PropertyValidator/StringTypeValidator.tsx +36 -0
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.tsx +62 -0
- package/src/lib/Property/PropertyValidator/index.ts +1 -0
- package/src/lib/Property/PropertyValueField/BooleanValueField.tsx +49 -0
- package/src/lib/Property/PropertyValueField/DateTimeValueField.tsx +58 -0
- package/src/lib/Property/PropertyValueField/DateValueField.tsx +58 -0
- package/src/lib/Property/PropertyValueField/JsonValueField.tsx +65 -0
- package/src/lib/Property/PropertyValueField/PropertyValueField.tsx +49 -0
- package/src/lib/Property/PropertyValueField/StringValueField.tsx +50 -0
- package/src/lib/Property/PropertyValueField/TimeValueField.tsx +67 -0
- package/src/lib/Property/PropertyValueField/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/PropertyWidget/PropertyWidget.tsx +115 -0
- package/src/lib/Property/PropertyWidget/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/UpsertProperty/CreatePropertiesList.tsx +148 -0
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.tsx +158 -0
- package/src/lib/Property/UpsertProperty/CustomPropertyField.tsx +40 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.tsx +41 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.tsx +27 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.tsx +133 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.tsx +46 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.tsx +52 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.tsx +103 -0
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/UpsertProperty/{index.d.ts → index.ts} +2 -2
- package/src/lib/Property/UpsertProperty/useCustomFields.ts +22 -0
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.tsx +37 -0
- package/src/lib/Property/ViewPropertiesList/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.tsx +40 -0
- package/src/lib/Property/ViewProperty/EntityPropertiesView.tsx +48 -0
- package/src/lib/Property/ViewProperty/PropertyDataTable.tsx +148 -0
- package/src/lib/Property/ViewProperty/PropertyItem.tsx +43 -0
- package/src/lib/Property/ViewProperty/ViewProperty.tsx +52 -0
- package/src/lib/Property/ViewProperty/{index.d.ts → index.ts} +1 -1
- package/src/lib/Property/{index.d.ts → index.ts} +5 -5
- package/src/lib/Sidebar/Sidebar.styled.tsx +157 -0
- package/src/lib/Sidebar/Sidebar.tsx +27 -0
- package/src/lib/Sidebar/SidebarContext.tsx +37 -0
- package/src/lib/Sidebar/SidebarDrawer.tsx +50 -0
- package/src/lib/Sidebar/SidebarLink/MenuIcon.tsx +16 -0
- package/src/lib/Sidebar/SidebarLink/SidebarLink.tsx +54 -0
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.tsx +54 -0
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.tsx +62 -0
- package/src/lib/Sidebar/SidebarLink/{index.d.ts → index.ts} +2 -2
- package/src/lib/Sidebar/index.ts +2 -0
- package/src/lib/Status/Status.tsx +16 -0
- package/src/lib/Status/{index.d.ts → index.ts} +1 -1
- package/src/lib/Status/styles.ts +21 -0
- package/src/lib/StepperView/StepperView.tsx +73 -0
- package/src/lib/StepperView/{index.d.ts → index.ts} +1 -1
- package/src/lib/Table/DataGrid/JsonTypeCell.tsx +51 -0
- package/src/lib/Table/DataGrid/Table.tsx +117 -0
- package/src/lib/Table/DataGrid/TableAction.tsx +43 -0
- package/src/lib/Table/DataGrid/TableColumnMenu.tsx +12 -0
- package/src/lib/Table/DataGrid/TablePagination.tsx +42 -0
- package/src/lib/Table/DataGrid/index.ts +2 -0
- package/src/lib/Table/DataGrid/styles.ts +59 -0
- package/src/lib/Table/DataGrid/usePagination.ts +15 -0
- package/src/lib/Table/DataGrid/useTableQueryPagination.ts +47 -0
- package/src/lib/Table/DataGrid/useTableQuerySorting.ts +47 -0
- package/src/lib/Table/SimpleTable/SimpleTable.tsx +138 -0
- package/src/lib/Table/SimpleTable/TableActionCell.tsx +67 -0
- package/src/lib/Table/SimpleTable/index.ts +2 -0
- package/src/lib/Table/SimpleTable/useTablePagination.ts +54 -0
- package/src/lib/Table/SimpleTable/useTableSorting.ts +50 -0
- package/src/lib/Table/index.ts +2 -0
- package/src/lib/Tabs/RouteTabs.tsx +54 -0
- package/src/lib/Tabs/TabPanel.tsx +42 -0
- package/src/lib/Tabs/{index.d.ts → index.ts} +2 -2
- package/src/lib/{index.d.ts → index.ts} +16 -16
- package/src/theme/baseTheme.ts +128 -0
- package/src/theme/fonts.d.ts +2 -0
- package/src/theme/index.ts +126 -0
- package/src/theme/inputThemeOptions.ts +126 -0
- package/src/theme/stepperThemeOptions.ts +20 -0
- package/src/theme/tableThemeOptions.ts +50 -0
- package/src/theme/typographyThemeOptions.ts +32 -0
- package/src/utils/common.ts +73 -0
- package/src/utils/dem.ts +431 -0
- package/src/utils/hooks.ts +41 -0
- package/src/utils/{index.d.ts → index.ts} +5 -5
- package/src/utils/ui-utils.tsx +102 -0
- package/src/utils/validators.ts +14 -0
- package/tsconfig.json +25 -0
- package/tsconfig.lib.json +23 -0
- package/tsconfig.spec.json +20 -0
- package/index.js +0 -1
- package/src/consts/index.d.ts +0 -12
- package/src/interfaces/common.d.ts +0 -17
- package/src/interfaces/definition.d.ts +0 -107
- package/src/interfaces/ui.d.ts +0 -70
- package/src/lib/Alert/Alert.d.ts +0 -53
- package/src/lib/Alert/index.d.ts +0 -1
- package/src/lib/Breadcrumbs/Breadcrumbs.d.ts +0 -9
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.d.ts +0 -2
- package/src/lib/ContentLayout/ContentLayout.d.ts +0 -9
- package/src/lib/ContentLayout/index.d.ts +0 -1
- package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +0 -11
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +0 -10
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.d.ts +0 -8
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.d.ts +0 -9
- package/src/lib/Forms/BackButton.d.ts +0 -7
- package/src/lib/Forms/ControlAceEditor.d.ts +0 -24
- package/src/lib/Forms/ControlAutocomplete.d.ts +0 -69
- package/src/lib/Forms/ControlCheckbox.d.ts +0 -51
- package/src/lib/Forms/ControlDate.d.ts +0 -18
- package/src/lib/Forms/ControlDateTime.d.ts +0 -18
- package/src/lib/Forms/ControlDebouncedInput.d.ts +0 -4
- package/src/lib/Forms/ControlInput.d.ts +0 -59
- package/src/lib/Forms/ControlNumberInput.d.ts +0 -51
- package/src/lib/Forms/ControlQueryAutocomplete.d.ts +0 -16
- package/src/lib/Forms/ControlRadio.d.ts +0 -66
- package/src/lib/Forms/ControlSelect.d.ts +0 -67
- package/src/lib/Forms/ControlSwitch.d.ts +0 -19
- package/src/lib/Forms/ControlTime.d.ts +0 -18
- package/src/lib/Forms/CopyButton.d.ts +0 -20
- package/src/lib/Forms/useAutocomplete.d.ts +0 -10
- package/src/lib/InfoItem/InfoItem.d.ts +0 -10
- package/src/lib/InfoItem/styles.d.ts +0 -12
- package/src/lib/JsonPathPicker/JsonPathPicker.d.ts +0 -10
- package/src/lib/JsonPathPicker/PropertyStep.d.ts +0 -11
- package/src/lib/JsonView/JsonView.d.ts +0 -7
- package/src/lib/Loader/Loader.d.ts +0 -21
- package/src/lib/Modals/JsonModalView.d.ts +0 -10
- package/src/lib/Property/PropertyFiller/JsonEditor.d.ts +0 -10
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.d.ts +0 -12
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.d.ts +0 -11
- package/src/lib/Property/PropertyFiller/PropertyFiller.d.ts +0 -12
- package/src/lib/Property/PropertyFiller/usePropertyFiller.d.ts +0 -24
- package/src/lib/Property/PropertyFiller/useStyles.d.ts +0 -12
- package/src/lib/Property/PropertyValidator/NodeValidator.d.ts +0 -6
- package/src/lib/Property/PropertyValidator/NodesList.d.ts +0 -6
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.d.ts +0 -8
- package/src/lib/Property/PropertyValidator/PropertyValidator.d.ts +0 -6
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.d.ts +0 -3
- package/src/lib/Property/PropertyValidator/StringTypeValidator.d.ts +0 -8
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.d.ts +0 -7
- package/src/lib/Property/PropertyValidator/index.d.ts +0 -1
- package/src/lib/Property/PropertyValueField/BooleanValueField.d.ts +0 -7
- package/src/lib/Property/PropertyValueField/DateTimeValueField.d.ts +0 -9
- package/src/lib/Property/PropertyValueField/DateValueField.d.ts +0 -9
- package/src/lib/Property/PropertyValueField/JsonValueField.d.ts +0 -10
- package/src/lib/Property/PropertyValueField/PropertyValueField.d.ts +0 -9
- package/src/lib/Property/PropertyValueField/StringValueField.d.ts +0 -9
- package/src/lib/Property/PropertyValueField/TimeValueField.d.ts +0 -9
- package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +0 -13
- package/src/lib/Property/UpsertProperty/CreatePropertiesList.d.ts +0 -13
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +0 -10
- package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +0 -7
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +0 -6
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +0 -7
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +0 -8
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +0 -6
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +0 -10
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +0 -6
- package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +0 -6
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +0 -8
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.d.ts +0 -7
- package/src/lib/Property/ViewProperty/EntityPropertiesView.d.ts +0 -8
- package/src/lib/Property/ViewProperty/PropertyDataTable.d.ts +0 -7
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +0 -9
- package/src/lib/Property/ViewProperty/ViewProperty.d.ts +0 -9
- package/src/lib/Sidebar/Sidebar.d.ts +0 -10
- package/src/lib/Sidebar/Sidebar.styled.d.ts +0 -117
- package/src/lib/Sidebar/SidebarContext.d.ts +0 -11
- package/src/lib/Sidebar/SidebarDrawer.d.ts +0 -9
- package/src/lib/Sidebar/SidebarLink/MenuIcon.d.ts +0 -7
- package/src/lib/Sidebar/SidebarLink/SidebarLink.d.ts +0 -7
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.d.ts +0 -8
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.d.ts +0 -10
- package/src/lib/Sidebar/index.d.ts +0 -2
- package/src/lib/Status/Status.d.ts +0 -8
- package/src/lib/Status/styles.d.ts +0 -12
- package/src/lib/StepperView/StepperView.d.ts +0 -11
- package/src/lib/Table/DataGrid/JsonTypeCell.d.ts +0 -7
- package/src/lib/Table/DataGrid/Table.d.ts +0 -49
- package/src/lib/Table/DataGrid/TableAction.d.ts +0 -13
- package/src/lib/Table/DataGrid/TableColumnMenu.d.ts +0 -3
- package/src/lib/Table/DataGrid/TablePagination.d.ts +0 -3
- package/src/lib/Table/DataGrid/index.d.ts +0 -2
- package/src/lib/Table/DataGrid/styles.d.ts +0 -12
- package/src/lib/Table/DataGrid/usePagination.d.ts +0 -5
- package/src/lib/Table/DataGrid/useTableQueryPagination.d.ts +0 -11
- package/src/lib/Table/DataGrid/useTableQuerySorting.d.ts +0 -6
- package/src/lib/Table/SimpleTable/SimpleTable.d.ts +0 -17
- package/src/lib/Table/SimpleTable/TableActionCell.d.ts +0 -10
- package/src/lib/Table/SimpleTable/index.d.ts +0 -2
- package/src/lib/Table/SimpleTable/useTablePagination.d.ts +0 -7
- package/src/lib/Table/SimpleTable/useTableSorting.d.ts +0 -6
- package/src/lib/Table/index.d.ts +0 -2
- package/src/lib/Tabs/RouteTabs.d.ts +0 -11
- package/src/lib/Tabs/TabPanel.d.ts +0 -25
- package/src/theme/baseTheme.d.ts +0 -2
- package/src/theme/index.d.ts +0 -1
- package/src/theme/inputThemeOptions.d.ts +0 -117
- package/src/theme/stepperThemeOptions.d.ts +0 -16
- package/src/theme/tableThemeOptions.d.ts +0 -47
- package/src/theme/typographyThemeOptions.d.ts +0 -29
- package/src/utils/common.d.ts +0 -7
- package/src/utils/dem.d.ts +0 -27
- package/src/utils/hooks.d.ts +0 -7
- package/src/utils/ui-utils.d.ts +0 -8
- package/src/utils/validators.d.ts +0 -5
@@ -0,0 +1,128 @@
|
|
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);
|
@@ -0,0 +1,126 @@
|
|
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
|
+
|
@@ -0,0 +1,126 @@
|
|
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;
|
@@ -0,0 +1,20 @@
|
|
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;
|
@@ -0,0 +1,50 @@
|
|
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;
|
@@ -0,0 +1,32 @@
|
|
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;
|
@@ -0,0 +1,73 @@
|
|
1
|
+
export const removeArrayItem = (arr: Array<unknown>, index: number) => {
|
2
|
+
const newArr = [...arr];
|
3
|
+
newArr.splice(index, 1);
|
4
|
+
return newArr;
|
5
|
+
};
|
6
|
+
|
7
|
+
export const validateJson = (value: string): boolean => {
|
8
|
+
try {
|
9
|
+
JSON.parse(value);
|
10
|
+
} catch (error) {
|
11
|
+
return false;
|
12
|
+
}
|
13
|
+
return true;
|
14
|
+
};
|
15
|
+
|
16
|
+
export function capitalize(str: string): string {
|
17
|
+
return str.replace(/(^\w)|([-\s]\w)/g, (c) => c.toUpperCase());
|
18
|
+
}
|
19
|
+
|
20
|
+
export const sortArrayOfObjects = (a: Record<string, unknown>, b: Record<string, unknown>, key: string, order = 'asc') => {
|
21
|
+
const valueA = a[key];
|
22
|
+
const valueB = b[key];
|
23
|
+
|
24
|
+
if (valueA < valueB) return order === 'asc' ? -1 : 1;
|
25
|
+
if (valueA > valueB) return order === 'asc' ? 1 : -1;
|
26
|
+
return 0;
|
27
|
+
};
|
28
|
+
|
29
|
+
export const getJsonStringValue = (value: unknown): string => {
|
30
|
+
if (!value) return '';
|
31
|
+
if (typeof value === 'string') {
|
32
|
+
try {
|
33
|
+
return JSON.stringify(JSON.parse(value), null, 2)
|
34
|
+
} catch (error) {
|
35
|
+
return value;
|
36
|
+
}
|
37
|
+
} else {
|
38
|
+
try {
|
39
|
+
return JSON.stringify(value, null, 2);
|
40
|
+
} catch (error) {
|
41
|
+
return 'Failed to stringify JSON';
|
42
|
+
}
|
43
|
+
}
|
44
|
+
};
|
45
|
+
|
46
|
+
export const safeParseJson = (value: string) => {
|
47
|
+
try {
|
48
|
+
return JSON.parse(value);
|
49
|
+
} catch (error) {
|
50
|
+
return null;
|
51
|
+
}
|
52
|
+
};
|
53
|
+
|
54
|
+
export const deepParseJson = (value: string) => {
|
55
|
+
try {
|
56
|
+
const parsedValue = JSON.parse(value);
|
57
|
+
Object.keys(parsedValue).forEach((key) => {
|
58
|
+
parsedValue[key] = deepParseJson(parsedValue[key]);
|
59
|
+
});
|
60
|
+
return parsedValue;
|
61
|
+
} catch (error) {
|
62
|
+
return value;
|
63
|
+
}
|
64
|
+
};
|
65
|
+
|
66
|
+
// export const convertArrayToObjectByKey = (array: { [key: string]: string }[], key: string) => {
|
67
|
+
// const obj = {};
|
68
|
+
// array.forEach((el) => {
|
69
|
+
// obj[el[key]] = { ...el };
|
70
|
+
// delete obj[el[key]][key];
|
71
|
+
// });
|
72
|
+
// return obj;
|
73
|
+
// };
|