@arbidocs/blocks 0.5.130 → 0.5.132

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.
Files changed (105) hide show
  1. package/dist/{DocumentReviewCard-M53XFLI2.cjs → DocumentReviewCard-2VI5OOLE.cjs} +3 -3
  2. package/dist/{DocumentReviewCard-M53XFLI2.cjs.map → DocumentReviewCard-2VI5OOLE.cjs.map} +1 -1
  3. package/dist/{FilesViewerDialog-EFRMXIM5.cjs → FilesViewerDialog-77YTFIX3.cjs} +4 -4
  4. package/dist/{FilesViewerDialog-EFRMXIM5.cjs.map → FilesViewerDialog-77YTFIX3.cjs.map} +1 -1
  5. package/dist/{WorkspaceTableView-QPROJRCF.cjs → WorkspaceTableView-7BMZ2O3Y.cjs} +6 -6
  6. package/dist/{WorkspaceTableView-QPROJRCF.cjs.map → WorkspaceTableView-7BMZ2O3Y.cjs.map} +1 -1
  7. package/dist/{chunk-KWHGYHRC.cjs → chunk-KSDTK66A.cjs} +2 -2
  8. package/dist/{chunk-KWHGYHRC.cjs.map → chunk-KSDTK66A.cjs.map} +1 -1
  9. package/dist/{chunk-MI3N3ZOT.cjs → chunk-PDDYAY4Z.cjs} +20 -20
  10. package/dist/{chunk-MI3N3ZOT.cjs.map → chunk-PDDYAY4Z.cjs.map} +1 -1
  11. package/dist/{chunk-T73BHNQX.cjs → chunk-TBPCG2PV.cjs} +240 -89
  12. package/dist/chunk-TBPCG2PV.cjs.map +1 -0
  13. package/dist/{chunk-GOQV6NOK.cjs → chunk-U7KB42OQ.cjs} +4 -4
  14. package/dist/{chunk-GOQV6NOK.cjs.map → chunk-U7KB42OQ.cjs.map} +1 -1
  15. package/dist/{chunk-GEZB3OEC.cjs → chunk-XJE7W42L.cjs} +18 -17
  16. package/dist/chunk-XJE7W42L.cjs.map +1 -0
  17. package/dist/connect/index.cjs +1413 -653
  18. package/dist/connect/index.cjs.map +1 -1
  19. package/dist/connect/viewer.cjs +1 -1
  20. package/dist/connection/billing/ChangePlanDialog.d.ts +2 -1
  21. package/dist/connection/billing/ChangePlanDialog.js +8 -3
  22. package/dist/connection/billing/ChangePlanDialog.js.map +2 -2
  23. package/dist/connection/billing/ChangeProPlan.js +4 -4
  24. package/dist/connection/billing/ChangeProPlan.js.map +2 -2
  25. package/dist/connection/billing/CollaboratorPlan.js +5 -3
  26. package/dist/connection/billing/CollaboratorPlan.js.map +2 -2
  27. package/dist/connection/billing/ConnectedWelcomeDialog.d.ts +5 -13
  28. package/dist/connection/billing/ConnectedWelcomeDialog.js +38 -19
  29. package/dist/connection/billing/ConnectedWelcomeDialog.js.map +2 -2
  30. package/dist/connection/billing/MonthlySpendCap.d.ts +10 -3
  31. package/dist/connection/billing/MonthlySpendCap.js +103 -11
  32. package/dist/connection/billing/MonthlySpendCap.js.map +2 -2
  33. package/dist/connection/billing/NewProjectFlow.js +20 -7
  34. package/dist/connection/billing/NewProjectFlow.js.map +2 -2
  35. package/dist/connection/billing/ProjectDetail.js +1 -1
  36. package/dist/connection/billing/ProjectDetail.js.map +2 -2
  37. package/dist/connection/billing/ProjectPurchaseOptions.d.ts +14 -3
  38. package/dist/connection/billing/ProjectPurchaseOptions.js +472 -139
  39. package/dist/connection/billing/ProjectPurchaseOptions.js.map +2 -2
  40. package/dist/connection/billing/ProjectUsageCard.js +4 -4
  41. package/dist/connection/billing/ProjectUsageCard.js.map +2 -2
  42. package/dist/connection/billing/ReduceAddonDialog.js +2 -2
  43. package/dist/connection/billing/ReduceAddonDialog.js.map +2 -2
  44. package/dist/connection/billing/StripeCheckoutModal.js +3 -2
  45. package/dist/connection/billing/StripeCheckoutModal.js.map +2 -2
  46. package/dist/connection/billing/SubscriptionPlans.d.ts +5 -1
  47. package/dist/connection/billing/SubscriptionPlans.js +89 -6
  48. package/dist/connection/billing/SubscriptionPlans.js.map +2 -2
  49. package/dist/connection/billing/index.d.ts +1 -1
  50. package/dist/connection/billing/index.js +2 -2
  51. package/dist/connection/billing/index.js.map +2 -2
  52. package/dist/connection/billing/referral-reward.d.ts +2 -3
  53. package/dist/connection/billing/referral-reward.js +8 -3
  54. package/dist/connection/billing/referral-reward.js.map +2 -2
  55. package/dist/connection/billing/tax-quote.d.ts +2 -2
  56. package/dist/connection/billing/tax-quote.js +1 -0
  57. package/dist/connection/billing/tax-quote.js.map +2 -2
  58. package/dist/connection/command/ConnectedCommandPalette.js +2 -0
  59. package/dist/connection/command/ConnectedCommandPalette.js.map +2 -2
  60. package/dist/connection/command/actions.js +1 -1
  61. package/dist/connection/command/actions.js.map +2 -2
  62. package/dist/connection/contacts/ConnectedAddContacts.d.ts +7 -1
  63. package/dist/connection/contacts/ConnectedAddContacts.js +33 -17
  64. package/dist/connection/contacts/ConnectedAddContacts.js.map +2 -2
  65. package/dist/connection/contacts/ConnectedInviteContactsDialog.js +3 -2
  66. package/dist/connection/contacts/ConnectedInviteContactsDialog.js.map +2 -2
  67. package/dist/connection/contacts/ConnectedWelcomeInvitations.d.ts +6 -0
  68. package/dist/connection/contacts/ConnectedWelcomeInvitations.js +198 -0
  69. package/dist/connection/contacts/ConnectedWelcomeInvitations.js.map +7 -0
  70. package/dist/connection/projects/ConnectedProjectsPanel.js +17 -5
  71. package/dist/connection/projects/ConnectedProjectsPanel.js.map +2 -2
  72. package/dist/connection/shell/ConnectedWorkspaceSwitcher.js +3 -3
  73. package/dist/connection/shell/ConnectedWorkspaceSwitcher.js.map +2 -2
  74. package/dist/connection/workspace-form/ConnectedWorkspaceFormModal.js +2 -2
  75. package/dist/connection/workspace-form/ConnectedWorkspaceFormModal.js.map +2 -2
  76. package/dist/connection/workspace-list/ConnectedWorkspaceList.js +1 -1
  77. package/dist/connection/workspace-list/ConnectedWorkspaceList.js.map +2 -2
  78. package/dist/connection/workspace-list/useConnectedWorkspaceList.d.ts +1 -1
  79. package/dist/connection/workspace-list/useConnectedWorkspaceList.js +4 -4
  80. package/dist/connection/workspace-list/useConnectedWorkspaceList.js.map +2 -2
  81. package/dist/embed/index.cjs +8 -8
  82. package/dist/index.cjs +48 -48
  83. package/dist/index.cjs.map +1 -1
  84. package/dist/nav/actions.d.ts +2 -0
  85. package/dist/nav/actions.js.map +2 -2
  86. package/dist/settings/Billing.d.ts +2 -2
  87. package/dist/settings/Billing.js +4 -3
  88. package/dist/settings/Billing.js.map +2 -2
  89. package/dist/settings/PanelFrame.d.ts +3 -1
  90. package/dist/settings/PanelFrame.js +3 -2
  91. package/dist/settings/PanelFrame.js.map +2 -2
  92. package/dist/settings/SubscriptionParts.d.ts +4 -2
  93. package/dist/settings/SubscriptionParts.js +22 -3
  94. package/dist/settings/SubscriptionParts.js.map +2 -2
  95. package/dist/settings/WelcomeDialog.d.ts +31 -4
  96. package/dist/settings/WelcomeDialog.js +221 -82
  97. package/dist/settings/WelcomeDialog.js.map +2 -2
  98. package/dist/settings/index.cjs +144 -144
  99. package/dist/styles.css +1 -1
  100. package/dist/workflow-canvas/index.cjs +7 -7
  101. package/node_modules/@arbidocs/coedit/package.json +1 -1
  102. package/package.json +5 -5
  103. package/src/connection/billing/project-purchase.css +518 -39
  104. package/dist/chunk-GEZB3OEC.cjs.map +0 -1
  105. package/dist/chunk-T73BHNQX.cjs.map +0 -1
