@hook-sdk/template 0.21.0 → 0.22.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/dist/index.js CHANGED
@@ -299,7 +299,7 @@ function usePaywallState() {
299
299
  const defaultMethod = (configDefault && methods.includes(configDefault) ? configDefault : null) ?? methods[0] ?? declaredMethods[0] ?? "card";
300
300
  const [selectedMethodRaw, setSelectedMethod] = useState(defaultMethod);
301
301
  const selectedMethod = methods.includes(selectedMethodRaw) ? selectedMethodRaw : methods[0] ?? selectedMethodRaw;
302
- const initialCycle = isFree ? "MONTHLY" : paywall.cycles[0] ?? "MONTHLY";
302
+ const initialCycle = isFree ? "MONTHLY" : paywall.cycles.includes("YEARLY") ? "YEARLY" : paywall.cycles[0] ?? "MONTHLY";
303
303
  const [cycle, setCycle] = useState(initialCycle);
304
304
  const cpfRequired = !isFree && paywall.requiresCpf;
305
305
  const [cpf, setCpf] = useState("");
@@ -3364,12 +3364,12 @@ function PaywallCyclePicker({
3364
3364
  role: "radio",
3365
3365
  "aria-checked": active,
3366
3366
  onClick: () => onSelect(c),
3367
- className: [cardClassName, active ? cardSelectedClassName : ""].filter(Boolean).join(" "),
3367
+ className: ["flex flex-col items-center gap-0.5", cardClassName, active ? cardSelectedClassName : ""].filter(Boolean).join(" "),
3368
3368
  children: [
3369
- /* @__PURE__ */ jsx32("strong", { children: formatBRL(mainCents) }),
3370
- /* @__PURE__ */ jsx32("span", { children: suffix }),
3371
- /* @__PURE__ */ jsx32("span", { children: label }),
3372
- anchorCents != null && anchorCents > mainCents ? /* @__PURE__ */ jsx32("span", { className: anchorClassName, children: /* @__PURE__ */ jsx32("s", { children: formatBRL(anchorCents) }) }) : null
3369
+ /* @__PURE__ */ jsx32("span", { className: "font-bold text-base leading-tight", children: formatBRL(mainCents) }),
3370
+ /* @__PURE__ */ jsx32("span", { className: "text-xs opacity-70 leading-tight", children: suffix }),
3371
+ /* @__PURE__ */ jsx32("span", { className: "text-xs opacity-60 leading-tight", children: label }),
3372
+ anchorCents != null && anchorCents > mainCents ? /* @__PURE__ */ jsx32("span", { className: anchorClassName ?? "text-xs opacity-50", children: /* @__PURE__ */ jsx32("s", { children: formatBRL(anchorCents) }) }) : null
3373
3373
  ]
3374
3374
  },
3375
3375
  c
@@ -3542,7 +3542,7 @@ function Paywall({
3542
3542
  switchHint,
3543
3543
  trustLine: copy.trustLine,
3544
3544
  onClick: handleCta,
3545
- disabled: !s.initialLoadComplete,
3545
+ disabled: s.submitting,
3546
3546
  loading: s.submitting,
3547
3547
  buttonClassName: ctaTheme,
3548
3548
  switchHintClassName: themeClasses.switchHint,