@electroplix/components 0.5.0-alpha.11 → 0.5.0-alpha.12
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/CHANGELOG.md +10 -0
- package/dist/index.esm.js +211 -148
- package/dist/package.json +1 -1
- package/dist/src/components/hero/CTAOverlayHero.d.ts.map +1 -1
- package/dist/src/components/hero/CarouselHero.d.ts.map +1 -1
- package/dist/src/components/hero/HeroShell.d.ts.map +1 -1
- package/dist/src/components/hero/PatternedHero.d.ts.map +1 -1
- package/dist/src/components/hero/SplitHero.d.ts.map +1 -1
- package/dist/src/components/hero/StaticHero.d.ts.map +1 -1
- package/dist/src/components/hero/VideoHeaderHero.d.ts.map +1 -1
- package/metadata/hero.json +257 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3919,10 +3919,12 @@ const _excluded$Q = ["as", "bgColor", "textColor", "fontFamily", "minH", "maxW",
|
|
|
3919
3919
|
const ui$A = {
|
|
3920
3920
|
white: '#ffffff',
|
|
3921
3921
|
text: '#18181b',
|
|
3922
|
-
border: '#e4e4e7'
|
|
3922
|
+
border: '#e4e4e7'
|
|
3923
|
+
};
|
|
3923
3924
|
function HeroShell(props) {
|
|
3924
3925
|
var _t$minH, _t$maxW, _t$px, _t$py, _t$cardRadius, _t$gap, _ref, _ref2;
|
|
3925
3926
|
const t = useHeroTheme();
|
|
3927
|
+
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
3926
3928
|
const {
|
|
3927
3929
|
as: Tag = 'section',
|
|
3928
3930
|
bgColor,
|
|
@@ -3941,6 +3943,8 @@ function HeroShell(props) {
|
|
|
3941
3943
|
rest = _objectWithoutPropertiesLoose(props, _excluded$Q);
|
|
3942
3944
|
const bg = (_ref = bgColor != null ? bgColor : t.bgColor) != null ? _ref : ui$A.white;
|
|
3943
3945
|
const fg = (_ref2 = textColor != null ? textColor : t.textColor) != null ? _ref2 : ui$A.text;
|
|
3946
|
+
const rPx = isMobile ? 16 : px;
|
|
3947
|
+
const pyPx = isMobile ? 32 : py;
|
|
3944
3948
|
return jsxs(Tag, _extends({
|
|
3945
3949
|
className: className
|
|
3946
3950
|
}, rest, {
|
|
@@ -3951,8 +3955,8 @@ function HeroShell(props) {
|
|
|
3951
3955
|
color: fg,
|
|
3952
3956
|
fontFamily,
|
|
3953
3957
|
minHeight: typeof minH === 'number' ? `${minH}px` : minH,
|
|
3954
|
-
paddingInline:
|
|
3955
|
-
paddingBlock:
|
|
3958
|
+
paddingInline: rPx,
|
|
3959
|
+
paddingBlock: pyPx,
|
|
3956
3960
|
borderRadius: radius,
|
|
3957
3961
|
border: `1px solid ${ui$A.border}`,
|
|
3958
3962
|
position: 'relative',
|
|
@@ -3967,32 +3971,34 @@ function HeroShell(props) {
|
|
|
3967
3971
|
background: 'linear-gradient(180deg, rgba(250,250,250,0.7), rgba(255,255,255,0))',
|
|
3968
3972
|
pointerEvents: 'none'
|
|
3969
3973
|
}
|
|
3970
|
-
}),
|
|
3971
|
-
"
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
"
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3974
|
+
}), !isMobile && jsxs(Fragment, {
|
|
3975
|
+
children: [jsx("div", {
|
|
3976
|
+
"aria-hidden": true,
|
|
3977
|
+
style: {
|
|
3978
|
+
position: 'absolute',
|
|
3979
|
+
top: '12%',
|
|
3980
|
+
left: '8%',
|
|
3981
|
+
width: 240,
|
|
3982
|
+
height: 240,
|
|
3983
|
+
borderRadius: '999px',
|
|
3984
|
+
background: 'rgba(9,9,11,0.035)',
|
|
3985
|
+
filter: 'blur(70px)',
|
|
3986
|
+
pointerEvents: 'none'
|
|
3987
|
+
}
|
|
3988
|
+
}), jsx("div", {
|
|
3989
|
+
"aria-hidden": true,
|
|
3990
|
+
style: {
|
|
3991
|
+
position: 'absolute',
|
|
3992
|
+
bottom: '10%',
|
|
3993
|
+
right: '8%',
|
|
3994
|
+
width: 220,
|
|
3995
|
+
height: 220,
|
|
3996
|
+
borderRadius: '999px',
|
|
3997
|
+
background: 'rgba(9,9,11,0.03)',
|
|
3998
|
+
filter: 'blur(70px)',
|
|
3999
|
+
pointerEvents: 'none'
|
|
4000
|
+
}
|
|
4001
|
+
})]
|
|
3996
4002
|
}), jsx("div", {
|
|
3997
4003
|
style: {
|
|
3998
4004
|
width: '100%',
|
|
@@ -4013,10 +4019,12 @@ const ui$z = {
|
|
|
4013
4019
|
black: '#09090b',
|
|
4014
4020
|
text: '#18181b',
|
|
4015
4021
|
muted: '#71717a',
|
|
4016
|
-
border: '#e4e4e7'
|
|
4022
|
+
border: '#e4e4e7'
|
|
4023
|
+
};
|
|
4017
4024
|
function StaticHero(props) {
|
|
4018
4025
|
var _t$minH, _t$maxW, _t$px, _t$py, _t$cardRadius, _t$gap, _ref, _ref2, _ref3, _ref4, _ref5;
|
|
4019
4026
|
const t = useHeroTheme();
|
|
4027
|
+
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
4020
4028
|
const {
|
|
4021
4029
|
as: Tag = 'section',
|
|
4022
4030
|
title = 'Build Something Amazing',
|
|
@@ -4045,6 +4053,10 @@ function StaticHero(props) {
|
|
|
4045
4053
|
const fg = (_ref2 = textColor != null ? textColor : t.textColor) != null ? _ref2 : ui$z.text;
|
|
4046
4054
|
const accent = (_ref3 = accentColor != null ? accentColor : t.accentColor) != null ? _ref3 : ui$z.black;
|
|
4047
4055
|
const border = (_ref4 = (_ref5 = borderColor != null ? borderColor : t.cardBorder) != null ? _ref5 : t.borderColor) != null ? _ref4 : ui$z.border;
|
|
4056
|
+
const rPx = isMobile ? 16 : px;
|
|
4057
|
+
const pyPx = isMobile ? 32 : py;
|
|
4058
|
+
const titlePx = isMobile ? Math.max(28, Math.floor(titleSize * 0.6)) : titleSize;
|
|
4059
|
+
const subPx = isMobile ? Math.max(14, Math.floor(subtitleSize * 0.85)) : subtitleSize;
|
|
4048
4060
|
return jsxs(Tag, _extends({
|
|
4049
4061
|
className: className,
|
|
4050
4062
|
style: _extends({
|
|
@@ -4054,7 +4066,7 @@ function StaticHero(props) {
|
|
|
4054
4066
|
color: fg,
|
|
4055
4067
|
fontFamily,
|
|
4056
4068
|
minHeight: typeof minH === 'number' ? `${minH}px` : minH,
|
|
4057
|
-
padding: `${
|
|
4069
|
+
padding: `${pyPx}px ${rPx}px`,
|
|
4058
4070
|
borderRadius: radius,
|
|
4059
4071
|
border: `1px solid ${border}`,
|
|
4060
4072
|
position: 'relative',
|
|
@@ -4070,7 +4082,7 @@ function StaticHero(props) {
|
|
|
4070
4082
|
background: 'linear-gradient(180deg, rgba(250,250,250,0.75), rgba(255,255,255,0))',
|
|
4071
4083
|
pointerEvents: 'none'
|
|
4072
4084
|
}
|
|
4073
|
-
}), jsx("div", {
|
|
4085
|
+
}), !isMobile && jsx("div", {
|
|
4074
4086
|
"aria-hidden": true,
|
|
4075
4087
|
style: {
|
|
4076
4088
|
position: 'absolute',
|
|
@@ -4106,7 +4118,7 @@ function StaticHero(props) {
|
|
|
4106
4118
|
borderRadius: 999,
|
|
4107
4119
|
background: ui$z.white,
|
|
4108
4120
|
border: `1px solid ${border}`,
|
|
4109
|
-
marginBottom: 24,
|
|
4121
|
+
marginBottom: isMobile ? 16 : 24,
|
|
4110
4122
|
boxShadow: '0 1px 2px rgba(9,9,11,0.04)'
|
|
4111
4123
|
},
|
|
4112
4124
|
children: [jsx(Icon, {
|
|
@@ -4123,7 +4135,7 @@ function StaticHero(props) {
|
|
|
4123
4135
|
})]
|
|
4124
4136
|
}), title && jsx("h1", {
|
|
4125
4137
|
style: {
|
|
4126
|
-
fontSize:
|
|
4138
|
+
fontSize: titlePx,
|
|
4127
4139
|
lineHeight: 1.05,
|
|
4128
4140
|
margin: 0,
|
|
4129
4141
|
fontWeight: 800,
|
|
@@ -4133,10 +4145,10 @@ function StaticHero(props) {
|
|
|
4133
4145
|
children: title
|
|
4134
4146
|
}), subtitle && jsx("p", {
|
|
4135
4147
|
style: {
|
|
4136
|
-
fontSize:
|
|
4148
|
+
fontSize: subPx,
|
|
4137
4149
|
color: ui$z.muted,
|
|
4138
|
-
marginTop: 20,
|
|
4139
|
-
marginBottom: 32,
|
|
4150
|
+
marginTop: isMobile ? 12 : 20,
|
|
4151
|
+
marginBottom: isMobile ? 24 : 32,
|
|
4140
4152
|
maxWidth: 600,
|
|
4141
4153
|
marginInline: align === 'center' ? 'auto' : undefined,
|
|
4142
4154
|
marginLeft: align === 'right' ? 'auto' : undefined,
|
|
@@ -4146,22 +4158,23 @@ function StaticHero(props) {
|
|
|
4146
4158
|
}), jsxs("div", {
|
|
4147
4159
|
style: {
|
|
4148
4160
|
display: 'flex',
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4161
|
+
flexWrap: 'wrap',
|
|
4162
|
+
gap: isMobile ? 12 : 16,
|
|
4163
|
+
justifyContent: align === 'center' ? 'center' : align === 'right' ? 'flex-end' : 'flex-start'
|
|
4152
4164
|
},
|
|
4153
4165
|
children: [ctaLabel && jsxs("button", {
|
|
4154
4166
|
type: "button",
|
|
4155
4167
|
onClick: onCta,
|
|
4168
|
+
"aria-label": ctaLabel,
|
|
4156
4169
|
style: {
|
|
4157
|
-
padding:
|
|
4170
|
+
padding: `${isMobile ? 12 : 16}px ${isMobile ? 20 : 28}px`,
|
|
4158
4171
|
borderRadius: 12,
|
|
4159
4172
|
border: `1px solid ${accent}`,
|
|
4160
4173
|
background: accent,
|
|
4161
4174
|
color: ui$z.white,
|
|
4162
4175
|
cursor: 'pointer',
|
|
4163
4176
|
fontWeight: 700,
|
|
4164
|
-
fontSize: 16,
|
|
4177
|
+
fontSize: isMobile ? 14 : 16,
|
|
4165
4178
|
display: 'flex',
|
|
4166
4179
|
alignItems: 'center',
|
|
4167
4180
|
gap: 8,
|
|
@@ -4174,15 +4187,16 @@ function StaticHero(props) {
|
|
|
4174
4187
|
})]
|
|
4175
4188
|
}), jsx("button", {
|
|
4176
4189
|
type: "button",
|
|
4190
|
+
"aria-label": "Learn more",
|
|
4177
4191
|
style: {
|
|
4178
|
-
padding:
|
|
4192
|
+
padding: `${isMobile ? 12 : 16}px ${isMobile ? 20 : 28}px`,
|
|
4179
4193
|
borderRadius: 12,
|
|
4180
4194
|
border: `1px solid ${border}`,
|
|
4181
4195
|
background: ui$z.white,
|
|
4182
4196
|
color: fg,
|
|
4183
4197
|
cursor: 'pointer',
|
|
4184
4198
|
fontWeight: 600,
|
|
4185
|
-
fontSize: 16,
|
|
4199
|
+
fontSize: isMobile ? 14 : 16,
|
|
4186
4200
|
boxShadow: '0 1px 2px rgba(9,9,11,0.04)',
|
|
4187
4201
|
transition: 'all 0.2s ease'
|
|
4188
4202
|
},
|
|
@@ -4197,16 +4211,15 @@ function StaticHero(props) {
|
|
|
4197
4211
|
const _excluded$O = ["as", "slides", "autoplay", "intervalMs", "titleSize", "subtitleSize", "bgColor", "textColor", "accentColor", "borderColor", "fontFamily", "minH", "maxW", "px", "py", "radius", "gap", "style", "className"];
|
|
4198
4212
|
const ui$y = {
|
|
4199
4213
|
white: '#ffffff',
|
|
4200
|
-
black: '#09090b',
|
|
4201
|
-
text: '#18181b',
|
|
4202
4214
|
muted: '#71717a',
|
|
4203
|
-
border: '#e4e4e7',
|
|
4204
4215
|
surface: '#fafafa',
|
|
4205
4216
|
overlay: 'rgba(9,9,11,0.72)'
|
|
4206
4217
|
};
|
|
4207
4218
|
function CarouselHero(props) {
|
|
4208
4219
|
var _t$minH, _t$maxW, _t$px, _t$py, _t$cardRadius, _t$gap, _ref, _ref2, _ref3, _ref4, _ref5;
|
|
4209
4220
|
const t = useHeroTheme();
|
|
4221
|
+
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
4222
|
+
const prefersReducedMotion = typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
4210
4223
|
const {
|
|
4211
4224
|
as: Tag = 'section',
|
|
4212
4225
|
slides: rawSlides,
|
|
@@ -4229,10 +4242,14 @@ function CarouselHero(props) {
|
|
|
4229
4242
|
className = ''
|
|
4230
4243
|
} = props,
|
|
4231
4244
|
rest = _objectWithoutPropertiesLoose(props, _excluded$O);
|
|
4232
|
-
const bg = (_ref = bgColor != null ? bgColor : t.bgColor) != null ? _ref :
|
|
4233
|
-
const fg = (_ref2 = textColor != null ? textColor : t.textColor) != null ? _ref2 :
|
|
4234
|
-
const accent = (_ref3 = accentColor != null ? accentColor : t.accentColor) != null ? _ref3 :
|
|
4235
|
-
const border = (_ref4 = (_ref5 = borderColor != null ? borderColor : t.cardBorder) != null ? _ref5 : t.borderColor) != null ? _ref4 :
|
|
4245
|
+
const bg = (_ref = bgColor != null ? bgColor : t.bgColor) != null ? _ref : '#ffffff';
|
|
4246
|
+
const fg = (_ref2 = textColor != null ? textColor : t.textColor) != null ? _ref2 : '#18181b';
|
|
4247
|
+
const accent = (_ref3 = accentColor != null ? accentColor : t.accentColor) != null ? _ref3 : '#09090b';
|
|
4248
|
+
const border = (_ref4 = (_ref5 = borderColor != null ? borderColor : t.cardBorder) != null ? _ref5 : t.borderColor) != null ? _ref4 : '#e4e4e7';
|
|
4249
|
+
const rPx = isMobile ? 16 : px;
|
|
4250
|
+
const pyPx = isMobile ? 32 : py;
|
|
4251
|
+
const titlePx = isMobile ? Math.max(24, Math.floor(titleSize * 0.65)) : titleSize;
|
|
4252
|
+
const subPx = isMobile ? Math.max(14, Math.floor(subtitleSize * 0.85)) : subtitleSize;
|
|
4236
4253
|
const slides = Array.isArray(rawSlides) && rawSlides.length > 0 ? rawSlides : [{
|
|
4237
4254
|
image: '',
|
|
4238
4255
|
title: 'Welcome to Our Platform',
|
|
@@ -4247,22 +4264,37 @@ function CarouselHero(props) {
|
|
|
4247
4264
|
subtitle: 'Beautiful and responsive'
|
|
4248
4265
|
}];
|
|
4249
4266
|
const [idx, setIdx] = useState(0);
|
|
4267
|
+
const touchStart = useRef(null);
|
|
4268
|
+
// Autoplay — paused on reduced motion
|
|
4250
4269
|
useEffect(() => {
|
|
4251
|
-
if (!autoplay || slides.length <= 1) return;
|
|
4252
|
-
const id = setInterval(() =>
|
|
4253
|
-
setIdx(i => (i + 1) % slides.length);
|
|
4254
|
-
}, intervalMs);
|
|
4270
|
+
if (!autoplay || slides.length <= 1 || prefersReducedMotion) return;
|
|
4271
|
+
const id = setInterval(() => setIdx(i => (i + 1) % slides.length), intervalMs);
|
|
4255
4272
|
return () => clearInterval(id);
|
|
4256
|
-
}, [autoplay, slides.length, intervalMs]);
|
|
4273
|
+
}, [autoplay, slides.length, intervalMs, prefersReducedMotion]);
|
|
4274
|
+
const prev = useCallback(() => setIdx(i => (i - 1 + slides.length) % slides.length), [slides.length]);
|
|
4275
|
+
const next = useCallback(() => setIdx(i => (i + 1) % slides.length), [slides.length]);
|
|
4276
|
+
// Touch swipe
|
|
4277
|
+
const onTouchStart = useCallback(e => {
|
|
4278
|
+
touchStart.current = e.touches[0].clientX;
|
|
4279
|
+
}, []);
|
|
4280
|
+
const onTouchEnd = useCallback(e => {
|
|
4281
|
+
if (touchStart.current === null) return;
|
|
4282
|
+
const diff = touchStart.current - e.changedTouches[0].clientX;
|
|
4283
|
+
if (Math.abs(diff) > 50) {
|
|
4284
|
+
diff > 0 ? next() : prev();
|
|
4285
|
+
}
|
|
4286
|
+
touchStart.current = null;
|
|
4287
|
+
}, [next, prev]);
|
|
4257
4288
|
const current = slides[idx] || {
|
|
4258
4289
|
image: '',
|
|
4259
4290
|
title: '',
|
|
4260
4291
|
subtitle: ''
|
|
4261
4292
|
};
|
|
4262
|
-
const prev = () => setIdx(i => (i - 1 + slides.length) % slides.length);
|
|
4263
|
-
const next = () => setIdx(i => (i + 1) % slides.length);
|
|
4264
4293
|
return jsxs(Tag, _extends({
|
|
4265
4294
|
className: className,
|
|
4295
|
+
role: "region",
|
|
4296
|
+
"aria-roledescription": "carousel",
|
|
4297
|
+
"aria-label": "Image carousel",
|
|
4266
4298
|
style: _extends({
|
|
4267
4299
|
display: 'grid',
|
|
4268
4300
|
placeItems: 'center',
|
|
@@ -4270,7 +4302,7 @@ function CarouselHero(props) {
|
|
|
4270
4302
|
color: fg,
|
|
4271
4303
|
fontFamily,
|
|
4272
4304
|
minHeight: typeof minH === 'number' ? `${minH}px` : minH,
|
|
4273
|
-
padding: `${
|
|
4305
|
+
padding: `${pyPx}px ${rPx}px`,
|
|
4274
4306
|
borderRadius: radius,
|
|
4275
4307
|
border: `1px solid ${border}`,
|
|
4276
4308
|
position: 'relative',
|
|
@@ -4295,10 +4327,15 @@ function CarouselHero(props) {
|
|
|
4295
4327
|
zIndex: 1
|
|
4296
4328
|
},
|
|
4297
4329
|
children: [jsxs("div", {
|
|
4330
|
+
role: "group",
|
|
4331
|
+
"aria-roledescription": "slide",
|
|
4332
|
+
"aria-label": `Slide ${idx + 1} of ${slides.length}`,
|
|
4333
|
+
onTouchStart: onTouchStart,
|
|
4334
|
+
onTouchEnd: onTouchEnd,
|
|
4298
4335
|
style: {
|
|
4299
4336
|
position: 'relative',
|
|
4300
4337
|
width: '100%',
|
|
4301
|
-
height: 400,
|
|
4338
|
+
height: isMobile ? 240 : 400,
|
|
4302
4339
|
borderRadius: 16,
|
|
4303
4340
|
overflow: 'hidden',
|
|
4304
4341
|
background: ui$y.surface,
|
|
@@ -4307,12 +4344,12 @@ function CarouselHero(props) {
|
|
|
4307
4344
|
},
|
|
4308
4345
|
children: [current.image ? jsx("img", {
|
|
4309
4346
|
src: current.image,
|
|
4310
|
-
alt: current.title || `slide
|
|
4347
|
+
alt: current.title || `slide ${idx + 1}`,
|
|
4311
4348
|
style: {
|
|
4312
4349
|
width: '100%',
|
|
4313
4350
|
height: '100%',
|
|
4314
4351
|
objectFit: 'cover',
|
|
4315
|
-
transition: 'opacity 0.5s ease'
|
|
4352
|
+
transition: prefersReducedMotion ? 'none' : 'opacity 0.5s ease'
|
|
4316
4353
|
}
|
|
4317
4354
|
}) : jsxs("div", {
|
|
4318
4355
|
style: {
|
|
@@ -4327,7 +4364,7 @@ function CarouselHero(props) {
|
|
|
4327
4364
|
},
|
|
4328
4365
|
children: [jsx(Icon, {
|
|
4329
4366
|
name: "image",
|
|
4330
|
-
size: 64,
|
|
4367
|
+
size: isMobile ? 40 : 64,
|
|
4331
4368
|
color: ui$y.muted,
|
|
4332
4369
|
style: {
|
|
4333
4370
|
opacity: 0.55
|
|
@@ -4341,10 +4378,11 @@ function CarouselHero(props) {
|
|
|
4341
4378
|
},
|
|
4342
4379
|
children: ["Slide ", idx + 1]
|
|
4343
4380
|
})]
|
|
4344
|
-
}), slides.length > 1 && jsxs(Fragment, {
|
|
4381
|
+
}), slides.length > 1 && !isMobile && jsxs(Fragment, {
|
|
4345
4382
|
children: [jsx("button", {
|
|
4346
4383
|
type: "button",
|
|
4347
4384
|
onClick: prev,
|
|
4385
|
+
"aria-label": "Previous slide",
|
|
4348
4386
|
style: {
|
|
4349
4387
|
position: 'absolute',
|
|
4350
4388
|
left: 16,
|
|
@@ -4362,7 +4400,7 @@ function CarouselHero(props) {
|
|
|
4362
4400
|
justifyContent: 'center',
|
|
4363
4401
|
backdropFilter: 'blur(10px)',
|
|
4364
4402
|
boxShadow: '0 8px 24px rgba(9,9,11,0.16)',
|
|
4365
|
-
transition: 'all 0.2s ease'
|
|
4403
|
+
transition: prefersReducedMotion ? 'none' : 'all 0.2s ease'
|
|
4366
4404
|
},
|
|
4367
4405
|
children: jsx(Icon, {
|
|
4368
4406
|
name: "chevron-left",
|
|
@@ -4371,6 +4409,7 @@ function CarouselHero(props) {
|
|
|
4371
4409
|
}), jsx("button", {
|
|
4372
4410
|
type: "button",
|
|
4373
4411
|
onClick: next,
|
|
4412
|
+
"aria-label": "Next slide",
|
|
4374
4413
|
style: {
|
|
4375
4414
|
position: 'absolute',
|
|
4376
4415
|
right: 16,
|
|
@@ -4388,7 +4427,7 @@ function CarouselHero(props) {
|
|
|
4388
4427
|
justifyContent: 'center',
|
|
4389
4428
|
backdropFilter: 'blur(10px)',
|
|
4390
4429
|
boxShadow: '0 8px 24px rgba(9,9,11,0.16)',
|
|
4391
|
-
transition: 'all 0.2s ease'
|
|
4430
|
+
transition: prefersReducedMotion ? 'none' : 'all 0.2s ease'
|
|
4392
4431
|
},
|
|
4393
4432
|
children: jsx(Icon, {
|
|
4394
4433
|
name: "chevron-right",
|
|
@@ -4402,7 +4441,7 @@ function CarouselHero(props) {
|
|
|
4402
4441
|
},
|
|
4403
4442
|
children: [current.title && jsx("h2", {
|
|
4404
4443
|
style: {
|
|
4405
|
-
fontSize:
|
|
4444
|
+
fontSize: titlePx,
|
|
4406
4445
|
margin: 0,
|
|
4407
4446
|
fontWeight: 700,
|
|
4408
4447
|
color: fg,
|
|
@@ -4412,32 +4451,36 @@ function CarouselHero(props) {
|
|
|
4412
4451
|
children: current.title
|
|
4413
4452
|
}), current.subtitle && jsx("p", {
|
|
4414
4453
|
style: {
|
|
4415
|
-
fontSize:
|
|
4454
|
+
fontSize: subPx,
|
|
4416
4455
|
color: ui$y.muted,
|
|
4417
|
-
marginTop: 12,
|
|
4456
|
+
marginTop: isMobile ? 8 : 12,
|
|
4418
4457
|
marginBottom: 0,
|
|
4419
4458
|
lineHeight: 1.6
|
|
4420
4459
|
},
|
|
4421
4460
|
children: current.subtitle
|
|
4422
4461
|
})]
|
|
4423
4462
|
}), slides.length > 1 && jsx("div", {
|
|
4463
|
+
role: "tablist",
|
|
4464
|
+
"aria-label": "Slide navigation",
|
|
4424
4465
|
style: {
|
|
4425
4466
|
display: 'flex',
|
|
4426
|
-
gap: 10,
|
|
4467
|
+
gap: isMobile ? 6 : 10,
|
|
4427
4468
|
justifyContent: 'center'
|
|
4428
4469
|
},
|
|
4429
4470
|
children: slides.map((_, i) => jsx("button", {
|
|
4430
4471
|
type: "button",
|
|
4431
|
-
|
|
4472
|
+
role: "tab",
|
|
4473
|
+
"aria-selected": i === idx,
|
|
4432
4474
|
"aria-label": `Go to slide ${i + 1}`,
|
|
4475
|
+
onClick: () => setIdx(i),
|
|
4433
4476
|
style: {
|
|
4434
|
-
width: i === idx ? 32 : 10,
|
|
4477
|
+
width: i === idx ? isMobile ? 24 : 32 : isMobile ? 8 : 10,
|
|
4435
4478
|
height: 10,
|
|
4436
4479
|
borderRadius: 999,
|
|
4437
4480
|
border: `1px solid ${i === idx ? accent : border}`,
|
|
4438
4481
|
background: i === idx ? accent : ui$y.white,
|
|
4439
4482
|
cursor: 'pointer',
|
|
4440
|
-
transition: 'all 0.3s ease',
|
|
4483
|
+
transition: prefersReducedMotion ? 'none' : 'all 0.3s ease',
|
|
4441
4484
|
boxShadow: i === idx ? '0 1px 2px rgba(9,9,11,0.12)' : '0 1px 2px rgba(9,9,11,0.04)'
|
|
4442
4485
|
}
|
|
4443
4486
|
}, i))
|
|
@@ -4449,13 +4492,14 @@ function CarouselHero(props) {
|
|
|
4449
4492
|
const _excluded$N = ["as", "title", "subtitle", "bgImage", "overlay", "form", "buttonText", "onSubmit", "inputPlaceholder", "titleSize", "subtitleSize", "bgColor", "textColor", "accentColor", "borderColor", "fontFamily", "minH", "maxW", "px", "py", "radius", "gap", "style", "className"];
|
|
4450
4493
|
const ui$x = {
|
|
4451
4494
|
white: '#ffffff',
|
|
4452
|
-
black: '#09090b',
|
|
4453
4495
|
text: '#18181b',
|
|
4454
4496
|
muted: '#71717a',
|
|
4455
|
-
border: '#e4e4e7'
|
|
4497
|
+
border: '#e4e4e7'
|
|
4498
|
+
};
|
|
4456
4499
|
function CTAOverlayHero(props) {
|
|
4457
4500
|
var _t$minH, _t$maxW, _t$px, _t$py, _t$cardRadius, _t$gap, _ref, _ref2, _ref3, _ref4, _ref5;
|
|
4458
4501
|
const t = useHeroTheme();
|
|
4502
|
+
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
4459
4503
|
const {
|
|
4460
4504
|
as: Tag = 'section',
|
|
4461
4505
|
title = 'Transform Your Ideas Into Reality',
|
|
@@ -4483,12 +4527,16 @@ function CTAOverlayHero(props) {
|
|
|
4483
4527
|
className = ''
|
|
4484
4528
|
} = props,
|
|
4485
4529
|
rest = _objectWithoutPropertiesLoose(props, _excluded$N);
|
|
4486
|
-
const bg = (_ref = bgColor != null ? bgColor : t.bgColor) != null ? _ref :
|
|
4530
|
+
const bg = (_ref = bgColor != null ? bgColor : t.bgColor) != null ? _ref : '#ffffff';
|
|
4487
4531
|
const fg = (_ref2 = textColor != null ? textColor : t.textColor) != null ? _ref2 : ui$x.text;
|
|
4488
|
-
const accent = (_ref3 = accentColor != null ? accentColor : t.accentColor) != null ? _ref3 :
|
|
4532
|
+
const accent = (_ref3 = accentColor != null ? accentColor : t.accentColor) != null ? _ref3 : '#09090b';
|
|
4489
4533
|
const border = (_ref4 = (_ref5 = borderColor != null ? borderColor : t.cardBorder) != null ? _ref5 : t.borderColor) != null ? _ref4 : ui$x.border;
|
|
4490
4534
|
const [email, setEmail] = useState('');
|
|
4491
4535
|
const [isHovered, setIsHovered] = useState(false);
|
|
4536
|
+
const rPx = isMobile ? 16 : px;
|
|
4537
|
+
const pyPx = isMobile ? 32 : py;
|
|
4538
|
+
const titlePx = isMobile ? Math.max(28, Math.floor(titleSize * 0.6)) : titleSize;
|
|
4539
|
+
const subPx = isMobile ? Math.max(14, Math.floor(subtitleSize * 0.85)) : subtitleSize;
|
|
4492
4540
|
return jsxs(Tag, _extends({
|
|
4493
4541
|
className: className,
|
|
4494
4542
|
style: _extends({
|
|
@@ -4501,7 +4549,7 @@ function CTAOverlayHero(props) {
|
|
|
4501
4549
|
color: bgImage ? ui$x.white : fg,
|
|
4502
4550
|
fontFamily,
|
|
4503
4551
|
minHeight: typeof minH === 'number' ? `${minH}px` : minH,
|
|
4504
|
-
padding: `${
|
|
4552
|
+
padding: `${pyPx}px ${rPx}px`,
|
|
4505
4553
|
borderRadius: radius,
|
|
4506
4554
|
border: `1px solid ${border}`,
|
|
4507
4555
|
position: 'relative',
|
|
@@ -4517,8 +4565,9 @@ function CTAOverlayHero(props) {
|
|
|
4517
4565
|
background: bgImage ? `rgba(9,9,11,${overlay})` : 'linear-gradient(180deg, rgba(250,250,250,0.85), rgba(255,255,255,0))',
|
|
4518
4566
|
zIndex: 0
|
|
4519
4567
|
}
|
|
4520
|
-
}), !bgImage && jsxs(Fragment, {
|
|
4568
|
+
}), !bgImage && !isMobile && jsxs(Fragment, {
|
|
4521
4569
|
children: [jsx("div", {
|
|
4570
|
+
"aria-hidden": true,
|
|
4522
4571
|
style: {
|
|
4523
4572
|
position: 'absolute',
|
|
4524
4573
|
top: '12%',
|
|
@@ -4530,6 +4579,7 @@ function CTAOverlayHero(props) {
|
|
|
4530
4579
|
pointerEvents: 'none'
|
|
4531
4580
|
}
|
|
4532
4581
|
}), jsx("div", {
|
|
4582
|
+
"aria-hidden": true,
|
|
4533
4583
|
style: {
|
|
4534
4584
|
position: 'absolute',
|
|
4535
4585
|
bottom: '16%',
|
|
@@ -4554,7 +4604,7 @@ function CTAOverlayHero(props) {
|
|
|
4554
4604
|
children: [jsxs("div", {
|
|
4555
4605
|
children: [title && jsx("h2", {
|
|
4556
4606
|
style: {
|
|
4557
|
-
fontSize:
|
|
4607
|
+
fontSize: titlePx,
|
|
4558
4608
|
margin: 0,
|
|
4559
4609
|
fontWeight: 800,
|
|
4560
4610
|
lineHeight: 1.05,
|
|
@@ -4564,9 +4614,9 @@ function CTAOverlayHero(props) {
|
|
|
4564
4614
|
children: title
|
|
4565
4615
|
}), subtitle && jsx("p", {
|
|
4566
4616
|
style: {
|
|
4567
|
-
fontSize:
|
|
4617
|
+
fontSize: subPx,
|
|
4568
4618
|
color: bgImage ? 'rgba(255,255,255,0.78)' : ui$x.muted,
|
|
4569
|
-
marginTop: 20,
|
|
4619
|
+
marginTop: isMobile ? 12 : 20,
|
|
4570
4620
|
marginBottom: 0,
|
|
4571
4621
|
maxWidth: 640,
|
|
4572
4622
|
marginInline: 'auto',
|
|
@@ -4579,6 +4629,7 @@ function CTAOverlayHero(props) {
|
|
|
4579
4629
|
e.preventDefault();
|
|
4580
4630
|
onSubmit == null || onSubmit(Object.fromEntries(new FormData(e.currentTarget).entries()));
|
|
4581
4631
|
},
|
|
4632
|
+
"aria-label": "Email signup",
|
|
4582
4633
|
style: {
|
|
4583
4634
|
marginTop: 8,
|
|
4584
4635
|
display: 'inline-flex',
|
|
@@ -4614,30 +4665,32 @@ function CTAOverlayHero(props) {
|
|
|
4614
4665
|
value: email,
|
|
4615
4666
|
onChange: e => setEmail(e.target.value),
|
|
4616
4667
|
placeholder: inputPlaceholder,
|
|
4668
|
+
"aria-label": inputPlaceholder,
|
|
4617
4669
|
style: {
|
|
4618
|
-
padding:
|
|
4670
|
+
padding: `${isMobile ? 14 : 16}px ${isMobile ? 14 : 16}px ${isMobile ? 14 : 16}px 48px`,
|
|
4619
4671
|
border: 'none',
|
|
4620
4672
|
outline: 'none',
|
|
4621
4673
|
background: 'transparent',
|
|
4622
4674
|
color: bgImage ? ui$x.white : fg,
|
|
4623
|
-
width: 280,
|
|
4624
|
-
fontSize: 15,
|
|
4675
|
+
width: isMobile ? 200 : 280,
|
|
4676
|
+
fontSize: isMobile ? 14 : 15,
|
|
4625
4677
|
boxSizing: 'border-box'
|
|
4626
4678
|
}
|
|
4627
4679
|
})]
|
|
4628
4680
|
}), jsxs("button", {
|
|
4629
4681
|
type: "submit",
|
|
4682
|
+
"aria-label": buttonText,
|
|
4630
4683
|
onMouseEnter: () => setIsHovered(true),
|
|
4631
4684
|
onMouseLeave: () => setIsHovered(false),
|
|
4632
4685
|
style: {
|
|
4633
|
-
padding:
|
|
4686
|
+
padding: `${isMobile ? 12 : 16}px ${isMobile ? 20 : 28}px`,
|
|
4634
4687
|
borderRadius: 12,
|
|
4635
4688
|
border: `1px solid ${accent}`,
|
|
4636
4689
|
background: accent,
|
|
4637
4690
|
color: ui$x.white,
|
|
4638
4691
|
cursor: 'pointer',
|
|
4639
4692
|
fontWeight: 700,
|
|
4640
|
-
fontSize: 15,
|
|
4693
|
+
fontSize: isMobile ? 14 : 15,
|
|
4641
4694
|
display: 'flex',
|
|
4642
4695
|
alignItems: 'center',
|
|
4643
4696
|
gap: 8,
|
|
@@ -4654,21 +4707,22 @@ function CTAOverlayHero(props) {
|
|
|
4654
4707
|
style: {
|
|
4655
4708
|
marginTop: 8,
|
|
4656
4709
|
display: 'flex',
|
|
4657
|
-
gap: 16,
|
|
4710
|
+
gap: isMobile ? 12 : 16,
|
|
4658
4711
|
justifyContent: 'center',
|
|
4659
4712
|
flexWrap: 'wrap'
|
|
4660
4713
|
},
|
|
4661
4714
|
children: [jsxs("button", {
|
|
4662
4715
|
type: "button",
|
|
4716
|
+
"aria-label": buttonText,
|
|
4663
4717
|
style: {
|
|
4664
|
-
padding:
|
|
4718
|
+
padding: `${isMobile ? 12 : 16}px ${isMobile ? 24 : 32}px`,
|
|
4665
4719
|
borderRadius: 12,
|
|
4666
4720
|
border: `1px solid ${accent}`,
|
|
4667
4721
|
background: accent,
|
|
4668
4722
|
color: ui$x.white,
|
|
4669
4723
|
cursor: 'pointer',
|
|
4670
4724
|
fontWeight: 700,
|
|
4671
|
-
fontSize: 16,
|
|
4725
|
+
fontSize: isMobile ? 14 : 16,
|
|
4672
4726
|
display: 'flex',
|
|
4673
4727
|
alignItems: 'center',
|
|
4674
4728
|
gap: 8,
|
|
@@ -4680,15 +4734,16 @@ function CTAOverlayHero(props) {
|
|
|
4680
4734
|
})]
|
|
4681
4735
|
}), jsxs("button", {
|
|
4682
4736
|
type: "button",
|
|
4737
|
+
"aria-label": "Watch demo",
|
|
4683
4738
|
style: {
|
|
4684
|
-
padding:
|
|
4739
|
+
padding: `${isMobile ? 12 : 16}px ${isMobile ? 24 : 32}px`,
|
|
4685
4740
|
borderRadius: 12,
|
|
4686
4741
|
border: `1px solid ${bgImage ? 'rgba(255,255,255,0.22)' : border}`,
|
|
4687
4742
|
background: bgImage ? 'rgba(255,255,255,0.1)' : ui$x.white,
|
|
4688
4743
|
color: bgImage ? ui$x.white : fg,
|
|
4689
4744
|
cursor: 'pointer',
|
|
4690
4745
|
fontWeight: 600,
|
|
4691
|
-
fontSize: 16,
|
|
4746
|
+
fontSize: isMobile ? 14 : 16,
|
|
4692
4747
|
display: 'flex',
|
|
4693
4748
|
alignItems: 'center',
|
|
4694
4749
|
gap: 8,
|
|
@@ -4706,10 +4761,10 @@ function CTAOverlayHero(props) {
|
|
|
4706
4761
|
display: 'flex',
|
|
4707
4762
|
alignItems: 'center',
|
|
4708
4763
|
justifyContent: 'center',
|
|
4709
|
-
gap: 24,
|
|
4764
|
+
gap: isMobile ? 16 : 24,
|
|
4710
4765
|
flexWrap: 'wrap',
|
|
4711
4766
|
color: bgImage ? 'rgba(255,255,255,0.7)' : ui$x.muted,
|
|
4712
|
-
fontSize: 13,
|
|
4767
|
+
fontSize: isMobile ? 12 : 13,
|
|
4713
4768
|
fontWeight: 500
|
|
4714
4769
|
},
|
|
4715
4770
|
children: [jsx("span", {
|
|
@@ -5285,13 +5340,7 @@ function usePattern(kind, accent, intensity) {
|
|
|
5285
5340
|
return `linear-gradient(${accent}${Math.round(intensity * 16).toString(16).padStart(2, '0')} 1px, transparent 1px),
|
|
5286
5341
|
linear-gradient(90deg, ${accent}${Math.round(intensity * 16).toString(16).padStart(2, '0')} 1px, transparent 1px)`;
|
|
5287
5342
|
}
|
|
5288
|
-
return `repeating-linear-gradient(
|
|
5289
|
-
45deg,
|
|
5290
|
-
transparent,
|
|
5291
|
-
transparent 10px,
|
|
5292
|
-
${accent}${Math.round(intensity * 14).toString(16).padStart(2, '0')} 10px,
|
|
5293
|
-
${accent}${Math.round(intensity * 14).toString(16).padStart(2, '0')} 11px
|
|
5294
|
-
)`;
|
|
5343
|
+
return `repeating-linear-gradient(45deg, transparent, transparent 10px, ${accent}${Math.round(intensity * 14).toString(16).padStart(2, '0')} 10px, ${accent}${Math.round(intensity * 14).toString(16).padStart(2, '0')} 11px)`;
|
|
5295
5344
|
}, [kind, accent, intensity]);
|
|
5296
5345
|
}
|
|
5297
5346
|
const defaultStats = [{
|
|
@@ -5306,13 +5355,14 @@ const defaultStats = [{
|
|
|
5306
5355
|
}];
|
|
5307
5356
|
const ui$v = {
|
|
5308
5357
|
white: '#ffffff',
|
|
5309
|
-
black: '#09090b',
|
|
5310
5358
|
text: '#18181b',
|
|
5311
5359
|
muted: '#71717a',
|
|
5312
|
-
border: '#e4e4e7'
|
|
5360
|
+
border: '#e4e4e7'
|
|
5361
|
+
};
|
|
5313
5362
|
function PatternedHero(props) {
|
|
5314
5363
|
var _t$minH, _t$maxW, _t$px, _t$py, _t$cardRadius, _t$gap, _ref, _ref2, _ref3, _ref4, _ref5;
|
|
5315
5364
|
const t = useHeroTheme();
|
|
5365
|
+
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
5316
5366
|
const {
|
|
5317
5367
|
as: Tag = 'section',
|
|
5318
5368
|
title = 'Built for Modern Development',
|
|
@@ -5340,13 +5390,17 @@ function PatternedHero(props) {
|
|
|
5340
5390
|
className = ''
|
|
5341
5391
|
} = props,
|
|
5342
5392
|
rest = _objectWithoutPropertiesLoose(props, _excluded$L);
|
|
5343
|
-
const bg = (_ref = bgColor != null ? bgColor : t.bgColor) != null ? _ref :
|
|
5393
|
+
const bg = (_ref = bgColor != null ? bgColor : t.bgColor) != null ? _ref : '#ffffff';
|
|
5344
5394
|
const fg = (_ref2 = textColor != null ? textColor : t.textColor) != null ? _ref2 : ui$v.text;
|
|
5345
|
-
const accent = (_ref3 = accentColor != null ? accentColor : t.accentColor) != null ? _ref3 :
|
|
5395
|
+
const accent = (_ref3 = accentColor != null ? accentColor : t.accentColor) != null ? _ref3 : '#09090b';
|
|
5346
5396
|
const border = (_ref4 = (_ref5 = borderColor != null ? borderColor : t.cardBorder) != null ? _ref5 : t.borderColor) != null ? _ref4 : ui$v.border;
|
|
5347
|
-
const patternBg = usePattern(pattern, accent, intensity);
|
|
5397
|
+
const patternBg = usePattern(pattern, accent, isMobile ? intensity * 0.6 : intensity);
|
|
5348
5398
|
const sz = pattern === 'dots' ? '20px 20px' : pattern === 'grid' ? '32px 32px' : undefined;
|
|
5349
5399
|
const [hover, setHover] = useState(false);
|
|
5400
|
+
const rPx = isMobile ? 16 : px;
|
|
5401
|
+
const pyPx = isMobile ? 32 : py;
|
|
5402
|
+
const titlePx = isMobile ? Math.max(28, Math.floor(titleSize * 0.6)) : titleSize;
|
|
5403
|
+
const subPx = isMobile ? Math.max(14, Math.floor(subtitleSize * 0.85)) : subtitleSize;
|
|
5350
5404
|
return jsxs(Tag, _extends({
|
|
5351
5405
|
className: className,
|
|
5352
5406
|
style: _extends({
|
|
@@ -5356,7 +5410,7 @@ function PatternedHero(props) {
|
|
|
5356
5410
|
color: fg,
|
|
5357
5411
|
fontFamily,
|
|
5358
5412
|
minHeight: typeof minH === 'number' ? `${minH}px` : minH,
|
|
5359
|
-
padding: `${
|
|
5413
|
+
padding: `${pyPx}px ${rPx}px`,
|
|
5360
5414
|
borderRadius: radius,
|
|
5361
5415
|
border: `1px solid ${border}`,
|
|
5362
5416
|
position: 'relative',
|
|
@@ -5372,7 +5426,7 @@ function PatternedHero(props) {
|
|
|
5372
5426
|
backgroundImage: patternBg,
|
|
5373
5427
|
backgroundSize: sz,
|
|
5374
5428
|
zIndex: 0,
|
|
5375
|
-
opacity: 0.8
|
|
5429
|
+
opacity: isMobile ? 0.4 : 0.8
|
|
5376
5430
|
}
|
|
5377
5431
|
}), jsx("div", {
|
|
5378
5432
|
"aria-hidden": true,
|
|
@@ -5382,7 +5436,7 @@ function PatternedHero(props) {
|
|
|
5382
5436
|
background: 'linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0))',
|
|
5383
5437
|
zIndex: 0
|
|
5384
5438
|
}
|
|
5385
|
-
}), jsx("div", {
|
|
5439
|
+
}), !isMobile && jsx("div", {
|
|
5386
5440
|
"aria-hidden": true,
|
|
5387
5441
|
style: {
|
|
5388
5442
|
position: 'absolute',
|
|
@@ -5415,7 +5469,7 @@ function PatternedHero(props) {
|
|
|
5415
5469
|
color: fg,
|
|
5416
5470
|
fontSize: 13,
|
|
5417
5471
|
fontWeight: 600,
|
|
5418
|
-
marginBottom: 24,
|
|
5472
|
+
marginBottom: isMobile ? 16 : 24,
|
|
5419
5473
|
boxShadow: '0 1px 2px rgba(9,9,11,0.04)'
|
|
5420
5474
|
},
|
|
5421
5475
|
children: [jsx(Icon, {
|
|
@@ -5424,7 +5478,7 @@ function PatternedHero(props) {
|
|
|
5424
5478
|
}), badge]
|
|
5425
5479
|
}), title && jsx("h2", {
|
|
5426
5480
|
style: {
|
|
5427
|
-
fontSize:
|
|
5481
|
+
fontSize: titlePx,
|
|
5428
5482
|
margin: 0,
|
|
5429
5483
|
fontWeight: 800,
|
|
5430
5484
|
lineHeight: 1.05,
|
|
@@ -5434,9 +5488,9 @@ function PatternedHero(props) {
|
|
|
5434
5488
|
children: title
|
|
5435
5489
|
}), subtitle && jsx("p", {
|
|
5436
5490
|
style: {
|
|
5437
|
-
fontSize:
|
|
5491
|
+
fontSize: subPx,
|
|
5438
5492
|
color: ui$v.muted,
|
|
5439
|
-
marginTop: 20,
|
|
5493
|
+
marginTop: isMobile ? 12 : 20,
|
|
5440
5494
|
marginBottom: 0,
|
|
5441
5495
|
maxWidth: 640,
|
|
5442
5496
|
marginInline: 'auto',
|
|
@@ -5445,24 +5499,25 @@ function PatternedHero(props) {
|
|
|
5445
5499
|
children: subtitle
|
|
5446
5500
|
}), jsx("div", {
|
|
5447
5501
|
style: {
|
|
5448
|
-
marginTop: 32,
|
|
5502
|
+
marginTop: isMobile ? 24 : 32,
|
|
5449
5503
|
display: 'flex',
|
|
5450
5504
|
justifyContent: 'center'
|
|
5451
5505
|
},
|
|
5452
5506
|
children: jsxs("button", {
|
|
5453
5507
|
type: "button",
|
|
5454
5508
|
onClick: onCta,
|
|
5509
|
+
"aria-label": ctaLabel,
|
|
5455
5510
|
onMouseEnter: () => setHover(true),
|
|
5456
5511
|
onMouseLeave: () => setHover(false),
|
|
5457
5512
|
style: {
|
|
5458
|
-
padding:
|
|
5513
|
+
padding: `${isMobile ? 12 : 16}px ${isMobile ? 24 : 32}px`,
|
|
5459
5514
|
borderRadius: 12,
|
|
5460
5515
|
border: `1px solid ${accent}`,
|
|
5461
5516
|
background: accent,
|
|
5462
5517
|
color: ui$v.white,
|
|
5463
5518
|
cursor: 'pointer',
|
|
5464
5519
|
fontWeight: 700,
|
|
5465
|
-
fontSize: 16,
|
|
5520
|
+
fontSize: isMobile ? 14 : 16,
|
|
5466
5521
|
display: 'flex',
|
|
5467
5522
|
alignItems: 'center',
|
|
5468
5523
|
gap: 8,
|
|
@@ -5477,10 +5532,10 @@ function PatternedHero(props) {
|
|
|
5477
5532
|
})
|
|
5478
5533
|
}), stats.length > 0 && jsx("div", {
|
|
5479
5534
|
style: {
|
|
5480
|
-
marginTop: 52,
|
|
5535
|
+
marginTop: isMobile ? 32 : 52,
|
|
5481
5536
|
display: 'flex',
|
|
5482
5537
|
justifyContent: 'center',
|
|
5483
|
-
gap: 48,
|
|
5538
|
+
gap: isMobile ? 24 : 48,
|
|
5484
5539
|
flexWrap: 'wrap'
|
|
5485
5540
|
},
|
|
5486
5541
|
children: stats.map((s, i) => jsxs("div", {
|
|
@@ -5489,7 +5544,7 @@ function PatternedHero(props) {
|
|
|
5489
5544
|
},
|
|
5490
5545
|
children: [jsx("div", {
|
|
5491
5546
|
style: {
|
|
5492
|
-
fontSize: 32,
|
|
5547
|
+
fontSize: isMobile ? 24 : 32,
|
|
5493
5548
|
fontWeight: 800,
|
|
5494
5549
|
color: fg,
|
|
5495
5550
|
letterSpacing: '-0.03em'
|
|
@@ -5497,7 +5552,7 @@ function PatternedHero(props) {
|
|
|
5497
5552
|
children: s.value
|
|
5498
5553
|
}), jsx("div", {
|
|
5499
5554
|
style: {
|
|
5500
|
-
fontSize: 13,
|
|
5555
|
+
fontSize: isMobile ? 12 : 13,
|
|
5501
5556
|
color: ui$v.muted,
|
|
5502
5557
|
marginTop: 6,
|
|
5503
5558
|
fontWeight: 500
|
|
@@ -5517,10 +5572,12 @@ const ui$u = {
|
|
|
5517
5572
|
text: '#18181b',
|
|
5518
5573
|
muted: '#71717a',
|
|
5519
5574
|
border: '#e4e4e7',
|
|
5520
|
-
surface: '#fafafa'
|
|
5575
|
+
surface: '#fafafa'
|
|
5576
|
+
};
|
|
5521
5577
|
function SplitHero(props) {
|
|
5522
5578
|
var _t$minH, _t$maxW, _t$px, _t$py, _t$cardRadius, _t$gap, _ref, _ref2, _ref3, _ref4, _ref5;
|
|
5523
5579
|
const t = useHeroTheme();
|
|
5580
|
+
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
5524
5581
|
const {
|
|
5525
5582
|
as: Tag = 'section',
|
|
5526
5583
|
title = 'Everything You Need to Succeed',
|
|
@@ -5555,6 +5612,10 @@ function SplitHero(props) {
|
|
|
5555
5612
|
const accent = (_ref3 = accentColor != null ? accentColor : t.accentColor) != null ? _ref3 : ui$u.black;
|
|
5556
5613
|
const border = (_ref4 = (_ref5 = borderColor != null ? borderColor : t.cardBorder) != null ? _ref5 : t.borderColor) != null ? _ref4 : ui$u.border;
|
|
5557
5614
|
const [hover, setHover] = useState(false);
|
|
5615
|
+
const rPx = isMobile ? 16 : px;
|
|
5616
|
+
const pyPx = isMobile ? 32 : py;
|
|
5617
|
+
const titlePx = isMobile ? Math.max(24, Math.floor(titleSize * 0.65)) : titleSize;
|
|
5618
|
+
const subPx = isMobile ? Math.max(14, Math.floor(subtitleSize * 0.85)) : subtitleSize;
|
|
5558
5619
|
return jsxs(Tag, _extends({
|
|
5559
5620
|
className: className,
|
|
5560
5621
|
style: _extends({
|
|
@@ -5564,7 +5625,7 @@ function SplitHero(props) {
|
|
|
5564
5625
|
color: fg,
|
|
5565
5626
|
fontFamily,
|
|
5566
5627
|
minHeight: typeof minH === 'number' ? `${minH}px` : minH,
|
|
5567
|
-
padding: `${
|
|
5628
|
+
padding: `${pyPx}px ${rPx}px`,
|
|
5568
5629
|
borderRadius: radius,
|
|
5569
5630
|
border: `1px solid ${border}`,
|
|
5570
5631
|
position: 'relative',
|
|
@@ -5580,7 +5641,7 @@ function SplitHero(props) {
|
|
|
5580
5641
|
background: 'linear-gradient(180deg, rgba(250,250,250,0.72), rgba(255,255,255,0))',
|
|
5581
5642
|
pointerEvents: 'none'
|
|
5582
5643
|
}
|
|
5583
|
-
}), jsx("div", {
|
|
5644
|
+
}), !isMobile && jsx("div", {
|
|
5584
5645
|
"aria-hidden": true,
|
|
5585
5646
|
style: {
|
|
5586
5647
|
position: 'absolute',
|
|
@@ -5598,8 +5659,8 @@ function SplitHero(props) {
|
|
|
5598
5659
|
width: '100%',
|
|
5599
5660
|
maxWidth: maxW,
|
|
5600
5661
|
display: 'grid',
|
|
5601
|
-
gridTemplateColumns: '1fr 1fr',
|
|
5602
|
-
gap,
|
|
5662
|
+
gridTemplateColumns: isMobile ? '1fr' : '1fr 1fr',
|
|
5663
|
+
gap: isMobile ? 32 : gap,
|
|
5603
5664
|
alignItems: 'center',
|
|
5604
5665
|
direction: reverse ? 'rtl' : 'ltr',
|
|
5605
5666
|
position: 'relative',
|
|
@@ -5621,7 +5682,7 @@ function SplitHero(props) {
|
|
|
5621
5682
|
color: fg,
|
|
5622
5683
|
fontSize: 13,
|
|
5623
5684
|
fontWeight: 600,
|
|
5624
|
-
marginBottom: 24,
|
|
5685
|
+
marginBottom: isMobile ? 16 : 24,
|
|
5625
5686
|
boxShadow: '0 1px 2px rgba(9,9,11,0.04)'
|
|
5626
5687
|
},
|
|
5627
5688
|
children: [jsx(Icon, {
|
|
@@ -5630,7 +5691,7 @@ function SplitHero(props) {
|
|
|
5630
5691
|
}), badge]
|
|
5631
5692
|
}), title && jsx("h2", {
|
|
5632
5693
|
style: {
|
|
5633
|
-
fontSize:
|
|
5694
|
+
fontSize: titlePx,
|
|
5634
5695
|
margin: 0,
|
|
5635
5696
|
fontWeight: 800,
|
|
5636
5697
|
lineHeight: 1.08,
|
|
@@ -5640,9 +5701,9 @@ function SplitHero(props) {
|
|
|
5640
5701
|
children: title
|
|
5641
5702
|
}), subtitle && jsx("p", {
|
|
5642
5703
|
style: {
|
|
5643
|
-
fontSize:
|
|
5704
|
+
fontSize: subPx,
|
|
5644
5705
|
color: ui$u.muted,
|
|
5645
|
-
marginTop: 18,
|
|
5706
|
+
marginTop: isMobile ? 12 : 18,
|
|
5646
5707
|
marginBottom: 0,
|
|
5647
5708
|
lineHeight: 1.7
|
|
5648
5709
|
},
|
|
@@ -5651,7 +5712,7 @@ function SplitHero(props) {
|
|
|
5651
5712
|
style: {
|
|
5652
5713
|
listStyle: 'none',
|
|
5653
5714
|
padding: 0,
|
|
5654
|
-
margin:
|
|
5715
|
+
margin: `${isMobile ? 20 : 28}px 0 0`,
|
|
5655
5716
|
display: 'flex',
|
|
5656
5717
|
flexDirection: 'column',
|
|
5657
5718
|
gap: 14
|
|
@@ -5661,7 +5722,7 @@ function SplitHero(props) {
|
|
|
5661
5722
|
display: 'flex',
|
|
5662
5723
|
alignItems: 'center',
|
|
5663
5724
|
gap: 12,
|
|
5664
|
-
fontSize: 15,
|
|
5725
|
+
fontSize: isMobile ? 14 : 15,
|
|
5665
5726
|
color: fg,
|
|
5666
5727
|
fontWeight: 500
|
|
5667
5728
|
},
|
|
@@ -5687,22 +5748,23 @@ function SplitHero(props) {
|
|
|
5687
5748
|
}, i))
|
|
5688
5749
|
}), jsx("div", {
|
|
5689
5750
|
style: {
|
|
5690
|
-
marginTop: 36
|
|
5751
|
+
marginTop: isMobile ? 24 : 36
|
|
5691
5752
|
},
|
|
5692
5753
|
children: jsxs("button", {
|
|
5693
5754
|
type: "button",
|
|
5694
5755
|
onClick: onCta,
|
|
5756
|
+
"aria-label": ctaLabel,
|
|
5695
5757
|
onMouseEnter: () => setHover(true),
|
|
5696
5758
|
onMouseLeave: () => setHover(false),
|
|
5697
5759
|
style: {
|
|
5698
|
-
padding:
|
|
5760
|
+
padding: `${isMobile ? 12 : 16}px ${isMobile ? 24 : 32}px`,
|
|
5699
5761
|
borderRadius: 12,
|
|
5700
5762
|
border: `1px solid ${accent}`,
|
|
5701
5763
|
background: accent,
|
|
5702
5764
|
color: ui$u.white,
|
|
5703
5765
|
cursor: 'pointer',
|
|
5704
5766
|
fontWeight: 700,
|
|
5705
|
-
fontSize: 16,
|
|
5767
|
+
fontSize: isMobile ? 14 : 16,
|
|
5706
5768
|
display: 'inline-flex',
|
|
5707
5769
|
alignItems: 'center',
|
|
5708
5770
|
gap: 8,
|
|
@@ -5716,7 +5778,7 @@ function SplitHero(props) {
|
|
|
5716
5778
|
})]
|
|
5717
5779
|
})
|
|
5718
5780
|
})]
|
|
5719
|
-
}), jsx("div", {
|
|
5781
|
+
}), !isMobile && jsx("div", {
|
|
5720
5782
|
style: {
|
|
5721
5783
|
direction: 'ltr'
|
|
5722
5784
|
},
|
|
@@ -5781,6 +5843,7 @@ const ui$t = {
|
|
|
5781
5843
|
function VideoHeaderHero(props) {
|
|
5782
5844
|
var _t$minH, _t$maxW, _t$px, _t$py, _t$cardRadius, _ref, _ref2, _ref3, _ref4, _ref5;
|
|
5783
5845
|
const t = useHeroTheme();
|
|
5846
|
+
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
5784
5847
|
const {
|
|
5785
5848
|
as: Tag = 'section',
|
|
5786
5849
|
videoSrc,
|
|
@@ -5812,8 +5875,13 @@ function VideoHeaderHero(props) {
|
|
|
5812
5875
|
const fg = (_ref2 = textColor != null ? textColor : t.textColor) != null ? _ref2 : ui$t.white;
|
|
5813
5876
|
const border = (_ref3 = (_ref4 = borderColor != null ? borderColor : t.cardBorder) != null ? _ref4 : t.borderColor) != null ? _ref3 : ui$t.border;
|
|
5814
5877
|
const accent = (_ref5 = accentColor != null ? accentColor : t.accentColor) != null ? _ref5 : ui$t.white;
|
|
5878
|
+
const rPx = isMobile ? 16 : px;
|
|
5879
|
+
const pyPx = isMobile ? 32 : py;
|
|
5880
|
+
const titlePx = isMobile ? Math.max(28, Math.floor(titleSize * 0.65)) : titleSize;
|
|
5881
|
+
const subPx = isMobile ? Math.max(14, Math.floor(subtitleSize * 0.85)) : subtitleSize;
|
|
5815
5882
|
return jsxs(Tag, _extends({
|
|
5816
5883
|
className: className,
|
|
5884
|
+
"aria-label": title,
|
|
5817
5885
|
style: _extends({
|
|
5818
5886
|
display: 'grid',
|
|
5819
5887
|
placeItems: 'center',
|
|
@@ -5821,7 +5889,7 @@ function VideoHeaderHero(props) {
|
|
|
5821
5889
|
color: fg,
|
|
5822
5890
|
fontFamily,
|
|
5823
5891
|
minHeight: typeof minH === 'number' ? `${minH}px` : minH,
|
|
5824
|
-
padding: `${
|
|
5892
|
+
padding: `${pyPx}px ${rPx}px`,
|
|
5825
5893
|
borderRadius: radius,
|
|
5826
5894
|
border: `1px solid ${border}`,
|
|
5827
5895
|
position: 'relative',
|
|
@@ -5836,6 +5904,7 @@ function VideoHeaderHero(props) {
|
|
|
5836
5904
|
loop: loop,
|
|
5837
5905
|
controls: controls,
|
|
5838
5906
|
poster: poster,
|
|
5907
|
+
"aria-hidden": "true",
|
|
5839
5908
|
style: {
|
|
5840
5909
|
position: 'absolute',
|
|
5841
5910
|
inset: 0,
|
|
@@ -5852,17 +5921,11 @@ function VideoHeaderHero(props) {
|
|
|
5852
5921
|
style: {
|
|
5853
5922
|
position: 'absolute',
|
|
5854
5923
|
inset: 0,
|
|
5855
|
-
background: `
|
|
5856
|
-
linear-gradient(
|
|
5857
|
-
180deg,
|
|
5858
|
-
rgba(9,9,11,${overlay * 0.7}),
|
|
5859
|
-
rgba(9,9,11,${overlay})
|
|
5860
|
-
)
|
|
5861
|
-
`,
|
|
5924
|
+
background: `linear-gradient(180deg, rgba(9,9,11,${overlay * 0.7}), rgba(9,9,11,${overlay}))`,
|
|
5862
5925
|
backdropFilter: 'blur(1px)',
|
|
5863
5926
|
zIndex: 1
|
|
5864
5927
|
}
|
|
5865
|
-
}), jsx("div", {
|
|
5928
|
+
}), !isMobile && jsx("div", {
|
|
5866
5929
|
"aria-hidden": true,
|
|
5867
5930
|
style: {
|
|
5868
5931
|
position: 'absolute',
|
|
@@ -5887,7 +5950,7 @@ function VideoHeaderHero(props) {
|
|
|
5887
5950
|
},
|
|
5888
5951
|
children: [title && jsx("h2", {
|
|
5889
5952
|
style: {
|
|
5890
|
-
fontSize:
|
|
5953
|
+
fontSize: titlePx,
|
|
5891
5954
|
margin: 0,
|
|
5892
5955
|
fontWeight: 800,
|
|
5893
5956
|
lineHeight: 1.05,
|
|
@@ -5897,9 +5960,9 @@ function VideoHeaderHero(props) {
|
|
|
5897
5960
|
children: title
|
|
5898
5961
|
}), subtitle && jsx("p", {
|
|
5899
5962
|
style: {
|
|
5900
|
-
fontSize:
|
|
5963
|
+
fontSize: subPx,
|
|
5901
5964
|
color: ui$t.muted,
|
|
5902
|
-
marginTop: 20,
|
|
5965
|
+
marginTop: isMobile ? 12 : 20,
|
|
5903
5966
|
marginBottom: 0,
|
|
5904
5967
|
maxWidth: 640,
|
|
5905
5968
|
marginInline: 'auto',
|
|
@@ -5911,7 +5974,7 @@ function VideoHeaderHero(props) {
|
|
|
5911
5974
|
width: 72,
|
|
5912
5975
|
height: 1,
|
|
5913
5976
|
background: `linear-gradient(90deg, transparent, ${accent}, transparent)`,
|
|
5914
|
-
margin:
|
|
5977
|
+
margin: `${isMobile ? 24 : 36}px auto 0`,
|
|
5915
5978
|
opacity: 0.6
|
|
5916
5979
|
}
|
|
5917
5980
|
})]
|