@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.
Files changed (229) hide show
  1. package/LICENSE +7 -0
  2. package/LICENSE.md +1 -0
  3. package/README.md +42 -0
  4. package/dist/cjs/index.css +11 -0
  5. package/dist/cjs/index.js +134365 -0
  6. package/dist/esm/index.css +11 -0
  7. package/dist/esm/index.js +134258 -0
  8. package/package.json +58 -0
  9. package/rollup.config.js +73 -0
  10. package/src/BMClassnameSetup.ts +3 -0
  11. package/src/assets/icons/Calendar.svg +6 -0
  12. package/src/assets/icons/Close.svg +40 -0
  13. package/src/assets/icons/Default-Loading-Circles.svg +31 -0
  14. package/src/assets/icons/alert.svg +6 -0
  15. package/src/assets/icons/aws.svg +19 -0
  16. package/src/assets/icons/caret-down.svg +3 -0
  17. package/src/assets/icons/check.svg +6 -0
  18. package/src/assets/icons/circle-check-solid.svg +7 -0
  19. package/src/assets/icons/circle-check.svg +6 -0
  20. package/src/assets/icons/circle-selected.svg +3 -0
  21. package/src/assets/icons/circle-unselected.svg +3 -0
  22. package/src/assets/icons/close-basic.svg +3 -0
  23. package/src/assets/icons/close_collapse.svg +3 -0
  24. package/src/assets/icons/copy.svg +3 -0
  25. package/src/assets/icons/drag.svg +3 -0
  26. package/src/assets/icons/expand-more.svg +3 -0
  27. package/src/assets/icons/failed-solid.svg +7 -0
  28. package/src/assets/icons/globe.svg +3 -0
  29. package/src/assets/icons/google-cloud.svg +6 -0
  30. package/src/assets/icons/in-active.svg +4 -0
  31. package/src/assets/icons/info-solid.svg +6 -0
  32. package/src/assets/icons/info.svg +6 -0
  33. package/src/assets/icons/k8s.svg +4 -0
  34. package/src/assets/icons/lock-locked.svg +5 -0
  35. package/src/assets/icons/microsoft-azure.svg +9 -0
  36. package/src/assets/icons/onprem.svg +3 -0
  37. package/src/assets/icons/pencil.svg +3 -0
  38. package/src/assets/icons/search.svg +6 -0
  39. package/src/assets/icons/shield.svg +4 -0
  40. package/src/assets/icons/star.svg +3 -0
  41. package/src/assets/icons/success-tick.svg +3 -0
  42. package/src/assets/icons/timer.svg +3 -0
  43. package/src/assets/icons/visibility-off.svg +6 -0
  44. package/src/assets/icons/visibility.svg +6 -0
  45. package/src/assets/icons/warning.svg +6 -0
  46. package/src/bma/components/BMButton/BMButton.tsx +34 -0
  47. package/src/bma/components/BMButton/index.ts +1 -0
  48. package/src/bma/components/BMInput/BMInput.tsx +13 -0
  49. package/src/bma/components/BMInput/BMInputField.tsx +7 -0
  50. package/src/bma/components/BMInput/BMSearch.tsx +6 -0
  51. package/src/bma/components/BMInput/index.ts +3 -0
  52. package/src/bma/index.ts +3 -0
  53. package/src/bma/package.json +4 -0
  54. package/src/bma/theme/BMAutocomplete.ts +12 -0
  55. package/src/bma/theme/BMInput.ts +46 -0
  56. package/src/bma/theme/theme.ts +15 -0
  57. package/src/bma/theme/themeUtils.ts +10 -0
  58. package/src/components/BMAccordion/BMAccordion.tsx +150 -0
  59. package/src/components/BMAccordion/index.ts +1 -0
  60. package/src/components/BMAddSection/BMAddSection.tsx +38 -0
  61. package/src/components/BMAddSection/index.ts +1 -0
  62. package/src/components/BMAlert/BMAlert.tsx +168 -0
  63. package/src/components/BMAlert/index.ts +1 -0
  64. package/src/components/BMAutoComplete/BMAutoComplete.tsx +86 -0
  65. package/src/components/BMAutoComplete/index.ts +1 -0
  66. package/src/components/BMAvatar/BMAvatar.tsx +45 -0
  67. package/src/components/BMAvatar/index.ts +1 -0
  68. package/src/components/BMButton/BMButton.tsx +46 -0
  69. package/src/components/BMButton/BMButtonGroup.tsx +46 -0
  70. package/src/components/BMButton/BMSplitButton.tsx +72 -0
  71. package/src/components/BMButton/index.ts +3 -0
  72. package/src/components/BMCheckbox/BMCheckbox.tsx +44 -0
  73. package/src/components/BMCheckbox/BMCheckboxField.tsx +41 -0
  74. package/src/components/BMCheckbox/index.ts +2 -0
  75. package/src/components/BMCloudSelect/BMCloudList.tsx +43 -0
  76. package/src/components/BMCloudSelect/BMCloudSelect.tsx +109 -0
  77. package/src/components/BMCloudSelect/BMCloudSelectField.tsx +46 -0
  78. package/src/components/BMCloudSelect/index.ts +3 -0
  79. package/src/components/BMCodeBlock/BMCodeBlock.tsx +233 -0
  80. package/src/components/BMCodeBlock/index.ts +1 -0
  81. package/src/components/BMDatePicker/BMDatePicker.tsx +187 -0
  82. package/src/components/BMDatePicker/index.ts +1 -0
  83. package/src/components/BMDropdown/BMDropdown.tsx +107 -0
  84. package/src/components/BMDropdown/index.ts +1 -0
  85. package/src/components/BMForm/BMFormControlLabel.tsx +23 -0
  86. package/src/components/BMForm/BMLabel.tsx +24 -0
  87. package/src/components/BMForm/index.ts +2 -0
  88. package/src/components/BMHelloBanner/BMHelloBanner.tsx +68 -0
  89. package/src/components/BMHelloBanner/index.ts +1 -0
  90. package/src/components/BMInput/BMInput.tsx +31 -0
  91. package/src/components/BMInput/BMInputEditableCode.tsx +120 -0
  92. package/src/components/BMInput/BMInputField.tsx +37 -0
  93. package/src/components/BMInput/BMSearch.tsx +17 -0
  94. package/src/components/BMInput/BMStripeInput.tsx +24 -0
  95. package/src/components/BMInput/index.ts +5 -0
  96. package/src/components/BMLoadingBox/BMLoadingBox.tsx +45 -0
  97. package/src/components/BMLoadingBox/index.ts +1 -0
  98. package/src/components/BMMaps/BMMapMarker.css +12 -0
  99. package/src/components/BMMaps/BMMapMarker.tsx +68 -0
  100. package/src/components/BMMaps/BMMaps.tsx +129 -0
  101. package/src/components/BMMaps/MapIcons.tsx +83 -0
  102. package/src/components/BMMaps/icons/GeoPartition.svg +19 -0
  103. package/src/components/BMMaps/icons/GeoPartitionHover.svg +20 -0
  104. package/src/components/BMMaps/icons/MasterPreferred.svg +19 -0
  105. package/src/components/BMMaps/icons/MasterPreferredHover.svg +20 -0
  106. package/src/components/BMMaps/icons/ReadReplica.svg +18 -0
  107. package/src/components/BMMaps/icons/ReadReplicaHover.svg +19 -0
  108. package/src/components/BMMaps/icons/RegionNotSelected.svg +18 -0
  109. package/src/components/BMMaps/icons/RegionNotSelectedHover.svg +19 -0
  110. package/src/components/BMMaps/icons/RegionPreferred.svg +18 -0
  111. package/src/components/BMMaps/icons/RegionPreferredHover.svg +19 -0
  112. package/src/components/BMMaps/icons/RegionSelected.svg +18 -0
  113. package/src/components/BMMaps/icons/RegionSelectedHover.svg +19 -0
  114. package/src/components/BMMaps/index.ts +5 -0
  115. package/src/components/BMMaps/legend/MapLegend.tsx +80 -0
  116. package/src/components/BMMaps/markerTypes.ts +8 -0
  117. package/src/components/BMModal/BMModal.tsx +313 -0
  118. package/src/components/BMModal/index.ts +1 -0
  119. package/src/components/BMMultiEntry/BMMultiEntry.tsx +328 -0
  120. package/src/components/BMMultiEntry/BMMultiEntryField.tsx +47 -0
  121. package/src/components/BMMultiEntry/index.ts +2 -0
  122. package/src/components/BMMultiLevelStepper/BMMultiLevelStepper.tsx +191 -0
  123. package/src/components/BMMultiLevelStepper/index.ts +1 -0
  124. package/src/components/BMPagination/BMPagination.tsx +64 -0
  125. package/src/components/BMPagination/index.ts +1 -0
  126. package/src/components/BMPassword/BMPassword.tsx +37 -0
  127. package/src/components/BMPassword/BMPasswordField.tsx +50 -0
  128. package/src/components/BMPassword/index.ts +2 -0
  129. package/src/components/BMProgress/BMProgress.tsx +43 -0
  130. package/src/components/BMProgress/index.ts +1 -0
  131. package/src/components/BMRadio/BMRadio.tsx +162 -0
  132. package/src/components/BMRadio/BMRadioGroupField.tsx +40 -0
  133. package/src/components/BMRadio/index.ts +2 -0
  134. package/src/components/BMSelect/BMSelect.tsx +70 -0
  135. package/src/components/BMSelect/BMSelectField.tsx +47 -0
  136. package/src/components/BMSelect/index.ts +2 -0
  137. package/src/components/BMSlider/BMSlider.tsx +16 -0
  138. package/src/components/BMSlider/index.ts +1 -0
  139. package/src/components/BMSmartStatus/BMSmartStatus.tsx +185 -0
  140. package/src/components/BMSmartStatus/index.tsx +1 -0
  141. package/src/components/BMStatus/BMStatus.tsx +98 -0
  142. package/src/components/BMStatus/index.ts +1 -0
  143. package/src/components/BMTable/BMTable.tsx +131 -0
  144. package/src/components/BMTable/index.ts +1 -0
  145. package/src/components/BMTabs/BMTabs.tsx +50 -0
  146. package/src/components/BMTabs/index.ts +1 -0
  147. package/src/components/BMTag/BMTag.tsx +47 -0
  148. package/src/components/BMTag/index.ts +1 -0
  149. package/src/components/BMTagv2/BMTagv2.tsx +250 -0
  150. package/src/components/BMTagv2/index.ts +1 -0
  151. package/src/components/BMToggle/BMMultiToggleButton.tsx +99 -0
  152. package/src/components/BMToggle/BMToggle.tsx +35 -0
  153. package/src/components/BMToggle/BMToggleField.tsx +28 -0
  154. package/src/components/BMToggle/index.ts +3 -0
  155. package/src/components/BMTooltip/BMTooltip.tsx +52 -0
  156. package/src/components/BMTooltip/index.ts +1 -0
  157. package/src/components/BMWarning/BMWarning.tsx +39 -0
  158. package/src/components/BMWarning/index.ts +1 -0
  159. package/src/components/GenericFailure/GenericFailure.tsx +28 -0
  160. package/src/components/GenericFailure/index.ts +1 -0
  161. package/src/components/NoAccess/NoAccess.tsx +40 -0
  162. package/src/components/NoAccess/NoAccessActionTooltip.tsx +53 -0
  163. package/src/components/NoAccess/NoPermissionModal.tsx +55 -0
  164. package/src/components/NoAccess/index.ts +3 -0
  165. package/src/components/index.ts +34 -0
  166. package/src/index.ts +9 -0
  167. package/src/theme/BMAutoComplete.ts +152 -0
  168. package/src/theme/BMAvatar.ts +5 -0
  169. package/src/theme/BMButton.ts +132 -0
  170. package/src/theme/BMButtonGroup.ts +49 -0
  171. package/src/theme/BMCheckbox.ts +16 -0
  172. package/src/theme/BMFormHelperText.ts +19 -0
  173. package/src/theme/BMInput.ts +120 -0
  174. package/src/theme/BMMaps.ts +9 -0
  175. package/src/theme/BMRadio.ts +10 -0
  176. package/src/theme/BMTabs.ts +79 -0
  177. package/src/theme/BMTag.ts +28 -0
  178. package/src/theme/BMToggle.ts +50 -0
  179. package/src/theme/BMTooltip.ts +34 -0
  180. package/src/theme/theme.ts +326 -0
  181. package/src/theme/variables.ts +152 -0
  182. package/src/types/custom.d.ts +9 -0
  183. package/src/types/svg.d.ts +5 -0
  184. package/stories/BMAButton.stories.tsx +67 -0
  185. package/stories/BMAccordion.stories.tsx +55 -0
  186. package/stories/BMAddSection.stories.tsx +40 -0
  187. package/stories/BMAlert.stories.tsx +33 -0
  188. package/stories/BMAutoComplete.stories.tsx +65 -0
  189. package/stories/BMAvatar.stories.tsx +76 -0
  190. package/stories/BMButton.stories.tsx +57 -0
  191. package/stories/BMButton2.stories.tsx +131 -0
  192. package/stories/BMCheckbox.stories.tsx +23 -0
  193. package/stories/BMCloudSelectField.stories.tsx +40 -0
  194. package/stories/BMCodeBlock.stories.tsx +57 -0
  195. package/stories/BMDatePicker.stories.tsx +88 -0
  196. package/stories/BMDropdown.stories.tsx +84 -0
  197. package/stories/BMGroupButton.stories.tsx +53 -0
  198. package/stories/BMHelloBanner.stories.tsx +33 -0
  199. package/stories/BMInput.stories.tsx +184 -0
  200. package/stories/BMInputEditableCode.stories.tsx +86 -0
  201. package/stories/BMInputField.stories.tsx +50 -0
  202. package/stories/BMLoadingBox.stories.tsx +45 -0
  203. package/stories/BMMaps.stories.tsx +29 -0
  204. package/stories/BMModal.stories.tsx +218 -0
  205. package/stories/BMMultiEntry.stories.tsx +93 -0
  206. package/stories/BMMultiLevelStepper.stories.tsx +87 -0
  207. package/stories/BMPagination.stories.tsx +41 -0
  208. package/stories/BMPassword.stories.tsx +133 -0
  209. package/stories/BMProgress.stories.tsx +60 -0
  210. package/stories/BMRadio.stories.tsx +71 -0
  211. package/stories/BMSelect.stories.tsx +160 -0
  212. package/stories/BMSlider.stories.tsx +74 -0
  213. package/stories/BMSmartStatus.stories.tsx +98 -0
  214. package/stories/BMSplitButton.stories.tsx +32 -0
  215. package/stories/BMStatus.stories.tsx +29 -0
  216. package/stories/BMTable.stories.tsx +350 -0
  217. package/stories/BMTabs.stories.tsx +25 -0
  218. package/stories/BMTag.stories.tsx +63 -0
  219. package/stories/BMTagv2.stories.tsx +288 -0
  220. package/stories/BMToggle.stories.tsx +123 -0
  221. package/stories/BMTooltip.stories.tsx +59 -0
  222. package/stories/BMTypography.stories.tsx +79 -0
  223. package/stories/BMWarning.stories.tsx +55 -0
  224. package/stories/GenericFailure.stories.tsx +47 -0
  225. package/stories/NoAccess.stories.tsx +19 -0
  226. package/stories/NoAccessActionTooltip.stories.tsx +50 -0
  227. package/stories/NoPermissionModal.stories.tsx +46 -0
  228. package/tsconfig.base.json +21 -0
  229. package/tsconfig.build.json +23 -0