@@ -422,7 +422,8 @@ function PanelAddButton({
422
422
  isCompact,
423
423
  icon,
424
424
  testId,
425
- disabledReason
425
+ disabledReason,
426
+ tooltip
426
427
  }) {
427
428
  return /* @__PURE__ */ jsxRuntime.jsxs(
428
429
  "button",
@@ -430,7 +431,7 @@ function PanelAddButton({
430
431
  type: "button",
431
432
  onClick,
432
433
  disabled: !!disabledReason,
433
- title: disabledReason ?? label,
434
+ title: disabledReason ?? tooltip ?? label,
434
435
  "data-slot": "panel-add-button",
435
436
  "data-testid": testId,
436
437
  className: "flex h-8 items-center gap-1.5 rounded-md px-2 text-sm font-medium text-primary transition-colors hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent pointer-coarse:h-11 pointer-coarse:min-w-11",
@@ -3140,12 +3141,26 @@ var DEFAULT_WELCOME_DIALOG_LABELS = {
3140
3141
  welcome: (firstName) => `Welcome${firstName ? `, ${firstName}` : ""}!`,
3141
3142
  description: "Your plan, usage and rewards at a glance.",
3142
3143
  currentPlan: "Current plan",
3143
- seeUpgradeOptions: "See upgrade options",
3144
- referralBefore: "Get ",
3145
- referralAfter: " for every invited contact who goes Pro.",
3146
- inviteContact: "Invite contact",
3147
- currentRewards: "Current rewards: ",
3148
- continue: "Continue"
3144
+ seeUpgradeOptions: "Upgrade to Pro",
3145
+ free: "No Subscription",
3146
+ pro: "Pro",
3147
+ proBenefits: "More AI, Storage and Collaboration features",
3148
+ freePrice: "Free",
3149
+ from: "From",
3150
+ perMonth: "/month",
3151
+ exVat: "ex VAT",
3152
+ seePricing: "See pricing",
3153
+ upgrade: "Upgrade",
3154
+ back: "Back",
3155
+ upgradeDescription: "Choose your project, allowances and subscription.",
3156
+ referralBefore: "Earn ",
3157
+ referralTitle: "Referral bonus",
3158
+ referralAfter: " per Pro referral",
3159
+ inviteContact: "Invite contacts",
3160
+ currentRewards: "My Rewards Balance",
3161
+ balanceApplied: "Applied to your next invoice",
3162
+ emptyBalance: "\xA30",
3163
+ continue: "Stay on current"
3149
3164
  };
3150
3165
  var DEFAULT_INVITE_CONTACTS_DIALOG_LABELS = {
3151
3166
  title: "Invite contacts",
@@ -3160,6 +3175,9 @@ function WelcomeDialog({
3160
3175
  planBadge,
3161
3176
  quotas,
3162
3177
  onSeePlans,
3178
+ upgradeStep,
3179
+ inviteStep,
3180
+ proMonthlyPriceLabel,
3163
3181
  referralOfferLabel,
3164
3182
  onInvite,
3165
3183
  rewardBalanceLabel,
@@ -3168,101 +3186,215 @@ function WelcomeDialog({
3168
3186
  testIds
3169
3187
  }) {
3170
3188
  const l = react.useMemo(() => ({ ...DEFAULT_WELCOME_DIALOG_LABELS, ...labels }), [labels]);
3171
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open, onOpenChange: (next) => !next && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(
3189
+ const upgrading = upgradeStep?.active ?? false;
3190
+ const inviting = inviteStep?.active ?? false;
3191
+ const detailStep = inviting ? inviteStep : upgrading ? upgradeStep : void 0;
3192
+ const step = inviting ? "invite" : upgrading ? "upgrade" : "welcome";
3193
+ const [visitedInvite, setVisitedInvite] = react.useState(false);
3194
+ const [visitedUpgrade, setVisitedUpgrade] = react.useState(false);
3195
+ const [contentHeight, setContentHeight] = react.useState();
3196
+ const observerRef = react.useRef(null);
3197
+ const scrollRef = react.useRef(null);
3198
+ const upgradeRef = react.useRef(null);
3199
+ const inviteRef = react.useRef(null);
3200
+ const inviteButtonRef = react.useRef(null);
3201
+ const proButtonRef = react.useRef(null);
3202
+ const backButtonRef = react.useRef(null);
3203
+ const previousStep = react.useRef(step);
3204
+ react.useEffect(() => {
3205
+ if (!open) {
3206
+ setVisitedUpgrade(false);
3207
+ setVisitedInvite(false);
3208
+ } else {
3209
+ if (upgrading) setVisitedUpgrade(true);
3210
+ if (inviting) setVisitedInvite(true);
3211
+ }
3212
+ }, [open, upgrading, inviting]);
3213
+ const measureRef = react.useCallback((content) => {
3214
+ observerRef.current?.disconnect();
3215
+ if (!content) return;
3216
+ const measure = () => {
3217
+ const height = content.offsetHeight;
3218
+ if (height > 0) setContentHeight(height + 2);
3219
+ };
3220
+ measure();
3221
+ if (typeof ResizeObserver === "undefined") return;
3222
+ observerRef.current = new ResizeObserver(measure);
3223
+ observerRef.current.observe(content);
3224
+ }, []);
3225
+ react.useLayoutEffect(() => {
3226
+ const previous = previousStep.current;
3227
+ if (previous === step) return;
3228
+ previousStep.current = step;
3229
+ scrollRef.current?.scrollTo?.({ top: 0 });
3230
+ if (step === "welcome") {
3231
+ (previous === "invite" ? inviteButtonRef.current : proButtonRef.current)?.focus({
3232
+ preventScroll: true
3233
+ });
3234
+ } else {
3235
+ const panel = step === "invite" ? inviteRef.current : upgradeRef.current;
3236
+ const target = panel?.querySelector("textarea, input") ?? backButtonRef.current;
3237
+ target?.focus({ preventScroll: true });
3238
+ }
3239
+ }, [step]);
3240
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open, onOpenChange: (next) => !next && onClose(), children: /* @__PURE__ */ jsxRuntime.jsx(
3172
3241
  ui.DialogContent,
3173
3242
  {
3174
- className: "sm:max-w-md",
3175
- "data-testid": chunkPLIF5CUV_cjs.testIdOr(testId, { testId: "welcome-modal" }),
3176
- hideCloseButton: true,
3177
- children: [
3243
+ className: upgradeStep ? "welcome-flow-dialog flex flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:max-w-[720px]" : "welcome-flow-dialog flex flex-col gap-0 overflow-hidden p-0 sm:max-w-md",
3244
+ style: contentHeight ? { height: contentHeight } : void 0,
3245
+ "data-testid": detailStep ? `${chunkPLIF5CUV_cjs.testIdOr(testId, { testId: "welcome-modal" })}-${step}` : chunkPLIF5CUV_cjs.testIdOr(testId, { testId: "welcome-modal" }),
3246
+ hideCloseButton: !detailStep,
3247
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollRef, className: "min-h-0 overflow-y-auto overscroll-contain", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: measureRef, className: "grid gap-4 p-6", children: [
3178
3248
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogHeader, { children: [
3179
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-wrap items-start justify-between gap-2", children: [
3180
- /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogTitle, { className: "flex items-center gap-2", children: [
3181
- hasReward ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Gift, { className: "h-5 w-5 text-green-text" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "h-5 w-5 text-yellow-text" }),
3182
- l.welcome(firstName)
3183
- ] }),
3184
- projectPicker
3185
- ] }),
3186
- /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: "sr-only", children: l.description })
3249
+ /* @__PURE__ */ jsxRuntime.jsxs(
3250
+ "div",
3251
+ {
3252
+ className: `flex min-w-0 flex-wrap items-center justify-between gap-2 ${detailStep ? "pr-10" : ""}`,
3253
+ children: [
3254
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
3255
+ detailStep && /* @__PURE__ */ jsxRuntime.jsxs(
3256
+ ui.Button,
3257
+ {
3258
+ type: "button",
3259
+ variant: "outline",
3260
+ className: "project-purchase-back gap-1.5",
3261
+ onClick: detailStep?.onBack,
3262
+ ref: backButtonRef,
3263
+ "data-testid": "upgrade-back",
3264
+ children: [
3265
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { "aria-hidden": "true", className: "h-4 w-4" }),
3266
+ l.back
3267
+ ]
3268
+ }
3269
+ ),
3270
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { className: "flex items-center gap-2 text-xl", children: detailStep ? inviting ? l.inviteContact : l.upgrade : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3271
+ hasReward ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Gift, { className: "h-5 w-5 text-green-text" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "h-5 w-5 text-yellow-text" }),
3272
+ l.welcome(firstName)
3273
+ ] }) })
3274
+ ] }),
3275
+ !inviting && projectPicker && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto", children: projectPicker })
3276
+ ]
3277
+ }
3278
+ ),
3279
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: "sr-only", children: detailStep ? inviting ? DEFAULT_INVITE_CONTACTS_DIALOG_LABELS.description : l.upgradeDescription : l.description })
3187
3280
  ] }),
