@greatapps/common 1.1.489 → 1.1.490

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 (49) hide show
  1. package/dist/components/account/ConfigurationsMyAccountModal.mjs +3 -3
  2. package/dist/components/account/ConfigurationsMyAccountModal.mjs.map +1 -1
  3. package/dist/components/account/sections/ChangeEmailModal.mjs +3 -1
  4. package/dist/components/account/sections/ChangeEmailModal.mjs.map +1 -1
  5. package/dist/components/account/sections/ChangePhoneModal.mjs +3 -1
  6. package/dist/components/account/sections/ChangePhoneModal.mjs.map +1 -1
  7. package/dist/components/layouts/AppMobileNavBar.mjs +3 -1
  8. package/dist/components/layouts/AppMobileNavBar.mjs.map +1 -1
  9. package/dist/components/layouts/NavBar.mjs +2 -2
  10. package/dist/components/layouts/NavBar.mjs.map +1 -1
  11. package/dist/components/layouts/NotificationsPopover.mjs +5 -2
  12. package/dist/components/layouts/NotificationsPopover.mjs.map +1 -1
  13. package/dist/components/layouts/ProfilePopover.mjs +3 -2
  14. package/dist/components/layouts/ProfilePopover.mjs.map +1 -1
  15. package/dist/components/modals/BuyCreditsModal.mjs +3 -1
  16. package/dist/components/modals/BuyCreditsModal.mjs.map +1 -1
  17. package/dist/components/modals/cards/AddCardModal.mjs +3 -1
  18. package/dist/components/modals/cards/AddCardModal.mjs.map +1 -1
  19. package/dist/components/pages/NotFoundPage.mjs +2 -2
  20. package/dist/components/pages/NotFoundPage.mjs.map +1 -1
  21. package/dist/components/ui/buttons/Button.mjs +7 -2
  22. package/dist/components/ui/buttons/Button.mjs.map +1 -1
  23. package/dist/components/ui/data-display/PaymentInfoCard.mjs +3 -1
  24. package/dist/components/ui/data-display/PaymentInfoCard.mjs.map +1 -1
  25. package/dist/components/ui/feedback/DefaultCircularProgress.mjs +4 -1
  26. package/dist/components/ui/feedback/DefaultCircularProgress.mjs.map +1 -1
  27. package/dist/components/ui/feedback/Toast.mjs +7 -2
  28. package/dist/components/ui/feedback/Toast.mjs.map +1 -1
  29. package/dist/components/widgets/notifications/NotificationCard.mjs +4 -1
  30. package/dist/components/widgets/notifications/NotificationCard.mjs.map +1 -1
  31. package/dist/providers/whitelabel.provider.mjs +5 -0
  32. package/dist/providers/whitelabel.provider.mjs.map +1 -1
  33. package/package.json +1 -1
  34. package/src/components/account/ConfigurationsMyAccountModal.tsx +4 -3
  35. package/src/components/account/sections/ChangeEmailModal.tsx +3 -1
  36. package/src/components/account/sections/ChangePhoneModal.tsx +3 -1
  37. package/src/components/layouts/AppMobileNavBar.tsx +5 -1
  38. package/src/components/layouts/NavBar.tsx +2 -2
  39. package/src/components/layouts/NotificationsPopover.tsx +5 -2
  40. package/src/components/layouts/ProfilePopover.tsx +3 -2
  41. package/src/components/modals/BuyCreditsModal.tsx +3 -1
  42. package/src/components/modals/cards/AddCardModal.tsx +3 -1
  43. package/src/components/pages/NotFoundPage.tsx +2 -2
  44. package/src/components/ui/buttons/Button.tsx +7 -2
  45. package/src/components/ui/data-display/PaymentInfoCard.tsx +7 -1
  46. package/src/components/ui/feedback/DefaultCircularProgress.tsx +5 -1
  47. package/src/components/ui/feedback/Toast.tsx +7 -4
  48. package/src/components/widgets/notifications/NotificationCard.tsx +6 -1
  49. package/src/providers/whitelabel.provider.tsx +5 -0
