@liiift-studio/sales-portal 3.1.2 → 3.1.3

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/api/getSales.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { authenticateDesigner, processSalesData } from './utils/salesDataProcessor';
3
3
  import { sendError, requirePost } from './utils/apiResponse';
4
4
 
5
- export const config = { maxDuration: 300 };
5
+ export const config = { maxDuration: 800 };
6
6
 
7
7
  export default async function handler(req, res) {
8
8
  if (!requirePost(req, res)) return;
@@ -259,7 +259,7 @@ export default function Insights({
259
259
 
260
260
  {/* Metric cards */}
261
261
  {metricCards.map((card, index) => (
262
- <Box key={`metric-${index}`} sx={{ width: { xs: '100%', sm: 'calc(50% - 8px)', md: 'calc(33.33% - 11px)' } }}>
262
+ <Box key={`metric-${index}`} sx={{ flex: { xs: '1 1 100%', sm: '1 1 calc(50% - 8px)', md: '1 1 calc(33.33% - 11px)' } }}>
263
263
  <Tooltip
264
264
  title={card.tooltip}
265
265
  placement="top"
@@ -1,6 +1,8 @@
1
1
  // Login form component for sales portal authentication
2
2
  import React, { useEffect, useState } from 'react';
3
- import { Typography, Input, Button, Box } from '@mui/material';
3
+ import { Typography, Input, Button, Box, IconButton, InputAdornment } from '@mui/material';
4
+ import VisibilityIcon from '@mui/icons-material/Visibility';
5
+ import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
4
6
  import packageJson from '../package.json';
5
7
 
6
8
  const { version } = packageJson;
@@ -27,6 +29,7 @@ export default function LoginForm({
27
29
  const [password, setPassword] = useState('');
28
30
  const [message, setMessage] = useState('');
29
31
  const [loading, setLoading] = useState(false);
32
+ const [showPassword, setShowPassword] = useState(false);
30
33
 
31
34
  const {
32
35
  title = 'Sales Portal',
@@ -128,7 +131,7 @@ export default function LoginForm({
128
131
  {title}
129
132
  </Typography>
130
133
 
131
- <Box sx={{ px: { xs: 4, sm: 6 } }}>
134
+ <Box sx={{ px: { xs: 0, sm: 6 } }}>
132
135
  <Input
133
136
  placeholder="Email"
134
137
  onChange={(e) => setUser(e.target.value)}
@@ -160,9 +163,21 @@ export default function LoginForm({
160
163
  placeholder="Password"
161
164
  onChange={(e) => setPassword(e.target.value)}
162
165
  value={password}
163
- type="password"
166
+ type={showPassword ? 'text' : 'password'}
164
167
  autoComplete="current-password"
165
168
  onKeyPress={handleKeyPress}
169
+ endAdornment={
170
+ <InputAdornment position="end">
171
+ <IconButton
172
+ onClick={() => setShowPassword(!showPassword)}
173
+ edge="end"
174
+ sx={{ color: 'var(--grey800, #666)', mr: 0.5 }}
175
+ aria-label={showPassword ? 'Hide password' : 'Show password'}
176
+ >
177
+ {showPassword ? <VisibilityOffIcon /> : <VisibilityIcon />}
178
+ </IconButton>
179
+ </InputAdornment>
180
+ }
166
181
  sx={{
167
182
  m: 0,
168
183
  border: 'none',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liiift-studio/sales-portal",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "Centralized sales portal package for Liiift Studio projects",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",