@wf-financing/ui 3.6.1 → 3.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wf-financing/ui",
3
- "version": "3.6.1",
3
+ "version": "3.7.0",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/index.es.js",
@@ -9,8 +9,9 @@ import { MODAL_LOGO_IMAGE_URL, STATIC_BASE_URL } from '../../config';
9
9
 
10
10
  const ON_DARK_THEMES = ['athena'];
11
11
  const LIGHT_BG_THEMES = ['conjura', 'rocketFuel'];
12
+ const TERTIARY_THEMES = ['reveni'];
12
13
 
13
- const BannerContainer = styled.aside<{ $isLightBgTheme: boolean }>`
14
+ const BannerContainer = styled.aside<{ $isLightBgTheme: boolean; $isTertiaryTheme: boolean }>`
14
15
  padding: var(--sizes-spacing-4) var(--sizes-spacing-4) var(--sizes-spacing-4) var(--sizes-spacing-6);
15
16
  box-shadow: var(--effects-shadow);
16
17
  border-radius: var(--sizes-radius-md);
@@ -18,8 +19,13 @@ const BannerContainer = styled.aside<{ $isLightBgTheme: boolean }>`
18
19
 
19
20
  border: ${({ $isLightBgTheme }) => ($isLightBgTheme ? css`1px solid var(--palette-utility-divider)` : 'none')};
20
21
 
21
- background-color: ${({ $isLightBgTheme }) =>
22
- $isLightBgTheme ? css`var(--palette-layout-containerSurface)` : css`var(--palette-utility-primaryBrand)`};
22
+ background-color: ${({ $isLightBgTheme, $isTertiaryTheme }) => {
23
+ if ($isTertiaryTheme) {
24
+ return css`var(--palette-utility-tertiaryBrand)`;
25
+ }
26
+
27
+ return $isLightBgTheme ? css`var(--palette-layout-containerSurface)` : css`var(--palette-utility-primaryBrand)`;
28
+ }};
23
29
 
24
30
  @media (max-width: 640px) {
25
31
  padding: var(--sizes-spacing-3) var(--sizes-spacing-3) var(--sizes-spacing-3) var(--sizes-spacing-4);
@@ -34,10 +40,11 @@ export const CtaBanner = () => {
34
40
  const { themeName } = useTheme();
35
41
  const isOnDarkTheme = ON_DARK_THEMES.includes(themeName);
36
42
  const isLightBgTheme = LIGHT_BG_THEMES.includes(themeName);
43
+ const isTertiaryTheme = TERTIARY_THEMES.includes(themeName);
37
44
  usePreloadImage(logoImageUrl);
38
45
 
39
46
  return (
40
- <BannerContainer $isLightBgTheme={isLightBgTheme}>
47
+ <BannerContainer $isLightBgTheme={isLightBgTheme} $isTertiaryTheme={isTertiaryTheme}>
41
48
  <Flex gap="4" align="center" justify="space-between" width="100%">
42
49
  <CtaBannerContent isMobile={isMobile} isTablet={isTablet} isOnDarkTheme={isOnDarkTheme} />
43
50
  <HeaderActions isOnDarkTheme={isOnDarkTheme} />
@@ -1,17 +1,24 @@
1
1
  import { Flex, Text } from '@wayflyer/flyui';
2
2
  import { useIntl } from 'react-intl';
3
3
 
4
+ import { useDetectSmallScreen } from '../../hooks';
4
5
  import { MODAL_ITEMS } from '../../constants';
5
6
 
6
7
  export const FundingSteps = () => {
7
8
  const { formatMessage } = useIntl();
9
+ const isSmallScreen = useDetectSmallScreen();
8
10
 
9
11
  return (
10
12
  <Flex direction="column" gap="2">
11
- {MODAL_ITEMS.map(({ id, title, subtitle }) => (
12
- <Flex key={id} direction="column">
13
- <Text fontWeight="medium">{formatMessage(title)}</Text>
14
- <Text color="placeholder">{formatMessage(subtitle)}</Text>
13
+ {MODAL_ITEMS.map(({ id, title, subtitle, Icon }) => (
14
+ <Flex key={id} direction="row" align="center" gap="2">
15
+ {!isSmallScreen && <Icon />}
16
+ <Flex direction="column">
17
+ <Text color="default" fontWeight="medium">
18
+ {formatMessage(title)}
19
+ </Text>
20
+ <Text color="placeholder">{formatMessage(subtitle)}</Text>
21
+ </Flex>
15
22
  </Flex>
16
23
  ))}
17
24
  </Flex>
@@ -19,4 +19,7 @@ export const WHITELISTED_PARTNER_IDS = {
19
19
 
20
20
  'c7fcea8c-ae5b-433a-bf79-ae3214627cf2': 'rocketFuel',
21
21
  '8124d71d-1de6-4a39-8cff-dd2ce96c8363': 'rocketFuel',
22
+
23
+ '0e553c21-13a7-461f-bf4d-5a92fad4a403': 'reveni',
24
+ 'bb9f8122-66ff-41bd-a8c0-52a9af0b3b4f': 'reveni',
22
25
  } as const satisfies Record<string, PartnerTheme>;
@@ -1,17 +1,26 @@
1
+ import {
2
+ IconArrowsCwHorizontal24Line,
3
+ IconCheckCircle24Line,
4
+ IconPersonCircle24Line,
5
+ } from '@wayflyer/flyui-icons/24/line';
6
+
1
7
  export const MODAL_ITEMS = [
2
8
  {
3
9
  id: 'step1',
4
10
  title: { id: 'ctaModal.step1.title' },
5
11
  subtitle: { id: 'ctaModal.step1.subtitle' },
12
+ Icon: IconPersonCircle24Line,
6
13
  },
7
14
  {
8
15
  id: 'step2',
9
16
  title: { id: 'ctaModal.step2.title' },
10
17
  subtitle: { id: 'ctaModal.step2.subtitle' },
18
+ Icon: IconArrowsCwHorizontal24Line,
11
19
  },
12
20
  {
13
21
  id: 'step3',
14
22
  title: { id: 'ctaModal.step3.title' },
15
23
  subtitle: { id: 'ctaModal.step3.subtitle' },
24
+ Icon: IconCheckCircle24Line,
16
25
  },
17
26
  ];
@@ -7,10 +7,10 @@
7
7
  "ctaModal.consent": "By proceeding, you consent to us sharing your information with Wayflyer so they can assess your eligibility for financing, in accordance with the Wayflyer ",
8
8
  "ctaModal.consent.privacy_policy": "Privacy Policy.",
9
9
  "ctaModal.step1.title": "Built for businesses like yours",
10
- "ctaModal.step1.subtitle": "$5B+ deployed to 5,000+ companies since 2019",
10
+ "ctaModal.step1.subtitle": "$5B deployed to 5,000+ companies",
11
11
  "ctaModal.step1.time": "2 mins",
12
12
  "ctaModal.step2.title": "Your growth, your way",
13
- "ctaModal.step2.subtitle": "Flexible products with terms that fit your business",
13
+ "ctaModal.step2.subtitle": "Flexible terms that fit your business",
14
14
  "ctaModal.step2.time": "10 mins",
15
15
  "ctaModal.step3.title": "Quick to get started",
16
16
  "ctaModal.step3.subtitle": "Apply in minutes and get capital in hours"