@byline/admin 6.4.0 → 6.6.0

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.
@@ -138,6 +138,8 @@ function ChangeAccountPassword({ account, onClose, onSuccess }) {
138
138
  error: field.state.meta.errors.length > 0,
139
139
  errorText: firstError(field.state.meta.errors),
140
140
  autoComplete: "current-password",
141
+ showPasswordLabel: t('common.actions.showPassword'),
142
+ hidePasswordLabel: t('common.actions.hidePassword'),
141
143
  required: true
142
144
  })
143
145
  }),
@@ -153,6 +155,8 @@ function ChangeAccountPassword({ account, onClose, onSuccess }) {
153
155
  error: field.state.meta.errors.length > 0,
154
156
  errorText: translateValidationError(t, firstError(field.state.meta.errors)),
155
157
  autoComplete: "new-password",
158
+ showPasswordLabel: t('common.actions.showPassword'),
159
+ hidePasswordLabel: t('common.actions.hidePassword'),
156
160
  required: true
157
161
  })
158
162
  }),
@@ -168,6 +172,8 @@ function ChangeAccountPassword({ account, onClose, onSuccess }) {
168
172
  error: field.state.meta.errors.length > 0,
169
173
  errorText: firstError(field.state.meta.errors),
170
174
  autoComplete: "new-password",
175
+ showPasswordLabel: t('common.actions.showPassword'),
176
+ hidePasswordLabel: t('common.actions.hidePassword'),
171
177
  required: true
172
178
  })
173
179
  }),
@@ -4,7 +4,7 @@ import { useMemo, useState } from "react";
4
4
  import { revalidateLogic, useForm } from "@tanstack/react-form-start";
5
5
  import { passwordSchema } from "@byline/core/validation";
6
6
  import { useTranslation } from "@byline/i18n/react";
7
- import { Alert, Button, Checkbox, Input, LoaderEllipsis } from "@byline/ui/react";
7
+ import { Alert, Button, Checkbox, Input, InputPassword, LoaderEllipsis } from "@byline/ui/react";
8
8
  import clsx from "clsx";
9
9
  import { z } from "zod";
10
10
  import { translateValidationError } from "../../../lib/translate-validation-error.js";
@@ -180,11 +180,10 @@ function CreateAdminUser({ onClose, onSuccess }) {
180
180
  }),
181
181
  /*#__PURE__*/ jsx(form.Field, {
182
182
  name: "password",
183
- children: (field)=>/*#__PURE__*/ jsx(Input, {
183
+ children: (field)=>/*#__PURE__*/ jsx(InputPassword, {
184
184
  label: t('adminUsers.create.fields.password'),
185
185
  id: "new-password",
186
186
  name: field.name,
187
- type: "password",
188
187
  value: field.state.value,
189
188
  onBlur: field.handleBlur,
190
189
  onChange: (e)=>field.handleChange(e.currentTarget.value),
@@ -192,6 +191,8 @@ function CreateAdminUser({ onClose, onSuccess }) {
192
191
  errorText: translateValidationError(t, firstError(field.state.meta.errors)),
193
192
  helpText: t('adminUsers.create.fields.passwordHelp'),
194
193
  autoComplete: "new-password",
194
+ showPasswordLabel: t('common.actions.showPassword'),
195
+ hidePasswordLabel: t('common.actions.hidePassword'),
195
196
  required: true
196
197
  })
197
198
  }),
@@ -103,6 +103,8 @@ function SetPassword({ user, onClose, onSuccess }) {
103
103
  error: field.state.meta.errors.length > 0,
104
104
  errorText: translateValidationError(t, firstError(field.state.meta.errors)),
105
105
  autoComplete: "new-password",
106
+ showPasswordLabel: t('common.actions.showPassword'),
107
+ hidePasswordLabel: t('common.actions.hidePassword'),
106
108
  required: true
107
109
  })
108
110
  }),
@@ -118,6 +120,8 @@ function SetPassword({ user, onClose, onSuccess }) {
118
120
  error: field.state.meta.errors.length > 0,
119
121
  errorText: firstError(field.state.meta.errors),
120
122
  autoComplete: "new-password",
123
+ showPasswordLabel: t('common.actions.showPassword'),
124
+ hidePasswordLabel: t('common.actions.hidePassword'),
121
125
  required: true
122
126
  })
