@deriv-web-design/ui 0.1.30 → 0.1.32

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.
@@ -5922,6 +5922,119 @@
5922
5922
  }
5923
5923
  }
5924
5924
  },
5925
+ "sticky-market-cards-lottie": {
5926
+ "id": "sticky-market-cards-lottie",
5927
+ "name": "Sticky Market Cards Lottie",
5928
+ "component": "StickyMarketCardsLottie",
5929
+ "category": "cards",
5930
+ "description": "Scroll-driven sticky stack of solid-theme market cards with a manual-play Lottie panel beside stacked title and copy. Sibling of StickyMarketCards for tactical / strategy indices — does not share imageRoles with the image-based sticky cards block.",
5931
+ "purpose": "A scroll-driven sticky stack of solid-theme market cards with a manual-play Lottie panel beside stacked title and copy. Matches live tactical-indices cards (`option_card … is-tactical`). This is a **sibling** of `StickyMarketCards`. It is a separate block id (`sticky-market-cards-lottie`) so Raven / page builders can opt into Lottie without changing the image-based sticky cards recipe (`imageRoles`, fields, or fingerprint).",
5932
+ "keywords": [
5933
+ "sticky",
5934
+ "cards",
5935
+ "stack",
5936
+ "scroll",
5937
+ "lottie",
5938
+ "tactical",
5939
+ "animation",
5940
+ "derived-indices",
5941
+ "strategy",
5942
+ "markets",
5943
+ "deriv"
5944
+ ],
5945
+ "sectionType": "sticky-cards-lottie",
5946
+ "global": false,
5947
+ "requiredFields": [
5948
+ "sectionTitle",
5949
+ "items"
5950
+ ],
5951
+ "optionalFields": [
5952
+ "sectionDescription"
5953
+ ],
5954
+ "variants": [
5955
+ "default"
5956
+ ],
5957
+ "recommendedPosition": 3,
5958
+ "placement": [
5959
+ "middle"
5960
+ ],
5961
+ "layout": {
5962
+ "alignment": "left",
5963
+ "cardLayout": "sticky-stack",
5964
+ "contentWidth": "medium",
5965
+ "maxVisibleStack": 4,
5966
+ "background": true,
5967
+ "overlay": false
5968
+ },
5969
+ "supports": {
5970
+ "backgroundImage": false,
5971
+ "cardImage": false,
5972
+ "cardThemes": true,
5973
+ "scrollAnimation": true,
5974
+ "lottie": true,
5975
+ "manualPlayback": true,
5976
+ "primaryButton": false,
5977
+ "secondaryButton": false,
5978
+ "badge": false,
5979
+ "avatar": false
5980
+ },
5981
+ "imageRoles": [
5982
+ "animation",
5983
+ "poster"
5984
+ ],
5985
+ "defaultValues": {},
5986
+ "fields": {
5987
+ "items": {
5988
+ "type": "array",
5989
+ "required": true,
5990
+ "itemFields": {
5991
+ "description": {
5992
+ "type": "string",
5993
+ "required": true,
5994
+ "maxLength": 300,
5995
+ "description": "Card body copy. Tactical-indices copy is typically ~220–270 characters."
5996
+ },
5997
+ "lottiePosterUrl": {
5998
+ "type": "image",
5999
+ "required": false,
6000
+ "description": "Optional still frame while the Lottie is paused or loading."
6001
+ },
6002
+ "lottieSrc": {
6003
+ "type": "string",
6004
+ "required": false,
6005
+ "description": "`.lottie` URL for the media panel. Never put animation URLs in an image field."
6006
+ },
6007
+ "theme": {
6008
+ "type": "string",
6009
+ "required": false,
6010
+ "default": "dark",
6011
+ "defaultSource": "effective",
6012
+ "enum": [
6013
+ "light",
6014
+ "coral",
6015
+ "dark"
6016
+ ],
6017
+ "description": "Per-card colour theme. Defaults to \"dark\" — applied inside the render (`item.theme ?? \"dark\"`) rather than as a declared prop default."
6018
+ },
6019
+ "title": {
6020
+ "type": "string",
6021
+ "required": true,
6022
+ "maxLength": 60
6023
+ }
6024
+ }
6025
+ },
6026
+ "sectionDescription": {
6027
+ "type": "string",
6028
+ "required": false,
6029
+ "maxLength": 200
6030
+ },
6031
+ "sectionTitle": {
6032
+ "type": "string",
6033
+ "required": true,
6034
+ "maxLength": 80
6035
+ }
6036
+ }
6037
+ },
5925
6038
  "sticky-stacked-cards": {
5926
6039
  "id": "sticky-stacked-cards",
5927
6040
  "name": "Sticky Stacked Cards",
@@ -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": 63,
4
+ "componentCount": 64,
5
5
  "components": {
6
6
  "Accordion": {
7
7
  "name": "Accordion",
@@ -2587,6 +2587,11 @@
2587
2587
  "required": true,
2588
2588
  "description": "Main heading"
2589
2589
  },
2590
+ "trustpilot": {
2591
+ "type": "HeroTrustpilotProps",
2592
+ "required": false,
2593
+ "description": "Opt-in Trustpilot band pinned to the hero's bottom edge, as on the deriv.com and deriv.com/partners homepage heroes (`home-hero_trustpilot-wrapper`). A 56px strip showing the star rating, \"Deriv scores X out of 5 based on N reviews\" (hidden below 768px) and the Trustpilot wordmark, all linking to the Trustpilot profile. Omit it and the hero renders exactly as before — nothing is added to the DOM or CSS cascade."
2594
+ },
2590
2595
  "variant": {
2591
2596
  "type": "HeroVariant",
2592
2597
  "required": true,
@@ -3383,6 +3388,54 @@
3383
3388
  }
3384
3389
  }
3385
3390
  },
