@deriv-web-design/ui 0.1.25 → 0.1.28

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.
@@ -4825,6 +4825,7 @@
4825
4825
  "ctaHref",
4826
4826
  "languageLabel",
4827
4827
  "languageItems",
4828
+ "languageRows",
4828
4829
  "activeLanguageCode"
4829
4830
  ],
4830
4831
  "variants": [
@@ -4900,6 +4901,11 @@
4900
4901
  "maxLength": 10,
4901
4902
  "description": "Current language code shown in the switcher, e.g. \"EN\". No default — omit it and the language switcher is not rendered at all."
4902
4903
  },
4904
+ "languageRows": {
4905
+ "type": "number",
4906
+ "required": false,
4907
+ "description": "Max items per column in the language dropdown. When set, columns are derived (ceil(items / languageRows)); when omitted, the existing 3-column layout is unchanged."
4908
+ },
4903
4909
  "loginHref": {
4904
4910
  "type": "url",
4905
4911
  "required": false,
@@ -5816,8 +5822,8 @@
5816
5822
  "name": "Sticky Market Cards",
5817
5823
  "component": "StickyMarketCards",
5818
5824
  "category": "cards",
5819
- "description": "Scroll-driven stack of overlapping, text-first market cards that pile up via position sticky, scaling and dimming as each card slides over the previous one.",
5820
- "purpose": "A scroll-driven stack of overlapping, text-first market cards. Each card piles on top of the previous one via `position: sticky` as the user scrolls, scaling down and dimming the card underneath for a layered depth effect. This block is designed to showcase a list of markets, products, or benefits one at a time as the user scrolls, with a maximum of 4 cards visibly stacked at once regardless of total count.",
5825
+ "description": "Scroll-driven stack of overlapping market cards that pile up via position sticky, scaling and dimming as each card slides over the previous one. Default cards use a tinted background image; the lottie variant places a manual-play animation beside stacked title and copy (tactical indices).",
5826
+ "purpose": "A scroll-driven stack of overlapping, text-first market cards. Each card piles on top of the previous one via `position: sticky` as the user scrolls, scaling down and dimming the card underneath for a layered depth effect. This block is designed to showcase a list of markets, products, or benefits one at a time as the user scrolls, with a maximum of 4 cards visibly stacked at once regardless of total count. The `lottie` variant swaps the background image for a manual-play animation panel beside the copy — the same pattern as tactical indices cards on the live site.",
5821
5827
  "keywords": [
5822
5828
  "sticky",
5823
5829
  "cards",
@@ -5831,7 +5837,10 @@
5831
5837
  "synthetics",
5832
5838
  "cfd",
5833
5839
  "trading",
5834
- "deriv"
5840
+ "deriv",
5841
+ "lottie",
5842
+ "tactical",
5843
+ "animation"
5835
5844
  ],
5836
5845
  "sectionType": "sticky-cards",
5837
5846
  "global": false,
@@ -5840,10 +5849,12 @@
5840
5849
  "items"
5841
5850
  ],
5842
5851
  "optionalFields": [
5843
- "sectionDescription"
5852
+ "sectionDescription",
5853
+ "variant"
5844
5854
  ],
5845
5855
  "variants": [
5846
- "default"
5856
+ "default",
5857
+ "lottie"
5847
5858
  ],
5848
5859
  "recommendedPosition": 3,
5849
5860
  "placement": [
@@ -5862,15 +5873,21 @@
5862
5873
  "cardImage": true,
5863
5874
  "cardThemes": true,
5864
5875
  "scrollAnimation": true,
5876
+ "lottie": true,
5877
+ "manualPlayback": true,
5865
5878
  "primaryButton": false,
5866
5879
  "secondaryButton": false,
5867
5880
  "badge": false,
5868
5881
  "avatar": false
5869
5882
  },
5870
5883
  "imageRoles": [
5871
- "card-background"
5884
+ "card-background",
5885
+ "animation",
5886
+ "poster"
5872
5887
  ],
