ece-docs-components 1.0.1 → 1.0.2
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/dist/ThemeProvider.d.ts +93 -6
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +43 -93
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +43 -139
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var styles = require('@mui/material/styles');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var utils = require('@mui/utils');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var material = require('@mui/material');
|
|
8
|
-
var iconsMaterial = require('@mui/icons-material');
|
|
9
|
-
|
|
10
|
-
function _interopNamespaceDefault(e) {
|
|
11
|
-
var n = Object.create(null);
|
|
12
|
-
if (e) {
|
|
13
|
-
Object.keys(e).forEach(function (k) {
|
|
14
|
-
if (k !== 'default') {
|
|
15
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return e[k]; }
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n.default = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
28
|
-
|
|
29
|
-
// Base MUI theme configuration (shared across all themes)
|
|
30
|
-
const baseTheme = styles.createTheme({
|
|
1
|
+
'use strict';var styles=require('@mui/material/styles'),jsxRuntime=require('react/jsx-runtime'),utils=require('@mui/utils'),React=require('react'),material=require('@mui/material'),iconsMaterial=require('@mui/icons-material');function _interopNamespaceDefault(e){var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var React__namespace=/*#__PURE__*/_interopNamespaceDefault(React);const baseTheme = styles.createTheme({
|
|
31
2
|
typography: {
|
|
32
3
|
fontFamily: ['Inter', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'sans-serif'].join(','),
|
|
33
4
|
},
|
|
@@ -37,7 +8,7 @@ const baseTheme = styles.createTheme({
|
|
|
37
8
|
body: {
|
|
38
9
|
WebkitFontSmoothing: 'antialiased',
|
|
39
10
|
MozOsxFontSmoothing: 'grayscale',
|
|
40
|
-
backgroundColor: '#FDFCEE',
|
|
11
|
+
backgroundColor: '#FDFCEE',
|
|
41
12
|
},
|
|
42
13
|
'input[type="checkbox"], input[type="radio"]': {
|
|
43
14
|
accentColor: theme.palette.secondary.main,
|
|
@@ -55,9 +26,9 @@ const baseTheme = styles.createTheme({
|
|
|
55
26
|
},
|
|
56
27
|
},
|
|
57
28
|
});
|
|
58
|
-
//
|
|
59
|
-
const
|
|
60
|
-
default:
|
|
29
|
+
// Store only the configuration overrides, not full themes
|
|
30
|
+
const themeConfigs = {
|
|
31
|
+
default: {
|
|
61
32
|
palette: {
|
|
62
33
|
primary: { main: '#AD46FF' },
|
|
63
34
|
secondary: { main: '#D79AFC' },
|
|
@@ -74,9 +45,9 @@ const muiThemes = {
|
|
|
74
45
|
tabBackgroundColor: '#F8F0FC',
|
|
75
46
|
},
|
|
76
47
|
},
|
|
77
|
-
appName: 'ECE Docs',
|
|
78
|
-
}
|
|
79
|
-
school:
|
|
48
|
+
appName: 'ECE Docs',
|
|
49
|
+
},
|
|
50
|
+
school: {
|
|
80
51
|
palette: {
|
|
81
52
|
primary: { main: '#386e41' },
|
|
82
53
|
secondary: { main: '#8fc790' },
|
|
@@ -89,9 +60,9 @@ const muiThemes = {
|
|
|
89
60
|
stepIndicatorTextColor: '#FFFFFF',
|
|
90
61
|
},
|
|
91
62
|
},
|
|
92
|
-
appName: 'School Docs',
|
|
93
|
-
}
|
|
94
|
-
health:
|
|
63
|
+
appName: 'School Docs',
|
|
64
|
+
},
|
|
65
|
+
health: {
|
|
95
66
|
palette: {
|
|
96
67
|
primary: { main: '#4871cf' },
|
|
97
68
|
secondary: { main: '#a4d6ff' },
|
|
@@ -108,13 +79,19 @@ const muiThemes = {
|
|
|
108
79
|
tabBackgroundColor: '#a4d6ff',
|
|
109
80
|
},
|
|
110
81
|
},
|
|
111
|
-
appName: 'GP Docs',
|
|
112
|
-
}
|
|
82
|
+
appName: 'GP Docs',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
// Create themes on-demand using useMemo
|
|
86
|
+
const createMuiTheme = (key) => {
|
|
87
|
+
return styles.createTheme(utils.deepmerge(baseTheme, themeConfigs[key]));
|
|
113
88
|
};
|
|
114
89
|
const ThemeContext = React__namespace.createContext(undefined);
|
|
115
90
|
const ThemeProvider = ({ children }) => {
|
|
116
91
|
const [currentTheme, setCurrentTheme] = React__namespace.useState('default');
|
|
117
|
-
|
|
92
|
+
// Create theme on-demand, memoized
|
|
93
|
+
const theme = React__namespace.useMemo(() => createMuiTheme(currentTheme), [currentTheme]);
|
|
94
|
+
return (jsxRuntime.jsx(ThemeContext.Provider, { value: { currentTheme, setTheme: setCurrentTheme, theme }, children: jsxRuntime.jsx(styles.ThemeProvider, { theme: theme, children: children }) }));
|
|
118
95
|
};
|
|
119
96
|
const useTheme = () => {
|
|
120
97
|
const context = React__namespace.useContext(ThemeContext);
|
|
@@ -122,9 +99,7 @@ const useTheme = () => {
|
|
|
122
99
|
throw new Error('useTheme must be used within a ThemeProvider');
|
|
123
100
|
}
|
|
124
101
|
return context;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
const StyledButton = styles.styled(material.Button, {
|
|
102
|
+
};const StyledButton = styles.styled(material.Button, {
|
|
128
103
|
shouldForwardProp: (prop) => prop !== 'customVariant' && prop !== 'customSize',
|
|
129
104
|
})(({ theme, customVariant, customSize }) => {
|
|
130
105
|
const currentTheme = theme.palette;
|
|
@@ -223,9 +198,7 @@ const StyledButton = styles.styled(material.Button, {
|
|
|
223
198
|
});
|
|
224
199
|
const Button = ({ variant = 'primary', size = 'md', children, fullWidth = false, ...props }) => {
|
|
225
200
|
return (jsxRuntime.jsx(StyledButton, { customVariant: variant, customSize: size, fullWidth: fullWidth, disableRipple: true, ...props, children: children }));
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
const InputWrapper = material.styled('div')(({ theme }) => ({
|
|
201
|
+
};const InputWrapper = material.styled('div')(({ theme }) => ({
|
|
229
202
|
width: '100%',
|
|
230
203
|
}));
|
|
231
204
|
const StyledLabel$1 = material.styled(material.InputLabel)(({ theme }) => ({
|
|
@@ -292,9 +265,7 @@ const StyledTextField$1 = material.styled(material.TextField, {
|
|
|
292
265
|
const Input = ({ error, fullWidth = false, id, label, ...props }) => {
|
|
293
266
|
const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
294
267
|
return (jsxRuntime.jsxs(InputWrapper, { sx: { ...(!fullWidth && { width: 'auto' }) }, children: [label && (jsxRuntime.jsx(StyledLabel$1, { htmlFor: inputId, children: label })), jsxRuntime.jsx(StyledTextField$1, { id: inputId, error: !!error, helperText: error || props.helperText, errorMessage: error, fullWidth: fullWidth, variant: "outlined", ...props })] }));
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
const StyledCard = material.styled(material.Box, {
|
|
268
|
+
};const StyledCard = material.styled(material.Box, {
|
|
298
269
|
shouldForwardProp: (prop) => prop !== 'customPadding' && prop !== 'customVariant',
|
|
299
270
|
})(({ theme, customPadding, customVariant }) => {
|
|
300
271
|
const paddingStyles = {
|
|
@@ -329,9 +300,7 @@ const StyledCard = material.styled(material.Box, {
|
|
|
329
300
|
const Card = ({ children, className = '', padding = 'md', variant = 'default', sx, // Destructure sx prop
|
|
330
301
|
}) => {
|
|
331
302
|
return (jsxRuntime.jsx(StyledCard, { className: className, customPadding: padding, customVariant: variant, sx: sx, children: children }));
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
const StyledSelect = material.styled(material.Select)(({ theme, error }) => ({
|
|
303
|
+
};const StyledSelect = material.styled(material.Select)(({ theme, error }) => ({
|
|
335
304
|
backgroundColor: theme.palette.light.main,
|
|
336
305
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
337
306
|
? parseInt(theme.shape.borderRadius, 10)
|
|
@@ -415,9 +384,7 @@ const Select = ({ label, error, helperText, fullWidth = false, options, classNam
|
|
|
415
384
|
fontSize: '0.875rem',
|
|
416
385
|
color: `${theme.palette.dark.main}99`,
|
|
417
386
|
}, children: helperText }))] }));
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
const CustomRadioIcon = material.styled('span')(({ theme, checked }) => ({
|
|
387
|
+
};const CustomRadioIcon = material.styled('span')(({ theme, checked }) => ({
|
|
421
388
|
width: 20,
|
|
422
389
|
height: 20,
|
|
423
390
|
borderRadius: '50%',
|
|
@@ -466,9 +433,7 @@ const RadioGroup = ({ label, error, children, className = '' }) => {
|
|
|
466
433
|
fontSize: '0.875rem',
|
|
467
434
|
color: theme.palette.accent.main,
|
|
468
435
|
}, children: error }))] }));
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
const StyledWrapper$1 = material.styled(material.Box)(({ theme }) => ({
|
|
436
|
+
};const StyledWrapper$1 = material.styled(material.Box)(({ theme }) => ({
|
|
472
437
|
display: 'flex',
|
|
473
438
|
alignItems: 'flex-start',
|
|
474
439
|
}));
|
|
@@ -500,9 +465,7 @@ const StyledDescription = material.styled(material.Typography)(({ theme }) => ({
|
|
|
500
465
|
const Checkbox = ({ label, description, className = '', id, ...props }) => {
|
|
501
466
|
const checkboxId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
502
467
|
return (jsxRuntime.jsx(StyledWrapper$1, { className: className, children: jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(StyledCheckbox, { id: checkboxId, ...props }), label: jsxRuntime.jsxs(material.Box, { sx: { ml: 1.5, display: 'flex', flexDirection: 'column' }, children: [jsxRuntime.jsx(StyledLabel, { children: label }), description && jsxRuntime.jsx(StyledDescription, { children: description })] }) }) }));
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
const StyledLinearProgress = material.styled(material.LinearProgress)(({ theme }) => ({
|
|
468
|
+
};const StyledLinearProgress = material.styled(material.LinearProgress)(({ theme }) => ({
|
|
506
469
|
height: 10,
|
|
507
470
|
borderRadius: 9999,
|
|
508
471
|
backgroundColor: `${theme.palette.dark.main}1A`,
|
|
@@ -572,9 +535,7 @@ const StepIndicator = ({ steps, currentStep, className = '' }) => {
|
|
|
572
535
|
color: isActive ? theme.palette.primary.main : `${theme.palette.dark.main}99`,
|
|
573
536
|
}, children: step })] }), index < steps.length - 1 && (jsxRuntime.jsx(StepLine, { isCompleted: isCompleted }))] }, index));
|
|
574
537
|
}) }));
|
|
575
|
-
};
|
|
576
|
-
|
|
577
|
-
const StyledAlert = material.styled(material.Alert)(({ theme, customvariant }) => {
|
|
538
|
+
};const StyledAlert = material.styled(material.Alert)(({ theme, customvariant }) => {
|
|
578
539
|
const variants = {
|
|
579
540
|
info: {
|
|
580
541
|
backgroundColor: '#eff6ff',
|
|
@@ -642,9 +603,7 @@ const Alert = ({ variant = 'info', children, className = '', icon = true, sx, })
|
|
|
642
603
|
custom: 'info',
|
|
643
604
|
};
|
|
644
605
|
return (jsxRuntime.jsx(StyledAlert, { customvariant: variant, severity: severityMap[variant], icon: icon ? iconMap[variant] : false, className: className, sx: sx, children: children }));
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
const NoteContainer = material.styled(material.Box)({
|
|
606
|
+
};const NoteContainer = material.styled(material.Box)({
|
|
648
607
|
position: 'relative',
|
|
649
608
|
maxWidth: '100%',
|
|
650
609
|
});
|
|
@@ -743,9 +702,7 @@ const NoteBox = ({ variant = 'default', label, children, className = '', onEditC
|
|
|
743
702
|
onEditClick();
|
|
744
703
|
}
|
|
745
704
|
}, title: "Edit variable highlight", size: "small", children: jsxRuntime.jsx(iconsMaterial.EditRounded, { sx: { fontSize: 14, color: "#FFFFFF", strokeWidth: 2 } }) })] })] }));
|
|
746
|
-
};
|
|
747
|
-
|
|
748
|
-
const StyledDialog$1 = material.styled(material.Dialog)(({ theme }) => ({
|
|
705
|
+
};const StyledDialog$1 = material.styled(material.Dialog)(({ theme }) => ({
|
|
749
706
|
'& .MuiDialog-paper': {
|
|
750
707
|
borderRadius: theme.shape.borderRadius,
|
|
751
708
|
maxWidth: '896px',
|
|
@@ -846,9 +803,7 @@ const Modal = ({ isOpen, onClose, status, description, defaultText, note, accept
|
|
|
846
803
|
gap: 2,
|
|
847
804
|
justifyContent: { xs: 'space-between', sm: 'flex-end' },
|
|
848
805
|
}, children: [jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', gap: 1.5 }, children: [jsxRuntime.jsx(NavButton, { onClick: onPrevious, "aria-label": "Previous", children: jsxRuntime.jsx(iconsMaterial.ChevronLeftRounded, { sx: { fontSize: 20 } }) }), jsxRuntime.jsx(NavButton, { onClick: onNext, "aria-label": "Next", children: jsxRuntime.jsx(iconsMaterial.ChevronRightRounded, { sx: { fontSize: 20 } }) })] }), jsxRuntime.jsxs(material.Typography, { fontWeight: 500, fontSize: "1.125rem", sx: { ml: 1 }, children: [currentPage, "/", totalPages] })] })] })] })] }));
|
|
849
|
-
};
|
|
850
|
-
|
|
851
|
-
const StyledConcertina = material.styled(material.Box)(({ theme }) => ({
|
|
806
|
+
};const StyledConcertina = material.styled(material.Box)(({ theme }) => ({
|
|
852
807
|
width: '100%',
|
|
853
808
|
display: 'flex',
|
|
854
809
|
flexDirection: 'column',
|
|
@@ -989,9 +944,7 @@ function Concertina({ sections }) {
|
|
|
989
944
|
setTimeout(() => setCopiedId(null), 2000);
|
|
990
945
|
};
|
|
991
946
|
return (jsxRuntime.jsx(StyledConcertina, { children: sections.map((section) => (jsxRuntime.jsxs(StyledSection, { id: section.id, children: [jsxRuntime.jsxs(StyledHeader$1, { onClick: () => toggleSection(section.id), onMouseEnter: () => setHoveredTitle(section.id), onMouseLeave: () => setHoveredTitle(null), children: [jsxRuntime.jsxs(StyledTitleWrapper, { children: [jsxRuntime.jsx(StyledTitle, { isHovered: hoveredTitle === section.id, variant: "h3", children: section.title }), hoveredTitle === section.id && (jsxRuntime.jsxs(material.Box, { sx: { position: 'relative', flexShrink: 0 }, children: [jsxRuntime.jsx(StyledLinkButton, { onClick: (e) => copyJumpLink(section.id, e), "aria-label": "Copy link", children: jsxRuntime.jsx(iconsMaterial.LinkRounded, { sx: { fontSize: 20 } }) }), copiedId === section.id && (jsxRuntime.jsx(StyledTooltip, { children: "Link copied" }))] }))] }), jsxRuntime.jsx(StyledChevron, { sx: { fontSize: 20, transform: openSections.has(section.id) ? 'rotate(180deg)' : 'none' } })] }), jsxRuntime.jsx(material.Collapse, { in: openSections.has(section.id), children: jsxRuntime.jsx(StyledContent, { children: jsxRuntime.jsx(StyledContentText, { children: section.content }) }) })] }, section.id))) }));
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
const ReadByContainer = material.styled(material.Box)(({ theme }) => ({
|
|
947
|
+
}const ReadByContainer = material.styled(material.Box)(({ theme }) => ({
|
|
995
948
|
display: 'flex',
|
|
996
949
|
flexDirection: 'row',
|
|
997
950
|
alignItems: 'flex-start',
|
|
@@ -1036,9 +989,7 @@ const ReadBy = ({ names }) => {
|
|
|
1036
989
|
color: theme.palette.dark.main,
|
|
1037
990
|
ml: 1,
|
|
1038
991
|
}, children: displayText })] }), names.length > 5 && (jsxRuntime.jsx(ExpandButton, { onClick: () => setIsExpanded(!isExpanded), "aria-label": isExpanded ? 'Collapse' : 'Expand', size: "small", children: isExpanded ? (jsxRuntime.jsx(iconsMaterial.ExpandLessRounded, { sx: { fontSize: 16 } })) : (jsxRuntime.jsx(iconsMaterial.ExpandMoreRounded, { sx: { fontSize: 16 } })) }))] }));
|
|
1039
|
-
};
|
|
1040
|
-
|
|
1041
|
-
const StatusBarContainer = material.styled(material.Box)(({ theme }) => ({
|
|
992
|
+
};const StatusBarContainer = material.styled(material.Box)(({ theme }) => ({
|
|
1042
993
|
width: '100%',
|
|
1043
994
|
backgroundColor: '#F5C98E',
|
|
1044
995
|
padding: theme.spacing(1.5, 3),
|
|
@@ -1090,9 +1041,7 @@ const StatusBar = ({ itemCount, variant = 'actionstarted', onTailorClick, onNext
|
|
|
1090
1041
|
wordBreak: 'break-word',
|
|
1091
1042
|
textAlign: { xs: 'center', sm: 'left' },
|
|
1092
1043
|
}, children: variant === 'actionstarted' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(material.Box, { component: "span", sx: { fontWeight: 700 }, children: "Incomplete." }), " ", message] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(material.Box, { component: "span", sx: { fontWeight: 700 }, children: "Not started." }), " ", message] })) })] }), variant === 'actionstarted' ? (jsxRuntime.jsx(material.Box, { sx: { display: 'flex', gap: 1.5, flexShrink: 0 }, children: jsxRuntime.jsx(NextButton, { onClick: onNextClick, "aria-label": "Next", children: jsxRuntime.jsx(iconsMaterial.ChevronRightRounded, { sx: { fontSize: 20 } }) }) })) : (jsxRuntime.jsx(material.Box, { sx: { flexShrink: 0 }, children: jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: onTailorClick, children: "Tailor policies" }) }))] }));
|
|
1093
|
-
};
|
|
1094
|
-
|
|
1095
|
-
const TabsContainer = material.styled(material.Box)({
|
|
1044
|
+
};const TabsContainer = material.styled(material.Box)({
|
|
1096
1045
|
display: 'none',
|
|
1097
1046
|
'@media (min-width: 900px)': {
|
|
1098
1047
|
display: 'block',
|
|
@@ -1177,9 +1126,7 @@ const Tabs = ({ tabs, defaultTab }) => {
|
|
|
1177
1126
|
transform: mobileExpandedTab === tab.id ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
1178
1127
|
transition: 'transform 0.2s',
|
|
1179
1128
|
} })] }), jsxRuntime.jsx(material.Collapse, { in: mobileExpandedTab === tab.id, children: jsxRuntime.jsx(MobileTabContent, { children: tab.content }) })] }, tab.id))) })] }));
|
|
1180
|
-
};
|
|
1181
|
-
|
|
1182
|
-
const SidebarContainer = material.styled(material.Box)(({ theme, isOpen }) => ({
|
|
1129
|
+
};const SidebarContainer = material.styled(material.Box)(({ theme, isOpen }) => ({
|
|
1183
1130
|
height: '100vh',
|
|
1184
1131
|
position: 'sticky',
|
|
1185
1132
|
top: 0,
|
|
@@ -1372,9 +1319,7 @@ const Sidebar = ({ isOpen, onToggle, centreName = "Centre name goes here \n acro
|
|
|
1372
1319
|
fontSize: '0.875rem',
|
|
1373
1320
|
} }) }, index));
|
|
1374
1321
|
}) }) }))] }, subItem.id))) }) }))] }, item.id))) }) })] }) })] }));
|
|
1375
|
-
};
|
|
1376
|
-
|
|
1377
|
-
const StyledHeader = material.styled(material.Box)(({ theme }) => ({
|
|
1322
|
+
};const StyledHeader = material.styled(material.Box)(({ theme }) => ({
|
|
1378
1323
|
padding: theme.spacing(1.5, 4), // px-4 py-3
|
|
1379
1324
|
display: 'flex',
|
|
1380
1325
|
alignItems: 'center',
|
|
@@ -1539,9 +1484,7 @@ const Header = ({ userName = 'John Doe', userInitials = 'JD', }) => {
|
|
|
1539
1484
|
return (jsxRuntime.jsxs(StyledHeader, { children: [jsxRuntime.jsxs(StyledLogoWrapper, { children: [jsxRuntime.jsx(StyledLogoIcon, { children: jsxRuntime.jsx(iconsMaterial.SchoolRounded, { sx: { fontSize: 32, color: 'currentColor' } }) }), jsxRuntime.jsx(StyledLogoText, { variant: "h1", children: theme.appName })] }), jsxRuntime.jsx(StyledSearchContainer, { children: jsxRuntime.jsx(StyledTextField, { placeholder: "Search for a policy", variant: "outlined", fullWidth: true, InputProps: {
|
|
1540
1485
|
endAdornment: (jsxRuntime.jsx(StyledSearchButton, { children: jsxRuntime.jsx(StyledSearchIcon, { children: jsxRuntime.jsx(iconsMaterial.SearchRounded, { sx: { fontSize: 20 } }) }) })),
|
|
1541
1486
|
} }) }), jsxRuntime.jsxs(StyledUserContainer, { children: [jsxRuntime.jsx(StyledAvatar, { children: jsxRuntime.jsx(StyledAvatarText, { children: userInitials }) }), jsxRuntime.jsx(StyledUserName, { children: userName })] })] }));
|
|
1542
|
-
};
|
|
1543
|
-
|
|
1544
|
-
const Container = material.styled(material.Box)(({ theme }) => ({
|
|
1487
|
+
};const Container = material.styled(material.Box)(({ theme }) => ({
|
|
1545
1488
|
width: '100%',
|
|
1546
1489
|
[theme.breakpoints.up('md')]: {
|
|
1547
1490
|
position: 'sticky',
|
|
@@ -1593,9 +1536,7 @@ const TableOfContents = ({ sections, activeSection = 'current-section', }) => {
|
|
|
1593
1536
|
const isActive = section.id === activeSection;
|
|
1594
1537
|
return (jsxRuntime.jsx(NavLink, { href: `#${section.id}`, isActive: isActive, children: section.title }, section.id));
|
|
1595
1538
|
}) })] }) }));
|
|
1596
|
-
};
|
|
1597
|
-
|
|
1598
|
-
const ToggleButton = material.styled(material.Box)(({ theme }) => ({
|
|
1539
|
+
};const ToggleButton = material.styled(material.Box)(({ theme }) => ({
|
|
1599
1540
|
display: 'inline-flex',
|
|
1600
1541
|
alignItems: 'center',
|
|
1601
1542
|
gap: theme.spacing(1.5),
|
|
@@ -1644,9 +1585,7 @@ const Toggle = ({ label = 'Admin view', checked = false, onChange, }) => {
|
|
|
1644
1585
|
fontWeight: 500,
|
|
1645
1586
|
fontSize: '0.875rem',
|
|
1646
1587
|
}, children: label })] }));
|
|
1647
|
-
};
|
|
1648
|
-
|
|
1649
|
-
const StyledDialog = material.styled(material.Dialog)(({ theme }) => ({
|
|
1588
|
+
};const StyledDialog = material.styled(material.Dialog)(({ theme }) => ({
|
|
1650
1589
|
'& .MuiDialog-paper': {
|
|
1651
1590
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
1652
1591
|
? parseInt(theme.shape.borderRadius, 10)
|
|
@@ -1674,9 +1613,7 @@ const CloseButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
|
1674
1613
|
const SimpleModal = ({ isOpen, onClose, title, children, }) => {
|
|
1675
1614
|
const { theme } = useTheme();
|
|
1676
1615
|
return (jsxRuntime.jsxs(StyledDialog, { open: isOpen, onClose: onClose, maxWidth: "sm", fullWidth: true, children: [jsxRuntime.jsxs(StyledDialogTitle, { children: [title, jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(iconsMaterial.CloseRounded, { sx: { fontSize: 20, color: theme.palette.dark.main } }) })] }), jsxRuntime.jsx(material.DialogContent, { sx: { p: 3 }, children: children })] }));
|
|
1677
|
-
};
|
|
1678
|
-
|
|
1679
|
-
const StyledIconButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1616
|
+
};const StyledIconButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1680
1617
|
width: 48,
|
|
1681
1618
|
height: 48,
|
|
1682
1619
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
@@ -1697,9 +1634,7 @@ const StyledIconButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
|
1697
1634
|
}));
|
|
1698
1635
|
const ActionButton = ({ icon: Icon, onClick, label, sx, }) => {
|
|
1699
1636
|
return (jsxRuntime.jsx(StyledIconButton, { onClick: onClick, "aria-label": label, sx: sx, children: jsxRuntime.jsx(Icon, {}) }));
|
|
1700
|
-
};
|
|
1701
|
-
|
|
1702
|
-
const StyledWrapper = material.styled(material.Box)(({ theme }) => ({
|
|
1637
|
+
};const StyledWrapper = material.styled(material.Box)(({ theme }) => ({
|
|
1703
1638
|
// No specific wrapper styles needed, just a container
|
|
1704
1639
|
}));
|
|
1705
1640
|
const StyledParagraph = material.styled(material.Typography)(({ theme }) => ({
|
|
@@ -1763,9 +1698,7 @@ function DefinitionBox({ term, definition, children }) {
|
|
|
1763
1698
|
color: theme.palette.secondary.main
|
|
1764
1699
|
}
|
|
1765
1700
|
} })) })] })] }), isOpen && (jsxRuntime.jsx(StyledDefinitionBox, { children: jsxRuntime.jsx(StyledDefinitionText, { children: definition }) }))] }));
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
const HomeButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1701
|
+
}const HomeButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1769
1702
|
width: 40,
|
|
1770
1703
|
height: 40,
|
|
1771
1704
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
@@ -1872,33 +1805,4 @@ const Breadcrumb = ({ items, currentItem, dropdownItems = [], onItemSelect, }) =
|
|
|
1872
1805
|
vertical: 'top',
|
|
1873
1806
|
horizontal: 'left',
|
|
1874
1807
|
}, children: dropdownItems.map((item, index) => (jsxRuntime.jsx(StyledMenuItem, { onClick: () => handleItemClick(item), isActive: item === currentItem, children: item }, index))) }))] })] }));
|
|
1875
|
-
};
|
|
1876
|
-
|
|
1877
|
-
exports.ActionButton = ActionButton;
|
|
1878
|
-
exports.Alert = Alert;
|
|
1879
|
-
exports.Breadcrumb = Breadcrumb;
|
|
1880
|
-
exports.Button = Button;
|
|
1881
|
-
exports.Card = Card;
|
|
1882
|
-
exports.Checkbox = Checkbox;
|
|
1883
|
-
exports.Concertina = Concertina;
|
|
1884
|
-
exports.DefinitionBox = DefinitionBox;
|
|
1885
|
-
exports.Header = Header;
|
|
1886
|
-
exports.Input = Input;
|
|
1887
|
-
exports.Modal = Modal;
|
|
1888
|
-
exports.NoteBox = NoteBox;
|
|
1889
|
-
exports.Progress = Progress;
|
|
1890
|
-
exports.Radio = Radio;
|
|
1891
|
-
exports.RadioGroup = RadioGroup;
|
|
1892
|
-
exports.ReadBy = ReadBy;
|
|
1893
|
-
exports.Select = Select;
|
|
1894
|
-
exports.Sidebar = Sidebar;
|
|
1895
|
-
exports.SimpleModal = SimpleModal;
|
|
1896
|
-
exports.StatusBar = StatusBar;
|
|
1897
|
-
exports.StepIndicator = StepIndicator;
|
|
1898
|
-
exports.TableOfContents = TableOfContents;
|
|
1899
|
-
exports.Tabs = Tabs;
|
|
1900
|
-
exports.ThemeProvider = ThemeProvider;
|
|
1901
|
-
exports.Toggle = Toggle;
|
|
1902
|
-
exports.muiThemes = muiThemes;
|
|
1903
|
-
exports.useTheme = useTheme;
|
|
1904
|
-
//# sourceMappingURL=index.js.map
|
|
1808
|
+
};exports.ActionButton=ActionButton;exports.Alert=Alert;exports.Breadcrumb=Breadcrumb;exports.Button=Button;exports.Card=Card;exports.Checkbox=Checkbox;exports.Concertina=Concertina;exports.DefinitionBox=DefinitionBox;exports.Header=Header;exports.Input=Input;exports.Modal=Modal;exports.NoteBox=NoteBox;exports.Progress=Progress;exports.Radio=Radio;exports.RadioGroup=RadioGroup;exports.ReadBy=ReadBy;exports.Select=Select;exports.Sidebar=Sidebar;exports.SimpleModal=SimpleModal;exports.StatusBar=StatusBar;exports.StepIndicator=StepIndicator;exports.TableOfContents=TableOfContents;exports.Tabs=Tabs;exports.ThemeProvider=ThemeProvider;exports.Toggle=Toggle;exports.useTheme=useTheme;//# sourceMappingURL=index.js.map
|