3391
+ "StickyMarketCardsLottie": {
3392
+ "name": "StickyMarketCardsLottie",
3393
+ "source": "templates/StickyMarketCardsLottie/StickyMarketCardsLottie.tsx",
3394
+ "props": {
3395
+ "items": {
3396
+ "type": "StickyMarketCardsLottieItem[]",
3397
+ "required": true,
3398
+ "description": "Ordered list of cards (first item = back of stack, last = front). Every media-bearing card should provide a `.lottie` via `lottieSrc`.",
3399
+ "items": {
3400
+ "description": {
3401
+ "type": "string",
3402
+ "required": true,
3403
+ "description": "Body copy below the title"
3404
+ },
3405
+ "lottiePosterUrl": {
3406
+ "type": "string",
3407
+ "required": false,
3408
+ "description": "Optional still frame shown while the Lottie is paused / loading."
3409
+ },
3410
+ "lottieSrc": {
3411
+ "type": "string",
3412
+ "required": false,
3413
+ "description": "`.lottie` (or animation-hosting `.json`) URL for the card media panel."
3414
+ },
3415
+ "theme": {
3416
+ "type": "StickyMarketCardsLottieTheme",
3417
+ "required": false,
3418
+ "description": "Background / text colour theme. light → slate-75 bg + dark text coral → coral-500 bg + white text dark → slate-1200 bg + white text"
3419
+ },
3420
+ "title": {
3421
+ "type": "string",
3422
+ "required": true,
3423
+ "description": "Card heading"
3424
+ }
3425
+ }
3426
+ },
3427
+ "sectionDescription": {
3428
+ "type": "string",
3429
+ "required": false,
3430
+ "description": "Optional section description"
3431
+ },
3432
+ "sectionTitle": {
3433
+ "type": "string",
3434
+ "required": true,
3435
+ "description": "Section heading rendered as H2"
3436
+ }
3437
+ }
3438
+ },
3386
3439
  "StickyStackedCards": {
3387
3440
  "name": "StickyStackedCards",
3388
3441
  "source": "templates/StickyStackedCards/StickyStackedCards.tsx",
package/dist/index.css CHANGED
@@ -2847,6 +2847,17 @@
2847
2847
  --hero-padding-top-mobile: var(--spacing-80);
2848
2848
  --hero-padding-top-tablet: var(--spacing-96);
2849
2849
  --hero-padding-top-desktop: var(--spacing-112);
2850
+ --hero-trustpilot-height: var(--spacing-56);
2851
+ --hero-trustpilot-bg: var(--hero-dark-bg);
2852
+ --hero-trustpilot-text: var(--hero-text-light);
2853
+ --hero-trustpilot-gap: var(--spacing-16);
2854
+ --hero-trustpilot-gap-tablet: var(--spacing-24);
2855
+ --hero-trustpilot-focus-ring: var(--border-focus);
2856
+ --hero-trustpilot-star-fill: #00b67a;
2857
+ --hero-trustpilot-star-empty: var(--color-opacity-white-24);
2858
+ --hero-trustpilot-star-glyph: var(--color-slate-50);
2859
+ --hero-trustpilot-logo-star: #04da8d;
2860
+ --hero-trustpilot-logo-star-shadow: #005128;
2850
2861
  }
