@structured-id/ui-core 1.0.1 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@structured-id/ui-core",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -102,6 +102,7 @@
102
102
  </q-input>
103
103
 
104
104
  <q-input
105
+ v-if="showConfirmPassword"
105
106
  ref="confirmRef"
106
107
  v-model="confirmPassword"
107
108
  :type="showPassword ? 'text' : 'password'"
@@ -128,7 +129,7 @@
128
129
  :disable="
129
130
  !identifier ||
130
131
  !password ||
131
- !confirmPassword ||
132
+ (showConfirmPassword && !confirmPassword) ||
132
133
  (inviteRequired && !inviteCode)
133
134
  "
134
135
  />
@@ -212,6 +213,8 @@ const props = withDefaults(
212
213
  ) => Promise<void>;
213
214
  /** Min password length (default 12 — NIST SP 800-63B 4th draft baseline). */
214
215
  passwordMinLength?: number;
216
+ /** Show confirm-password field with match validation. Default true. */
217
+ showConfirmPassword?: boolean;
215
218
  }>(),
216
219
  {
217
220
  title: "Create account",
@@ -236,6 +239,7 @@ const props = withDefaults(
236
239
  loginUrl: undefined,
237
240
  inviteRequired: false,
238
241
  initialInviteCode: "",
242
+ showConfirmPassword: true,
239
243
  },
240
244
  );
241
245
 
@@ -285,7 +289,7 @@ const showInviteField = computed(
285
289
  );
286
290
 
287
291
  async function onSubmit() {
288
- if (password.value !== confirmPassword.value) {
292
+ if (props.showConfirmPassword && password.value !== confirmPassword.value) {
289
293
  error.value = props.passwordsMismatchText;
290
294
  return;
291
295
  }