@deriv-web-design/ui 0.1.15 → 0.1.17

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",
@@ -2415,7 +2415,13 @@
2415
2415
  "icon": {
2416
2416
  "type": "ReactNode",
2417
2417
  "required": false,
2418
- "description": "Optional left icon. When provided, the chevron is hidden and the label underlines on hover/active."
2418
+ "description": "Optional icon. When provided, the chevron is hidden and the label underlines on hover/active."
2419
+ },
2420
+ "iconPosition": {
2421
+ "type": "\"left\" | \"right\"",
2422
+ "required": false,
2423
+ "description": "Which side the `icon` sits on. Only takes effect when `icon` is provided.",
2424
+ "default": "left"
2419
2425
  },
2420
2426
  "label": {
2421
2427
  "type": "string",
@@ -2767,6 +2773,35 @@
2767
2773
  },
2768
2774
  "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
2775
  },
2776
+ "ResourceBanner": {
2777
+ "name": "ResourceBanner",
2778
+ "source": "templates/ResourceBanner/ResourceBanner.tsx",
2779
+ "props": {
2780
+ "description": {
2781
+ "type": "string",
2782
+ "required": false,
2783
+ "description": "Supporting paragraph below the heading",
2784
+ "default": "Explain how this specific feature helps your user."
2785
+ },
2786
+ "headingLevel": {
2787
+ "type": "ResourceBannerHeadingLevel",
2788
+ "required": false,
2789
+ "description": "Heading tag to render. Use a lower level when the surrounding page already owns the heading hierarchy.",
2790
+ "default": "h2"
2791
+ },
2792
+ "links": {
2793
+ "type": "ResourceBannerLink[]",
2794
+ "required": false,
2795
+ "description": "Resource links, rendered as a vertical stack on every breakpoint. Any number is supported — there is no fixed maximum."
2796
+ },
2797
+ "title": {
2798
+ "type": "string",
2799
+ "required": false,
2800
+ "description": "Heading text",
2801
+ "default": "Section title goes here"
2802
+ }
2803
+ }
2804
+ },
2770
2805
  "Stats": {
2771
2806
  "name": "Stats",
2772
2807
  "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 */