goobs-frontend 0.9.32 → 0.9.34

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goobs-frontend",
3
- "version": "0.9.32",
3
+ "version": "0.9.34",
4
4
  "type": "module",
5
5
  "description": "A comprehensive React-based libary that extends the functionality of Material-UI",
6
6
  "license": "MIT",
@@ -37,10 +37,10 @@
37
37
  "next": "15",
38
38
  "otplib": "^12",
39
39
  "react-qr-code": "^2",
40
- "slate": "^0.115",
41
- "slate-dom": "^0.114",
40
+ "slate": "^0.117",
41
+ "slate-dom": "^0.116",
42
42
  "slate-history": "^0.113",
43
- "slate-react": "^0.114",
43
+ "slate-react": "^0.117",
44
44
  "storybook": "^9",
45
45
  "zod": "^3",
46
46
  "zod-formik-adapter": "^1"
@@ -55,7 +55,7 @@
55
55
  "@types/react-dom": "^19",
56
56
  "@typescript-eslint/eslint-plugin": "^8",
57
57
  "@typescript-eslint/parser": "^8",
58
- "chromatic": "^12",
58
+ "chromatic": "^13",
59
59
  "eslint": "^9",
60
60
  "eslint-config-next": "^15",
61
61
  "eslint-config-prettier": "^10",
