@licklist/design 0.78.5-dev.93 → 0.78.5-dev.94
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/v2/components/AvatarUpload/AvatarUpload.d.ts.map +1 -1
- package/dist/v2/components/AvatarUpload/AvatarUpload.js +7 -3
- package/dist/v2/components/IconButton/IconButton.scss.js +1 -1
- package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -1
- package/dist/v2/components/Modal/DeleteModal.js +10 -4
- package/dist/v2/components/StatusBadge/StatusBadge.d.ts.map +1 -1
- package/dist/v2/components/StatusBadge/StatusBadge.js +17 -13
- package/dist/v2/components/TableControls/TableControls.d.ts.map +1 -1
- package/dist/v2/components/TableControls/TableControls.js +7 -3
- package/dist/v2/components/UserPanel/UserPanel.d.ts.map +1 -1
- package/dist/v2/components/UserPanel/UserPanel.js +18 -14
- package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts.map +1 -1
- package/dist/v2/dashboard-analytics/blog-posts/Blog.js +6 -2
- package/dist/v2/dashboard-analytics/chart/Chart.scss.js +1 -1
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts.map +1 -1
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.js +24 -16
- package/dist/v2/icons/index.d.ts +4 -0
- package/dist/v2/icons/index.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +9 -6
- package/dist/v2/navigation/SidebarUserElement/SidebarUserElement.d.ts.map +1 -1
- package/dist/v2/pages/RoleSelection/RoleSelectionPage.d.ts.map +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +1 -0
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +1 -0
- package/dist/v2/pages/UserDetails/UserDetailsPage.d.ts.map +1 -1
- package/dist/v2/pages/auth/AuthLayout/AuthLayout.d.ts.map +1 -1
- package/dist/v2/pages/auth/AuthLayout/AuthLayout.js +6 -2
- package/dist/v2/shadcn/_reference/auth/CreatePasswordPanel.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/LoginForm.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/LoginPanel.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/ResetPasswordForm.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/ResetPasswordPanel.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/VerifyEmailForm.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/VerifyEmailPanel.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/email/EmailAttachment.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/shared/ConfirmationDialog.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/v2/components/AvatarUpload/AvatarUpload.tsx +5 -3
- package/src/v2/components/Customer/CustomersList.scss +8 -9
- package/src/v2/components/IconButton/IconButton.scss +9 -9
- package/src/v2/components/Modal/DeleteModal.tsx +5 -3
- package/src/v2/components/StatusBadge/StatusBadge.tsx +23 -18
- package/src/v2/components/TableControls/TableControls.tsx +5 -3
- package/src/v2/components/UserPanel/UserPanel.tsx +9 -5
- package/src/v2/dashboard-analytics/blog-posts/Blog.tsx +6 -4
- package/src/v2/dashboard-analytics/chart/Chart.scss +2 -2
- package/src/v2/dashboard-analytics/dashboard/Dashboard.tsx +19 -16
- package/src/v2/icons/index.tsx +15 -0
- package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +4 -2
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.tsx +5 -3
- package/src/v2/pages/RoleSelection/RoleSelectionPage.tsx +10 -8
- package/src/v2/pages/UserDetails/UserDetailsPage.tsx +16 -14
- package/src/v2/pages/auth/AuthLayout/AuthLayout.tsx +4 -2
- package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +9 -9
- package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +5 -3
- package/src/v2/shadcn/_reference/auth/LoginForm.tsx +21 -17
- package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +6 -4
- package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +14 -12
- package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +5 -3
- package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +8 -6
- package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +5 -3
- package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +5 -3
- package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +13 -11
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { Button } from '../ui/button';
|
|
3
4
|
import { Label } from '../ui/label';
|
|
4
5
|
import { Input } from '../ui/input';
|
|
@@ -11,12 +12,13 @@ export const ResetPasswordForm: React.FC = () => {
|
|
|
11
12
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
12
13
|
const navigate = useNavigate();
|
|
13
14
|
const { showSuccess, showError } = useNotify();
|
|
15
|
+
const { t } = useTranslation(['User']);
|
|
14
16
|
|
|
15
17
|
const onSubmit = async (e: React.FormEvent) => {
|
|
16
18
|
e.preventDefault();
|
|
17
19
|
|
|
18
20
|
if (!email) {
|
|
19
|
-
showError('
|
|
21
|
+
showError(t('pleaseEnterEmailAddress'));
|
|
20
22
|
return;
|
|
21
23
|
}
|
|
22
24
|
|
|
@@ -27,14 +29,14 @@ export const ResetPasswordForm: React.FC = () => {
|
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
if (error) {
|
|
30
|
-
showError('
|
|
32
|
+
showError(t('resetFailed'), error.message);
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
showSuccess('
|
|
36
|
+
showSuccess(t('passwordResetEmailSent'), t('checkYourInbox'));
|
|
35
37
|
navigate('/auth/verify-email');
|
|
36
38
|
} catch (error) {
|
|
37
|
-
showError('
|
|
39
|
+
showError(t('unexpectedError'));
|
|
38
40
|
} finally {
|
|
39
41
|
setIsSubmitting(false);
|
|
40
42
|
}
|
|
@@ -45,13 +47,13 @@ export const ResetPasswordForm: React.FC = () => {
|
|
|
45
47
|
{/* Info text */}
|
|
46
48
|
<div className="mb-6">
|
|
47
49
|
<p className="text-label-primary text-base leading-[1.4]">
|
|
48
|
-
|
|
50
|
+
{t('resetPasswordDescription')}
|
|
49
51
|
</p>
|
|
50
52
|
</div>
|
|
51
53
|
|
|
52
54
|
<div className="mb-6">
|
|
53
55
|
<Label htmlFor="email" className="text-label-primary text-[15px] font-semibold leading-[1.4] mb-2 block">
|
|
54
|
-
|
|
56
|
+
{t('emailAddress')}
|
|
55
57
|
</Label>
|
|
56
58
|
<Input
|
|
57
59
|
id="email"
|
|
@@ -70,28 +72,28 @@ export const ResetPasswordForm: React.FC = () => {
|
|
|
70
72
|
size="lg"
|
|
71
73
|
className="mb-4 min-w-[150px] w-fit"
|
|
72
74
|
>
|
|
73
|
-
{isSubmitting ? '
|
|
75
|
+
{isSubmitting ? t('sendingReset') : t('resetPassword')}
|
|
74
76
|
</Button>
|
|
75
77
|
|
|
76
78
|
<p className="text-label-primary text-[15px] font-normal mb-2">
|
|
77
|
-
|
|
79
|
+
{t('resetPasswordAlreadyAccount')}{' '}
|
|
78
80
|
<button
|
|
79
81
|
type="button"
|
|
80
82
|
onClick={() => navigate('/auth')}
|
|
81
83
|
className="text-label-action font-normal underline"
|
|
82
84
|
>
|
|
83
|
-
|
|
85
|
+
{t('logIn')}
|
|
84
86
|
</button>
|
|
85
87
|
<span className="text-label-primary">.</span>
|
|
86
88
|
</p>
|
|
87
89
|
|
|
88
90
|
<p className="text-label-primary text-[15px] font-normal">
|
|
89
|
-
|
|
90
|
-
<a
|
|
91
|
+
{t('forFurtherSupport')}{' '}
|
|
92
|
+
<a
|
|
91
93
|
href="mailto:support@booked.it"
|
|
92
94
|
className="text-label-action font-normal underline"
|
|
93
95
|
>
|
|
94
|
-
|
|
96
|
+
{t('contactUs')}
|
|
95
97
|
</a>
|
|
96
98
|
<span className="text-label-primary">.</span>
|
|
97
99
|
</p>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { ResetPasswordForm } from './ResetPasswordForm';
|
|
3
4
|
import { AuthLayout } from './AuthLayout';
|
|
4
5
|
import { IconUpdate } from '../../../icons';
|
|
5
6
|
export const ResetPasswordPanel: React.FC = () => {
|
|
7
|
+
const { t } = useTranslation(['User']);
|
|
6
8
|
return (
|
|
7
9
|
<AuthLayout
|
|
8
|
-
badgeLabel=
|
|
10
|
+
badgeLabel={t('resetPassword')}
|
|
9
11
|
icon={
|
|
10
12
|
<IconUpdate className="w-16 h-16 text-fill-primary" />
|
|
11
13
|
}
|
|
12
|
-
title=
|
|
13
|
-
subtitle=
|
|
14
|
+
title={t('resetPassword')}
|
|
15
|
+
subtitle={t('resetPasswordSubtitle')}
|
|
14
16
|
>
|
|
15
17
|
<ResetPasswordForm />
|
|
16
18
|
</AuthLayout>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { Button } from '../ui/button';
|
|
3
4
|
import { Label } from '../ui/label';
|
|
4
5
|
import { Input } from '../ui/input';
|
|
@@ -10,6 +11,7 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
10
11
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
11
12
|
const navigate = useNavigate();
|
|
12
13
|
const { showSuccess, showError } = useNotify();
|
|
14
|
+
const { t } = useTranslation(['User']);
|
|
13
15
|
|
|
14
16
|
// Add dummy test code on mount for testing
|
|
15
17
|
useEffect(() => {
|
|
@@ -21,7 +23,7 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
21
23
|
e.preventDefault();
|
|
22
24
|
|
|
23
25
|
if (!code || code.length !== 6) {
|
|
24
|
-
showError('
|
|
26
|
+
showError(t('pleaseEnterValidCode'));
|
|
25
27
|
return;
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -29,10 +31,10 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
29
31
|
try {
|
|
30
32
|
// Simulate verification
|
|
31
33
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
32
|
-
showSuccess('
|
|
34
|
+
showSuccess(t('emailVerifiedSuccessfully'));
|
|
33
35
|
navigate('/auth/create-password');
|
|
34
36
|
} catch (error) {
|
|
35
|
-
showError('
|
|
37
|
+
showError(t('verificationFailed'));
|
|
36
38
|
} finally {
|
|
37
39
|
setIsSubmitting(false);
|
|
38
40
|
}
|
|
@@ -43,10 +45,10 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
43
45
|
<form onSubmit={onSubmit} className="flex min-w-60 flex-col items-stretch flex-1 shrink basis-[0%] max-md:max-w-full">
|
|
44
46
|
<div className="mb-6">
|
|
45
47
|
<Label htmlFor="code" className="text-label-primary text-[15px] font-semibold leading-[1.4] mb-2 block">
|
|
46
|
-
|
|
48
|
+
{t('verifyEmailCode')}
|
|
47
49
|
</Label>
|
|
48
50
|
<p className="text-label-secondary text-sm mb-4">
|
|
49
|
-
|
|
51
|
+
{t('verifyEmailDescription')}
|
|
50
52
|
</p>
|
|
51
53
|
<div className="flex gap-2 w-full">
|
|
52
54
|
{[0, 1, 2, 3, 4, 5].map((index) => (
|
|
@@ -85,7 +87,7 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
85
87
|
size="lg"
|
|
86
88
|
className="mt-2 min-w-[150px] w-fit"
|
|
87
89
|
>
|
|
88
|
-
{isSubmitting ? '
|
|
90
|
+
{isSubmitting ? t('verifying') : t('verifyCode')}
|
|
89
91
|
</Button>
|
|
90
92
|
</form>
|
|
91
93
|
</>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { VerifyEmailForm } from './VerifyEmailForm';
|
|
3
4
|
import { AuthLayout } from './AuthLayout';
|
|
4
5
|
import { IconMail } from '../../../icons';
|
|
5
6
|
export const VerifyEmailPanel: React.FC = () => {
|
|
7
|
+
const { t } = useTranslation(['User']);
|
|
6
8
|
return (
|
|
7
9
|
<AuthLayout
|
|
8
|
-
badgeLabel=
|
|
10
|
+
badgeLabel={t('verifyEmail')}
|
|
9
11
|
icon={
|
|
10
12
|
<IconMail className="w-16 h-16 text-fill-primary" />
|
|
11
13
|
}
|
|
12
|
-
title=
|
|
13
|
-
subtitle=
|
|
14
|
+
title={t('verifyEmail')}
|
|
15
|
+
subtitle={t('verifyEmailPanelSubtitle')}
|
|
14
16
|
>
|
|
15
17
|
<VerifyEmailForm />
|
|
16
18
|
</AuthLayout>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { IconUpload, IconCross } from '../../../icons';
|
|
3
4
|
|
|
4
5
|
interface AttachedFile {
|
|
@@ -19,6 +20,7 @@ const formatFileSize = (bytes: number) => {
|
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
const EmailAttachment: React.FC<EmailAttachmentProps> = ({ files, onChange }) => {
|
|
23
|
+
const { t } = useTranslation(['Design']);
|
|
22
24
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
23
25
|
const [isDragging, setIsDragging] = useState(false);
|
|
24
26
|
|
|
@@ -59,7 +61,7 @@ const EmailAttachment: React.FC<EmailAttachmentProps> = ({ files, onChange }) =>
|
|
|
59
61
|
|
|
60
62
|
return (
|
|
61
63
|
<div className="flex flex-col gap-3">
|
|
62
|
-
<h2 className="text-label-primary text-lg font-semibold">
|
|
64
|
+
<h2 className="text-label-primary text-lg font-semibold">{t('attachments')}</h2>
|
|
63
65
|
|
|
64
66
|
{files.length > 0 && (
|
|
65
67
|
<div className="flex flex-col gap-2">
|
|
@@ -105,8 +107,8 @@ const EmailAttachment: React.FC<EmailAttachmentProps> = ({ files, onChange }) =>
|
|
|
105
107
|
>
|
|
106
108
|
<IconUpload size={24} className="fill-fill-secondary" />
|
|
107
109
|
<div className="flex flex-col items-center gap-0.5">
|
|
108
|
-
<span className="text-label-primary text-sm font-medium">
|
|
109
|
-
<span className="text-label-action text-sm font-medium">
|
|
110
|
+
<span className="text-label-primary text-sm font-medium">{t('dragFileToUpload')}</span>
|
|
111
|
+
<span className="text-label-action text-sm font-medium">{t('browseFilesBtn')}</span>
|
|
110
112
|
</div>
|
|
111
113
|
</div>
|
|
112
114
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { cn } from '../../lib/utils';
|
|
3
4
|
import { buttonVariants } from '../ui/button';
|
|
4
5
|
import {
|
|
@@ -37,6 +38,7 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
37
38
|
mode = 'edit',
|
|
38
39
|
itemName,
|
|
39
40
|
}) => {
|
|
41
|
+
const { t } = useTranslation(['Design']);
|
|
40
42
|
const [confirmationInput, setConfirmationInput] = useState('');
|
|
41
43
|
|
|
42
44
|
useEffect(() => {
|
|
@@ -47,12 +49,12 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
47
49
|
|
|
48
50
|
if (variant === 'cancel') {
|
|
49
51
|
const isCreate = mode === 'create';
|
|
50
|
-
const defaultTitle = isCreate ? '
|
|
52
|
+
const defaultTitle = isCreate ? t('discardTitle') : t('discardChangesTitle');
|
|
51
53
|
const defaultDescription = isCreate
|
|
52
|
-
? '
|
|
53
|
-
: '
|
|
54
|
-
const actionLabel = isCreate ? '
|
|
55
|
-
const cancelLabel = isCreate ? '
|
|
54
|
+
? t('discardProgressDesc')
|
|
55
|
+
: t('discardChangesDesc');
|
|
56
|
+
const actionLabel = isCreate ? t('discard') : t('discardChanges');
|
|
57
|
+
const cancelLabel = isCreate ? t('continue') : t('continueEditing');
|
|
56
58
|
|
|
57
59
|
return (
|
|
58
60
|
<AlertDialog open={open} onOpenChange={onOpenChange}>
|
|
@@ -82,8 +84,8 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
82
84
|
const isDeleteEnabled = !itemName || confirmationInput === itemName;
|
|
83
85
|
|
|
84
86
|
const defaultDescription = itemName
|
|
85
|
-
?
|
|
86
|
-
: '
|
|
87
|
+
? t('deleteNamedItemDesc', { name: itemName })
|
|
88
|
+
: t('deleteItemDesc');
|
|
87
89
|
|
|
88
90
|
const handleConfirm = () => {
|
|
89
91
|
if (isDeleteEnabled) {
|
|
@@ -95,7 +97,7 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
95
97
|
<AlertDialog open={open} onOpenChange={onOpenChange}>
|
|
96
98
|
<AlertDialogContent className="z-50">
|
|
97
99
|
<AlertDialogHeader>
|
|
98
|
-
<AlertDialogTitle>{title || '
|
|
100
|
+
<AlertDialogTitle>{title || t('delete')}</AlertDialogTitle>
|
|
99
101
|
<AlertDialogDescription className="whitespace-pre-line">
|
|
100
102
|
{description || defaultDescription}
|
|
101
103
|
</AlertDialogDescription>
|
|
@@ -104,7 +106,7 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
104
106
|
{itemName && (
|
|
105
107
|
<div className="space-y-2">
|
|
106
108
|
<Label htmlFor="confirm-name" className="text-label-primary text-sm">
|
|
107
|
-
|
|
109
|
+
{t('typeWord')} <span className="font-semibold">{itemName}</span> {t('toConfirmDeletion')}
|
|
108
110
|
</Label>
|
|
109
111
|
<Input
|
|
110
112
|
id="confirm-name"
|
|
@@ -122,9 +124,9 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
122
124
|
disabled={!isDeleteEnabled}
|
|
123
125
|
className={cn(buttonVariants({ variant: "destructive" }), "disabled:opacity-50 disabled:cursor-not-allowed")}
|
|
124
126
|
>
|
|
125
|
-
|
|
127
|
+
{t('delete')}
|
|
126
128
|
</AlertDialogAction>
|
|
127
|
-
<AlertDialogCancel>
|
|
129
|
+
<AlertDialogCancel>{t('cancel')}</AlertDialogCancel>
|
|
128
130
|
</AlertDialogFooter>
|
|
129
131
|
</AlertDialogContent>
|
|
130
132
|
</AlertDialog>
|