@deriv-web-design/ui 0.1.8 → 0.1.10
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/block-registry.json +12 -3
- package/components.manifest.json +6 -0
- package/dist/index.css +57 -36
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -667,9 +667,16 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
|
|
|
667
667
|
* The field always renders for that variant; this prop only customises it.
|
|
668
668
|
*/
|
|
669
669
|
search?: HeaderSearchProps;
|
|
670
|
+
/**
|
|
671
|
+
* Set to `true` when the fixed `Navbar` is rendered above this header (it is
|
|
672
|
+
* the first section on the page). Reserves top clearance equal to the navbar's
|
|
673
|
+
* footprint so the vertically-centred title never slides under the fixed pill.
|
|
674
|
+
* Defaults to `false` — leave it off when there is no navbar above the header.
|
|
675
|
+
*/
|
|
676
|
+
underNavbar?: boolean;
|
|
670
677
|
}
|
|
671
678
|
|
|
672
|
-
declare const Header: ({ variant, subtitle, title, description, primaryButton, secondaryButton, leftVisual, rightVisual, search, className, ...props }: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
679
|
+
declare const Header: ({ variant, subtitle, title, description, primaryButton, secondaryButton, leftVisual, rightVisual, search, underNavbar, className, ...props }: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
673
680
|
|
|
674
681
|
interface StatItem {
|
|
675
682
|
/** Numeric or short display value, e.g. "2.5M+" */
|
package/dist/index.d.ts
CHANGED
|
@@ -667,9 +667,16 @@ interface HeaderProps extends HTMLAttributes<HTMLElement> {
|
|
|
667
667
|
* The field always renders for that variant; this prop only customises it.
|
|
668
668
|
*/
|
|
669
669
|
search?: HeaderSearchProps;
|
|
670
|
+
/**
|
|
671
|
+
* Set to `true` when the fixed `Navbar` is rendered above this header (it is
|
|
672
|
+
* the first section on the page). Reserves top clearance equal to the navbar's
|
|
673
|
+
* footprint so the vertically-centred title never slides under the fixed pill.
|
|
674
|
+
* Defaults to `false` — leave it off when there is no navbar above the header.
|
|
675
|
+
*/
|
|
676
|
+
underNavbar?: boolean;
|
|
670
677
|
}
|
|
671
678
|
|
|
672
|
-
declare const Header: ({ variant, subtitle, title, description, primaryButton, secondaryButton, leftVisual, rightVisual, search, className, ...props }: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
679
|
+
declare const Header: ({ variant, subtitle, title, description, primaryButton, secondaryButton, leftVisual, rightVisual, search, underNavbar, className, ...props }: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
673
680
|
|
|
674
681
|
interface StatItem {
|
|
675
682
|
/** Numeric or short display value, e.g. "2.5M+" */
|
package/dist/index.js
CHANGED
|
@@ -2089,6 +2089,7 @@ var Header = ({
|
|
|
2089
2089
|
leftVisual,
|
|
2090
2090
|
rightVisual,
|
|
2091
2091
|
search,
|
|
2092
|
+
underNavbar = false,
|
|
2092
2093
|
className,
|
|
2093
2094
|
...props
|
|
2094
2095
|
}) => {
|
|
@@ -2135,7 +2136,7 @@ var Header = ({
|
|
|
2135
2136
|
"section",
|
|
2136
2137
|
{
|
|
2137
2138
|
ref: sectionRef,
|
|
2138
|
-
className: ["header", variantClass, className].filter(Boolean).join(" "),
|
|
2139
|
+
className: ["header", variantClass, underNavbar && "header--under-navbar", className].filter(Boolean).join(" "),
|
|
2139
2140
|
...props,
|
|
2140
2141
|
children: [
|
|
2141
2142
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__grid", "aria-hidden": "true" }),
|
|
@@ -5571,22 +5572,34 @@ var TrustpilotTestimonial = ({
|
|
|
5571
5572
|
}
|
|
5572
5573
|
) }),
|
|
5573
5574
|
items.length > 1 && (canPrev || canNext) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "testimonial__tp-nav", children: [
|
|
5574
|
-
|
|
5575
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5575
5576
|
"button",
|
|
5576
5577
|
{
|
|
5577
5578
|
type: "button",
|
|
5578
|
-
className:
|
|
5579
|
+
className: [
|
|
5580
|
+
"testimonial__tp-nav-btn",
|
|
5581
|
+
!canPrev ? "testimonial__tp-nav-btn--hidden" : ""
|
|
5582
|
+
].filter(Boolean).join(" "),
|
|
5579
5583
|
"aria-label": "Show previous testimonials",
|
|
5584
|
+
"aria-hidden": !canPrev,
|
|
5585
|
+
tabIndex: canPrev ? 0 : -1,
|
|
5586
|
+
disabled: !canPrev,
|
|
5580
5587
|
onClick: () => scrollByCard(-1),
|
|
5581
5588
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ArrowIcon, { direction: "prev" })
|
|
5582
5589
|
}
|
|
5583
5590
|
),
|
|
5584
|
-
|
|
5591
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5585
5592
|
"button",
|
|
5586
5593
|
{
|
|
5587
5594
|
type: "button",
|
|
5588
|
-
className:
|
|
5595
|
+
className: [
|
|
5596
|
+
"testimonial__tp-nav-btn",
|
|
5597
|
+
!canNext ? "testimonial__tp-nav-btn--hidden" : ""
|
|
5598
|
+
].filter(Boolean).join(" "),
|
|
5589
5599
|
"aria-label": "Show next testimonials",
|
|
5600
|
+
"aria-hidden": !canNext,
|
|
5601
|
+
tabIndex: canNext ? 0 : -1,
|
|
5602
|
+
disabled: !canNext,
|
|
5590
5603
|
onClick: () => scrollByCard(1),
|
|
5591
5604
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ArrowIcon, { direction: "next" })
|
|
5592
5605
|
}
|