@deriv-web-design/ui 0.1.6 → 0.1.9

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.
Files changed (36) hide show
  1. package/block-registry.json +506 -6
  2. package/components.manifest.json +223 -5
  3. package/dist/index.css +840 -23
  4. package/dist/index.css.map +1 -1
  5. package/dist/index.d.mts +312 -7
  6. package/dist/index.d.ts +312 -7
  7. package/dist/index.js +1449 -389
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +1453 -400
  10. package/dist/index.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/dist/appstore-appgallery-dark-2QPFCM4A.svg +0 -12
  13. package/dist/appstore-appgallery-light-VF62CF5X.svg +0 -19
  14. package/dist/appstore-appstore-dark-FDUROOKK.svg +0 -24
  15. package/dist/appstore-appstore-light-BEVC5PJZ.svg +0 -24
  16. package/dist/appstore-browser-dark-2E6TK6JH.svg +0 -32
  17. package/dist/appstore-browser-light-HBKTW4SI.svg +0 -32
  18. package/dist/appstore-googleplay-dark-HWTOQTL6.svg +0 -14
  19. package/dist/appstore-googleplay-light-W3CS6NAG.svg +0 -14
  20. package/dist/appstore-linux-dark-RVH7CBM4.svg +0 -46
  21. package/dist/appstore-linux-light-WQECAJRC.svg +0 -46
  22. package/dist/appstore-macos-dark-2A3UM5YI.svg +0 -23
  23. package/dist/appstore-macos-light-5LI6ESAV.svg +0 -23
  24. package/dist/appstore-windows-dark-ZDWELB42.svg +0 -31
  25. package/dist/appstore-windows-light-TCALZSJM.svg +0 -31
  26. package/dist/award-leaf-left-HVAB5T5H.png +0 -0
  27. package/dist/award-leaf-right-WR5I37KI.png +0 -0
  28. package/dist/icon-globe-S54WYYEK.svg +0 -10
  29. package/dist/quote-left-63QMW5NQ.webp +0 -0
  30. package/dist/quote-right-W6AS4YHN.webp +0 -0
  31. package/dist/share-facebook-3B3NOC5Q.png +0 -0
  32. package/dist/share-link-QGD6KIDA.png +0 -0
  33. package/dist/share-linkedin-UCIII3JU.png +0 -0
  34. package/dist/share-telegram-QRXGSHQT.png +0 -0
  35. package/dist/share-x-UTEBBL73.png +0 -0
  36. package/dist/trustpilot-rating-badge-D7JOW3KJ.png +0 -0
@@ -1041,6 +1041,100 @@
1041
1041
  }
1042
1042
  }
1043
1043
  },
