@deriv-web-design/ui 0.1.13 → 0.1.15

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.js CHANGED
@@ -67,14 +67,17 @@ __export(index_exports, {
67
67
  HelpCentreCategories: () => HelpCentreCategories,
68
68
  HelpCentreSubCategories: () => HelpCentreSubCategories,
69
69
  Hero: () => Hero,
70
+ IMAGE_BANNER_CHIPS_DEFAULT_IMAGE: () => IMAGE_BANNER_CHIPS_DEFAULT_IMAGE,
70
71
  ImageBanner: () => ImageBanner,
71
72
  Leaders: () => Leaders,
72
73
  Link: () => Link,
73
74
  LogoMarquee: () => LogoMarquee,
75
+ MasterPartner: () => MasterPartner,
74
76
  Navbar: () => Navbar,
75
77
  PARALLAX_BANNER_TEXT_CONTENT: () => PARALLAX_BANNER_TEXT_CONTENT,
76
78
  Pagination: () => Pagination,
77
79
  ParallaxBanner: () => ParallaxBanner,
80
+ PartnersPayout: () => PartnersPayout,
78
81
  PeopleGrid: () => PeopleGrid,
79
82
  STEPS_DATA: () => STEPS_DATA,
80
83
  SearchField: () => SearchField,
@@ -90,6 +93,7 @@ __export(index_exports, {
90
93
  Testimonial: () => Testimonial,
91
94
  TextField: () => TextField,
92
95
  TextScroll: () => TextScroll,
96
+ Tiers: () => Tiers,
93
97
  TradingCalculator: () => TradingCalculator,
94
98
  TradingCalculatorHowTo: () => TradingCalculatorHowTo,
95
99
  dayNightTransitionV2Preset: () => dayNightTransitionV2Preset
@@ -5358,6 +5362,34 @@ var Leaders = AvatarGrid;
5358
5362
 
5359
5363
  // templates/ImageBanner/ImageBanner.tsx
5360
5364
  var import_jsx_runtime43 = require("react/jsx-runtime");
5365
+ var DEFAULT_CHIPS = [
5366
+ "Dynamic ads",
5367
+ "AI insights",
5368
+ "Performance tracking",
5369
+ "Events"
5370
+ ];
5371
+ var IMAGE_BANNER_CHIPS_DEFAULT_IMAGE = "https://cdn.prod.website-files.com/68da5c86c91c54f39c86c28a/69a13cf79748b347527dc74d_tier-cover.webp";
5372
+ var ChipCheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5373
+ "svg",
5374
+ {
5375
+ className: "image-banner__chip-icon",
5376
+ width: "11",
5377
+ height: "12",
5378
+ viewBox: "0 0 11 18",
5379
+ fill: "none",
5380
+ xmlns: "http://www.w3.org/2000/svg",
5381
+ "aria-hidden": "true",
5382
+ focusable: "false",
5383
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5384
+ "path",
5385
+ {
5386
+ d: "M10.5156 5.98438C10.8203 6.26562 10.8203 6.75781 10.5156 7.03906L4.51562 13.0391C4.23438 13.3438 3.74219 13.3438 3.46094 13.0391L0.460938 10.0391C0.15625 9.75781 0.15625 9.26562 0.460938 8.98438C0.742188 8.67969 1.23438 8.67969 1.51562 8.98438L4 11.4453L9.46094 5.98438C9.74219 5.67969 10.2344 5.67969 10.5156 5.98438Z",
5387
+ fill: "currentColor",
5388
+ fillOpacity: "0.88"
5389
+ }
5390
+ )
5391
+ }
5392
+ );
5361
5393
  var ImageBanner = ({
5362
5394
  variant = "split-left",
5363
5395
  title = "Join our global community",
@@ -5365,16 +5397,25 @@ var ImageBanner = ({
5365
5397
  ctaLabel = "Trader's Hub",
5366
5398
  ctaHref,
5367
5399
  onCtaClick,
5400
+ chips = DEFAULT_CHIPS,
5368
5401
  imageUrl,
5369
5402
  imageAlt = "",
5370
5403
  className,
5371
5404
  ...props
5372
5405
  }) => {
5373
5406
  const isFullBg = variant === "full-bg-left" || variant === "full-bg-right";
5407
+ const isChips = variant === "chips-left" || variant === "chips-right";
5408
+ const showCta = !isChips && Boolean(ctaLabel);
5409
+ const visibleChips = isChips ? chips.filter((label) => label.trim().length > 0) : [];
5410
+ const resolvedImageUrl = imageUrl ?? (isChips ? IMAGE_BANNER_CHIPS_DEFAULT_IMAGE : void 0);
5374
5411
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5375
5412
  "section",
5376
5413
  {
5377
- className: ["image-banner", className].filter(Boolean).join(" "),
5414
+ className: [
5415
+ "image-banner",
5416
+ isChips ? "image-banner--chips" : "",
5417
+ className
5418
+ ].filter(Boolean).join(" "),
5378
5419
  ...props,
5379
5420
  children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5380
5421
  "div",
@@ -5384,11 +5425,11 @@ var ImageBanner = ({
5384
5425
  `image-banner__inner--${variant}`
5385
5426
  ].join(" "),
5386
5427
  children: [
5387
- isFullBg && imageUrl && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "image-banner__bg-image-wrapper", children: [
5428
+ isFullBg && resolvedImageUrl && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "image-banner__bg-image-wrapper", children: [
5388
5429
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5389
5430
  "img",
5390
5431
  {
5391
- src: imageUrl,
5432
+ src: resolvedImageUrl,
5392
5433
  alt: imageAlt,
5393
5434
  className: "image-banner__bg-image",
5394
5435
  loading: "lazy"
@@ -5399,7 +5440,11 @@ var ImageBanner = ({
5399
5440
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "image-banner__content", children: [
5400
5441
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { className: "image-banner__title", children: title }),
5401
5442
  description && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "image-banner__description", children: description }),
5402
- ctaLabel && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "image-banner__actions", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5443
+ visibleChips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("ul", { className: "image-banner__chips", "aria-label": "Features", children: visibleChips.map((label) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("li", { className: "image-banner__chip", children: [
5444
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ChipCheckIcon, {}),
5445
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "image-banner__chip-label", children: label })
5446
+ ] }, label)) }),
5447
+ showCta && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "image-banner__actions", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5403
5448
  Link,
5404
5449
  {
5405
5450
  colorScheme: "coral",
@@ -5411,15 +5456,24 @@ var ImageBanner = ({
5411
5456
  }
5412
5457
  ) })
5413
5458
  ] }),
5414
- !isFullBg && imageUrl && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "image-banner__image-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5415
- "img",
5416
- {
5417
- src: imageUrl,
5418
- alt: imageAlt,
5419
- className: "image-banner__image",
5420
- loading: "lazy"
5421
- }
5422
- ) })
5459
+ !isFullBg && resolvedImageUrl && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "image-banner__image-wrapper", children: [
5460
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5461
+ "img",
5462
+ {
5463
+ src: resolvedImageUrl,
5464
+ alt: imageAlt,
5465
+ className: "image-banner__image",
5466
+ loading: "lazy"
5467
+ }
5468
+ ),
5469
+ isChips && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5470
+ "div",
5471
+ {
5472
+ className: "image-banner__image-fade",
5473
+ "aria-hidden": "true"
5474
+ }
5475
+ )
5476
+ ] })
5423
5477
  ]
