@bigmath-ui-library/core 2.0.4
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/LICENSE +7 -0
- package/LICENSE.md +1 -0
- package/README.md +42 -0
- package/dist/cjs/index.css +11 -0
- package/dist/cjs/index.js +134365 -0
- package/dist/esm/index.css +11 -0
- package/dist/esm/index.js +134258 -0
- package/package.json +58 -0
- package/rollup.config.js +73 -0
- package/src/BMClassnameSetup.ts +3 -0
- package/src/assets/icons/Calendar.svg +6 -0
- package/src/assets/icons/Close.svg +40 -0
- package/src/assets/icons/Default-Loading-Circles.svg +31 -0
- package/src/assets/icons/alert.svg +6 -0
- package/src/assets/icons/aws.svg +19 -0
- package/src/assets/icons/caret-down.svg +3 -0
- package/src/assets/icons/check.svg +6 -0
- package/src/assets/icons/circle-check-solid.svg +7 -0
- package/src/assets/icons/circle-check.svg +6 -0
- package/src/assets/icons/circle-selected.svg +3 -0
- package/src/assets/icons/circle-unselected.svg +3 -0
- package/src/assets/icons/close-basic.svg +3 -0
- package/src/assets/icons/close_collapse.svg +3 -0
- package/src/assets/icons/copy.svg +3 -0
- package/src/assets/icons/drag.svg +3 -0
- package/src/assets/icons/expand-more.svg +3 -0
- package/src/assets/icons/failed-solid.svg +7 -0
- package/src/assets/icons/globe.svg +3 -0
- package/src/assets/icons/google-cloud.svg +6 -0
- package/src/assets/icons/in-active.svg +4 -0
- package/src/assets/icons/info-solid.svg +6 -0
- package/src/assets/icons/info.svg +6 -0
- package/src/assets/icons/k8s.svg +4 -0
- package/src/assets/icons/lock-locked.svg +5 -0
- package/src/assets/icons/microsoft-azure.svg +9 -0
- package/src/assets/icons/onprem.svg +3 -0
- package/src/assets/icons/pencil.svg +3 -0
- package/src/assets/icons/search.svg +6 -0
- package/src/assets/icons/shield.svg +4 -0
- package/src/assets/icons/star.svg +3 -0
- package/src/assets/icons/success-tick.svg +3 -0
- package/src/assets/icons/timer.svg +3 -0
- package/src/assets/icons/visibility-off.svg +6 -0
- package/src/assets/icons/visibility.svg +6 -0
- package/src/assets/icons/warning.svg +6 -0
- package/src/bma/components/BMButton/BMButton.tsx +34 -0
- package/src/bma/components/BMButton/index.ts +1 -0
- package/src/bma/components/BMInput/BMInput.tsx +13 -0
- package/src/bma/components/BMInput/BMInputField.tsx +7 -0
- package/src/bma/components/BMInput/BMSearch.tsx +6 -0
- package/src/bma/components/BMInput/index.ts +3 -0
- package/src/bma/index.ts +3 -0
- package/src/bma/package.json +4 -0
- package/src/bma/theme/BMAutocomplete.ts +12 -0
- package/src/bma/theme/BMInput.ts +46 -0
- package/src/bma/theme/theme.ts +15 -0
- package/src/bma/theme/themeUtils.ts +10 -0
- package/src/components/BMAccordion/BMAccordion.tsx +150 -0
- package/src/components/BMAccordion/index.ts +1 -0
- package/src/components/BMAddSection/BMAddSection.tsx +38 -0
- package/src/components/BMAddSection/index.ts +1 -0
- package/src/components/BMAlert/BMAlert.tsx +168 -0
- package/src/components/BMAlert/index.ts +1 -0
- package/src/components/BMAutoComplete/BMAutoComplete.tsx +86 -0
- package/src/components/BMAutoComplete/index.ts +1 -0
- package/src/components/BMAvatar/BMAvatar.tsx +45 -0
- package/src/components/BMAvatar/index.ts +1 -0
- package/src/components/BMButton/BMButton.tsx +46 -0
- package/src/components/BMButton/BMButtonGroup.tsx +46 -0
- package/src/components/BMButton/BMSplitButton.tsx +72 -0
- package/src/components/BMButton/index.ts +3 -0
- package/src/components/BMCheckbox/BMCheckbox.tsx +44 -0
- package/src/components/BMCheckbox/BMCheckboxField.tsx +41 -0
- package/src/components/BMCheckbox/index.ts +2 -0
- package/src/components/BMCloudSelect/BMCloudList.tsx +43 -0
- package/src/components/BMCloudSelect/BMCloudSelect.tsx +109 -0
- package/src/components/BMCloudSelect/BMCloudSelectField.tsx +46 -0
- package/src/components/BMCloudSelect/index.ts +3 -0
- package/src/components/BMCodeBlock/BMCodeBlock.tsx +233 -0
- package/src/components/BMCodeBlock/index.ts +1 -0
- package/src/components/BMDatePicker/BMDatePicker.tsx +187 -0
- package/src/components/BMDatePicker/index.ts +1 -0
- package/src/components/BMDropdown/BMDropdown.tsx +107 -0
- package/src/components/BMDropdown/index.ts +1 -0
- package/src/components/BMForm/BMFormControlLabel.tsx +23 -0
- package/src/components/BMForm/BMLabel.tsx +24 -0
- package/src/components/BMForm/index.ts +2 -0
- package/src/components/BMHelloBanner/BMHelloBanner.tsx +68 -0
- package/src/components/BMHelloBanner/index.ts +1 -0
- package/src/components/BMInput/BMInput.tsx +31 -0
- package/src/components/BMInput/BMInputEditableCode.tsx +120 -0
- package/src/components/BMInput/BMInputField.tsx +37 -0
- package/src/components/BMInput/BMSearch.tsx +17 -0
- package/src/components/BMInput/BMStripeInput.tsx +24 -0
- package/src/components/BMInput/index.ts +5 -0
- package/src/components/BMLoadingBox/BMLoadingBox.tsx +45 -0
- package/src/components/BMLoadingBox/index.ts +1 -0
- package/src/components/BMMaps/BMMapMarker.css +12 -0
- package/src/components/BMMaps/BMMapMarker.tsx +68 -0
- package/src/components/BMMaps/BMMaps.tsx +129 -0
- package/src/components/BMMaps/MapIcons.tsx +83 -0
- package/src/components/BMMaps/icons/GeoPartition.svg +19 -0
- package/src/components/BMMaps/icons/GeoPartitionHover.svg +20 -0
- package/src/components/BMMaps/icons/MasterPreferred.svg +19 -0
- package/src/components/BMMaps/icons/MasterPreferredHover.svg +20 -0
- package/src/components/BMMaps/icons/ReadReplica.svg +18 -0
- package/src/components/BMMaps/icons/ReadReplicaHover.svg +19 -0
- package/src/components/BMMaps/icons/RegionNotSelected.svg +18 -0
- package/src/components/BMMaps/icons/RegionNotSelectedHover.svg +19 -0
- package/src/components/BMMaps/icons/RegionPreferred.svg +18 -0
- package/src/components/BMMaps/icons/RegionPreferredHover.svg +19 -0
- package/src/components/BMMaps/icons/RegionSelected.svg +18 -0
- package/src/components/BMMaps/icons/RegionSelectedHover.svg +19 -0
- package/src/components/BMMaps/index.ts +5 -0
- package/src/components/BMMaps/legend/MapLegend.tsx +80 -0
- package/src/components/BMMaps/markerTypes.ts +8 -0
- package/src/components/BMModal/BMModal.tsx +313 -0
- package/src/components/BMModal/index.ts +1 -0
- package/src/components/BMMultiEntry/BMMultiEntry.tsx +328 -0
- package/src/components/BMMultiEntry/BMMultiEntryField.tsx +47 -0
- package/src/components/BMMultiEntry/index.ts +2 -0
- package/src/components/BMMultiLevelStepper/BMMultiLevelStepper.tsx +191 -0
- package/src/components/BMMultiLevelStepper/index.ts +1 -0
- package/src/components/BMPagination/BMPagination.tsx +64 -0
- package/src/components/BMPagination/index.ts +1 -0
- package/src/components/BMPassword/BMPassword.tsx +37 -0
- package/src/components/BMPassword/BMPasswordField.tsx +50 -0
- package/src/components/BMPassword/index.ts +2 -0
- package/src/components/BMProgress/BMProgress.tsx +43 -0
- package/src/components/BMProgress/index.ts +1 -0
- package/src/components/BMRadio/BMRadio.tsx +162 -0
- package/src/components/BMRadio/BMRadioGroupField.tsx +40 -0
- package/src/components/BMRadio/index.ts +2 -0
- package/src/components/BMSelect/BMSelect.tsx +70 -0
- package/src/components/BMSelect/BMSelectField.tsx +47 -0
- package/src/components/BMSelect/index.ts +2 -0
- package/src/components/BMSlider/BMSlider.tsx +16 -0
- package/src/components/BMSlider/index.ts +1 -0
- package/src/components/BMSmartStatus/BMSmartStatus.tsx +185 -0
- package/src/components/BMSmartStatus/index.tsx +1 -0
- package/src/components/BMStatus/BMStatus.tsx +98 -0
- package/src/components/BMStatus/index.ts +1 -0
- package/src/components/BMTable/BMTable.tsx +131 -0
- package/src/components/BMTable/index.ts +1 -0
- package/src/components/BMTabs/BMTabs.tsx +50 -0
- package/src/components/BMTabs/index.ts +1 -0
- package/src/components/BMTag/BMTag.tsx +47 -0
- package/src/components/BMTag/index.ts +1 -0
- package/src/components/BMTagv2/BMTagv2.tsx +250 -0
- package/src/components/BMTagv2/index.ts +1 -0
- package/src/components/BMToggle/BMMultiToggleButton.tsx +99 -0
- package/src/components/BMToggle/BMToggle.tsx +35 -0
- package/src/components/BMToggle/BMToggleField.tsx +28 -0
- package/src/components/BMToggle/index.ts +3 -0
- package/src/components/BMTooltip/BMTooltip.tsx +52 -0
- package/src/components/BMTooltip/index.ts +1 -0
- package/src/components/BMWarning/BMWarning.tsx +39 -0
- package/src/components/BMWarning/index.ts +1 -0
- package/src/components/GenericFailure/GenericFailure.tsx +28 -0
- package/src/components/GenericFailure/index.ts +1 -0
- package/src/components/NoAccess/NoAccess.tsx +40 -0
- package/src/components/NoAccess/NoAccessActionTooltip.tsx +53 -0
- package/src/components/NoAccess/NoPermissionModal.tsx +55 -0
- package/src/components/NoAccess/index.ts +3 -0
- package/src/components/index.ts +34 -0
- package/src/index.ts +9 -0
- package/src/theme/BMAutoComplete.ts +152 -0
- package/src/theme/BMAvatar.ts +5 -0
- package/src/theme/BMButton.ts +132 -0
- package/src/theme/BMButtonGroup.ts +49 -0
- package/src/theme/BMCheckbox.ts +16 -0
- package/src/theme/BMFormHelperText.ts +19 -0
- package/src/theme/BMInput.ts +120 -0
- package/src/theme/BMMaps.ts +9 -0
- package/src/theme/BMRadio.ts +10 -0
- package/src/theme/BMTabs.ts +79 -0
- package/src/theme/BMTag.ts +28 -0
- package/src/theme/BMToggle.ts +50 -0
- package/src/theme/BMTooltip.ts +34 -0
- package/src/theme/theme.ts +326 -0
- package/src/theme/variables.ts +152 -0
- package/src/types/custom.d.ts +9 -0
- package/src/types/svg.d.ts +5 -0
- package/stories/BMAButton.stories.tsx +67 -0
- package/stories/BMAccordion.stories.tsx +55 -0
- package/stories/BMAddSection.stories.tsx +40 -0
- package/stories/BMAlert.stories.tsx +33 -0
- package/stories/BMAutoComplete.stories.tsx +65 -0
- package/stories/BMAvatar.stories.tsx +76 -0
- package/stories/BMButton.stories.tsx +57 -0
- package/stories/BMButton2.stories.tsx +131 -0
- package/stories/BMCheckbox.stories.tsx +23 -0
- package/stories/BMCloudSelectField.stories.tsx +40 -0
- package/stories/BMCodeBlock.stories.tsx +57 -0
- package/stories/BMDatePicker.stories.tsx +88 -0
- package/stories/BMDropdown.stories.tsx +84 -0
- package/stories/BMGroupButton.stories.tsx +53 -0
- package/stories/BMHelloBanner.stories.tsx +33 -0
- package/stories/BMInput.stories.tsx +184 -0
- package/stories/BMInputEditableCode.stories.tsx +86 -0
- package/stories/BMInputField.stories.tsx +50 -0
- package/stories/BMLoadingBox.stories.tsx +45 -0
- package/stories/BMMaps.stories.tsx +29 -0
- package/stories/BMModal.stories.tsx +218 -0
- package/stories/BMMultiEntry.stories.tsx +93 -0
- package/stories/BMMultiLevelStepper.stories.tsx +87 -0
- package/stories/BMPagination.stories.tsx +41 -0
- package/stories/BMPassword.stories.tsx +133 -0
- package/stories/BMProgress.stories.tsx +60 -0
- package/stories/BMRadio.stories.tsx +71 -0
- package/stories/BMSelect.stories.tsx +160 -0
- package/stories/BMSlider.stories.tsx +74 -0
- package/stories/BMSmartStatus.stories.tsx +98 -0
- package/stories/BMSplitButton.stories.tsx +32 -0
- package/stories/BMStatus.stories.tsx +29 -0
- package/stories/BMTable.stories.tsx +350 -0
- package/stories/BMTabs.stories.tsx +25 -0
- package/stories/BMTag.stories.tsx +63 -0
- package/stories/BMTagv2.stories.tsx +288 -0
- package/stories/BMToggle.stories.tsx +123 -0
- package/stories/BMTooltip.stories.tsx +59 -0
- package/stories/BMTypography.stories.tsx +79 -0
- package/stories/BMWarning.stories.tsx +55 -0
- package/stories/GenericFailure.stories.tsx +47 -0
- package/stories/NoAccess.stories.tsx +19 -0
- package/stories/NoAccessActionTooltip.stories.tsx +50 -0
- package/stories/NoPermissionModal.stories.tsx +46 -0
- package/tsconfig.base.json +21 -0
- package/tsconfig.build.json +23 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { buttonClasses, type Components } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const BMButtonGroup: Components["MuiButtonGroup"] = {
|
|
4
|
+
defaultProps: {
|
|
5
|
+
disableRipple: true,
|
|
6
|
+
disableElevation: true,
|
|
7
|
+
},
|
|
8
|
+
styleOverrides: {
|
|
9
|
+
root: ({ theme }: { theme: any, }) => ({
|
|
10
|
+
backgroundColor: theme.palette.primary[100],
|
|
11
|
+
border: `1px solid ${theme.palette.grey[300]}`,
|
|
12
|
+
[`.${buttonClasses.root}`]: {
|
|
13
|
+
backgroundColor: 'transparent',
|
|
14
|
+
border: 'none',
|
|
15
|
+
height: '40px',
|
|
16
|
+
fontSize: '13px',
|
|
17
|
+
fontWeight: 400,
|
|
18
|
+
color: theme.palette.grey[900],
|
|
19
|
+
padding: '8px 10px',
|
|
20
|
+
"&.bm-active": {
|
|
21
|
+
border: `1px solid ${theme.palette.primary[600]} !important`,
|
|
22
|
+
backgroundColor: `${theme.palette.common.white} !important`,
|
|
23
|
+
color: `${theme.palette.primary[600]} !important`,
|
|
24
|
+
borderRadius: '8px',
|
|
25
|
+
zIndex: 1,
|
|
26
|
+
fontWeight: 600,
|
|
27
|
+
},
|
|
28
|
+
"&:hover": {
|
|
29
|
+
backgroundColor: `${theme.palette.common.white} !important`,
|
|
30
|
+
// border: `1px solid ${theme.palette.primary[600]} !important`,
|
|
31
|
+
color: `${theme.palette.primary[600]} !important`,
|
|
32
|
+
borderRadius: '8px',
|
|
33
|
+
'& .bm-divider': {
|
|
34
|
+
display: 'none'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"& .bm-divider": {
|
|
38
|
+
width: '1px',
|
|
39
|
+
height: '14px',
|
|
40
|
+
backgroundColor: theme.palette.grey[300],
|
|
41
|
+
position: 'absolute',
|
|
42
|
+
right: 0
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Components } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const BMCheckbox: Components["MuiCheckbox"] = {
|
|
4
|
+
defaultProps: {
|
|
5
|
+
disableRipple: true,
|
|
6
|
+
disableFocusRipple: true,
|
|
7
|
+
disableTouchRipple: true,
|
|
8
|
+
color: "primary",
|
|
9
|
+
},
|
|
10
|
+
styleOverrides: {
|
|
11
|
+
root: {
|
|
12
|
+
padding: 0,
|
|
13
|
+
paddingRight: 8,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Components } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const BMFormHelperText: Components["MuiFormHelperText"] = {
|
|
4
|
+
styleOverrides: {
|
|
5
|
+
root: ({ theme }: { theme: any }) => ({
|
|
6
|
+
fontSize: 11.5,
|
|
7
|
+
lineHeight: '16px',
|
|
8
|
+
fontWeight: 400,
|
|
9
|
+
textTransform: 'none',
|
|
10
|
+
color: theme.palette.grey[600],
|
|
11
|
+
marginTop: 8,
|
|
12
|
+
'&$error': {
|
|
13
|
+
'&$disabled': {
|
|
14
|
+
color: theme.palette.grey[600]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Components } from "@mui/material";
|
|
2
|
+
import { colors, themeVariables } from "./variables";
|
|
3
|
+
|
|
4
|
+
declare module "@mui/material/TextField" {
|
|
5
|
+
interface TextFieldPropsSizeOverrides {
|
|
6
|
+
large: true;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const BMInput: Components["MuiInput"] = {
|
|
11
|
+
defaultProps: {
|
|
12
|
+
disableUnderline: true,
|
|
13
|
+
},
|
|
14
|
+
styleOverrides: {
|
|
15
|
+
root: {
|
|
16
|
+
overflow: "hidden",
|
|
17
|
+
height: themeVariables.inputHeight,
|
|
18
|
+
color: colors.grey[900],
|
|
19
|
+
backgroundColor: colors.background.paper,
|
|
20
|
+
borderRadius: themeVariables.borderRadius,
|
|
21
|
+
border: `1px solid ${colors.grey[300]}`,
|
|
22
|
+
":hover": {
|
|
23
|
+
borderColor: colors.primary[300],
|
|
24
|
+
},
|
|
25
|
+
"&.Mui-focused": {
|
|
26
|
+
borderColor: colors.primary[300],
|
|
27
|
+
boxShadow: `0 0 0 2px ${colors.primary[200]}`,
|
|
28
|
+
},
|
|
29
|
+
"&.Mui-error": {
|
|
30
|
+
color: `${colors.error[500]} !important`,
|
|
31
|
+
backgroundColor: `${colors.error[100]} !important`,
|
|
32
|
+
borderColor: `${colors.error[500]} !important`,
|
|
33
|
+
"&:hover": {
|
|
34
|
+
borderColor: colors.error[500],
|
|
35
|
+
},
|
|
36
|
+
"&.Mui-focused": {
|
|
37
|
+
boxShadow: `0 0 0 2px ${colors.error[100]}`,
|
|
38
|
+
},
|
|
39
|
+
"&.Mui-disabled": {
|
|
40
|
+
borderColor: colors.grey[300],
|
|
41
|
+
cursor: "not-allowed",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
"&.Mui-disabled": {
|
|
45
|
+
color: colors.grey[600],
|
|
46
|
+
backgroundColor: colors.grey[200],
|
|
47
|
+
borderColor: colors.grey[300],
|
|
48
|
+
cursor: "not-allowed",
|
|
49
|
+
},
|
|
50
|
+
variants: [
|
|
51
|
+
{
|
|
52
|
+
props: { multiline: true },
|
|
53
|
+
style: {
|
|
54
|
+
height: "auto",
|
|
55
|
+
padding: 0,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
props: { size: "large", multiline: false },
|
|
60
|
+
style: {
|
|
61
|
+
height: 40,
|
|
62
|
+
textTransform: "none",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
// biome-ignore lint: TODO for any
|
|
68
|
+
input: ({ theme, ownerState }: { theme: any; ownerState: any }) => ({
|
|
69
|
+
padding: 8,
|
|
70
|
+
fontWeight: 400,
|
|
71
|
+
fontSize: 13,
|
|
72
|
+
"&::placeholder": {
|
|
73
|
+
color: ownerState?.error ? theme.palette.error[500] : colors.grey[600],
|
|
74
|
+
},
|
|
75
|
+
'&.Mui-disabled': {
|
|
76
|
+
pointerEvents: 'none',
|
|
77
|
+
cursor: 'not-allowed',
|
|
78
|
+
}
|
|
79
|
+
}),
|
|
80
|
+
formControl: {
|
|
81
|
+
"label + &": {
|
|
82
|
+
marginTop: 0,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const BMInputLabel: Components["MuiInputLabel"] = {
|
|
89
|
+
defaultProps: {
|
|
90
|
+
shrink: true,
|
|
91
|
+
},
|
|
92
|
+
styleOverrides: {
|
|
93
|
+
// biome-ignore lint: TODO for any
|
|
94
|
+
root: ({ theme }: { theme: any }) => ({
|
|
95
|
+
display: "flex",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
color: colors.grey[600],
|
|
98
|
+
fontSize: theme.typography.subtitle2.fontSize,
|
|
99
|
+
lineHeight: "16px",
|
|
100
|
+
fontWeight: 500,
|
|
101
|
+
textTransform: "none",
|
|
102
|
+
"&.Mui-focused": {
|
|
103
|
+
color: colors.grey[600],
|
|
104
|
+
},
|
|
105
|
+
"&.Mui-error": {
|
|
106
|
+
color: colors.error[500],
|
|
107
|
+
},
|
|
108
|
+
"&.Mui-disabled": {
|
|
109
|
+
color: colors.grey[600],
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
formControl: {
|
|
113
|
+
position: "relative",
|
|
114
|
+
marginBottom: 4,
|
|
115
|
+
},
|
|
116
|
+
shrink: {
|
|
117
|
+
transform: "translate(0, 1.5px)",
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { tabClasses, tabsClasses, type Components } from "@mui/material";
|
|
2
|
+
import { colors } from "./variables";
|
|
3
|
+
|
|
4
|
+
export const BMTabs: Components["MuiTabs"] = {
|
|
5
|
+
styleOverrides: {
|
|
6
|
+
indicator: {
|
|
7
|
+
background: colors.secondary[900],
|
|
8
|
+
height: 3,
|
|
9
|
+
'&:hover': {
|
|
10
|
+
backgroundColor: colors.secondary[400]
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
fixed: {
|
|
14
|
+
boxShadow: `inset 0 -1px ${colors.grey[300] ?? ''}`
|
|
15
|
+
},
|
|
16
|
+
root: {
|
|
17
|
+
// custom "pill" style for vertical tabs
|
|
18
|
+
[`&.${tabsClasses.vertical}`]: {
|
|
19
|
+
[`& .${tabsClasses.fixed}`]: {
|
|
20
|
+
boxShadow: 'none',
|
|
21
|
+
[`& .${tabsClasses.indicator}`]: {
|
|
22
|
+
display: 'none'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
[`& .${tabClasses.root}`]: {
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
minHeight: 32,
|
|
28
|
+
padding: '0 16px',
|
|
29
|
+
margin: '0 0 4px 0',
|
|
30
|
+
borderRadius: 8,
|
|
31
|
+
boxShadow: 'none',
|
|
32
|
+
'&:hover': {
|
|
33
|
+
background: colors.grey[200]
|
|
34
|
+
},
|
|
35
|
+
'&.Mui-selected': {
|
|
36
|
+
background: colors.grey[300]
|
|
37
|
+
},
|
|
38
|
+
'&.MuiTab-wrapper': {
|
|
39
|
+
alignItems: 'flex-start'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const BMTab: Components["MuiTab"] = {
|
|
49
|
+
defaultProps: {
|
|
50
|
+
disableRipple: true,
|
|
51
|
+
disableTouchRipple: true,
|
|
52
|
+
disableFocusRipple: true
|
|
53
|
+
},
|
|
54
|
+
styleOverrides: {
|
|
55
|
+
root: {
|
|
56
|
+
fontSize: 13,
|
|
57
|
+
fontWeight: 400,
|
|
58
|
+
textTransform: 'none',
|
|
59
|
+
minHeight: '56px',
|
|
60
|
+
|
|
61
|
+
'&:hover': {
|
|
62
|
+
boxShadow: `inset 0px -3px 0px 0px ${colors.secondary[400]}`
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
['@media (min-width:600px)']: {
|
|
66
|
+
minWidth: 'fit-content',
|
|
67
|
+
marginRight: 32,
|
|
68
|
+
paddingRight: 0,
|
|
69
|
+
paddingLeft: 0
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
textColorPrimary: {
|
|
73
|
+
color: colors.grey[900],
|
|
74
|
+
'&.Mui-selected': {
|
|
75
|
+
color: colors.grey[900]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Components, Theme } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export const BMTag: Components<Theme>['MuiChip'] = {
|
|
4
|
+
styleOverrides: {
|
|
5
|
+
root: ({ theme }) => ({
|
|
6
|
+
borderRadius: theme.shape.borderRadius,
|
|
7
|
+
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
|
8
|
+
'&:hover': {
|
|
9
|
+
boxShadow: 'none',
|
|
10
|
+
},
|
|
11
|
+
'&:active': {
|
|
12
|
+
boxShadow: 'none',
|
|
13
|
+
},
|
|
14
|
+
'&:focus': {
|
|
15
|
+
boxShadow: 'none',
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
label: {
|
|
19
|
+
fontWeight: 500,
|
|
20
|
+
},
|
|
21
|
+
icon: {
|
|
22
|
+
color: 'inherit',
|
|
23
|
+
},
|
|
24
|
+
deleteIcon: {
|
|
25
|
+
color: 'inherit',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Components } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const BMToggle: Components["MuiSwitch"] = {
|
|
4
|
+
defaultProps: {
|
|
5
|
+
disableRipple: true,
|
|
6
|
+
disableFocusRipple: true,
|
|
7
|
+
disableTouchRipple: true,
|
|
8
|
+
},
|
|
9
|
+
styleOverrides: {
|
|
10
|
+
root: {
|
|
11
|
+
width: 38,
|
|
12
|
+
height: 20,
|
|
13
|
+
padding: 0,
|
|
14
|
+
display: "flex",
|
|
15
|
+
},
|
|
16
|
+
// biome-ignore lint: TODO
|
|
17
|
+
switchBase: ({ theme }: { theme: any }) => ({
|
|
18
|
+
padding: theme.spacing(0.5),
|
|
19
|
+
color: theme.palette.common.white,
|
|
20
|
+
"&.Mui-checked": {
|
|
21
|
+
transform: "translateX(17px)",
|
|
22
|
+
color: theme.palette.common.white,
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
// biome-ignore lint: TODO
|
|
26
|
+
thumb: ({ theme }: { theme: any }) => ({
|
|
27
|
+
width: 12,
|
|
28
|
+
height: 12,
|
|
29
|
+
boxShadow: "none",
|
|
30
|
+
color: theme.palette.common.white,
|
|
31
|
+
}),
|
|
32
|
+
// biome-ignore lint: TODO
|
|
33
|
+
track: ({ theme }: { theme: any }) => ({
|
|
34
|
+
border: `1px solid ${theme.palette.grey[400]}`,
|
|
35
|
+
borderRadius: 22 / 2,
|
|
36
|
+
opacity: "1 !important",
|
|
37
|
+
backgroundColor: theme.palette.grey[400],
|
|
38
|
+
".Mui-checked + &": {
|
|
39
|
+
backgroundColor: theme.palette.primary.main,
|
|
40
|
+
border: `1px solid ${theme.palette.primary.main}`,
|
|
41
|
+
},
|
|
42
|
+
".Mui-disabled + &": {
|
|
43
|
+
backgroundColor: theme.palette.primary[600],
|
|
44
|
+
border: `1px solid ${theme.palette.grey[400]}`,
|
|
45
|
+
opacity: "0.3 !important",
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
checked: {},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Components } from "@mui/material";
|
|
2
|
+
import { colors, themeVariables as variables } from "./variables";
|
|
3
|
+
|
|
4
|
+
export const BMTooltip: Components["MuiTooltip"] = {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
disableInteractive: false,
|
|
7
|
+
},
|
|
8
|
+
styleOverrides: {
|
|
9
|
+
tooltip: {
|
|
10
|
+
fontFamily: '"Inter", sans-serif',
|
|
11
|
+
maxWidth: 360,
|
|
12
|
+
backgroundColor: colors.background.paper,
|
|
13
|
+
color: colors.grey[700],
|
|
14
|
+
border: `1px solid ${colors.grey[300]}`,
|
|
15
|
+
padding: 10,
|
|
16
|
+
fontSize: 11.5,
|
|
17
|
+
fontWeight: 400,
|
|
18
|
+
boxShadow: variables.shadowThick,
|
|
19
|
+
lineHeight: "1.4em",
|
|
20
|
+
borderRadius: "8px",
|
|
21
|
+
},
|
|
22
|
+
arrow: {
|
|
23
|
+
"&:before": {
|
|
24
|
+
color: colors.background.paper,
|
|
25
|
+
border: `1px solid ${colors.grey[300]}`,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
tooltipPlacementTop: {
|
|
29
|
+
["@media (min-width: 600px)"]: {
|
|
30
|
+
margin: "8px -2px",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|