3188
- /* @__PURE__ */ jsxRuntime.jsxs(
3189
- chunkULWRNGGE_cjs.ModalSection,
3190
- {
3191
- className: "space-y-4",
3192
- "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.copy, { testId: "welcome-modal-copy" }),
3193
- children: [
3194
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
3195
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: l.currentPlan }),
3196
- planBadge
3281
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { hidden: !!detailStep, className: detailStep ? "hidden" : "grid gap-4", children: [
3282
+ /* @__PURE__ */ jsxRuntime.jsxs(
3283
+ chunkULWRNGGE_cjs.ModalSection,
3284
+ {
3285
+ className: "space-y-4",
3286
+ "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.copy, { testId: "welcome-modal-copy" }),
3287
+ children: [
3288
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
3289
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: l.currentPlan }),
3290
+ planBadge
3291
+ ] }),
3292
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: quotas.map((quota) => /* @__PURE__ */ jsxRuntime.jsx(
3293
+ chunkORELHENJ_cjs.UsageMeter,
3294
+ {
3295
+ icon: quota.icon,
3296
+ label: quota.label,
3297
+ value: quota.value,
3298
+ pct: quota.pct,
3299
+ hint: quota.hint,
3300
+ testId: chunkPLIF5CUV_cjs.prefixedTestId(testIds?.quota, quota.key, {
3301
+ testId: `welcome-modal-quota-${quota.key}`
3302
+ })
3303
+ },
3304
+ quota.key
3305
+ )) })
3306
+ ]
3307
+ }
3308
+ ),
3309
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalSection, { className: "welcome-referral-card", "data-testid": "welcome-referral-card", children: [
3310
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "welcome-referral-copy", children: [
3311
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "welcome-referral-line", children: [
3312
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Gift, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-green-600" }),
3313
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: l.currentRewards }),
3314
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: rewardBalanceLabel ?? l.emptyBalance })
3197
3315
  ] }),