@@ -0,0 +1,326 @@
1
+ import {
2
+ type PaletteOptions,
3
+ type ThemeOptions,
4
+ createTheme,
5
+ } from "@mui/material";
6
+ import { TypographyOptions } from "@mui/material/styles/createTypography";
7
+ import { BMButton } from "./BMButton";
8
+ import { BMCheckbox } from "./BMCheckbox";
9
+ import { BMInput, BMInputLabel } from "./BMInput";
10
+ import { BMRadio } from "./BMRadio";
11
+ import { BMToggle } from "./BMToggle";
12
+ import { BMTooltip } from "./BMTooltip";
13
+ import { BMAutoComplete } from "./BMAutoComplete";
14
+ import { BMFormHelperText } from "./BMFormHelperText";
15
+ import { colors, themeVariables as variables } from "./variables";
16
+ import { BMTab, BMTabs } from "./BMTabs";
17
+ import { BMMaps } from "./BMMaps";
18
+ import { BMButtonGroup } from "./BMButtonGroup";
19
+
20
+ declare module "@mui/material/styles/createPalette" {
21
+ // extend with extra common colors
22
+ interface CommonColors {
23
+ blue: string;
24
+ magenta: string;
25
+ purple: string;
26
+ purpleDark: string;
27
+ cyan: string;
28
+ orange: string;
29
+ yellow: string;
30
+ indigo: string;
31
+ }
32
+
33
+ // add more text color options
34
+ interface TypeText {
35
+ highlighted: string;
36
+ }
37
+
38
+ interface ChartColors {
39
+ stroke: {
40
+ cat1: string;
41
+ cat2: string;
42
+ cat3: string;
43
+ cat4: string;
44
+ cat5: string;
45
+ cat6: string;
46
+ cat7: string;
47
+ cat8: string;
48
+ cat9: string;
49
+ cat10: string;
50
+ };
51
+ fill: {
52
+ area1: string;
53
+ area2: string;
54
+ area3: string;
55
+ area4: string;
56
+ area5: string;
57
+ area6: string;
58
+ area7: string;
59
+ area8: string;
60
+ area9: string;
61
+ area10: string;
62
+ };
63
+ }
64
+
65
+ interface RedColors {
66
+ 50: string;
67
+ }
68
+
69
+ interface YellowColors {
70
+ 50: string;
71
+ }
72
+
73
+ interface GreenColors {
74
+ 50: string;
75
+ }
76
+
77
+ interface PurpleColors {
78
+ 50: string;
79
+ 100: string;
80
+ }
81
+
82
+ interface MarketingColors {
83
+ indigo: string;
84
+ orange: string;
85
+ }
86
+
87
+ // extend standard palette with chart colors
88
+ interface Palette {
89
+ red: RedColors;
90
+ green: GreenColors;
91
+ yellow: YellowColors;
92
+ purple: PurpleColors;
93
+ chart: ChartColors;
94
+ marketing: MarketingColors;
95
+ }
96
+
97
+ interface PaletteOptions {
98
+ red?: RedColors;
99
+ green?: GreenColors;
100
+ yellow?: YellowColors;
101
+ purple?: PurpleColors;
102
+ chart?: ChartColors;
103
+ marketing?: MarketingColors;
104
+ }
105
+
106
+ // extend standard palette with color tones
107
+ interface PaletteColor {
108
+ 50: string;
109
+ 100: string;
110
+ 200: string;
111
+ 300: string;
112
+ 400: string;
113
+ 500: string;
114
+ 600: string;
115
+ 700: string;
116
+ 800: string;
117
+ 900: string;
118
+ }
119
+ }
120
+
121
+ export const coreTheme = createTheme({
122
+ palette: {
123
+ primary: {
124
+ ...colors.primary,
125
+ main: colors.primary[600],
126
+ },
127
+ secondary: {
128
+ ...colors.secondary,
129
+ main: colors.secondary[600],
130
+ },
131
+ grey: {
132
+ ...colors.grey,
133
+ },
134
+ error: {
135
+ ...colors.error,
136
+ main: colors.error[500],
137
+ },
138
+ warning: {
139
+ ...colors.warning,
140
+ main: colors.warning[500],
141
+ },
142
+ success: {
143
+ ...colors.success,
144
+ main: colors.success[500],
145
+ },
146
+ info: {
147
+ ...colors.info,
148
+ main: colors.info[500],
149
+ },
150
+ common: {
151
+ ...colors.common,
152
+ },
153
+ background: {
154
+ ...colors.background,
155
+ },
156
+ text: {
157
+ primary: colors.grey[900],
158
+ secondary: colors.grey[600],
159
+ disabled: colors.grey[600],
160
+ },
161
+ action: {
162
+ hover: colors.primary[100],
163
+ selected: colors.primary[200],
164
+ disabledBackground: colors.grey[300],
165
+ },
166
+ divider: colors.grey[200],
167
+ } as PaletteOptions,
168
+ shape: {
169
+ ...variables,
170
+ },
171
+ typography: {
172
+ fontSize: 13,
173
+ fontFamily: '"Inter", sans-serif',
174
+ allVariants: {
175
+ letterSpacing: 0,
176
+ lineHeight: 1.25,
177
+ },
178
+ h1: {
179
+ fontSize: 32,
180
+ fontWeight: 700,
181
+ },
182
+ h2: {
183
+ fontSize: 24,
184
+ fontWeight: 700,
185
+ },
186
+ h3: {
187
+ fontSize: 21,
188
+ fontWeight: 700,
189
+ },
190
+ h4: {
191
+ fontSize: 18,
192
+ fontWeight: 700,
193
+ },
194
+ h5: {
195
+ fontSize: 15,
196
+ fontWeight: 700,
197
+ },
198
+ body1: {
199
+ fontSize: 13,
200
+ fontWeight: 600,
201
+ },
202
+ body2: {
203
+ fontSize: 13,
204
+ fontWeight: 400,
205
+ },
206
+ subtitle1: {
207
+ fontSize: 11.5,
208
+ fontWeight: 400,
209
+ },
210
+ subtitle2: {
211
+ fontSize: 11.5,
212
+ fontWeight: 600,
213
+ },
214
+ button: {
215
+ fontSize: 11.5,
216
+ fontWeight: 500,
217
+ textTransform: "uppercase",
218
+ },
219
+ gradient: {
220
+ background: "linear-gradient(282.49deg, #ed35c5 0.48%, #7879f1 93.17%)",
221
+ },
222
+ } as TypographyOptions,
223
+ components: {
224
+ MuiButton: BMButton,
225
+ MuiInput: BMInput,
226
+ MuiInputLabel: BMInputLabel,
227
+ MuiFormHelperText: BMFormHelperText,
228
+ MuiCheckbox: BMCheckbox,
229
+ MuiSwitch: BMToggle,
230
+ MuiRadio: BMRadio,
231
+ MuiTooltip: BMTooltip,
232
+ MuiAutocomplete: BMAutoComplete,
233
+ MuiButtonGroup: BMButtonGroup,
234
+ //Move to seperate file once this component override gets big
235
+ MuiSelect: {
236
+ styleOverrides: {
237
+ select: {
238
+ display: "flex",
239
+ alignItems: "center",
240
+ "&&": {
241
+ paddingRight: 28,
242
+ },
243
+ "&:focus": {
244
+ backgroundColor: "inherit",
245
+ },
246
+ "&$disabled": {
247
+ cursor: "not-allowed",
248
+ },
249
+ },
250
+ icon: {
251
+ position: "initial",
252
+ margin: "8px",
253
+ },
254
+ },
255
+ },
256
+ MuiMenu: {
257
+ styleOverrides: {
258
+ paper: {
259
+ boxShadow: variables.shadowThick,
260
+ },
261
+ },
262
+ },
263
+ MuiMenuItem: {
264
+ styleOverrides: {
265
+ root: {
266
+ height: 32,
267
+ fontSize: 13,
268
+ fontWeight: 400,
269
+ color: colors.grey[900],
270
+ "&$disabled": {
271
+ cursor: "not-allowed",
272
+ },
273
+ "&:focus": {
274
+ backgroundColor: colors.primary[100],
275
+ },
276
+ "&[aria-selected=true]": {
277
+ backgroundColor: colors.primary[200],
278
+ },
279
+ },
280
+ },
281
+ },
282
+ MuiListItem: {
283
+ styleOverrides: {
284
+ root: {
285
+ "&$selected": {
286
+ backgroundColor: colors.primary[200],
287
+ },
288
+ "&.Mui-focusVisible": {
289
+ backgroundColor: "unset",
290
+ },
291
+ },
292
+ button: {
293
+ "&:hover": {
294
+ backgroundColor: colors.primary[100],
295
+ },
296
+ "&$selected": {
297
+ backgroundColor: colors.primary[200],
298
+ },
299
+ "&:focus": {
300
+ backgroundColor: colors.primary[100],
301
+ },
302
+ },
303
+ },
304
+ },
305
+ MuiTabs: BMTabs,
306
+ MuiTab: BMTab,
307
+ MuiPopover: {
308
+ styleOverrides: {
309
+ paper: {
310
+ marginTop: 1,
311
+ fontSize: 13,
312
+ lineHeight: "32px",
313
+ borderWidth: 1,
314
+ borderColor: colors.grey[300],
315
+ borderStyle: "solid",
316
+ borderRadius: variables.borderRadius,
317
+ boxShadow: "none",
318
+ },
319
+ },
320
+ },
321
+ MuiPaper: {
322
+ defaultProps: { elevation: 0 },
323
+ },
324
+ BMMaps: BMMaps,
325
+ },
326
+ } as ThemeOptions);
@@ -0,0 +1,152 @@
1
+ import type {
2
+ CommonColors,
3
+ PaletteColor,
4
+ TypeBackground,
5
+ } from "@mui/material/styles/createPalette";
6
+
7
+ export const colors = {
8
+ primary: {
9
+ 100: "#F2F6FF",
10
+ 200: "#E5EDFF",
11
+ 300: "#CBDBFF",
12
+ 400: "#8DABF0",
13
+ 500: "#507CE1",
14
+ 600: "#2B59C3",
15
+ 700: "#1A44A5",
16
+ 800: "#0A2972",
17
+ 900: "#031541",
18
+ } as PaletteColor,
19
+ secondary: {
20
+ 100: "#F1F1F7",
21
+ 200: "#E9E9F2",
22
+ 300: "#CAC9DF",
23
+ 400: "#AAAAD0",
24
+ 500: "#7B7BB8",
25
+ 600: "#4F4FA4",
26
+ 700: "#30307F",
27
+ 800: "#171755",
28
+ 900: "#000041",
29
+ } as PaletteColor,
30
+ grey: {
31
+ 50: "#F7F9FB",
32
+ 100: "#F0F4F7",
33
+ 200: "#E9EEF2",
34
+ 300: "#D7DEE4", // sometimes refered as #D7DDE1 in designs
35
+ 400: "#B7C3CB",
36
+ 500: "#97A5B0",
37
+ 600: "#6D7C88",
38
+ 700: "#4E5F6D",
39
+ 800: "#25323D",
40
+ 900: "#0B1117",
41
+ } as PaletteColor,
42
+ red: {
43
+ 50: "#FEEDED",
44
+ } as PaletteColor,
45
+ yellow: {
46
+ 50: "#FFF6E3",
47
+ } as PaletteColor,
48
+ green: {
49
+ 50: "#F0FAF6",
50
+ } as PaletteColor,
51
+ purple: {
52
+ 50: "#F2F3FE",
53
+ 100: "#E8E9FE",
54
+ } as PaletteColor,
55
+ error: {
56
+ 100: "#FDE2E2",
57
+ 200: "#FDDCDC",
58
+ 300: "#F9ACAC",
59
+ 500: "#DA1515",
60
+ 700: "#8F0000",
61
+ 900: "#590000",
62
+ } as PaletteColor,
63
+ warning: {
64
+ 100: "#FFEEC8",
65
+ 300: "#FFD383",
66
+ 500: "#FFA400",
67
+ 700: "#C88900",
68
+ 900: "#9D6C00",
69
+ } as PaletteColor,
70
+ success: {
71
+ 100: "#CDEFE1",
72
+ 300: "#82D2B0",
73
+ 500: "#13A868",
74
+ 700: "#097345",
75
+ 900: "#024126",
76
+ } as PaletteColor,
77
+ info: {
78
+ 100: "#D7EFF4",
79
+ 200: "#DFF5FF",
80
+ 300: "#9EE7F5",
81
+ 400: "#F8FBFC",
82
+ 500: "#45C8E2",
83
+ 700: "#00819B",
84
+ 900: "#003E4B",
85
+ } as PaletteColor,
86
+ background: {
87
+ default: "#F7FAFC",
88
+ paper: "#FFFFFF",
89
+ grey005: "#FBFCFD",
90
+ } as TypeBackground,
91
+ // non-semantic common colors for things like charts, progress bars, etc
92
+ common: {
93
+ black: "#000000",
94
+ white: "#FFFFFF",
95
+ blue: "#36B8F5",
96
+ magenta: "#D74FEE",
97
+ purple: "#A5A6F6",
98
+ purpleDark: "#5D5FEF",
99
+ cyan: "#43BFC2",
100
+ orange: "#FF6E42",
101
+ yellow: "#FFFAC8",
102
+ indigo: "#5E60F0",
103
+ } as CommonColors,
104
+ chartStroke: {
105
+ cat1: "#30307F",
106
+ cat2: "#36B8F5",
107
+ cat3: "#BB43BC",
108
+ cat4: "#43BFC2",
109
+ cat5: "#90948E",
110
+ cat6: "#1C7180",
111
+ cat7: "#EEA95F",
112
+ cat8: "#3590D9",
113
+ cat9: "#F0679E",
114
+ cat10: "#707B8E",
115
+ cat11: "#20A7C9",
116
+ cat12: "#FF6142",
117
+ cat13: "#1C1CE7",
118
+ },
119
+ chartFill: {
120
+ area1: "#EAEAF2",
121
+ area2: "#EBF8FE",
122
+ area3: "#F8ECF8",
123
+ area4: "#ECF8F9",
124
+ area5: "#F4F4F3",
125
+ area6: "#E8F1F2",
126
+ area7: "#FDF6EF",
127
+ area8: "#EBF4FB",
128
+ area9: "#FDF0F5",
129
+ area10: "#F0F2F3",
130
+
131
+ // Bar chart properties
132
+ bar1: "#0098F0",
133
+ bar2: "#262666",
134
+ },
135
+ marketing: {
136
+ indigo: "#1E154B",
137
+ orange: "#FF5F3B",
138
+ },
139
+ };
140
+
141
+ export const themeVariables = {
142
+ screenMinWidth: 1024,
143
+ screenMinHeight: 600,
144
+ sidebarWidthMin: 62,
145
+ sidebarWidthMax: 232,
146
+ footerHeight: 40,
147
+ toolbarHeight: 55,
148
+ inputHeight: 32,
149
+ borderRadius: 8,
150
+ shadowLight: "0 0 4px 0 rgba(0,0,0,0.1)",
151
+ shadowThick: "0 0 8px 0 rgba(0,0,0,0.1)",
152
+ };
@@ -0,0 +1,9 @@
1
+ declare module "*.svg" {
2
+ const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
3
+ export default content;
4
+ }
5
+
6
+ declare module "*.css" {
7
+ const content: { [key: string]: string };
8
+ export default content;
9
+ }
@@ -0,0 +1,5 @@
1
+ declare module '*.svg' {
2
+ import React from 'react';
3
+ const SVGComponent: React.FC<React.SVGProps<SVGSVGElement>>;
4
+ export default SVGComponent;
5
+ }
@@ -0,0 +1,67 @@
1
+ import { Search } from "@mui/icons-material";
2
+ import { Box, SpeedDialIcon, Typography } from "@mui/material";
3
+ import type { Meta } from "@storybook/react";
4
+ import { BMButton, type BMAButtonProps } from "../src/bma";
5
+ import { BMSplitButtonProps } from "@bigmath-ui-library/core";
6
+ import { BMSplitButton } from "../src/bma/components/BMButton";
7
+
8
+ const meta: Meta<BMAButtonProps> = {
9
+ component: BMButton,
10
+ title: "bma/Button",
11
+ };
12
+ export default meta;
13
+
14
+ const getButtons = (type: BMAButtonProps["variant"], props: BMAButtonProps) => (
15
+ <Box sx={{ display: "flex", gap: "18px", alignItems: "center" }}>
16
+ <Typography variant="body2">{type}</Typography>
17
+ <BMButton {...props} variant={type}>
18
+ Button
19
+ </BMButton>
20
+ <BMButton {...props} disabled variant={type}>
21
+ Disabled
22
+ </BMButton>
23
+ <BMButton {...props} variant={type} id="hover">
24
+ Hover
25
+ </BMButton>
26
+ <BMButton {...props} variant={type} id="active">
27
+ Active
28
+ </BMButton>
29
+ <BMButton {...props} variant={type} startIcon={<Search />}>
30
+ Search
31
+ </BMButton>
32
+ <BMButton {...props} variant={type} endIcon={<SpeedDialIcon />}>
33
+ End Icon
34
+ </BMButton>
35
+ </Box>
36
+ );
37
+
38
+ export const Button = (props: BMAButtonProps) => (
39
+ <Box
40
+ sx={{
41
+ display: "flex",
42
+ gap: "18px",
43
+ alignItems: "center",
44
+ flexDirection: "column",
45
+ }}
46
+ >
47
+ {getButtons("primary", props)}
48
+ {getButtons("secondary", props)}
49
+ {getButtons("ghost", props)}
50
+ {getButtons("bmaPrimary", props)}
51
+ </Box>
52
+ );
53
+
54
+ Button.parameters = {
55
+ pseudo: {
56
+ hover: ["#hover"],
57
+ active: "#active",
58
+ },
59
+ };
60
+
61
+ export const SplitButton = (props: BMSplitButtonProps) => (
62
+ <BMSplitButton {...props} label="Split Button" variant="bmaPrimary" options={[
63
+ { label: "Option 1", onClick: () => { alert("Option 1 clicked") } },
64
+ { label: "Option 2", onClick: () => { alert("Option 2 clicked") } },
65
+ { label: "Option 3", onClick: () => { alert("Option 3 clicked") } },
66
+ ]} />
67
+ );
@@ -0,0 +1,55 @@
1
+ import { Box, Chip } from "@mui/material";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+
4
+ import { BMAccordion } from "../src";
5
+
6
+ const meta: Meta<typeof BMAccordion> = {
7
+ title: "InReview/BMAccordion",
8
+ component: BMAccordion,
9
+ tags: ["autodocs"],
10
+ argTypes: {
11
+ isAccordionList: { control: "boolean" },
12
+ },
13
+ };
14
+
15
+ export default meta;
16
+
17
+ type Story = StoryObj<typeof BMAccordion>;
18
+
19
+ export const Default: Story = {
20
+ args: {
21
+ titleContent: "Default Accordion",
22
+ defaultExpanded: true,
23
+ children: (
24
+ <Box sx={{ p: 2 }}>This is the content inside the accordion.</Box>
25
+ ),
26
+ },
27
+ };
28
+
29
+ export const WithChips: Story = {
30
+ args: {
31
+ titleContent: "Accordion with Chips",
32
+ defaultExpanded: false,
33
+ renderChips: () => (
34
+ <>
35
+ <Chip label="Active" size="small" sx={{ ml: 1 }} />
36
+ <Chip label="Beta" size="small" color="secondary" sx={{ ml: 1 }} />
37
+ </>
38
+ ),
39
+ children: (
40
+ <Box p={2}>
41
+ This accordion includes chips in its summary when collapsed.
42
+ </Box>
43
+ ),
44
+ },
45
+ };
46
+
47
+ export const AccordionListVariant: Story = {
48
+ args: {
49
+ titleContent: "List Accordion",
50
+ isAccordionList: true,
51
+ children: (
52
+ <Box sx={{ p: 2 }}>This is styled like an accordion list item.</Box>
53
+ ),
54
+ },
55
+ };
@@ -0,0 +1,40 @@
1
+ import { Button } from "@mui/material";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+
4
+ import { BMAddSection } from "../src";
5
+
6
+ const meta: Meta<typeof BMAddSection> = {
7
+ title: "InReview/BMAddSection",
8
+ component: BMAddSection,
9
+ tags: ["autodocs"],
10
+ };
11
+
12
+ export default meta;
13
+
14
+ type Story = StoryObj<typeof BMAddSection>;
15
+
16
+ export const Default: Story = {
17
+ args: {
18
+ title: "Add a New Section",
19
+ body: "This section contains information and controls to perform an action.",
20
+ bodyVariant: "body1",
21
+ controls: (
22
+ <>
23
+ <Button variant="contained" color="primary">
24
+ Submit
25
+ </Button>
26
+ <Button variant="outlined" color="secondary" sx={{ ml: 2 }}>
27
+ Cancel
28
+ </Button>
29
+ </>
30
+ ),
31
+ },
32
+ };
33
+
34
+ export const WithoutControls: Story = {
35
+ args: {
36
+ title: "Simple Section",
37
+ body: "This section has no controls at the bottom.",
38
+ bodyVariant: "body2",
39
+ },
40
+ };
@@ -0,0 +1,33 @@
1
+ import type { Meta } from "@storybook/react";
2
+ import { type BMAlertProps, type AlertVariant, BMAlert } from "../src";
3
+
4
+ export default {
5
+ title: "BMAlert",
6
+ component: BMAlert,
7
+ argTypes: {
8
+ text: { control: "text" },
9
+ onClose: { action: "close" },
10
+ },
11
+ } as Meta;
12
+
13
+ export const BMAlertStory = (args: BMAlertProps) => <BMAlert {...args} />;
14
+
15
+ BMAlertStory.storyName = "Alert Default Warning";
16
+
17
+ BMAlertStory.args = {
18
+ open: true,
19
+ text: "You will not be able to connect via this method until you configure your Network Access.",
20
+ variant: "warning" as AlertVariant,
21
+ isToast: false,
22
+ };
23
+
24
+ export const ToastStory = BMAlertStory.bind({});
25
+
26
+ ToastStory.storyName = "Toast Default Error";
27
+
28
+ ToastStory.args = {
29
+ open: true,
30
+ isToast: true,
31
+ variant: "error" as AlertVariant,
32
+ text: "Request failed because id was not provided.",
33
+ };