5873
- "defaultValues": {},
5888
+ "defaultValues": {
5889
+ "variant": "default"
5890
+ },
5874
5891
  "fields": {
5875
5892
  "items": {
5876
5893
  "type": "array",
@@ -5879,11 +5896,22 @@
5879
5896
  "description": {
5880
5897
  "type": "string",
5881
5898
  "required": true,
5882
- "maxLength": 150
5899
+ "maxLength": 300
5883
5900
  },
5884
5901
  "imageUrl": {
5885
5902
  "type": "image",
5886
- "required": false
5903
+ "required": false,
5904
+ "description": "Background image for the default variant. Ignored when variant is \"lottie\"."
5905
+ },
5906
+ "lottiePosterUrl": {
5907
+ "type": "image",
5908
+ "required": false,
5909
+ "description": "Optional still frame while the Lottie is paused or loading."
5910
+ },
5911
+ "lottieSrc": {
5912
+ "type": "string",
5913
+ "required": false,
5914
+ "description": "`.lottie` URL for the media panel when variant is \"lottie\"."
5887
5915
  },
5888
5916
  "theme": {
5889
5917
  "type": "string",
@@ -5913,6 +5941,16 @@
5913
5941
  "type": "string",
5914
5942
  "required": true,
5915
5943
  "maxLength": 80
5944
+ },
5945
+ "variant": {
5946
+ "type": "string",
5947
+ "required": false,
5948
+ "default": "default",
5949
+ "enum": [
5950
+ "default",
5951
+ "lottie"
5952
+ ],
5953
+ "description": "Card layout mode. \"default\" uses a background image with title | description columns; \"lottie\" uses a solid theme card with a manual-play Lottie panel and stacked copy (tactical-indices)."
5916
5954
  }
5917
5955
  }
5918
5956
  },
@@ -2929,6 +2929,11 @@
2929
2929
  "required": false,
2930
2930
  "description": "Language label rendered next to the globe icon, e.g. \"EN\""
2931
2931
  },
2932
+ "languageRows": {
2933
+ "type": "number",
2934
+ "required": false,
2935
+ "description": "Max items per column in the language dropdown. When set (integer ≥ 1), the number of columns is derived (`ceil(items / languageRows)`); when omitted, the existing 3-column layout is unchanged."
2936
+ },
2932
2937
  "loginHref": {
2933
2938
  "type": "string",
2934
2939
  "required": false,
@@ -3352,7 +3357,17 @@
3352
3357
  "imageUrl": {
3353
3358
  "type": "string",
3354
3359
  "required": false,
3355
- "description": "URL of the card's hero image."
3360
+ "description": "URL of the card's hero image (default variant). Ignored when the section `variant` is `\"lottie\"`."
3361
+ },
3362
+ "lottiePosterUrl": {
3363
+ "type": "string",
3364
+ "required": false,
3365
+ "description": "Optional still frame shown while the Lottie is paused / loading (`variant: \"lottie\"` only)."
3366
+ },
3367
+ "lottieSrc": {
3368
+ "type": "string",
3369
+ "required": false,
3370
+ "description": "`.lottie` (or animation-hosting `.json`) URL for the card media panel. Used when the section `variant` is `\"lottie\"`."
3356
3371
  },
3357
3372
  "theme": {
3358
3373
  "type": "StickyMarketCardTheme",
@@ -3375,6 +3390,12 @@
3375
3390
  "type": "string",
3376
3391
  "required": true,
3377
3392
  "description": "Section heading rendered as H2"
3393
+ },
3394
+ "variant": {
3395
+ "type": "StickyMarketCardsVariant",
3396
+ "required": false,
3397
+ "description": "Card layout mode.",
3398
+ "default": "default"
3378
3399
  }
3379
3400
  }
3380
3401
  },
package/dist/index.css CHANGED
@@ -4739,8 +4739,12 @@
4739
4739
  .navbar__lang-dropdown {
4740
4740
  position: absolute;
4741
4741
  top: calc(100% + var(--spacing-8));
4742
- left: calc(50% - 352px);
4743
- width: 704px;
4742
+ left: 0;
4743
+ right: 0;
4744
+ margin-inline: auto;
4745
+ width: max-content;
4746
+ min-width: 704px;
4747
+ max-width: calc(100vw - 2 * var(--spacing-24));
4744
4748
  background-color: var(--color-slate-50);
4745
4749
  border: 1px solid var(--color-slate-100);
4746
4750
  border-radius: var(--navbar-dropdown-radius);
@@ -4752,7 +4756,7 @@
4752
4756
  }
4753
4757
  .navbar__lang-dropdown-grid {
4754
4758
  display: grid;
4755
- grid-template-columns: repeat(3, 1fr);
4759
+ grid-template-columns: repeat(var(--lang-cols, 3), 1fr);
4756
4760
  grid-auto-flow: column;
4757
4761
  grid-template-rows: repeat(var(--lang-rows, 7), auto);
4758
4762
  gap: 0;
@@ -6322,6 +6326,15 @@
6322
6326
  246,
6323
6327
  247,
6324
6328
  248;
6329
+ --smc-lottie-min-height: 18.75rem;
6330
+ --smc-lottie-aspect: 1312 / 854;
6331
+ --smc-lottie-panel-bg: transparent;
6332
+ --smc-lottie-radius: var(--radius-xl);
6333
+ --smc-lottie-gap: var(--spacing-32);
6334
+ --smc-control-bg: var(--color-slate-50);
6335
+ --smc-control-color: var(--color-slate-1200);
6336
+ --smc-scrim: rgb(0 0 0 / 10%);
6337
+ --smc-focus: var(--border-focus);
6325
6338
  }