@@ -27,7 +27,8 @@ export default function ConfigurationsMyAccountModal() {
27
27
  const { hasActiveSubscription } = config;
28
28
 
29
29
  const { user } = useAuth();
30
- const isOwnerOrAdmin = user?.profile === UserProfile.owner || user?.profile === UserProfile.admin;
30
+ const isOwner = user?.profile === UserProfile.owner;
31
+
31
32
  const isMobile = useIsMobile();
32
33
  const { activeSection, setActiveSection } = useConfigurationsModal({
33
34
  isOpen: open,
@@ -109,7 +110,7 @@ export default function ConfigurationsMyAccountModal() {
109
110
  <span className="paragraph-small-medium">Preferências</span>
110
111
  </TabsTrigger>
111
112
 
112
- {isOwnerOrAdmin && (
113
+ {isOwner && (
113
114
  <TabsTrigger value={AccountSectionType.SECURITY} className={tabTriggerClasses}>
114
115
  <IconLock size={20} className="shrink-0" />
115
116
  <span className="paragraph-small-medium">Segurança</span>
@@ -123,7 +124,7 @@ export default function ConfigurationsMyAccountModal() {
123
124
  <PreferencesSection onClose={close} />
124
125
  </TabsContent>
125
126
 
126
- {isOwnerOrAdmin && (
127
+ {isOwner && (
127
128
  <>
128
129
  <TabsContent value={AccountSectionType.SECURITY} className="h-full! relative overflow-hidden">
129
130
  <SecuritySection
@@ -9,6 +9,7 @@ import { FormField } from '../../ui/form/FormField';
9
9
  import { formatTimer } from '../../../utils/format/masks';
10
10
  import { OTP_CODE_LENGTH } from '../../../utils/validators/account';
11
11
  import { useAuth } from '../../../providers/auth.provider';
12
+ import { useIsDefaultWhitelabel } from '../../../providers/whitelabel.provider';
12
13
  import { useInvalidateUser } from '../../../modules/auth/hooks/useUserQuery';
13
14
  import { confirmEmailChangeAction } from '../../../modules/accounts/actions/account-management.action';
14
15
  import useChangeEmailForm from '../hooks/useChangeEmailForm';
@@ -21,6 +22,7 @@ interface ChangeEmailModalProps {
21
22
 
22
23
  export function ChangeEmailModal({ open, onClose }: ChangeEmailModalProps) {
23
24
  const { user } = useAuth();
25
+ const isDefaultWl = useIsDefaultWhitelabel();
24
26
  const invalidateUser = useInvalidateUser();
25
27
 
26
28
  const {
@@ -117,7 +119,7 @@ export function ChangeEmailModal({ open, onClose }: ChangeEmailModalProps) {
117
119
  </>
118
120
  )}
119
121
 
120
- <div className={`${showVerification ? 'w-full' : 'w-1/2'} h-0.75 bg-cyan-300`} />
122
+ <div className={`${showVerification ? 'w-full' : 'w-1/2'} h-0.75 ${isDefaultWl ? 'bg-cyan-300' : 'bg-zinc-300'}`} />
121
123
 
122
124
  {showVerification ? (
123
125
  <form
@@ -9,6 +9,7 @@ import PhoneInput from '../../ui/form/PhoneInput';
9
9
  import { formatTimer, formatPhone } from '../../../utils/format/masks';
10
10
  import { OTP_CODE_LENGTH } from '../../../utils/validators/account';
11
11
  import { useAuth } from '../../../providers/auth.provider';
12
+ import { useIsDefaultWhitelabel } from '../../../providers/whitelabel.provider';
12
13
  import { useInvalidateUser } from '../../../modules/auth/hooks/useUserQuery';
13
14
  import { confirmPhoneChangeAction } from '../../../modules/accounts/actions/account-management.action';
14
15
  import useChangePhoneForm from '../hooks/useChangePhoneForm';
@@ -21,6 +22,7 @@ interface ChangePhoneModalProps {
21
22
 
22
23
  export function ChangePhoneModal({ open, onClose }: ChangePhoneModalProps) {
23
24
  const { user } = useAuth();
25
+ const isDefaultWl = useIsDefaultWhitelabel();
24
26
  const invalidateUser = useInvalidateUser();
25
27
 
26
28
  const hasExistingPhone = !!user?.phone;
@@ -134,7 +136,7 @@ export function ChangePhoneModal({ open, onClose }: ChangePhoneModalProps) {
134
136
  </>
135
137
  )}
136
138
 
137
- <div className={`${showVerification || !hasExistingPhone ? 'w-full' : 'w-1/2'} h-0.75 bg-cyan-300`} />
139
+ <div className={`${showVerification || !hasExistingPhone ? 'w-full' : 'w-1/2'} h-0.75 ${isDefaultWl ? 'bg-cyan-300' : 'bg-zinc-300'}`} />
138
140
 
139
141
  {showVerification ? (
140
142
  <form
@@ -5,6 +5,7 @@ import Image from "next/image";
5
5
  import { IconMenu2, IconX } from "@tabler/icons-react";
6
6
  import { ProfilePopover } from "./ProfilePopover";
7
7
  import { useMobileNavbarSheet } from "../../store/useMobileNavbarSheet";
8
+ import { useIsDefaultWhitelabel } from "../../providers/whitelabel.provider";
8
9
  import type { ProfileMenuItem } from "./ProfilePopover";
9
10
 
10
11
  export interface AppMobileNavBarProps {
@@ -26,6 +27,7 @@ export function AppMobileNavBar({
26
27
  showMenuToggle = true,
27
28
  }: AppMobileNavBarProps) {
28
29
  const { isOpen, toggle } = useMobileNavbarSheet();
30
+ const isDefaultWl = useIsDefaultWhitelabel();
29
31
 
30
32
  const isGpagesActive = activeApp === "gpages";
31
33
 
@@ -36,7 +38,9 @@ export function AppMobileNavBar({
36
38
  <div
37
39
  className={`size-10 rounded-lg flex items-center justify-center transition-colors ${
38
40
  isGpagesActive
39
- ? "bg-cyan-100 border-2 border-white ring-2 ring-cyan-300"
41
+ ? isDefaultWl
42
+ ? "bg-cyan-100 border-2 border-white ring-2 ring-cyan-300"
43
+ : "border-2 border-white ring-2 ring-zinc-300 bg-zinc-100"
40
44
  : onAppIconClick ? "cursor-pointer hover:bg-gray-100" : ""
41
45
  }`}
42
46
  onClick={onAppIconClick}
@@ -6,7 +6,7 @@ import { IconChevronRight } from "@tabler/icons-react";
6
6
  import { Separator } from "../ui/data-display/Separator";
7
7
  import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/overlay/Tooltip";
8
8
  import { useDesktopSidebarStore, useDesktopSidebarHydration } from "../../store/useDesktopSidebarStore";
9
- import { useWhitelabel } from "../../providers/whitelabel.provider";
9
+ import { useWhitelabel, useIsDefaultWhitelabel } from "../../providers/whitelabel.provider";
10
10
  import { cn } from "../../infra/utils/clsx";
11
11
 
12
12
  type NavBarProps = {
@@ -32,7 +32,7 @@ function NavBar({
32
32
  useDesktopSidebarStore();
33
33
  useDesktopSidebarHydration();
34
34
  const { whitelabel } = useWhitelabel();
35
- const isDefaultWl = !whitelabel || whitelabel.id === 1;
35
+ const isDefaultWl = useIsDefaultWhitelabel();
36
36
  const primaryColor = whitelabel?.general?.primary_color;
37
37
  const wlName = whitelabel?.name || 'Great';
38
38
 
@@ -8,6 +8,7 @@ import { Button } from "../ui/buttons/Button";
8
8
  import NotificationCard from "../widgets/notifications/NotificationCard";
9
9
  import { cn } from "../../infra/utils/clsx";
10
10
  import { useMessages, useMarkAllMessagesAsRead } from "../../modules/users/hooks/messages.hook";
11
+ import { useIsDefaultWhitelabel } from "../../providers/whitelabel.provider";
11
12
  import { formatDistanceToNow } from "date-fns";
12
13
  import { ptBR } from "date-fns/locale";
13
14
 
@@ -24,8 +25,10 @@ function NotificationsPopover({
24
25
  side,
25
26
  align,
26
27
  contentClassName,
27
- badgeClassName = "bg-cyan-300",
28
+ badgeClassName,
28
29
  }: NotificationsPopoverProps) {
30
+ const isDefaultWl = useIsDefaultWhitelabel();
31
+ const resolvedBadgeClassName = badgeClassName ?? (isDefaultWl ? "bg-cyan-300" : "bg-zinc-300");
29
32
  const [open, setOpen] = useState(false);
30
33
  const { data: messagesData } = useMessages({ type: 'notification', readed: true, limit: 5 });
31
34
  const { mutate: markAllAsRead } = useMarkAllMessagesAsRead();
@@ -51,7 +54,7 @@ function NotificationsPopover({
51
54
  <span
52
55
  className={cn(
53
56
  "absolute top-0.5 right-0.5 size-3.5 rounded-full border-2 border-white",
54
- badgeClassName,
57
+ resolvedBadgeClassName,
55
58
  )}
56
59
  />
57
60
  )}
@@ -11,7 +11,7 @@ import { NavBarItem } from "./NavBarItem";
11
11
  import { UserAvatar } from "../ui/data-display/UserAvatar";
12
12
  import { LoadingOverlay } from "../ui/feedback/LoadingOverlay";
13
13
  import { useAuth } from "../../providers/auth.provider";
14
- import { useWhitelabelUrls } from "../../providers/whitelabel.provider";
14
+ import { useIsDefaultWhitelabel, useWhitelabelUrls } from "../../providers/whitelabel.provider";
15
15
  import { cn } from "../../infra/utils/clsx";
16
16
  import { useIaCredits } from "../../modules/ia-credits/hooks/ia-credits.hook";
17
17
  import { useBuyCreditsModal } from "../../store/useBuyCreditsModal";
@@ -42,6 +42,7 @@ function ProfilePopover({
42
42
  const { summary, subscription, isSubscriptionLoading, isCreditsLoading } =
43
43
  useIaCredits();
44
44
  const { openModal: openBuyCreditsModal } = useBuyCreditsModal();
45
+ const isDefaultWl = useIsDefaultWhitelabel();
45
46
  const { accountsUrl } = useWhitelabelUrls();
46
47
  const router = useRouter();
47
48
 
@@ -54,7 +55,7 @@ function ProfilePopover({
54
55
  const hasSubscription = !isSubscriptionLoading && subscription !== null;
55
56
 
56
57
  const isApiPlan = hasSubscription && subscription.id_plan === 411;
57
- const shouldShowCredits = hasSubscription && subscription.id_wl === 1 && !isApiPlan;
58
+ const shouldShowCredits = hasSubscription && isDefaultWl && !isApiPlan;
58
59
  const creditsPercentage =
59
60
  shouldShowCredits && summary.totalCredits > 0
60
61
  ? (summary.usedCredits / summary.totalCredits) * 100
@@ -24,6 +24,7 @@ import { useActiveSubscription } from '../../modules/subscriptions/hooks/find-ac
24
24
  import { useCalculateSubscription } from '../../modules/subscriptions/hooks/calculate-subscription.hook';
25
25
  import { useUpdateSubscriptionPlan } from '../../modules/subscriptions/hooks/update-subscription-plan.hook';
26
26
  import { getPriceFromCalculatedData } from '../../modules/subscriptions/utils/periodicity';
27
+ import { useIsDefaultWhitelabel } from '../../providers/whitelabel.provider';
27
28
  import { IconInfoCircle, IconX, IconLoader2 } from '@tabler/icons-react';
28
29
  import { useCallback, useEffect, useMemo, useRef } from 'react';
29
30
  import { useForm } from 'react-hook-form';
@@ -43,6 +44,7 @@ type BuyCreditFormData = z.infer<typeof buyCreditSchema>;
43
44
  export default function BuyCreditsModal() {
44
45
  const { open, closeModal } = useBuyCreditsModal();
45
46
  const { openModal } = useModalManager();
47
+ const isDefaultWl = useIsDefaultWhitelabel();
46
48
  const { data: cardsData } = useCards();
47
49
  const { data: subscriptionData } = useActiveSubscription();
48
50
  const subscription = subscriptionData?.data?.[0] ?? null;
@@ -279,7 +281,7 @@ export default function BuyCreditsModal() {
279
281
  />
280
282
 
281
283
  {hasChanged && (
282
- <div className="flex items-center gap-3 p-4 bg-cyan-50 rounded-lg">
284
+ <div className={`flex items-center gap-3 p-4 rounded-lg ${isDefaultWl ? 'bg-cyan-50' : 'bg-zinc-50'}`}>
283
285
  <IconInfoCircle className="size-4 text-zinc-950 shrink-0" />
284
286
  <span className="paragraph-small-regular text-zinc-950">
285
287
  {isIncreasingCredits
@@ -9,6 +9,7 @@ import { useCreateCard } from '../../../modules/cards/hooks/create-card.hook';
9
9
  import { useUpdateAccount } from '../../../modules/accounts/hooks/useAccountManagement';
10
10
  import { CardFormFields, BillingFormFields, cardFormSchema } from './CardFormFields';
11
11
  import type { CardFormData, StripeElementsStatus } from './CardFormFields';
12
+ import { useIsDefaultWhitelabel } from '../../../providers/whitelabel.provider';
12
13
  import { IconLoader2, IconX } from '@tabler/icons-react';
13
14
  import { useForm } from 'react-hook-form';
14
15
  import { zodResolver } from '@hookform/resolvers/zod';
@@ -23,6 +24,7 @@ const INITIAL_STRIPE_STATUS: StripeElementsStatus = {
23
24
 
24
25
  export default function AddCardModal() {
25
26
  const { activeModal, modalData, closeModal } = useModalManager();
27
+ const isDefaultWl = useIsDefaultWhitelabel();
26
28
  const isOpen = activeModal === 'addCardModal';
27
29
  const [currentStep, setCurrentStep] = useState(1);
28
30
  const [stripeStatus, setStripeStatus] = useState<StripeElementsStatus>(INITIAL_STRIPE_STATUS);
@@ -209,7 +211,7 @@ export default function AddCardModal() {
209
211
  {/* Progress bar */}
210
212
  <div className="h-1 bg-zinc-100 w-full">
211
213
  <div
212
- className="h-full bg-cyan-400 transition-all duration-300 ease-in-out"
214
+ className={`h-full transition-all duration-300 ease-in-out ${isDefaultWl ? 'bg-cyan-400' : 'bg-zinc-400'}`}
213
215
  style={{ width: currentStep === 1 ? '50%' : '100%' }}
214
216
  />
215
217
  </div>
@@ -2,7 +2,7 @@
2
2
 
3
3
  import Image from "next/image";
4
4
  import { useRouter } from "next/navigation";
5
- import { useWhitelabel } from "../../providers/whitelabel.provider";
5
+ import { useWhitelabel, useIsDefaultWhitelabel } from "../../providers/whitelabel.provider";
6
6
  import { Button } from "../ui/buttons/Button";
7
7
 
8
8
  function GreatAppsLogo() {
@@ -18,7 +18,7 @@ function GreatAppsLogo() {
18
18
  export function NotFoundPage() {
19
19
  const router = useRouter();
20
20
  const { whitelabel } = useWhitelabel();
21
- const isGreatApps = !whitelabel || whitelabel.id === 1;
21
+ const isGreatApps = useIsDefaultWhitelabel();
22
22
  const whitelabelLogo = whitelabel?.logo
23
23
  ? `${process.env.NEXT_PUBLIC_STORAGE_URL}/${whitelabel.logo}`
24
24
  : null;
@@ -4,6 +4,7 @@ import * as React from "react"
4
4
  import { Slot } from "@radix-ui/react-slot"
5
5
  import { cva, type VariantProps } from "class-variance-authority"
6
6
  import { cn } from "../../../infra/utils/clsx"
7
+ import { useIsDefaultWhitelabel } from "../../../providers/whitelabel.provider"
7
8
 
8
9
  const buttonVariants = cva(
9
10
  "paragraph-small-semibold cursor-pointer flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
@@ -15,7 +16,7 @@ const buttonVariants = cva(
15
16
  "bg-white text-gray-950 border-gray-200 hover:border-gray-400 border",
16
17
  ghost:
17
18
  "text-gray-600 hover:bg-accent hover:text-gray-950 dark:hover:bg-accent/50",
18
- brand: "bg-cyan-300 hover:bg-cyan-200 text-gray-950",
19
+ brand: "text-gray-950",
19
20
  },
20
21
  size: {
21
22
  default: "h-12 px-4 py-2 has-[>svg]:px-3",
@@ -43,12 +44,16 @@ function Button({
43
44
  VariantProps<typeof buttonVariants> & {
44
45
  asChild?: boolean
45
46
  }) {
47
+ const isDefaultWl = useIsDefaultWhitelabel();
46
48
  const Comp = asChild ? Slot : "button"
47
49
 
48
50
  return (
49
51
  <Comp
50
52
  data-slot="button"
51
- className={cn(buttonVariants({ variant, size, className }))}
53
+ className={cn(
54
+ buttonVariants({ variant, size, className }),
55
+ variant === "brand" && (isDefaultWl ? "bg-cyan-300 hover:bg-cyan-200" : "bg-zinc-300 hover:bg-zinc-200")
56
+ )}
52
57
  {...props}
53
58
  />
54
59
  )
@@ -7,6 +7,7 @@ import useIsMobile from '../../../hooks/useIsMobile';
7
7
  import { useCards } from '../../../modules/cards/hooks/cards.hook';
8
8
  import { useCallback, useState } from 'react';
9
9
  import { useModalManager } from '../../../store/useModalManager';
10
+ import { useIsDefaultWhitelabel } from '../../../providers/whitelabel.provider';
10
11
  import type { Card } from '../../../modules/cards/types';
11
12
 
12
13
  type PaymentInfoCardProps = {
@@ -26,6 +27,7 @@ export function PaymentInfoCard({
26
27
  }: PaymentInfoCardProps) {
27
28
  const isMobile = useIsMobile();
28
29
  const { openModal } = useModalManager();
30
+ const isDefaultWl = useIsDefaultWhitelabel();
29
31
 
30
32
  const [isExpanded, setIsExpanded] = useState(false);
31
33
 
@@ -163,7 +165,11 @@ export function PaymentInfoCard({
163
165
  <button
164
166
  type="button"
165
167
  onClick={onManageCards}
166
- className="flex items-center justify-center h-10 px-4 paragraph-small-semibold text-cyan-600 border border-cyan-200 rounded-lg hover:bg-cyan-50 transition-colors cursor-pointer mt-2"
168
+ className={`flex items-center justify-center h-10 px-4 paragraph-small-semibold rounded-lg transition-colors cursor-pointer mt-2 ${
169
+ isDefaultWl
170
+ ? 'text-cyan-600 border border-cyan-200 hover:bg-cyan-50'
171
+ : 'text-zinc-600 border border-zinc-200 hover:bg-zinc-50'
172
+ }`}
167
173
  >
168
174
  Gerenciar cartões
169
175
  </button>
@@ -1,9 +1,12 @@
1
+ 'use client';
2
+
1
3
  import {
2
4
  calculateRadius,
3
5
  calculateCircumference,
4
6
  calculatePercentage,
5
7
  calculateCircularProgressOffset,
6
8
  } from "../../../infra/utils/percentage";
9
+ import { useIsDefaultWhitelabel } from "../../../providers/whitelabel.provider";
7
10
 
8
11
  interface CircularProgressProps {
9
12
  current: number;
@@ -18,6 +21,7 @@ export default function DefaultCircularProgress({
18
21
  size = 62,
19
22
  strokeWidth = 3,
20
23
  }: CircularProgressProps) {
24
+ const isDefaultWl = useIsDefaultWhitelabel();
21
25
  const radius = calculateRadius(size, strokeWidth);
22
26
  const circumference = calculateCircumference(radius);
23
27
  const percentage = calculatePercentage(current, total);
@@ -46,7 +50,7 @@ export default function DefaultCircularProgress({
46
50
  cx={size / 2}
47
51
  cy={size / 2}
48
52
  r={radius}
49
- stroke="var(--color-cyan-300)"
53
+ stroke={isDefaultWl ? "var(--color-cyan-300)" : "var(--color-zinc-300)"}
50
54
  strokeWidth={strokeWidth}
51
55
  fill="none"
52
56
  strokeDasharray={circumference}
@@ -1,12 +1,11 @@
1
1
  'use client';
2
2
 
3
- "use client"
4
-
5
3
  import * as React from "react"
6
4
  import { cva, type VariantProps } from "class-variance-authority"
7
5
  import { IconCircleCheck, IconCircleX, IconAlertCircle, IconInfoCircle, IconCircle, IconX } from "@tabler/icons-react"
8
6
  import { toast } from "sonner"
9
7
  import { cn } from "../../../infra/utils/clsx"
8
+ import { useIsDefaultWhitelabel } from "../../../providers/whitelabel.provider"
10
9
  import { Button } from "../buttons/Button"
11
10
 
12
11
  const toastVariants = cva(
@@ -35,7 +34,7 @@ const toastIconContainerVariants = cva(
35
34
  success: "bg-green-50 text-green-500",
36
35
  error: "bg-red-50 text-red-500",
37
36
  warning: "bg-yellow-50 text-yellow-400",
38
- info: "bg-cyan-50 text-pages-500",
37
+ info: "",
39
38
  default: "bg-gray-50 text-gray-950",
40
39
  },
41
40
  },
@@ -69,6 +68,7 @@ function Toast({
69
68
  className,
70
69
  toastId,
71
70
  }: ToastProps) {
71
+ const isDefaultWl = useIsDefaultWhitelabel();
72
72
  const Icon = variant ? TOAST_ICONS[variant] : null
73
73
 
74
74
  return (
@@ -77,7 +77,10 @@ function Toast({
77
77
  children
78
78
  ) : (
79
79
  <div className="flex items-center gap-3 flex-1 min-w-0">
80
- <div className={cn(toastIconContainerVariants({ variant }))}>
80
+ <div className={cn(
81
+ toastIconContainerVariants({ variant }),
82
+ variant === "info" && (isDefaultWl ? "bg-cyan-50 text-pages-500" : "bg-zinc-50 text-zinc-500")
83
+ )}>
81
84
  {icon || (Icon && <Icon size={16} />)}
82
85
  </div>
83
86
 
@@ -1,6 +1,9 @@
1
+ 'use client';
2
+
1
3
  import { IconClock } from '@tabler/icons-react';
2
4
  import { ReactNode } from 'react';
3
5
  import { cn } from '../../../infra/utils/clsx';
6
+ import { useIsDefaultWhitelabel } from '../../../providers/whitelabel.provider';
4
7
 
5
8
  type NotificationCardProps = {
6
9
  icon: ReactNode;
@@ -27,6 +30,8 @@ export default function NotificationCard({
27
30
  className,
28
31
  gapPx = 16
29
32
  }: NotificationCardProps) {
33
+ const isDefaultWl = useIsDefaultWhitelabel();
34
+
30
35
  return (
31
36
  <div
32
37
  className={cn(
@@ -60,7 +65,7 @@ export default function NotificationCard({
60
65
  {actions && <div className="flex items-center gap-2">{actions}</div>}
61
66
  </div>
62
67
 
63
- {isUnread && <div className="size-2 bg-cyan-400 rounded-full shrink-0 mt-1" />}
68
+ {isUnread && <div className={`size-2 rounded-full shrink-0 mt-1 ${isDefaultWl ? 'bg-cyan-400' : 'bg-zinc-400'}`} />}
64
69
  </div>
65
70
  );
66
71
  }
@@ -43,6 +43,11 @@ export function useWhitelabelStyles() {
43
43
  };
44
44
  }
45
45
 
46
+ export function useIsDefaultWhitelabel(): boolean {
47
+ const context = useContext(WhitelabelContext);
48
+ return !context?.whitelabel || context.whitelabel.id === 1;
49
+ }
50
+
46
51
  export function useWhitelabelUrls() {
47
52
  const { whitelabel } = useWhitelabel();
48
53
  return {