@open-mercato/core 0.6.1-develop.3278.1.a4d26475e4 → 0.6.1-develop.3287.1.450f4ffb56
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/helpers/integration/auth.js +1 -1
- package/dist/helpers/integration/auth.js.map +2 -2
- package/dist/helpers/integration/authUi.js +1 -1
- package/dist/helpers/integration/authUi.js.map +2 -2
- package/dist/modules/auth/frontend/login.js +4 -4
- package/dist/modules/auth/frontend/login.js.map +2 -2
- package/dist/modules/auth/frontend/reset/[token]/page.js +5 -5
- package/dist/modules/auth/frontend/reset/[token]/page.js.map +2 -2
- package/dist/modules/auth/frontend/reset.js +2 -2
- package/dist/modules/auth/frontend/reset.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js +4 -3
- package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +6 -5
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
- package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js +2 -2
- package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js.map +2 -2
- package/dist/modules/customers/components/formConfig.js +2 -2
- package/dist/modules/customers/components/formConfig.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/[id]/page.js +2 -3
- package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/login/page.js +4 -3
- package/dist/modules/portal/frontend/[orgSlug]/portal/login/page.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/reset-password/page.js +3 -3
- package/dist/modules/portal/frontend/[orgSlug]/portal/reset-password/page.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/signup/page.js +4 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/signup/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +3 -5
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/components/ProviderFieldInput.js +2 -2
- package/dist/modules/sales/components/ProviderFieldInput.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentForm.js +3 -4
- package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
- package/dist/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.js +3 -4
- package/dist/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.js.map +2 -2
- package/dist/modules/workflows/backend/tasks/[id]/page.js +2 -2
- package/dist/modules/workflows/backend/tasks/[id]/page.js.map +2 -2
- package/dist/modules/workflows/frontend/checkout-demo/page.js +2 -2
- package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
- package/package.json +5 -5
- package/src/helpers/integration/auth.ts +1 -1
- package/src/helpers/integration/authUi.ts +1 -1
- package/src/modules/auth/frontend/login.tsx +4 -3
- package/src/modules/auth/frontend/reset/[token]/page.tsx +4 -4
- package/src/modules/auth/frontend/reset.tsx +2 -2
- package/src/modules/customer_accounts/backend/customer_accounts/users/[id]/page.tsx +3 -2
- package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +5 -4
- package/src/modules/customer_accounts/widgets/injection/account-status/widget.client.tsx +2 -2
- package/src/modules/customers/components/formConfig.tsx +2 -2
- package/src/modules/integrations/backend/integrations/[id]/page.tsx +2 -2
- package/src/modules/portal/frontend/[orgSlug]/portal/login/page.tsx +4 -3
- package/src/modules/portal/frontend/[orgSlug]/portal/reset-password/page.tsx +3 -3
- package/src/modules/portal/frontend/[orgSlug]/portal/signup/page.tsx +4 -2
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +3 -5
- package/src/modules/sales/components/ProviderFieldInput.tsx +2 -2
- package/src/modules/sales/components/documents/SalesDocumentForm.tsx +2 -3
- package/src/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.tsx +3 -4
- package/src/modules/workflows/backend/tasks/[id]/page.tsx +2 -2
- package/src/modules/workflows/frontend/checkout-demo/page.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/core",
|
|
3
|
-
"version": "0.6.1-develop.
|
|
3
|
+
"version": "0.6.1-develop.3287.1.450f4ffb56",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -237,12 +237,12 @@
|
|
|
237
237
|
"ts-pattern": "^5.0.0"
|
|
238
238
|
},
|
|
239
239
|
"peerDependencies": {
|
|
240
|
-
"@open-mercato/ai-assistant": "0.6.1-develop.
|
|
241
|
-
"@open-mercato/shared": "0.6.1-develop.
|
|
240
|
+
"@open-mercato/ai-assistant": "0.6.1-develop.3287.1.450f4ffb56",
|
|
241
|
+
"@open-mercato/shared": "0.6.1-develop.3287.1.450f4ffb56"
|
|
242
242
|
},
|
|
243
243
|
"devDependencies": {
|
|
244
|
-
"@open-mercato/ai-assistant": "0.6.1-develop.
|
|
245
|
-
"@open-mercato/shared": "0.6.1-develop.
|
|
244
|
+
"@open-mercato/ai-assistant": "0.6.1-develop.3287.1.450f4ffb56",
|
|
245
|
+
"@open-mercato/shared": "0.6.1-develop.3287.1.450f4ffb56",
|
|
246
246
|
"@testing-library/dom": "^10.4.1",
|
|
247
247
|
"@testing-library/jest-dom": "^6.9.1",
|
|
248
248
|
"@testing-library/react": "^16.3.1",
|
|
@@ -207,7 +207,7 @@ export async function login(page: Page, role: Role = 'admin'): Promise<void> {
|
|
|
207
207
|
}
|
|
208
208
|
await page.getByLabel('Email').fill(creds.email);
|
|
209
209
|
|
|
210
|
-
const passwordInput = page.getByLabel('Password').first();
|
|
210
|
+
const passwordInput = page.getByLabel('Password', { exact: true }).first();
|
|
211
211
|
if (await passwordInput.isVisible().catch(() => false)) {
|
|
212
212
|
await passwordInput.fill(creds.password);
|
|
213
213
|
await passwordInput.press('Enter');
|
|
@@ -37,6 +37,6 @@ export async function createUserViaUi(page: Page, input: { email: string; passwo
|
|
|
37
37
|
|
|
38
38
|
await page.getByRole('button', { name: 'Create' }).first().click();
|
|
39
39
|
await expect(page).toHaveURL(/\/backend\/users(?:\?.*)?$/);
|
|
40
|
-
await page.getByRole('
|
|
40
|
+
await page.getByRole('searchbox', { name: 'Search', exact: true }).fill(input.email);
|
|
41
41
|
await expect(page.getByRole('row', { name: new RegExp(input.email, 'i') })).toBeVisible();
|
|
42
42
|
}
|
|
@@ -6,6 +6,8 @@ import Link from 'next/link'
|
|
|
6
6
|
import { useRouter, useSearchParams } from 'next/navigation'
|
|
7
7
|
import { Card, CardContent, CardHeader, CardDescription } from '@open-mercato/ui/primitives/card'
|
|
8
8
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
9
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
10
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
9
11
|
import { Label } from '@open-mercato/ui/primitives/label'
|
|
10
12
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
11
13
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
@@ -352,10 +354,9 @@ export default function LoginPage() {
|
|
|
352
354
|
)}
|
|
353
355
|
<div className="grid gap-1">
|
|
354
356
|
<Label htmlFor="email">{t('auth.email')}</Label>
|
|
355
|
-
<
|
|
357
|
+
<EmailInput
|
|
356
358
|
id="email"
|
|
357
359
|
name="email"
|
|
358
|
-
type="email"
|
|
359
360
|
required
|
|
360
361
|
aria-invalid={!!error}
|
|
361
362
|
onChange={(e) => setEmail(e.target.value)}
|
|
@@ -369,7 +370,7 @@ export default function LoginPage() {
|
|
|
369
370
|
{authOverride?.hidePassword ? null : (
|
|
370
371
|
<div className="grid gap-1">
|
|
371
372
|
<Label htmlFor="password">{t('auth.password')}</Label>
|
|
372
|
-
<
|
|
373
|
+
<PasswordInput id="password" name="password" required={!authOverride} aria-invalid={!!error} autoComplete="current-password" />
|
|
373
374
|
</div>
|
|
374
375
|
)}
|
|
375
376
|
{!authOverride?.hideRememberMe && !authOverride?.hidePassword && (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@open-mercato/ui/primitives/card'
|
|
3
3
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
4
|
-
import {
|
|
4
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
5
5
|
import { Label } from '@open-mercato/ui/primitives/label'
|
|
6
6
|
import { useState } from 'react'
|
|
7
7
|
import { useRouter } from 'next/navigation'
|
|
@@ -69,19 +69,19 @@ export default function ResetWithTokenPage({ params }: { params: { token: string
|
|
|
69
69
|
{error && <div className="text-sm text-status-error-text">{error}</div>}
|
|
70
70
|
<div className="grid gap-1">
|
|
71
71
|
<Label htmlFor="password">{t('auth.reset.form.password', 'New password')}</Label>
|
|
72
|
-
<
|
|
72
|
+
<PasswordInput id="password" name="password" required minLength={passwordPolicy.minLength} autoComplete="new-password" />
|
|
73
73
|
{passwordDescription ? (
|
|
74
74
|
<p className="text-xs text-muted-foreground">{passwordDescription}</p>
|
|
75
75
|
) : null}
|
|
76
76
|
</div>
|
|
77
77
|
<div className="grid gap-1">
|
|
78
78
|
<Label htmlFor="confirmPassword">{t('auth.profile.form.confirmPassword', 'Confirm new password')}</Label>
|
|
79
|
-
<
|
|
79
|
+
<PasswordInput
|
|
80
80
|
id="confirmPassword"
|
|
81
81
|
name="confirmPassword"
|
|
82
|
-
type="password"
|
|
83
82
|
required
|
|
84
83
|
minLength={passwordPolicy.minLength}
|
|
84
|
+
autoComplete="new-password"
|
|
85
85
|
/>
|
|
86
86
|
</div>
|
|
87
87
|
<Button type="submit" className="mt-2 w-full" disabled={submitting}>
|
|
@@ -3,7 +3,7 @@ import { useState } from 'react'
|
|
|
3
3
|
import Link from 'next/link'
|
|
4
4
|
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@open-mercato/ui/primitives/card'
|
|
5
5
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
6
|
-
import {
|
|
6
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
7
7
|
import { Label } from '@open-mercato/ui/primitives/label'
|
|
8
8
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
9
9
|
|
|
@@ -59,7 +59,7 @@ export default function ResetPage() {
|
|
|
59
59
|
{error && <div className="text-sm text-red-600">{error}</div>}
|
|
60
60
|
<div className="grid gap-1">
|
|
61
61
|
<Label htmlFor="email">{t('auth.email')}</Label>
|
|
62
|
-
<
|
|
62
|
+
<EmailInput id="email" name="email" required aria-invalid={!!fieldError} aria-describedby={fieldError ? 'email-error' : undefined} />
|
|
63
63
|
{fieldError && <p id="email-error" className="text-sm text-red-600">{fieldError}</p>}
|
|
64
64
|
</div>
|
|
65
65
|
<Button type="submit" className="mt-2 w-full" disabled={submitting}>
|
|
@@ -7,6 +7,7 @@ import { Page, PageBody } from '@open-mercato/ui/backend/Page'
|
|
|
7
7
|
import { FormHeader } from '@open-mercato/ui/backend/forms'
|
|
8
8
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
9
9
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
10
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
10
11
|
import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
11
12
|
import { SwitchField } from '@open-mercato/ui/primitives/switch-field'
|
|
12
13
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@open-mercato/ui/primitives/dialog'
|
|
@@ -112,14 +113,14 @@ function ResetPasswordDialog({
|
|
|
112
113
|
<label className="text-sm font-medium" htmlFor="reset-password">
|
|
113
114
|
{t('customer_accounts.admin.detail.resetPassword.fields.newPassword', 'New Password')}
|
|
114
115
|
</label>
|
|
115
|
-
<
|
|
116
|
+
<PasswordInput
|
|
116
117
|
id="reset-password"
|
|
117
|
-
type="password"
|
|
118
118
|
required
|
|
119
119
|
minLength={8}
|
|
120
120
|
value={newPassword}
|
|
121
121
|
onChange={(event) => setNewPassword(event.target.value)}
|
|
122
122
|
placeholder={t('customer_accounts.admin.detail.resetPassword.fields.placeholder', 'Min. 8 characters')}
|
|
123
|
+
autoComplete="new-password"
|
|
123
124
|
/>
|
|
124
125
|
</div>
|
|
125
126
|
<div className="flex justify-end gap-2 pt-2">
|
|
@@ -10,6 +10,8 @@ import type { ColumnDef } from '@tanstack/react-table'
|
|
|
10
10
|
import { RowActions } from '@open-mercato/ui/backend/RowActions'
|
|
11
11
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
12
12
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
13
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
14
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
13
15
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@open-mercato/ui/primitives/dialog'
|
|
14
16
|
import { apiCall, readApiResultOrThrow } from '@open-mercato/ui/backend/utils/apiCall'
|
|
15
17
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
@@ -144,9 +146,8 @@ function CreateUserDialog({
|
|
|
144
146
|
<label className="text-sm font-medium" htmlFor="create-email">
|
|
145
147
|
{t('customer_accounts.admin.createUser.fields.email', 'Email')}
|
|
146
148
|
</label>
|
|
147
|
-
<
|
|
149
|
+
<EmailInput
|
|
148
150
|
id="create-email"
|
|
149
|
-
type="email"
|
|
150
151
|
required
|
|
151
152
|
value={email}
|
|
152
153
|
onChange={(event) => setEmail(event.target.value)}
|
|
@@ -170,14 +171,14 @@ function CreateUserDialog({
|
|
|
170
171
|
<label className="text-sm font-medium" htmlFor="create-password">
|
|
171
172
|
{t('customer_accounts.admin.createUser.fields.password', 'Password')}
|
|
172
173
|
</label>
|
|
173
|
-
<
|
|
174
|
+
<PasswordInput
|
|
174
175
|
id="create-password"
|
|
175
|
-
type="password"
|
|
176
176
|
required
|
|
177
177
|
minLength={8}
|
|
178
178
|
value={password}
|
|
179
179
|
onChange={(event) => setPassword(event.target.value)}
|
|
180
180
|
placeholder={t('customer_accounts.admin.createUser.fields.passwordPlaceholder', 'Min. 8 characters')}
|
|
181
|
+
autoComplete="new-password"
|
|
181
182
|
/>
|
|
182
183
|
</div>
|
|
183
184
|
{roleOptions.length > 0 && (
|
|
@@ -6,6 +6,7 @@ import { apiCall } from '@open-mercato/ui/backend/utils/apiCall'
|
|
|
6
6
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
7
7
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
8
8
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
9
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
9
10
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
10
11
|
|
|
11
12
|
interface AccountStatusData {
|
|
@@ -168,9 +169,8 @@ function InviteForm({ personEntityId, onSuccess }: { personEntityId: string; onS
|
|
|
168
169
|
<label htmlFor="invite-email" className="block text-xs font-medium text-muted-foreground mb-1">
|
|
169
170
|
{t('common.email', 'Email')}
|
|
170
171
|
</label>
|
|
171
|
-
<
|
|
172
|
+
<EmailInput
|
|
172
173
|
id="invite-email"
|
|
173
|
-
type="email"
|
|
174
174
|
size="sm"
|
|
175
175
|
value={email}
|
|
176
176
|
onChange={(event) => setEmail(event.target.value)}
|
|
@@ -8,6 +8,7 @@ import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
|
8
8
|
import { useOrganizationScopeVersion } from '@open-mercato/shared/lib/frontend/useOrganizationScope'
|
|
9
9
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
10
10
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
11
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
11
12
|
import {
|
|
12
13
|
Select,
|
|
13
14
|
SelectContent,
|
|
@@ -263,8 +264,7 @@ const createPrimaryEmailField = (t: Translator): CrudField => ({
|
|
|
263
264
|
|
|
264
265
|
return (
|
|
265
266
|
<div className="space-y-2">
|
|
266
|
-
<
|
|
267
|
-
type="email"
|
|
267
|
+
<EmailInput
|
|
268
268
|
value={inputValue}
|
|
269
269
|
onChange={(event) => {
|
|
270
270
|
const nextValue = event.target.value
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from '@open-mercato/ui/primitives/select'
|
|
21
21
|
import { Switch } from '@open-mercato/ui/primitives/switch'
|
|
22
22
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
23
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
23
24
|
import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
24
25
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@open-mercato/ui/primitives/tabs'
|
|
25
26
|
import { JsonDisplay } from '@open-mercato/ui/backend/JsonDisplay'
|
|
@@ -212,9 +213,8 @@ function buildCredentialFields(credFields: CredentialField[]): CrudField[] {
|
|
|
212
213
|
...shared,
|
|
213
214
|
type: 'custom' as const,
|
|
214
215
|
component: ({ id, value, setValue, disabled }) => (
|
|
215
|
-
<
|
|
216
|
+
<PasswordInput
|
|
216
217
|
id={id}
|
|
217
|
-
type="password"
|
|
218
218
|
placeholder={field.placeholder}
|
|
219
219
|
value={typeof value === 'string' ? value : ''}
|
|
220
220
|
onChange={(event) => setValue(event.target.value)}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { useCallback, useMemo, useState } from 'react'
|
|
3
3
|
import Link from 'next/link'
|
|
4
4
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
5
|
-
import {
|
|
5
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
6
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
6
7
|
import { Label } from '@open-mercato/ui/primitives/label'
|
|
7
8
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
8
9
|
import { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'
|
|
@@ -108,12 +109,12 @@ export default function PortalLoginPage({ params }: Props) {
|
|
|
108
109
|
|
|
109
110
|
<div className="flex flex-col gap-1.5">
|
|
110
111
|
<Label htmlFor="login-email" className="text-overline font-semibold uppercase tracking-wider text-muted-foreground/70">{t('portal.login.email', 'Email')}</Label>
|
|
111
|
-
<
|
|
112
|
+
<EmailInput id="login-email" required placeholder={t('portal.login.email.placeholder', 'you@example.com')} value={email} onChange={(e) => setEmail(e.target.value)} disabled={submitting} className="rounded-lg" />
|
|
112
113
|
</div>
|
|
113
114
|
|
|
114
115
|
<div className="flex flex-col gap-1.5">
|
|
115
116
|
<Label htmlFor="login-password" className="text-overline font-semibold uppercase tracking-wider text-muted-foreground/70">{t('portal.login.password', 'Password')}</Label>
|
|
116
|
-
<
|
|
117
|
+
<PasswordInput id="login-password" autoComplete="current-password" required placeholder={t('portal.login.password.placeholder', '\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022')} value={password} onChange={(e) => setPassword(e.target.value)} disabled={submitting} className="rounded-lg" />
|
|
117
118
|
</div>
|
|
118
119
|
|
|
119
120
|
<Button type="submit" disabled={submitting} className="mt-1 w-full rounded-lg">
|
|
@@ -3,7 +3,7 @@ import { useCallback, useMemo, useState, useEffect } from 'react'
|
|
|
3
3
|
import { useSearchParams } from 'next/navigation'
|
|
4
4
|
import Link from 'next/link'
|
|
5
5
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
6
|
-
import {
|
|
6
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
7
7
|
import { Label } from '@open-mercato/ui/primitives/label'
|
|
8
8
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
9
9
|
import { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'
|
|
@@ -142,12 +142,12 @@ export default function PortalResetPasswordPage({ params }: Props) {
|
|
|
142
142
|
|
|
143
143
|
<div className="flex flex-col gap-1.5">
|
|
144
144
|
<Label htmlFor="reset-password" className="text-overline font-semibold uppercase tracking-wider text-muted-foreground/70">{t('portal.resetPassword.password', 'New Password')}</Label>
|
|
145
|
-
<
|
|
145
|
+
<PasswordInput id="reset-password" autoComplete="new-password" required placeholder={t('portal.resetPassword.password.placeholder', '••••••••')} value={password} onChange={(e) => setPassword(e.target.value)} disabled={submitting || !token} className="rounded-lg" />
|
|
146
146
|
</div>
|
|
147
147
|
|
|
148
148
|
<div className="flex flex-col gap-1.5">
|
|
149
149
|
<Label htmlFor="confirm-password" className="text-overline font-semibold uppercase tracking-wider text-muted-foreground/70">{t('portal.resetPassword.confirmPassword', 'Confirm New Password')}</Label>
|
|
150
|
-
<
|
|
150
|
+
<PasswordInput id="confirm-password" autoComplete="new-password" required placeholder={t('portal.resetPassword.confirmPassword.placeholder', '••••••••')} value={confirmPassword} onChange={(e) => setConfirmPassword(e.target.value)} disabled={submitting || !token} className="rounded-lg" />
|
|
151
151
|
</div>
|
|
152
152
|
|
|
153
153
|
<Button type="submit" disabled={submitting || !token} className="mt-1 w-full rounded-lg">
|
|
@@ -3,6 +3,8 @@ import { useCallback, useMemo, useState } from 'react'
|
|
|
3
3
|
import Link from 'next/link'
|
|
4
4
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
5
5
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
6
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
7
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
6
8
|
import { Label } from '@open-mercato/ui/primitives/label'
|
|
7
9
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
8
10
|
import { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'
|
|
@@ -122,12 +124,12 @@ export default function PortalSignupPage({ params }: Props) {
|
|
|
122
124
|
|
|
123
125
|
<div className="flex flex-col gap-1.5">
|
|
124
126
|
<Label htmlFor="signup-email" className="text-overline font-semibold uppercase tracking-wider text-muted-foreground/70">{t('portal.signup.email', 'Email')}</Label>
|
|
125
|
-
<
|
|
127
|
+
<EmailInput id="signup-email" required placeholder={t('portal.signup.email.placeholder', 'you@example.com')} value={email} onChange={(e) => setEmail(e.target.value)} disabled={submitting} className="rounded-lg" />
|
|
126
128
|
</div>
|
|
127
129
|
|
|
128
130
|
<div className="flex flex-col gap-1.5">
|
|
129
131
|
<Label htmlFor="signup-password" className="text-overline font-semibold uppercase tracking-wider text-muted-foreground/70">{t('portal.signup.password', 'Password')}</Label>
|
|
130
|
-
<
|
|
132
|
+
<PasswordInput id="signup-password" autoComplete="new-password" required placeholder={t('portal.signup.password.placeholder', '\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022')} value={password} onChange={(e) => setPassword(e.target.value)} disabled={submitting} className="rounded-lg" />
|
|
131
133
|
</div>
|
|
132
134
|
|
|
133
135
|
<Button type="submit" disabled={submitting} className="mt-1 w-full rounded-lg">
|
|
@@ -20,6 +20,7 @@ import { Button } from '@open-mercato/ui/primitives/button'
|
|
|
20
20
|
import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
21
21
|
import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
22
22
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
23
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
23
24
|
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@open-mercato/ui/primitives/dialog'
|
|
24
25
|
import { ArrowRightLeft, Building2, CreditCard, Mail, Pencil, Plus, Send, Store, Truck, UserRound, Wand2, X } from 'lucide-react'
|
|
25
26
|
import { FormHeader, type ActionItem } from '@open-mercato/ui/backend/forms'
|
|
@@ -663,8 +664,7 @@ function CustomerInlineEditor({
|
|
|
663
664
|
<label className="text-sm font-medium text-foreground">
|
|
664
665
|
{t('customers.people.detail.highlights.primaryEmail', 'Primary email')}
|
|
665
666
|
</label>
|
|
666
|
-
<
|
|
667
|
-
type="email"
|
|
667
|
+
<EmailInput
|
|
668
668
|
value={snapshotDraft.primaryEmail}
|
|
669
669
|
onChange={(event) => setSnapshotDraft((prev) => ({ ...prev, primaryEmail: event.target.value }))}
|
|
670
670
|
placeholder={t('customers.people.form.primaryEmailPlaceholder', 'name@example.com')}
|
|
@@ -1139,15 +1139,13 @@ function ContactEmailInlineEditor({
|
|
|
1139
1139
|
}
|
|
1140
1140
|
}}
|
|
1141
1141
|
>
|
|
1142
|
-
<
|
|
1143
|
-
leftIcon={<Mail />}
|
|
1142
|
+
<EmailInput
|
|
1144
1143
|
value={draft}
|
|
1145
1144
|
onChange={(event) => {
|
|
1146
1145
|
if (error) setError(null)
|
|
1147
1146
|
setDraft(event.target.value)
|
|
1148
1147
|
}}
|
|
1149
1148
|
placeholder={placeholder}
|
|
1150
|
-
type="email"
|
|
1151
1149
|
autoFocus
|
|
1152
1150
|
spellCheck={false}
|
|
1153
1151
|
/>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
2
|
+
import { PasswordInput } from '@open-mercato/ui/primitives/password-input'
|
|
2
3
|
import {
|
|
3
4
|
Select,
|
|
4
5
|
SelectContent,
|
|
@@ -70,9 +71,8 @@ export function renderProviderFieldInput(opts: {
|
|
|
70
71
|
)
|
|
71
72
|
case 'secret':
|
|
72
73
|
return (
|
|
73
|
-
<
|
|
74
|
+
<PasswordInput
|
|
74
75
|
{...common}
|
|
75
|
-
type="password"
|
|
76
76
|
value={typeof value === 'string' ? value : ''}
|
|
77
77
|
onChange={(evt) => onChange(evt.target.value)}
|
|
78
78
|
placeholder={field.placeholder}
|
|
@@ -4,6 +4,7 @@ import * as React from 'react'
|
|
|
4
4
|
import { CrudForm, type CrudCustomFieldRenderProps, type CrudField, type CrudFormGroup } from '@open-mercato/ui/backend/CrudForm'
|
|
5
5
|
import { LookupSelect, type LookupSelectItem } from '@open-mercato/ui/backend/inputs'
|
|
6
6
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
7
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
7
8
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
8
9
|
import {
|
|
9
10
|
Select,
|
|
@@ -1222,9 +1223,7 @@ export function SalesDocumentForm({ onCreated, isSubmitting = false, initialKind
|
|
|
1222
1223
|
/>
|
|
1223
1224
|
</div>
|
|
1224
1225
|
<div className="space-y-2">
|
|
1225
|
-
<
|
|
1226
|
-
type="email"
|
|
1227
|
-
leftIcon={<Mail />}
|
|
1226
|
+
<EmailInput
|
|
1228
1227
|
value={emailValue}
|
|
1229
1228
|
onChange={(event) => setValue('customerEmail', event.target.value)}
|
|
1230
1229
|
placeholder={t('sales.documents.form.email.placeholder', 'Email used for the document')}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
5
5
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
6
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
6
7
|
import {
|
|
7
8
|
Select,
|
|
8
9
|
SelectContent,
|
|
@@ -131,8 +132,7 @@ export const ConfigureStep = (props: ConfigureStepProps) => {
|
|
|
131
132
|
<label className="text-xs font-medium text-muted-foreground">
|
|
132
133
|
{t('shipping_carriers.create.field.email', 'Email')}
|
|
133
134
|
</label>
|
|
134
|
-
<
|
|
135
|
-
type="email"
|
|
135
|
+
<EmailInput
|
|
136
136
|
size="sm"
|
|
137
137
|
value={senderContact.email}
|
|
138
138
|
onChange={(e) => onSenderContactChange({ ...senderContact, email: e.target.value })}
|
|
@@ -177,8 +177,7 @@ export const ConfigureStep = (props: ConfigureStepProps) => {
|
|
|
177
177
|
<label className="text-xs font-medium text-muted-foreground">
|
|
178
178
|
{t('shipping_carriers.create.field.email', 'Email')}
|
|
179
179
|
</label>
|
|
180
|
-
<
|
|
181
|
-
type="email"
|
|
180
|
+
<EmailInput
|
|
182
181
|
size="sm"
|
|
183
182
|
value={receiverContact.email}
|
|
184
183
|
onChange={(e) => onReceiverContactChange({ ...receiverContact, email: e.target.value })}
|
|
@@ -6,6 +6,7 @@ import { useRouter } from 'next/navigation'
|
|
|
6
6
|
import { Page, PageBody } from '@open-mercato/ui/backend/Page'
|
|
7
7
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
8
8
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
9
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
9
10
|
import { FormHeader } from '@open-mercato/ui/backend/forms'
|
|
10
11
|
import {
|
|
11
12
|
Select,
|
|
@@ -182,8 +183,7 @@ export default function UserTaskDetailPage({ params }: { params: { id: string }
|
|
|
182
183
|
{fieldDescription && (
|
|
183
184
|
<p className="text-xs text-muted-foreground">{fieldDescription}</p>
|
|
184
185
|
)}
|
|
185
|
-
<
|
|
186
|
-
type="email"
|
|
186
|
+
<EmailInput
|
|
187
187
|
id={fieldName}
|
|
188
188
|
value={fieldValue(fieldName)}
|
|
189
189
|
onChange={(e) => handleFieldChange(fieldName, e.target.value)}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useState, useEffect, useCallback } from 'react'
|
|
4
4
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
5
5
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
6
|
+
import { EmailInput } from '@open-mercato/ui/primitives/email-input'
|
|
6
7
|
import {
|
|
7
8
|
Select,
|
|
8
9
|
SelectContent,
|
|
@@ -766,8 +767,7 @@ export default function CheckoutDemoPage() {
|
|
|
766
767
|
{fieldDescription && (
|
|
767
768
|
<p className="text-xs text-gray-500 mb-1">{fieldDescription}</p>
|
|
768
769
|
)}
|
|
769
|
-
<
|
|
770
|
-
type="email"
|
|
770
|
+
<EmailInput
|
|
771
771
|
id={fieldName}
|
|
772
772
|
value={formData[fieldName] || ''}
|
|
773
773
|
onChange={(e) => handleFieldChange(fieldName, e.target.value)}
|