@levo-so/studio 0.3.2 → 0.3.3

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.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "./LoginForm-CLUpD3qG.js";
2
+ import { t as e } from "./LoginForm-DhGQD4uI.js";
3
3
  import { t } from "./card-Cb4m0p4i.js";
4
4
  import { Suspense as n, lazy as r, useState as i } from "react";
5
5
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
@@ -10,8 +10,8 @@ import { Popover as g } from "radix-ui";
10
10
  import * as _ from "yup";
11
11
  import { useFormik as v } from "formik";
12
12
  import { parsePhoneNumberWithError as y } from "libphonenumber-js";
13
- import b from "react-otp-input";
14
- import { FlagImage as x, defaultCountries as S, parseCountry as C, usePhoneInput as w } from "react-international-phone";
13
+ import { FlagImage as b, defaultCountries as x, parseCountry as S, usePhoneInput as C } from "react-international-phone";
14
+ import w from "react-otp-input";
15
15
  //#region src/schemas/authSchemas.ts
16
16
  var T = _.string().required("Email is required").email("Please enter a valid email address").trim(), E = _.string().required("Please enter the verification code").length(4, "Verification code must be 4 digits").matches(/^\d+$/, "Verification code must contain only numbers"), D = _.string().required("Phone number is required").test("phone", "The phone number has incorrect format", (e) => {
17
17
  if (!e) return !1;
@@ -333,7 +333,7 @@ var T = _.string().required("Email is required").email("Please enter a valid ema
333
333
  }),
334
334
  /* @__PURE__ */ f("div", {
335
335
  className: H.inputGroup,
336
- children: /* @__PURE__ */ f(b, {
336
+ children: /* @__PURE__ */ f(w, {
337
337
  value: n,
338
338
  onChange: i,
339
339
  numInputs: 4,
@@ -460,17 +460,17 @@ var T = _.string().required("Email is required").email("Please enter a valid ema
460
460
  countryName: "_countryName_1odi8_118",
461
461
  dialCode: "_dialCode_1odi8_125"
462
462
  }, K = ({ phone: e, setPhone: t, otpSent: n, handleReset: r }) => {
463
- let [i, a] = u(!1), [o, s] = u(""), c = l(null), d = l(null), { inputValue: m, handlePhoneValueChange: _, inputRef: v, country: y, setCountry: b } = w({
463
+ let [i, a] = u(!1), [o, s] = u(""), c = l(null), d = l(null), { inputValue: m, handlePhoneValueChange: _, inputRef: v, country: y, setCountry: w } = C({
464
464
  defaultCountry: "in",
465
465
  value: e,
466
- countries: S,
466
+ countries: x,
467
467
  onChange: (e) => {
468
468
  t(e.phone);
469
469
  },
470
470
  disableDialCodePrefill: !0,
471
471
  forceDialCode: !0
472
- }), T = S.filter((e) => {
473
- let t = C(e);
472
+ }), T = x.filter((e) => {
473
+ let t = S(e);
474
474
  return t.name.toLowerCase().includes(o.toLowerCase()) || t.dialCode.includes(o);
475
475
  });
476
476
  return /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
@@ -490,7 +490,7 @@ var T = _.string().required("Email is required").email("Please enter a valid ema
490
490
  type: "button",
491
491
  className: G.selector,
492
492
  disabled: n,
493
- children: [/* @__PURE__ */ f(x, {
493
+ children: [/* @__PURE__ */ f(b, {
494
494
  iso2: y.iso2,
495
495
  style: {
496
496
  width: "24px",
@@ -536,13 +536,13 @@ var T = _.string().required("Email is required").email("Please enter a valid ema
536
536
  flex: 1
537
537
  },
538
538
  children: [T.map((e) => {
539
- let t = C(e), n = t.iso2 === y.iso2;
539
+ let t = S(e), n = t.iso2 === y.iso2;
540
540
  return /* @__PURE__ */ p("button", {
541
541
  type: "button",
542
542
  className: G.countryItem,
543
543
  "data-selected": n,
544
544
  onClick: () => {
545
- b(t.iso2), a(!1), s("");
545
+ w(t.iso2), a(!1), s("");
546
546
  },
547
547
  onKeyDown: (e) => {
548
548
  if (e.key === "ArrowDown") e.preventDefault(), e.currentTarget.nextElementSibling?.focus();
@@ -553,7 +553,7 @@ var T = _.string().required("Email is required").email("Please enter a valid ema
553
553
  }
554
554
  },
555
555
  children: [
556
- /* @__PURE__ */ f(x, {
556
+ /* @__PURE__ */ f(b, {
557
557
  iso2: t.iso2,
558
558
  className: G.flag
559
559
  }),
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { n as e } from "./AuthProvider-CFQqiIf1.js";
3
- import { n as t } from "./ModalManager-7Nhr8gTs.js";
3
+ import { n as t } from "./ModalManager-BW3Dol7F.js";
4
4
  import { a as n, n as r, o as i, r as a, t as o } from "./dialog-RrTP-MGm.js";
5
- import { t as s } from "./LoginForm-CLUpD3qG.js";
5
+ import { t as s } from "./LoginForm-DhGQD4uI.js";
6
6
  import { useEffect as c } from "react";
7
7
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
8
  var d = {
@@ -2,7 +2,7 @@
2
2
  import { Suspense as e, createContext as t, lazy as n, useCallback as r, useContext as i, useState as a } from "react";
3
3
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
4
  //#region src/context/ModalManager.tsx
5
- var c = n(() => import("./LoginModal-D9jhZlJr.js")), l = t({
5
+ var c = n(() => import("./LoginModal-Ui2GnSje.js")), l = t({
6
6
  availableModals: ["login"],
7
7
  openModals: { key: null },
8
8
  openModal: () => ({}),
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { t as e } from "./Button-H07AsyeH.js";
2
+ import { t as e } from "./Button-Ho7QJuCT.js";
3
3
  import { n as t } from "./AuthProvider-CFQqiIf1.js";
4
4
  import { t as n } from "./cn-BL52QQS4.js";
5
5
  import { n as r, t as i } from "./StripePaymentModal-Cw-AlxTS.js";
6
- import { BillingStep as a } from "./BillingStep-D3OVeo3H.js";
6
+ import { BillingStep as a } from "./BillingStep-DhK0Mkjr.js";
7
7
  import { errorHandler as o, useLevo as s } from "@levo-so/react";
8
8
  import { useEffect as c, useRef as l, useState as u } from "react";
9
9
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
package/index.d.ts CHANGED
@@ -49,28 +49,6 @@ collapsible?: boolean;
49
49
 
50
50
  export declare const AccordionTrigger: WithBlockPropsComponent<BaseAccordionTriggerProps>;
51
51
 
52
- /**
53
- * Optional attendee fields. Each is hidden unless its `key` is listed in the
54
- * `additionalFields` prop, so every event can collect exactly what it needs.
55
- * Rendered in this order regardless of the order keys are passed in.
56
- */
57
- declare const ADDITIONAL_FIELDS: readonly [{
58
- readonly key: "designation";
59
- readonly label: "Designation";
60
- readonly placeholder: "Product Manager";
61
- readonly type: "text";
62
- }, {
63
- readonly key: "mobile";
64
- readonly label: "Phone Number";
65
- readonly placeholder: "+91 98765 43210";
66
- readonly type: "tel";
67
- }, {
68
- readonly key: "organization";
69
- readonly label: "Company Name";
70
- readonly placeholder: "Acme Corporation";
71
- readonly type: "text";
72
- }];
73
-
74
52
  /**
75
53
  * Alternate method values for quick checking
76
54
  */
@@ -1011,7 +989,7 @@ declare type HTMLImageProps_2 = Omit<React.DetailedHTMLProps<React.ImgHTMLAttrib
1011
989
  declare type HTMLVideoProps = Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "src" | keyof BaseElementProps>;
1012
990
 
1013
991
  /** Keys accepted by the `additionalFields` prop. */
1014
- declare type IAdditionalFieldKey = (typeof ADDITIONAL_FIELDS)[number]["key"];
992
+ declare type IAdditionalFieldKey = "designation" | "mobile" | "organization";
1015
993
 
1016
994
  declare interface IAuthActions {
1017
995
  setAuthState: (updates: Partial<IAuthState>) => void;
@@ -2849,13 +2827,18 @@ export declare const processTheme: ({ pageTheme, blocks, pageID, device, }: {
2849
2827
  html: string;
2850
2828
  };
2851
2829
 
2852
- export declare const RegisterModal: ({ eventID, title, external, buttonText, additionalFields, }: {
2830
+ export declare const RegisterModal: ({ eventID, title, external, buttonText, additionalFields, startsAt, endsAt, eventUrl, }: {
2853
2831
  eventID: string;
2854
2832
  title?: string;
2855
2833
  external?: string;
2856
2834
  buttonText?: string;
2857
2835
  /** Optional attendee fields to collect ("designation" | "mobile" | "organization"). Hidden unless listed. */
2858
2836
  additionalFields?: IAdditionalFieldKey[];
2837
+ /** Event start/end, rendered in the viewer's own timezone and used for the calendar entry. */
2838
+ startsAt?: string | Date | null;
2839
+ endsAt?: string | Date | null;
2840
+ /** Joining link, attached to the calendar entry so it is one tap away at start time. */
2841
+ eventUrl?: string | null;
2859
2842
  }) => JSX.Element;
2860
2843
 
2861
2844
  /**