3198
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: quotas.map((quota) => /* @__PURE__ */ jsxRuntime.jsx(
3199
- chunkORELHENJ_cjs.UsageMeter,
3200
- {
3201
- icon: quota.icon,
3202
- label: quota.label,
3203
- value: quota.value,
3204
- pct: quota.pct,
3205
- hint: quota.hint,
3206
- testId: chunkPLIF5CUV_cjs.prefixedTestId(testIds?.quota, quota.key, {
3207
- testId: `welcome-modal-quota-${quota.key}`
3208
- })
3209
- },
3210
- quota.key
3211
- )) }),
3212
- /* @__PURE__ */ jsxRuntime.jsx(
3213
- ui.Button,
3214
- {
3215
- variant: "outline",
3216
- className: "w-full",
3217
- onClick: onSeePlans,
3218
- "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.showPlans, { testId: "welcome-modal-show-plans" }),
3219
- children: l.seeUpgradeOptions
3220
- }
3221
- )
3222
- ]
3223
- }
3224
- ),
3225
- /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalSection, { className: "space-y-2.5", children: [
3226
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
3227
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
3228
- l.referralBefore,
3229
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: referralOfferLabel }),
3230
- l.referralAfter
3316
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "welcome-referral-line text-muted-foreground", children: [
3317
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "welcome-referral-prefix", children: l.referralBefore }),
3318
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: referralOfferLabel }),
3319
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "welcome-referral-after", children: l.referralAfter })
3320
+ ] })
3231
3321
  ] }),
