From 95a0d0bdeca03a6ef4bd564cdb8885c4fb7e74c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 12:51:33 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=8B=20New=20version=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/phone-validation-pre-chat.md | 12 ------------ CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 .changeset/phone-validation-pre-chat.md diff --git a/.changeset/phone-validation-pre-chat.md b/.changeset/phone-validation-pre-chat.md deleted file mode 100644 index 86558a3..0000000 --- a/.changeset/phone-validation-pre-chat.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@smooai/chat-widget': minor ---- - -Pre-chat phone field now formats and validates as you type (libphonenumber-js, US default region). - -- **As-you-type formatting** via `AsYouType('US')` — appended digits are formatted live (e.g. `(213) 373-4253`). The formatter only rewrites when the caret is at the end and never while deleting, so backspacing the formatting characters works naturally. -- **Inline validity hint** driven by `isValidPhoneNumber(value, 'US')` — a subtle, themed valid/invalid state on the field plus a small hint span. An empty field stays neutral (the field is optional unless `requirePhone`). -- **On submit**: when `requirePhone` is set and the number is invalid, submission is blocked and the hint is shown; when optional, submission proceeds. A valid number is sent as canonical **E.164** (`parsePhoneNumber(value, 'US').number`), falling back to the raw value when it does not parse (the backend re-parses and normalizes/nulls authoritatively — SMOODEV-2153). -- Autofill is preserved: `type="tel"`, `autocomplete="tel"`, and the implicit `