5424
5478
  }
5425
5479
  )
@@ -5588,13 +5642,8 @@ var TrustpilotTestimonial = ({
5588
5642
  "button",
5589
5643
  {
5590
5644
  type: "button",
5591
- className: [
5592
- "testimonial__tp-nav-btn",
5593
- !canPrev ? "testimonial__tp-nav-btn--hidden" : ""
5594
- ].filter(Boolean).join(" "),
5645
+ className: "testimonial__tp-nav-btn",
5595
5646
  "aria-label": "Show previous testimonials",
5596
- "aria-hidden": !canPrev,
5597
- tabIndex: canPrev ? 0 : -1,
5598
5647
  disabled: !canPrev,
5599
5648
  onClick: () => scrollByCard(-1),
5600
5649
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ArrowIcon, { direction: "prev" })
@@ -5604,13 +5653,8 @@ var TrustpilotTestimonial = ({
5604
5653
  "button",
5605
5654
  {
5606
5655
  type: "button",
5607
- className: [
5608
- "testimonial__tp-nav-btn",
5609
- !canNext ? "testimonial__tp-nav-btn--hidden" : ""
5610
- ].filter(Boolean).join(" "),
5656
+ className: "testimonial__tp-nav-btn",
5611
5657
  "aria-label": "Show next testimonials",
5612
- "aria-hidden": !canNext,
5613
- tabIndex: canNext ? 0 : -1,
5614
5658
  disabled: !canNext,
5615
5659
  onClick: () => scrollByCard(1),
5616
5660
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ArrowIcon, { direction: "next" })
@@ -8109,6 +8153,188 @@ var FeatureOffices = ({
8109
8153
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "fo-grid", children: filteredOffices.map((office, index) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(OfficeCard, { linkText, office }, `${office.city}-${index}`)) })
8110
8154
  ] }) });
