@campxdev/react-blueprint 0.1.24 → 0.1.26
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/.storybook/preview.tsx +0 -1
- package/package.json +2 -1
- package/src/components/DataDisplay/Avatar/Avatar.tsx +70 -0
- package/src/components/DataDisplay/Avatar/CircularAvatar.stories.tsx +27 -0
- package/src/components/DataDisplay/Avatar/SquareAvatar.stories.tsx +47 -0
- package/src/components/DataDisplay/SidePanel/SidePanel.stories.tsx +36 -0
- package/src/components/DataDisplay/SidePanel/SidePanel.tsx +9 -0
- package/src/components/{FeedBack → Feedback}/Spinner/Spinner.stories.tsx +2 -2
- package/src/components/Feedback/Tooltip/Tooltip.stories.tsx +44 -0
- package/src/components/Feedback/Tooltip/Tooltip.tsx +45 -0
- package/src/components/Icons/IconComponents/{TooltipIcon.tsx → BulbIcon.tsx} +4 -4
- package/src/components/Icons/IconComponents/CrossIcon.tsx +25 -0
- package/src/components/Icons/IconComponents/InfoIcon.tsx +1 -1
- package/src/components/Icons/IconComponents/ProductFeaturesIcon.tsx +72 -0
- package/src/components/Icons/export.ts +6 -2
- package/src/components/Input/Chips/Chips.stories.tsx +54 -0
- package/src/components/Input/Chips/Chips.tsx +44 -0
- package/src/components/Input/HelpButton/HelpButton.stories.tsx +21 -0
- package/src/components/Input/HelpButton/HelpButton.tsx +17 -0
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +1 -1
- package/src/components/Input/OtpInput/OtpInput.stories.tsx +20 -0
- package/src/components/Input/OtpInput/OtpInput.tsx +85 -0
- package/src/components/Input/RadioGroup/RadioGroup.stories.tsx +1 -3
- package/src/components/Input/RadioGroup/RadioGroup.tsx +2 -1
- package/src/components/Input/SearchBar/SearchBar.stories.tsx +51 -0
- package/src/components/Input/SearchBar/SearchBar.tsx +48 -0
- package/src/components/Input/SingleCheckBox/SIngleCheckBox.tsx +14 -1
- package/src/components/Input/SingleCheckBox/SingleCheckBox.stories.tsx +0 -1
- package/src/components/Input/SingleSelect/SingleSelect.stories.tsx +20 -1
- package/src/components/Input/SingleSelect/SingleSelect.tsx +86 -11
- package/src/components/Input/TextField/TextField.stories.tsx +20 -0
- package/src/components/Input/components/FetchingOptionsLoader.tsx +2 -2
- package/src/components/Layout/Header/AppHeader.stories.tsx +2 -1
- package/src/components/Layout/Header/AppHeader.tsx +6 -6
- package/src/components/Layout/Header/HeaderActions/HeaderActions.tsx +14 -21
- package/src/components/Layout/LayoutWrapper/LayoutWrapper.stories.tsx +1 -1
- package/src/components/Navigation/DropDownMenu/DropDownMenu.stories.tsx +3 -12
- package/src/components/export.ts +2 -0
- package/src/themes/colorTokens.ts +4 -4
- package/src/themes/commonTheme.ts +45 -1
- package/src/utils/campxAxios.ts +1 -3
- package/types/theme.d.ts +4 -0
- /package/src/components/{FeedBack → Feedback}/Spinner/Spinner.css +0 -0
- /package/src/components/{FeedBack → Feedback}/Spinner/Spinner.tsx +0 -0
- /package/src/components/{Modals → Navigation/DialogButton}/DialogButton.stories.tsx +0 -0
- /package/src/components/{Modals → Navigation/DialogButton}/DialogButton.tsx +0 -0
|
@@ -50,17 +50,10 @@ export const Primary: Story = {
|
|
|
50
50
|
<DropdownMenuItem
|
|
51
51
|
icon={<Icons.HelpIcon />}
|
|
52
52
|
label={"Register"}
|
|
53
|
-
onClick={() => {
|
|
54
|
-
console.log("hi");
|
|
55
|
-
}}
|
|
53
|
+
onClick={() => {}}
|
|
56
54
|
/>,
|
|
57
55
|
|
|
58
|
-
<DropdownMenuItem
|
|
59
|
-
label={"Active Devices"}
|
|
60
|
-
onClick={() => {
|
|
61
|
-
console.log("hi");
|
|
62
|
-
}}
|
|
63
|
-
/>,
|
|
56
|
+
<DropdownMenuItem label={"Active Devices"} onClick={() => {}} />,
|
|
64
57
|
],
|
|
65
58
|
menuListProps: {
|
|
66
59
|
sx: { width: "20px" },
|
|
@@ -94,9 +87,7 @@ export const WithButtonLoading: Story = {
|
|
|
94
87
|
<DropdownMenuItem
|
|
95
88
|
icon={<Icons.HelpIcon />}
|
|
96
89
|
label={"Register"}
|
|
97
|
-
onClick={() => {
|
|
98
|
-
console.log("hi");
|
|
99
|
-
}}
|
|
90
|
+
onClick={() => {}}
|
|
100
91
|
/>,
|
|
101
92
|
],
|
|
102
93
|
},
|
package/src/components/export.ts
CHANGED
|
@@ -10,4 +10,6 @@ export * from "./Layout/LayoutWrapper/LayoutWrapper";
|
|
|
10
10
|
export * from "./Layout/PageContent/PageContent";
|
|
11
11
|
export * from "./Layout/SideNavigation/SideNavigation";
|
|
12
12
|
export * from "./Navigation/DropDownMenu/DropDownButton";
|
|
13
|
+
export * from "./Navigation/DropDownMenu/DropDownIcon";
|
|
13
14
|
export * from "./Navigation/DropDownMenu/DropDownMenu";
|
|
15
|
+
export * from "./Navigation/DropDownMenu/DropdownMenuItem";
|
|
@@ -21,10 +21,10 @@ export const LightColorTokens = {
|
|
|
21
21
|
main: "#88B053",
|
|
22
22
|
},
|
|
23
23
|
error: {
|
|
24
|
-
main: "F2353C",
|
|
24
|
+
main: "#F2353C",
|
|
25
25
|
},
|
|
26
26
|
warning: {
|
|
27
|
-
main: "ED9035",
|
|
27
|
+
main: "#ED9035",
|
|
28
28
|
},
|
|
29
29
|
info: {
|
|
30
30
|
main: "#4BAABE",
|
|
@@ -60,10 +60,10 @@ export const DarkColorTokens = {
|
|
|
60
60
|
main: "#88B053",
|
|
61
61
|
},
|
|
62
62
|
error: {
|
|
63
|
-
main: "F2353C",
|
|
63
|
+
main: "#F2353C",
|
|
64
64
|
},
|
|
65
65
|
warning: {
|
|
66
|
-
main: "ED9035",
|
|
66
|
+
main: "#ED9035",
|
|
67
67
|
},
|
|
68
68
|
info: {
|
|
69
69
|
main: "#4BAABE",
|
|
@@ -57,6 +57,22 @@ export const getCommonTheme = (mode: Theme) => {
|
|
|
57
57
|
},
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
|
+
MuiChip: {
|
|
61
|
+
styleOverrides: {
|
|
62
|
+
root: {
|
|
63
|
+
backgroundColor: ColorTokens.secondary.main,
|
|
64
|
+
"&:hover": {
|
|
65
|
+
backgroundColor: ColorTokens.secondary.dark,
|
|
66
|
+
},
|
|
67
|
+
borderRadius: "6px",
|
|
68
|
+
padding: "10px 10px",
|
|
69
|
+
fontSize: "14px",
|
|
70
|
+
fontWeight: 400,
|
|
71
|
+
fontFamily: "Heebo",
|
|
72
|
+
margin: "5px",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
60
76
|
MuiDialog: {
|
|
61
77
|
styleOverrides: {
|
|
62
78
|
root: {
|
|
@@ -166,6 +182,24 @@ export const getCommonTheme = (mode: Theme) => {
|
|
|
166
182
|
},
|
|
167
183
|
},
|
|
168
184
|
minWidth: "350px",
|
|
185
|
+
margin: "5px 0px",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
MuiTooltip: {
|
|
190
|
+
styleOverrides: {
|
|
191
|
+
tooltip: {
|
|
192
|
+
backgroundColor: ColorTokens.background.paper,
|
|
193
|
+
padding: "20px 30px",
|
|
194
|
+
minWidth: "300px",
|
|
195
|
+
boxShadow: `0px 2px 5px ${ColorTokens.secondary.main}`,
|
|
196
|
+
border: `1px solid ${ColorTokens.secondary.main}`,
|
|
197
|
+
},
|
|
198
|
+
arrow: {
|
|
199
|
+
color: ColorTokens.background.paper,
|
|
200
|
+
"&:before": {
|
|
201
|
+
border: `1px solid ${ColorTokens.secondary.main}`,
|
|
202
|
+
},
|
|
169
203
|
},
|
|
170
204
|
},
|
|
171
205
|
},
|
|
@@ -225,6 +259,7 @@ export const getCommonTheme = (mode: Theme) => {
|
|
|
225
259
|
maxHeight: "40px",
|
|
226
260
|
maxWidth: "400px",
|
|
227
261
|
},
|
|
262
|
+
overflowY: "auto",
|
|
228
263
|
},
|
|
229
264
|
paper: {
|
|
230
265
|
borderRadius: "10px",
|
|
@@ -294,7 +329,16 @@ export const getCommonTheme = (mode: Theme) => {
|
|
|
294
329
|
},
|
|
295
330
|
},
|
|
296
331
|
},
|
|
297
|
-
|
|
332
|
+
MuiAvatar: {
|
|
333
|
+
styleOverrides: {
|
|
334
|
+
root: {
|
|
335
|
+
background: ColorTokens.background.default,
|
|
336
|
+
cursor: "pointer",
|
|
337
|
+
border: `1px solid ${ColorTokens.primary.main}`,
|
|
338
|
+
color: ColorTokens.primary.main,
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
298
342
|
MuiTypography: {
|
|
299
343
|
styleOverrides: {
|
|
300
344
|
h6: {
|
package/src/utils/campxAxios.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
2
|
import { sessionKey } from "./constants";
|
|
3
3
|
|
|
4
|
-
console.log(window.location.pathname.split("/"));
|
|
5
|
-
|
|
6
4
|
const tenantCode = "campx";
|
|
7
5
|
const institutionCode = "campx";
|
|
8
6
|
const isProduction = process.env.NODE_ENV === "production";
|
|
@@ -13,7 +11,7 @@ export const campxAxios = axios.create({
|
|
|
13
11
|
headers: {
|
|
14
12
|
"x-tenant-id": tenantCode,
|
|
15
13
|
...(!isProduction
|
|
16
|
-
? { campx_session_key: sessionKey || "
|
|
14
|
+
? { campx_session_key: sessionKey || "665f03e7ae4c45811c3f5818" }
|
|
17
15
|
: {}),
|
|
18
16
|
"x-institution-id": institutionCode,
|
|
19
17
|
},
|
package/types/theme.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import "@mui/material/styles";
|
|
|
3
3
|
declare module "@mui/material/styles" {
|
|
4
4
|
interface Theme {
|
|
5
5
|
palette: {
|
|
6
|
+
[x: string]: any;
|
|
6
7
|
primary: {
|
|
7
8
|
dark: string;
|
|
8
9
|
main: string;
|
|
@@ -24,6 +25,9 @@ declare module "@mui/material/styles" {
|
|
|
24
25
|
highlight: {
|
|
25
26
|
main: string;
|
|
26
27
|
};
|
|
28
|
+
info: {
|
|
29
|
+
main: string;
|
|
30
|
+
};
|
|
27
31
|
grey: {
|
|
28
32
|
main: string;
|
|
29
33
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|