3232
3322
  /* @__PURE__ */ jsxRuntime.jsxs(
3233
3323
  ui.Button,
3234
3324
  {
3235
3325
  variant: "outline",
3236
3326
  size: "sm",
3237
- className: "shrink-0 gap-1.5",
3327
+ className: "welcome-invite-button shrink-0 gap-1.5",
3328
+ "aria-label": l.inviteContact,
3329
+ ref: inviteButtonRef,
3238
3330
  onClick: onInvite,
3239
3331
  "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.earn, { testId: "welcome-modal-earn" }),
3240
3332
  children: [
3241
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlus, { className: "h-3.5 w-3.5" }),
3242
- l.inviteContact
3333
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Invite contacts" }),
3334
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { "aria-hidden": "true", className: "h-4 w-4 shrink-0" })
3243
3335
  ]
3244
3336
  }
3245
3337
  )
3246
3338
  ] }),
3247
- rewardBalanceLabel && // A statement, not a door: the balance applies itself to the next invoice.
3248
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 rounded-md bg-green-bg px-3 py-2 text-sm text-green-text", children: [
3249
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Gift, { className: "h-4 w-4 shrink-0" }),
3250
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "truncate", children: [
3251
- l.currentRewards,
3252
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: rewardBalanceLabel })
3253
- ] })
3339
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogFooter, { className: "welcome-plan-choices static grid grid-cols-2 items-stretch", children: [
3340
+ /* @__PURE__ */ jsxRuntime.jsxs(
3341
+ "button",
3342
+ {
3343
+ type: "button",
3344
+ className: "project-purchase-price project-purchase-price-free",
3345
+ onClick: onClose,
3346
+ "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.dismiss, { testId: "welcome-modal-dismiss" }),
3347
+ children: [
3348
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-price-heading", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-period", children: l.continue }) }),
3349
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "welcome-plan-details text-sm", children: l.free }),
3350
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "welcome-plan-price", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-amount", children: l.freePrice }) })
3351
+ ]
3352
+ }
3353
+ ),
3354
+ /* @__PURE__ */ jsxRuntime.jsxs(
3355
+ "button",
3356
+ {
3357
+ type: "button",
3358
+ ref: proButtonRef,
3359
+ className: "project-purchase-price",
3360
+ onClick: onSeePlans,
3361
+ "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.showPlans, { testId: "welcome-modal-show-plans" }),
3362
+ children: [
3363
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "project-purchase-price-heading", children: [
3364
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-period", children: l.seeUpgradeOptions }),
3365
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { "aria-hidden": "true", className: "h-4 w-4 shrink-0" })
3366
+ ] }),
3367
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "welcome-plan-details text-sm", children: l.proBenefits }),
3368
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "welcome-plan-price", children: proMonthlyPriceLabel ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3369
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: l.from }),
3370
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-amount", children: proMonthlyPriceLabel }),
3371
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: l.perMonth }),
3372
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: l.exVat })
3373
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: l.seePricing }) })
3374
+ ]
3375
+ }
3376
+ )
3254
3377
  ] })
