@deriv-web-design/ui 0.1.15 → 0.1.18

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.
@@ -4523,6 +4523,116 @@
4523
4523
  }
4524
4524
  }
4525
4525
  },
4526
+ "resource-banner": {
4527
+ "id": "resource-banner",
4528
+ "name": "Resource Banner",
4529
+ "component": "ResourceBanner",
4530
+ "category": "cta",
4531
+ "description": "Rounded dark card with a heading and supporting paragraph on the left and a vertically-stacked list of external resource links on the right.",
4532
+ "purpose": "Use this template to point readers at related guides, policies, or reference pages at the end of an informational section — the \"here's where to read more\" block.",
4533
+ "keywords": [
4534
+ "resources",
4535
+ "banner",
4536
+ "links",
4537
+ "external links",
4538
+ "learn more",
4539
+ "guides",
4540
+ "further reading",
4541
+ "help",
4542
+ "safety",
4543
+ "fraud",
4544
+ "deriv"
4545
+ ],
4546
+ "sectionType": "cta",
4547
+ "global": false,
4548
+ "requiredFields": [],
4549
+ "optionalFields": [
4550
+ "title",
4551
+ "description",
4552
+ "links",
4553
+ "headingLevel"
4554
+ ],
4555
+ "variants": [
4556
+ "default"
4557
+ ],
4558
+ "recommendedPosition": 9,
4559
+ "placement": [
4560
+ "middle",
4561
+ "bottom"
4562
+ ],
4563
+ "layout": {
4564
+ "alignment": "left",
4565
+ "gridColumns": "1-2",
4566
+ "contentWidth": "wide",
4567
+ "background": true,
4568
+ "overlay": false
4569
+ },
4570
+ "supports": {
4571
+ "backgroundImage": false,
4572
+ "backgroundVideo": false,
4573
+ "foregroundImage": false,
4574
+ "primaryButton": false,
4575
+ "secondaryButton": false,
4576
+ "sectionLink": true,
4577
+ "multipleLinks": true,
4578
+ "icons": true
4579
+ },
4580
+ "imageRoles": [],
4581
+ "defaultValues": {
4582
+ "headingLevel": "h2"
4583
+ },
4584
+ "fields": {
4585
+ "description": {
4586
+ "type": "string",
4587
+ "required": false,
4588
+ "maxLength": 200,
4589
+ "default": "Explain how this specific feature helps your user."
4590
+ },
4591
+ "headingLevel": {
4592
+ "type": "string",
4593
+ "required": false,
4594
+ "default": "h2",
4595
+ "enum": [
4596
+ "h2",
4597
+ "h3",
4598
+ "h4"
4599
+ ],
4600
+ "description": "Heading tag. Demote when the page already owns the heading hierarchy."
4601
+ },
4602
+ "links": {
4603
+ "type": "array",
4604
+ "required": false,
4605
+ "description": "Resource links, rendered as a vertical stack at every breakpoint. No fixed maximum.",
4606
+ "itemFields": {
4607
+ "external": {
4608
+ "type": "boolean",
4609
+ "required": false,
4610
+ "default": true,
4611
+ "description": "Opens in a new tab and shows the external-link icon instead of the chevron."
4612
+ },
4613
+ "href": {
4614
+ "type": "url",
4615
+ "required": true
4616
+ },
4617
+ "id": {
4618
+ "type": "string",
4619
+ "required": false
4620
+ },
4621
+ "label": {
4622
+ "type": "string",
4623
+ "required": true,
4624
+ "maxLength": 80
4625
+ }
4626
+ }
4627
+ },
4628
+ "title": {
4629
+ "type": "string",
4630
+ "required": false,
4631
+ "default": "Section title goes here",
4632
+ "maxLength": 80
4633
+ }
4634
+ }
4635
+ },
4526
4636
  "stats-carousel": {
4527
4637
  "id": "stats-carousel",
4528
4638
  "name": "Stats Carousel",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "Generated by scripts/generate-component-manifest.ts from the TypeScript types. Do not edit by hand. Props inherited from React HTMLAttributes are intentionally omitted. `default` is the value declared in the component's own parameter destructuring; a prop whose effective default is applied further down the tree (e.g. cards[].showLink) has no `default` here — see block-registry.json `fields` for documented effective defaults.",
3
3
  "package": "@deriv-web-design/ui",
4
- "componentCount": 55,
4
+ "componentCount": 56,
5
5
  "components": {
6
6
  "Accordion": {
7
7
  "name": "Accordion",
@@ -891,7 +891,7 @@
891
891
  "name": "DotLottieInView",
892
892
  "source": "components/DotLottieInView/DotLottieInView.tsx",
893
893
  "props": {},
894
- "description": "Plays a .lottie once when it scrolls into view. Stops and resets when it leaves view. When it enters view again, it plays once more. Set `enabled={false}` to force stop (e.g. hidden slides) without relying on geometry alone."
894
+ "description": "Plays a .lottie once when it scrolls into view. Stops and resets when it leaves view. When it enters view again, it plays once more. Set `enabled={false}` to force stop (e.g. hidden slides) without relying on geometry alone. The player itself is fetched lazily, the first time this instance is both enabled and in view — so a page with no animation never downloads it, and a below-the-fold band does not pay for it during initial load."
895
895
  },
896
896
  "DownloadBadge": {
897
897
  "name": "DownloadBadge",
@@ -1836,6 +1836,11 @@
1836
1836
  "required": true,
1837
1837
  "description": "URL to the .lottie file or any image asset (png, jpg, svg, webp…)"
1838
1838
  },
1839
+ "posterUrl": {
1840
+ "type": "string",
1841
+ "required": false,
1842
+ "description": "Still frame painted while an animation's player and engine are loading. Only used when the item resolves to `\"lottie\"`. The WebAssembly engine is ~630 KB compressed and one engine serves every animation on the page, so on a cold visit over a slow connection the first animated band can sit empty for seconds. A poster turns that into a progressive load instead of a hole in the layout. Ignored once the animation is playing."
1843
+ },
1839
1844
  "title": {
1840
1845
  "type": "string",
1841
1846
  "required": true,
@@ -1843,6 +1848,16 @@
1843
1848
  }
1844
1849
  }
1845
1850
  },