123
127
  }),
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import { getAdminConfig } from "@byline/core";
5
5
  import { useTranslation } from "@byline/i18n/react";
6
- import { Alert, Button, Card, Input, LoaderEllipsis } from "@byline/ui/react";
6
+ import { Alert, Button, Card, Input, InputPassword, LoaderEllipsis } from "@byline/ui/react";
7
7
  import clsx from "clsx";
8
8
  import { useBylineAdminServices } from "../../../services/admin-services-context.js";
9
9
  import { normalizeRootRelativeRedirect, resolveSignInFormRedirect } from "../safe-redirect.js";
@@ -78,12 +78,13 @@ function SignInForm({ redirectTo, homeUrl }) {
78
78
  onChange: (event)=>setEmail(event.currentTarget.value),
79
79
  disabled: pending
80
80
  }),
81
- /*#__PURE__*/ jsx(Input, {
81
+ /*#__PURE__*/ jsx(InputPassword, {
82
82
  label: t('common.fields.password'),
83
83
  id: "password",
84
84
  name: "password",
85
- type: "password",
86
85
  autoComplete: "current-password",
86
+ showPasswordLabel: t('common.actions.showPassword'),
87
+ hidePasswordLabel: t('common.actions.hidePassword'),
87
88
  required: true,
88
89
  value: password,
89
90
  onChange: (event)=>setPassword(event.currentTarget.value),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@byline/admin",
3
3
  "private": false,
4
4
  "license": "MPL-2.0",
5
- "version": "6.4.0",
5
+ "version": "6.6.0",
6
6
  "engines": {
7
7
  "node": ">=20.9.0"
8
8
  },
@@ -183,26 +183,26 @@
183
183
  "react-diff-viewer-continued": "^4.4.0",
184
184
  "uuid": "^14.0.2",
185
185
  "zod": "^4.6.5",
186
- "@byline/analytics": "6.4.0",
187
- "@byline/analytics-agent": "6.4.0",
188
- "@byline/auth": "6.4.0",
189
- "@byline/core": "6.4.0",
190
- "@byline/i18n": "6.4.0",
191
- "@byline/ui": "6.4.0"
186
+ "@byline/analytics": "6.6.0",
187
+ "@byline/i18n": "6.6.0",
188
+ "@byline/core": "6.6.0",
189
+ "@byline/auth": "6.6.0",
190
+ "@byline/analytics-agent": "6.6.0",
191
+ "@byline/ui": "6.6.0"
192
192
  },
193
193
  "peerDependencies": {
194
194
  "react": "^19.0.0",
195
195
  "react-dom": "^19.0.0"
196
196
  },
197
197
  "devDependencies": {
198
- "@biomejs/biome": "2.5.13",
198
+ "@biomejs/biome": "2.5.14",
199
199
  "@rsbuild/plugin-react": "^2.1.0",
200
200
  "@rslib/core": "^1.0.1",
201
- "@types/node": "^26.6.1",
201
+ "@types/node": "^26.6.2",
202
202
  "@types/react": "19.3.0",
203
203
  "@types/react-dom": "19.3.0",
204
204
  "@vitejs/plugin-react": "^6.1.1",
205
- "jsdom": "^30.0.1",
205
+ "jsdom": "^30.1.0",
206
206
  "react": "^19.3.0",
207
207
  "react-dom": "^19.3.0",
208
208
  "typescript": "^7.0.2",
@@ -167,6 +167,8 @@ export function ChangeAccountPassword({ account, onClose, onSuccess }: ChangePas
167
167
  error={field.state.meta.errors.length > 0}
168
168
  errorText={firstError(field.state.meta.errors)}
169
169
  autoComplete="current-password"
170
+ showPasswordLabel={t('common.actions.showPassword')}
171
+ hidePasswordLabel={t('common.actions.hidePassword')}
170
172
  required
171
173
  />
172
174
  )}
@@ -184,6 +186,8 @@ export function ChangeAccountPassword({ account, onClose, onSuccess }: ChangePas
184
186
  error={field.state.meta.errors.length > 0}
185
187
  errorText={translateValidationError(t, firstError(field.state.meta.errors))}
186
188
  autoComplete="new-password"
189
+ showPasswordLabel={t('common.actions.showPassword')}
190
+ hidePasswordLabel={t('common.actions.hidePassword')}
187
191
  required
188
192
  />
189
193
  )}
@@ -201,6 +205,8 @@ export function ChangeAccountPassword({ account, onClose, onSuccess }: ChangePas
201
205
  error={field.state.meta.errors.length > 0}
202
206
  errorText={firstError(field.state.meta.errors)}
203
207
  autoComplete="new-password"
208
+ showPasswordLabel={t('common.actions.showPassword')}
209
+ hidePasswordLabel={t('common.actions.hidePassword')}
204
210
  required
205
211
  />
206
212
  )}
@@ -28,7 +28,7 @@ import { revalidateLogic, useForm } from '@tanstack/react-form-start'
28
28
 
29
29
  import { passwordSchema } from '@byline/core/validation'
30
30
  import { useTranslation } from '@byline/i18n/react'
31
- import { Alert, Button, Checkbox, Input, LoaderEllipsis } from '@byline/ui/react'
31
+ import { Alert, Button, Checkbox, Input, InputPassword, LoaderEllipsis } from '@byline/ui/react'
32
32
  import cx from 'clsx'
33
33
  import { z } from 'zod'
34
34
 
@@ -237,11 +237,10 @@ export function CreateAdminUser({ onClose, onSuccess }: CreateAdminUserProps) {
237
237
 
238
238
  <form.Field name="password">
239
239
  {(field) => (
240
- <Input
240
+ <InputPassword
241
241
  label={t('adminUsers.create.fields.password')}
242
242
  id="new-password"
243
243
  name={field.name}
244
- type="password"
245
244
  value={field.state.value}
246
245
  onBlur={field.handleBlur}
247
246
  onChange={(e) => field.handleChange(e.currentTarget.value)}
@@ -249,6 +248,8 @@ export function CreateAdminUser({ onClose, onSuccess }: CreateAdminUserProps) {
249
248
  errorText={translateValidationError(t, firstError(field.state.meta.errors))}
250
249
  helpText={t('adminUsers.create.fields.passwordHelp')}
251
250
  autoComplete="new-password"
251
+ showPasswordLabel={t('common.actions.showPassword')}
252
+ hidePasswordLabel={t('common.actions.hidePassword')}
252
253
  required
253
254
  />
254
255
  )}
@@ -131,6 +131,8 @@ export function SetPassword({ user, onClose, onSuccess }: SetPasswordProps) {
131
131
  error={field.state.meta.errors.length > 0}
132
132
  errorText={translateValidationError(t, firstError(field.state.meta.errors))}
133
133
  autoComplete="new-password"
134
+ showPasswordLabel={t('common.actions.showPassword')}
135
+ hidePasswordLabel={t('common.actions.hidePassword')}
134
136
  required
135
137
  />
136
138
  )}
@@ -148,6 +150,8 @@ export function SetPassword({ user, onClose, onSuccess }: SetPasswordProps) {
148
150
  error={field.state.meta.errors.length > 0}
149
151
  errorText={firstError(field.state.meta.errors)}
150
152
  autoComplete="new-password"
153
+ showPasswordLabel={t('common.actions.showPassword')}
154
+ hidePasswordLabel={t('common.actions.hidePassword')}
151
155
  required
152
156
  />
153
157
  )}
@@ -27,7 +27,7 @@ import { type FormEvent, useState } from 'react'
27
27
 
28
28
  import { getAdminConfig } from '@byline/core'
29
29
  import { useTranslation } from '@byline/i18n/react'
30
- import { Alert, Button, Card, Input, LoaderEllipsis } from '@byline/ui/react'
30
+ import { Alert, Button, Card, Input, InputPassword, LoaderEllipsis } from '@byline/ui/react'
31
31
  import cx from 'clsx'
32
32
 
33
33
  import { useBylineAdminServices } from '../../../services/admin-services-context.js'
@@ -111,12 +111,13 @@ export function SignInForm({ redirectTo, homeUrl }: SignInFormProps) {
111
111
  onChange={(event) => setEmail(event.currentTarget.value)}
112
112
  disabled={pending}
113
113
  />
114
- <Input
114
+ <InputPassword
115
115
  label={t('common.fields.password')}
116
116
  id="password"
117
117
  name="password"
118
- type="password"
119
118
  autoComplete="current-password"
119
+ showPasswordLabel={t('common.actions.showPassword')}
120
+ hidePasswordLabel={t('common.actions.hidePassword')}
120
121
  required
121
122
  value={password}
122
123
  onChange={(event) => setPassword(event.currentTarget.value)}