3255
3378
  ] }),
3256
- /* @__PURE__ */ jsxRuntime.jsx(ui.DialogFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(
3257
- ui.Button,
3379
+ upgradeStep && (upgrading || visitedUpgrade) && /* @__PURE__ */ jsxRuntime.jsx(
3380
+ "div",
3258
3381
  {
3259
- className: "w-full",
3260
- onClick: onClose,
3261
- "data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.dismiss, { testId: "welcome-modal-dismiss" }),
3262
- children: l.continue
3382
+ ref: upgradeRef,
3383
+ hidden: !upgrading,
3384
+ className: upgrading ? "grid gap-4" : "hidden",
3385
+ children: upgradeStep.content
3263
3386
  }
3264
- ) })
3265
- ]
3387
+ ),
3388
+ inviteStep && (inviting || visitedInvite) && /* @__PURE__ */ jsxRuntime.jsx(
3389
+ "div",
3390
+ {
3391
+ ref: inviteRef,
3392
+ hidden: !inviting,
3393
+ className: inviting ? "grid gap-4" : "hidden",
3394
+ children: inviteStep.content
3395
+ }
3396
+ )
3397
+ ] }) })
3266
3398
  }
3267
3399
  ) });
3268
3400
  }
@@ -3479,15 +3611,16 @@ function DailyCapField({
3479
3611
  value,
3480
3612
  onChange: (e) => onChange(e.target.value),
3481
3613
  onKeyDown: (e) => {
3482
- if (e.key === "Enter") onSave();
3614
+ if (e.key === "Enter") onSave?.();
3483
3615
  },
3484
3616
  placeholder: l.noLimit,
3485
3617
  className: "h-9 w-40",
3486
- "aria-label": l.ariaLabel
3618
+ "aria-label": l.ariaLabel,
3619
+ disabled: isSaving
3487
3620
  }
3488
3621
  ),