6326
6339
  .smc {
6327
6340
  width: 100%;
@@ -6456,6 +6469,106 @@
6456
6469
  .smc__card-desc-wrap {
6457
6470
  flex: 1;
6458
6471
  }
6472
+ .smc__card-inner--lottie {
6473
+ padding: var(--smc-lottie-gap);
6474
+ min-height: var(--smc-lottie-min-height);
6475
+ align-items: stretch;
6476
+ }
6477
+ .smc__card-content--lottie {
6478
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
6479
+ align-items: stretch;
6480
+ gap: var(--smc-lottie-gap);
6481
+ }
6482
+ .smc__card-text {
6483
+ display: flex;
6484
+ flex-direction: column;
6485
+ justify-content: flex-start;
6486
+ align-items: flex-start;
6487
+ gap: var(--spacing-16);
6488
+ height: 100%;
6489
+ min-width: 0;
6490
+ }
6491
+ .smc__lottie {
6492
+ position: relative;
6493
+ isolation: isolate;
6494
+ align-self: start;
6495
+ width: 100%;
6496
+ min-width: 0;
6497
+ aspect-ratio: var(--smc-lottie-aspect);
6498
+ overflow: hidden;
6499
+ border-radius: var(--smc-lottie-radius);
6500
+ background-color: var(--smc-lottie-panel-bg);
6501
+ }
6502
+ .smc__lottie-media {
6503
+ position: absolute;
6504
+ z-index: 1;
6505
+ inset: 0;
6506
+ }
6507
+ .smc__lottie-media > *,
6508
+ .smc__lottie-player {
6509
+ width: 100% !important;
6510
+ height: 100% !important;
6511
+ }
6512
+ .smc__lottie-player {
6513
+ display: flex !important;
6514
+ align-items: stretch !important;
6515
+ justify-content: stretch !important;
6516
+ }
6517
+ .smc__lottie-media canvas,
6518
+ .smc__lottie-player canvas {
6519
+ width: 100% !important;
6520
+ height: 100% !important;
6521
+ display: block;
6522
+ }
6523
+ .smc__lottie-media img,
6524
+ .smc__lottie-poster {
6525
+ width: 100%;
6526
+ height: 100%;
6527
+ object-fit: cover;
6528
+ object-position: center;
6529
+ }
6530
+ .smc__lottie-poster {
6531
+ position: absolute;
6532
+ z-index: 2;
6533
+ inset: 0;
6534
+ }
6535
+ .smc__playback-toggle {
6536
+ position: absolute;
6537
+ z-index: 3;
6538
+ display: grid;
6539
+ inset: 0;
6540
+ padding: 0;
6541
+ place-items: center;
6542
+ border: 0;
6543
+ background: var(--smc-scrim);
6544
+ cursor: pointer;
6545
+ }
6546
+ .smc__playback-toggle--playing {
6547
+ background: transparent;
6548
+ }
6549
+ .smc__playback-toggle:focus-visible {
6550
+ outline: 2px solid var(--smc-focus);
6551
+ outline-offset: -4px;
6552
+ }
6553
+ .smc__control-icon {
6554
+ width: 64px;
6555
+ height: 64px;
6556
+ transition: opacity 150ms ease;
6557
+ }
6558
+ .smc__playback-toggle--playing .smc__control-icon {
6559
+ opacity: 0;
6560
+ }
6561
+ .smc__playback-toggle--playing:hover .smc__control-icon,
6562
+ .smc__playback-toggle--playing:focus-visible .smc__control-icon {
6563
+ opacity: 1;
6564
+ }
6565
+ .smc__control-disc {
6566
+ fill: var(--smc-control-bg);
6567
+ fill-opacity: 0.88;
6568
+ }
6569
+ .smc__control-glyph {
6570
+ fill: var(--smc-control-color);
6571
+ }
6459
6572
  .smc__card-title {
6460
6573
  margin: 0;
6461
6574
  font-family: var(--font-family-base);
@@ -6477,11 +6590,18 @@
6477
6590
  .smc__card-inner {
6478
6591
  padding: var(--spacing-24) var(--spacing-32);
6479
6592
  }
6593
+ .smc__card-inner--lottie {
6594
+ padding: var(--spacing-24);
6595
+ }
6480
6596
  .smc__card-content {
6481
6597
  grid-template-columns: 1fr;
6482
6598
  align-items: flex-start;
6483
6599
  gap: var(--spacing-24);
6484
6600
  }
6601
+ .smc__card-content--lottie {
6602
+ grid-template-columns: 1fr;
6603
+ gap: var(--spacing-24);
6604
+ }
6485
6605
  }
6486
6606
 
6487
6607
  /* templates/Table/Table.css */