ece-docs-components 1.0.5 → 1.0.7
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 +12 -0
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/cjs/ThemeProvider.js +159 -0
- package/dist/cjs/ThemeProvider.js.map +1 -0
- package/dist/cjs/components/ActionButton.js +31 -0
- package/dist/cjs/components/ActionButton.js.map +1 -0
- package/dist/cjs/components/Alert.js +79 -0
- package/dist/cjs/components/Alert.js.map +1 -0
- package/dist/cjs/components/Breadcrumb.js +120 -0
- package/dist/cjs/components/Breadcrumb.js.map +1 -0
- package/dist/cjs/components/Button.js +109 -0
- package/dist/cjs/components/Button.js.map +1 -0
- package/dist/cjs/components/Card.js +45 -0
- package/dist/cjs/components/Card.js.map +1 -0
- package/dist/cjs/components/Checkbox.js +42 -0
- package/dist/cjs/components/Checkbox.js.map +1 -0
- package/dist/cjs/components/Concertina.js +153 -0
- package/dist/cjs/components/Concertina.js.map +1 -0
- package/dist/cjs/components/DefinitionBox.js +77 -0
- package/dist/cjs/components/DefinitionBox.js.map +1 -0
- package/dist/cjs/components/Header.js +177 -0
- package/dist/cjs/components/Header.js.map +1 -0
- package/dist/cjs/components/Input.js +77 -0
- package/dist/cjs/components/Input.js.map +1 -0
- package/dist/cjs/components/Modal.js +114 -0
- package/dist/cjs/components/Modal.js.map +1 -0
- package/dist/cjs/components/NoteBox.js +111 -0
- package/dist/cjs/components/NoteBox.js.map +1 -0
- package/dist/cjs/components/Progress.js +83 -0
- package/dist/cjs/components/Progress.js.map +1 -0
- package/dist/cjs/components/Radio.js +61 -0
- package/dist/cjs/components/Radio.js.map +1 -0
- package/dist/cjs/components/ReadBy.js +58 -0
- package/dist/cjs/components/ReadBy.js.map +1 -0
- package/dist/cjs/components/Select.js +96 -0
- package/dist/cjs/components/Select.js.map +1 -0
- package/dist/cjs/components/Sidebar.js +206 -0
- package/dist/cjs/components/Sidebar.js.map +1 -0
- package/dist/cjs/components/SimpleModal.js +40 -0
- package/dist/cjs/components/SimpleModal.js.map +1 -0
- package/dist/cjs/components/StatusBar.js +64 -0
- package/dist/cjs/components/StatusBar.js.map +1 -0
- package/dist/cjs/components/TableOfContents.js +62 -0
- package/dist/cjs/components/TableOfContents.js.map +1 -0
- package/dist/cjs/components/Tabs.js +97 -0
- package/dist/cjs/components/Tabs.js.map +1 -0
- package/dist/cjs/components/Toggle.js +60 -0
- package/dist/cjs/components/Toggle.js.map +1 -0
- package/dist/cjs/index.js +57 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/esm/ThemeProvider.d.ts +117 -0
- package/dist/esm/ThemeProvider.js +137 -0
- package/dist/esm/ThemeProvider.js.map +1 -0
- package/dist/esm/components/ActionButton.d.ts +11 -0
- package/dist/esm/components/ActionButton.js +29 -0
- package/dist/esm/components/ActionButton.js.map +1 -0
- package/dist/esm/components/Alert.d.ts +11 -0
- package/dist/esm/components/Alert.js +77 -0
- package/dist/esm/components/Alert.js.map +1 -0
- package/dist/esm/components/Breadcrumb.d.ts +13 -0
- package/dist/esm/components/Breadcrumb.js +118 -0
- package/dist/esm/components/Breadcrumb.js.map +1 -0
- package/dist/esm/components/Button.d.ts +8 -0
- package/dist/esm/components/Button.js +107 -0
- package/dist/esm/components/Button.js.map +1 -0
- package/dist/esm/components/Card.d.ts +11 -0
- package/dist/esm/components/Card.js +43 -0
- package/dist/esm/components/Card.js.map +1 -0
- package/dist/esm/components/Checkbox.d.ts +8 -0
- package/dist/esm/components/Checkbox.js +40 -0
- package/dist/esm/components/Checkbox.js.map +1 -0
- package/dist/esm/components/Concertina.d.ts +10 -0
- package/dist/esm/components/Concertina.js +151 -0
- package/dist/esm/components/Concertina.js.map +1 -0
- package/dist/esm/components/DefinitionBox.d.ts +8 -0
- package/dist/esm/components/DefinitionBox.js +75 -0
- package/dist/esm/components/DefinitionBox.js.map +1 -0
- package/dist/esm/components/Header.d.ts +7 -0
- package/dist/esm/components/Header.js +175 -0
- package/dist/esm/components/Header.js.map +1 -0
- package/dist/esm/components/Input.d.ts +7 -0
- package/dist/esm/components/Input.js +75 -0
- package/dist/esm/components/Input.js.map +1 -0
- package/dist/esm/components/Modal.d.ts +20 -0
- package/dist/esm/components/Modal.js +112 -0
- package/dist/esm/components/Modal.js.map +1 -0
- package/dist/esm/components/NoteBox.d.ts +10 -0
- package/dist/esm/components/NoteBox.js +109 -0
- package/dist/esm/components/NoteBox.js.map +1 -0
- package/dist/esm/components/Progress.d.ts +15 -0
- package/dist/esm/components/Progress.js +80 -0
- package/dist/esm/components/Progress.js.map +1 -0
- package/dist/esm/components/Radio.d.ts +14 -0
- package/dist/esm/components/Radio.js +58 -0
- package/dist/esm/components/Radio.js.map +1 -0
- package/dist/esm/components/ReadBy.d.ts +6 -0
- package/dist/esm/components/ReadBy.js +56 -0
- package/dist/esm/components/ReadBy.js.map +1 -0
- package/dist/esm/components/Select.d.ts +19 -0
- package/dist/esm/components/Select.js +94 -0
- package/dist/esm/components/Select.js.map +1 -0
- package/dist/esm/components/Sidebar.d.ts +10 -0
- package/dist/esm/components/Sidebar.js +204 -0
- package/dist/esm/components/Sidebar.js.map +1 -0
- package/dist/esm/components/SimpleModal.d.ts +9 -0
- package/dist/esm/components/SimpleModal.js +38 -0
- package/dist/esm/components/SimpleModal.js.map +1 -0
- package/dist/esm/components/StatusBar.d.ts +9 -0
- package/dist/esm/components/StatusBar.js +62 -0
- package/dist/esm/components/StatusBar.js.map +1 -0
- package/dist/esm/components/TableOfContents.d.ts +11 -0
- package/dist/esm/components/TableOfContents.js +60 -0
- package/dist/esm/components/TableOfContents.js.map +1 -0
- package/dist/esm/components/Tabs.d.ts +12 -0
- package/dist/esm/components/Tabs.js +95 -0
- package/dist/esm/components/Tabs.js.map +1 -0
- package/dist/esm/components/Toggle.d.ts +8 -0
- package/dist/esm/components/Toggle.js +58 -0
- package/dist/esm/components/Toggle.js.map +1 -0
- package/dist/esm/components/index.d.ts +22 -0
- package/dist/esm/index.d.ts +25 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/theme-types.d.ts +39 -0
- package/dist/{index.esm.js → index.cjs} +270 -198
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +22 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +224 -242
- package/dist/index.js.map +1 -1
- package/package.json +15 -13
- package/dist/index.esm.js.map +0 -1
|
@@ -1,27 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { deepmerge } from '@mui/utils';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import React__default, { useState } from 'react';
|
|
6
|
-
import { Button as Button$1, styled as styled$1, InputLabel, TextField, Box, Select as Select$1, FormControl, MenuItem, FormHelperText, FormControlLabel, Typography, FormLabel, Checkbox as Checkbox$1, LinearProgress, Alert as Alert$1, IconButton, Dialog, DialogContent, Chip, Collapse, ListItemButton, List, ListItemText, Link, DialogTitle, Menu, Breadcrumbs } from '@mui/material';
|
|
7
|
-
import { ExpandMoreRounded, InfoOutlineRounded, HighlightOffRounded, ErrorOutlineRounded, TaskAltRounded, EditRounded, CloseRounded, StickyNote2Rounded, ChevronLeftRounded, ChevronRightRounded, LinkRounded, ExpandLessRounded, PieChartRounded, HomeRounded, TextSnippetRounded, HelpOutlineRounded, SchoolRounded, SearchRounded, AddRounded } from '@mui/icons-material';
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
8
3
|
|
|
9
|
-
|
|
4
|
+
var styles = require('@mui/material/styles');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var utils = require('@mui/utils');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var material = require('@mui/material');
|
|
9
|
+
var iconsMaterial = require('@mui/icons-material');
|
|
10
|
+
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
29
|
+
|
|
30
|
+
const baseTheme = styles.createTheme({
|
|
31
|
+
palette: {
|
|
32
|
+
text: {
|
|
33
|
+
primary: '#4D3019',
|
|
34
|
+
secondary: '#826E5C',
|
|
35
|
+
}
|
|
36
|
+
},
|
|
10
37
|
typography: {
|
|
11
38
|
fontFamily: ['Inter', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'sans-serif'].join(','),
|
|
39
|
+
allVariants: {
|
|
40
|
+
color: '#4D3019'
|
|
41
|
+
}
|
|
12
42
|
},
|
|
13
43
|
components: {
|
|
44
|
+
MuiTypography: {
|
|
45
|
+
styleOverrides: {
|
|
46
|
+
root: {
|
|
47
|
+
color: '#4D3019',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
14
51
|
MuiCssBaseline: {
|
|
15
|
-
styleOverrides:
|
|
52
|
+
styleOverrides: {
|
|
16
53
|
body: {
|
|
17
54
|
WebkitFontSmoothing: 'antialiased',
|
|
18
55
|
MozOsxFontSmoothing: 'grayscale',
|
|
19
56
|
backgroundColor: '#FDFCEE',
|
|
57
|
+
color: '#4D3019',
|
|
20
58
|
},
|
|
21
59
|
'input[type="checkbox"], input[type="radio"]': {
|
|
22
|
-
accentColor:
|
|
60
|
+
accentColor: '#D79AFC',
|
|
23
61
|
},
|
|
24
|
-
}
|
|
62
|
+
},
|
|
25
63
|
},
|
|
26
64
|
},
|
|
27
65
|
breakpoints: {
|
|
@@ -34,7 +72,6 @@ const baseTheme = createTheme({
|
|
|
34
72
|
},
|
|
35
73
|
},
|
|
36
74
|
});
|
|
37
|
-
// Store only the configuration overrides, not full themes
|
|
38
75
|
const themeConfigs = {
|
|
39
76
|
default: {
|
|
40
77
|
palette: {
|
|
@@ -44,6 +81,10 @@ const themeConfigs = {
|
|
|
44
81
|
dark: { main: '#4D3019' },
|
|
45
82
|
light: { main: '#FEFDF7' },
|
|
46
83
|
markedRead: { main: '#A3D977' },
|
|
84
|
+
text: {
|
|
85
|
+
primary: '#4D3019',
|
|
86
|
+
secondary: '#826E5C',
|
|
87
|
+
},
|
|
47
88
|
custom: {
|
|
48
89
|
iconColor: '#ebc7ff',
|
|
49
90
|
primaryButtonTextColor: '#FFFFFF',
|
|
@@ -63,6 +104,10 @@ const themeConfigs = {
|
|
|
63
104
|
dark: { main: '#4D3019' },
|
|
64
105
|
light: { main: '#FEFDF7' },
|
|
65
106
|
markedRead: { main: '#A3D977' },
|
|
107
|
+
text: {
|
|
108
|
+
primary: '#4D3019',
|
|
109
|
+
secondary: '#826E5C',
|
|
110
|
+
},
|
|
66
111
|
custom: {
|
|
67
112
|
primaryButtonTextColor: '#FFFFFF',
|
|
68
113
|
stepIndicatorTextColor: '#FFFFFF',
|
|
@@ -78,6 +123,10 @@ const themeConfigs = {
|
|
|
78
123
|
dark: { main: '#4D3019' },
|
|
79
124
|
light: { main: '#FEFDF7' },
|
|
80
125
|
markedRead: { main: '#A3D977' },
|
|
126
|
+
text: {
|
|
127
|
+
primary: '#4D3019',
|
|
128
|
+
secondary: '#826E5C',
|
|
129
|
+
},
|
|
81
130
|
custom: {
|
|
82
131
|
iconColor: '#a4d6ff',
|
|
83
132
|
primaryButtonTextColor: '#FFFFFF',
|
|
@@ -90,26 +139,24 @@ const themeConfigs = {
|
|
|
90
139
|
appName: 'GP Docs',
|
|
91
140
|
},
|
|
92
141
|
};
|
|
93
|
-
// Create themes on-demand using useMemo
|
|
94
142
|
const createMuiTheme = (key) => {
|
|
95
|
-
return createTheme(deepmerge(baseTheme, themeConfigs[key]));
|
|
143
|
+
return styles.createTheme(utils.deepmerge(baseTheme, themeConfigs[key]));
|
|
96
144
|
};
|
|
97
|
-
const ThemeContext =
|
|
145
|
+
const ThemeContext = React__namespace.createContext(undefined);
|
|
98
146
|
const ThemeProvider = ({ children }) => {
|
|
99
|
-
const [currentTheme, setCurrentTheme] =
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return (jsx(ThemeContext.Provider, { value: { currentTheme, setTheme: setCurrentTheme, theme }, children: jsx(ThemeProvider$1, { theme: theme, children: children }) }));
|
|
147
|
+
const [currentTheme, setCurrentTheme] = React__namespace.useState('default');
|
|
148
|
+
const theme = React__namespace.useMemo(() => createMuiTheme(currentTheme), [currentTheme]);
|
|
149
|
+
return (jsxRuntime.jsx(ThemeContext.Provider, { value: { currentTheme, setTheme: setCurrentTheme, theme }, children: jsxRuntime.jsx(styles.ThemeProvider, { theme: theme, children: children }) }));
|
|
103
150
|
};
|
|
104
151
|
const useTheme = () => {
|
|
105
|
-
const context =
|
|
152
|
+
const context = React__namespace.useContext(ThemeContext);
|
|
106
153
|
if (context === undefined) {
|
|
107
154
|
throw new Error('useTheme must be used within a ThemeProvider');
|
|
108
155
|
}
|
|
109
156
|
return context;
|
|
110
157
|
};
|
|
111
158
|
|
|
112
|
-
const StyledButton = styled(Button
|
|
159
|
+
const StyledButton = styles.styled(material.Button, {
|
|
113
160
|
shouldForwardProp: (prop) => prop !== 'customVariant' && prop !== 'customSize',
|
|
114
161
|
})(({ theme, customVariant, customSize }) => {
|
|
115
162
|
const currentTheme = theme.palette;
|
|
@@ -207,13 +254,13 @@ const StyledButton = styled(Button$1, {
|
|
|
207
254
|
};
|
|
208
255
|
});
|
|
209
256
|
const Button = ({ variant = 'primary', size = 'md', children, fullWidth = false, ...props }) => {
|
|
210
|
-
return (jsx(StyledButton, { customVariant: variant, customSize: size, fullWidth: fullWidth, disableRipple: true, ...props, children: children }));
|
|
257
|
+
return (jsxRuntime.jsx(StyledButton, { customVariant: variant, customSize: size, fullWidth: fullWidth, disableRipple: true, ...props, children: children }));
|
|
211
258
|
};
|
|
212
259
|
|
|
213
|
-
const InputWrapper = styled
|
|
260
|
+
const InputWrapper = material.styled('div')(({ theme }) => ({
|
|
214
261
|
width: '100%',
|
|
215
262
|
}));
|
|
216
|
-
const StyledLabel$1 = styled
|
|
263
|
+
const StyledLabel$1 = material.styled(material.InputLabel)(({ theme }) => ({
|
|
217
264
|
fontSize: '0.875rem',
|
|
218
265
|
fontWeight: 500,
|
|
219
266
|
color: theme.palette.dark.main,
|
|
@@ -225,7 +272,7 @@ const StyledLabel$1 = styled$1(InputLabel)(({ theme }) => ({
|
|
|
225
272
|
color: theme.palette.dark.main,
|
|
226
273
|
},
|
|
227
274
|
}));
|
|
228
|
-
const StyledTextField$1 = styled
|
|
275
|
+
const StyledTextField$1 = material.styled(material.TextField, {
|
|
229
276
|
shouldForwardProp: (prop) => !['errorMessage'].includes(prop),
|
|
230
277
|
})(({ theme, errorMessage }) => ({
|
|
231
278
|
width: '100%',
|
|
@@ -276,10 +323,10 @@ const StyledTextField$1 = styled$1(TextField, {
|
|
|
276
323
|
}));
|
|
277
324
|
const Input = ({ error, fullWidth = false, id, label, ...props }) => {
|
|
278
325
|
const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
|
|
279
|
-
return (jsxs(InputWrapper, { sx: { ...(!fullWidth && { width: 'auto' }) }, children: [label && (jsx(StyledLabel$1, { htmlFor: inputId, children: label })), jsx(StyledTextField$1, { id: inputId, error: !!error, helperText: error || props.helperText, errorMessage: error, fullWidth: fullWidth, variant: "outlined", ...props })] }));
|
|
326
|
+
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 })] }));
|
|
280
327
|
};
|
|
281
328
|
|
|
282
|
-
const StyledCard = styled
|
|
329
|
+
const StyledCard = material.styled(material.Box, {
|
|
283
330
|
shouldForwardProp: (prop) => prop !== 'customPadding' && prop !== 'customVariant',
|
|
284
331
|
})(({ theme, customPadding, customVariant }) => {
|
|
285
332
|
const paddingStyles = {
|
|
@@ -313,10 +360,10 @@ const StyledCard = styled$1(Box, {
|
|
|
313
360
|
});
|
|
314
361
|
const Card = ({ children, className = '', padding = 'md', variant = 'default', sx, // Destructure sx prop
|
|
315
362
|
}) => {
|
|
316
|
-
return (jsx(StyledCard, { className: className, customPadding: padding, customVariant: variant, sx: sx, children: children }));
|
|
363
|
+
return (jsxRuntime.jsx(StyledCard, { className: className, customPadding: padding, customVariant: variant, sx: sx, children: children }));
|
|
317
364
|
};
|
|
318
365
|
|
|
319
|
-
const StyledSelect = styled
|
|
366
|
+
const StyledSelect = material.styled(material.Select)(({ theme, error }) => ({
|
|
320
367
|
backgroundColor: theme.palette.light.main,
|
|
321
368
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
322
369
|
? parseInt(theme.shape.borderRadius, 10)
|
|
@@ -344,7 +391,7 @@ const StyledSelect = styled$1(Select$1)(({ theme, error }) => ({
|
|
|
344
391
|
color: `${theme.palette.dark.main}66`,
|
|
345
392
|
},
|
|
346
393
|
}));
|
|
347
|
-
const StyledInputLabel = styled
|
|
394
|
+
const StyledInputLabel = material.styled(material.InputLabel)(({ theme }) => ({
|
|
348
395
|
fontSize: '0.875rem',
|
|
349
396
|
fontWeight: 500,
|
|
350
397
|
color: theme.palette.dark.main,
|
|
@@ -371,7 +418,7 @@ const Select = ({ label, error, helperText, fullWidth = false, options, classNam
|
|
|
371
418
|
onChange(syntheticEvent);
|
|
372
419
|
}
|
|
373
420
|
};
|
|
374
|
-
return (jsxs(FormControl, { fullWidth: fullWidth, error: !!error, className: className, children: [label && (jsx(StyledInputLabel, { htmlFor: selectId, shrink: false, children: label })), jsx(StyledSelect, { id: selectId, name: name, value: value || '', onChange: handleChange, disabled: disabled, error: !!error, IconComponent: ExpandMoreRounded, MenuProps: {
|
|
421
|
+
return (jsxRuntime.jsxs(material.FormControl, { fullWidth: fullWidth, error: !!error, className: className, children: [label && (jsxRuntime.jsx(StyledInputLabel, { htmlFor: selectId, shrink: false, children: label })), jsxRuntime.jsx(StyledSelect, { id: selectId, name: name, value: value || '', onChange: handleChange, disabled: disabled, error: !!error, IconComponent: iconsMaterial.ExpandMoreRounded, MenuProps: {
|
|
375
422
|
PaperProps: {
|
|
376
423
|
sx: {
|
|
377
424
|
mt: 1,
|
|
@@ -379,7 +426,7 @@ const Select = ({ label, error, helperText, fullWidth = false, options, classNam
|
|
|
379
426
|
boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
|
|
380
427
|
},
|
|
381
428
|
},
|
|
382
|
-
}, children: options.map((option) => (jsx(MenuItem, { value: option.value, sx: {
|
|
429
|
+
}, children: options.map((option) => (jsxRuntime.jsx(material.MenuItem, { value: option.value, sx: {
|
|
383
430
|
fontSize: '1rem',
|
|
384
431
|
color: theme.palette.dark.main,
|
|
385
432
|
'&:hover': {
|
|
@@ -391,18 +438,18 @@ const Select = ({ label, error, helperText, fullWidth = false, options, classNam
|
|
|
391
438
|
backgroundColor: `${theme.palette.primary.main}33`,
|
|
392
439
|
},
|
|
393
440
|
},
|
|
394
|
-
}, children: option.label }, option.value))) }), error && (jsx(FormHelperText, { sx: {
|
|
441
|
+
}, children: option.label }, option.value))) }), error && (jsxRuntime.jsx(material.FormHelperText, { sx: {
|
|
395
442
|
mt: 0.75,
|
|
396
443
|
fontSize: '0.875rem',
|
|
397
444
|
color: theme.palette.accent.main,
|
|
398
|
-
}, children: error })), helperText && !error && (jsx(FormHelperText, { sx: {
|
|
445
|
+
}, children: error })), helperText && !error && (jsxRuntime.jsx(material.FormHelperText, { sx: {
|
|
399
446
|
mt: 0.75,
|
|
400
447
|
fontSize: '0.875rem',
|
|
401
448
|
color: `${theme.palette.dark.main}99`,
|
|
402
449
|
}, children: helperText }))] }));
|
|
403
450
|
};
|
|
404
451
|
|
|
405
|
-
const CustomRadioIcon = styled
|
|
452
|
+
const CustomRadioIcon = material.styled('span')(({ theme, checked }) => ({
|
|
406
453
|
width: 20,
|
|
407
454
|
height: 20,
|
|
408
455
|
borderRadius: '50%',
|
|
@@ -416,7 +463,7 @@ const CustomRadioIcon = styled$1('span')(({ theme, checked }) => ({
|
|
|
416
463
|
const Radio = ({ label, description, className = '', id, checked, ...props }) => {
|
|
417
464
|
const radioId = id || `radio-${Math.random().toString(36).substr(2, 9)}`;
|
|
418
465
|
const { theme } = useTheme();
|
|
419
|
-
return (jsx(FormControlLabel, { className: className, control: jsxs(Box, { sx: { display: 'flex', alignItems: 'center', height: 24, mr: 1.5 }, children: [jsx("input", { id: radioId, type: "radio", style: { display: 'none' }, checked: checked, ...props }), jsx(CustomRadioIcon, { checked: checked, onClick: (e) => {
|
|
466
|
+
return (jsxRuntime.jsx(material.FormControlLabel, { className: className, control: jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', alignItems: 'center', height: 24, mr: 1.5 }, children: [jsxRuntime.jsx("input", { id: radioId, type: "radio", style: { display: 'none' }, checked: checked, ...props }), jsxRuntime.jsx(CustomRadioIcon, { checked: checked, onClick: (e) => {
|
|
420
467
|
const input = document.getElementById(radioId);
|
|
421
468
|
if (input && !props.disabled) {
|
|
422
469
|
input.click();
|
|
@@ -424,13 +471,13 @@ const Radio = ({ label, description, className = '', id, checked, ...props }) =>
|
|
|
424
471
|
}, sx: {
|
|
425
472
|
cursor: props.disabled ? 'not-allowed' : 'pointer',
|
|
426
473
|
opacity: props.disabled ? 0.5 : 1,
|
|
427
|
-
} })] }), label: jsxs(Box, { sx: { ml: 0 }, children: [jsx(Typography, { component: "label", htmlFor: radioId, sx: {
|
|
474
|
+
} })] }), label: jsxRuntime.jsxs(material.Box, { sx: { ml: 0 }, children: [jsxRuntime.jsx(material.Typography, { component: "label", htmlFor: radioId, sx: {
|
|
428
475
|
fontSize: '1rem',
|
|
429
476
|
fontWeight: 500,
|
|
430
477
|
color: theme.palette.dark.main,
|
|
431
478
|
cursor: props.disabled ? 'not-allowed' : 'pointer',
|
|
432
479
|
opacity: props.disabled ? 0.5 : 1,
|
|
433
|
-
}, children: label }), description && (jsx(Typography, { variant: "body2", sx: {
|
|
480
|
+
}, children: label }), description && (jsxRuntime.jsx(material.Typography, { variant: "body2", sx: {
|
|
434
481
|
fontSize: '0.875rem',
|
|
435
482
|
color: `${theme.palette.dark.main}99`,
|
|
436
483
|
mt: 0.25,
|
|
@@ -438,7 +485,7 @@ const Radio = ({ label, description, className = '', id, checked, ...props }) =>
|
|
|
438
485
|
};
|
|
439
486
|
const RadioGroup = ({ label, error, children, className = '' }) => {
|
|
440
487
|
const { theme } = useTheme();
|
|
441
|
-
return (jsxs(FormControl, { component: "fieldset", className: className, error: !!error, fullWidth: true, children: [label && (jsx(FormLabel, { component: "legend", sx: {
|
|
488
|
+
return (jsxRuntime.jsxs(material.FormControl, { component: "fieldset", className: className, error: !!error, fullWidth: true, children: [label && (jsxRuntime.jsx(material.FormLabel, { component: "legend", sx: {
|
|
442
489
|
fontSize: '0.875rem',
|
|
443
490
|
fontWeight: 500,
|
|
444
491
|
color: theme.palette.dark.main,
|
|
@@ -446,18 +493,18 @@ const RadioGroup = ({ label, error, children, className = '' }) => {
|
|
|
446
493
|
'&.Mui-focused': {
|
|
447
494
|
color: theme.palette.dark.main,
|
|
448
495
|
},
|
|
449
|
-
}, children: label })), jsx(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 1.5 }, children: children }), error && (jsx(FormHelperText, { sx: {
|
|
496
|
+
}, children: label })), jsxRuntime.jsx(material.Box, { sx: { display: 'flex', flexDirection: 'column', gap: 1.5 }, children: children }), error && (jsxRuntime.jsx(material.FormHelperText, { sx: {
|
|
450
497
|
mt: 1,
|
|
451
498
|
fontSize: '0.875rem',
|
|
452
499
|
color: theme.palette.accent.main,
|
|
453
500
|
}, children: error }))] }));
|
|
454
501
|
};
|
|
455
502
|
|
|
456
|
-
const StyledWrapper$1 = styled
|
|
503
|
+
const StyledWrapper$1 = material.styled(material.Box)(({ theme }) => ({
|
|
457
504
|
display: 'flex',
|
|
458
505
|
alignItems: 'flex-start',
|
|
459
506
|
}));
|
|
460
|
-
const StyledCheckbox = styled
|
|
507
|
+
const StyledCheckbox = material.styled(material.Checkbox)(({ theme }) => ({
|
|
461
508
|
width: 16, // Matches Tailwind's w-4 (16px)
|
|
462
509
|
height: 16, // Matches Tailwind's h-4 (16px)
|
|
463
510
|
color: theme.palette.dark.main + '33', // dark.main with 20% opacity (border-dark/20)
|
|
@@ -471,23 +518,23 @@ const StyledCheckbox = styled$1(Checkbox$1)(({ theme }) => ({
|
|
|
471
518
|
borderRadius: theme.shape.borderRadius, // Matches rounded
|
|
472
519
|
cursor: 'pointer',
|
|
473
520
|
}));
|
|
474
|
-
const StyledLabel = styled
|
|
521
|
+
const StyledLabel = material.styled(material.Typography)(({ theme }) => ({
|
|
475
522
|
fontSize: '1rem', // text-base (16px)
|
|
476
523
|
fontWeight: 500, // font-medium
|
|
477
524
|
color: theme.palette.dark.main, // text-dark
|
|
478
525
|
cursor: 'pointer',
|
|
479
526
|
}));
|
|
480
|
-
const StyledDescription = styled
|
|
527
|
+
const StyledDescription = material.styled(material.Typography)(({ theme }) => ({
|
|
481
528
|
fontSize: '0.875rem', // text-sm (14px)
|
|
482
529
|
color: theme.palette.dark.main + '99', // dark.main with 60% opacity (text-dark/60)
|
|
483
530
|
marginTop: theme.spacing(0.5), // mt-0.5
|
|
484
531
|
}));
|
|
485
532
|
const Checkbox = ({ label, description, className = '', id, ...props }) => {
|
|
486
533
|
const checkboxId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
487
|
-
return (jsx(StyledWrapper$1, { className: className, children: jsx(FormControlLabel, { control: jsx(StyledCheckbox, { id: checkboxId, ...props }), label: jsxs(Box, { sx: { ml: 1.5, display: 'flex', flexDirection: 'column' }, children: [jsx(StyledLabel, { children: label }), description && jsx(StyledDescription, { children: description })] }) }) }));
|
|
534
|
+
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 })] }) }) }));
|
|
488
535
|
};
|
|
489
536
|
|
|
490
|
-
const StyledLinearProgress = styled
|
|
537
|
+
const StyledLinearProgress = material.styled(material.LinearProgress)(({ theme }) => ({
|
|
491
538
|
height: 10,
|
|
492
539
|
borderRadius: 9999,
|
|
493
540
|
backgroundColor: `${theme.palette.dark.main}1A`,
|
|
@@ -499,9 +546,9 @@ const StyledLinearProgress = styled$1(LinearProgress)(({ theme }) => ({
|
|
|
499
546
|
}));
|
|
500
547
|
const Progress = ({ current, total, showLabel = true, className = '' }) => {
|
|
501
548
|
const percentage = Math.min(Math.max((current / total) * 100, 0), 100);
|
|
502
|
-
return (jsxs(Box, { className: className, children: [showLabel && (jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1 }, children: [jsxs(Typography, { variant: "body2", fontWeight: 500, children: ["Step ", current, " of ", total] }), jsxs(Typography, { variant: "body2", fontWeight: 500, children: [Math.round(percentage), "%"] })] })), jsx(StyledLinearProgress, { variant: "determinate", value: percentage })] }));
|
|
549
|
+
return (jsxRuntime.jsxs(material.Box, { className: className, children: [showLabel && (jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1 }, children: [jsxRuntime.jsxs(material.Typography, { variant: "body2", fontWeight: 500, children: ["Step ", current, " of ", total] }), jsxRuntime.jsxs(material.Typography, { variant: "body2", fontWeight: 500, children: [Math.round(percentage), "%"] })] })), jsxRuntime.jsx(StyledLinearProgress, { variant: "determinate", value: percentage })] }));
|
|
503
550
|
};
|
|
504
|
-
const StepNumber = styled
|
|
551
|
+
const StepNumber = material.styled(material.Box)(({ theme, isActive, isCompleted }) => ({
|
|
505
552
|
width: 40,
|
|
506
553
|
height: 40,
|
|
507
554
|
borderRadius: '50%',
|
|
@@ -524,7 +571,7 @@ const StepNumber = styled$1(Box)(({ theme, isActive, isCompleted }) => ({
|
|
|
524
571
|
fontSize: '0.75rem',
|
|
525
572
|
},
|
|
526
573
|
}));
|
|
527
|
-
const StepLine = styled
|
|
574
|
+
const StepLine = material.styled(material.Box)(({ theme, isCompleted }) => ({
|
|
528
575
|
flex: 1,
|
|
529
576
|
height: 4,
|
|
530
577
|
borderRadius: 2,
|
|
@@ -539,7 +586,7 @@ const StepLine = styled$1(Box)(({ theme, isCompleted }) => ({
|
|
|
539
586
|
}));
|
|
540
587
|
const StepIndicator = ({ steps, currentStep, className = '' }) => {
|
|
541
588
|
const { theme } = useTheme();
|
|
542
|
-
return (jsx(Box, { className: className, sx: {
|
|
589
|
+
return (jsxRuntime.jsx(material.Box, { className: className, sx: {
|
|
543
590
|
display: 'flex',
|
|
544
591
|
alignItems: 'center',
|
|
545
592
|
justifyContent: 'space-between',
|
|
@@ -549,17 +596,17 @@ const StepIndicator = ({ steps, currentStep, className = '' }) => {
|
|
|
549
596
|
const stepNumber = index + 1;
|
|
550
597
|
const isActive = stepNumber === currentStep;
|
|
551
598
|
const isCompleted = stepNumber < currentStep;
|
|
552
|
-
return (jsxs(
|
|
599
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', flexDirection: 'column', alignItems: 'center', flexShrink: 0 }, children: [jsxRuntime.jsx(StepNumber, { isActive: isActive, isCompleted: isCompleted, children: stepNumber }), jsxRuntime.jsx(material.Typography, { sx: {
|
|
553
600
|
mt: { xs: 0.5, sm: 1 },
|
|
554
601
|
fontSize: { xs: '10px', sm: '12px' },
|
|
555
602
|
fontWeight: 500,
|
|
556
603
|
whiteSpace: 'nowrap',
|
|
557
604
|
color: isActive ? theme.palette.primary.main : `${theme.palette.dark.main}99`,
|
|
558
|
-
}, children: step })] }), index < steps.length - 1 && (jsx(StepLine, { isCompleted: isCompleted }))] }, index));
|
|
605
|
+
}, children: step })] }), index < steps.length - 1 && (jsxRuntime.jsx(StepLine, { isCompleted: isCompleted }))] }, index));
|
|
559
606
|
}) }));
|
|
560
607
|
};
|
|
561
608
|
|
|
562
|
-
const StyledAlert = styled
|
|
609
|
+
const StyledAlert = material.styled(material.Alert)(({ theme, customvariant }) => {
|
|
563
610
|
const variants = {
|
|
564
611
|
info: {
|
|
565
612
|
backgroundColor: '#eff6ff',
|
|
@@ -613,11 +660,11 @@ const StyledAlert = styled$1(Alert$1)(({ theme, customvariant }) => {
|
|
|
613
660
|
});
|
|
614
661
|
const Alert = ({ variant = 'info', children, className = '', icon = true, sx, }) => {
|
|
615
662
|
const iconMap = {
|
|
616
|
-
info: jsx(InfoOutlineRounded, { sx: { fontSize: 20 } }),
|
|
617
|
-
success: jsx(TaskAltRounded, { sx: { fontSize: 20 } }),
|
|
618
|
-
warning: jsx(ErrorOutlineRounded, { sx: { fontSize: 20 } }),
|
|
619
|
-
error: jsx(HighlightOffRounded, { sx: { fontSize: 20 } }),
|
|
620
|
-
custom: jsx(InfoOutlineRounded, { sx: { fontSize: 20 } }),
|
|
663
|
+
info: jsxRuntime.jsx(iconsMaterial.InfoOutlineRounded, { sx: { fontSize: 20 } }),
|
|
664
|
+
success: jsxRuntime.jsx(iconsMaterial.TaskAltRounded, { sx: { fontSize: 20 } }),
|
|
665
|
+
warning: jsxRuntime.jsx(iconsMaterial.ErrorOutlineRounded, { sx: { fontSize: 20 } }),
|
|
666
|
+
error: jsxRuntime.jsx(iconsMaterial.HighlightOffRounded, { sx: { fontSize: 20 } }),
|
|
667
|
+
custom: jsxRuntime.jsx(iconsMaterial.InfoOutlineRounded, { sx: { fontSize: 20 } }),
|
|
621
668
|
};
|
|
622
669
|
const severityMap = {
|
|
623
670
|
info: 'info',
|
|
@@ -626,14 +673,14 @@ const Alert = ({ variant = 'info', children, className = '', icon = true, sx, })
|
|
|
626
673
|
error: 'error',
|
|
627
674
|
custom: 'info',
|
|
628
675
|
};
|
|
629
|
-
return (jsx(StyledAlert, { customvariant: variant, severity: severityMap[variant], icon: icon ? iconMap[variant] : false, className: className, sx: sx, children: children }));
|
|
676
|
+
return (jsxRuntime.jsx(StyledAlert, { customvariant: variant, severity: severityMap[variant], icon: icon ? iconMap[variant] : false, className: className, sx: sx, children: children }));
|
|
630
677
|
};
|
|
631
678
|
|
|
632
|
-
const NoteContainer = styled
|
|
679
|
+
const NoteContainer = material.styled(material.Box)({
|
|
633
680
|
position: 'relative',
|
|
634
681
|
maxWidth: '100%',
|
|
635
682
|
});
|
|
636
|
-
const EditButton = styled
|
|
683
|
+
const EditButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
637
684
|
position: 'absolute',
|
|
638
685
|
right: -4,
|
|
639
686
|
top: '50%',
|
|
@@ -649,7 +696,7 @@ const EditButton = styled$1(IconButton)(({ theme }) => ({
|
|
|
649
696
|
transform: 'translateY(-50%) scale(1.1)',
|
|
650
697
|
},
|
|
651
698
|
}));
|
|
652
|
-
const HighlightWrapper = styled
|
|
699
|
+
const HighlightWrapper = material.styled(material.Box)(({ isHovered, highlightColor, highlightSelectedColor, isCustom }) => ({
|
|
653
700
|
position: 'relative',
|
|
654
701
|
display: 'inline-block',
|
|
655
702
|
maxWidth: '100%',
|
|
@@ -671,7 +718,7 @@ const HighlightWrapper = styled$1(Box)(({ isHovered, highlightColor, highlightSe
|
|
|
671
718
|
},
|
|
672
719
|
}));
|
|
673
720
|
const NoteBox = ({ variant = 'default', label, children, className = '', onEditClick, }) => {
|
|
674
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
721
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
675
722
|
const variants = {
|
|
676
723
|
default: {
|
|
677
724
|
highlight: '#FFEACD',
|
|
@@ -718,19 +765,19 @@ const NoteBox = ({ variant = 'default', label, children, className = '', onEditC
|
|
|
718
765
|
};
|
|
719
766
|
const style = variants[variant];
|
|
720
767
|
const displayLabel = label || style.label;
|
|
721
|
-
return (jsxs(NoteContainer, { className: className, children: [displayLabel && (jsx(Box, { sx: { mb: 1 }, children: jsx(Typography, { component: "span", sx: {
|
|
768
|
+
return (jsxRuntime.jsxs(NoteContainer, { className: className, children: [displayLabel && (jsxRuntime.jsx(material.Box, { sx: { mb: 1 }, children: jsxRuntime.jsx(material.Typography, { component: "span", sx: {
|
|
722
769
|
fontSize: '13px',
|
|
723
770
|
fontWeight: 500,
|
|
724
771
|
color: style.labelColor || 'rgba(0, 0, 0, 0.6)',
|
|
725
|
-
}, children: displayLabel }) })), jsxs(HighlightWrapper, { isHovered: isHovered, highlightColor: style.highlight, highlightSelectedColor: style.highlightSelected, isCustom: variant === 'custom', onMouseEnter: () => variant !== 'custom' && setIsHovered(true), onMouseLeave: () => variant !== 'custom' && setIsHovered(false), children: [jsx("span", { className: "highlight-span", children: children }), jsx(EditButton, { className: "edit-button", onClick: (e) => {
|
|
772
|
+
}, children: displayLabel }) })), jsxRuntime.jsxs(HighlightWrapper, { isHovered: isHovered, highlightColor: style.highlight, highlightSelectedColor: style.highlightSelected, isCustom: variant === 'custom', onMouseEnter: () => variant !== 'custom' && setIsHovered(true), onMouseLeave: () => variant !== 'custom' && setIsHovered(false), children: [jsxRuntime.jsx("span", { className: "highlight-span", children: children }), jsxRuntime.jsx(EditButton, { className: "edit-button", onClick: (e) => {
|
|
726
773
|
e.stopPropagation();
|
|
727
774
|
if (onEditClick) {
|
|
728
775
|
onEditClick();
|
|
729
776
|
}
|
|
730
|
-
}, title: "Edit variable highlight", size: "small", children: jsx(EditRounded, { sx: { fontSize: 14, color: "#FFFFFF", strokeWidth: 2 } }) })] })] }));
|
|
777
|
+
}, title: "Edit variable highlight", size: "small", children: jsxRuntime.jsx(iconsMaterial.EditRounded, { sx: { fontSize: 14, color: "#FFFFFF", strokeWidth: 2 } }) })] })] }));
|
|
731
778
|
};
|
|
732
779
|
|
|
733
|
-
const StyledDialog$1 = styled
|
|
780
|
+
const StyledDialog$1 = material.styled(material.Dialog)(({ theme }) => ({
|
|
734
781
|
'& .MuiDialog-paper': {
|
|
735
782
|
borderRadius: theme.shape.borderRadius,
|
|
736
783
|
maxWidth: '896px',
|
|
@@ -738,7 +785,7 @@ const StyledDialog$1 = styled$1(Dialog)(({ theme }) => ({
|
|
|
738
785
|
maxHeight: '90vh',
|
|
739
786
|
},
|
|
740
787
|
}));
|
|
741
|
-
const NavButton = styled
|
|
788
|
+
const NavButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
742
789
|
width: '40px',
|
|
743
790
|
height: '40px',
|
|
744
791
|
border: `2px solid ${theme.palette.dark.main}`,
|
|
@@ -749,8 +796,8 @@ const NavButton = styled$1(IconButton)(({ theme }) => ({
|
|
|
749
796
|
},
|
|
750
797
|
}));
|
|
751
798
|
const Modal = ({ isOpen, onClose, status, description, defaultText, note, acceptSuggestion: initialAcceptSuggestion = true, onAcceptSuggestionChange, onSave, onSubmit, onDeclineWording, onPrevious, onNext, currentPage = 1, totalPages = 1, }) => {
|
|
752
|
-
const [textValue, setTextValue] = useState(defaultText);
|
|
753
|
-
const [acceptSuggestion, setAcceptSuggestion] = useState(initialAcceptSuggestion);
|
|
799
|
+
const [textValue, setTextValue] = React.useState(defaultText);
|
|
800
|
+
const [acceptSuggestion, setAcceptSuggestion] = React.useState(initialAcceptSuggestion);
|
|
754
801
|
const statusConfig = {
|
|
755
802
|
mandatory: {
|
|
756
803
|
color: '#F5A623',
|
|
@@ -778,12 +825,12 @@ const Modal = ({ isOpen, onClose, status, description, defaultText, note, accept
|
|
|
778
825
|
},
|
|
779
826
|
};
|
|
780
827
|
const statusStyle = statusConfig[status];
|
|
781
|
-
return (jsxs(StyledDialog$1, { open: isOpen, onClose: onClose, maxWidth: "md", fullWidth: true, children: [jsx(IconButton, { onClick: onClose, sx: {
|
|
828
|
+
return (jsxRuntime.jsxs(StyledDialog$1, { open: isOpen, onClose: onClose, maxWidth: "md", fullWidth: true, children: [jsxRuntime.jsx(material.IconButton, { onClick: onClose, sx: {
|
|
782
829
|
position: 'absolute',
|
|
783
830
|
top: 16,
|
|
784
831
|
right: 16,
|
|
785
832
|
zIndex: 1,
|
|
786
|
-
}, children: jsx(CloseRounded, { sx: { fontSize: 24 } }) }), jsxs(DialogContent, { sx: { p: { xs: 3, sm: 4, md: 6 } }, children: [jsx(Box, { sx: { mb: 3 }, children: jsx(Chip, { label: statusStyle.label, sx: {
|
|
833
|
+
}, children: jsxRuntime.jsx(iconsMaterial.CloseRounded, { sx: { fontSize: 24 } }) }), jsxRuntime.jsxs(material.DialogContent, { sx: { p: { xs: 3, sm: 4, md: 6 } }, children: [jsxRuntime.jsx(material.Box, { sx: { mb: 3 }, children: jsxRuntime.jsx(material.Chip, { label: statusStyle.label, sx: {
|
|
787
834
|
backgroundColor: statusStyle.color,
|
|
788
835
|
color: status === 'optional' ? '#4D3019' : '#fff',
|
|
789
836
|
fontWeight: 600,
|
|
@@ -791,7 +838,7 @@ const Modal = ({ isOpen, onClose, status, description, defaultText, note, accept
|
|
|
791
838
|
height: 'auto',
|
|
792
839
|
py: 1,
|
|
793
840
|
px: 2,
|
|
794
|
-
} }) }), jsx(Typography, { sx: { mb: 3, lineHeight: 1.6 }, children: description }), status === 'action-required-note' && note && (jsx(Alert
|
|
841
|
+
} }) }), jsxRuntime.jsx(material.Typography, { sx: { mb: 3, lineHeight: 1.6 }, children: description }), status === 'action-required-note' && note && (jsxRuntime.jsx(material.Alert, { icon: jsxRuntime.jsx(iconsMaterial.ErrorOutlineRounded, { sx: { fontSize: 20 } }), severity: "error", sx: {
|
|
795
842
|
mb: 2,
|
|
796
843
|
backgroundColor: '#FFE6E6',
|
|
797
844
|
borderLeft: '4px solid #F56B6B',
|
|
@@ -801,7 +848,7 @@ const Modal = ({ isOpen, onClose, status, description, defaultText, note, accept
|
|
|
801
848
|
'& .MuiAlert-message': {
|
|
802
849
|
color: '#4D3019',
|
|
803
850
|
},
|
|
804
|
-
}, children: note })), status === 'accepted-note' && note && (jsx(Alert
|
|
851
|
+
}, children: note })), status === 'accepted-note' && note && (jsxRuntime.jsx(material.Alert, { icon: jsxRuntime.jsx(iconsMaterial.StickyNote2Rounded, { sx: { fontSize: 20 } }), severity: "warning", sx: {
|
|
805
852
|
mb: 2,
|
|
806
853
|
backgroundColor: '#FFF9E6',
|
|
807
854
|
borderLeft: '4px solid #F5D76E',
|
|
@@ -811,12 +858,12 @@ const Modal = ({ isOpen, onClose, status, description, defaultText, note, accept
|
|
|
811
858
|
'& .MuiAlert-message': {
|
|
812
859
|
color: '#4D3019',
|
|
813
860
|
},
|
|
814
|
-
}, children: note })), jsx(TextField, { multiline: true, rows: 4, fullWidth: true, value: textValue, onChange: (e) => setTextValue(e.target.value), disabled: acceptSuggestion, sx: {
|
|
861
|
+
}, children: note })), jsxRuntime.jsx(material.TextField, { multiline: true, rows: 4, fullWidth: true, value: textValue, onChange: (e) => setTextValue(e.target.value), disabled: acceptSuggestion, sx: {
|
|
815
862
|
mb: 2,
|
|
816
863
|
'& .MuiOutlinedInput-root': {
|
|
817
864
|
backgroundColor: acceptSuggestion ? 'rgba(0, 0, 0, 0.05)' : '#fff',
|
|
818
865
|
},
|
|
819
|
-
} }), jsxs(Box, { sx: {
|
|
866
|
+
} }), jsxRuntime.jsxs(material.Box, { sx: {
|
|
820
867
|
display: 'flex',
|
|
821
868
|
flexDirection: { xs: 'column', sm: 'row' },
|
|
822
869
|
alignItems: { xs: 'stretch', sm: 'center' },
|
|
@@ -825,28 +872,28 @@ const Modal = ({ isOpen, onClose, status, description, defaultText, note, accept
|
|
|
825
872
|
pt: 3,
|
|
826
873
|
borderTop: '1px solid',
|
|
827
874
|
borderColor: 'divider',
|
|
828
|
-
}, children: [jsxs(Box, { sx: { display: 'flex', gap: 1.5 }, children: [jsx(Button, { onClick: onSave, variant: "secondary", size: "md", children: "Save" }), jsx(Button, { onClick: onSubmit, variant: "primary", size: "md", children: "Submit for review" }), jsx(Button, { onClick: onDeclineWording, variant: "danger", size: "md", children: "Decline Wording" })] }), jsxs(Box, { sx: {
|
|
875
|
+
}, children: [jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', gap: 1.5 }, children: [jsxRuntime.jsx(Button, { onClick: onSave, variant: "secondary", size: "md", children: "Save" }), jsxRuntime.jsx(Button, { onClick: onSubmit, variant: "primary", size: "md", children: "Submit for review" }), jsxRuntime.jsx(Button, { onClick: onDeclineWording, variant: "danger", size: "md", children: "Decline Wording" })] }), jsxRuntime.jsxs(material.Box, { sx: {
|
|
829
876
|
display: 'flex',
|
|
830
877
|
alignItems: 'center',
|
|
831
878
|
gap: 2,
|
|
832
879
|
justifyContent: { xs: 'space-between', sm: 'flex-end' },
|
|
833
|
-
}, children: [jsxs(Box, { sx: { display: 'flex', gap: 1.5 }, children: [jsx(NavButton, { onClick: onPrevious, "aria-label": "Previous", children: jsx(ChevronLeftRounded, { sx: { fontSize: 20 } }) }), jsx(NavButton, { onClick: onNext, "aria-label": "Next", children: jsx(ChevronRightRounded, { sx: { fontSize: 20 } }) })] }), jsxs(Typography, { fontWeight: 500, fontSize: "1.125rem", sx: { ml: 1 }, children: [currentPage, "/", totalPages] })] })] })] })] }));
|
|
880
|
+
}, 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] })] })] })] })] }));
|
|
834
881
|
};
|
|
835
882
|
|
|
836
|
-
const StyledConcertina = styled
|
|
883
|
+
const StyledConcertina = material.styled(material.Box)(({ theme }) => ({
|
|
837
884
|
width: '100%',
|
|
838
885
|
display: 'flex',
|
|
839
886
|
flexDirection: 'column',
|
|
840
887
|
gap: theme.spacing(1), // space-y-2
|
|
841
888
|
}));
|
|
842
|
-
const StyledSection = styled
|
|
889
|
+
const StyledSection = material.styled(material.Box)(({ theme }) => ({
|
|
843
890
|
border: `1px solid ${theme.palette.grey[200]}`, // border-gray-200
|
|
844
891
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
845
892
|
? parseInt(theme.shape.borderRadius, 10)
|
|
846
893
|
: theme.shape.borderRadius || 4) * 2, // rounded-lg
|
|
847
894
|
overflow: 'hidden',
|
|
848
895
|
}));
|
|
849
|
-
const StyledHeader$1 = styled
|
|
896
|
+
const StyledHeader$1 = material.styled(material.Box)(({ theme }) => ({
|
|
850
897
|
display: 'flex',
|
|
851
898
|
alignItems: 'center',
|
|
852
899
|
justifyContent: 'space-between',
|
|
@@ -864,7 +911,7 @@ const StyledHeader$1 = styled$1(Box)(({ theme }) => ({
|
|
|
864
911
|
padding: theme.spacing(6),
|
|
865
912
|
},
|
|
866
913
|
}));
|
|
867
|
-
const StyledTitleWrapper = styled
|
|
914
|
+
const StyledTitleWrapper = material.styled(material.Box)(({ theme }) => ({
|
|
868
915
|
display: 'flex',
|
|
869
916
|
alignItems: 'center',
|
|
870
917
|
gap: theme.spacing(3), // sm:gap-3
|
|
@@ -874,7 +921,7 @@ const StyledTitleWrapper = styled$1(Box)(({ theme }) => ({
|
|
|
874
921
|
gap: theme.spacing(2), // gap-2
|
|
875
922
|
},
|
|
876
923
|
}));
|
|
877
|
-
const StyledTitle = styled
|
|
924
|
+
const StyledTitle = material.styled(material.Typography, {
|
|
878
925
|
shouldForwardProp: (prop) => prop !== 'isHovered',
|
|
879
926
|
})(({ theme, isHovered }) => ({
|
|
880
927
|
fontWeight: 700, // font-bold
|
|
@@ -903,14 +950,14 @@ const StyledTitle = styled$1(Typography, {
|
|
|
903
950
|
fontSize: '1rem', // sm:text-lg
|
|
904
951
|
},
|
|
905
952
|
}));
|
|
906
|
-
const StyledLinkButton = styled
|
|
953
|
+
const StyledLinkButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
907
954
|
color: theme.palette.accent.main, // text-orange-500
|
|
908
955
|
'&:hover': {
|
|
909
956
|
color: theme.palette.accent.dark || theme.palette.accent.main, // hover:text-orange-600
|
|
910
957
|
},
|
|
911
958
|
padding: 0,
|
|
912
959
|
}));
|
|
913
|
-
const StyledTooltip = styled
|
|
960
|
+
const StyledTooltip = material.styled(material.Box)(({ theme }) => ({
|
|
914
961
|
position: 'absolute',
|
|
915
962
|
top: -40, // -top-10
|
|
916
963
|
left: '50%',
|
|
@@ -927,7 +974,7 @@ const StyledTooltip = styled$1(Box)(({ theme }) => ({
|
|
|
927
974
|
padding: theme.spacing(1.5, 3), // sm:px-3 sm:py-1.5
|
|
928
975
|
},
|
|
929
976
|
}));
|
|
930
|
-
const StyledChevron = styled
|
|
977
|
+
const StyledChevron = material.styled(iconsMaterial.ExpandMoreRounded)(({ theme }) => ({
|
|
931
978
|
color: theme.palette.grey[500], // text-gray-500
|
|
932
979
|
transition: 'transform 0.2s', // transition-transform duration-200
|
|
933
980
|
width: 24, // sm:w-6
|
|
@@ -937,7 +984,7 @@ const StyledChevron = styled$1(ExpandMoreRounded)(({ theme }) => ({
|
|
|
937
984
|
height: 20,
|
|
938
985
|
},
|
|
939
986
|
}));
|
|
940
|
-
const StyledContent = styled
|
|
987
|
+
const StyledContent = material.styled(material.Box)(({ theme }) => ({
|
|
941
988
|
padding: theme.spacing(2, 3, 3), // px-3 pb-3 pt-2
|
|
942
989
|
[theme.breakpoints.up('sm')]: {
|
|
943
990
|
padding: theme.spacing(2, 4, 4), // sm:px-4 sm:pb-4
|
|
@@ -946,16 +993,16 @@ const StyledContent = styled$1(Box)(({ theme }) => ({
|
|
|
946
993
|
padding: theme.spacing(2, 6, 6), // md:px-6 md:pb-6
|
|
947
994
|
},
|
|
948
995
|
}));
|
|
949
|
-
const StyledContentText = styled
|
|
996
|
+
const StyledContentText = material.styled(material.Typography)(({ theme }) => ({
|
|
950
997
|
color: theme.palette.dark.main, // text-[#4D3019]
|
|
951
998
|
lineHeight: 1.5, // leading-relaxed
|
|
952
999
|
wordBreak: 'break-word', // break-words
|
|
953
1000
|
fontSize: 13, // style={{ fontSize: '13px' }}
|
|
954
1001
|
}));
|
|
955
1002
|
function Concertina({ sections }) {
|
|
956
|
-
const [openSections, setOpenSections] = useState(new Set());
|
|
957
|
-
const [hoveredTitle, setHoveredTitle] = useState(null);
|
|
958
|
-
const [copiedId, setCopiedId] = useState(null);
|
|
1003
|
+
const [openSections, setOpenSections] = React.useState(new Set());
|
|
1004
|
+
const [hoveredTitle, setHoveredTitle] = React.useState(null);
|
|
1005
|
+
const [copiedId, setCopiedId] = React.useState(null);
|
|
959
1006
|
const toggleSection = (id) => {
|
|
960
1007
|
const newOpenSections = new Set(openSections);
|
|
961
1008
|
if (newOpenSections.has(id)) {
|
|
@@ -973,10 +1020,10 @@ function Concertina({ sections }) {
|
|
|
973
1020
|
setCopiedId(id);
|
|
974
1021
|
setTimeout(() => setCopiedId(null), 2000);
|
|
975
1022
|
};
|
|
976
|
-
return (jsx(StyledConcertina, { children: sections.map((section) => (jsxs(StyledSection, { id: section.id, children: [jsxs(StyledHeader$1, { onClick: () => toggleSection(section.id), onMouseEnter: () => setHoveredTitle(section.id), onMouseLeave: () => setHoveredTitle(null), children: [jsxs(StyledTitleWrapper, { children: [jsx(StyledTitle, { isHovered: hoveredTitle === section.id, variant: "h3", children: section.title }), hoveredTitle === section.id && (jsxs(Box, { sx: { position: 'relative', flexShrink: 0 }, children: [jsx(StyledLinkButton, { onClick: (e) => copyJumpLink(section.id, e), "aria-label": "Copy link", children: jsx(LinkRounded, { sx: { fontSize: 20 } }) }), copiedId === section.id && (jsx(StyledTooltip, { children: "Link copied" }))] }))] }), jsx(StyledChevron, { sx: { fontSize: 20, transform: openSections.has(section.id) ? 'rotate(180deg)' : 'none' } })] }), jsx(Collapse, { in: openSections.has(section.id), children: jsx(StyledContent, { children: jsx(StyledContentText, { children: section.content }) }) })] }, section.id))) }));
|
|
1023
|
+
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))) }));
|
|
977
1024
|
}
|
|
978
1025
|
|
|
979
|
-
const ReadByContainer = styled
|
|
1026
|
+
const ReadByContainer = material.styled(material.Box)(({ theme }) => ({
|
|
980
1027
|
display: 'flex',
|
|
981
1028
|
flexDirection: 'row',
|
|
982
1029
|
alignItems: 'flex-start',
|
|
@@ -990,7 +1037,7 @@ const ReadByContainer = styled$1(Box)(({ theme }) => ({
|
|
|
990
1037
|
padding: theme.spacing(1.5),
|
|
991
1038
|
},
|
|
992
1039
|
}));
|
|
993
|
-
const ExpandButton = styled
|
|
1040
|
+
const ExpandButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
994
1041
|
width: 32,
|
|
995
1042
|
height: 32,
|
|
996
1043
|
backgroundColor: '#4d3019',
|
|
@@ -1006,24 +1053,24 @@ const ExpandButton = styled$1(IconButton)(({ theme }) => ({
|
|
|
1006
1053
|
}));
|
|
1007
1054
|
const ReadBy = ({ names }) => {
|
|
1008
1055
|
const { theme } = useTheme();
|
|
1009
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
1056
|
+
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
1010
1057
|
const displayText = isExpanded
|
|
1011
1058
|
? names.join(', ')
|
|
1012
1059
|
: names.length > 5
|
|
1013
1060
|
? `${names.slice(0, 5).join(', ')}...`
|
|
1014
1061
|
: names.join(', ');
|
|
1015
|
-
return (jsxs(ReadByContainer, { children: [jsxs(Box, { sx: { flex: 1, minWidth: 0, wordBreak: 'break-word' }, children: [jsx(Typography, { component: "span", sx: {
|
|
1062
|
+
return (jsxRuntime.jsxs(ReadByContainer, { children: [jsxRuntime.jsxs(material.Box, { sx: { flex: 1, minWidth: 0, wordBreak: 'break-word' }, children: [jsxRuntime.jsx(material.Typography, { component: "span", sx: {
|
|
1016
1063
|
fontSize: { xs: '13px', sm: '14px' },
|
|
1017
1064
|
fontWeight: 700,
|
|
1018
1065
|
color: theme.palette.dark.main,
|
|
1019
|
-
}, children: "Read by:" }), jsx(Typography, { component: "span", sx: {
|
|
1066
|
+
}, children: "Read by:" }), jsxRuntime.jsx(material.Typography, { component: "span", sx: {
|
|
1020
1067
|
fontSize: { xs: '13px', sm: '14px' },
|
|
1021
1068
|
color: theme.palette.dark.main,
|
|
1022
1069
|
ml: 1,
|
|
1023
|
-
}, children: displayText })] }), names.length > 5 && (jsx(ExpandButton, { onClick: () => setIsExpanded(!isExpanded), "aria-label": isExpanded ? 'Collapse' : 'Expand', size: "small", children: isExpanded ? (jsx(ExpandLessRounded, { sx: { fontSize: 16 } })) : (jsx(ExpandMoreRounded, { sx: { fontSize: 16 } })) }))] }));
|
|
1070
|
+
}, 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 } })) }))] }));
|
|
1024
1071
|
};
|
|
1025
1072
|
|
|
1026
|
-
const StatusBarContainer = styled
|
|
1073
|
+
const StatusBarContainer = material.styled(material.Box)(({ theme }) => ({
|
|
1027
1074
|
width: '100%',
|
|
1028
1075
|
backgroundColor: '#F5C98E',
|
|
1029
1076
|
padding: theme.spacing(1.5, 3),
|
|
@@ -1037,7 +1084,7 @@ const StatusBarContainer = styled$1(Box)(({ theme }) => ({
|
|
|
1037
1084
|
padding: theme.spacing(1.25, 2),
|
|
1038
1085
|
},
|
|
1039
1086
|
}));
|
|
1040
|
-
const ContentWrapper = styled
|
|
1087
|
+
const ContentWrapper = material.styled(material.Box)(({ theme }) => ({
|
|
1041
1088
|
display: 'flex',
|
|
1042
1089
|
alignItems: 'center',
|
|
1043
1090
|
gap: theme.spacing(1.5),
|
|
@@ -1049,7 +1096,7 @@ const ContentWrapper = styled$1(Box)(({ theme }) => ({
|
|
|
1049
1096
|
gap: theme.spacing(1),
|
|
1050
1097
|
},
|
|
1051
1098
|
}));
|
|
1052
|
-
const NextButton = styled
|
|
1099
|
+
const NextButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1053
1100
|
width: 40,
|
|
1054
1101
|
height: 40,
|
|
1055
1102
|
border: `2px solid rgba(77, 48, 25, 0.25)`,
|
|
@@ -1065,30 +1112,30 @@ const NextButton = styled$1(IconButton)(({ theme }) => ({
|
|
|
1065
1112
|
}));
|
|
1066
1113
|
const StatusBar = ({ itemCount, variant = 'actionstarted', onTailorClick, onNextClick }) => {
|
|
1067
1114
|
const message = `There are ${itemCount} items that need attention.`;
|
|
1068
|
-
return (jsxs(StatusBarContainer, { children: [jsxs(ContentWrapper, { children: [jsx(PieChartRounded, { sx: {
|
|
1115
|
+
return (jsxRuntime.jsxs(StatusBarContainer, { children: [jsxRuntime.jsxs(ContentWrapper, { children: [jsxRuntime.jsx(iconsMaterial.PieChartRounded, { sx: {
|
|
1069
1116
|
fontSize: 24,
|
|
1070
1117
|
color: "#4D3019",
|
|
1071
1118
|
flexShrink: 0,
|
|
1072
|
-
} }), jsx(Typography, { sx: {
|
|
1119
|
+
} }), jsxRuntime.jsx(material.Typography, { sx: {
|
|
1073
1120
|
fontSize: { xs: '14px', sm: '15px', md: '16px' },
|
|
1074
1121
|
color: '#4D3019',
|
|
1075
1122
|
wordBreak: 'break-word',
|
|
1076
1123
|
textAlign: { xs: 'center', sm: 'left' },
|
|
1077
|
-
}, children: variant === 'actionstarted' ? (jsxs(Fragment, { children: [jsx(Box, { component: "span", sx: { fontWeight: 700 }, children: "Incomplete." }), " ", message] })) : (jsxs(Fragment, { children: [jsx(Box, { component: "span", sx: { fontWeight: 700 }, children: "Not started." }), " ", message] })) })] }), variant === 'actionstarted' ? (jsx(Box, { sx: { display: 'flex', gap: 1.5, flexShrink: 0 }, children: jsx(NextButton, { onClick: onNextClick, "aria-label": "Next", children: jsx(ChevronRightRounded, { sx: { fontSize: 20 } }) }) })) : (jsx(Box, { sx: { flexShrink: 0 }, children: jsx(Button, { variant: "outline", size: "sm", onClick: onTailorClick, children: "Tailor policies" }) }))] }));
|
|
1124
|
+
}, 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" }) }))] }));
|
|
1078
1125
|
};
|
|
1079
1126
|
|
|
1080
|
-
const TabsContainer = styled
|
|
1127
|
+
const TabsContainer = material.styled(material.Box)({
|
|
1081
1128
|
display: 'none',
|
|
1082
1129
|
'@media (min-width: 900px)': {
|
|
1083
1130
|
display: 'block',
|
|
1084
1131
|
},
|
|
1085
1132
|
});
|
|
1086
|
-
const TabButtonsWrapper = styled
|
|
1133
|
+
const TabButtonsWrapper = material.styled(material.Box)({
|
|
1087
1134
|
display: 'flex',
|
|
1088
1135
|
gap: '4px',
|
|
1089
1136
|
backgroundColor: '#FDFCEE',
|
|
1090
1137
|
});
|
|
1091
|
-
const TabButton = styled
|
|
1138
|
+
const TabButton = material.styled(material.Button)(({ theme, isActive }) => ({
|
|
1092
1139
|
padding: theme.spacing(2, 3),
|
|
1093
1140
|
fontSize: '16px',
|
|
1094
1141
|
fontWeight: 500,
|
|
@@ -1112,18 +1159,18 @@ const TabButton = styled$1(Button$1)(({ theme, isActive }) => ({
|
|
|
1112
1159
|
backgroundColor: theme.palette.primary.main,
|
|
1113
1160
|
} : {},
|
|
1114
1161
|
}));
|
|
1115
|
-
const TabContent = styled
|
|
1162
|
+
const TabContent = material.styled(material.Box)(({ theme }) => ({
|
|
1116
1163
|
padding: theme.spacing(3),
|
|
1117
1164
|
color: '#4D3019',
|
|
1118
1165
|
backgroundColor: theme.palette.custom?.tabBackgroundColor || theme.palette.accent.main,
|
|
1119
1166
|
}));
|
|
1120
|
-
const MobileContainer = styled
|
|
1167
|
+
const MobileContainer = material.styled(material.Box)({
|
|
1121
1168
|
backgroundColor: '#FDFCEE',
|
|
1122
1169
|
'@media (min-width: 900px)': {
|
|
1123
1170
|
display: 'none',
|
|
1124
1171
|
},
|
|
1125
1172
|
});
|
|
1126
|
-
const MobileTabButton = styled
|
|
1173
|
+
const MobileTabButton = material.styled(material.Button)(({ theme, isExpanded }) => ({
|
|
1127
1174
|
width: '100%',
|
|
1128
1175
|
display: 'flex',
|
|
1129
1176
|
alignItems: 'center',
|
|
@@ -1137,34 +1184,34 @@ const MobileTabButton = styled$1(Button$1)(({ theme, isExpanded }) => ({
|
|
|
1137
1184
|
backgroundColor: isExpanded ? theme.palette.custom?.tabBackgroundColor || theme.palette.accent.main : 'rgba(77, 48, 25, 0.05)',
|
|
1138
1185
|
},
|
|
1139
1186
|
}));
|
|
1140
|
-
const MobileTabContent = styled
|
|
1187
|
+
const MobileTabContent = material.styled(material.Box)(({ theme }) => ({
|
|
1141
1188
|
padding: theme.spacing(2, 2, 3, 2),
|
|
1142
1189
|
color: '#4D3019',
|
|
1143
1190
|
backgroundColor: theme.palette.custom?.tabBackgroundColor || theme.palette.accent.main,
|
|
1144
1191
|
}));
|
|
1145
1192
|
const Tabs = ({ tabs, defaultTab }) => {
|
|
1146
|
-
const [activeTab, setActiveTab] = useState(defaultTab || tabs[0]?.id);
|
|
1147
|
-
const [mobileExpandedTab, setMobileExpandedTab] = useState(null);
|
|
1193
|
+
const [activeTab, setActiveTab] = React.useState(defaultTab || tabs[0]?.id);
|
|
1194
|
+
const [mobileExpandedTab, setMobileExpandedTab] = React.useState(null);
|
|
1148
1195
|
const activeTabContent = tabs.find(tab => tab.id === activeTab)?.content;
|
|
1149
1196
|
const handleMobileTabClick = (tabId) => {
|
|
1150
1197
|
setActiveTab(tabId);
|
|
1151
1198
|
setMobileExpandedTab(mobileExpandedTab === tabId ? null : tabId);
|
|
1152
1199
|
};
|
|
1153
|
-
return (jsxs(Fragment, { children: [jsxs(TabsContainer, { children: [jsx(TabButtonsWrapper, { children: tabs.map((tab) => (jsx(TabButton, { onClick: () => setActiveTab(tab.id), isActive: activeTab === tab.id, children: tab.label }, tab.id))) }), jsx(TabContent, { children: activeTabContent })] }), jsx(MobileContainer, { children: tabs.map((tab, index) => (jsxs(Box, { sx: {
|
|
1200
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(TabsContainer, { children: [jsxRuntime.jsx(TabButtonsWrapper, { children: tabs.map((tab) => (jsxRuntime.jsx(TabButton, { onClick: () => setActiveTab(tab.id), isActive: activeTab === tab.id, children: tab.label }, tab.id))) }), jsxRuntime.jsx(TabContent, { children: activeTabContent })] }), jsxRuntime.jsx(MobileContainer, { children: tabs.map((tab, index) => (jsxRuntime.jsxs(material.Box, { sx: {
|
|
1154
1201
|
borderTop: index !== 0 ? '2px solid #e5e7eb' : 'none',
|
|
1155
|
-
}, children: [jsxs(MobileTabButton, { onClick: () => handleMobileTabClick(tab.id), isExpanded: mobileExpandedTab === tab.id, children: [jsx(Box, { component: "span", sx: {
|
|
1202
|
+
}, children: [jsxRuntime.jsxs(MobileTabButton, { onClick: () => handleMobileTabClick(tab.id), isExpanded: mobileExpandedTab === tab.id, children: [jsxRuntime.jsx(material.Box, { component: "span", sx: {
|
|
1156
1203
|
fontSize: '16px',
|
|
1157
1204
|
fontWeight: 500,
|
|
1158
1205
|
color: activeTab === tab.id ? '#4D3019' : '#826E5C',
|
|
1159
|
-
}, children: tab.label }), jsx(ExpandMoreRounded, { sx: {
|
|
1206
|
+
}, children: tab.label }), jsxRuntime.jsx(iconsMaterial.ExpandMoreRounded, { sx: {
|
|
1160
1207
|
fontSize: 20,
|
|
1161
1208
|
color: activeTab === tab.id ? '#4D3019' : '#826E5C',
|
|
1162
1209
|
transform: mobileExpandedTab === tab.id ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
1163
1210
|
transition: 'transform 0.2s',
|
|
1164
|
-
} })] }), jsx(Collapse, { in: mobileExpandedTab === tab.id, children: jsx(MobileTabContent, { children: tab.content }) })] }, tab.id))) })] }));
|
|
1211
|
+
} })] }), jsxRuntime.jsx(material.Collapse, { in: mobileExpandedTab === tab.id, children: jsxRuntime.jsx(MobileTabContent, { children: tab.content }) })] }, tab.id))) })] }));
|
|
1165
1212
|
};
|
|
1166
1213
|
|
|
1167
|
-
const SidebarContainer = styled
|
|
1214
|
+
const SidebarContainer = material.styled(material.Box)(({ theme, isOpen }) => ({
|
|
1168
1215
|
height: '100vh',
|
|
1169
1216
|
position: 'sticky',
|
|
1170
1217
|
top: 0,
|
|
@@ -1183,7 +1230,7 @@ const SidebarContainer = styled$1(Box)(({ theme, isOpen }) => ({
|
|
|
1183
1230
|
width: isOpen ? '288px' : '80px',
|
|
1184
1231
|
},
|
|
1185
1232
|
}));
|
|
1186
|
-
const ToggleButton$1 = styled
|
|
1233
|
+
const ToggleButton$1 = material.styled(material.IconButton)(({ theme }) => ({
|
|
1187
1234
|
width: 40,
|
|
1188
1235
|
height: 40,
|
|
1189
1236
|
borderRadius: theme.shape.borderRadius,
|
|
@@ -1193,7 +1240,7 @@ const ToggleButton$1 = styled$1(IconButton)(({ theme }) => ({
|
|
|
1193
1240
|
backgroundColor: '#3d2614',
|
|
1194
1241
|
},
|
|
1195
1242
|
}));
|
|
1196
|
-
const MenuItemButton = styled
|
|
1243
|
+
const MenuItemButton = material.styled(material.ListItemButton)(({ theme, isActive, isOpen }) => ({
|
|
1197
1244
|
borderRadius: theme.shape.borderRadius,
|
|
1198
1245
|
padding: isOpen ? '10px 8px' : '12px 0',
|
|
1199
1246
|
justifyContent: isOpen ? 'flex-start' : 'center',
|
|
@@ -1205,7 +1252,7 @@ const MenuItemButton = styled$1(ListItemButton)(({ theme, isActive, isOpen }) =>
|
|
|
1205
1252
|
backgroundColor: `${theme.palette.dark.main}1A`,
|
|
1206
1253
|
}),
|
|
1207
1254
|
}));
|
|
1208
|
-
const IconWrapper = styled
|
|
1255
|
+
const IconWrapper = material.styled(material.Box)(({ theme, isOpen }) => ({
|
|
1209
1256
|
width: isOpen ? 32 : 40,
|
|
1210
1257
|
height: isOpen ? 32 : 40,
|
|
1211
1258
|
borderRadius: theme.shape.borderRadius,
|
|
@@ -1217,8 +1264,8 @@ const IconWrapper = styled$1(Box)(({ theme, isOpen }) => ({
|
|
|
1217
1264
|
}));
|
|
1218
1265
|
const Sidebar = ({ isOpen, onToggle, centreName = "Centre name goes here \n across two lines", activePage = 'dashboard', onPageChange }) => {
|
|
1219
1266
|
const { theme } = useTheme();
|
|
1220
|
-
const [expandedItems, setExpandedItems] = useState([]);
|
|
1221
|
-
const [expandedSubItems, setExpandedSubItems] = useState([]);
|
|
1267
|
+
const [expandedItems, setExpandedItems] = React.useState([]);
|
|
1268
|
+
const [expandedSubItems, setExpandedSubItems] = React.useState([]);
|
|
1222
1269
|
const handlePageClick = (pageId) => {
|
|
1223
1270
|
if (onPageChange) {
|
|
1224
1271
|
onPageChange(pageId);
|
|
@@ -1228,12 +1275,12 @@ const Sidebar = ({ isOpen, onToggle, centreName = "Centre name goes here \n acro
|
|
|
1228
1275
|
{
|
|
1229
1276
|
id: 'dashboard',
|
|
1230
1277
|
label: 'Dashboard',
|
|
1231
|
-
icon: jsx(HomeRounded, { sx: { fontSize: 20, color: "#4D3019" } }),
|
|
1278
|
+
icon: jsxRuntime.jsx(iconsMaterial.HomeRounded, { sx: { fontSize: 20, color: "#4D3019" } }),
|
|
1232
1279
|
},
|
|
1233
1280
|
{
|
|
1234
1281
|
id: 'policies',
|
|
1235
1282
|
label: 'Policies',
|
|
1236
|
-
icon: jsx(TextSnippetRounded, { sx: { fontSize: 20, color: "#4D3019" } }),
|
|
1283
|
+
icon: jsxRuntime.jsx(iconsMaterial.TextSnippetRounded, { sx: { fontSize: 20, color: "#4D3019" } }),
|
|
1237
1284
|
hasChildren: true,
|
|
1238
1285
|
children: [
|
|
1239
1286
|
{ id: 'legislation', label: 'Legislation' },
|
|
@@ -1259,7 +1306,7 @@ const Sidebar = ({ isOpen, onToggle, centreName = "Centre name goes here \n acro
|
|
|
1259
1306
|
{
|
|
1260
1307
|
id: 'support',
|
|
1261
1308
|
label: 'Support',
|
|
1262
|
-
icon: jsx(HelpOutlineRounded, { sx: { fontSize: 20, color: "#4D3019" } }),
|
|
1309
|
+
icon: jsxRuntime.jsx(iconsMaterial.HelpOutlineRounded, { sx: { fontSize: 20, color: "#4D3019" } }),
|
|
1263
1310
|
},
|
|
1264
1311
|
];
|
|
1265
1312
|
const toggleItem = (itemId) => {
|
|
@@ -1274,37 +1321,37 @@ const Sidebar = ({ isOpen, onToggle, centreName = "Centre name goes here \n acro
|
|
|
1274
1321
|
const toggleSubItem = (subItemId) => {
|
|
1275
1322
|
setExpandedSubItems((prev) => prev.includes(subItemId) ? prev.filter((id) => id !== subItemId) : [...prev, subItemId]);
|
|
1276
1323
|
};
|
|
1277
|
-
return (jsxs(Fragment, { children: [isOpen && (jsx(Box, { sx: {
|
|
1324
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isOpen && (jsxRuntime.jsx(material.Box, { sx: {
|
|
1278
1325
|
position: 'fixed',
|
|
1279
1326
|
inset: 0,
|
|
1280
1327
|
bgcolor: 'rgba(0, 0, 0, 0.5)',
|
|
1281
1328
|
zIndex: 40,
|
|
1282
1329
|
display: { xs: 'block', md: 'none' },
|
|
1283
|
-
}, onClick: onToggle })), jsx(SidebarContainer, { isOpen: isOpen, children: jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', height: '100%' }, children: [isOpen && (jsxs(Box, { sx: {
|
|
1330
|
+
}, onClick: onToggle })), jsxRuntime.jsx(SidebarContainer, { isOpen: isOpen, children: jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', flexDirection: 'column', height: '100%' }, children: [isOpen && (jsxRuntime.jsxs(material.Box, { sx: {
|
|
1284
1331
|
px: 2,
|
|
1285
1332
|
py: 3,
|
|
1286
1333
|
borderBottom: `1px solid ${theme.palette.dark.main}1A`,
|
|
1287
1334
|
flexShrink: 0,
|
|
1288
1335
|
position: 'relative',
|
|
1289
|
-
}, children: [jsx(Typography, { variant: "h6", sx: {
|
|
1336
|
+
}, children: [jsxRuntime.jsx(material.Typography, { variant: "h6", sx: {
|
|
1290
1337
|
fontSize: '18px',
|
|
1291
1338
|
fontWeight: 700,
|
|
1292
1339
|
color: '#4D3019',
|
|
1293
1340
|
lineHeight: 1.3,
|
|
1294
1341
|
whiteSpace: 'pre-line',
|
|
1295
1342
|
pr: 7,
|
|
1296
|
-
}, children: centreName }), jsx(ToggleButton$1, { onClick: onToggle, sx: { position: 'absolute', top: 24, right: 16 }, "aria-label": "Collapse sidebar", children: jsx(ChevronLeftRounded, { sx: { fontSize: 20 } }) })] })), !isOpen && (jsx(Box, { sx: {
|
|
1343
|
+
}, children: centreName }), jsxRuntime.jsx(ToggleButton$1, { onClick: onToggle, sx: { position: 'absolute', top: 24, right: 16 }, "aria-label": "Collapse sidebar", children: jsxRuntime.jsx(iconsMaterial.ChevronLeftRounded, { sx: { fontSize: 20 } }) })] })), !isOpen && (jsxRuntime.jsx(material.Box, { sx: {
|
|
1297
1344
|
px: 1,
|
|
1298
1345
|
py: 3,
|
|
1299
1346
|
borderBottom: `1px solid ${theme.palette.dark.main}1A`,
|
|
1300
1347
|
display: 'flex',
|
|
1301
1348
|
justifyContent: 'center',
|
|
1302
|
-
}, children: jsx(ToggleButton$1, { onClick: onToggle, "aria-label": "Expand sidebar", children: jsx(ChevronRightRounded, { sx: { fontSize: 20 } }) }) })), jsx(Box, { sx: {
|
|
1349
|
+
}, children: jsxRuntime.jsx(ToggleButton$1, { onClick: onToggle, "aria-label": "Expand sidebar", children: jsxRuntime.jsx(iconsMaterial.ChevronRightRounded, { sx: { fontSize: 20 } }) }) })), jsxRuntime.jsx(material.Box, { sx: {
|
|
1303
1350
|
flex: 1,
|
|
1304
1351
|
overflowY: 'auto',
|
|
1305
1352
|
px: isOpen ? 1.5 : 1,
|
|
1306
1353
|
py: 3,
|
|
1307
|
-
}, children: jsx(List, { sx: { p: 0 }, children: menuItems.map((item) => (jsxs(Box, { sx: { mb: 1 }, children: [jsxs(MenuItemButton, { isOpen: isOpen, isActive: activePage === item.id, onClick: () => {
|
|
1354
|
+
}, children: jsxRuntime.jsx(material.List, { sx: { p: 0 }, children: menuItems.map((item) => (jsxRuntime.jsxs(material.Box, { sx: { mb: 1 }, children: [jsxRuntime.jsxs(MenuItemButton, { isOpen: isOpen, isActive: activePage === item.id, onClick: () => {
|
|
1308
1355
|
if (item.hasChildren) {
|
|
1309
1356
|
toggleItem(item.id);
|
|
1310
1357
|
}
|
|
@@ -1314,10 +1361,10 @@ const Sidebar = ({ isOpen, onToggle, centreName = "Centre name goes here \n acro
|
|
|
1314
1361
|
}
|
|
1315
1362
|
handlePageClick(item.id);
|
|
1316
1363
|
}
|
|
1317
|
-
}, title: !isOpen ? item.label : undefined, children: [jsx(IconWrapper, { isOpen: isOpen, children: item.icon }), isOpen && (jsxs(Fragment, { children: [jsx(ListItemText, { primary: item.label, primaryTypographyProps: {
|
|
1364
|
+
}, title: !isOpen ? item.label : undefined, children: [jsxRuntime.jsx(IconWrapper, { isOpen: isOpen, children: item.icon }), isOpen && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(material.ListItemText, { primary: item.label, primaryTypographyProps: {
|
|
1318
1365
|
fontSize: '1rem',
|
|
1319
1366
|
fontWeight: 600,
|
|
1320
|
-
}, sx: { flex: 1 } }), item.hasChildren && (jsx(Box, { children: expandedItems.includes(item.id) ? (jsx(ExpandLessRounded, { sx: { fontSize: 20, color: "#4D3019" } })) : (jsx(ExpandMoreRounded, { sx: { fontSize: 20, color: "#4D3019" } })) }))] }))] }), item.hasChildren && expandedItems.includes(item.id) && item.children && isOpen && (jsx(Collapse, { in: true, timeout: "auto", children: jsx(List, { sx: { p: 0, mt: 0.5 }, children: item.children.map((subItem) => (jsxs(Box, { children: [jsxs(Box, { sx: { display: 'flex', alignItems: 'stretch' }, children: [jsx(ListItemButton, { onClick: () => handlePageClick(subItem.id), sx: {
|
|
1367
|
+
}, sx: { flex: 1 } }), item.hasChildren && (jsxRuntime.jsx(material.Box, { children: expandedItems.includes(item.id) ? (jsxRuntime.jsx(iconsMaterial.ExpandLessRounded, { sx: { fontSize: 20, color: "#4D3019" } })) : (jsxRuntime.jsx(iconsMaterial.ExpandMoreRounded, { sx: { fontSize: 20, color: "#4D3019" } })) }))] }))] }), item.hasChildren && expandedItems.includes(item.id) && item.children && isOpen && (jsxRuntime.jsx(material.Collapse, { in: true, timeout: "auto", children: jsxRuntime.jsx(material.List, { sx: { p: 0, mt: 0.5 }, children: item.children.map((subItem) => (jsxRuntime.jsxs(material.Box, { children: [jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', alignItems: 'stretch' }, children: [jsxRuntime.jsx(material.ListItemButton, { onClick: () => handlePageClick(subItem.id), sx: {
|
|
1321
1368
|
flex: 1,
|
|
1322
1369
|
pl: 8,
|
|
1323
1370
|
py: 1.25,
|
|
@@ -1328,22 +1375,22 @@ const Sidebar = ({ isOpen, onToggle, centreName = "Centre name goes here \n acro
|
|
|
1328
1375
|
...(activePage === subItem.id && {
|
|
1329
1376
|
backgroundColor: `${theme.palette.dark.main}1A`,
|
|
1330
1377
|
}),
|
|
1331
|
-
}, children: jsx(ListItemText, { primary: subItem.label, primaryTypographyProps: {
|
|
1378
|
+
}, children: jsxRuntime.jsx(material.ListItemText, { primary: subItem.label, primaryTypographyProps: {
|
|
1332
1379
|
fontSize: '0.875rem',
|
|
1333
|
-
} }) }), subItem.hasChildren && subItem.children && subItem.children.length > 0 && (jsx(IconButton, { onClick: () => toggleSubItem(subItem.id), sx: {
|
|
1380
|
+
} }) }), subItem.hasChildren && subItem.children && subItem.children.length > 0 && (jsxRuntime.jsx(material.IconButton, { onClick: () => toggleSubItem(subItem.id), sx: {
|
|
1334
1381
|
px: 1,
|
|
1335
1382
|
borderRadius: `0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px 0`,
|
|
1336
1383
|
'&:hover': {
|
|
1337
1384
|
backgroundColor: `${theme.palette.dark.main}0D`,
|
|
1338
1385
|
},
|
|
1339
|
-
}, children: jsx(ChevronRightRounded, { sx: {
|
|
1386
|
+
}, children: jsxRuntime.jsx(iconsMaterial.ChevronRightRounded, { sx: {
|
|
1340
1387
|
fontSize: 16,
|
|
1341
1388
|
color: '#4D3019',
|
|
1342
1389
|
transition: 'transform 0.2s',
|
|
1343
1390
|
transform: expandedSubItems.includes(subItem.id) ? 'rotate(90deg)' : 'rotate(0deg)',
|
|
1344
|
-
} }) }))] }), subItem.hasChildren && expandedSubItems.includes(subItem.id) && subItem.children && (jsx(Collapse, { in: true, timeout: "auto", children: jsx(List, { sx: { p: 0, mt: 0.5 }, children: subItem.children.map((nestedItem, index) => {
|
|
1391
|
+
} }) }))] }), subItem.hasChildren && expandedSubItems.includes(subItem.id) && subItem.children && (jsxRuntime.jsx(material.Collapse, { in: true, timeout: "auto", children: jsxRuntime.jsx(material.List, { sx: { p: 0, mt: 0.5 }, children: subItem.children.map((nestedItem, index) => {
|
|
1345
1392
|
const nestedPageId = `${subItem.id}-${index}`;
|
|
1346
|
-
return (jsx(ListItemButton, { onClick: () => handlePageClick(nestedPageId), sx: {
|
|
1393
|
+
return (jsxRuntime.jsx(material.ListItemButton, { onClick: () => handlePageClick(nestedPageId), sx: {
|
|
1347
1394
|
pl: 10,
|
|
1348
1395
|
py: 1,
|
|
1349
1396
|
borderRadius: theme.shape.borderRadius,
|
|
@@ -1353,13 +1400,13 @@ const Sidebar = ({ isOpen, onToggle, centreName = "Centre name goes here \n acro
|
|
|
1353
1400
|
...(activePage === nestedPageId && {
|
|
1354
1401
|
backgroundColor: `${theme.palette.dark.main}1A`,
|
|
1355
1402
|
}),
|
|
1356
|
-
}, children: jsx(ListItemText, { primary: nestedItem, primaryTypographyProps: {
|
|
1403
|
+
}, children: jsxRuntime.jsx(material.ListItemText, { primary: nestedItem, primaryTypographyProps: {
|
|
1357
1404
|
fontSize: '0.875rem',
|
|
1358
1405
|
} }) }, index));
|
|
1359
1406
|
}) }) }))] }, subItem.id))) }) }))] }, item.id))) }) })] }) })] }));
|
|
1360
1407
|
};
|
|
1361
1408
|
|
|
1362
|
-
const StyledHeader = styled
|
|
1409
|
+
const StyledHeader = material.styled(material.Box)(({ theme }) => ({
|
|
1363
1410
|
padding: theme.spacing(1.5, 4), // px-4 py-3
|
|
1364
1411
|
display: 'flex',
|
|
1365
1412
|
alignItems: 'center',
|
|
@@ -1374,7 +1421,7 @@ const StyledHeader = styled$1(Box)(({ theme }) => ({
|
|
|
1374
1421
|
gap: theme.spacing(4), // md:gap-4
|
|
1375
1422
|
},
|
|
1376
1423
|
}));
|
|
1377
|
-
const StyledLogoWrapper = styled
|
|
1424
|
+
const StyledLogoWrapper = material.styled(material.Box)(({ theme }) => ({
|
|
1378
1425
|
display: 'flex',
|
|
1379
1426
|
alignItems: 'center',
|
|
1380
1427
|
gap: theme.spacing(2), // md:gap-2
|
|
@@ -1382,7 +1429,7 @@ const StyledLogoWrapper = styled$1(Box)(({ theme }) => ({
|
|
|
1382
1429
|
gap: theme.spacing(1.5), // gap-1.5
|
|
1383
1430
|
},
|
|
1384
1431
|
}));
|
|
1385
|
-
const StyledLogoIcon = styled
|
|
1432
|
+
const StyledLogoIcon = material.styled(material.Box)(({ theme }) => ({
|
|
1386
1433
|
width: 32, // md:w-8 md:h-8
|
|
1387
1434
|
height: 32,
|
|
1388
1435
|
color: theme.palette.light.main, // text-[#FDFCEE]
|
|
@@ -1391,7 +1438,7 @@ const StyledLogoIcon = styled$1(Box)(({ theme }) => ({
|
|
|
1391
1438
|
height: 24, // h-6
|
|
1392
1439
|
},
|
|
1393
1440
|
}));
|
|
1394
|
-
const StyledLogoText = styled
|
|
1441
|
+
const StyledLogoText = material.styled(material.Typography)(({ theme }) => ({
|
|
1395
1442
|
color: theme.palette.light.main, // text-[#FDFCEE]
|
|
1396
1443
|
fontWeight: 700, // font-bold
|
|
1397
1444
|
letterSpacing: '0.05em', // tracking-wide
|
|
@@ -1403,7 +1450,7 @@ const StyledLogoText = styled$1(Typography)(({ theme }) => ({
|
|
|
1403
1450
|
fontSize: '1.125rem', // text-lg
|
|
1404
1451
|
},
|
|
1405
1452
|
}));
|
|
1406
|
-
const StyledSearchContainer = styled
|
|
1453
|
+
const StyledSearchContainer = material.styled(material.Box)(({ theme }) => ({
|
|
1407
1454
|
flex: 1,
|
|
1408
1455
|
maxWidth: '32rem', // max-w-2xl
|
|
1409
1456
|
margin: theme.spacing(0, 8), // mx-8
|
|
@@ -1415,7 +1462,7 @@ const StyledSearchContainer = styled$1(Box)(({ theme }) => ({
|
|
|
1415
1462
|
margin: theme.spacing(0, 2), // mx-2
|
|
1416
1463
|
},
|
|
1417
1464
|
}));
|
|
1418
|
-
const StyledTextField = styled
|
|
1465
|
+
const StyledTextField = material.styled(material.TextField)(({ theme }) => ({
|
|
1419
1466
|
'& .MuiInputBase-root': {
|
|
1420
1467
|
backgroundColor: theme.palette.light.main, // bg-[#FDFCEE]
|
|
1421
1468
|
color: theme.palette.dark.main, // text-[#4D3019]
|
|
@@ -1445,7 +1492,7 @@ const StyledTextField = styled$1(TextField)(({ theme }) => ({
|
|
|
1445
1492
|
outlineOffset: 0,
|
|
1446
1493
|
},
|
|
1447
1494
|
}));
|
|
1448
|
-
const StyledSearchButton = styled
|
|
1495
|
+
const StyledSearchButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1449
1496
|
position: 'absolute',
|
|
1450
1497
|
right: theme.spacing(2), // md:right-2
|
|
1451
1498
|
top: '50%',
|
|
@@ -1464,7 +1511,7 @@ const StyledSearchButton = styled$1(IconButton)(({ theme }) => ({
|
|
|
1464
1511
|
height: theme.spacing(4), // h-8
|
|
1465
1512
|
},
|
|
1466
1513
|
}));
|
|
1467
|
-
const StyledSearchIcon = styled
|
|
1514
|
+
const StyledSearchIcon = material.styled(material.Box)(({ theme }) => ({
|
|
1468
1515
|
width: 20, // md:w-5 md:h-5
|
|
1469
1516
|
height: 20,
|
|
1470
1517
|
color: theme.palette.light.main, // text-[#FDFCEE]
|
|
@@ -1473,7 +1520,7 @@ const StyledSearchIcon = styled$1(Box)(({ theme }) => ({
|
|
|
1473
1520
|
height: 16, // h-4
|
|
1474
1521
|
},
|
|
1475
1522
|
}));
|
|
1476
|
-
const StyledUserContainer = styled
|
|
1523
|
+
const StyledUserContainer = material.styled(material.Box)(({ theme }) => ({
|
|
1477
1524
|
display: 'flex',
|
|
1478
1525
|
alignItems: 'center',
|
|
1479
1526
|
gap: theme.spacing(3), // md:gap-3
|
|
@@ -1481,7 +1528,7 @@ const StyledUserContainer = styled$1(Box)(({ theme }) => ({
|
|
|
1481
1528
|
gap: theme.spacing(2), // gap-2
|
|
1482
1529
|
},
|
|
1483
1530
|
}));
|
|
1484
|
-
const StyledAvatar = styled
|
|
1531
|
+
const StyledAvatar = material.styled(material.Box)(({ theme }) => ({
|
|
1485
1532
|
width: theme.spacing(6), // md:w-12
|
|
1486
1533
|
height: theme.spacing(6), // md:h-12
|
|
1487
1534
|
borderRadius: '50%', // rounded-full
|
|
@@ -1499,7 +1546,7 @@ const StyledAvatar = styled$1(Box)(({ theme }) => ({
|
|
|
1499
1546
|
height: theme.spacing(4), // h-8
|
|
1500
1547
|
},
|
|
1501
1548
|
}));
|
|
1502
|
-
const StyledAvatarText = styled
|
|
1549
|
+
const StyledAvatarText = material.styled(material.Typography)(({ theme }) => ({
|
|
1503
1550
|
color: theme.palette.dark.main, // text-[#4D3019]
|
|
1504
1551
|
fontWeight: 700, // font-bold
|
|
1505
1552
|
fontSize: '1.125rem', // text-lg
|
|
@@ -1507,7 +1554,7 @@ const StyledAvatarText = styled$1(Typography)(({ theme }) => ({
|
|
|
1507
1554
|
fontSize: '0.875rem', // text-sm
|
|
1508
1555
|
},
|
|
1509
1556
|
}));
|
|
1510
|
-
const StyledUserName = styled
|
|
1557
|
+
const StyledUserName = material.styled(material.Typography)(({ theme }) => ({
|
|
1511
1558
|
color: theme.palette.light.main, // text-[#FDFCEE]
|
|
1512
1559
|
fontWeight: 500, // font-medium
|
|
1513
1560
|
fontSize: '1.125rem', // text-lg
|
|
@@ -1521,12 +1568,12 @@ const StyledUserName = styled$1(Typography)(({ theme }) => ({
|
|
|
1521
1568
|
}));
|
|
1522
1569
|
const Header = ({ userName = 'John Doe', userInitials = 'JD', }) => {
|
|
1523
1570
|
const { theme } = useTheme();
|
|
1524
|
-
return (jsxs(StyledHeader, { children: [jsxs(StyledLogoWrapper, { children: [jsx(StyledLogoIcon, { children: jsx(SchoolRounded, { sx: { fontSize: 32, color: 'currentColor' } }) }), jsx(StyledLogoText, { variant: "h1", children: theme.appName })] }), jsx(StyledSearchContainer, { children: jsx(StyledTextField, { placeholder: "Search for a policy", variant: "outlined", fullWidth: true, InputProps: {
|
|
1525
|
-
endAdornment: (jsx(StyledSearchButton, { children: jsx(StyledSearchIcon, { children: jsx(SearchRounded, { sx: { fontSize: 20 } }) }) })),
|
|
1526
|
-
} }) }), jsxs(StyledUserContainer, { children: [jsx(StyledAvatar, { children: jsx(StyledAvatarText, { children: userInitials }) }), jsx(StyledUserName, { children: userName })] })] }));
|
|
1571
|
+
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: {
|
|
1572
|
+
endAdornment: (jsxRuntime.jsx(StyledSearchButton, { children: jsxRuntime.jsx(StyledSearchIcon, { children: jsxRuntime.jsx(iconsMaterial.SearchRounded, { sx: { fontSize: 20 } }) }) })),
|
|
1573
|
+
} }) }), jsxRuntime.jsxs(StyledUserContainer, { children: [jsxRuntime.jsx(StyledAvatar, { children: jsxRuntime.jsx(StyledAvatarText, { children: userInitials }) }), jsxRuntime.jsx(StyledUserName, { children: userName })] })] }));
|
|
1527
1574
|
};
|
|
1528
1575
|
|
|
1529
|
-
const Container = styled
|
|
1576
|
+
const Container = material.styled(material.Box)(({ theme }) => ({
|
|
1530
1577
|
width: '100%',
|
|
1531
1578
|
[theme.breakpoints.up('md')]: {
|
|
1532
1579
|
position: 'sticky',
|
|
@@ -1543,7 +1590,7 @@ const Container = styled$1(Box)(({ theme }) => ({
|
|
|
1543
1590
|
},
|
|
1544
1591
|
marginBottom: theme.spacing(2),
|
|
1545
1592
|
}));
|
|
1546
|
-
const ContentBox = styled
|
|
1593
|
+
const ContentBox = material.styled(material.Box)(({ theme }) => ({
|
|
1547
1594
|
backgroundColor: '#FEFDF7',
|
|
1548
1595
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
1549
1596
|
? parseInt(theme.shape.borderRadius, 10)
|
|
@@ -1554,7 +1601,7 @@ const ContentBox = styled$1(Box)(({ theme }) => ({
|
|
|
1554
1601
|
padding: theme.spacing(3),
|
|
1555
1602
|
},
|
|
1556
1603
|
}));
|
|
1557
|
-
const NavLink = styled
|
|
1604
|
+
const NavLink = material.styled(material.Link)(({ theme, isActive }) => ({
|
|
1558
1605
|
display: 'block',
|
|
1559
1606
|
padding: theme.spacing(1, 2),
|
|
1560
1607
|
fontSize: '0.875rem',
|
|
@@ -1569,18 +1616,18 @@ const NavLink = styled$1(Link)(({ theme, isActive }) => ({
|
|
|
1569
1616
|
},
|
|
1570
1617
|
}));
|
|
1571
1618
|
const TableOfContents = ({ sections, activeSection = 'current-section', }) => {
|
|
1572
|
-
return (jsx(Container, { children: jsxs(ContentBox, { children: [jsx(Typography, { variant: "h6", sx: {
|
|
1619
|
+
return (jsxRuntime.jsx(Container, { children: jsxRuntime.jsxs(ContentBox, { children: [jsxRuntime.jsx(material.Typography, { variant: "h6", sx: {
|
|
1573
1620
|
color: '#4D3019',
|
|
1574
1621
|
fontWeight: 600,
|
|
1575
1622
|
fontSize: '16px',
|
|
1576
1623
|
mb: 3,
|
|
1577
|
-
}, children: "In this policy" }), jsx(Box, { component: "nav", sx: { display: 'flex', flexDirection: 'column', gap: 0.25 }, children: sections.map((section) => {
|
|
1624
|
+
}, children: "In this policy" }), jsxRuntime.jsx(material.Box, { component: "nav", sx: { display: 'flex', flexDirection: 'column', gap: 0.25 }, children: sections.map((section) => {
|
|
1578
1625
|
const isActive = section.id === activeSection;
|
|
1579
|
-
return (jsx(NavLink, { href: `#${section.id}`, isActive: isActive, children: section.title }, section.id));
|
|
1626
|
+
return (jsxRuntime.jsx(NavLink, { href: `#${section.id}`, isActive: isActive, children: section.title }, section.id));
|
|
1580
1627
|
}) })] }) }));
|
|
1581
1628
|
};
|
|
1582
1629
|
|
|
1583
|
-
const ToggleButton = styled
|
|
1630
|
+
const ToggleButton = material.styled(material.Box)(({ theme }) => ({
|
|
1584
1631
|
display: 'inline-flex',
|
|
1585
1632
|
alignItems: 'center',
|
|
1586
1633
|
gap: theme.spacing(1.5),
|
|
@@ -1596,7 +1643,7 @@ const ToggleButton = styled$1(Box)(({ theme }) => ({
|
|
|
1596
1643
|
borderColor: `${theme.palette.dark.main}4D`,
|
|
1597
1644
|
},
|
|
1598
1645
|
}));
|
|
1599
|
-
const ToggleTrack = styled
|
|
1646
|
+
const ToggleTrack = material.styled(material.Box)(({ theme, isChecked }) => ({
|
|
1600
1647
|
position: 'relative',
|
|
1601
1648
|
width: '56px',
|
|
1602
1649
|
height: '32px',
|
|
@@ -1604,7 +1651,7 @@ const ToggleTrack = styled$1(Box)(({ theme, isChecked }) => ({
|
|
|
1604
1651
|
backgroundColor: isChecked ? theme.palette.secondary.main : '#e5e7eb',
|
|
1605
1652
|
transition: 'background-color 0.2s',
|
|
1606
1653
|
}));
|
|
1607
|
-
const ToggleThumb = styled
|
|
1654
|
+
const ToggleThumb = material.styled(material.Box)(({ isChecked }) => ({
|
|
1608
1655
|
position: 'absolute',
|
|
1609
1656
|
top: '4px',
|
|
1610
1657
|
width: '24px',
|
|
@@ -1615,23 +1662,23 @@ const ToggleThumb = styled$1(Box)(({ isChecked }) => ({
|
|
|
1615
1662
|
transform: isChecked ? 'translateX(28px)' : 'translateX(4px)',
|
|
1616
1663
|
}));
|
|
1617
1664
|
const Toggle = ({ label = 'Admin view', checked = false, onChange, }) => {
|
|
1618
|
-
const [isChecked, setIsChecked] = useState(checked);
|
|
1665
|
+
const [isChecked, setIsChecked] = React.useState(checked);
|
|
1619
1666
|
const handleToggle = () => {
|
|
1620
1667
|
const newValue = !isChecked;
|
|
1621
1668
|
setIsChecked(newValue);
|
|
1622
1669
|
onChange?.(newValue);
|
|
1623
1670
|
};
|
|
1624
|
-
|
|
1671
|
+
React.useEffect(() => {
|
|
1625
1672
|
setIsChecked(checked);
|
|
1626
1673
|
}, [checked]);
|
|
1627
|
-
return (jsxs(ToggleButton, { onClick: handleToggle, children: [jsx(ToggleTrack, { isChecked: isChecked, children: jsx(ToggleThumb, { isChecked: isChecked }) }), jsx(Typography, { sx: {
|
|
1674
|
+
return (jsxRuntime.jsxs(ToggleButton, { onClick: handleToggle, children: [jsxRuntime.jsx(ToggleTrack, { isChecked: isChecked, children: jsxRuntime.jsx(ToggleThumb, { isChecked: isChecked }) }), jsxRuntime.jsx(material.Typography, { sx: {
|
|
1628
1675
|
color: '#4D3019',
|
|
1629
1676
|
fontWeight: 500,
|
|
1630
1677
|
fontSize: '0.875rem',
|
|
1631
1678
|
}, children: label })] }));
|
|
1632
1679
|
};
|
|
1633
1680
|
|
|
1634
|
-
const StyledDialog = styled
|
|
1681
|
+
const StyledDialog = material.styled(material.Dialog)(({ theme }) => ({
|
|
1635
1682
|
'& .MuiDialog-paper': {
|
|
1636
1683
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
1637
1684
|
? parseInt(theme.shape.borderRadius, 10)
|
|
@@ -1640,7 +1687,7 @@ const StyledDialog = styled$1(Dialog)(({ theme }) => ({
|
|
|
1640
1687
|
width: '100%',
|
|
1641
1688
|
},
|
|
1642
1689
|
}));
|
|
1643
|
-
const StyledDialogTitle = styled
|
|
1690
|
+
const StyledDialogTitle = material.styled(material.DialogTitle)(({ theme }) => ({
|
|
1644
1691
|
display: 'flex',
|
|
1645
1692
|
alignItems: 'center',
|
|
1646
1693
|
justifyContent: 'space-between',
|
|
@@ -1650,7 +1697,7 @@ const StyledDialogTitle = styled$1(DialogTitle)(({ theme }) => ({
|
|
|
1650
1697
|
fontWeight: 600,
|
|
1651
1698
|
color: theme.palette.dark.main,
|
|
1652
1699
|
}));
|
|
1653
|
-
const CloseButton = styled
|
|
1700
|
+
const CloseButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1654
1701
|
padding: theme.spacing(0.5),
|
|
1655
1702
|
'&:hover': {
|
|
1656
1703
|
backgroundColor: `${theme.palette.dark.main}0D`,
|
|
@@ -1658,10 +1705,10 @@ const CloseButton = styled$1(IconButton)(({ theme }) => ({
|
|
|
1658
1705
|
}));
|
|
1659
1706
|
const SimpleModal = ({ isOpen, onClose, title, children, }) => {
|
|
1660
1707
|
const { theme } = useTheme();
|
|
1661
|
-
return (jsxs(StyledDialog, { open: isOpen, onClose: onClose, maxWidth: "sm", fullWidth: true, children: [jsxs(StyledDialogTitle, { children: [title, jsx(CloseButton, { onClick: onClose, "aria-label": "Close", children: jsx(CloseRounded, { sx: { fontSize: 20, color: theme.palette.dark.main } }) })] }), jsx(DialogContent, { sx: { p: 3 }, children: children })] }));
|
|
1708
|
+
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 })] }));
|
|
1662
1709
|
};
|
|
1663
1710
|
|
|
1664
|
-
const StyledIconButton = styled
|
|
1711
|
+
const StyledIconButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1665
1712
|
width: 48,
|
|
1666
1713
|
height: 48,
|
|
1667
1714
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
@@ -1681,26 +1728,26 @@ const StyledIconButton = styled$1(IconButton)(({ theme }) => ({
|
|
|
1681
1728
|
},
|
|
1682
1729
|
}));
|
|
1683
1730
|
const ActionButton = ({ icon: Icon, onClick, label, sx, }) => {
|
|
1684
|
-
return (jsx(StyledIconButton, { onClick: onClick, "aria-label": label, sx: sx, children: jsx(Icon, {}) }));
|
|
1731
|
+
return (jsxRuntime.jsx(StyledIconButton, { onClick: onClick, "aria-label": label, sx: sx, children: jsxRuntime.jsx(Icon, {}) }));
|
|
1685
1732
|
};
|
|
1686
1733
|
|
|
1687
|
-
const StyledWrapper = styled
|
|
1734
|
+
const StyledWrapper = material.styled(material.Box)(({ theme }) => ({
|
|
1688
1735
|
// No specific wrapper styles needed, just a container
|
|
1689
1736
|
}));
|
|
1690
|
-
const StyledParagraph = styled
|
|
1737
|
+
const StyledParagraph = material.styled(material.Typography)(({ theme }) => ({
|
|
1691
1738
|
fontSize: '14px', // text-[14px]
|
|
1692
1739
|
color: theme.palette.dark.main, // text-[#4D3019]
|
|
1693
1740
|
display: 'inline-flex',
|
|
1694
1741
|
alignItems: 'center',
|
|
1695
1742
|
}));
|
|
1696
|
-
const StyledTermWrapper = styled
|
|
1743
|
+
const StyledTermWrapper = material.styled(material.Box)(({ theme }) => ({
|
|
1697
1744
|
position: 'relative',
|
|
1698
1745
|
display: 'inline-flex',
|
|
1699
1746
|
alignItems: 'center',
|
|
1700
1747
|
cursor: 'pointer',
|
|
1701
1748
|
marginLeft: theme.spacing(0.5), // ml-1
|
|
1702
1749
|
}));
|
|
1703
|
-
const StyledTerm = styled
|
|
1750
|
+
const StyledTerm = material.styled('span', {
|
|
1704
1751
|
shouldForwardProp: (prop) => prop !== 'isOpen',
|
|
1705
1752
|
})(({ theme, isOpen }) => ({
|
|
1706
1753
|
paddingBottom: '1px', // style={{ paddingBottom: '1px' }}
|
|
@@ -1710,14 +1757,14 @@ const StyledTerm = styled$1('span', {
|
|
|
1710
1757
|
borderBottomColor: theme.palette.secondary.main, // hover effect
|
|
1711
1758
|
},
|
|
1712
1759
|
}));
|
|
1713
|
-
const StyledIconWrapper = styled
|
|
1760
|
+
const StyledIconWrapper = material.styled(material.Box)(({ theme }) => ({
|
|
1714
1761
|
display: 'inline-flex',
|
|
1715
1762
|
alignItems: 'center',
|
|
1716
1763
|
justifyContent: 'center',
|
|
1717
1764
|
marginLeft: theme.spacing(0.5), // ml-1
|
|
1718
1765
|
transition: 'color 0.2s', // transition-colors
|
|
1719
1766
|
}));
|
|
1720
|
-
const StyledDefinitionBox = styled
|
|
1767
|
+
const StyledDefinitionBox = material.styled(material.Box)(({ theme }) => ({
|
|
1721
1768
|
marginTop: theme.spacing(2), // mt-4
|
|
1722
1769
|
padding: theme.spacing(2), // p-4
|
|
1723
1770
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
@@ -1727,30 +1774,30 @@ const StyledDefinitionBox = styled$1(Box)(({ theme }) => ({
|
|
|
1727
1774
|
borderRight: `4px solid ${theme.palette.dark.main}33`, // border-r-4
|
|
1728
1775
|
backgroundColor: theme.palette.light.main, // style={{ backgroundColor: '#FDFCEE' }}
|
|
1729
1776
|
}));
|
|
1730
|
-
const StyledDefinitionText = styled
|
|
1777
|
+
const StyledDefinitionText = material.styled(material.Typography)(({ theme }) => ({
|
|
1731
1778
|
fontSize: '14px', // text-[14px]
|
|
1732
1779
|
color: theme.palette.dark.main, // text-[#4D3019]
|
|
1733
1780
|
lineHeight: 1.5, // leading-relaxed
|
|
1734
1781
|
}));
|
|
1735
1782
|
function DefinitionBox({ term, definition, children }) {
|
|
1736
1783
|
const { theme } = useTheme();
|
|
1737
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
1738
|
-
return (jsxs(StyledWrapper, { children: [jsxs(StyledParagraph, { children: [children, jsxs(StyledTermWrapper, { onClick: () => setIsOpen(!isOpen), children: [jsx(StyledTerm, { isOpen: isOpen, onMouseEnter: (e) => (e.currentTarget.style.borderBottomColor = theme.palette.secondary.main), onMouseLeave: (e) => (e.currentTarget.style.borderBottomColor = isOpen ? theme.palette.secondary.main : theme.palette.dark.main), children: term }), jsx(StyledIconWrapper, { children: isOpen ? (jsx(CloseRounded, { sx: {
|
|
1784
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
1785
|
+
return (jsxRuntime.jsxs(StyledWrapper, { children: [jsxRuntime.jsxs(StyledParagraph, { children: [children, jsxRuntime.jsxs(StyledTermWrapper, { onClick: () => setIsOpen(!isOpen), children: [jsxRuntime.jsx(StyledTerm, { isOpen: isOpen, onMouseEnter: (e) => (e.currentTarget.style.borderBottomColor = theme.palette.secondary.main), onMouseLeave: (e) => (e.currentTarget.style.borderBottomColor = isOpen ? theme.palette.secondary.main : theme.palette.dark.main), children: term }), jsxRuntime.jsx(StyledIconWrapper, { children: isOpen ? (jsxRuntime.jsx(iconsMaterial.CloseRounded, { sx: {
|
|
1739
1786
|
fontSize: 16,
|
|
1740
1787
|
color: isOpen ? theme.palette.secondary.main : theme.palette.dark.main,
|
|
1741
1788
|
'&:hover': {
|
|
1742
1789
|
color: theme.palette.secondary.main
|
|
1743
1790
|
}
|
|
1744
|
-
} })) : (jsx(AddRounded, { sx: {
|
|
1791
|
+
} })) : (jsxRuntime.jsx(iconsMaterial.AddRounded, { sx: {
|
|
1745
1792
|
fontSize: 16,
|
|
1746
1793
|
color: theme.palette.dark.main,
|
|
1747
1794
|
'&:hover': {
|
|
1748
1795
|
color: theme.palette.secondary.main
|
|
1749
1796
|
}
|
|
1750
|
-
} })) })] })] }), isOpen && (jsx(StyledDefinitionBox, { children: jsx(StyledDefinitionText, { children: definition }) }))] }));
|
|
1797
|
+
} })) })] })] }), isOpen && (jsxRuntime.jsx(StyledDefinitionBox, { children: jsxRuntime.jsx(StyledDefinitionText, { children: definition }) }))] }));
|
|
1751
1798
|
}
|
|
1752
1799
|
|
|
1753
|
-
const HomeButton = styled
|
|
1800
|
+
const HomeButton = material.styled(material.IconButton)(({ theme }) => ({
|
|
1754
1801
|
width: 40,
|
|
1755
1802
|
height: 40,
|
|
1756
1803
|
borderRadius: (typeof theme.shape.borderRadius === 'string'
|
|
@@ -1767,7 +1814,7 @@ const HomeButton = styled$1(IconButton)(({ theme }) => ({
|
|
|
1767
1814
|
opacity: 0.8,
|
|
1768
1815
|
},
|
|
1769
1816
|
}));
|
|
1770
|
-
const DropdownButton = styled
|
|
1817
|
+
const DropdownButton = material.styled('button')(({ theme }) => ({
|
|
1771
1818
|
display: 'flex',
|
|
1772
1819
|
alignItems: 'center',
|
|
1773
1820
|
gap: theme.spacing(1),
|
|
@@ -1791,7 +1838,7 @@ const DropdownButton = styled$1('button')(({ theme }) => ({
|
|
|
1791
1838
|
gap: theme.spacing(0.5),
|
|
1792
1839
|
},
|
|
1793
1840
|
}));
|
|
1794
|
-
const StyledMenu = styled
|
|
1841
|
+
const StyledMenu = material.styled(material.Menu)(({ theme }) => ({
|
|
1795
1842
|
'& .MuiPaper-root': {
|
|
1796
1843
|
marginTop: theme.spacing(1),
|
|
1797
1844
|
width: '256px',
|
|
@@ -1802,7 +1849,7 @@ const StyledMenu = styled$1(Menu)(({ theme }) => ({
|
|
|
1802
1849
|
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
|
1803
1850
|
},
|
|
1804
1851
|
}));
|
|
1805
|
-
const StyledMenuItem = styled
|
|
1852
|
+
const StyledMenuItem = material.styled(material.MenuItem)(({ theme, isActive }) => ({
|
|
1806
1853
|
padding: theme.spacing(1.25, 2),
|
|
1807
1854
|
fontSize: '0.875rem',
|
|
1808
1855
|
color: isActive ? theme.palette.primary.main : '#4D3019',
|
|
@@ -1814,7 +1861,7 @@ const StyledMenuItem = styled$1(MenuItem)(({ theme, isActive }) => ({
|
|
|
1814
1861
|
}));
|
|
1815
1862
|
const Breadcrumb = ({ items, currentItem, dropdownItems = [], onItemSelect, }) => {
|
|
1816
1863
|
const { theme } = useTheme();
|
|
1817
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
1864
|
+
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
1818
1865
|
const isDropdownOpen = Boolean(anchorEl);
|
|
1819
1866
|
const handleDropdownToggle = (event) => {
|
|
1820
1867
|
setAnchorEl(event.currentTarget);
|
|
@@ -1826,38 +1873,63 @@ const Breadcrumb = ({ items, currentItem, dropdownItems = [], onItemSelect, }) =
|
|
|
1826
1873
|
onItemSelect?.(item);
|
|
1827
1874
|
handleClose();
|
|
1828
1875
|
};
|
|
1829
|
-
return (jsxs(Box, { component: "nav", sx: {
|
|
1876
|
+
return (jsxRuntime.jsxs(material.Box, { component: "nav", sx: {
|
|
1830
1877
|
display: 'flex',
|
|
1831
1878
|
alignItems: 'center',
|
|
1832
1879
|
gap: { xs: 0.5, sm: 1 },
|
|
1833
1880
|
fontSize: { xs: '0.75rem', sm: '0.875rem' },
|
|
1834
1881
|
overflow: 'visible',
|
|
1835
|
-
}, children: [jsx(HomeButton, { "aria-label": "Home", children: jsx(HomeRounded, { sx: { fontSize: 20, color: "#4D3019" } }) }), jsx(Breadcrumbs, { separator: "/", sx: {
|
|
1882
|
+
}, children: [jsxRuntime.jsx(HomeButton, { "aria-label": "Home", children: jsxRuntime.jsx(iconsMaterial.HomeRounded, { sx: { fontSize: 20, color: "#4D3019" } }) }), jsxRuntime.jsx(material.Breadcrumbs, { separator: "/", sx: {
|
|
1836
1883
|
display: { xs: 'none', md: 'flex' },
|
|
1837
1884
|
'& .MuiBreadcrumbs-separator': {
|
|
1838
1885
|
color: `${theme.palette.dark.main}66`,
|
|
1839
1886
|
},
|
|
1840
|
-
}, children: items.map((item, index) => (jsx(Typography, { sx: {
|
|
1887
|
+
}, children: items.map((item, index) => (jsxRuntime.jsx(material.Typography, { sx: {
|
|
1841
1888
|
color: theme.palette.dark.main,
|
|
1842
1889
|
fontWeight: 500,
|
|
1843
1890
|
px: { xs: 0.5, sm: 1 },
|
|
1844
1891
|
whiteSpace: 'nowrap',
|
|
1845
1892
|
fontSize: 'inherit',
|
|
1846
|
-
}, children: item.label }, index))) }), jsx(Typography, { sx: {
|
|
1893
|
+
}, children: item.label }, index))) }), jsxRuntime.jsx(material.Typography, { sx: {
|
|
1847
1894
|
display: { xs: 'none', md: 'inline' },
|
|
1848
1895
|
color: `${theme.palette.dark.main}66`,
|
|
1849
|
-
}, children: "/" }), jsxs(Box, { sx: { position: 'relative', flexShrink: 0 }, children: [jsxs(DropdownButton, { type: "button", onClick: handleDropdownToggle, children: [jsx("span", { children: currentItem }), jsx(ExpandMoreRounded, { sx: {
|
|
1896
|
+
}, children: "/" }), jsxRuntime.jsxs(material.Box, { sx: { position: 'relative', flexShrink: 0 }, children: [jsxRuntime.jsxs(DropdownButton, { type: "button", onClick: handleDropdownToggle, children: [jsxRuntime.jsx("span", { children: currentItem }), jsxRuntime.jsx(iconsMaterial.ExpandMoreRounded, { sx: {
|
|
1850
1897
|
fontSize: 20,
|
|
1851
1898
|
transition: 'transform 0.2s',
|
|
1852
1899
|
transform: isDropdownOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
1853
|
-
} })] }), dropdownItems.length > 0 && (jsx(StyledMenu, { anchorEl: anchorEl, open: isDropdownOpen, onClose: handleClose, anchorOrigin: {
|
|
1900
|
+
} })] }), dropdownItems.length > 0 && (jsxRuntime.jsx(StyledMenu, { anchorEl: anchorEl, open: isDropdownOpen, onClose: handleClose, anchorOrigin: {
|
|
1854
1901
|
vertical: 'bottom',
|
|
1855
1902
|
horizontal: 'left',
|
|
1856
1903
|
}, transformOrigin: {
|
|
1857
1904
|
vertical: 'top',
|
|
1858
1905
|
horizontal: 'left',
|
|
1859
|
-
}, children: dropdownItems.map((item, index) => (jsx(StyledMenuItem, { onClick: () => handleItemClick(item), isActive: item === currentItem, children: item }, index))) }))] })] }));
|
|
1906
|
+
}, children: dropdownItems.map((item, index) => (jsxRuntime.jsx(StyledMenuItem, { onClick: () => handleItemClick(item), isActive: item === currentItem, children: item }, index))) }))] })] }));
|
|
1860
1907
|
};
|
|
1861
1908
|
|
|
1862
|
-
|
|
1863
|
-
|
|
1909
|
+
exports.ActionButton = ActionButton;
|
|
1910
|
+
exports.Alert = Alert;
|
|
1911
|
+
exports.Breadcrumb = Breadcrumb;
|
|
1912
|
+
exports.Button = Button;
|
|
1913
|
+
exports.Card = Card;
|
|
1914
|
+
exports.Checkbox = Checkbox;
|
|
1915
|
+
exports.Concertina = Concertina;
|
|
1916
|
+
exports.DefinitionBox = DefinitionBox;
|
|
1917
|
+
exports.Header = Header;
|
|
1918
|
+
exports.Input = Input;
|
|
1919
|
+
exports.Modal = Modal;
|
|
1920
|
+
exports.NoteBox = NoteBox;
|
|
1921
|
+
exports.Progress = Progress;
|
|
1922
|
+
exports.Radio = Radio;
|
|
1923
|
+
exports.RadioGroup = RadioGroup;
|
|
1924
|
+
exports.ReadBy = ReadBy;
|
|
1925
|
+
exports.Select = Select;
|
|
1926
|
+
exports.Sidebar = Sidebar;
|
|
1927
|
+
exports.SimpleModal = SimpleModal;
|
|
1928
|
+
exports.StatusBar = StatusBar;
|
|
1929
|
+
exports.StepIndicator = StepIndicator;
|
|
1930
|
+
exports.TableOfContents = TableOfContents;
|
|
1931
|
+
exports.Tabs = Tabs;
|
|
1932
|
+
exports.ThemeProvider = ThemeProvider;
|
|
1933
|
+
exports.Toggle = Toggle;
|
|
1934
|
+
exports.useTheme = useTheme;
|
|
1935
|
+
//# sourceMappingURL=index.cjs.map
|