8111
8155
  };
8156
+
8157
+ // templates/Tiers/Tiers.tsx
8158
+ var import_jsx_runtime59 = require("react/jsx-runtime");
8159
+ var DEFAULT_ACCENTS = ["bronze", "silver", "gold", "platinum"];
8160
+ var resolveAccent = (tier, index) => tier.accent ?? DEFAULT_ACCENTS[index] ?? "bronze";
8161
+ var Tiers = ({
8162
+ title,
8163
+ description,
8164
+ tiers,
8165
+ showLink = false,
8166
+ linkText = "Learn more about partner tiers",
8167
+ linkHref,
8168
+ onLinkClick
8169
+ }) => {
8170
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("section", { className: "tiers", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "tiers__container", children: [
8171
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("header", { className: "tiers__header", children: [
8172
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h2", { className: "tiers__title", children: title }),
8173
+ description && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "tiers__description", children: description })
8174
+ ] }),
8175
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ol", { className: "tiers__list", children: tiers.map((tier, index) => {
8176
+ const accent = resolveAccent(tier, index);
8177
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8178
+ "li",
8179
+ {
8180
+ className: `tiers__item tiers__item--${accent}`,
8181
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "tiers__shell", children: [
8182
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "tiers__icon-row", children: [
8183
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8184
+ "span",
8185
+ {
8186
+ className: "tiers__line tiers__line--left",
8187
+ "aria-hidden": "true"
8188
+ }
8189
+ ),
8190
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "tiers__icon-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8191
+ "img",
8192
+ {
8193
+ src: tier.icon,
8194
+ alt: tier.iconAlt ?? tier.name,
8195
+ className: "tiers__icon",
8196
+ width: 64,
8197
+ height: 64,
8198
+ loading: "lazy"
8199
+ }
8200
+ ) }),
8201
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8202
+ "span",
8203
+ {
8204
+ className: "tiers__line tiers__line--right",
8205
+ "aria-hidden": "true"
8206
+ }
8207
+ )
8208
+ ] }),
8209
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "tiers__heading", children: [
8210
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h3", { className: "tiers__name", children: tier.name }),
8211
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "tiers__status", children: tier.status })
8212
+ ] }),
8213
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "tiers__card", children: [
8214
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "tiers__card-title", children: tier.title }),
8215
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "tiers__card-description", children: tier.description })
8216
+ ] }),
8217
+ tier.requirement && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "tiers__requirement", children: tier.requirement })
8218
+ ] })
8219
+ },
8220
+ tier.name
8221
+ );
8222
+ }) }),
8223
+ showLink && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "tiers__footer", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8224
+ Link,
8225
+ {
8226
+ colorScheme: "coral",
8227
+ label: linkText,
8228
+ href: linkHref,
8229
+ onClick: onLinkClick
8230
+ }
8231
+ ) })
8232
+ ] }) });
8233
+ };
8234
+
8235
+ // templates/PartnersPayout/PartnersPayout.tsx
8236
+ var import_jsx_runtime60 = require("react/jsx-runtime");
8237
+ var PartnersPayout = ({
8238
+ title,
8239
+ period,
8240
+ payouts,
8241
+ imageUrl,
8242
+ imageAlt = "",
8243
+ className,
8244
+ ...props
8245
+ }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
8246
+ "section",
8247
+ {
8248
+ className: ["partners-payout", className].filter(Boolean).join(" "),
8249
+ ...props,
8250
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "partners-payout__container", children: [
8251
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "partners-payout__content", children: [
8252
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("header", { className: "partners-payout__header", children: [
8253
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h2", { className: "partners-payout__title", children: title }),
8254
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "partners-payout__period", children: period })
8255
+ ] }),
8256
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("ul", { className: "partners-payout__grid", children: payouts.map((payout, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
8257
+ "li",
8258
+ {
8259
+ className: "partners-payout__item",
8260
+ children: [
8261
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "partners-payout__region", children: payout.region }),
8262
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "partners-payout__amount", children: payout.amount })
8263
+ ]
8264
+ },
8265
+ `${payout.region}-${index}`
8266
+ )) })
8267
+ ] }),
8268
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
8269
+ "img",
8270
+ {
8271
+ className: "partners-payout__image",
8272
+ src: imageUrl,
8273
+ alt: imageAlt,
8274
+ loading: "lazy"
8275
+ }
8276
+ )
8277
+ ] })
8278
+ }
8279
+ );
8280
+
8281
+ // templates/MasterPartner/MasterPartner.tsx
8282
+ var import_jsx_runtime61 = require("react/jsx-runtime");
8283
+ var MasterPartner = ({
8284
+ title,
8285
+ description,
8286
+ note,
8287
+ closingText,
8288
+ ctaLabel,
8289
+ ctaHref,
8290
+ onCtaClick,
8291
+ image,
8292
+ imageAlt = "",
8293
+ steps
8294
+ }) => {
8295
+ const ctaButton = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel, onClick: onCtaClick });
8296
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("section", { className: "master-partner", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "master-partner__container", children: [
8297
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "master-partner__top", children: [
8298
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "master-partner__content", children: [
8299
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("h2", { className: "master-partner__title", children: title }),
8300
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "master-partner__copy", children: [
8301
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "master-partner__paragraph", children: description }),
8302
+ note && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("p", { className: "master-partner__paragraph", children: [
8303
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("strong", { children: note.label }),
8304
+ " ",
8305
+ note.text
8306
+ ] }),
8307
+ closingText && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "master-partner__paragraph", children: closingText })
8308
+ ] }),
8309
+ ctaLabel && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "master-partner__cta", children: ctaHref ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("a", { href: ctaHref, children: ctaButton }) : ctaButton })
8310
+ ] }),
8311
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "master-partner__image-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8312
+ "img",
8313
+ {
8314
+ className: "master-partner__image",
8315
+ src: image,
8316
+ alt: imageAlt,
8317
+ loading: "lazy"
8318
+ }
8319
+ ) })
8320
+ ] }),
8321
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ol", { className: "master-partner__steps", children: steps.map((step, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("li", { className: "master-partner__step", children: [
8322
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8323
+ "img",
8324
+ {
8325
+ className: "master-partner__step-icon",
8326
+ src: step.icon,
8327
+ alt: step.iconAlt ?? "",
8328
+ "aria-hidden": "true",
8329
+ width: 32,
8330
+ height: 32,
8331
+ loading: "lazy"
8332
+ }
8333
+ ),
8334
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "master-partner__step-description", children: step.description })
8335
+ ] }, index)) })
8336
+ ] }) });
8337
+ };
8112
8338
  // Annotate the CommonJS export names for ESM import in node:
8113
8339
  0 && (module.exports = {
8114
8340
  AVATAR_DATA,
@@ -8158,14 +8384,17 @@ var FeatureOffices = ({
8158
8384
  HelpCentreCategories,
8159
8385
  HelpCentreSubCategories,
8160
8386
  Hero,
8387
+ IMAGE_BANNER_CHIPS_DEFAULT_IMAGE,
8161
8388
  ImageBanner,
8162
8389
  Leaders,
8163
8390
  Link,
8164
8391
  LogoMarquee,
8392
+ MasterPartner,
8165
8393
  Navbar,
8166
8394
  PARALLAX_BANNER_TEXT_CONTENT,
8167
8395
  Pagination,
8168
8396
  ParallaxBanner,
8397
+ PartnersPayout,
8169
8398
  PeopleGrid,
8170
8399
  STEPS_DATA,
8171
8400
  SearchField,
@@ -8181,6 +8410,7 @@ var FeatureOffices = ({
8181
8410
  Testimonial,
8182
8411
  TextField,
8183
8412
  TextScroll,
8413
+ Tiers,
8184
8414
  TradingCalculator,
8185
8415
  TradingCalculatorHowTo,
8186
8416
  dayNightTransitionV2Preset