@deriv-web-design/ui 0.0.28 → 0.0.29

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.mjs CHANGED
@@ -5535,6 +5535,58 @@ var ArticleSection = ({
5535
5535
  ] })
5536
5536
  ] });
5537
5537
  };
5538
+
5539
+ // templates/SpotlightHero/SpotlightHero.tsx
5540
+ import { jsx as jsx45, jsxs as jsxs41 } from "react/jsx-runtime";
5541
+ var ArrowIcon = () => /* @__PURE__ */ jsx45("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx45(
5542
+ "path",
5543
+ {
5544
+ d: "M4 12h15M13 6l6 6-6 6",
5545
+ stroke: "currentColor",
5546
+ strokeWidth: "2",
5547
+ strokeLinecap: "round",
5548
+ strokeLinejoin: "round"
5549
+ }
5550
+ ) });
5551
+ var SpotlightHero = ({
5552
+ eyebrow,
5553
+ title,
5554
+ summary,
5555
+ meta,
5556
+ icon,
5557
+ patternSize = 132,
5558
+ patternOpacity = 0.12,
5559
+ tone = "coral",
5560
+ href,
5561
+ onClick,
5562
+ ctaLabel = "Read more",
5563
+ className
5564
+ }) => {
5565
+ const Root = href ? "a" : "div";
5566
+ const interactive = Boolean(href || onClick);
5567
+ const tileCount = Math.ceil(1600 / patternSize) * Math.ceil(720 / patternSize);
5568
+ const style = {
5569
+ "--sh-tile": `${patternSize}px`,
5570
+ "--sh-pattern-opacity": String(patternOpacity)
5571
+ };
5572
+ const classes = ["sh-root", `sh-${tone}`, interactive ? "sh-interactive" : "", className ?? ""].filter(Boolean).join(" ");
5573
+ return /* @__PURE__ */ jsxs41(Root, { className: classes, href, onClick, style, children: [
5574
+ /* @__PURE__ */ jsx45("span", { className: "sh-glow", "aria-hidden": "true" }),
5575
+ icon && /* @__PURE__ */ jsx45("span", { className: "sh-pattern", "aria-hidden": "true", children: Array.from({ length: tileCount }).map((_, i) => /* @__PURE__ */ jsx45("span", { className: "sh-patternIcon", children: icon }, i)) }),
5576
+ /* @__PURE__ */ jsxs41("div", { className: "sh-content", children: [
5577
+ eyebrow && /* @__PURE__ */ jsxs41("div", { className: "sh-eyebrow", children: [
5578
+ /* @__PURE__ */ jsx45("span", { className: "sh-eyebrowLine", "aria-hidden": "true" }),
5579
+ /* @__PURE__ */ jsx45("span", { className: "sh-eyebrowText", children: eyebrow })
5580
+ ] }),
5581
+ /* @__PURE__ */ jsx45("h2", { className: "sh-title", children: title }),
5582
+ summary && /* @__PURE__ */ jsx45("p", { className: "sh-summary", children: summary }),
5583
+ (meta || interactive) && /* @__PURE__ */ jsxs41("div", { className: "sh-footer", children: [
5584
+ /* @__PURE__ */ jsx45("span", { className: "sh-arrow", "aria-label": interactive ? ctaLabel : void 0, children: /* @__PURE__ */ jsx45(ArrowIcon, {}) }),
5585
+ meta && /* @__PURE__ */ jsx45("span", { className: "sh-meta", children: meta })
5586
+ ] })
5587
+ ] })
5588
+ ] });
5589
+ };
5538
5590
  export {
5539
5591
  AVATAR_DATA,
5540
5592
  Accordion,
@@ -5572,6 +5624,7 @@ export {
5572
5624
  PeopleGrid,
5573
5625
  STEPS_DATA,
5574
5626
  SearchField,
5627
+ SpotlightHero,
5575
5628
  Stats,
5576
5629
  StatsSimple,
5577
5630
  Steps,