@deriv-web-design/ui 0.1.9 → 0.1.11

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.d.mts CHANGED
@@ -593,8 +593,11 @@ interface HeroProps extends HTMLAttributes<HTMLElement> {
593
593
  */
594
594
  productImage?: ReactNode | string;
595
595
  /**
596
- * Smaller floating image shown below the productImage in the Showcase variant.
597
- * Accepts a ReactNode or image URL string.
596
+ * Secondary foreground image. Accepts a ReactNode or image URL string.
597
+ * In the Showcase variant it sits below `productImage`, cropped to a 1:1 box.
598
+ * In the Split variant it is a small layer anchored to the hero's lower
599
+ * inline-end and painted behind `heroImage` so the subject overlaps it; it
600
+ * keeps its natural aspect ratio (no crop) and is hidden below 992px.
598
601
  */
599
602
  floatingImage?: ReactNode | string;
600
603
  }
@@ -667,9 +670,16 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
667
670
  * The field always renders for that variant; this prop only customises it.
668
671
  */
669
672
  search?: HeaderSearchProps;
673
+ /**
674
+ * Set to `true` when the fixed `Navbar` is rendered above this header (it is
675
+ * the first section on the page). Reserves top clearance equal to the navbar's
676
+ * footprint so the vertically-centred title never slides under the fixed pill.
677
+ * Defaults to `false` — leave it off when there is no navbar above the header.
678
+ */
679
+ underNavbar?: boolean;
670
680
  }
671
681
 
672
- declare const Header: ({ variant, subtitle, title, description, primaryButton, secondaryButton, leftVisual, rightVisual, search, className, ...props }: HeaderProps) => react_jsx_runtime.JSX.Element;
682
+ declare const Header: ({ variant, subtitle, title, description, primaryButton, secondaryButton, leftVisual, rightVisual, search, underNavbar, className, ...props }: HeaderProps) => react_jsx_runtime.JSX.Element;
673
683
 
674
684
  interface StatItem {
675
685
  /** Numeric or short display value, e.g. "2.5M+" */
package/dist/index.d.ts CHANGED
@@ -593,8 +593,11 @@ interface HeroProps extends HTMLAttributes<HTMLElement> {
593
593
  */
594
594
  productImage?: ReactNode | string;
595
595
  /**
596
- * Smaller floating image shown below the productImage in the Showcase variant.
597
- * Accepts a ReactNode or image URL string.
596
+ * Secondary foreground image. Accepts a ReactNode or image URL string.
597
+ * In the Showcase variant it sits below `productImage`, cropped to a 1:1 box.
598
+ * In the Split variant it is a small layer anchored to the hero's lower
599
+ * inline-end and painted behind `heroImage` so the subject overlaps it; it
600
+ * keeps its natural aspect ratio (no crop) and is hidden below 992px.
598
601
  */
599
602
  floatingImage?: ReactNode | string;
600
603
  }
@@ -667,9 +670,16 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
667
670
  * The field always renders for that variant; this prop only customises it.
668
671
  */
669
672
  search?: HeaderSearchProps;
673
+ /**
674
+ * Set to `true` when the fixed `Navbar` is rendered above this header (it is
675
+ * the first section on the page). Reserves top clearance equal to the navbar's
676
+ * footprint so the vertically-centred title never slides under the fixed pill.
677
+ * Defaults to `false` — leave it off when there is no navbar above the header.
678
+ */
679
+ underNavbar?: boolean;
670
680
  }
671
681
 
672
- declare const Header: ({ variant, subtitle, title, description, primaryButton, secondaryButton, leftVisual, rightVisual, search, className, ...props }: HeaderProps) => react_jsx_runtime.JSX.Element;
682
+ declare const Header: ({ variant, subtitle, title, description, primaryButton, secondaryButton, leftVisual, rightVisual, search, underNavbar, className, ...props }: HeaderProps) => react_jsx_runtime.JSX.Element;
673
683
 
674
684
  interface StatItem {
675
685
  /** Numeric or short display value, e.g. "2.5M+" */
package/dist/index.js CHANGED
@@ -1927,6 +1927,14 @@ var Hero = ({
1927
1927
  ...props,
1928
1928
  children: [
1929
1929
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hero__overlay", "aria-hidden": "true" }),
1930
+ floatingImage && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1931
+ Visual,
1932
+ {
1933
+ src: floatingImage,
1934
+ className: "hero__floating-image",
1935
+ alt: ""
1936
+ }
1937
+ ),
1930
1938
  heroImage && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Visual, { src: heroImage, className: "hero__image-slot", alt: "" }),
1931
1939
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hero__inner", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hero__content", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hero__left", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "hero__body", children: [
1932
1940
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "hero__text", children: [
@@ -2089,6 +2097,7 @@ var Header = ({
2089
2097
  leftVisual,
2090
2098
  rightVisual,
2091
2099
  search,
2100
+ underNavbar = false,
2092
2101
  className,
2093
2102
  ...props
2094
2103
  }) => {
@@ -2135,7 +2144,7 @@ var Header = ({
2135
2144
  "section",
2136
2145
  {
2137
2146
  ref: sectionRef,
2138
- className: ["header", variantClass, className].filter(Boolean).join(" "),
2147
+ className: ["header", variantClass, underNavbar && "header--under-navbar", className].filter(Boolean).join(" "),
2139
2148
  ...props,
2140
2149
  children: [
2141
2150
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__grid", "aria-hidden": "true" }),