2851
2862
  .hero {
2852
2863
  position: relative;
@@ -3348,6 +3359,88 @@
3348
3359
  max-width: 220px;
3349
3360
  }
3350
3361
  }
3362
+ .hero__trustpilot {
3363
+ position: absolute;
3364
+ left: 0;
3365
+ right: 0;
3366
+ bottom: 0;
3367
+ height: var(--hero-trustpilot-height);
3368
+ z-index: 4;
3369
+ background-color: var(--hero-trustpilot-bg);
3370
+ }
3371
+ .hero__trustpilot-link {
3372
+ position: relative;
3373
+ display: flex;
3374
+ align-items: center;
3375
+ justify-content: center;
3376
+ gap: var(--hero-trustpilot-gap);
3377
+ width: 100%;
3378
+ height: 100%;
3379
+ box-sizing: border-box;
3380
+ padding: 0 var(--spacing-16);
3381
+ color: var(--hero-trustpilot-text);
3382
+ text-decoration: none;
3383
+ font-size: var(--hero-body-size);
3384
+ line-height: var(--hero-body-lh);
3385
+ font-weight: var(--typography-body-md-font-weight);
3386
+ }
3387
+ .hero__trustpilot-link:focus-visible {
3388
+ outline: 2px solid var(--hero-trustpilot-focus-ring);
3389
+ outline-offset: -4px;
3390
+ }
3391
+ .hero__trustpilot-stars,
3392
+ .hero__trustpilot-logo {
3393
+ display: block;
3394
+ flex-shrink: 0;
3395
+ height: 24px;
3396
+ width: auto;
3397
+ }
3398
+ .hero__trustpilot-star-empty {
3399
+ fill: var(--hero-trustpilot-star-empty);
3400
+ }
3401
+ .hero__trustpilot-star-fill {
3402
+ fill: var(--hero-trustpilot-star-fill);
3403
+ }
3404
+ .hero__trustpilot-star-glyph {
3405
+ fill: var(--hero-trustpilot-star-glyph);
3406
+ }
3407
+ .hero__trustpilot-logo-text {
3408
+ fill: currentColor;
3409
+ }
3410
+ .hero__trustpilot-logo-star {
3411
+ fill: var(--hero-trustpilot-logo-star);
3412
+ }
3413
+ .hero__trustpilot-logo-star-shadow {
3414
+ fill: var(--hero-trustpilot-logo-star-shadow);
3415
+ }
3416
+ .hero__trustpilot-text {
3417
+ display: none;
3418
+ white-space: nowrap;
3419
+ }
3420
+ .hero--has-trustpilot.hero--split .hero__inner {
3421
+ padding-bottom: calc(var(--spacing-40) + var(--hero-trustpilot-height));
3422
+ }
3423
+ .hero--has-trustpilot.hero--centered .hero__content,
3424
+ .hero--has-trustpilot.hero--showcase .hero__content {
3425
+ padding-bottom: calc(var(--spacing-48) + var(--hero-trustpilot-height));
3426
+ }
3427
+ @media (min-width: 768px) {
3428
+ .hero__trustpilot-link {
3429
+ gap: var(--hero-trustpilot-gap-tablet);
3430
+ padding: 0 var(--spacing-24);
3431
+ }
3432
+ .hero__trustpilot-text {
3433
+ display: inline;
3434
+ }
3435
+ .hero--has-trustpilot.hero--split .hero__inner {
3436
+ padding-bottom: calc(var(--spacing-40) + var(--hero-trustpilot-height));
3437
+ }
3438
+ }
3439
+ @media (min-width: 992px) {
3440
+ .hero--has-trustpilot.hero--split .hero__inner {
3441
+ padding-bottom: var(--hero-trustpilot-height);
3442
+ }
3443
+ }
3351
3444
 