1044
+ "dynamic-table": {
1045
+ "id": "dynamic-table",
1046
+ "name": "Dynamic Table",
1047
+ "component": "DynamicTable",
1048
+ "category": "table",
1049
+ "description": "Comparison-table section with a label column and two or three value columns (Three columns or Four columns). Rounded card, light header row, horizontal dividers, and multi-line cells.",
1050
+ "purpose": "A comparison-table section for short, fixed column sets. It renders a rounded card with a light header row, horizontal dividers only, a bold first-column label, and two or three value columns. Unlike Table, this block has no search, pagination, or header tooltips. It is for marketing and product comparison content — not large instrument specification datasets.",
1051
+ "keywords": [
1052
+ "table",
1053
+ "comparison",
1054
+ "features",
1055
+ "platforms",
1056
+ "columns",
1057
+ "mt5",
1058
+ "web terminal",
1059
+ "desktop",
1060
+ "mobile",
1061
+ "windows",
1062
+ "mac",
1063
+ "trading",
1064
+ "deriv"
1065
+ ],
1066
+ "sectionType": "table",
1067
+ "global": false,
1068
+ "requiredFields": [
1069
+ "columns",
1070
+ "rows"
1071
+ ],
1072
+ "optionalFields": [
1073
+ "sectionTitle",
1074
+ "variant"
1075
+ ],
1076
+ "variants": [
1077
+ "Three columns",
1078
+ "Four columns"
1079
+ ],
1080
+ "recommendedPosition": 4,
1081
+ "placement": [
1082
+ "middle"
1083
+ ],
1084
+ "layout": {
1085
+ "alignment": "center",
1086
+ "contentWidth": "wide",
1087
+ "horizontalScroll": true,
1088
+ "background": true,
1089
+ "overlay": false
1090
+ },
1091
+ "supports": {
1092
+ "backgroundImage": false,
1093
+ "search": false,
1094
+ "pagination": false,
1095
+ "headerTooltips": false,
1096
+ "multiLineCells": true,
1097
+ "primaryButton": false,
1098
+ "secondaryButton": false,
1099
+ "badge": false
1100
+ },
1101
+ "imageRoles": [],
1102
+ "defaultValues": {
1103
+ "variant": "Three columns"
1104
+ },
1105
+ "fields": {
1106
+ "columns": {
1107
+ "type": "array",
1108
+ "required": true,
1109
+ "itemFields": {
1110
+ "header": {
1111
+ "type": "string",
1112
+ "required": true,
1113
+ "maxLength": 40
1114
+ },
1115
+ "key": {
1116
+ "type": "string",
1117
+ "required": true,
1118
+ "maxLength": 40
1119
+ }
1120
+ }
1121
+ },
1122
+ "rows": {
1123
+ "type": "array",
1124
+ "required": true
1125
+ },
1126
+ "sectionTitle": {
1127
+ "type": "string",
1128
+ "required": false,
1129
+ "maxLength": 80
1130
+ },
1131
+ "variant": {
1132
+ "type": "enum",
1133
+ "required": false,
1134
+ "default": "Three columns"
1135
+ }
1136
+ }
1137
+ },
1044
1138
  "faq-accordion-white": {
1045
1139
  "id": "faq-accordion-white",
1046
1140
  "name": "FAQ Accordion White",
@@ -2227,6 +2321,161 @@
2227
2321
  }
2228
2322
  }
2229
2323
  },
