@deriv-web-design/ui 0.1.10 → 0.1.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.
@@ -3418,7 +3418,7 @@
3418
3418
  "name": "Hero",
3419
3419
  "component": "Hero",
3420
3420
  "category": "hero",
3421
- "description": "Landing hero with title, description and CTA buttons. Three layouts: split (right-side image), centered (background image), showcase (product + floating images).",
3421
+ "description": "Landing hero with title, description and CTA buttons. Three layouts: split (right-side image + optional device mockup behind it), centered (background image), showcase (product + floating images).",
3422
3422
  "purpose": "The primary hero section used to introduce a page with a strong title, supporting description, primary call-to-action, and optional secondary action. Exposed as a single `Hero` component with a required `variant` prop selecting one of three layouts: `split` (dark background, left-aligned text, right-side hero image), `centered` (full background image, center-aligned text), or `showcase` (dark background with a large product image and a smaller floating image below the buttons). This block is designed to be the first visible section of a landing page.",
3423
3423
  "keywords": [
3424
3424
  "hero",
@@ -3500,7 +3500,11 @@
3500
3500
  "floatingImage": {
3501
3501
  "type": "image",
3502
3502
  "required": false,
3503
- "description": "Smaller floating image below productImage in the Showcase variant. Accepts a ReactNode in code; page builders should pass an image URL string."
3503
+ "supportedVariants": [
3504
+ "split",
3505
+ "showcase"
3506
+ ],
3507
+ "description": "Secondary foreground image. In Showcase it sits below productImage, cropped to 1:1. In Split it is a small layer anchored to the hero's lower inline-end, painted behind heroImage and hidden below 992px; portrait assets keep their natural aspect ratio. Accepts a ReactNode in code; page builders should pass an image URL string."
3504
3508
  },
3505
3509
  "heroImage": {
3506
3510
  "type": "image",
@@ -2290,7 +2290,7 @@
2290
2290
  "floatingImage": {
2291
2291
  "type": "ReactNode",
2292
2292
  "required": false,
2293
- "description": "Smaller floating image shown below the productImage in the Showcase variant. Accepts a ReactNode or image URL string."
2293
+ "description": "Secondary foreground image. Accepts a ReactNode or image URL string. In the Showcase variant it sits below `productImage`, cropped to a 1:1 box. In the Split variant it is a small layer anchored to the hero's lower inline-end and painted behind `heroImage` so the subject overlaps it; it keeps its natural aspect ratio (no crop) and is hidden below 992px."
2294
2294
  },
2295
2295
  "heroImage": {
2296
2296
  "type": "ReactNode",
package/dist/index.css CHANGED
@@ -2834,8 +2834,10 @@
2834
2834
  --hero-body-lh: var(--typography-body-md-line-height);
2835
2835
  --hero-split-padding-top-mobile: var(--spacing-80);
2836
2836
  --hero-split-padding-top-tablet: var(--spacing-96);
2837
- --hero-split-radius: 1.5rem;
2838
2837
  --hero-split-min-height: 35.25rem;
2838
+ --hero-split-floating-width: 16%;
2839
+ --hero-split-floating-inset-inline-end: 28%;
2840
+ --hero-split-floating-inset-bottom: 17%;
2839
2841
  --hero-shrink-radius: 3.5rem;
2840
2842
  --hero-padding-top-mobile: var(--spacing-80);
2841
2843
  --hero-padding-top-tablet: var(--spacing-96);
@@ -2911,17 +2913,19 @@
2911
2913
  }
2912
2914
  .hero--split {
2913
2915
  background-position: left center;
2914
- border-bottom-left-radius: var(--hero-split-radius);
2915
- border-bottom-right-radius: var(--hero-split-radius);
2916
2916
  animation: hero-split-shrink linear both;
2917
2917
  animation-timeline: view();
2918
2918
  animation-range: exit 0% exit 40%;
2919
2919
  }
2920
2920
  @keyframes hero-split-shrink {
2921
2921
  0% {
2922
+ border-bottom-left-radius: 0px;
2923
+ border-bottom-right-radius: 0px;
2922
2924
  scale: 1;
2923
2925
  }
2924
2926
  100% {
2927
+ border-bottom-left-radius: var(--hero-shrink-radius);
2928
+ border-bottom-right-radius: var(--hero-shrink-radius);
2925
2929
  scale: 0.94;
2926
2930
  }
2927
2931
  }
@@ -2978,6 +2982,10 @@
2978
2982
  height: 100%;
2979
2983
  display: block;
2980
2984
  }
2985
+ .hero--split .hero__floating-image {
2986
+ display: none;
2987
+ pointer-events: none;
2988
+ }
2981
2989
  .hero--split .hero__text {
2982
2990
  gap: 0;
2983
2991
  }
@@ -3212,9 +3220,6 @@
3212
3220
  .hero__inner {
3213
3221
  padding: var(--spacing-48) var(--spacing-32);
3214
3222
  }
3215
- .hero--split {
3216
- --hero-split-radius: 4rem;
3217
- }
3218
3223
  .hero--split .hero__inner {
3219
3224
  max-width: var(--content-width-1280);
3220
3225
  padding-top: 0;
@@ -3257,6 +3262,20 @@
3257
3262
  object-fit: contain;
3258
3263
  object-position: 40% 100%;
3259
3264
  }
3265
+ .hero--split .hero__floating-image {
3266
+ display: block;
3267
+ position: absolute;
3268
+ width: var(--hero-split-floating-width);
3269
+ inset-inline-end: var(--hero-split-floating-inset-inline-end);
3270
+ bottom: var(--hero-split-floating-inset-bottom);
3271
+ z-index: 1;
3272
+ }
3273
+ .hero--split .hero__floating-image img,
3274
+ .hero--split .hero__floating-image > *:not(img) {
3275
+ display: block;
3276
+ width: 100%;
3277
+ height: auto;
3278
+ }
3260
3279
  .hero--split .hero__buttons {
3261
3280
  flex-direction: row;
3262
3281
  align-items: center;