@deriv-web-design/ui 0.1.30 → 0.1.31
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/block-registry.json +113 -0
- package/components.manifest.json +49 -1
- package/dist/index.css +248 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +1019 -800
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +993 -775
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/block-registry.json
CHANGED
|
@@ -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",
|
package/components.manifest.json
CHANGED
|
@@ -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":
|
|
4
|
+
"componentCount": 64,
|
|
5
5
|
"components": {
|
|
6
6
|
"Accordion": {
|
|
7
7
|
"name": "Accordion",
|
|
@@ -3383,6 +3383,54 @@
|
|
|
3383
3383
|
}
|
|
3384
3384
|
}
|
|
3385
3385
|
},
|
|
3386
|
+
"StickyMarketCardsLottie": {
|
|
3387
|
+
"name": "StickyMarketCardsLottie",
|
|
3388
|
+
"source": "templates/StickyMarketCardsLottie/StickyMarketCardsLottie.tsx",
|
|
3389
|
+
"props": {
|
|
3390
|
+
"items": {
|
|
3391
|
+
"type": "StickyMarketCardsLottieItem[]",
|
|
3392
|
+
"required": true,
|
|
3393
|
+
"description": "Ordered list of cards (first item = back of stack, last = front). Every media-bearing card should provide a `.lottie` via `lottieSrc`.",
|
|
3394
|
+
"items": {
|
|
3395
|
+
"description": {
|
|
3396
|
+
"type": "string",
|
|
3397
|
+
"required": true,
|
|
3398
|
+
"description": "Body copy below the title"
|
|
3399
|
+
},
|
|
3400
|
+
"lottiePosterUrl": {
|
|
3401
|
+
"type": "string",
|
|
3402
|
+
"required": false,
|
|
3403
|
+
"description": "Optional still frame shown while the Lottie is paused / loading."
|
|
3404
|
+
},
|
|
3405
|
+
"lottieSrc": {
|
|
3406
|
+
"type": "string",
|
|
3407
|
+
"required": false,
|
|
3408
|
+
"description": "`.lottie` (or animation-hosting `.json`) URL for the card media panel."
|
|
3409
|
+
},
|
|
3410
|
+
"theme": {
|
|
3411
|
+
"type": "StickyMarketCardsLottieTheme",
|
|
3412
|
+
"required": false,
|
|
3413
|
+
"description": "Background / text colour theme. light → slate-75 bg + dark text coral → coral-500 bg + white text dark → slate-1200 bg + white text"
|
|
3414
|
+
},
|
|
3415
|
+
"title": {
|
|
3416
|
+
"type": "string",
|
|
3417
|
+
"required": true,
|
|
3418
|
+
"description": "Card heading"
|
|
3419
|
+
}
|
|
3420
|
+
}
|
|
3421
|
+
},
|
|
3422
|
+
"sectionDescription": {
|
|
3423
|
+
"type": "string",
|
|
3424
|
+
"required": false,
|
|
3425
|
+
"description": "Optional section description"
|
|
3426
|
+
},
|
|
3427
|
+
"sectionTitle": {
|
|
3428
|
+
"type": "string",
|
|
3429
|
+
"required": true,
|
|
3430
|
+
"description": "Section heading rendered as H2"
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
},
|
|
3386
3434
|
"StickyStackedCards": {
|
|
3387
3435
|
"name": "StickyStackedCards",
|
|
3388
3436
|
"source": "templates/StickyStackedCards/StickyStackedCards.tsx",
|
package/dist/index.css
CHANGED
|
@@ -6490,6 +6490,254 @@
|
|
|
6490
6490
|
}
|
|
6491
6491
|
}
|
|
6492
6492
|
|
|
6493
|
+
/* templates/StickyMarketCardsLottie/StickyMarketCardsLottie.css */
|
|
6494
|
+
:root {
|
|
6495
|
+
--smcl-bg: var(--color-slate-75);
|
|
6496
|
+
--smcl-font-family: var(--font-family-base);
|
|
6497
|
+
--smcl-header-color: var(--text-primary);
|
|
6498
|
+
--smcl-card-light-bg: var(--color-slate-75);
|
|
6499
|
+
--smcl-card-light-text: var(--color-slate-1200);
|
|
6500
|
+
--smcl-card-coral-bg: var(--color-coral-700);
|
|
6501
|
+
--smcl-card-coral-text: var(--color-slate-50);
|
|
6502
|
+
--smcl-card-dark-bg: var(--color-slate-1200);
|
|
6503
|
+
--smcl-card-dark-text: var(--color-slate-50);
|
|
6504
|
+
--smcl-header-size: var(--typography-h2-font-size);
|
|
6505
|
+
--smcl-header-lh: var(--typography-h2-line-height);
|
|
6506
|
+
--smcl-header-weight: var(--typography-h2-font-weight);
|
|
6507
|
+
--smcl-sticky-top: var(--spacing-96);
|
|
6508
|
+
--smcl-peek: var(--spacing-16);
|
|
6509
|
+
--smcl-gap: var(--spacing-64);
|
|
6510
|
+
--smcl-min-height: 18.75rem;
|
|
6511
|
+
--smcl-lottie-aspect: 1312 / 854;
|
|
6512
|
+
--smcl-lottie-panel-bg: transparent;
|
|
6513
|
+
--smcl-lottie-radius: var(--radius-xl);
|
|
6514
|
+
--smcl-lottie-gap: var(--spacing-32);
|
|
6515
|
+
--smcl-control-bg: var(--color-slate-50);
|
|
6516
|
+
--smcl-control-color: var(--color-slate-1200);
|
|
6517
|
+
--smcl-scrim: rgb(0 0 0 / 10%);
|
|
6518
|
+
--smcl-focus: var(--border-focus);
|
|
6519
|
+
}
|
|
6520
|
+
.smcl {
|
|
6521
|
+
width: 100%;
|
|
6522
|
+
background-color: var(--smcl-bg);
|
|
6523
|
+
font-family: var(--smcl-font-family);
|
|
6524
|
+
box-sizing: border-box;
|
|
6525
|
+
}
|
|
6526
|
+
.smcl__inner {
|
|
6527
|
+
max-width: var(--content-width-1280);
|
|
6528
|
+
margin: 0 auto;
|
|
6529
|
+
padding: var(--spacing-56) var(--spacing-16);
|
|
6530
|
+
display: flex;
|
|
6531
|
+
flex-direction: column;
|
|
6532
|
+
gap: var(--spacing-48);
|
|
6533
|
+
box-sizing: border-box;
|
|
6534
|
+
}
|
|
6535
|
+
@media (min-width: 768px) {
|
|
6536
|
+
.smcl__inner {
|
|
6537
|
+
padding: var(--spacing-56) var(--spacing-24);
|
|
6538
|
+
gap: var(--spacing-64);
|
|
6539
|
+
}
|
|
6540
|
+
}
|
|
6541
|
+
@media (min-width: 992px) {
|
|
6542
|
+
.smcl__inner {
|
|
6543
|
+
padding: var(--spacing-112) var(--spacing-24);
|
|
6544
|
+
gap: var(--spacing-80);
|
|
6545
|
+
}
|
|
6546
|
+
}
|
|
6547
|
+
.smcl__header-wrap {
|
|
6548
|
+
display: flex;
|
|
6549
|
+
flex-direction: column;
|
|
6550
|
+
align-items: flex-start;
|
|
6551
|
+
gap: var(--spacing-16);
|
|
6552
|
+
text-align: left;
|
|
6553
|
+
}
|
|
6554
|
+
@media (min-width: 768px) {
|
|
6555
|
+
.smcl__header-wrap {
|
|
6556
|
+
align-items: center;
|
|
6557
|
+
text-align: center;
|
|
6558
|
+
}
|
|
6559
|
+
}
|
|
6560
|
+
.smcl__header {
|
|
6561
|
+
font-size: var(--smcl-header-size);
|
|
6562
|
+
font-weight: var(--smcl-header-weight);
|
|
6563
|
+
line-height: var(--smcl-header-lh);
|
|
6564
|
+
color: var(--smcl-header-color);
|
|
6565
|
+
margin: 0;
|
|
6566
|
+
}
|
|
6567
|
+
.smcl__description {
|
|
6568
|
+
font-family: var(--typography-body-lg-font-family);
|
|
6569
|
+
font-size: var(--typography-body-lg-font-size);
|
|
6570
|
+
font-weight: var(--typography-body-lg-font-weight);
|
|
6571
|
+
line-height: var(--typography-body-lg-line-height);
|
|
6572
|
+
color: var(--smcl-header-color);
|
|
6573
|
+
margin: 0;
|
|
6574
|
+
max-width: 640px;
|
|
6575
|
+
}
|
|
6576
|
+
.smcl__track {
|
|
6577
|
+
display: flex;
|
|
6578
|
+
flex-direction: column;
|
|
6579
|
+
gap: var(--smcl-gap);
|
|
6580
|
+
padding-bottom: var(--spacing-96);
|
|
6581
|
+
width: 100%;
|
|
6582
|
+
max-width: var(--content-width-846);
|
|
6583
|
+
margin: 0 auto;
|
|
6584
|
+
}
|
|
6585
|
+
.smcl__card {
|
|
6586
|
+
position: sticky;
|
|
6587
|
+
top: calc(var(--smcl-sticky-top) + var(--smcl-card-index) * var(--smcl-peek));
|
|
6588
|
+
}
|
|
6589
|
+
.smcl__card-inner {
|
|
6590
|
+
position: relative;
|
|
6591
|
+
border-radius: var(--spacing-32);
|
|
6592
|
+
padding: var(--smcl-lottie-gap);
|
|
6593
|
+
min-height: var(--smcl-min-height);
|
|
6594
|
+
display: flex;
|
|
6595
|
+
align-items: stretch;
|
|
6596
|
+
overflow: hidden;
|
|
6597
|
+
box-sizing: border-box;
|
|
6598
|
+
transform-origin: top center;
|
|
6599
|
+
transition: transform 0.1s ease-out, filter 0.1s ease-out;
|
|
6600
|
+
will-change: transform, filter;
|
|
6601
|
+
}
|
|
6602
|
+
.smcl__card-inner--light {
|
|
6603
|
+
background-color: var(--smcl-card-light-bg);
|
|
6604
|
+
color: var(--smcl-card-light-text);
|
|
6605
|
+
}
|
|
6606
|
+
.smcl__card-inner--coral {
|
|
6607
|
+
background-color: var(--smcl-card-coral-bg);
|
|
6608
|
+
color: var(--smcl-card-coral-text);
|
|
6609
|
+
}
|
|
6610
|
+
.smcl__card-inner--dark {
|
|
6611
|
+
background-color: var(--smcl-card-dark-bg);
|
|
6612
|
+
color: var(--smcl-card-dark-text);
|
|
6613
|
+
}
|
|
6614
|
+
.smcl__card-content {
|
|
6615
|
+
position: relative;
|
|
6616
|
+
z-index: 1;
|
|
6617
|
+
display: grid;
|
|
6618
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
|
|
6619
|
+
width: 100%;
|
|
6620
|
+
align-items: stretch;
|
|
6621
|
+
gap: var(--smcl-lottie-gap);
|
|
6622
|
+
}
|
|
6623
|
+
.smcl__card-text {
|
|
6624
|
+
display: flex;
|
|
6625
|
+
flex-direction: column;
|
|
6626
|
+
justify-content: flex-start;
|
|
6627
|
+
align-items: flex-start;
|
|
6628
|
+
gap: var(--spacing-16);
|
|
6629
|
+
height: 100%;
|
|
6630
|
+
min-width: 0;
|
|
6631
|
+
}
|
|
6632
|
+
.smcl__lottie {
|
|
6633
|
+
position: relative;
|
|
6634
|
+
isolation: isolate;
|
|
6635
|
+
align-self: start;
|
|
6636
|
+
width: 100%;
|
|
6637
|
+
min-width: 0;
|
|
6638
|
+
aspect-ratio: var(--smcl-lottie-aspect);
|
|
6639
|
+
overflow: hidden;
|
|
6640
|
+
border-radius: var(--smcl-lottie-radius);
|
|
6641
|
+
background-color: var(--smcl-lottie-panel-bg);
|
|
6642
|
+
}
|
|
6643
|
+
.smcl__lottie-media {
|
|
6644
|
+
position: absolute;
|
|
6645
|
+
z-index: 1;
|
|
6646
|
+
inset: 0;
|
|
6647
|
+
}
|
|
6648
|
+
.smcl__lottie-media > *,
|
|
6649
|
+
.smcl__lottie-player {
|
|
6650
|
+
width: 100% !important;
|
|
6651
|
+
height: 100% !important;
|
|
6652
|
+
}
|
|
6653
|
+
.smcl__lottie-player {
|
|
6654
|
+
display: flex !important;
|
|
6655
|
+
align-items: stretch !important;
|
|
6656
|
+
justify-content: stretch !important;
|
|
6657
|
+
}
|
|
6658
|
+
.smcl__lottie-media canvas,
|
|
6659
|
+
.smcl__lottie-player canvas {
|
|
6660
|
+
width: 100% !important;
|
|
6661
|
+
height: 100% !important;
|
|
6662
|
+
display: block;
|
|
6663
|
+
}
|
|
6664
|
+
.smcl__lottie-media img,
|
|
6665
|
+
.smcl__lottie-poster {
|
|
6666
|
+
width: 100%;
|
|
6667
|
+
height: 100%;
|
|
6668
|
+
object-fit: cover;
|
|
6669
|
+
object-position: center;
|
|
6670
|
+
}
|
|
6671
|
+
.smcl__lottie-poster {
|
|
6672
|
+
position: absolute;
|
|
6673
|
+
z-index: 2;
|
|
6674
|
+
inset: 0;
|
|
6675
|
+
}
|
|
6676
|
+
.smcl__playback-toggle {
|
|
6677
|
+
position: absolute;
|
|
6678
|
+
z-index: 3;
|
|
6679
|
+
display: grid;
|
|
6680
|
+
inset: 0;
|
|
6681
|
+
padding: 0;
|
|
6682
|
+
place-items: center;
|
|
6683
|
+
border: 0;
|
|
6684
|
+
background: var(--smcl-scrim);
|
|
6685
|
+
cursor: pointer;
|
|
6686
|
+
}
|
|
6687
|
+
.smcl__playback-toggle--playing {
|
|
6688
|
+
background: transparent;
|
|
6689
|
+
}
|
|
6690
|
+
.smcl__playback-toggle:focus-visible {
|
|
6691
|
+
outline: 2px solid var(--smcl-focus);
|
|
6692
|
+
outline-offset: -4px;
|
|
6693
|
+
}
|
|
6694
|
+
.smcl__control-icon {
|
|
6695
|
+
width: 64px;
|
|
6696
|
+
height: 64px;
|
|
6697
|
+
transition: opacity 150ms ease;
|
|
6698
|
+
}
|
|
6699
|
+
.smcl__playback-toggle--playing .smcl__control-icon {
|
|
6700
|
+
opacity: 0;
|
|
6701
|
+
}
|
|
6702
|
+
.smcl__playback-toggle--playing:hover .smcl__control-icon,
|
|
6703
|
+
.smcl__playback-toggle--playing:focus-visible .smcl__control-icon {
|
|
6704
|
+
opacity: 1;
|
|
6705
|
+
}
|
|
6706
|
+
.smcl__control-disc {
|
|
6707
|
+
fill: var(--smcl-control-bg);
|
|
6708
|
+
fill-opacity: 0.88;
|
|
6709
|
+
}
|
|
6710
|
+
.smcl__control-glyph {
|
|
6711
|
+
fill: var(--smcl-control-color);
|
|
6712
|
+
}
|
|
6713
|
+
.smcl__card-title {
|
|
6714
|
+
margin: 0;
|
|
6715
|
+
font-family: var(--font-family-base);
|
|
6716
|
+
font-size: var(--typography-h5-font-size);
|
|
6717
|
+
font-weight: var(--typography-h5-font-weight);
|
|
6718
|
+
line-height: var(--typography-h5-line-height);
|
|
6719
|
+
color: inherit;
|
|
6720
|
+
}
|
|
6721
|
+
.smcl__card-desc {
|
|
6722
|
+
margin: 0;
|
|
6723
|
+
font-family: var(--font-family-base);
|
|
6724
|
+
font-size: var(--typography-body-md-font-size);
|
|
6725
|
+
font-weight: var(--typography-body-md-font-weight);
|
|
6726
|
+
line-height: var(--typography-body-md-line-height);
|
|
6727
|
+
color: inherit;
|
|
6728
|
+
opacity: 0.95;
|
|
6729
|
+
}
|
|
6730
|
+
@media (max-width: 767px) {
|
|
6731
|
+
.smcl__card-inner {
|
|
6732
|
+
padding: var(--spacing-24);
|
|
6733
|
+
}
|
|
6734
|
+
.smcl__card-content {
|
|
6735
|
+
grid-template-columns: 1fr;
|
|
6736
|
+
align-items: flex-start;
|
|
6737
|
+
gap: var(--spacing-24);
|
|
6738
|
+
}
|
|
6739
|
+
}
|
|
6740
|
+
|
|
6493
6741
|
/* templates/Table/Table.css */
|
|
6494
6742
|
:root {
|
|
6495
6743
|
--tbl-bg: var(--color-slate-50);
|