ece-docs-components 1.0.97 → 1.0.99
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/cjs/components/Concertina.js +63 -52
- package/dist/cjs/components/Concertina.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/node_modules/domhandler/lib/index.js +1 -1
- package/dist/cjs/node_modules/html-dom-parser/lib/index.js +1 -1
- package/dist/cjs/themes/GPTheme.js +132 -125
- package/dist/cjs/themes/GPTheme.js.map +1 -1
- package/dist/esm/components/Concertina.d.ts +1 -1
- package/dist/esm/components/Concertina.js +63 -52
- package/dist/esm/components/Concertina.js.map +1 -1
- package/dist/esm/components/index.d.ts +28 -28
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/themes/GPTheme.js +132 -125
- package/dist/esm/themes/GPTheme.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,115 +5,117 @@ import { ExpandCircleDownOutlined } from '@mui/icons-material';
|
|
|
5
5
|
import { useTheme } from '../ThemeProvider.js';
|
|
6
6
|
|
|
7
7
|
const StyledConcertina = styled(Box)(({ theme }) => ({
|
|
8
|
-
width:
|
|
9
|
-
display:
|
|
10
|
-
flexDirection:
|
|
8
|
+
width: "100%",
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
11
|
gap: theme.spacing(1),
|
|
12
12
|
}));
|
|
13
13
|
const StyledSection = styled(Box)(({ theme }) => ({
|
|
14
|
-
overflow:
|
|
14
|
+
overflow: "hidden",
|
|
15
15
|
}));
|
|
16
16
|
const StyledHeader = styled(Box)(({ theme }) => ({
|
|
17
|
-
display:
|
|
18
|
-
alignItems:
|
|
17
|
+
display: "flex",
|
|
18
|
+
alignItems: "center",
|
|
19
19
|
borderTop: `2px solid ${theme.palette.grey[200]}`,
|
|
20
20
|
borderBottom: `2px solid ${theme.palette.grey[200]}`,
|
|
21
|
-
justifyContent:
|
|
22
|
-
cursor:
|
|
23
|
-
transition:
|
|
21
|
+
justifyContent: "space-between",
|
|
22
|
+
cursor: "pointer",
|
|
23
|
+
transition: "background-color 0.2s",
|
|
24
24
|
gap: theme.spacing(2),
|
|
25
|
-
|
|
25
|
+
"&:hover": {
|
|
26
26
|
backgroundColor: theme.palette.background.default,
|
|
27
27
|
},
|
|
28
28
|
padding: theme.spacing(2),
|
|
29
29
|
}));
|
|
30
30
|
const StyledTitleWrapper = styled(Box)(({ theme }) => ({
|
|
31
|
-
display:
|
|
32
|
-
alignItems:
|
|
31
|
+
display: "flex",
|
|
32
|
+
alignItems: "center",
|
|
33
33
|
gap: 0,
|
|
34
34
|
flex: 1,
|
|
35
35
|
minWidth: 0,
|
|
36
36
|
}));
|
|
37
|
-
const StyledHashtag = styled(
|
|
38
|
-
shouldForwardProp: (prop) => prop !==
|
|
37
|
+
const StyledHashtag = styled("span", {
|
|
38
|
+
shouldForwardProp: (prop) => prop !== "isVisible" && prop !== "color",
|
|
39
39
|
})(({ theme, isVisible, color }) => ({
|
|
40
40
|
color: color || theme.palette.info.main,
|
|
41
41
|
fontWeight: 700,
|
|
42
|
-
fontSize:
|
|
42
|
+
fontSize: "inherit",
|
|
43
43
|
opacity: isVisible ? 1 : 0,
|
|
44
|
-
transition:
|
|
45
|
-
marginRight: isVisible ?
|
|
46
|
-
cursor:
|
|
44
|
+
transition: "opacity 0.2s",
|
|
45
|
+
marginRight: isVisible ? "0.25em" : 0,
|
|
46
|
+
cursor: "pointer",
|
|
47
47
|
}));
|
|
48
48
|
const StyledTitle = styled(Typography, {
|
|
49
|
-
shouldForwardProp: (prop) => prop !==
|
|
49
|
+
shouldForwardProp: (prop) => prop !== "isHovered",
|
|
50
50
|
})(({ theme, isHovered }) => ({
|
|
51
51
|
fontWeight: 700,
|
|
52
|
-
fontSize:
|
|
52
|
+
fontSize: "1.75rem",
|
|
53
53
|
lineHeight: 1.2,
|
|
54
54
|
color: theme.palette.dark.main,
|
|
55
|
-
wordBreak:
|
|
56
|
-
display:
|
|
57
|
-
position:
|
|
58
|
-
paddingBottom:
|
|
59
|
-
borderBottom: isHovered
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
wordBreak: "break-word",
|
|
56
|
+
display: "inline-block",
|
|
57
|
+
position: "relative",
|
|
58
|
+
paddingBottom: "2px",
|
|
59
|
+
borderBottom: isHovered
|
|
60
|
+
? `3px solid ${theme.palette.info.main}`
|
|
61
|
+
: "3px solid transparent",
|
|
62
|
+
transition: "border-bottom 0.2s",
|
|
63
|
+
[theme.breakpoints.down("lg")]: {
|
|
64
|
+
fontSize: "1.25rem",
|
|
63
65
|
},
|
|
64
|
-
[theme.breakpoints.down(
|
|
65
|
-
fontSize:
|
|
66
|
+
[theme.breakpoints.down("md")]: {
|
|
67
|
+
fontSize: "1.125rem",
|
|
66
68
|
},
|
|
67
|
-
[theme.breakpoints.down(
|
|
68
|
-
fontSize:
|
|
69
|
+
[theme.breakpoints.down("sm")]: {
|
|
70
|
+
fontSize: "1rem",
|
|
69
71
|
},
|
|
70
72
|
}));
|
|
71
73
|
const StyledTooltip = styled(Box)(({ theme }) => ({
|
|
72
|
-
position:
|
|
73
|
-
transform:
|
|
74
|
+
position: "fixed",
|
|
75
|
+
transform: "translate(-50%, -120%)",
|
|
74
76
|
backgroundColor: theme.palette.grey[900],
|
|
75
77
|
color: theme.palette.common.white,
|
|
76
|
-
fontSize:
|
|
78
|
+
fontSize: "0.75rem",
|
|
77
79
|
padding: theme.spacing(1, 2),
|
|
78
80
|
borderRadius: theme.shape.borderRadius,
|
|
79
|
-
whiteSpace:
|
|
81
|
+
whiteSpace: "nowrap",
|
|
80
82
|
zIndex: 1000,
|
|
81
|
-
pointerEvents:
|
|
82
|
-
[theme.breakpoints.up(
|
|
83
|
-
fontSize:
|
|
83
|
+
pointerEvents: "none",
|
|
84
|
+
[theme.breakpoints.up("sm")]: {
|
|
85
|
+
fontSize: "0.875rem",
|
|
84
86
|
padding: theme.spacing(1.5, 3),
|
|
85
87
|
},
|
|
86
88
|
}));
|
|
87
89
|
const StyledContent = styled(Box)(({ theme }) => ({
|
|
88
90
|
padding: theme.spacing(2, 3, 3),
|
|
89
|
-
[theme.breakpoints.up(
|
|
91
|
+
[theme.breakpoints.up("sm")]: {
|
|
90
92
|
padding: theme.spacing(2, 4, 4),
|
|
91
93
|
},
|
|
92
|
-
[theme.breakpoints.up(
|
|
94
|
+
[theme.breakpoints.up("md")]: {
|
|
93
95
|
padding: theme.spacing(2, 6, 6),
|
|
94
96
|
},
|
|
95
97
|
}));
|
|
96
98
|
const StyledContentWrapper = styled(Box)(({ theme }) => ({
|
|
97
99
|
color: theme.palette.dark.main,
|
|
98
100
|
lineHeight: 1.5,
|
|
99
|
-
wordBreak:
|
|
101
|
+
wordBreak: "break-word",
|
|
100
102
|
fontSize: 13,
|
|
101
|
-
|
|
103
|
+
"& p": {
|
|
102
104
|
margin: 0,
|
|
103
105
|
marginBottom: theme.spacing(2),
|
|
104
|
-
|
|
106
|
+
"&:last-child": {
|
|
105
107
|
marginBottom: 0,
|
|
106
108
|
},
|
|
107
109
|
},
|
|
108
|
-
|
|
110
|
+
"& ul, & ol": {
|
|
109
111
|
marginTop: theme.spacing(1),
|
|
110
112
|
marginBottom: theme.spacing(2),
|
|
111
113
|
paddingLeft: theme.spacing(3),
|
|
112
|
-
|
|
114
|
+
"&:last-child": {
|
|
113
115
|
marginBottom: 0,
|
|
114
116
|
},
|
|
115
117
|
},
|
|
116
|
-
|
|
118
|
+
"& li": {
|
|
117
119
|
marginBottom: theme.spacing(0.5),
|
|
118
120
|
},
|
|
119
121
|
}));
|
|
@@ -122,19 +124,21 @@ function Concertina({ sections }) {
|
|
|
122
124
|
const [copiedId, setCopiedId] = useState(null);
|
|
123
125
|
const [tooltipPosition, setTooltipPosition] = useState(null);
|
|
124
126
|
const theme = useTheme();
|
|
125
|
-
const isDesktop = useMediaQuery(theme.breakpoints.up(
|
|
127
|
+
const isDesktop = useMediaQuery(theme.breakpoints.up("md"));
|
|
126
128
|
const [openSections, setOpenSections] = useState(() => {
|
|
127
129
|
// Initialize with all sections open on desktop, closed on mobile
|
|
128
|
-
return isDesktop ? new Set(sections.map(s => s.id)) : new Set();
|
|
130
|
+
return isDesktop ? new Set(sections.map((s) => s.id)) : new Set();
|
|
129
131
|
});
|
|
132
|
+
const sectionIdsKey = JSON.stringify(sections.map((s) => s.id));
|
|
130
133
|
React__default.useEffect(() => {
|
|
134
|
+
const sectionIds = JSON.parse(sectionIdsKey);
|
|
131
135
|
if (isDesktop) {
|
|
132
|
-
setOpenSections(new Set(
|
|
136
|
+
setOpenSections(new Set(sectionIds));
|
|
133
137
|
}
|
|
134
138
|
else {
|
|
135
139
|
setOpenSections(new Set());
|
|
136
140
|
}
|
|
137
|
-
}, [isDesktop,
|
|
141
|
+
}, [isDesktop, sectionIdsKey]);
|
|
138
142
|
const toggleSection = (id) => {
|
|
139
143
|
const newOpenSections = new Set(openSections);
|
|
140
144
|
if (newOpenSections.has(id)) {
|
|
@@ -156,7 +160,14 @@ function Concertina({ sections }) {
|
|
|
156
160
|
setTooltipPosition(null);
|
|
157
161
|
}, 2000);
|
|
158
162
|
};
|
|
159
|
-
return (jsxs(StyledConcertina, { children: [sections.map((section) => (jsxs(StyledSection, { id: section.id, children: [jsxs(StyledHeader, { onClick: () => toggleSection(section.id), onMouseEnter: () => setHoveredTitle(section.id), onMouseLeave: () => setHoveredTitle(null), children: [jsx(StyledTitleWrapper, { children: jsxs(StyledTitle, { isHovered: hoveredTitle === section.id, variant: "h3", children: [jsx(StyledHashtag, { isVisible: true, color: hoveredTitle === section.id
|
|
163
|
+
return (jsxs(StyledConcertina, { children: [sections.map((section) => (jsxs(StyledSection, { id: section.id, children: [jsxs(StyledHeader, { onClick: () => toggleSection(section.id), onMouseEnter: () => setHoveredTitle(section.id), onMouseLeave: () => setHoveredTitle(null), children: [jsx(StyledTitleWrapper, { children: jsxs(StyledTitle, { isHovered: hoveredTitle === section.id, variant: "h3", children: [jsx(StyledHashtag, { isVisible: true, color: hoveredTitle === section.id
|
|
164
|
+
? theme.palette.info.main
|
|
165
|
+
: "#00000000", onClick: (e) => copyJumpLink(section.id, e), children: "#" }), section.title] }) }), jsx(ExpandCircleDownOutlined, { sx: {
|
|
166
|
+
fontSize: "1.5rem",
|
|
167
|
+
transform: openSections.has(section.id)
|
|
168
|
+
? "rotate(180deg)"
|
|
169
|
+
: "none",
|
|
170
|
+
} })] }), jsx(Collapse, { in: openSections.has(section.id), children: jsx(StyledContent, { children: jsx(StyledContentWrapper, { children: section.content }) }) })] }, section.id))), copiedId && tooltipPosition && (jsx(StyledTooltip, { sx: {
|
|
160
171
|
left: tooltipPosition.x,
|
|
161
172
|
top: tooltipPosition.y,
|
|
162
173
|
}, children: "Link copied" }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Concertina.js","sources":["../../../../src/components/Concertina.tsx"],"sourcesContent":["import React, { useState } from 'react';\r\nimport { Box, styled, Typography, Collapse, useMediaQuery } from '@mui/material';\r\nimport { ExpandCircleDown, ExpandCircleDownOutlined, ExpandMoreRounded } from '@mui/icons-material';\r\nimport { useTheme } from '../ThemeProvider';\r\n\r\n\r\ninterface ConcertinaSection {\r\n id: string;\r\n title: string;\r\n content: React.ReactNode;\r\n}\r\n\r\n\r\ninterface ConcertinaProps {\r\n sections: ConcertinaSection[];\r\n}\r\n\r\n\r\nconst StyledConcertina = styled(Box)(({ theme }) => ({\r\n width: '100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: theme.spacing(1),\r\n}));\r\n\r\n\r\nconst StyledSection = styled(Box)(({ theme }) => ({\r\n overflow: 'hidden',\r\n}));\r\n\r\n\r\nconst StyledHeader = styled(Box)(({ theme }) => ({\r\n display: 'flex',\r\n alignItems: 'center',\r\n borderTop: `2px solid ${theme.palette.grey[200]}`,\r\n borderBottom: `2px solid ${theme.palette.grey[200]}`,\r\n justifyContent: 'space-between',\r\n cursor: 'pointer',\r\n transition: 'background-color 0.2s',\r\n gap: theme.spacing(2),\r\n '&:hover': {\r\n backgroundColor: theme.palette.background.default,\r\n },\r\n padding: theme.spacing(2),\r\n}));\r\n\r\n\r\nconst StyledTitleWrapper = styled(Box)(({ theme }) => ({\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: 0,\r\n flex: 1,\r\n minWidth: 0,\r\n}));\r\n\r\n\r\nconst StyledHashtag = styled('span', {\r\n shouldForwardProp: (prop) => prop !== 'isVisible' && prop !== 'color',\r\n})<{ isVisible: boolean; color?: string }>(({ theme, isVisible, color }) => ({\r\n color: color || theme.palette.info.main,\r\n fontWeight: 700,\r\n fontSize: 'inherit',\r\n opacity: isVisible ? 1 : 0,\r\n transition: 'opacity 0.2s',\r\n marginRight: isVisible ? '0.25em' : 0,\r\n cursor: 'pointer',\r\n}));\r\n\r\n\r\n\r\nconst StyledTitle = styled(Typography, {\r\n shouldForwardProp: (prop) => prop !== 'isHovered',\r\n})<{ isHovered: boolean }>(({ theme, isHovered }) => ({\r\n fontWeight: 700,\r\n fontSize: '1.75rem',\r\n lineHeight: 1.2,\r\n color: theme.palette.dark.main,\r\n wordBreak: 'break-word',\r\n display: 'inline-block',\r\n position: 'relative',\r\n paddingBottom: '2px',\r\n borderBottom: isHovered ? `3px solid ${theme.palette.info.main}` : '3px solid transparent',\r\n transition: 'border-bottom 0.2s',\r\n [theme.breakpoints.down('lg')]: {\r\n fontSize: '1.25rem',\r\n },\r\n [theme.breakpoints.down('md')]: {\r\n fontSize: '1.125rem',\r\n },\r\n [theme.breakpoints.down('sm')]: {\r\n fontSize: '1rem',\r\n },\r\n}));\r\n\r\n\r\nconst StyledTooltip = styled(Box)(({ theme }) => ({\r\n position: 'fixed',\r\n transform: 'translate(-50%, -120%)',\r\n backgroundColor: theme.palette.grey[900],\r\n color: theme.palette.common.white,\r\n fontSize: '0.75rem',\r\n padding: theme.spacing(1, 2),\r\n borderRadius: theme.shape.borderRadius,\r\n whiteSpace: 'nowrap',\r\n zIndex: 1000,\r\n pointerEvents: 'none',\r\n [theme.breakpoints.up('sm')]: {\r\n fontSize: '0.875rem',\r\n padding: theme.spacing(1.5, 3),\r\n },\r\n}));\r\n\r\n\r\nconst StyledContent = styled(Box)(({ theme }) => ({\r\n padding: theme.spacing(2, 3, 3),\r\n [theme.breakpoints.up('sm')]: {\r\n padding: theme.spacing(2, 4, 4),\r\n },\r\n [theme.breakpoints.up('md')]: {\r\n padding: theme.spacing(2, 6, 6),\r\n },\r\n}));\r\n\r\n\r\nconst StyledContentWrapper = styled(Box)(({ theme }) => ({\r\n color: theme.palette.dark.main,\r\n lineHeight: 1.5,\r\n wordBreak: 'break-word',\r\n fontSize: 13,\r\n '& p': {\r\n margin: 0,\r\n marginBottom: theme.spacing(2),\r\n '&:last-child': {\r\n marginBottom: 0,\r\n },\r\n },\r\n '& ul, & ol': {\r\n marginTop: theme.spacing(1),\r\n marginBottom: theme.spacing(2),\r\n paddingLeft: theme.spacing(3),\r\n '&:last-child': {\r\n marginBottom: 0,\r\n },\r\n },\r\n '& li': {\r\n marginBottom: theme.spacing(0.5),\r\n },\r\n}));\r\n\r\n\r\nexport function Concertina({ sections }: ConcertinaProps) {\r\n const [hoveredTitle, setHoveredTitle] = useState<string | null>(null);\r\n const [copiedId, setCopiedId] = useState<string | null>(null);\r\n const [tooltipPosition, setTooltipPosition] = useState<{ x: number; y: number } | null>(null);\r\n const theme = useTheme()\r\n const isDesktop = useMediaQuery(theme.breakpoints.up('md'));\r\n\r\n const [openSections, setOpenSections] = useState<Set<string>>(() => {\r\n // Initialize with all sections open on desktop, closed on mobile\r\n return isDesktop ? new Set(sections.map(s => s.id)) : new Set();\r\n });\r\n\r\n\r\n React.useEffect(() => {\r\n if (isDesktop) {\r\n setOpenSections(new Set(sections.map(s => s.id)));\r\n } else {\r\n setOpenSections(new Set());\r\n }\r\n }, [isDesktop, sections]);\r\n\r\n\r\n\r\n const toggleSection = (id: string) => {\r\n const newOpenSections = new Set(openSections);\r\n if (newOpenSections.has(id)) {\r\n newOpenSections.delete(id);\r\n } else {\r\n newOpenSections.add(id);\r\n }\r\n setOpenSections(newOpenSections);\r\n };\r\n\r\n\r\n const copyJumpLink = (id: string, e: React.MouseEvent) => {\r\n e.stopPropagation();\r\n const url = `${window.location.origin}${window.location.pathname}#${id}`;\r\n navigator.clipboard.writeText(url);\r\n setCopiedId(id);\r\n setTooltipPosition({ x: e.clientX, y: e.clientY });\r\n setTimeout(() => {\r\n setCopiedId(null);\r\n setTooltipPosition(null);\r\n }, 2000);\r\n };\r\n\r\n\r\n return (\r\n <StyledConcertina>\r\n {sections.map((section) => (\r\n <StyledSection key={section.id} id={section.id}>\r\n <StyledHeader\r\n onClick={() => toggleSection(section.id)}\r\n onMouseEnter={() => setHoveredTitle(section.id)}\r\n onMouseLeave={() => setHoveredTitle(null)}\r\n >\r\n <StyledTitleWrapper>\r\n <StyledTitle isHovered={hoveredTitle === section.id} variant=\"h3\">\r\n <StyledHashtag\r\n isVisible={true}\r\n color={hoveredTitle === section.id ? theme.palette.info.main : '#00000000'}\r\n onClick={(e) => copyJumpLink(section.id, e as any)}\r\n >\r\n #\r\n </StyledHashtag>\r\n {section.title}\r\n </StyledTitle>\r\n </StyledTitleWrapper>\r\n <ExpandCircleDownOutlined\r\n sx={{ fontSize: '1.5rem', transform: openSections.has(section.id) ? 'rotate(180deg)' : 'none' }}\r\n />\r\n </StyledHeader>\r\n <Collapse in={openSections.has(section.id)}>\r\n <StyledContent>\r\n <StyledContentWrapper>{section.content}</StyledContentWrapper>\r\n </StyledContent>\r\n </Collapse>\r\n </StyledSection>\r\n ))}\r\n {copiedId && tooltipPosition && (\r\n <StyledTooltip\r\n sx={{\r\n left: tooltipPosition.x,\r\n top: tooltipPosition.y,\r\n }}\r\n >\r\n Link copied\r\n </StyledTooltip>\r\n )}\r\n </StyledConcertina>\r\n );\r\n}\r\n"],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;AAkBA,MAAM,gBAAgB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C,IAAI,CAAC,IAAI,GAAG,WAAW,EAC1E,OAAO,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE,CAAQ,CAAC,EAAA,QAAA,EAAA,GAAA,EAAA,CAGpC,EACf,OAAO,CAAC,KAAK,CAAA,EAAA,CACF,GACK,EACrBA,GAAA,CAAC,wBAAwB,EAAA,EACvB,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,gBAAgB,GAAG,MAAM,EAAE,EAAA,CAC/F,IACW,EACfA,GAAA,CAAC,QAAQ,EAAA,EAAC,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAA,QAAA,EACxCA,GAAA,CAAC,aAAa,EAAA,EAAA,QAAA,EACZA,GAAA,CAAC,oBAAoB,EAAA,EAAA,QAAA,EAAE,OAAO,CAAC,OAAO,EAAA,CAAwB,GAChD,EAAA,CACP,CAAA,EAAA,EA1BO,OAAO,CAAC,EAAE,CA2Bd,CACjB,CAAC,EACD,QAAQ,IAAI,eAAe,KAC1BA,GAAA,CAAC,aAAa,EAAA,EACZ,EAAE,EAAE;oBACF,IAAI,EAAE,eAAe,CAAC,CAAC;oBACvB,GAAG,EAAE,eAAe,CAAC,CAAC;iBACvB,EAAA,QAAA,EAAA,aAAA,EAAA,CAGa,CACjB,CAAA,EAAA,CACgB;AAEvB;;;;"}
|
|
1
|
+
{"version":3,"file":"Concertina.js","sources":["../../../../src/components/Concertina.tsx"],"sourcesContent":["import React, { useState } from \"react\";\r\nimport {\r\n Box,\r\n styled,\r\n Typography,\r\n Collapse,\r\n useMediaQuery,\r\n} from \"@mui/material\";\r\nimport {\r\n ExpandCircleDown,\r\n ExpandCircleDownOutlined,\r\n ExpandMoreRounded,\r\n} from \"@mui/icons-material\";\r\nimport { useTheme } from \"../ThemeProvider\";\r\n\r\ninterface ConcertinaSection {\r\n id: string;\r\n title: string;\r\n content: React.ReactNode;\r\n}\r\n\r\ninterface ConcertinaProps {\r\n sections: ConcertinaSection[];\r\n}\r\n\r\nconst StyledConcertina = styled(Box)(({ theme }) => ({\r\n width: \"100%\",\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n gap: theme.spacing(1),\r\n}));\r\n\r\nconst StyledSection = styled(Box)(({ theme }) => ({\r\n overflow: \"hidden\",\r\n}));\r\n\r\nconst StyledHeader = styled(Box)(({ theme }) => ({\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n borderTop: `2px solid ${theme.palette.grey[200]}`,\r\n borderBottom: `2px solid ${theme.palette.grey[200]}`,\r\n justifyContent: \"space-between\",\r\n cursor: \"pointer\",\r\n transition: \"background-color 0.2s\",\r\n gap: theme.spacing(2),\r\n \"&:hover\": {\r\n backgroundColor: theme.palette.background.default,\r\n },\r\n padding: theme.spacing(2),\r\n}));\r\n\r\nconst StyledTitleWrapper = styled(Box)(({ theme }) => ({\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: 0,\r\n flex: 1,\r\n minWidth: 0,\r\n}));\r\n\r\nconst StyledHashtag = styled(\"span\", {\r\n shouldForwardProp: (prop) => prop !== \"isVisible\" && prop !== \"color\",\r\n})<{ isVisible: boolean; color?: string }>(({ theme, isVisible, color }) => ({\r\n color: color || theme.palette.info.main,\r\n fontWeight: 700,\r\n fontSize: \"inherit\",\r\n opacity: isVisible ? 1 : 0,\r\n transition: \"opacity 0.2s\",\r\n marginRight: isVisible ? \"0.25em\" : 0,\r\n cursor: \"pointer\",\r\n}));\r\n\r\nconst StyledTitle = styled(Typography, {\r\n shouldForwardProp: (prop) => prop !== \"isHovered\",\r\n})<{ isHovered: boolean }>(({ theme, isHovered }) => ({\r\n fontWeight: 700,\r\n fontSize: \"1.75rem\",\r\n lineHeight: 1.2,\r\n color: theme.palette.dark.main,\r\n wordBreak: \"break-word\",\r\n display: \"inline-block\",\r\n position: \"relative\",\r\n paddingBottom: \"2px\",\r\n borderBottom: isHovered\r\n ? `3px solid ${theme.palette.info.main}`\r\n : \"3px solid transparent\",\r\n transition: \"border-bottom 0.2s\",\r\n [theme.breakpoints.down(\"lg\")]: {\r\n fontSize: \"1.25rem\",\r\n },\r\n [theme.breakpoints.down(\"md\")]: {\r\n fontSize: \"1.125rem\",\r\n },\r\n [theme.breakpoints.down(\"sm\")]: {\r\n fontSize: \"1rem\",\r\n },\r\n}));\r\n\r\nconst StyledTooltip = styled(Box)(({ theme }) => ({\r\n position: \"fixed\",\r\n transform: \"translate(-50%, -120%)\",\r\n backgroundColor: theme.palette.grey[900],\r\n color: theme.palette.common.white,\r\n fontSize: \"0.75rem\",\r\n padding: theme.spacing(1, 2),\r\n borderRadius: theme.shape.borderRadius,\r\n whiteSpace: \"nowrap\",\r\n zIndex: 1000,\r\n pointerEvents: \"none\",\r\n [theme.breakpoints.up(\"sm\")]: {\r\n fontSize: \"0.875rem\",\r\n padding: theme.spacing(1.5, 3),\r\n },\r\n}));\r\n\r\nconst StyledContent = styled(Box)(({ theme }) => ({\r\n padding: theme.spacing(2, 3, 3),\r\n [theme.breakpoints.up(\"sm\")]: {\r\n padding: theme.spacing(2, 4, 4),\r\n },\r\n [theme.breakpoints.up(\"md\")]: {\r\n padding: theme.spacing(2, 6, 6),\r\n },\r\n}));\r\n\r\nconst StyledContentWrapper = styled(Box)(({ theme }) => ({\r\n color: theme.palette.dark.main,\r\n lineHeight: 1.5,\r\n wordBreak: \"break-word\",\r\n fontSize: 13,\r\n \"& p\": {\r\n margin: 0,\r\n marginBottom: theme.spacing(2),\r\n \"&:last-child\": {\r\n marginBottom: 0,\r\n },\r\n },\r\n \"& ul, & ol\": {\r\n marginTop: theme.spacing(1),\r\n marginBottom: theme.spacing(2),\r\n paddingLeft: theme.spacing(3),\r\n \"&:last-child\": {\r\n marginBottom: 0,\r\n },\r\n },\r\n \"& li\": {\r\n marginBottom: theme.spacing(0.5),\r\n },\r\n}));\r\n\r\nexport function Concertina({ sections }: ConcertinaProps) {\r\n const [hoveredTitle, setHoveredTitle] = useState<string | null>(null);\r\n const [copiedId, setCopiedId] = useState<string | null>(null);\r\n const [tooltipPosition, setTooltipPosition] = useState<{\r\n x: number;\r\n y: number;\r\n } | null>(null);\r\n const theme = useTheme();\r\n const isDesktop = useMediaQuery(theme.breakpoints.up(\"md\"));\r\n\r\n const [openSections, setOpenSections] = useState<Set<string>>(() => {\r\n // Initialize with all sections open on desktop, closed on mobile\r\n return isDesktop ? new Set(sections.map((s) => s.id)) : new Set();\r\n });\r\n\r\n const sectionIdsKey = JSON.stringify(sections.map((s) => s.id));\r\n\r\n React.useEffect(() => {\r\n const sectionIds = JSON.parse(sectionIdsKey) as string[];\r\n\r\n if (isDesktop) {\r\n setOpenSections(new Set(sectionIds));\r\n } else {\r\n setOpenSections(new Set());\r\n }\r\n }, [isDesktop, sectionIdsKey]);\r\n\r\n const toggleSection = (id: string) => {\r\n const newOpenSections = new Set(openSections);\r\n if (newOpenSections.has(id)) {\r\n newOpenSections.delete(id);\r\n } else {\r\n newOpenSections.add(id);\r\n }\r\n setOpenSections(newOpenSections);\r\n };\r\n\r\n const copyJumpLink = (id: string, e: React.MouseEvent) => {\r\n e.stopPropagation();\r\n const url = `${window.location.origin}${window.location.pathname}#${id}`;\r\n navigator.clipboard.writeText(url);\r\n setCopiedId(id);\r\n setTooltipPosition({ x: e.clientX, y: e.clientY });\r\n setTimeout(() => {\r\n setCopiedId(null);\r\n setTooltipPosition(null);\r\n }, 2000);\r\n };\r\n\r\n return (\r\n <StyledConcertina>\r\n {sections.map((section) => (\r\n <StyledSection key={section.id} id={section.id}>\r\n <StyledHeader\r\n onClick={() => toggleSection(section.id)}\r\n onMouseEnter={() => setHoveredTitle(section.id)}\r\n onMouseLeave={() => setHoveredTitle(null)}\r\n >\r\n <StyledTitleWrapper>\r\n <StyledTitle isHovered={hoveredTitle === section.id} variant=\"h3\">\r\n <StyledHashtag\r\n isVisible={true}\r\n color={\r\n hoveredTitle === section.id\r\n ? theme.palette.info.main\r\n : \"#00000000\"\r\n }\r\n onClick={(e) => copyJumpLink(section.id, e as any)}\r\n >\r\n #\r\n </StyledHashtag>\r\n {section.title}\r\n </StyledTitle>\r\n </StyledTitleWrapper>\r\n <ExpandCircleDownOutlined\r\n sx={{\r\n fontSize: \"1.5rem\",\r\n transform: openSections.has(section.id)\r\n ? \"rotate(180deg)\"\r\n : \"none\",\r\n }}\r\n />\r\n </StyledHeader>\r\n <Collapse in={openSections.has(section.id)}>\r\n <StyledContent>\r\n <StyledContentWrapper>{section.content}</StyledContentWrapper>\r\n </StyledContent>\r\n </Collapse>\r\n </StyledSection>\r\n ))}\r\n {copiedId && tooltipPosition && (\r\n <StyledTooltip\r\n sx={{\r\n left: tooltipPosition.x,\r\n top: tooltipPosition.y,\r\n }}\r\n >\r\n Link copied\r\n </StyledTooltip>\r\n )}\r\n </StyledConcertina>\r\n );\r\n}\r\n"],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;AAyBA,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM;AACnD,IAAA,KAAK,EAAE,MAAM;AACb,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACtB,CAAA,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM;AAChD,IAAA,QAAQ,EAAE,QAAQ;AACnB,CAAA,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM;AAC/C,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,CAAA,UAAA,EAAa,KAAK,CAAC,OAAO,CAAC,IAAI,CAA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AO,CAAC,EAAE,CAAC,EAAA,QAAA,EACxCA,IAAC,aAAa,EAAA,EAAA,QAAA,EACZA,IAAC,oBAAoB,EAAA,EAAA,QAAA,EAAE,OAAO,CAAC,OAAO,GAAwB,EAAA,CAChD,EAAA,CACP,KAnCO,OAAO,CAAC,EAAE,CAoCd,CACjB,CAAC,EACD,QAAQ,IAAI,eAAe,KAC1BA,GAAA,CAAC,aAAa,EAAA,EACZ,EAAE,EAAE;oBACF,IAAI,EAAE,eAAe,CAAC,CAAC;oBACvB,GAAG,EAAE,eAAe,CAAC,CAAC;iBACvB,EAAA,QAAA,EAAA,aAAA,EAAA,CAGa,CACjB,CAAA,EAAA,CACgB;AAEvB;;;;"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export { Button } from
|
|
2
|
-
export { Input } from
|
|
3
|
-
export { Card } from
|
|
4
|
-
export { Select } from
|
|
5
|
-
export { Radio, RadioGroup } from
|
|
6
|
-
export { Checkbox } from
|
|
7
|
-
export { Progress, StepIndicator } from
|
|
8
|
-
export { Alert } from
|
|
9
|
-
export { NoteBox } from
|
|
10
|
-
export { Modal } from
|
|
11
|
-
export { Concertina } from
|
|
12
|
-
export { ReadBy } from
|
|
13
|
-
export { StatusBar } from
|
|
14
|
-
export { Tabs } from
|
|
15
|
-
export { Sidebar } from
|
|
16
|
-
export { SidebarV2, MenuItem } from
|
|
17
|
-
export { Header } from
|
|
18
|
-
export { TableOfContents } from
|
|
19
|
-
export { Toggle } from
|
|
20
|
-
export { SimpleModal } from
|
|
21
|
-
export { ActionButton } from
|
|
22
|
-
export { ExpandingBox } from
|
|
23
|
-
export { ExpandingBoxToggle } from
|
|
24
|
-
export { Breadcrumb } from
|
|
25
|
-
export { AcknowledgementBox } from
|
|
26
|
-
export { RichTextArea } from
|
|
27
|
-
export { FileUploadButton } from
|
|
28
|
-
export { HeaderSearchResult } from
|
|
1
|
+
export { Button } from "./Button";
|
|
2
|
+
export { Input, StyledLabel } from "./Input";
|
|
3
|
+
export { Card } from "./Card";
|
|
4
|
+
export { Select } from "./Select";
|
|
5
|
+
export { Radio, RadioGroup } from "./Radio";
|
|
6
|
+
export { Checkbox } from "./Checkbox";
|
|
7
|
+
export { Progress, StepIndicator } from "./Progress";
|
|
8
|
+
export { Alert } from "./Alert";
|
|
9
|
+
export { NoteBox } from "./NoteBox";
|
|
10
|
+
export { Modal } from "./Modal";
|
|
11
|
+
export { Concertina } from "./Concertina";
|
|
12
|
+
export { ReadBy } from "./ReadBy";
|
|
13
|
+
export { StatusBar } from "./StatusBar";
|
|
14
|
+
export { Tabs } from "./Tabs";
|
|
15
|
+
export { Sidebar } from "./Sidebar";
|
|
16
|
+
export { SidebarV2, MenuItem } from "./SidebarV2";
|
|
17
|
+
export { Header } from "./Header";
|
|
18
|
+
export { TableOfContents } from "./TableOfContents";
|
|
19
|
+
export { Toggle } from "./Toggle";
|
|
20
|
+
export { SimpleModal } from "./SimpleModal";
|
|
21
|
+
export { ActionButton } from "./ActionButton";
|
|
22
|
+
export { ExpandingBox } from "./ExpandingBox";
|
|
23
|
+
export { ExpandingBoxToggle } from "./ExpandingBoxToggle";
|
|
24
|
+
export { Breadcrumb } from "./Breadcrumb";
|
|
25
|
+
export { AcknowledgementBox } from "./AcknowledgementBox";
|
|
26
|
+
export { RichTextArea } from "./RichTextArea";
|
|
27
|
+
export { FileUploadButton } from "./FileUploadButton";
|
|
28
|
+
export { HeaderSearchResult } from "./Header";
|
|
29
29
|
export { Footer } from "./Footer";
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./theme-types";
|
|
2
2
|
export { ThemeProvider, useTheme } from "./ThemeProvider";
|
|
3
3
|
export { Button } from "./components/Button";
|
|
4
|
-
export { Input } from "./components/Input";
|
|
4
|
+
export { Input, StyledLabel } from "./components/Input";
|
|
5
5
|
export { Card } from "./components/Card";
|
|
6
6
|
export { Select } from "./components/Select";
|
|
7
7
|
export { Radio, RadioGroup } from "./components/Radio";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@mui/material/styles';
|
|
2
2
|
export { ThemeProvider, useTheme } from './ThemeProvider.js';
|
|
3
3
|
export { Button } from './components/Button.js';
|
|
4
|
-
export { Input } from './components/Input.js';
|
|
4
|
+
export { Input, StyledLabel } from './components/Input.js';
|
|
5
5
|
export { Card } from './components/Card.js';
|
|
6
6
|
export { Select } from './components/Select.js';
|
|
7
7
|
export { Radio, RadioGroup } from './components/Radio.js';
|