easykar-backoffice-ui 0.0.4 → 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
@@ -1583,7 +1583,7 @@ var EasyDialog = ({
1583
1583
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ShadcnDialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ShadcnDialogContent, { className: cn("sm:max-w-lg rounded-xl", className), children: [
1584
1584
  title && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ShadcnDialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ShadcnDialogTitle, { children: title }) }),
1585
1585
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("py-4", !title && "pt-0", contentClassName), children: content }),
1586
- (showCancel || showOk) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ShadcnDialogFooter, { className: "flex flex-col gap-4 w-full", children: [
1586
+ (showCancel || showOk) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ShadcnDialogFooter, { className: "flex flex-row gap-4 w-full", children: [
1587
1587
  showCancel && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1588
1588
  EasyButton,
1589
1589
  {
@@ -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) {