3352
3445
  /* templates/Header/Header.css */
3353
3446
  :root {
@@ -6490,6 +6583,254 @@
6490
6583
  }
6491
6584
  }
6492
6585
 
6586
+ /* templates/StickyMarketCardsLottie/StickyMarketCardsLottie.css */
6587
+ :root {
6588
+ --smcl-bg: var(--color-slate-75);
6589
+ --smcl-font-family: var(--font-family-base);
6590
+ --smcl-header-color: var(--text-primary);
6591
+ --smcl-card-light-bg: var(--color-slate-75);
6592
+ --smcl-card-light-text: var(--color-slate-1200);
6593
+ --smcl-card-coral-bg: var(--color-coral-700);
6594
+ --smcl-card-coral-text: var(--color-slate-50);
6595
+ --smcl-card-dark-bg: var(--color-slate-1200);
6596
+ --smcl-card-dark-text: var(--color-slate-50);
6597
+ --smcl-header-size: var(--typography-h2-font-size);
6598
+ --smcl-header-lh: var(--typography-h2-line-height);
6599
+ --smcl-header-weight: var(--typography-h2-font-weight);
6600
+ --smcl-sticky-top: var(--spacing-96);
6601
+ --smcl-peek: var(--spacing-16);
6602
+ --smcl-gap: var(--spacing-64);
6603
+ --smcl-min-height: 18.75rem;
6604
+ --smcl-lottie-aspect: 1312 / 854;
6605
+ --smcl-lottie-panel-bg: transparent;
6606
+ --smcl-lottie-radius: var(--radius-xl);
6607
+ --smcl-lottie-gap: var(--spacing-32);
6608
+ --smcl-control-bg: var(--color-slate-50);
6609
+ --smcl-control-color: var(--color-slate-1200);
6610
+ --smcl-scrim: rgb(0 0 0 / 10%);
6611
+ --smcl-focus: var(--border-focus);
6612
+ }
6613
+ .smcl {
6614
+ width: 100%;
6615
+ background-color: var(--smcl-bg);
6616
+ font-family: var(--smcl-font-family);
6617
+ box-sizing: border-box;
6618
+ }
6619
+ .smcl__inner {
6620
+ max-width: var(--content-width-1280);
6621
+ margin: 0 auto;
6622
+ padding: var(--spacing-56) var(--spacing-16);
6623
+ display: flex;
6624
+ flex-direction: column;
6625
+ gap: var(--spacing-48);
6626
+ box-sizing: border-box;
6627
+ }
6628
+ @media (min-width: 768px) {
6629
+ .smcl__inner {
6630
+ padding: var(--spacing-56) var(--spacing-24);
6631
+ gap: var(--spacing-64);
6632
+ }
6633
+ }
6634
+ @media (min-width: 992px) {
6635
+ .smcl__inner {
6636
+ padding: var(--spacing-112) var(--spacing-24);
6637
+ gap: var(--spacing-80);
6638
+ }
6639
+ }
6640
+ .smcl__header-wrap {
6641
+ display: flex;
6642
+ flex-direction: column;
6643
+ align-items: flex-start;
6644
+ gap: var(--spacing-16);
6645
+ text-align: left;
6646
+ }
6647
+ @media (min-width: 768px) {
6648
+ .smcl__header-wrap {
6649
+ align-items: center;
6650
+ text-align: center;
6651
+ }
6652
+ }
6653
+ .smcl__header {
6654
+ font-size: var(--smcl-header-size);
6655
+ font-weight: var(--smcl-header-weight);
6656
+ line-height: var(--smcl-header-lh);
6657
+ color: var(--smcl-header-color);
6658
+ margin: 0;
6659
+ }
6660
+ .smcl__description {
6661
+ font-family: var(--typography-body-lg-font-family);
6662
+ font-size: var(--typography-body-lg-font-size);
6663
+ font-weight: var(--typography-body-lg-font-weight);
6664
+ line-height: var(--typography-body-lg-line-height);
6665
+ color: var(--smcl-header-color);
6666
+ margin: 0;
6667
+ max-width: 640px;
6668
+ }
6669
+ .smcl__track {
6670
+ display: flex;
6671
+ flex-direction: column;
6672
+ gap: var(--smcl-gap);
6673
+ padding-bottom: var(--spacing-96);
6674
+ width: 100%;
6675
+ max-width: var(--content-width-846);
6676
+ margin: 0 auto;
6677
+ }
6678
+ .smcl__card {
6679
+ position: sticky;
6680
+ top: calc(var(--smcl-sticky-top) + var(--smcl-card-index) * var(--smcl-peek));
6681
+ }
6682
+ .smcl__card-inner {
6683
+ position: relative;
6684
+ border-radius: var(--spacing-32);
6685
+ padding: var(--smcl-lottie-gap);
6686
+ min-height: var(--smcl-min-height);
6687
+ display: flex;
6688
+ align-items: stretch;
6689
+ overflow: hidden;
6690
+ box-sizing: border-box;
6691
+ transform-origin: top center;
6692
+ transition: transform 0.1s ease-out, filter 0.1s ease-out;
6693
+ will-change: transform, filter;
6694
+ }
6695
+ .smcl__card-inner--light {
6696
+ background-color: var(--smcl-card-light-bg);
6697
+ color: var(--smcl-card-light-text);
6698
+ }
6699
+ .smcl__card-inner--coral {
6700
+ background-color: var(--smcl-card-coral-bg);
6701
+ color: var(--smcl-card-coral-text);
6702
+ }
6703
+ .smcl__card-inner--dark {
6704
+ background-color: var(--smcl-card-dark-bg);
6705
+ color: var(--smcl-card-dark-text);
6706
+ }
6707
+ .smcl__card-content {
6708
+ position: relative;
6709
+ z-index: 1;
6710
+ display: grid;
6711
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
6712
+ width: 100%;
6713
+ align-items: stretch;
6714
+ gap: var(--smcl-lottie-gap);
6715
+ }
6716
+ .smcl__card-text {
6717
+ display: flex;
6718
+ flex-direction: column;
6719
+ justify-content: flex-start;
6720
+ align-items: flex-start;
6721
+ gap: var(--spacing-16);
6722
+ height: 100%;
6723
+ min-width: 0;
6724
+ }
6725
+ .smcl__lottie {
6726
+ position: relative;
6727
+ isolation: isolate;
6728
+ align-self: start;
6729
+ width: 100%;
6730
+ min-width: 0;
6731
+ aspect-ratio: var(--smcl-lottie-aspect);
6732
+ overflow: hidden;
6733
+ border-radius: var(--smcl-lottie-radius);
6734
+ background-color: var(--smcl-lottie-panel-bg);
6735
+ }
6736
+ .smcl__lottie-media {
6737
+ position: absolute;
6738
+ z-index: 1;
6739
+ inset: 0;
6740
+ }
6741
+ .smcl__lottie-media > *,
6742
+ .smcl__lottie-player {
6743
+ width: 100% !important;
6744
+ height: 100% !important;
6745
+ }
6746
+ .smcl__lottie-player {
6747
+ display: flex !important;
6748
+ align-items: stretch !important;
6749
+ justify-content: stretch !important;
6750
+ }
6751
+ .smcl__lottie-media canvas,
6752
+ .smcl__lottie-player canvas {
6753
+ width: 100% !important;
6754
+ height: 100% !important;
6755
+ display: block;
6756
+ }
6757
+ .smcl__lottie-media img,
6758
+ .smcl__lottie-poster {
6759
+ width: 100%;
6760
+ height: 100%;
6761
+ object-fit: cover;
6762
+ object-position: center;
6763
+ }
6764
+ .smcl__lottie-poster {
6765
+ position: absolute;
6766
+ z-index: 2;
6767
+ inset: 0;
6768
+ }
6769
+ .smcl__playback-toggle {
6770
+ position: absolute;
6771
+ z-index: 3;
6772
+ display: grid;
6773
+ inset: 0;
6774
+ padding: 0;
6775
+ place-items: center;
6776
+ border: 0;
6777
+ background: var(--smcl-scrim);
6778
+ cursor: pointer;
6779
+ }
6780
+ .smcl__playback-toggle--playing {
6781
+ background: transparent;
6782
+ }
6783
+ .smcl__playback-toggle:focus-visible {
6784
+ outline: 2px solid var(--smcl-focus);
6785
+ outline-offset: -4px;
6786
+ }
6787
+ .smcl__control-icon {
6788
+ width: 64px;
6789
+ height: 64px;
6790
+ transition: opacity 150ms ease;
6791
+ }
6792
+ .smcl__playback-toggle--playing .smcl__control-icon {
6793
+ opacity: 0;
6794
+ }
6795
+ .smcl__playback-toggle--playing:hover .smcl__control-icon,
6796
+ .smcl__playback-toggle--playing:focus-visible .smcl__control-icon {
6797
+ opacity: 1;
6798
+ }
6799
+ .smcl__control-disc {
6800
+ fill: var(--smcl-control-bg);
6801
+ fill-opacity: 0.88;
6802
+ }
6803
+ .smcl__control-glyph {
6804
+ fill: var(--smcl-control-color);
6805
+ }
6806
+ .smcl__card-title {
6807
+ margin: 0;
6808
+ font-family: var(--font-family-base);
6809
+ font-size: var(--typography-h5-font-size);
6810
+ font-weight: var(--typography-h5-font-weight);
6811
+ line-height: var(--typography-h5-line-height);
6812
+ color: inherit;
6813
+ }
6814
+ .smcl__card-desc {
6815
+ margin: 0;
6816
+ font-family: var(--font-family-base);
6817
+ font-size: var(--typography-body-md-font-size);
6818
+ font-weight: var(--typography-body-md-font-weight);
6819
+ line-height: var(--typography-body-md-line-height);
6820
+ color: inherit;
6821
+ opacity: 0.95;
6822
+ }
6823
+ @media (max-width: 767px) {
6824
+ .smcl__card-inner {
6825
+ padding: var(--spacing-24);
6826
+ }
6827
+ .smcl__card-content {
6828
+ grid-template-columns: 1fr;
6829
+ align-items: flex-start;
6830
+ gap: var(--spacing-24);
6831
+ }
6832
+ }
6833
+
6493
6834
  /* templates/Table/Table.css */
6494
6835
  :root {
6495
6836
  --tbl-bg: var(--color-slate-50);