2324
+ "feature-offices": {
2325
+ "id": "feature-offices",
2326
+ "name": "Feature Offices",
2327
+ "component": "FeatureOffices",
2328
+ "category": "content",
2329
+ "description": "Light section with a centered H2 heading and CMS-managed region tabs above a responsive grid of office address cards (flag image, city/country, address, optional \"See location\" link). Filtering by region happens client-side.",
2330
+ "purpose": "A light-background content section that lists a company's offices grouped by region, using a row of CMS-managed region tabs above a responsive grid of address cards (flag image, city/country, address, optional \"See location\" link). Modeled after [deriv.com/contact-us](https://deriv.com/contact-us) (\"Our offices\").",
2331
+ "keywords": [
2332
+ "offices",
2333
+ "locations",
2334
+ "contact",
2335
+ "addresses",
2336
+ "regions",
2337
+ "tabs",
2338
+ "cms",
2339
+ "map",
2340
+ "branches",
2341
+ "deriv"
2342
+ ],
2343
+ "sectionType": "content",
2344
+ "global": false,
2345
+ "requiredFields": [
2346
+ "regions",
2347
+ "offices"
2348
+ ],
2349
+ "optionalFields": [
2350
+ "title",
2351
+ "defaultActiveRegionId",
2352
+ "linkText"
2353
+ ],
2354
+ "variants": [
2355
+ "default"
2356
+ ],
2357
+ "recommendedPosition": 5,
2358
+ "placement": [
2359
+ "middle",
2360
+ "bottom"
2361
+ ],
2362
+ "layout": {
2363
+ "alignment": "center",
2364
+ "gridColumns": "3",
2365
+ "contentWidth": "large",
2366
+ "background": false,
2367
+ "overlay": false
2368
+ },
2369
+ "supports": {
2370
+ "backgroundImage": false,
2371
+ "backgroundVideo": false,
2372
+ "foregroundImage": true,
2373
+ "primaryButton": false,
2374
+ "secondaryButton": false,
2375
+ "search": false,
2376
+ "tabs": true,
2377
+ "cardLink": true,
2378
+ "externalLinkNewTab": true,
2379
+ "tags": false
2380
+ },
2381
+ "imageRoles": [
2382
+ "office-flag"
2383
+ ],
2384
+ "defaultValues": {
2385
+ "title": "Our offices",
2386
+ "linkText": "See location"
2387
+ },
2388
+ "fields": {
2389
+ "defaultActiveRegionId": {
2390
+ "type": "string",
2391
+ "required": false,
2392
+ "description": "Initial active tab id. Defaults to regions[0].id when omitted."
2393
+ },
2394
+ "linkText": {
2395
+ "type": "string",
2396
+ "required": false,
2397
+ "default": "See location",
2398
+ "defaultSource": "effective",
2399
+ "maxLength": 30,
2400
+ "description": "Default label for each office's link. Overridable per office via offices[].linkText."
2401
+ },
2402
+ "offices": {
2403
+ "type": "array",
2404
+ "required": true,
2405
+ "itemFields": {
2406
+ "address": {
2407
+ "type": "string",
2408
+ "required": true,
2409
+ "maxLength": 220,
2410
+ "description": "Full postal address. Use \"\\n\" to break onto multiple lines."
2411
+ },
2412
+ "city": {
2413
+ "type": "string",
2414
+ "required": true,
2415
+ "maxLength": 60
2416
+ },
2417
+ "country": {
2418
+ "type": "string",
2419
+ "required": true,
2420
+ "maxLength": 60
2421
+ },
2422
+ "flagAlt": {
2423
+ "type": "string",
2424
+ "required": false,
2425
+ "maxLength": 60,
2426
+ "description": "Alt text for the flag image. Defaults to country when omitted."
2427
+ },
2428
+ "flagImage": {
2429
+ "type": "image",
2430
+ "required": true,
2431
+ "description": "Real flag artwork (not an emoji), e.g. a flagcdn.com URL."
2432
+ },
2433
+ "href": {
2434
+ "type": "url",
2435
+ "required": false,
2436
+ "description": "Absolute http(s):// URLs open in a new tab (external); relative/internal paths navigate same-tab. Omit to render the card with no link."
2437
+ },
2438
+ "linkText": {
2439
+ "type": "string",
2440
+ "required": false,
2441
+ "maxLength": 30,
2442
+ "description": "Overrides the default \"See location\" link label for this office."
2443
+ },
2444
+ "region": {
2445
+ "type": "string",
2446
+ "required": true,
2447
+ "maxLength": 40,
2448
+ "description": "Must match one of regions[].id."
2449
+ }
2450
+ }
2451
+ },
2452
+ "regions": {
2453
+ "type": "array",
2454
+ "required": true,
2455
+ "description": "Region tabs, CMS-managed.",
2456
+ "itemFields": {
2457
+ "id": {
2458
+ "type": "string",
2459
+ "required": true,
2460
+ "maxLength": 40,
2461
+ "description": "Must match FeatureOffice.region for filtering to work."
2462
+ },
2463
+ "label": {
2464
+ "type": "string",
2465
+ "required": true,
2466
+ "maxLength": 30
2467
+ }
2468
+ }
2469
+ },
2470
+ "title": {
2471
+ "type": "string",
2472
+ "required": false,
2473
+ "default": "Our offices",
2474
+ "defaultSource": "effective",
2475
+ "maxLength": 60
2476
+ }
2477
+ }
2478
+ },
2230
2479
  "feature-scroll-media-right": {
2231
2480
  "id": "feature-scroll-media-right",
2232
2481
  "name": "Feature Scroll Media Right",
@@ -2483,6 +2732,7 @@
2483
2732
  "logoAlt",
2484
2733
  "socialLinks",
2485
2734
  "derivGo",
2735
+ "tradingView",
2486
2736
  "investorsInPeopleSrc",
2487
2737
  "investorsInPeopleAlt",
2488
2738
  "licenseText",
@@ -3345,8 +3595,10 @@
3345
3595
  "imageAlt"
3346
3596
  ],
3347
3597
  "variants": [
3348
- "split",
3349
- "full-bg"
3598
+ "split-left",
3599
+ "split-right",
3600
+ "full-bg-left",
3601
+ "full-bg-right"
3350
3602
  ],
3351
3603
  "recommendedPosition": 7,
3352
3604
  "placement": [
@@ -3374,7 +3626,7 @@
3374
3626
  "card-background"
3375
3627
  ],