3489
3622
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: l.unit }),
3490
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", className: "h-9 px-4", disabled: !canSave || isSaving, onClick: onSave, children: l.save })
3623
+ onSave && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", className: "h-9 px-4", disabled: !canSave || isSaving, onClick: onSave, children: l.save })
3491
3624
  ] });
3492
3625
  }
3493
3626
  var DEFAULT_PROFILE_CARD_LABELS = {
@@ -3986,6 +4119,7 @@ function SubscriptionStatusView({
3986
4119
  ] });
3987
4120
  }
3988
4121
  function PlanDialogFrame({
4122
+ onBack,
3989
4123
  compact = false,
3990
4124
  className,
3991
4125
  open,
@@ -3998,17 +4132,34 @@ function PlanDialogFrame({
3998
4132
  children,
3999
4133
  labels
4000
4134
  }) {
4135
+ const heading = onBack ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
4136
+ /* @__PURE__ */ jsxRuntime.jsxs(
4137
+ ui.Button,
4138
+ {
4139
+ type: "button",
4140
+ variant: "outline",
4141
+ className: "project-purchase-back gap-1.5",
4142
+ onClick: onBack,
4143
+ "data-testid": "upgrade-back",
4144
+ children: [
4145
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { "aria-hidden": "true", className: "h-4 w-4" }),
4146
+ "Back"
4147
+ ]
4148
+ }
4149
+ ),
4150
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: title })
4151
+ ] }) : title;
4001
4152
  if (compact)
4002
4153
  return /* @__PURE__ */ jsxRuntime.jsxs(
4003
4154
  chunkULWRNGGE_cjs.ModalScaffold,
4004
4155
  {
4005
4156
  open,
4006
4157
  onOpenChange,
4007
- title,
4158
+ title: heading,
4008
4159
  description: String(description),
4009
4160
  showDescription: !isDescriptionHidden,
4010
4161
  size: "md",
4011
- className: ui.cn("project-purchase-modal sm:max-w-[500px]", className),
4162
+ className: ui.cn("project-purchase-modal sm:max-w-[640px]", className),
4012
4163
  children: [
4013
4164
  projectName !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(
4014
4165
  "p",
@@ -4029,7 +4180,7 @@ function PlanDialogFrame({
4029
4180
  return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { className: ui.cn("max-w-5xl", className), children: [
4030
4181
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogHeader, { className: "flex-row items-start justify-between gap-3 space-y-0 pr-8", children: [
4031
4182
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
4032
- /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: title }),
4183
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: heading }),
4033
4184
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: isDescriptionHidden ? "sr-only" : void 0, children: description })
4034
4185
  ] }),
4035
4186
  projectName !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -4960,5 +5111,5 @@ exports.toActiveSessionViews = toActiveSessionViews;
4960
5111
  exports.toDeleteBlockerViews = toDeleteBlockerViews;
4961
5112
  exports.toLogoutSessionViews = toLogoutSessionViews;
4962
5113
  exports.toNotificationCategories = toNotificationCategories;
4963
- //# sourceMappingURL=chunk-T73BHNQX.cjs.map
4964
- //# sourceMappingURL=chunk-T73BHNQX.cjs.map
5114
+ //# sourceMappingURL=chunk-TBPCG2PV.cjs.map
5115
+ //# sourceMappingURL=chunk-TBPCG2PV.cjs.map