easykar-backoffice-ui 0.0.5 → 0.0.6

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/index.cjs CHANGED
@@ -3268,14 +3268,17 @@ var EasyOtp = React34.forwardRef(
3268
3268
  }
3269
3269
  );
3270
3270
  EasyOtp.displayName = "EasyOtp";
3271
- var formatPhoneNumber = (phone) => {
3272
- if (phone.length >= 10) {
3273
- const start = phone.slice(1, 4);
3274
- const end = phone.slice(-2);
3275
- return `+90 (${start}) *** ** ${end}`;
3271
+ function formatPhoneNumber(phone) {
3272
+ if (!phone) return phone;
3273
+ const cleaned = phone.replace(/\D/g, "");
3274
+ const phoneWithoutCountryCode = cleaned.startsWith("90") ? cleaned.slice(2) : cleaned;
3275
+ if (phoneWithoutCountryCode.length < 10) {
3276
+ return phone.startsWith("+") ? phone : `+90${phone}`;
3276
3277
  }
3277
- return phone;
3278
- };
3278
+ const firstThreeDigits = phoneWithoutCountryCode.slice(0, 3);
3279
+ const lastTwoDigits = phoneWithoutCountryCode.slice(-2);
3280
+ return `+90 (${firstThreeDigits}) *** ** ${lastTwoDigits}`;
3281
+ }
3279
3282
  var formatEmail = (emailAddress) => {
3280
3283
  const [localPart, domain] = emailAddress.split("@");
3281
3284
  if (localPart && domain) {