3376
3628
  "defaultValues": {
3377
- "variant": "split",
3629
+ "variant": "split-left",
3378
3630
  "title": "Join our global community",
3379
3631
  "description": "Connect with traders around the world to exchange insights, explore portfolios, and gain valuable expertise.",
3380
3632
  "ctaLabel": "Trader's Hub",
@@ -3418,10 +3670,12 @@
3418
3670
  "type": "string",
3419
3671
  "required": false,
3420
3672
  "enum": [
3421
- "split",
3422
- "full-bg"
3673
+ "split-left",
3674
+ "split-right",
3675
+ "full-bg-left",
3676
+ "full-bg-right"
3423
3677
  ],
3424
- "default": "split"
3678
+ "default": "split-left"
3425
3679
  }
3426
3680
  }
3427
3681
  },
@@ -4801,5 +5055,251 @@
4801
5055
  "maxLength": 300
4802
5056
  }
4803
5057
  }
5058
+ },
5059
+ "trading-calculator": {
5060
+ "id": "trading-calculator",
5061
+ "name": "TradingCalculator",
5062
+ "component": "TradingCalculator",
5063
+ "category": "tools",
5064
+ "description": "A live two-panel trading calculator for a searchable instrument picker across forex, synthetics, stocks, commodities, and crypto. Four variants share the same inputs and live data but each surface a different focused result: `main` (margin, trade volume, pip value, long/short swap together), `margin` (margin required only, mirrors deriv.com/trading-calculators/margin-calculator), `pip` (pip value only, mirrors deriv.com/trading-calculators/pip-calculator), and `swap` (long/short swap charges only, mirrors deriv.com/trading-calculators/swap-calculator). Fetches live instrument specs and USD exchange rates itself, no configuration required.",
5065
+ "purpose": "A two-panel \"Calculator\" / \"Results\" trading calculator: a searchable instrument picker plus volume and asset-price inputs on the left, and computed results on the right. Ships in four variants (`variant` prop) that share identical inputs, styling, and live data, but each surface a different focused subset of results — see [Variants](#variants) below. Modeled after deriv.com's own trading-calculators pages, and wired to the same live data they use — the component fetches Deriv's public instrument-specs feed on mount and, only when an instrument's currency isn't already USD, calls Deriv's public exchange-rate API to convert the result. No API keys or setup are required; both endpoints are public and unauthenticated, and every variant is connected to the same two data sources — there is no separate margin/pip/swap API, matching how the three reference pages themselves work. | `variant` | Mirrors | Results panel shows | |---|---|---| | `\"main\"` (default) | [deriv.com/trading-calculators](https://deriv.com/trading-calculators) | Margin Required, Trade Volume + Pip value, Swap Charge Long + Short, swap rate/type/three-day/weekend info | | `\"margin\"` | [deriv.com/trading-calculators/margin-calculator](https://deriv.com/trading-calculators/margin-calculator) | Margin Required only | | `\"pip\"` | [deriv.com/trading-calculators/pip-calculator](https://deriv.com/trading-calculators/pip-calculator) | Pip value only | | `\"swap\"` | [deriv.com/trading-calculators/swap-calculator](https://deriv.com/trading-calculators/swap-calculator) | Swap Charge Long + Short, swap rate/type/three-day/weekend info |",
5066
+ "keywords": [
5067
+ "calculator",
5068
+ "trading calculator",
5069
+ "margin calculator",
5070
+ "pip calculator",
5071
+ "swap calculator",
5072
+ "leverage",
5073
+ "lot size",
5074
+ "forex",
5075
+ "cfd",
5076
+ "trading tools",
5077
+ "instrument specs",
5078
+ "exchange rate",
5079
+ "deriv",
5080
+ "trading-calculators"
5081
+ ],
5082
+ "sectionType": "calculator",
5083
+ "global": false,
5084
+ "requiredFields": [],
5085
+ "optionalFields": [
5086
+ "variant",
5087
+ "symbols",
5088
+ "symbolsEndpoint",
5089
+ "exchangeRateWsUrl",
5090
+ "defaultSymbol"
5091
+ ],
5092
+ "variants": [
5093
+ "main",
5094
+ "margin",
5095
+ "pip",
5096
+ "swap"
5097
+ ],
5098
+ "recommendedPosition": 4,
5099
+ "placement": [
5100
+ "middle"
5101
+ ],
5102
+ "layout": {
5103
+ "alignment": "center",
5104
+ "carousel": false,
5105
+ "contentWidth": "large",
5106
+ "background": false,
5107
+ "overlay": false
5108
+ },
5109
+ "supports": {
5110
+ "backgroundImage": false,
5111
+ "liveData": true,
5112
+ "form": true,
5113
+ "primaryButton": true,
5114
+ "secondaryButton": true,
5115
+ "badge": false
5116
+ },
5117
+ "imageRoles": [],
5118
+ "defaultValues": {
5119
+ "variant": "main",
5120
+ "symbolsEndpoint": "https://deriv-static-pricingfeedv2.firebaseio.com/n8n/row/prod/dynamic_trading_specs.json",
5121
+ "exchangeRateWsUrl": "wss://ws.derivws.com/websockets/v3?app_id=1089"
5122
+ },
5123
+ "fields": {
5124
+ "defaultSymbol": {
5125
+ "type": "string",
5126
+ "required": false,
5127
+ "maxLength": 30
5128
+ },
5129
+ "exchangeRateWsUrl": {
5130
+ "type": "string",
5131
+ "required": false
5132
+ },
5133
+ "symbols": {
5134
+ "type": "array",
5135
+ "required": false,
5136
+ "itemFields": {
5137
+ "ask_last": {
5138
+ "type": "number",
5139
+ "required": true
5140
+ },
5141
+ "asset_class": {
5142
+ "type": "string",
5143
+ "required": true
5144
+ },
5145
+ "base_currency": {
5146
+ "type": "string",
5147
+ "required": true
5148
+ },
5149
+ "contract_size": {
5150
+ "type": "number",
5151
+ "required": true
5152
+ },
5153
+ "description": {
5154
+ "type": "string",
5155
+ "required": true
5156
+ },
5157
+ "effective_leverage": {
5158
+ "type": "number",
5159
+ "required": true
5160
+ },
5161
+ "market": {
5162
+ "type": "string",
5163
+ "required": true
5164
+ },
5165
+ "pip_size": {
5166
+ "type": "number",
5167
+ "required": true
5168
+ },
5169
+ "point_size": {
5170
+ "type": "number",
5171
+ "required": true
5172
+ },
5173
+ "profit_currency": {
5174
+ "type": "string",
5175
+ "required": true
5176
+ },
5177
+ "swap_mode": {
5178
+ "type": "string",
5179
+ "required": true
5180
+ },
5181
+ "swap_rate_long": {
5182
+ "type": "number",
5183
+ "required": true
5184
+ },
5185
+ "swap_rate_short": {
5186
+ "type": "number",
5187
+ "required": true
5188
+ },
5189
+ "symbol": {
5190
+ "type": "string",
5191
+ "required": true
5192
+ },
5193
+ "volume_limit": {
5194
+ "type": "number",
5195
+ "required": true
5196
+ },
5197
+ "volume_min": {
5198
+ "type": "number",
5199
+ "required": true
5200
+ }
5201
+ }
5202
+ },
5203
+ "symbolsEndpoint": {
5204
+ "type": "string",
5205
+ "required": false
5206
+ },
5207
+ "variant": {
5208
+ "type": "string",
5209
+ "required": false,
5210
+ "enum": [
5211
+ "main",
5212
+ "margin",
5213
+ "pip",
5214
+ "swap"
5215
+ ],
5216
+ "default": "main"
5217
+ }
5218
+ }
5219
+ },
5220
+ "trading-calculator-how-to": {
5221
+ "id": "trading-calculator-how-to",
5222
+ "name": "TradingCalculatorHowTo",
5223
+ "component": "TradingCalculatorHowTo",
5224
+ "category": "tools",
5225
+ "description": "A \"How to calculate…\" explainer section pairing a centered title/description with a two-column \"Formula\" / \"Example\" card, walking through a worked calculation with an annotated calculation strip. Four variants mirror deriv.com's margin/pip/swap calculator explainer content: `margin` (deriv.com/trading-calculators/margin-calculator), `pip` (deriv.com/trading-calculators/pip-calculator), and `swap-points`/`swap-percentage` (deriv.com/trading-calculators/swap-calculator), which both render the same interactive \"In points\" / \"In percentage\" tab switch and only differ in which of the two formulas starts active.",
5226
+ "purpose": "A \"How to calculate…\" explainer section: a centered title/description, then a two-column \"Formula\" / \"Example\" card that walks through one worked calculation using an annotated calculation strip (a boxed row of numbers, each connected by a small dot to a caption naming what it is — \"Lots\", \"Contract size\", \"Volume\", etc.). Modeled after the explainer content on deriv.com's own trading-calculators pages. Ships in four variants (`variant` prop); the two `swap-*` variants both render the same interactive \"In points\" / \"In percentage\" tab switch between the swap page's two formulas — they only differ in which formula starts active, a visitor can still click either tab afterwards regardless of which variant was set. | `variant` | Mirrors | Notes | |---|---|---| | `\"margin\"` (default) | [deriv.com/trading-calculators/margin-calculator](https://deriv.com/trading-calculators/margin-calculator) | One formula, two calculation strips (Volume, then Required margin) | | `\"pip\"` | [deriv.com/trading-calculators/pip-calculator](https://deriv.com/trading-calculators/pip-calculator) | One formula, one calculation strip | | `\"swap-points\"` | [deriv.com/trading-calculators/swap-calculator](https://deriv.com/trading-calculators/swap-calculator) | Interactive tab switch — \"Swap calculation (In points)\" / \"Swap calculation (In percentage)\" — opening on the points-based formula | | `\"swap-percentage\"` | [deriv.com/trading-calculators/swap-calculator](https://deriv.com/trading-calculators/swap-calculator) | Same interactive tab switch, opening on the percentage/rollover-price-based formula | This block is the worked-example/explainer companion to `TradingCalculator` (the live tool) — pair the two together, `TradingCalculatorHowTo` typically placed below `TradingCalculator` on the same page, exactly as deriv.com does on all three reference pages.",
5227
+ "keywords": [
5228
+ "how to calculate",
5229
+ "margin calculator",
5230
+ "pip calculator",
5231
+ "swap calculator",
5232
+ "formula",
5233
+ "worked example",
5234
+ "explainer",
5235
+ "leverage",
5236
+ "lot size",
5237
+ "forex",
5238
+ "cfd",
5239
+ "trading tools",
5240
+ "deriv",
5241
+ "trading-calculators"
5242
+ ],
5243
+ "sectionType": "explainer",
5244
+ "global": false,
5245
+ "requiredFields": [],
5246
+ "optionalFields": [
5247
+ "variant",
5248
+ "title",
5249
+ "description"
5250
+ ],
5251
+ "variants": [
5252
+ "margin",
5253
+ "pip",
5254
+ "swap-points",
5255
+ "swap-percentage"
5256
+ ],
5257
+ "recommendedPosition": 5,
5258
+ "placement": [
5259
+ "middle"
5260
+ ],
5261
+ "layout": {
5262
+ "alignment": "center",
5263
+ "carousel": false,
5264
+ "contentWidth": "large",
5265
+ "background": false,
5266
+ "overlay": false
5267
+ },
5268
+ "supports": {
5269
+ "backgroundImage": false,
5270
+ "liveData": false,
5271
+ "form": false,
5272
+ "primaryButton": false,
5273
+ "secondaryButton": false,
5274
+ "badge": false,
5275
+ "editableText": true
5276
+ },
5277
+ "imageRoles": [],
5278
+ "defaultValues": {
5279
+ "variant": "margin"
5280
+ },
5281
+ "fields": {
5282
+ "description": {
5283
+ "type": "string",
5284
+ "required": false,
5285
+ "maxLength": 200
5286
+ },
5287
+ "title": {
5288
+ "type": "string",
5289
+ "required": false,
5290
+ "maxLength": 80
5291
+ },
5292
+ "variant": {
5293
+ "type": "string",
5294
+ "required": false,
5295
+ "enum": [
5296
+ "margin",
5297
+ "pip",
5298
+ "swap-points",
5299
+ "swap-percentage"
5300
+ ],
5301
+ "default": "margin"
5302
+ }
5303
+ }
4804
5304
  }
4805
5305
  }