goobs-frontend 0.9.27 → 0.9.29
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/package.json +3 -7
- package/src/components/Accordion/index.tsx +331 -54
- package/src/components/Button/index.tsx +223 -17
- package/src/components/Card/card.stories.tsx +54 -84
- package/src/components/Card/index.tsx +274 -279
- package/src/components/Card/variants/detailedpricingsummary/index.tsx +109 -16
- package/src/components/Card/variants/inventory/index.tsx +133 -11
- package/src/components/Card/variants/product/index.tsx +159 -26
- package/src/components/Card/variants/productsummary/index.tsx +149 -18
- package/src/components/Card/variants/simplepricingsummary/index.tsx +101 -13
- package/src/components/Card/variants/task/index.tsx +141 -24
- package/src/components/Checkbox/index.tsx +225 -39
- package/src/components/CodeCopy/index.tsx +317 -25
- package/src/components/ComplexTextEditor/MarkdownEditor/index.tsx +83 -4
- package/src/components/ComplexTextEditor/RichEditor/index.tsx +237 -90
- package/src/components/ComplexTextEditor/SimpleEditor/index.tsx +92 -6
- package/src/components/ComplexTextEditor/Toolbars/Complex/index.tsx +67 -43
- package/src/components/ComplexTextEditor/Toolbars/Editor/index.tsx +316 -45
- package/src/components/ComplexTextEditor/index.tsx +90 -2
- package/src/components/ConfirmationCodeInput/index.tsx +311 -83
- package/src/components/Content/Structure/CVV/useCVV.tsx +58 -0
- package/src/components/Content/Structure/CreditCardExpiration/useCreditCardExpiration.tsx +62 -0
- package/src/components/Content/Structure/CreditCardNumber/useCreditCardNumber.tsx +67 -0
- package/src/components/Content/Structure/DateRange/useDateRange.tsx +57 -0
- package/src/components/Content/Structure/USD/useUSD.tsx +24 -103
- package/src/components/Content/Structure/datefield/useDateField.tsx +45 -16
- package/src/components/Content/index.tsx +128 -49
- package/src/components/DataGrid/Footer/index.tsx +48 -7
- package/src/components/DataGrid/ManageColumn/index.tsx +170 -20
- package/src/components/DataGrid/ManageRow/index.tsx +122 -18
- package/src/components/DataGrid/Table/ColumnHeaderRow/index.tsx +16 -10
- package/src/components/DataGrid/Table/Rows/index.tsx +311 -82
- package/src/components/DataGrid/Table/index.tsx +64 -0
- package/src/components/DataGrid/VerticalDivider/index.tsx +15 -4
- package/src/components/DataGrid/index.tsx +259 -19
- package/src/components/DataGrid/types/index.ts +5 -0
- package/src/components/Field/Date/CreditCardExpiration/index.tsx +1304 -0
- package/src/components/Field/Date/DateField/index.tsx +894 -0
- package/src/components/Field/Date/DateRange/index.tsx +987 -0
- package/src/components/Field/Dropdown/MultiSelect/index.tsx +195 -23
- package/src/components/Field/Dropdown/Regular/index.tsx +231 -43
- package/src/components/Field/Dropdown/Searchable/index.tsx +7 -1
- package/src/components/Field/Number/AccountNumber/index.tsx +120 -1
- package/src/components/Field/Number/CVV/index.tsx +230 -0
- package/src/components/Field/Number/CreditCardNumber/index.tsx +406 -0
- package/src/components/Field/Number/InternalIncrement/index.tsx +83 -9
- package/src/components/Field/Number/RoutingNumber/index.tsx +121 -1
- package/src/components/Field/Password/index.tsx +112 -11
- package/src/components/Field/Percentage/index.tsx +93 -46
- package/src/components/Field/PhoneNumber/index.tsx +78 -12
- package/src/components/Field/Search/index.tsx +123 -16
- package/src/components/Field/Text/index.tsx +120 -24
- package/src/components/Field/USD/index.tsx +281 -10
- package/src/components/Form/DataGrid/index.tsx +359 -34
- package/src/components/Form/Dialog/index.tsx +339 -20
- package/src/components/Form/Popup/index.tsx +530 -34
- package/src/components/Form/ProjectBoard/index.tsx +379 -45
- package/src/components/Icons/Calendar.tsx +19 -1
- package/src/components/Icons/Drag.tsx +19 -2
- package/src/components/Icons/FavoriteIcon.tsx +52 -5
- package/src/components/Icons/Info.tsx +23 -3
- package/src/components/Icons/Search.tsx +20 -2
- package/src/components/Icons/ShowHideEye.tsx +15 -1
- package/src/components/PricingTable/index.tsx +177 -22
- package/src/components/ProjectBoard/board/desktop/index.tsx +196 -56
- package/src/components/ProjectBoard/board/index.tsx +3 -0
- package/src/components/ProjectBoard/board/mobile/index.tsx +209 -56
- package/src/components/ProjectBoard/board/tablet/index.tsx +196 -54
- package/src/components/ProjectBoard/forms/AddTask/administrator/companyDropdown/index.tsx +116 -11
- package/src/components/ProjectBoard/forms/AddTask/administrator/companyProvided/index.tsx +115 -11
- package/src/components/ProjectBoard/forms/AddTask/company/customerDropdown/index.tsx +116 -11
- package/src/components/ProjectBoard/forms/AddTask/company/customerProvided/index.tsx +115 -11
- package/src/components/ProjectBoard/forms/AddTask/customer/index.tsx +111 -10
- package/src/components/ProjectBoard/forms/AddTask/noUser/index.tsx +85 -5
- package/src/components/ProjectBoard/forms/ShowTask/client.tsx +450 -83
- package/src/components/ProjectBoard/index.tsx +143 -5
- package/src/components/ProjectBoard/types/index.tsx +2 -0
- package/src/components/QRCode/index.tsx +129 -95
- package/src/components/RadioGroup/index.tsx +83 -5
- package/src/components/RadioGroup/radiogroup.stories.tsx +0 -57
- package/src/components/Stepper/index.tsx +172 -51
- package/src/components/Tabs/index.tsx +103 -18
- package/src/components/Toolbar/index.tsx +63 -12
- package/src/components/Toolbar/left/index.tsx +26 -9
- package/src/components/Toolbar/leftCenter/index.tsx +50 -11
- package/src/components/Toolbar/right/index.tsx +13 -5
- package/src/components/Toolbar/rightCenter/index.tsx +3 -0
- package/src/components/Tooltip/index.tsx +29 -6
- package/src/components/TransferList/index.tsx +164 -5
- package/src/components/Typography/index.tsx +111 -4
- package/src/components/Widget/index.tsx +343 -0
- package/src/index.ts +27 -3
- package/src/components/Field/Date/datefield.stories.tsx +0 -144
- package/src/components/Field/Date/index.tsx +0 -602
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goobs-frontend",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A comprehensive React-based libary that extends the functionality of Material-UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@mui/icons-material": "^7",
|
|
29
29
|
"@mui/material": "^7",
|
|
30
30
|
"@storybook/addon-links": "^9",
|
|
31
|
+
"@storybook/test": "^8.6.14",
|
|
31
32
|
"@types/lodash": "^4",
|
|
32
33
|
"formik": "^2",
|
|
33
34
|
"highlight.js": "^11",
|
|
@@ -35,9 +36,8 @@
|
|
|
35
36
|
"lodash": "^4",
|
|
36
37
|
"next": "15",
|
|
37
38
|
"otplib": "^12",
|
|
38
|
-
"react-datepicker": "^8",
|
|
39
39
|
"react-qr-code": "^2",
|
|
40
|
-
"slate": "^0.
|
|
40
|
+
"slate": "^0.115",
|
|
41
41
|
"slate-dom": "^0.114",
|
|
42
42
|
"slate-history": "^0.113",
|
|
43
43
|
"slate-react": "^0.114",
|
|
@@ -48,13 +48,9 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@chromatic-com/storybook": "^4",
|
|
50
50
|
"@next/eslint-plugin-next": "^15",
|
|
51
|
-
"@storybook/addon-essentials": "^8",
|
|
52
|
-
"@storybook/addon-interactions": "^8",
|
|
53
51
|
"@storybook/addon-onboarding": "^9",
|
|
54
|
-
"@storybook/blocks": "^8",
|
|
55
52
|
"@storybook/nextjs": "^9",
|
|
56
53
|
"@storybook/react": "^9",
|
|
57
|
-
"@storybook/test": "^8",
|
|
58
54
|
"@types/react": "^19",
|
|
59
55
|
"@types/react-dom": "^19",
|
|
60
56
|
"@typescript-eslint/eslint-plugin": "^8",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'use client'
|
|
4
4
|
|
|
5
5
|
import React, { useState, useEffect } from 'react'
|
|
6
|
-
import { styled } from '@mui/material/styles'
|
|
6
|
+
import { styled, keyframes, alpha } from '@mui/material/styles'
|
|
7
7
|
import MuiAccordion, {
|
|
8
8
|
AccordionProps as MuiAccordionProps,
|
|
9
9
|
} from '@mui/material/Accordion'
|
|
@@ -12,6 +12,65 @@ import MuiAccordionDetails from '@mui/material/AccordionDetails'
|
|
|
12
12
|
import { ExpandMore } from '@mui/icons-material'
|
|
13
13
|
import { black } from '../../styles/palette'
|
|
14
14
|
|
|
15
|
+
// --------------------------------------------------------------------------
|
|
16
|
+
// SACRED THEMING CONSTANTS AND ANIMATIONS
|
|
17
|
+
// --------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
const SACRED_GLYPHS = [
|
|
20
|
+
'𓁟',
|
|
21
|
+
'𓂀',
|
|
22
|
+
'𓃀',
|
|
23
|
+
'𓄿',
|
|
24
|
+
'𓊖',
|
|
25
|
+
'𓊗',
|
|
26
|
+
'𓋴',
|
|
27
|
+
'𓏏',
|
|
28
|
+
'𓊨',
|
|
29
|
+
'𓁦',
|
|
30
|
+
'𓅓',
|
|
31
|
+
'𓆄',
|
|
32
|
+
'𓇳',
|
|
33
|
+
'𓈖',
|
|
34
|
+
'𓊹',
|
|
35
|
+
'𓊺',
|
|
36
|
+
'𓊻',
|
|
37
|
+
'𓋹',
|
|
38
|
+
'𓌻',
|
|
39
|
+
'𓍿',
|
|
40
|
+
'𓅨',
|
|
41
|
+
'𓂋',
|
|
42
|
+
'𓏭',
|
|
43
|
+
'𓊵',
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
const sacredGlowPulse = keyframes`
|
|
47
|
+
0% { text-shadow: 0 0 5px rgba(255, 215, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.3); }
|
|
48
|
+
50% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.5); }
|
|
49
|
+
100% { text-shadow: 0 0 5px rgba(255, 215, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.3); }
|
|
50
|
+
`
|
|
51
|
+
|
|
52
|
+
const sacredFloat = keyframes`
|
|
53
|
+
0% { transform: translateY(0px); }
|
|
54
|
+
50% { transform: translateY(-3px); }
|
|
55
|
+
100% { transform: translateY(0px); }
|
|
56
|
+
`
|
|
57
|
+
|
|
58
|
+
const sacredShimmer = keyframes`
|
|
59
|
+
0% { background-position: -200% 0; }
|
|
60
|
+
100% { background-position: 200% 0; }
|
|
61
|
+
`
|
|
62
|
+
|
|
63
|
+
const rotateGlyph = keyframes`
|
|
64
|
+
from { transform: rotate(0deg); }
|
|
65
|
+
to { transform: rotate(360deg); }
|
|
66
|
+
`
|
|
67
|
+
|
|
68
|
+
const expandGlyphGlow = keyframes`
|
|
69
|
+
0% { opacity: 0.3; filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.4)); }
|
|
70
|
+
50% { opacity: 0.8; filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)); }
|
|
71
|
+
100% { opacity: 0.3; filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.4)); }
|
|
72
|
+
`
|
|
73
|
+
|
|
15
74
|
/**
|
|
16
75
|
* Accordion component that works across all platforms
|
|
17
76
|
*
|
|
@@ -23,6 +82,7 @@ import { black } from '../../styles/palette'
|
|
|
23
82
|
* - Customizable styles
|
|
24
83
|
* - Can be nested inside other accordions
|
|
25
84
|
* - Handles large content gracefully
|
|
85
|
+
* - Optional Egyptian/Sacred theming
|
|
26
86
|
*
|
|
27
87
|
* Basic usage:
|
|
28
88
|
* ```tsx
|
|
@@ -32,6 +92,15 @@ import { black } from '../../styles/palette'
|
|
|
32
92
|
* />
|
|
33
93
|
* ```
|
|
34
94
|
*
|
|
95
|
+
* With sacred theme:
|
|
96
|
+
* ```tsx
|
|
97
|
+
* <Accordion
|
|
98
|
+
* summary="Ancient Knowledge"
|
|
99
|
+
* details="Sacred wisdom revealed..."
|
|
100
|
+
* sacredTheme
|
|
101
|
+
* />
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
35
104
|
* With default expanded state:
|
|
36
105
|
* ```tsx
|
|
37
106
|
* <Accordion
|
|
@@ -112,6 +181,8 @@ export interface AccordionProps {
|
|
|
112
181
|
disabled?: boolean
|
|
113
182
|
/** Custom styles applied to the accordion */
|
|
114
183
|
style?: React.CSSProperties
|
|
184
|
+
/** Enable Egyptian/Sacred theming */
|
|
185
|
+
sacredTheme?: boolean
|
|
115
186
|
}
|
|
116
187
|
|
|
117
188
|
// Enhanced version of MuiAccordion with stricter content unmounting
|
|
@@ -133,43 +204,92 @@ const StrictAccordion = React.forwardRef<HTMLDivElement, MuiAccordionProps>(
|
|
|
133
204
|
StrictAccordion.displayName = 'StrictAccordion'
|
|
134
205
|
|
|
135
206
|
// Styled components with direct media queries
|
|
136
|
-
const StyledAccordion = styled(StrictAccordion)(
|
|
137
|
-
|
|
138
|
-
'
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
207
|
+
const StyledAccordion = styled(StrictAccordion)<{ sacredtheme?: boolean }>(
|
|
208
|
+
({ sacredtheme }) => ({
|
|
209
|
+
'&.MuiAccordion-root': {
|
|
210
|
+
'&:before': {
|
|
211
|
+
display: 'none',
|
|
212
|
+
},
|
|
213
|
+
// Improved styling for stacked accordions
|
|
214
|
+
marginBottom: '8px',
|
|
215
|
+
borderRadius: '8px',
|
|
216
|
+
boxShadow: sacredtheme
|
|
217
|
+
? '0 0 15px rgba(255, 215, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3)'
|
|
218
|
+
: '0px 1px 3px rgba(0, 0, 0, 0.1)',
|
|
219
|
+
transition: 'all 0.3s ease',
|
|
220
|
+
overflow: 'hidden',
|
|
221
|
+
position: 'relative',
|
|
222
|
+
backgroundColor: sacredtheme ? '#0a0a0a' : 'white',
|
|
223
|
+
border: sacredtheme ? `1px solid ${alpha('#FFD700', 0.3)}` : 'none',
|
|
153
224
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
225
|
+
...(sacredtheme && {
|
|
226
|
+
backgroundImage: `
|
|
227
|
+
linear-gradient(rgba(255, 215, 0, 0.02), rgba(255, 215, 0, 0.02)),
|
|
228
|
+
radial-gradient(circle at top left, rgba(255, 215, 0, 0.05) 0%, transparent 50%)
|
|
229
|
+
`,
|
|
230
|
+
'&::before': {
|
|
231
|
+
content: '""',
|
|
232
|
+
position: 'absolute',
|
|
233
|
+
top: 0,
|
|
234
|
+
left: 0,
|
|
235
|
+
right: 0,
|
|
236
|
+
bottom: 0,
|
|
237
|
+
opacity: 0,
|
|
238
|
+
background:
|
|
239
|
+
'linear-gradient(135deg, transparent, rgba(255, 215, 0, 0.1), transparent)',
|
|
240
|
+
transition: 'opacity 0.3s ease',
|
|
241
|
+
pointerEvents: 'none',
|
|
242
|
+
},
|
|
243
|
+
}),
|
|
159
244
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
245
|
+
// Add subtle hover effect
|
|
246
|
+
'&:hover': {
|
|
247
|
+
boxShadow: sacredtheme
|
|
248
|
+
? '0 0 25px rgba(255, 215, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.4)'
|
|
249
|
+
: '0px 3px 6px rgba(0, 0, 0, 0.15)',
|
|
250
|
+
transform: 'translateY(-1px)',
|
|
251
|
+
...(sacredtheme && {
|
|
252
|
+
borderColor: alpha('#FFD700', 0.5),
|
|
253
|
+
'&::before': {
|
|
254
|
+
opacity: 1,
|
|
255
|
+
},
|
|
256
|
+
}),
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
// Mobile styles
|
|
260
|
+
'@media (max-width: 600px)': {
|
|
261
|
+
borderRadius: '6px',
|
|
262
|
+
boxShadow: sacredtheme
|
|
263
|
+
? '0 0 10px rgba(255, 215, 0, 0.2)'
|
|
264
|
+
: '0px 1px 3px rgba(0, 0, 0, 0.1)',
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
// Apply different styling to expanded accordion
|
|
268
|
+
'&.accordion-expanded': {
|
|
269
|
+
boxShadow: sacredtheme
|
|
270
|
+
? '0 0 30px rgba(255, 215, 0, 0.5), 0 6px 12px rgba(0, 0, 0, 0.5)'
|
|
271
|
+
: '0px 3px 8px rgba(0, 0, 0, 0.12)',
|
|
272
|
+
backgroundColor: sacredtheme ? '#0a0a0a' : '#fafafa',
|
|
273
|
+
...(sacredtheme && {
|
|
274
|
+
borderColor: '#FFD700',
|
|
275
|
+
'&::before': {
|
|
276
|
+
opacity: 1,
|
|
277
|
+
animation: `${sacredShimmer} 3s ease-in-out infinite`,
|
|
278
|
+
},
|
|
279
|
+
}),
|
|
280
|
+
},
|
|
164
281
|
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
})
|
|
282
|
+
'&.Mui-disabled': {
|
|
283
|
+
backgroundColor: sacredtheme ? alpha('#000000', 0.8) : '#f8f8f8',
|
|
284
|
+
opacity: sacredtheme ? 0.6 : 0.8,
|
|
285
|
+
// Override Material UI's disabled styles
|
|
286
|
+
pointerEvents: 'auto !important',
|
|
287
|
+
...(sacredtheme && {
|
|
288
|
+
borderColor: alpha('#FFD700', 0.1),
|
|
289
|
+
}),
|
|
290
|
+
},
|
|
291
|
+
})
|
|
292
|
+
)
|
|
173
293
|
|
|
174
294
|
// Wrapper for disabled summary to ensure it's testable
|
|
175
295
|
const DisabledSummaryWrapper = styled('div')({
|
|
@@ -182,15 +302,58 @@ const DisabledSummaryWrapper = styled('div')({
|
|
|
182
302
|
},
|
|
183
303
|
})
|
|
184
304
|
|
|
185
|
-
const StyledAccordionSummary = styled(MuiAccordionSummary)
|
|
305
|
+
const StyledAccordionSummary = styled(MuiAccordionSummary)<{
|
|
306
|
+
sacredtheme?: boolean
|
|
307
|
+
}>(({ sacredtheme }) => ({
|
|
186
308
|
fontSize: '20px',
|
|
187
|
-
fontFamily: 'merriweather',
|
|
188
|
-
fontWeight: 500,
|
|
309
|
+
fontFamily: sacredtheme ? '"Cinzel", serif' : 'merriweather',
|
|
310
|
+
fontWeight: sacredtheme ? 600 : 500,
|
|
189
311
|
borderRadius: '8px 8px 0 0',
|
|
190
|
-
backgroundColor: '#f5f7fa',
|
|
191
|
-
transition: '
|
|
312
|
+
backgroundColor: sacredtheme ? 'transparent' : '#f5f7fa',
|
|
313
|
+
transition: 'all 0.2s ease',
|
|
314
|
+
position: 'relative',
|
|
315
|
+
color: sacredtheme ? alpha('#FFD700', 0.9) : 'inherit',
|
|
316
|
+
minHeight: '56px',
|
|
317
|
+
|
|
318
|
+
...(sacredtheme && {
|
|
319
|
+
'&::before': {
|
|
320
|
+
content: `"${SACRED_GLYPHS[3]}"`,
|
|
321
|
+
position: 'absolute',
|
|
322
|
+
left: '16px',
|
|
323
|
+
top: '50%',
|
|
324
|
+
transform: 'translateY(-50%)',
|
|
325
|
+
color: alpha('#FFD700', 0.4),
|
|
326
|
+
fontSize: '16px',
|
|
327
|
+
opacity: 0,
|
|
328
|
+
transition: 'all 0.3s ease',
|
|
329
|
+
},
|
|
330
|
+
'&::after': {
|
|
331
|
+
content: `"${SACRED_GLYPHS[7]}"`,
|
|
332
|
+
position: 'absolute',
|
|
333
|
+
right: '48px',
|
|
334
|
+
top: '50%',
|
|
335
|
+
transform: 'translateY(-50%)',
|
|
336
|
+
color: alpha('#FFD700', 0.4),
|
|
337
|
+
fontSize: '16px',
|
|
338
|
+
opacity: 0,
|
|
339
|
+
transition: 'all 0.3s ease',
|
|
340
|
+
},
|
|
341
|
+
'& .MuiAccordionSummary-content': {
|
|
342
|
+
paddingLeft: '20px',
|
|
343
|
+
paddingRight: '20px',
|
|
344
|
+
},
|
|
345
|
+
}),
|
|
346
|
+
|
|
192
347
|
'&:hover': {
|
|
193
|
-
backgroundColor: '#
|
|
348
|
+
backgroundColor: sacredtheme ? alpha('#FFD700', 0.1) : '#e8f0fe',
|
|
349
|
+
...(sacredtheme && {
|
|
350
|
+
color: '#FFD700',
|
|
351
|
+
textShadow: '0 0 8px rgba(255, 215, 0, 0.6)',
|
|
352
|
+
'&::before, &::after': {
|
|
353
|
+
opacity: 1,
|
|
354
|
+
animation: `${sacredFloat} 2s ease-in-out infinite`,
|
|
355
|
+
},
|
|
356
|
+
}),
|
|
194
357
|
},
|
|
195
358
|
|
|
196
359
|
// Mobile styles
|
|
@@ -201,30 +364,70 @@ const StyledAccordionSummary = styled(MuiAccordionSummary)({
|
|
|
201
364
|
margin: '8px 0',
|
|
202
365
|
},
|
|
203
366
|
},
|
|
367
|
+
|
|
204
368
|
// Fix for disabled state
|
|
205
369
|
'&.Mui-disabled': {
|
|
206
370
|
opacity: 1, // Override MUI's opacity
|
|
207
|
-
color: '#666',
|
|
371
|
+
color: sacredtheme ? alpha('#FFD700', 0.3) : '#666',
|
|
208
372
|
// Ensure pointer events work for testing
|
|
209
373
|
pointerEvents: 'auto !important',
|
|
210
374
|
cursor: 'not-allowed',
|
|
211
375
|
'& .MuiIconButton-root': {
|
|
212
|
-
color: '#999',
|
|
376
|
+
color: sacredtheme ? alpha('#FFD700', 0.3) : '#999',
|
|
213
377
|
// Allow pointer events for the icon too
|
|
214
378
|
pointerEvents: 'auto !important',
|
|
215
379
|
},
|
|
216
380
|
},
|
|
381
|
+
|
|
217
382
|
// Style when expanded
|
|
218
383
|
'&.Mui-expanded': {
|
|
219
|
-
backgroundColor: '#
|
|
220
|
-
borderBottom:
|
|
384
|
+
backgroundColor: sacredtheme ? alpha('#FFD700', 0.05) : '#e3f2fd',
|
|
385
|
+
borderBottom: sacredtheme
|
|
386
|
+
? `1px solid ${alpha('#FFD700', 0.3)}`
|
|
387
|
+
: '1px solid rgba(0, 0, 0, 0.12)',
|
|
388
|
+
...(sacredtheme && {
|
|
389
|
+
color: '#FFD700',
|
|
390
|
+
animation: `${sacredGlowPulse} 2s ease-in-out infinite`,
|
|
391
|
+
'&::before': {
|
|
392
|
+
opacity: 1,
|
|
393
|
+
transform: 'translateY(-50%) translateX(4px)',
|
|
394
|
+
animation: `${rotateGlyph} 20s linear infinite`,
|
|
395
|
+
},
|
|
396
|
+
'&::after': {
|
|
397
|
+
opacity: 1,
|
|
398
|
+
transform: 'translateY(-50%) translateX(-4px)',
|
|
399
|
+
animation: `${rotateGlyph} 15s linear infinite reverse`,
|
|
400
|
+
},
|
|
401
|
+
}),
|
|
221
402
|
},
|
|
222
|
-
})
|
|
403
|
+
}))
|
|
223
404
|
|
|
224
|
-
const StyledAccordionDetails = styled(MuiAccordionDetails)
|
|
405
|
+
const StyledAccordionDetails = styled(MuiAccordionDetails)<{
|
|
406
|
+
sacredtheme?: boolean
|
|
407
|
+
}>(({ sacredtheme }) => ({
|
|
225
408
|
padding: '16px',
|
|
226
|
-
backgroundColor: 'white',
|
|
227
|
-
borderTop:
|
|
409
|
+
backgroundColor: sacredtheme ? 'transparent' : 'white',
|
|
410
|
+
borderTop: sacredtheme
|
|
411
|
+
? `1px solid ${alpha('#FFD700', 0.2)}`
|
|
412
|
+
: '1px solid rgba(0, 0, 0, 0.08)',
|
|
413
|
+
color: sacredtheme ? alpha('#FFD700', 0.8) : 'inherit',
|
|
414
|
+
position: 'relative',
|
|
415
|
+
|
|
416
|
+
...(sacredtheme && {
|
|
417
|
+
backgroundImage: `
|
|
418
|
+
radial-gradient(circle at bottom right, rgba(255, 215, 0, 0.03) 0%, transparent 50%)
|
|
419
|
+
`,
|
|
420
|
+
'&::before': {
|
|
421
|
+
content: '""',
|
|
422
|
+
position: 'absolute',
|
|
423
|
+
top: '8px',
|
|
424
|
+
left: '16px',
|
|
425
|
+
right: '16px',
|
|
426
|
+
height: '1px',
|
|
427
|
+
background: `linear-gradient(to right, transparent, ${alpha('#FFD700', 0.2)}, transparent)`,
|
|
428
|
+
},
|
|
429
|
+
}),
|
|
430
|
+
|
|
228
431
|
// Mobile styles
|
|
229
432
|
'@media (max-width: 600px)': {
|
|
230
433
|
padding: '12px 16px',
|
|
@@ -235,10 +438,55 @@ const StyledAccordionDetails = styled(MuiAccordionDetails)({
|
|
|
235
438
|
},
|
|
236
439
|
// Desktop styles
|
|
237
440
|
'@media (min-width: 961px)': {
|
|
238
|
-
padding: '16px 24px',
|
|
441
|
+
padding: sacredtheme ? '24px 32px' : '16px 24px',
|
|
442
|
+
},
|
|
443
|
+
}))
|
|
444
|
+
|
|
445
|
+
// Sacred decorative element for expanded content
|
|
446
|
+
const SacredContentWrapper = styled('div')({
|
|
447
|
+
position: 'relative',
|
|
448
|
+
'& > *:first-of-type': {
|
|
449
|
+
position: 'relative',
|
|
450
|
+
zIndex: 1,
|
|
239
451
|
},
|
|
240
452
|
})
|
|
241
453
|
|
|
454
|
+
const SacredGlyphDecoration = styled('div')({
|
|
455
|
+
position: 'absolute',
|
|
456
|
+
bottom: '8px',
|
|
457
|
+
right: '16px',
|
|
458
|
+
display: 'flex',
|
|
459
|
+
gap: '4px',
|
|
460
|
+
opacity: 0.3,
|
|
461
|
+
'& .glyph': {
|
|
462
|
+
color: '#FFD700',
|
|
463
|
+
fontSize: '12px',
|
|
464
|
+
animation: `${expandGlyphGlow} 3s ease-in-out infinite`,
|
|
465
|
+
'&:nth-of-type(2)': {
|
|
466
|
+
animationDelay: '1s',
|
|
467
|
+
},
|
|
468
|
+
'&:nth-of-type(3)': {
|
|
469
|
+
animationDelay: '2s',
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
})
|
|
473
|
+
|
|
474
|
+
// Sacred expand icon component
|
|
475
|
+
const SacredExpandIcon = ({ sacredTheme }: { sacredTheme?: boolean }) => (
|
|
476
|
+
<ExpandMore
|
|
477
|
+
sx={{
|
|
478
|
+
color: sacredTheme ? '#FFD700' : black.main,
|
|
479
|
+
transition: 'all 0.3s ease',
|
|
480
|
+
...(sacredTheme && {
|
|
481
|
+
filter: 'drop-shadow(0 0 4px rgba(255, 215, 0, 0.5))',
|
|
482
|
+
'&:hover': {
|
|
483
|
+
filter: 'drop-shadow(0 0 8px rgba(255, 215, 0, 0.8))',
|
|
484
|
+
},
|
|
485
|
+
}),
|
|
486
|
+
}}
|
|
487
|
+
/>
|
|
488
|
+
)
|
|
489
|
+
|
|
242
490
|
/**
|
|
243
491
|
* Accordion component with multiple variants
|
|
244
492
|
*
|
|
@@ -248,6 +496,7 @@ const StyledAccordionDetails = styled(MuiAccordionDetails)({
|
|
|
248
496
|
* - Accessibility support
|
|
249
497
|
* - Custom styling
|
|
250
498
|
* - Nesting support
|
|
499
|
+
* - Sacred Egyptian theming
|
|
251
500
|
*/
|
|
252
501
|
function Accordion({
|
|
253
502
|
summary,
|
|
@@ -257,6 +506,7 @@ function Accordion({
|
|
|
257
506
|
defaultExpanded = false,
|
|
258
507
|
onChange,
|
|
259
508
|
disabled = false,
|
|
509
|
+
sacredTheme = false,
|
|
260
510
|
}: AccordionProps) {
|
|
261
511
|
// Check if component is in controlled mode (expanded prop is provided)
|
|
262
512
|
const isControlled = controlledExpanded !== undefined
|
|
@@ -313,12 +563,14 @@ function Accordion({
|
|
|
313
563
|
expanded={false}
|
|
314
564
|
onChange={handleToggle}
|
|
315
565
|
className="controlled-accordion-collapsed"
|
|
566
|
+
sacredtheme={sacredTheme}
|
|
316
567
|
>
|
|
317
568
|
<StyledAccordionSummary
|
|
318
|
-
expandIcon={<
|
|
569
|
+
expandIcon={<SacredExpandIcon sacredTheme={sacredTheme} />}
|
|
319
570
|
aria-controls="accordion-content"
|
|
320
571
|
id="accordion-header"
|
|
321
572
|
data-testid="accordion-summary-controlled"
|
|
573
|
+
sacredtheme={sacredTheme}
|
|
322
574
|
>
|
|
323
575
|
{summary}
|
|
324
576
|
</StyledAccordionSummary>
|
|
@@ -335,14 +587,22 @@ function Accordion({
|
|
|
335
587
|
style={style}
|
|
336
588
|
expanded={false} // Always collapsed when disabled
|
|
337
589
|
className="disabled-accordion"
|
|
590
|
+
sacredtheme={sacredTheme}
|
|
338
591
|
>
|
|
339
592
|
<DisabledSummaryWrapper
|
|
340
593
|
onClick={handleDisabledClick}
|
|
341
594
|
data-testid="disabled-accordion-summary"
|
|
342
595
|
>
|
|
343
596
|
<StyledAccordionSummary
|
|
344
|
-
expandIcon={
|
|
597
|
+
expandIcon={
|
|
598
|
+
<ExpandMore
|
|
599
|
+
sx={{
|
|
600
|
+
color: sacredTheme ? alpha('#FFD700', 0.3) : '#999',
|
|
601
|
+
}}
|
|
602
|
+
/>
|
|
603
|
+
}
|
|
345
604
|
aria-disabled="true"
|
|
605
|
+
sacredtheme={sacredTheme}
|
|
346
606
|
>
|
|
347
607
|
{summary}
|
|
348
608
|
</StyledAccordionSummary>
|
|
@@ -360,16 +620,33 @@ function Accordion({
|
|
|
360
620
|
expanded={expanded}
|
|
361
621
|
onChange={handleToggle}
|
|
362
622
|
className={`accordion-${expanded ? 'expanded' : 'collapsed'}`}
|
|
623
|
+
sacredtheme={sacredTheme}
|
|
363
624
|
>
|
|
364
625
|
<StyledAccordionSummary
|
|
365
|
-
expandIcon={<
|
|
626
|
+
expandIcon={<SacredExpandIcon sacredTheme={sacredTheme} />}
|
|
366
627
|
aria-controls="accordion-content"
|
|
367
628
|
id="accordion-header"
|
|
368
629
|
data-testid="accordion-summary"
|
|
630
|
+
sacredtheme={sacredTheme}
|
|
369
631
|
>
|
|
370
632
|
{summary}
|
|
371
633
|
</StyledAccordionSummary>
|
|
372
|
-
{expanded &&
|
|
634
|
+
{expanded && (
|
|
635
|
+
<StyledAccordionDetails sacredtheme={sacredTheme}>
|
|
636
|
+
{sacredTheme ? (
|
|
637
|
+
<SacredContentWrapper>
|
|
638
|
+
{details}
|
|
639
|
+
<SacredGlyphDecoration>
|
|
640
|
+
<span className="glyph">𓅨</span>
|
|
641
|
+
<span className="glyph">𓂋</span>
|
|
642
|
+
<span className="glyph">𓏭</span>
|
|
643
|
+
</SacredGlyphDecoration>
|
|
644
|
+
</SacredContentWrapper>
|
|
645
|
+
) : (
|
|
646
|
+
details
|
|
647
|
+
)}
|
|
648
|
+
</StyledAccordionDetails>
|
|
649
|
+
)}
|
|
373
650
|
</StyledAccordion>
|
|
374
651
|
)
|
|
375
652
|
}
|