@deriv-web-design/ui 0.0.4 → 0.0.5
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.css +92 -62
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +158 -67
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +158 -67
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -581,10 +581,16 @@ interface CTABannerProps extends HTMLAttributes<HTMLElement> {
|
|
|
581
581
|
ctaHref?: string;
|
|
582
582
|
/** Override the default avatar array */
|
|
583
583
|
avatars?: AvatarItem[];
|
|
584
|
+
/**
|
|
585
|
+
* Layout variant.
|
|
586
|
+
* - `standard` (default): 12 avatars, taller section (864px desktop)
|
|
587
|
+
* - `compact`: 7 avatars, section height matches stage (680px desktop)
|
|
588
|
+
*/
|
|
589
|
+
variant?: "standard" | "compact";
|
|
584
590
|
}
|
|
585
591
|
|
|
586
592
|
declare const AVATAR_DATA: AvatarItem[];
|
|
587
|
-
declare const CTABanner: ({ headline, ctaLabel, ctaHref, avatars, className, ...props }: CTABannerProps) => react_jsx_runtime.JSX.Element;
|
|
593
|
+
declare const CTABanner: ({ headline, ctaLabel, ctaHref, avatars, variant, className, ...props }: CTABannerProps) => react_jsx_runtime.JSX.Element;
|
|
588
594
|
|
|
589
595
|
interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
|
|
590
596
|
/** URL for the daytime background image */
|
package/dist/index.d.ts
CHANGED
|
@@ -581,10 +581,16 @@ interface CTABannerProps extends HTMLAttributes<HTMLElement> {
|
|
|
581
581
|
ctaHref?: string;
|
|
582
582
|
/** Override the default avatar array */
|
|
583
583
|
avatars?: AvatarItem[];
|
|
584
|
+
/**
|
|
585
|
+
* Layout variant.
|
|
586
|
+
* - `standard` (default): 12 avatars, taller section (864px desktop)
|
|
587
|
+
* - `compact`: 7 avatars, section height matches stage (680px desktop)
|
|
588
|
+
*/
|
|
589
|
+
variant?: "standard" | "compact";
|
|
584
590
|
}
|
|
585
591
|
|
|
586
592
|
declare const AVATAR_DATA: AvatarItem[];
|
|
587
|
-
declare const CTABanner: ({ headline, ctaLabel, ctaHref, avatars, className, ...props }: CTABannerProps) => react_jsx_runtime.JSX.Element;
|
|
593
|
+
declare const CTABanner: ({ headline, ctaLabel, ctaHref, avatars, variant, className, ...props }: CTABannerProps) => react_jsx_runtime.JSX.Element;
|
|
588
594
|
|
|
589
595
|
interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
|
|
590
596
|
/** URL for the daytime background image */
|
package/dist/index.js
CHANGED
|
@@ -1981,153 +1981,240 @@ var SPRING = { stiffness: 80, damping: 30, restDelta: 1e-3 };
|
|
|
1981
1981
|
var LOCK_AT = 0.5;
|
|
1982
1982
|
var PLACEHOLDER_URL = "https://cdn.prod.website-files.com/68da5c86c91c54f39c86c28a/68da5c86c91c54f39c86ce1a_footer-member-5.webp";
|
|
1983
1983
|
var AVATAR_DATA = [
|
|
1984
|
-
/* ── Rank 0 —
|
|
1984
|
+
/* ── Rank 0 — top-centre (col 6, row 1) ─────── */
|
|
1985
1985
|
{
|
|
1986
|
-
id:
|
|
1986
|
+
id: 12,
|
|
1987
1987
|
staggerRank: 0,
|
|
1988
1988
|
imageUrl: PLACEHOLDER_URL,
|
|
1989
|
-
desktopPos: { left: "
|
|
1990
|
-
mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "
|
|
1989
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 6)", top: "calc(var(--ctab-grid-cell) * 1)" },
|
|
1990
|
+
mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 1)" },
|
|
1991
1991
|
mobileVisible: true
|
|
1992
1992
|
},
|
|
1993
|
-
/* ── Rank 1 —
|
|
1993
|
+
/* ── Rank 1 — bot-centre (col 6, row 7) ─────── */
|
|
1994
1994
|
{
|
|
1995
|
-
id:
|
|
1995
|
+
id: 11,
|
|
1996
1996
|
staggerRank: 1,
|
|
1997
1997
|
imageUrl: PLACEHOLDER_URL,
|
|
1998
|
-
desktopPos: { left: "calc(
|
|
1999
|
-
mobilePos:
|
|
2000
|
-
mobileVisible:
|
|
1998
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 6)", top: "calc(var(--ctab-grid-cell) * 7)" },
|
|
1999
|
+
mobilePos: null,
|
|
2000
|
+
mobileVisible: false
|
|
2001
2001
|
},
|
|
2002
|
-
/* ── Rank 2 —
|
|
2002
|
+
/* ── Rank 2 — upper-inner-left (col 3, row 2) ── */
|
|
2003
2003
|
{
|
|
2004
|
-
id:
|
|
2004
|
+
id: 3,
|
|
2005
2005
|
staggerRank: 2,
|
|
2006
2006
|
imageUrl: PLACEHOLDER_URL,
|
|
2007
|
-
desktopPos: { left: "
|
|
2008
|
-
mobilePos:
|
|
2009
|
-
mobileVisible:
|
|
2007
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 3)", top: "calc(var(--ctab-grid-cell) * 2)" },
|
|
2008
|
+
mobilePos: { left: "0", top: "calc(var(--ctab-grid-cell) * 2)" },
|
|
2009
|
+
mobileVisible: true
|
|
2010
2010
|
},
|
|
2011
|
-
/* ── Rank 3 —
|
|
2011
|
+
/* ── Rank 3 — upper-inner-right (col 9, row 2) ── */
|
|
2012
2012
|
{
|
|
2013
|
-
id:
|
|
2013
|
+
id: 6,
|
|
2014
2014
|
staggerRank: 3,
|
|
2015
2015
|
imageUrl: PLACEHOLDER_URL,
|
|
2016
|
-
desktopPos: { left: "
|
|
2017
|
-
mobilePos:
|
|
2018
|
-
mobileVisible:
|
|
2016
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 9)", top: "calc(var(--ctab-grid-cell) * 2)" },
|
|
2017
|
+
mobilePos: { right: "0", top: "calc(var(--ctab-grid-cell) * 2)" },
|
|
2018
|
+
mobileVisible: true
|
|
2019
2019
|
},
|
|
2020
|
-
/* ── Rank 4 — left
|
|
2020
|
+
/* ── Rank 4 — lower-inner-left (col 3, row 6) ── */
|
|
2021
2021
|
{
|
|
2022
|
-
id:
|
|
2022
|
+
id: 1,
|
|
2023
2023
|
staggerRank: 4,
|
|
2024
2024
|
imageUrl: PLACEHOLDER_URL,
|
|
2025
|
-
desktopPos: { left: "
|
|
2026
|
-
mobilePos: { left: "
|
|
2025
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 3)", top: "calc(var(--ctab-grid-cell) * 6)" },
|
|
2026
|
+
mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 9)" },
|
|
2027
2027
|
mobileVisible: true
|
|
2028
2028
|
},
|
|
2029
|
-
/* ── Rank 5 — right
|
|
2029
|
+
/* ── Rank 5 — lower-inner-right (col 9, row 6) ── */
|
|
2030
2030
|
{
|
|
2031
|
-
id:
|
|
2031
|
+
id: 10,
|
|
2032
2032
|
staggerRank: 5,
|
|
2033
2033
|
imageUrl: PLACEHOLDER_URL,
|
|
2034
|
-
desktopPos: { left: "
|
|
2035
|
-
mobilePos:
|
|
2036
|
-
mobileVisible:
|
|
2034
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 9)", top: "calc(var(--ctab-grid-cell) * 6)" },
|
|
2035
|
+
mobilePos: null,
|
|
2036
|
+
mobileVisible: false
|
|
2037
2037
|
},
|
|
2038
|
-
/* ── Rank 6 —
|
|
2038
|
+
/* ── Rank 6 — mid-left (col 0, row 4) ──────── */
|
|
2039
2039
|
{
|
|
2040
|
-
id:
|
|
2040
|
+
id: 5,
|
|
2041
2041
|
staggerRank: 6,
|
|
2042
2042
|
imageUrl: PLACEHOLDER_URL,
|
|
2043
|
-
desktopPos: { left: "
|
|
2044
|
-
mobilePos: {
|
|
2043
|
+
desktopPos: { left: "0", top: "calc(var(--ctab-grid-cell) * 4)" },
|
|
2044
|
+
mobilePos: { left: "0", top: "calc(var(--ctab-grid-cell) * 8)" },
|
|
2045
2045
|
mobileVisible: true
|
|
2046
2046
|
},
|
|
2047
|
-
/* ── Rank 7 —
|
|
2047
|
+
/* ── Rank 7 — mid-right (col 12, row 4) ────── */
|
|
2048
2048
|
{
|
|
2049
|
-
id:
|
|
2049
|
+
id: 8,
|
|
2050
2050
|
staggerRank: 7,
|
|
2051
2051
|
imageUrl: PLACEHOLDER_URL,
|
|
2052
|
-
desktopPos: { left: "
|
|
2053
|
-
mobilePos: {
|
|
2052
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 12)", top: "calc(var(--ctab-grid-cell) * 4)" },
|
|
2053
|
+
mobilePos: { right: "0", top: "calc(var(--ctab-grid-cell) * 8)" },
|
|
2054
2054
|
mobileVisible: true
|
|
2055
2055
|
},
|
|
2056
|
-
/* ── Rank 8 —
|
|
2056
|
+
/* ── Rank 8 — top-left corner (col 0, row 1) ── */
|
|
2057
2057
|
{
|
|
2058
|
-
id:
|
|
2058
|
+
id: 4,
|
|
2059
2059
|
staggerRank: 8,
|
|
2060
2060
|
imageUrl: PLACEHOLDER_URL,
|
|
2061
|
-
desktopPos: { left: "
|
|
2061
|
+
desktopPos: { left: "0", top: "calc(var(--ctab-grid-cell) * 1)" },
|
|
2062
2062
|
mobilePos: null,
|
|
2063
2063
|
mobileVisible: false
|
|
2064
2064
|
},
|
|
2065
|
-
/* ── Rank 9 —
|
|
2065
|
+
/* ── Rank 9 — top-right corner (col 12, row 1) ── */
|
|
2066
2066
|
{
|
|
2067
2067
|
id: 7,
|
|
2068
2068
|
staggerRank: 9,
|
|
2069
2069
|
imageUrl: PLACEHOLDER_URL,
|
|
2070
|
-
desktopPos: { left: "
|
|
2070
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 12)", top: "calc(var(--ctab-grid-cell) * 1)" },
|
|
2071
2071
|
mobilePos: null,
|
|
2072
2072
|
mobileVisible: false
|
|
2073
2073
|
},
|
|
2074
|
-
/* ── Rank 10 —
|
|
2074
|
+
/* ── Rank 10 — bot-left corner (col 0, row 7) ── */
|
|
2075
2075
|
{
|
|
2076
2076
|
id: 2,
|
|
2077
2077
|
staggerRank: 10,
|
|
2078
2078
|
imageUrl: PLACEHOLDER_URL,
|
|
2079
|
-
desktopPos: { left: "
|
|
2079
|
+
desktopPos: { left: "0", top: "calc(var(--ctab-grid-cell) * 7)" },
|
|
2080
2080
|
mobilePos: null,
|
|
2081
2081
|
mobileVisible: false
|
|
2082
2082
|
},
|
|
2083
|
-
/* ── Rank 11 —
|
|
2083
|
+
/* ── Rank 11 — bot-right corner (col 12, row 7) ── */
|
|
2084
2084
|
{
|
|
2085
|
-
id:
|
|
2085
|
+
id: 9,
|
|
2086
2086
|
staggerRank: 11,
|
|
2087
2087
|
imageUrl: PLACEHOLDER_URL,
|
|
2088
|
-
desktopPos: { left: "
|
|
2088
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 12)", top: "calc(var(--ctab-grid-cell) * 7)" },
|
|
2089
|
+
mobilePos: null,
|
|
2090
|
+
mobileVisible: false
|
|
2091
|
+
}
|
|
2092
|
+
];
|
|
2093
|
+
var COMPACT_AVATAR_DATA = [
|
|
2094
|
+
/* ── Rank 0 — top-centre (col ~6, row 1) ── */
|
|
2095
|
+
{
|
|
2096
|
+
id: 12,
|
|
2097
|
+
staggerRank: 0,
|
|
2098
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2099
|
+
desktopPos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 1)" },
|
|
2100
|
+
mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 1)" },
|
|
2101
|
+
mobileVisible: true
|
|
2102
|
+
},
|
|
2103
|
+
/* ── Rank 1 — top-left (col 2, row 1) ───── */
|
|
2104
|
+
{
|
|
2105
|
+
id: 3,
|
|
2106
|
+
staggerRank: 1,
|
|
2107
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2108
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 2)", top: "calc(var(--ctab-grid-cell) * 1)" },
|
|
2109
|
+
mobilePos: { left: "0", top: "calc(var(--ctab-grid-cell) * 2)" },
|
|
2110
|
+
mobileVisible: true
|
|
2111
|
+
},
|
|
2112
|
+
/* ── Rank 2 — top-right (col 10, row 1) ─── */
|
|
2113
|
+
{
|
|
2114
|
+
id: 6,
|
|
2115
|
+
staggerRank: 2,
|
|
2116
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2117
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 10)", top: "calc(var(--ctab-grid-cell) * 1)" },
|
|
2118
|
+
mobilePos: { right: "0", top: "calc(var(--ctab-grid-cell) * 2)" },
|
|
2119
|
+
mobileVisible: true
|
|
2120
|
+
},
|
|
2121
|
+
/* ── Rank 3 — mid-left (col 0, row 3) ────── */
|
|
2122
|
+
{
|
|
2123
|
+
id: 5,
|
|
2124
|
+
staggerRank: 3,
|
|
2125
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2126
|
+
desktopPos: { left: "0", top: "calc(var(--ctab-grid-cell) * 3)" },
|
|
2127
|
+
mobilePos: { left: "0", top: "calc(var(--ctab-grid-cell) * 8)" },
|
|
2128
|
+
mobileVisible: true
|
|
2129
|
+
},
|
|
2130
|
+
/* ── Rank 4 — mid-right (col 12, row 3) ──── */
|
|
2131
|
+
{
|
|
2132
|
+
id: 8,
|
|
2133
|
+
staggerRank: 4,
|
|
2134
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2135
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 12)", top: "calc(var(--ctab-grid-cell) * 3)" },
|
|
2136
|
+
mobilePos: { right: "0", top: "calc(var(--ctab-grid-cell) * 8)" },
|
|
2137
|
+
mobileVisible: true
|
|
2138
|
+
},
|
|
2139
|
+
/* ── Rank 5 — bot-left (col 2, row 5) ────── */
|
|
2140
|
+
{
|
|
2141
|
+
id: 1,
|
|
2142
|
+
staggerRank: 5,
|
|
2143
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2144
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 2)", top: "calc(var(--ctab-grid-cell) * 5)" },
|
|
2145
|
+
mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 9)" },
|
|
2146
|
+
mobileVisible: true
|
|
2147
|
+
},
|
|
2148
|
+
/* ── Rank 6 — bot-right (col 10, row 5) — desktop only ─── */
|
|
2149
|
+
{
|
|
2150
|
+
id: 11,
|
|
2151
|
+
staggerRank: 6,
|
|
2152
|
+
imageUrl: PLACEHOLDER_URL,
|
|
2153
|
+
desktopPos: { left: "calc(var(--ctab-grid-cell) * 10)", top: "calc(var(--ctab-grid-cell) * 5)" },
|
|
2089
2154
|
mobilePos: null,
|
|
2090
2155
|
mobileVisible: false
|
|
2091
2156
|
}
|
|
2092
2157
|
];
|
|
2093
2158
|
function useAvatarYValues(smooth) {
|
|
2094
|
-
const y0 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.near, 0]);
|
|
2095
|
-
const y1 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [
|
|
2096
|
-
const y2 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2097
|
-
const y3 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2098
|
-
const y4 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [
|
|
2099
|
-
const y5 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [
|
|
2159
|
+
const y0 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.near, 0]);
|
|
2160
|
+
const y1 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.near, 0]);
|
|
2161
|
+
const y2 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2162
|
+
const y3 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2163
|
+
const y4 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2164
|
+
const y5 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2100
2165
|
const y6 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [0, 0]);
|
|
2101
2166
|
const y7 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [0, 0]);
|
|
2102
|
-
const y8 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.
|
|
2167
|
+
const y8 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
|
|
2103
2168
|
const y9 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
|
|
2104
2169
|
const y10 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
|
|
2105
|
-
const y11 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [
|
|
2170
|
+
const y11 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
|
|
2106
2171
|
return [y0, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11];
|
|
2107
2172
|
}
|
|
2108
2173
|
function useAvatarXValues(smooth) {
|
|
2109
2174
|
const x0 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [0, 0]);
|
|
2110
2175
|
const x1 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [0, 0]);
|
|
2111
|
-
const x2 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2112
|
-
const x3 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [
|
|
2176
|
+
const x2 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2177
|
+
const x3 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2113
2178
|
const x4 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2114
2179
|
const x5 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2115
|
-
const x6 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.far, 0]);
|
|
2116
|
-
const x7 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [
|
|
2117
|
-
const x8 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.
|
|
2180
|
+
const x6 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.far, 0]);
|
|
2181
|
+
const x7 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.far, 0]);
|
|
2182
|
+
const x8 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
|
|
2118
2183
|
const x9 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
|
|
2119
2184
|
const x10 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
|
|
2120
|
-
const x11 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [
|
|
2185
|
+
const x11 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
|
|
2121
2186
|
return [x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11];
|
|
2122
2187
|
}
|
|
2188
|
+
function useCompactAvatarYValues(smooth) {
|
|
2189
|
+
const y0 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.near, 0]);
|
|
2190
|
+
const y1 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2191
|
+
const y2 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2192
|
+
const y3 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [0, 0]);
|
|
2193
|
+
const y4 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [0, 0]);
|
|
2194
|
+
const y5 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2195
|
+
const y6 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2196
|
+
return [y0, y1, y2, y3, y4, y5, y6];
|
|
2197
|
+
}
|
|
2198
|
+
function useCompactAvatarXValues(smooth) {
|
|
2199
|
+
const x0 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [0, 0]);
|
|
2200
|
+
const x1 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2201
|
+
const x2 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2202
|
+
const x3 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.far, 0]);
|
|
2203
|
+
const x4 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.far, 0]);
|
|
2204
|
+
const x5 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
|
|
2205
|
+
const x6 = (0, import_framer_motion.useTransform)(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
|
|
2206
|
+
return [x0, x1, x2, x3, x4, x5, x6];
|
|
2207
|
+
}
|
|
2123
2208
|
var CTABanner = ({
|
|
2124
|
-
headline = "
|
|
2209
|
+
headline = "Short section title goes here",
|
|
2125
2210
|
ctaLabel = "Open account",
|
|
2126
2211
|
ctaHref = "#",
|
|
2127
|
-
avatars
|
|
2212
|
+
avatars,
|
|
2213
|
+
variant = "standard",
|
|
2128
2214
|
className,
|
|
2129
2215
|
...props
|
|
2130
2216
|
}) => {
|
|
2217
|
+
const resolvedAvatars = avatars ?? (variant === "compact" ? COMPACT_AVATAR_DATA : AVATAR_DATA);
|
|
2131
2218
|
const sectionRef = (0, import_react11.useRef)(null);
|
|
2132
2219
|
const { scrollYProgress } = (0, import_framer_motion.useScroll)({
|
|
2133
2220
|
target: sectionRef,
|
|
@@ -2140,13 +2227,17 @@ var CTABanner = ({
|
|
|
2140
2227
|
const avatarOpacity = (0, import_framer_motion.useTransform)(smooth, [0, 0.25], [0, 1]);
|
|
2141
2228
|
const blurPx = (0, import_framer_motion.useTransform)(smooth, [0, 0.3, 0.7, 1], [ENTRANCE.blurStart, 0, 0, ENTRANCE.blurStart]);
|
|
2142
2229
|
const avatarFilter = import_framer_motion.useMotionTemplate`blur(${blurPx}px)`;
|
|
2143
|
-
const
|
|
2144
|
-
const
|
|
2230
|
+
const standardYValues = useAvatarYValues(smooth);
|
|
2231
|
+
const standardXValues = useAvatarXValues(smooth);
|
|
2232
|
+
const compactYValues = useCompactAvatarYValues(smooth);
|
|
2233
|
+
const compactXValues = useCompactAvatarXValues(smooth);
|
|
2234
|
+
const avatarYValues = variant === "compact" ? compactYValues : standardYValues;
|
|
2235
|
+
const avatarXValues = variant === "compact" ? compactXValues : standardXValues;
|
|
2145
2236
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2146
2237
|
"section",
|
|
2147
2238
|
{
|
|
2148
2239
|
ref: sectionRef,
|
|
2149
|
-
className: ["ctab", className].filter(Boolean).join(" "),
|
|
2240
|
+
className: ["ctab", variant === "compact" ? "ctab--compact" : "", className].filter(Boolean).join(" "),
|
|
2150
2241
|
...props,
|
|
2151
2242
|
children: [
|
|
2152
2243
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
@@ -2158,7 +2249,7 @@ var CTABanner = ({
|
|
|
2158
2249
|
}
|
|
2159
2250
|
),
|
|
2160
2251
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ctab__inner", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "ctab__stage", children: [
|
|
2161
|
-
|
|
2252
|
+
resolvedAvatars.map((avatar, index) => {
|
|
2162
2253
|
const posStyle = {};
|
|
2163
2254
|
if (avatar.desktopPos.left) posStyle["--av-d-left"] = avatar.desktopPos.left;
|
|
2164
2255
|
if (avatar.desktopPos.right) posStyle["--av-d-right"] = avatar.desktopPos.right;
|
|
@@ -2200,7 +2291,7 @@ var CTABanner = ({
|
|
|
2200
2291
|
style: { y: heroY, opacity: heroOpacity },
|
|
2201
2292
|
children: [
|
|
2202
2293
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { className: "ctab__headline", children: headline }),
|
|
2203
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("a", { href: ctaHref, className: "
|
|
2294
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("a", { href: ctaHref, className: "ctab__cta", children: ctaLabel })
|
|
2204
2295
|
]
|
|
2205
2296
|
}
|
|
2206
2297
|
)
|