Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

small UI updates

Steven Teyd263d4412451
diff --git a/apps/web/ui/modals/upgrade-plan-modal.tsx b/apps/web/ui/modals/upgrade-plan-modal.tsx
index d9881faf4f..1a0f000bc6 100644
--- a/apps/web/ui/modals/upgrade-plan-modal.tsx
+++ b/apps/web/ui/modals/upgrade-plan-modal.tsx
@@ -12,6 +12,7 @@ import {
Tick,
useRouterStuff,
} from "@dub/ui";
+import { SimpleTooltipContent, Tooltip } from "@dub/ui/src/tooltip";
import {
APP_DOMAIN,
SELF_SERVE_PAID_PLANS,
@@ -114,10 +115,10 @@ function UpgradePlanModal({
</motion.p>
</motion.div>
<div className="bg-gray-50 px-4 py-6 text-left sm:px-16">
- <div className="flex w-full">
+ <div className="flex w-full gap-x-1">
<Popover
content={
- <div className="w-full p-2 md:w-56">
+ <div className="w-full p-2 md:w-48">
{SELF_SERVE_PAID_PLANS.map(({ name, colors }, i) => (
<button
key={i}
@@ -151,7 +152,11 @@ function UpgradePlanModal({
>
<button
onClick={() => setOpenPlanSelector(!openPlanSelector)}
- className="mr-2 flex w-56 items-center justify-between space-x-2 rounded-md bg-white px-3 py-2.5 shadow transition-all duration-75 hover:shadow-md active:scale-[98%]"
+ className={cn(
+ "group flex h-10 w-full cursor-pointer appearance-none items-center justify-between gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all lg:w-48",
+ "border-gray-200 bg-white text-gray-900 placeholder-gray-400",
+ "focus-visible:border-gray-500 data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200",
+ )}
>
<IconMenu
text={selectedPlan.name}
@@ -177,7 +182,7 @@ function UpgradePlanModal({
/>
<Popover
content={
- <div className="w-full p-2 md:w-36">
+ <div className="w-full p-2 md:w-48">
{PERIODS.map((p, i) => (
<button
key={i}
@@ -202,7 +207,11 @@ function UpgradePlanModal({
>
<button
onClick={() => setOpenPeriodSelector(!openPeriodSelector)}
- className="flex flex-1 items-center justify-between space-x-2 rounded-md bg-white px-3 py-2.5 shadow transition-all duration-75 hover:shadow-md active:scale-[98%]"
+ className={cn(
+ "group flex h-10 w-full cursor-pointer appearance-none items-center justify-between gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all lg:w-48",
+ "border-gray-200 bg-white text-gray-900 placeholder-gray-400",
+ "focus-visible:border-gray-500 data-[state=open]:border-gray-500 data-[state=open]:ring-4 data-[state=open]:ring-gray-200",
+ )}
>
<span className="text-sm text-gray-500">
{capitalize(period)}
@@ -250,14 +259,40 @@ function UpgradePlanModal({
animate="show"
className="my-4 flex flex-col space-y-2"
>
- {selectedPlan.features.map(({ text }, i) => (
+ {selectedPlan.name.startsWith("Business") && (
+ <motion.div
+ key="business-plan-feature"
+ variants={STAGGER_CHILD_VARIANTS}
+ className="text-sm text-gray-500"
+ >
+ Everything in Pro, plus:
+ </motion.div>
+ )}
+ {selectedPlan.features.map(({ text, footnote }, i) => (
<motion.div
key={i}
variants={STAGGER_CHILD_VARIANTS}
className="flex items-center space-x-2 text-sm text-gray-500"
>
<CheckCircleFill className="h-5 w-5 text-green-500" />
- <span>{text}</span>
+
+ {footnote ? (
+ <Tooltip
+ content={
+ typeof footnote === "string" ? (
+ footnote
+ ) : (
+ <SimpleTooltipContent {...footnote} />
+ )
+ }
+ >
+ <p className="cursor-help text-gray-600 underline decoration-dotted underline-offset-2">
+ {text}
+ </p>
+ </Tooltip>
+ ) : (
+ <p className="text-gray-600">{text}</p>
+ )}
</motion.div>
))}
</motion.div>
diff --git a/packages/ui/package.json b/packages/ui/package.json
index d4db0fe275..779c586d6b 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,7 +1,7 @@
{
"name": "@dub/ui",
"description": "UI components for Dub.co",
- "version": "0.1.32",
+ "version": "0.1.33",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
diff --git a/packages/utils/package.json b/packages/utils/package.json
index 4eee60794e..d301ecbe33 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -1,7 +1,7 @@
{
"name": "@dub/utils",
"description": "Utility functions and constants for Dub.co",
- "version": "0.0.55",
+ "version": "0.0.56",
"sideEffects": false,
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
diff --git a/packages/utils/src/constants/pricing.tsx b/packages/utils/src/constants/pricing.tsx
index 71332bed6d..4ede793e52 100644
--- a/packages/utils/src/constants/pricing.tsx
+++ b/packages/utils/src/constants/pricing.tsx
@@ -57,15 +57,6 @@ const BUSINESS_PLAN_MODIFIER = ({
{ text: "2-year analytics retention" },
{ text: `${domains} custom domains` },
{ text: `${users} users` },
- {
- text: `Unlimited AI credits`,
- footnote: {
- title:
- "Subject to fair use policy – you will be notified if you exceed the limit, which are high enough for frequent usage.",
- cta: "Learn more.",
- href: "https://dub.co/blog/introducing-dub-ai",
- },
- },
{
text: `${nFormatter(tags, { full: true })} tags`,
footnote: {
@@ -74,15 +65,8 @@ const BUSINESS_PLAN_MODIFIER = ({
href: "https://dub.co/help/article/how-to-use-tags",
},
},
- { text: "Elevated support", footnote: "Email and chat support." },
{
- text: "Custom branding",
- footnote: {
- title:
- "Set custom QR code logos, password-protected links logos, and more.",
- cta: "Learn more.",
- href: "https://dub.co/help/article/custom-qr-codes",
- },
+ text: "Priority support",
},
],
});
@@ -123,10 +107,6 @@ export const PLANS = [
{ text: "3 custom domains" },
{ text: "1 user" },
{ text: "10 AI credits/mo" },
- {
- text: "Community support",
- footnote: "Help center + GitHub discussions.",
- },
{
text: "API Access",
footnote: {
@@ -135,6 +115,9 @@ export const PLANS = [
href: "https://dub.co/docs/api-reference/introduction",
},
},
+ {
+ text: "Basic support",
+ },
],
},
{
@@ -190,7 +173,6 @@ export const PLANS = [
href: "https://dub.co/blog/introducing-dub-ai",
},
},
- { text: "Basic support", footnote: "Basic email support." },
{
text: "Root domain redirect",
footnote: {
@@ -205,6 +187,7 @@ export const PLANS = [
footnote:
"Custom social media cards, password-protected links, link expiration, link cloaking, device targeting, geo targeting etc.",
},
+ { text: "Elevated support" },
],
},
BUSINESS_PLAN_MODIFIER({