1851
+ "mediaRootMargin": {
1852
+ "type": "string",
1853
+ "required": false,
1854
+ "description": "`rootMargin` for the observer that decides when an animation's player may load and play. Forwarded to `DotLottieInView`. The default starts the work only once a band is actually on screen, which is the safe choice: the engine is large, and fetching it earlier competes with whatever the visitor is currently looking at — including the LCP image. Widen it (e.g. `\"600px 0px\"`) on pages where the animated band sits well below the fold and you would rather it were ready on arrival."
1855
+ },
1856
+ "mediaThreshold": {
1857
+ "type": "number | number[]",
1858
+ "required": false,
1859
+ "description": "`threshold` for that same observer. Forwarded to `DotLottieInView`."
1860
+ },
1846
1861
  "variant": {
1847
1862
  "type": "\"media-left\" | \"media-right\"",
1848
1863
  "required": false,
@@ -2415,7 +2430,13 @@
2415
2430
  "icon": {
2416
2431
  "type": "ReactNode",
2417
2432
  "required": false,
2418
- "description": "Optional left icon. When provided, the chevron is hidden and the label underlines on hover/active."
2433
+ "description": "Optional icon. When provided, the chevron is hidden and the label underlines on hover/active."
2434
+ },
2435
+ "iconPosition": {
2436
+ "type": "\"left\" | \"right\"",
2437
+ "required": false,
2438
+ "description": "Which side the `icon` sits on. Only takes effect when `icon` is provided.",
2439
+ "default": "left"
2419
2440
  },
2420
2441
  "label": {
2421
2442
  "type": "string",
@@ -2767,6 +2788,35 @@
2767
2788
  },
2768
2789
  "description": "Dark partner-payout section with a responsive metric grid and globe image, modeled after the \"Top partner payouts\" section on deriv.com/partners."
2769
2790
  },
2791
+ "ResourceBanner": {
2792
+ "name": "ResourceBanner",
2793
+ "source": "templates/ResourceBanner/ResourceBanner.tsx",
2794
+ "props": {
2795
+ "description": {
2796
+ "type": "string",
2797
+ "required": false,
2798
+ "description": "Supporting paragraph below the heading",
2799
+ "default": "Explain how this specific feature helps your user."
2800
+ },
2801
+ "headingLevel": {
2802
+ "type": "ResourceBannerHeadingLevel",
2803
+ "required": false,
2804
+ "description": "Heading tag to render. Use a lower level when the surrounding page already owns the heading hierarchy.",
2805
+ "default": "h2"
2806
+ },
2807
+ "links": {
2808
+ "type": "ResourceBannerLink[]",
2809
+ "required": false,
2810
+ "description": "Resource links, rendered as a vertical stack on every breakpoint. Any number is supported — there is no fixed maximum."
2811
+ },
2812
+ "title": {
2813
+ "type": "string",
2814
+ "required": false,
2815
+ "description": "Heading text",
2816
+ "default": "Section title goes here"
2817
+ }
2818
+ }
2819
+ },
2770
2820
  "Stats": {
2771
2821
  "name": "Stats",
2772
2822
  "source": "templates/Stats/StatsV2.tsx",
package/dist/index.css CHANGED
@@ -11194,4 +11194,115 @@
11194
11194
  color: var(--master-partner-step-desc-color);
11195
11195
  margin: 0;
11196
11196
  }