@@ -204,92 +204,92 @@ const StrictAccordion = React.forwardRef<HTMLDivElement, MuiAccordionProps>(
204
204
  StrictAccordion.displayName = 'StrictAccordion'
205
205
 
206
206
  // Styled components with direct media queries
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',
207
+ const StyledAccordion = styled(StrictAccordion, {
208
+ shouldForwardProp: prop => prop !== 'sacredtheme',
209
+ })<{ sacredtheme?: boolean }>(({ sacredtheme }) => ({
210
+ '&.MuiAccordion-root': {
211
+ '&:before': {
212
+ display: 'none',
213
+ },
214
+ // Improved styling for stacked accordions
215
+ marginBottom: '8px',
216
+ borderRadius: '8px',
217
+ boxShadow: sacredtheme
218
+ ? '0 0 15px rgba(255, 215, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3)'
219
+ : '0px 1px 3px rgba(0, 0, 0, 0.1)',
220
+ transition: 'all 0.3s ease',
221
+ overflow: 'hidden',
222
+ position: 'relative',
223
+ backgroundColor: sacredtheme ? '#0a0a0a' : 'white',
224
+ border: sacredtheme ? `1px solid ${alpha('#FFD700', 0.3)}` : 'none',
224
225
 
225
- ...(sacredtheme && {
226
- backgroundImage: `
226
+ ...(sacredtheme && {
227
+ backgroundImage: `
227
228
  linear-gradient(rgba(255, 215, 0, 0.02), rgba(255, 215, 0, 0.02)),
228
229
  radial-gradient(circle at top left, rgba(255, 215, 0, 0.05) 0%, transparent 50%)
229
230
  `,
231
+ '&::before': {
232
+ content: '""',
233
+ position: 'absolute',
234
+ top: 0,
235
+ left: 0,
236
+ right: 0,
237
+ bottom: 0,
238
+ opacity: 0,
239
+ background:
240
+ 'linear-gradient(135deg, transparent, rgba(255, 215, 0, 0.1), transparent)',
241
+ transition: 'opacity 0.3s ease',
242
+ pointerEvents: 'none',
243
+ },
244
+ }),
245
+
246
+ // Add subtle hover effect
247
+ '&:hover': {
248
+ boxShadow: sacredtheme
249
+ ? '0 0 25px rgba(255, 215, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.4)'
250
+ : '0px 3px 6px rgba(0, 0, 0, 0.15)',
251
+ transform: 'translateY(-1px)',
252
+ ...(sacredtheme && {
253
+ borderColor: alpha('#FFD700', 0.5),
230
254
  '&::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',
255
+ opacity: 1,
242
256
  },
243
257
  }),
258
+ },
244
259
 
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
- },
260
+ // Mobile styles
261
+ '@media (max-width: 600px)': {
262
+ borderRadius: '6px',
263
+ boxShadow: sacredtheme
264
+ ? '0 0 10px rgba(255, 215, 0, 0.2)'
265
+ : '0px 1px 3px rgba(0, 0, 0, 0.1)',
281
266
  },
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',
267
+
268
+ // Apply different styling to expanded accordion
269
+ '&.accordion-expanded': {
270
+ boxShadow: sacredtheme
271
+ ? '0 0 30px rgba(255, 215, 0, 0.5), 0 6px 12px rgba(0, 0, 0, 0.5)'
272
+ : '0px 3px 8px rgba(0, 0, 0, 0.12)',
273
+ backgroundColor: sacredtheme ? '#0a0a0a' : '#fafafa',
287
274
  ...(sacredtheme && {
288
- borderColor: alpha('#FFD700', 0.1),
275
+ borderColor: '#FFD700',
276
+ '&::before': {
277
+ opacity: 1,
278
+ animation: `${sacredShimmer} 3s ease-in-out infinite`,
279
+ },
289
280
  }),
290
281
  },
291
- })
292
- )
282
+ },
283
+ '&.Mui-disabled': {
284
+ backgroundColor: sacredtheme ? alpha('#000000', 0.8) : '#f8f8f8',
285
+ opacity: sacredtheme ? 0.6 : 0.8,
286
+ // Override Material UI's disabled styles
287
+ pointerEvents: 'auto !important',
288
+ ...(sacredtheme && {
289
+ borderColor: alpha('#FFD700', 0.1),
290
+ }),
291
+ },
292
+ }))
293
293
 
294
294
  // Wrapper for disabled summary to ensure it's testable
295
295
  const DisabledSummaryWrapper = styled('div')({
@@ -302,7 +302,9 @@ const DisabledSummaryWrapper = styled('div')({
302
302
  },
303
303
  })
304
304
 
305
- const StyledAccordionSummary = styled(MuiAccordionSummary)<{
305
+ const StyledAccordionSummary = styled(MuiAccordionSummary, {
306
+ shouldForwardProp: prop => prop !== 'sacredtheme',
307
+ })<{
306
308
  sacredtheme?: boolean
307
309
  }>(({ sacredtheme }) => ({
308
310
  fontSize: '20px',
@@ -402,7 +404,9 @@ const StyledAccordionSummary = styled(MuiAccordionSummary)<{
402
404
  },
403
405
  }))
404
406
 
405
- const StyledAccordionDetails = styled(MuiAccordionDetails)<{
407
+ const StyledAccordionDetails = styled(MuiAccordionDetails, {
408
+ shouldForwardProp: prop => prop !== 'sacredtheme',
409
+ })<{
406
410
  sacredtheme?: boolean
407
411
  }>(({ sacredtheme }) => ({
408
412
  padding: '16px',
@@ -95,138 +95,136 @@ export interface CheckboxProps {
95
95
  }
96
96
 
97
97
  // Create a styled version of MUI Checkbox with our custom styles
98
- const StyledCheckbox = styled(Checkbox)<{ sacredtheme?: boolean }>(
99
- ({ sacredtheme }) => ({
100
- padding: '8px',
101
- position: 'relative',
102
- '& .MuiSvgIcon-root': {
103
- fontSize: '24px',
104
- },
105
-
106
- // Style for unchecked state
107
- '&:not(.Mui-checked):not(.Mui-indeterminate):not(.Mui-disabled)': {
108
- '& .MuiSvgIcon-root': {
109
- color: 'transparent',
110
- backgroundColor: sacredtheme
111
- ? alpha('#000000', 0.8)
112
- : palette.grey.light,
113
- border: `2px solid ${sacredtheme ? alpha('#FFD700', 0.6) : palette.marine.main}`,
114
- borderRadius: '3px',
115
- transition: 'all 0.3s ease',
116
- ...(sacredtheme && {
117
- animation: `${sacredBorderGlow} 3s ease-in-out infinite`,
118
- }),
119
- },
120
- },
98
+ const StyledCheckbox = styled(Checkbox, {
99
+ shouldForwardProp: prop => prop !== 'sacredtheme',
100
+ })<{ sacredtheme?: boolean }>(({ sacredtheme }) => ({
101
+ padding: '8px',
102
+ position: 'relative',
103
+ '& .MuiSvgIcon-root': {
104
+ fontSize: '24px',
105
+ },
121
106
 
122
- // Checked state
123
- '&.Mui-checked .MuiSvgIcon-root': {
124
- color: sacredtheme ? '#FFD700' : palette.marine.main,
125
- backgroundColor: sacredtheme ? alpha('#000000', 0.9) : 'transparent',
126
- border: sacredtheme ? `2px solid #FFD700` : 'none',
127
- borderRadius: sacredtheme ? '3px' : '0',
107
+ // Style for unchecked state
108
+ '&:not(.Mui-checked):not(.Mui-indeterminate):not(.Mui-disabled)': {
109
+ '& .MuiSvgIcon-root': {
110
+ color: 'transparent',
111
+ backgroundColor: sacredtheme ? alpha('#000000', 0.8) : palette.grey.light,
112
+ border: `2px solid ${sacredtheme ? alpha('#FFD700', 0.6) : palette.marine.main}`,
113
+ borderRadius: '3px',
114
+ transition: 'all 0.3s ease',
128
115
  ...(sacredtheme && {
129
- animation: `${sacredGlowPulse} 2s ease-in-out infinite`,
130
- filter: 'drop-shadow(0 0 8px rgba(255, 215, 0, 0.6))',
116
+ animation: `${sacredBorderGlow} 3s ease-in-out infinite`,
131
117
  }),
132
118
  },
119
+ },
133
120
 
134
- // Checked animation
135
- '&.Mui-checked': {
136
- ...(sacredtheme && {
137
- '& .MuiSvgIcon-root path': {
138
- animation: `${sacredCheckAppear} 0.4s ease-out`,
139
- },
140
- }),
141
- },
121
+ // Checked state
122
+ '&.Mui-checked .MuiSvgIcon-root': {
123
+ color: sacredtheme ? '#FFD700' : palette.marine.main,
124
+ backgroundColor: sacredtheme ? alpha('#000000', 0.9) : 'transparent',
125
+ border: sacredtheme ? `2px solid #FFD700` : 'none',
126
+ borderRadius: sacredtheme ? '3px' : '0',
127
+ ...(sacredtheme && {
128
+ animation: `${sacredGlowPulse} 2s ease-in-out infinite`,
129
+ filter: 'drop-shadow(0 0 8px rgba(255, 215, 0, 0.6))',
130
+ }),
131
+ },
142
132
 
143
- // Indeterminate state
144
- '&.Mui-indeterminate .MuiSvgIcon-root': {
145
- color: sacredtheme ? '#FFD700' : palette.marine.main,
146
- backgroundColor: sacredtheme ? alpha('#000000', 0.9) : 'transparent',
147
- border: sacredtheme ? `2px solid #FFD700` : 'none',
148
- borderRadius: sacredtheme ? '3px' : '0',
149
- ...(sacredtheme && {
150
- animation: `${sacredGlowPulse} 1.5s ease-in-out infinite`,
151
- filter: 'drop-shadow(0 0 6px rgba(255, 215, 0, 0.5))',
152
- }),
153
- },
133
+ // Checked animation
134
+ '&.Mui-checked': {
135
+ ...(sacredtheme && {
136
+ '& .MuiSvgIcon-root path': {
137
+ animation: `${sacredCheckAppear} 0.4s ease-out`,
138
+ },
139
+ }),
140
+ },
154
141
 
155
- // Disabled state
156
- '&.Mui-disabled .MuiSvgIcon-root': {
157
- color: sacredtheme ? alpha('#FFD700', 0.2) : palette.grey.main,
158
- backgroundColor: sacredtheme ? alpha('#000000', 0.6) : 'transparent',
159
- border: `2px solid ${sacredtheme ? alpha('#FFD700', 0.2) : palette.grey.main}`,
160
- borderRadius: '3px',
161
- },
142
+ // Indeterminate state
143
+ '&.Mui-indeterminate .MuiSvgIcon-root': {
144
+ color: sacredtheme ? '#FFD700' : palette.marine.main,
145
+ backgroundColor: sacredtheme ? alpha('#000000', 0.9) : 'transparent',
146
+ border: sacredtheme ? `2px solid #FFD700` : 'none',
147
+ borderRadius: sacredtheme ? '3px' : '0',
148
+ ...(sacredtheme && {
149
+ animation: `${sacredGlowPulse} 1.5s ease-in-out infinite`,
150
+ filter: 'drop-shadow(0 0 6px rgba(255, 215, 0, 0.5))',
151
+ }),
152
+ },
162
153
 
163
- // Hover state
164
- '&:hover': {
165
- backgroundColor: sacredtheme
166
- ? alpha('#FFD700', 0.1)
167
- : `${palette.marine.light}33`,
168
- ...(sacredtheme && {
169
- '& .MuiSvgIcon-root': {
170
- borderColor: '#FFD700',
171
- transform: 'scale(1.1)',
172
- },
173
- }),
174
- },
154
+ // Disabled state
155
+ '&.Mui-disabled .MuiSvgIcon-root': {
156
+ color: sacredtheme ? alpha('#FFD700', 0.2) : palette.grey.main,
157
+ backgroundColor: sacredtheme ? alpha('#000000', 0.6) : 'transparent',
158
+ border: `2px solid ${sacredtheme ? alpha('#FFD700', 0.2) : palette.grey.main}`,
159
+ borderRadius: '3px',
160
+ },
175
161
 
176
- // Sacred decorative elements
162
+ // Hover state
163
+ '&:hover': {
164
+ backgroundColor: sacredtheme
165
+ ? alpha('#FFD700', 0.1)
166
+ : `${palette.marine.light}33`,
177
167
  ...(sacredtheme && {
178
- '&::before': {
179
- content: `"${SACRED_GLYPHS[11]}"`,
180
- position: 'absolute',
181
- left: '-20px',
182
- top: '50%',
183
- transform: 'translateY(-50%)',
184
- color: alpha('#FFD700', 0.3),
185
- fontSize: '12px',
186
- animation: `${floatGlyph} 3s ease-in-out infinite`,
187
- },
188
- '&::after': {
189
- content: `"${SACRED_GLYPHS[15]}"`,
190
- position: 'absolute',
191
- right: '-20px',
192
- top: '50%',
193
- transform: 'translateY(-50%)',
194
- color: alpha('#FFD700', 0.3),
195
- fontSize: '12px',
196
- animation: `${floatGlyph} 3s ease-in-out infinite 1.5s`,
168
+ '& .MuiSvgIcon-root': {
169
+ borderColor: '#FFD700',
170
+ transform: 'scale(1.1)',
197
171
  },
198
172
  }),
199
- })
200
- )
173
+ },
174
+
175
+ // Sacred decorative elements
176
+ ...(sacredtheme && {
177
+ '&::before': {
178
+ content: `"${SACRED_GLYPHS[11]}"`,
179
+ position: 'absolute',
180
+ left: '-20px',
181
+ top: '50%',
182
+ transform: 'translateY(-50%)',
183
+ color: alpha('#FFD700', 0.3),
184
+ fontSize: '12px',
185
+ animation: `${floatGlyph} 3s ease-in-out infinite`,
186
+ },
187
+ '&::after': {
188
+ content: `"${SACRED_GLYPHS[15]}"`,
189
+ position: 'absolute',
190
+ right: '-20px',
191
+ top: '50%',
192
+ transform: 'translateY(-50%)',
193
+ color: alpha('#FFD700', 0.3),
194
+ fontSize: '12px',
195
+ animation: `${floatGlyph} 3s ease-in-out infinite 1.5s`,
196
+ },
197
+ }),
198
+ }))
201
199
 
202
200
  // Sacred wrapper for additional effects
203
- const SacredCheckboxWrapper = styled('div')<{ sacredtheme?: boolean }>(
204
- ({ sacredtheme }) => ({
205
- display: 'inline-flex',
206
- alignItems: 'center',
207
- justifyContent: 'center',
208
- position: 'relative',
209
- ...(sacredtheme && {
210
- '&::before': {
211
- content: '""',
212
- position: 'absolute',
213
- top: '50%',
214
- left: '50%',
215
- transform: 'translate(-50%, -50%)',
216
- width: '40px',
217
- height: '40px',
218
- borderRadius: '50%',
219
- background: `radial-gradient(circle, ${alpha('#FFD700', 0.1)} 0%, transparent 70%)`,
220
- opacity: 0,
221
- transition: 'opacity 0.3s ease',
222
- pointerEvents: 'none',
223
- },
224
- '&:hover::before': {
225
- opacity: 1,
226
- },
227
- }),
228
- })
229
- )
201
+ const SacredCheckboxWrapper = styled('div', {
202
+ shouldForwardProp: prop => prop !== 'sacredtheme',
203
+ })<{ sacredtheme?: boolean }>(({ sacredtheme }) => ({
204
+ display: 'inline-flex',
205
+ alignItems: 'center',
206
+ justifyContent: 'center',
207
+ position: 'relative',
208
+ ...(sacredtheme && {
209
+ '&::before': {
210
+ content: '""',
211
+ position: 'absolute',
212
+ top: '50%',
213
+ left: '50%',
214
+ transform: 'translate(-50%, -50%)',
215
+ width: '40px',
216
+ height: '40px',
217
+ borderRadius: '50%',
218
+ background: `radial-gradient(circle, ${alpha('#FFD700', 0.1)} 0%, transparent 70%)`,
219
+ opacity: 0,
220
+ transition: 'opacity 0.3s ease',
221
+ pointerEvents: 'none',
222
+ },
223
+ '&:hover::before': {
224
+ opacity: 1,
225
+ },
226
+ }),
227
+ }))
230
228
 
231
229
  function CustomCheckbox({
232
230
  onClick,
@@ -136,43 +136,43 @@ export interface ConfirmationCodeInputsProps {
136
136
  }
137
137
 
138
138
  // Custom styled input for verification code digits
139
- const CodeInput = styled('input')<{ sacredtheme?: boolean }>(
140
- ({ sacredtheme }) => ({
141
- width: '48px',
142
- height: '56px',
143
- padding: '0',
144
- textAlign: 'center',
145
- fontSize: '20px',
146
- fontWeight: sacredtheme ? 'bold' : 'normal',
147
- color: sacredtheme ? '#FFD700' : 'black',
148
- backgroundColor: sacredtheme ? '#0a0a0a' : 'white',
149
- border: sacredtheme
150
- ? `2px solid ${alpha('#FFD700', 0.5)}`
151
- : '1px solid black',
152
- borderRadius: '4px',
153
- outline: 'none',
154
- position: 'relative',
155
- transition: 'all 0.3s ease',
139
+ const CodeInput = styled('input', {
140
+ shouldForwardProp: prop => prop !== 'sacredtheme',
141
+ })<{ sacredtheme?: boolean }>(({ sacredtheme }) => ({
142
+ width: '48px',
143
+ height: '56px',
144
+ padding: '0',
145
+ textAlign: 'center',
146
+ fontSize: '20px',
147
+ fontWeight: sacredtheme ? 'bold' : 'normal',
148
+ color: sacredtheme ? '#FFD700' : 'black',
149
+ backgroundColor: sacredtheme ? '#0a0a0a' : 'white',
150
+ border: sacredtheme
151
+ ? `2px solid ${alpha('#FFD700', 0.5)}`
152
+ : '1px solid black',
153
+ borderRadius: '4px',
154
+ outline: 'none',
155
+ position: 'relative',
156
+ transition: 'all 0.3s ease',
157
+ ...(sacredtheme && {
158
+ fontFamily: 'monospace',
159
+ letterSpacing: '2px',
160
+ textShadow: '0 0 8px rgba(255, 215, 0, 0.6)',
161
+ animation: `${sacredInputGlow} 4s ease-in-out infinite`,
162
+ }),
163
+ '&:focus': {
164
+ borderColor: sacredtheme ? '#FFD700' : 'black',
165
+ borderWidth: '2px',
156
166
  ...(sacredtheme && {
157
- fontFamily: 'monospace',
158
- letterSpacing: '2px',
159
- textShadow: '0 0 8px rgba(255, 215, 0, 0.6)',
160
- animation: `${sacredInputGlow} 4s ease-in-out infinite`,
167
+ boxShadow:
168
+ '0 0 20px rgba(255, 215, 0, 0.6), inset 0 0 15px rgba(255, 215, 0, 0.3)',
169
+ transform: 'scale(1.05)',
161
170
  }),
162
- '&:focus': {
163
- borderColor: sacredtheme ? '#FFD700' : 'black',
164
- borderWidth: '2px',
165
- ...(sacredtheme && {
166
- boxShadow:
167
- '0 0 20px rgba(255, 215, 0, 0.6), inset 0 0 15px rgba(255, 215, 0, 0.3)',
168
- transform: 'scale(1.05)',
169
- }),
170
- },
171
- '&::placeholder': {
172
- color: sacredtheme ? alpha('#FFD700', 0.3) : undefined,
173
- },
174
- })
175
- )
171
+ },
172
+ '&::placeholder': {
173
+ color: sacredtheme ? alpha('#FFD700', 0.3) : undefined,
174
+ },
175
+ }))
176
176
 
177
177
  const ConfirmationCodeInputs: FC<ConfirmationCodeInputsProps> = ({
178
178
  codeLength = 6,