11197
+
11198
+ /* templates/ResourceBanner/ResourceBanner.css */
11199
+ :root {
11200
+ --rsb-card-bg: var(--color-slate-1200);
11201
+ --rsb-section-bg: var(--color-slate-75);
11202
+ --rsb-title-color: var(--color-slate-50);
11203
+ --rsb-body-color: var(--color-slate-50);
11204
+ --rsb-max-width: 1280px;
11205
+ --rsb-card-radius: var(--radius-2xl);
11206
+ --rsb-section-padding-block: var(--spacing-56);
11207
+ --rsb-section-padding-inline: var(--spacing-16);
11208
+ --rsb-card-padding: var(--spacing-24);
11209
+ --rsb-grid-gap: var(--spacing-24);
11210
+ --rsb-content-gap: var(--spacing-16);
11211
+ --rsb-links-gap: var(--spacing-16);
11212
+ }
11213
+ .rsb {
11214
+ display: block;
11215
+ width: 100%;
11216
+ background-color: var(--rsb-section-bg);
11217
+ }
11218
+ .rsb__inner {
11219
+ max-width: var(--rsb-max-width);
11220
+ margin: 0 auto;
11221
+ padding: var(--rsb-section-padding-block) var(--rsb-section-padding-inline);
11222
+ box-sizing: border-box;
11223
+ }
11224
+ .rsb__card {
11225
+ border-radius: var(--rsb-card-radius);
11226
+ padding: var(--rsb-card-padding);
11227
+ background-color: var(--rsb-card-bg);
11228
+ box-sizing: border-box;
11229
+ }
11230
+ .rsb__grid {
11231
+ display: grid;
11232
+ grid-template-columns: 1fr;
11233
+ gap: var(--rsb-grid-gap);
11234
+ align-items: center;
11235
+ }
11236
+ .rsb__content {
11237
+ display: flex;
11238
+ flex-direction: column;
11239
+ align-items: flex-start;
11240
+ justify-content: flex-start;
11241
+ gap: var(--rsb-content-gap);
11242
+ }
11243
+ .rsb__title {
11244
+ margin: 0;
11245
+ font-family: var(--typography-h2-font-family);
11246
+ font-size: var(--typography-h2-font-size);
11247
+ font-weight: var(--typography-h2-font-weight);
11248
+ line-height: var(--typography-h2-line-height);
11249
+ letter-spacing: var(--typography-h2-letter-spacing);
11250
+ color: var(--rsb-title-color);
11251
+ }
11252
+ .rsb__description {
11253
+ margin: 0;
11254
+ font-family: var(--typography-body-md-font-family);
11255
+ font-size: var(--typography-body-md-font-size);
11256
+ font-weight: var(--typography-body-md-font-weight);
11257
+ line-height: var(--typography-body-md-line-height);
11258
+ color: var(--rsb-body-color);
11259
+ }
11260
+ .rsb__links {
11261
+ list-style: none;
11262
+ margin: 0;
11263
+ padding: 0;
11264
+ display: flex;
11265
+ flex-direction: column;
11266
+ gap: var(--rsb-links-gap);
11267
+ align-items: flex-start;
11268
+ justify-content: flex-start;
11269
+ }
11270
+ .rsb__links-item {
11271
+ display: flex;
11272
+ max-width: 100%;
11273
+ }
11274
+ .rsb__link {
11275
+ white-space: normal;
11276
+ align-items: flex-start;
11277
+ text-align: left;
11278
+ }
11279
+ @media (min-width: 480px) {
11280
+ :root {
11281
+ --rsb-card-padding: var(--spacing-48);
11282
+ }
11283
+ }
11284
+ @media (min-width: 768px) {
11285
+ :root {
11286
+ --rsb-section-padding-inline: var(--spacing-24);
11287
+ --rsb-grid-gap: var(--spacing-32);
11288
+ --rsb-content-gap: var(--spacing-24);
11289
+ }
11290
+ .rsb__grid {
11291
+ grid-template-columns: 1fr 1fr;
11292
+ }
11293
+ .rsb__links {
11294
+ align-items: center;
11295
+ justify-content: center;
11296
+ }
11297
+ }
11298
+ @media (min-width: 992px) {
11299
+ :root {
11300
+ --rsb-section-padding-block: var(--spacing-112);
11301
+ --rsb-grid-gap: var(--spacing-80);
11302
+ --rsb-content-gap: var(--spacing-32);
11303
+ }
11304
+ .rsb__grid {
11305
+ grid-template-columns: 2fr 1fr;
11306
+ }
11307
+ }
11197
11308
  /*# sourceMappingURL=index.css.map */