@deriv-web-design/ui 0.1.36 → 0.1.37

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.
@@ -7525,7 +7525,8 @@
7525
7525
  "optionalFields": [
7526
7526
  "variant",
7527
7527
  "title",
7528
- "description"
7528
+ "description",
7529
+ "labels"
7529
7530
  ],
7530
7531
  "variants": [
7531
7532
  "margin",
@@ -7563,6 +7564,73 @@
7563
7564
  "required": false,
7564
7565
  "maxLength": 200
7565
7566
  },
7567
+ "labels": {
7568
+ "type": "object",
7569
+ "required": false,
7570
+ "description": "Optional UI copy overrides for Raven / Makima i18n. Flat keys replace strings in the active block; swapPoints/swapPercentage cover each swap tab. Omit any key to keep the English default. Does not add variants.",
7571
+ "objectFields": {
7572
+ "calculations": {
7573
+ "type": "array",
7574
+ "required": false,
7575
+ "description": "Replaces the annotated calculation strips when set."
7576
+ },
7577
+ "exampleHeading": {
7578
+ "type": "string",
7579
+ "required": false,
7580
+ "maxLength": 40
7581
+ },
7582
+ "exampleIntro": {
7583
+ "type": "string",
7584
+ "required": false,
7585
+ "maxLength": 400
7586
+ },
7587
+ "exampleLead": {
7588
+ "type": "string",
7589
+ "required": false,
7590
+ "maxLength": 120
7591
+ },
7592
+ "formulaBlocks": {
7593
+ "type": "array",
7594
+ "required": false,
7595
+ "description": "Replaces the Formula column blocks when set."
7596
+ },
7597
+ "formulaHeading": {
7598
+ "type": "string",
7599
+ "required": false,
7600
+ "maxLength": 40
7601
+ },
7602
+ "note": {
7603
+ "type": "string",
7604
+ "required": false,
7605
+ "maxLength": 400
7606
+ },
7607
+ "resultText": {
7608
+ "type": "string",
7609
+ "required": false,
7610
+ "maxLength": 300
7611
+ },
7612
+ "swapPercentage": {
7613
+ "type": "object",
7614
+ "required": false,
7615
+ "description": "Body overrides for the swap In-percentage tab (same shape as swapPoints)."
7616
+ },
7617
+ "swapPoints": {
7618
+ "type": "object",
7619
+ "required": false,
7620
+ "description": "Body overrides for the swap In-points tab (formulaBlocks, exampleIntro, calculations, resultText, note, …)."
7621
+ },
7622
+ "swapTabPercentage": {
7623
+ "type": "string",
7624
+ "required": false,
7625
+ "maxLength": 60
7626
+ },
7627
+ "swapTabPoints": {
7628
+ "type": "string",
7629
+ "required": false,
7630
+ "maxLength": 60
7631
+ }
7632
+ }
7633
+ },
7566
7634
  "title": {
7567
7635
  "type": "string",
7568
7636
  "required": false,
@@ -4103,6 +4103,11 @@
4103
4103
  "required": false,
4104
4104
  "description": "Section description, shown under the title. Defaults to the canonical copy for `variant`."
4105
4105
  },
4106
+ "labels": {
4107
+ "type": "TradingCalculatorHowToLabels",
4108
+ "required": false,
4109
+ "description": "Optional UI copy overrides for Raven / Makima i18n. Omit to keep English formula/example/chip defaults."
4110
+ },
4106
4111
  "title": {
4107
4112
  "type": "string",
4108
4113
  "required": false,
package/dist/index.d.mts CHANGED
@@ -2395,6 +2395,50 @@ type FormulaBlock =
2395
2395
  content: string;
2396
2396
  }[];
2397
2397
  };
2398
+ /**
2399
+ * Optional UI copy overrides for Raven / Makima i18n.
2400
+ * Omit any key (or the whole object) to keep the English defaults baked into
2401
+ * the existing margin / pip / swap content. Does not add new variants — it
2402
+ * only replaces strings inside the block already on the page.
2403
+ *
2404
+ * Flat keys apply to whatever content is currently shown. For `swap-*`
2405
+ * instances (both formulas behind the tab switch), also pass
2406
+ * `swapPoints` / `swapPercentage` so each tab keeps its own translated body.
2407
+ *
2408
+ * Section `title` / `description` stay top-level props (already overridable).
2409
+ */
2410
+ type TradingCalculatorHowToLabels = {
2411
+ /** Left column heading. @default "Formula" */
2412
+ formulaHeading?: string;
2413
+ /** Right column heading. @default "Example" */
2414
+ exampleHeading?: string;
2415
+ /** Chip: "Swap calculation (In points)" */
2416
+ swapTabPoints?: string;
2417
+ /** Chip: "Swap calculation (In percentage)" */
2418
+ swapTabPercentage?: string;
2419
+ /** Formula column blocks. Replaces the whole column when set. */
2420
+ formulaBlocks?: FormulaBlock[];
2421
+ /** Lead paragraph under Example. */
2422
+ exampleIntro?: string;
2423
+ /** Optional second lead line (pip uses "The calculation would be:"). */
2424
+ exampleLead?: string;
2425
+ /** Annotated calculation strips. Replaces all strips when set. */
2426
+ calculations?: CalculationToken[][];
2427
+ /** Closing sentence after the strips. */
2428
+ resultText?: string;
2429
+ /** Muted note under the example. */
2430
+ note?: string;
2431
+ /**
2432
+ * Body overrides for the swap "In points" tab only.
2433
+ * Same shape as the flat body keys above (`formulaBlocks`, `exampleIntro`, …).
2434
+ */
2435
+ swapPoints?: Pick<TradingCalculatorHowToLabels, "formulaBlocks" | "exampleIntro" | "exampleLead" | "calculations" | "resultText" | "note" | "formulaHeading" | "exampleHeading">;
2436
+ /**
2437
+ * Body overrides for the swap "In percentage" tab only.
2438
+ * Same shape as the flat body keys above.
2439
+ */
2440
+ swapPercentage?: Pick<TradingCalculatorHowToLabels, "formulaBlocks" | "exampleIntro" | "exampleLead" | "calculations" | "resultText" | "note" | "formulaHeading" | "exampleHeading">;
2441
+ };
2398
2442
  interface TradingCalculatorHowToProps extends HTMLAttributes<HTMLElement> {
2399
2443
  /**
2400
2444
  * Which deriv.com "How to calculate…" page this instance mirrors.
@@ -2405,11 +2449,18 @@ interface TradingCalculatorHowToProps extends HTMLAttributes<HTMLElement> {
2405
2449
  title?: string;
2406
2450
  /** Section description, shown under the title. Defaults to the canonical copy for `variant`. */
2407
2451
  description?: string;
2452
+ /**
2453
+ * Optional UI copy overrides for Raven / Makima i18n.
2454
+ * Omit to keep English formula/example/chip defaults.
2455
+ */
2456
+ labels?: TradingCalculatorHowToLabels;
2408
2457
  /** Extra class name merged onto the root `<section>`. */
2409
2458
  className?: string;
2410
2459
  }
2460
+ /** Shared English defaults for column headings and swap chips. */
2461
+ declare const DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS: Required<Pick<TradingCalculatorHowToLabels, "formulaHeading" | "exampleHeading" | "swapTabPoints" | "swapTabPercentage">>;
2411
2462
 
2412
- declare const TradingCalculatorHowTo: ({ variant, title, description, className, ...props }: TradingCalculatorHowToProps) => react_jsx_runtime.JSX.Element;
2463
+ declare const TradingCalculatorHowTo: ({ variant, title, description, labels, className, ...props }: TradingCalculatorHowToProps) => react_jsx_runtime.JSX.Element;
2413
2464
 
2414
2465
  type CryptoTradeConverterVariant = "default";
2415
2466
  /**
@@ -3146,4 +3197,4 @@ interface AffiliatesSliderProps extends HTMLAttributes<HTMLElement> {
3146
3197
 
3147
3198
  declare const AffiliatesSlider: ({ title, description, min, max, step, defaultValue, value, onValueChange, referralsLabel, incomeLabel, incomePerReferral, currencySymbol, tickValues, disclaimer, disclaimerIconSrc, disclaimerIconAlt, sliderLabel, className, ...props }: AffiliatesSliderProps) => react_jsx_runtime.JSX.Element;
3148
3199
 
3149
- export { AVATAR_DATA, Accordion, type AccordionProps, AffiliatesSlider, type AffiliatesSliderProps, ArticleHero, type ArticleHeroArticle, type ArticleHeroColumn, type ArticleHeroProps, ArticleSection, type ArticleSectionItem, type ArticleSectionProps, type ArticleSectionVariant, AvatarGrid, type AvatarGridProps, type AvatarItem, type AvatarPosition, type AwardItem, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CORAL_BANNER_DERIV_SLIDES, CTABanner, type CTABannerProps, type CalculationToken, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, ComparisonCards, type ComparisonCardsCard, type ComparisonCardsProps, type ComparisonCardsRow, type ComparisonCardsTheme, CoralBanner, type CoralBannerButton, type CoralBannerProps, type CoralBannerSlide, CountryLinkGrid, type CountryLinkGridHeadingLevel, type CountryLinkGridItem, type CountryLinkGridProps, CryptoMarketsTable, type CryptoMarketsTableLabels, type CryptoMarketsTableProps, type CryptoMarketsTableVariant, CryptoTradeConverter, type CryptoTradeConverterLabels, type CryptoTradeConverterProps, type CryptoTradeConverterVariant, DEFAULT_AWARDS, DEFAULT_CRYPTO_MARKETS_TABLE_LABELS, DEFAULT_CRYPTO_MARKETS_TABLE_TITLE, DEFAULT_CRYPTO_TRADE_CONVERTER_LABELS, DEFAULT_CRYPTO_TRADE_CONVERTER_SUBTITLE, DEFAULT_CRYPTO_TRADE_CONVERTER_TITLE, DEFAULT_CULTURE_CARDS, DEFAULT_EXCHANGE_RATE_WS_URL, DEFAULT_SYMBOLS_ENDPOINT, DEFAULT_TRADE_HREF, DEFAULT_TRADING_CALCULATOR_LABELS, DayNightTransition, type DayNightTransitionProps, DocumentChips, type DocumentChipsDocument, type DocumentChipsGroup, type DocumentChipsHeadingLevel, type DocumentChipsLanguageLink, type DocumentChipsProps, type DocumentChipsVariant, DotLottieInView, type DotLottieInViewProps, DownloadBadge, type DownloadBadgeColorScheme, type DownloadBadgePlatform, type DownloadBadgeProps, DownloadBanner, type DownloadBannerProps, type DownloadBannerStyle, DynamicTable, type DynamicTableColumnDef, type DynamicTableProps, type DynamicTableRowData, type DynamicTableVariant, EntityInfoSection, type EntityInfoSectionHeadingLevel, type EntityInfoSectionLink, type EntityInfoSectionProps, FEATURE_AWARDS_TEXT_CONTENT, FEATURE_BLOG_CATEGORIES_TEXT_CONTENT, FEATURE_BLOG_TEXT_CONTENT, FEATURE_OFFICES_TEXT_CONTENT, FEATURE_SCROLL_DATA, FaqAccordion, type FaqAccordionColorScheme, type FaqAccordionProps, type FaqItem, FeatureAwards, type FeatureAwardsProps, FeatureBlog, type FeatureBlogAuthor, FeatureBlogCategories, type FeatureBlogCategoriesProps, type FeatureBlogCategoryPost, type FeatureBlogCategoryTab, type FeatureBlogContentBlock, type FeatureBlogContentBlockType, FeatureBlogPage, type FeatureBlogPageProps, type FeatureBlogPost, type FeatureBlogProps, type FeatureBlogSharePlatform, FeatureBullets, type FeatureBulletsProps, type FeatureCardIconItem, type FeatureCardItem, FeatureCards, FeatureCardsCarousel, type FeatureCardsCarouselItem, type FeatureCardsCarouselProps, type FeatureCardsCarouselTone, FeatureCardsIcon, type FeatureCardsIconProps, type FeatureCardsProps, type FeatureOffice, type FeatureOfficeRegion, FeatureOffices, type FeatureOfficesProps, FeatureScroll, type FeatureScrollItem, type FeatureScrollProps, FeatureSplit, type FeatureSplitImagePosition, type FeatureSplitProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, type FormulaBlock, Header, type HeaderButtonProps, type HeaderProps, type HeaderVariant, type HelpCenterContentBlock, type HelpCenterContentBlockType, HelpCenterPage, type HelpCenterPageProps, type HelpCenterQuestionItem, HelpCentreCategories, type HelpCentreCategoriesProps, type HelpCentreCategoryItem, HelpCentreSubCategories, type HelpCentreSubCategoriesProps, type HelpCentreSubCategoryItem, Hero, type HeroButtonProps, type HeroProps, type HeroTrustpilotProps, type HeroVariant, IMAGE_BANNER_CHIPS_DEFAULT_IMAGE, ImageBanner, type ImageBannerProps, type ImageBannerVariant, type LanguageItem, LanguageSelectModal, type LanguageSelectModalOption, type LanguageSelectModalProps, type LeaderItem, Leaders, type LeadersProps, Link, type LinkColorScheme, LinkModal, type LinkModalProps, type LinkProps, type LogoItem, LogoMarquee, type LogoMarqueeProps, MasterPartner, type MasterPartnerNote, type MasterPartnerProps, type MasterPartnerStep, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, OPTIONS_TYPES_ACCUMULATOR_CONTENT, OPTIONS_TYPES_DIGITAL_CONTENT, OPTIONS_TYPES_EU_MULTIPLIERS_CONTENT, OPTIONS_TYPES_MULTIPLIERS_CONTENT, OPTIONS_TYPES_PLACEHOLDER_ITEMS, OPTIONS_TYPES_TURBO_CONTENT, OPTIONS_TYPES_VANILLA_CONTENT, OptionsTypes, type OptionsTypesAnimation, type OptionsTypesIcon, type OptionsTypesItem, type OptionsTypesMetaItem, type OptionsTypesProps, type OptionsTypesVariant, PARALLAX_BANNER_TEXT_CONTENT, Pagination, type PaginationProps, ParallaxBanner, type ParallaxBannerCultureCard, type ParallaxBannerProps, type PartnerPayoutItem, PartnersPayout, type PartnersPayoutProps, PeopleGrid, type PeopleGridProps, type PersonItem, RESOURCE_BANNER_DERIV_CONTENT, ResourceBanner, type ResourceBannerHeadingLevel, type ResourceBannerLink, type ResourceBannerProps, STEPS_DATA, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsAward, type StatsProps, StatsSimple, type StatsSimpleProps, type StepItem, Steps, type StepsImagePosition, type StepsProps, type StickyCardItem, type StickyCardTheme, type StickyMarketCardItem, type StickyMarketCardTheme, StickyMarketCards, StickyMarketCardsLottie, type StickyMarketCardsLottieItem, type StickyMarketCardsLottieProps, type StickyMarketCardsLottieTheme, type StickyMarketCardsProps, StickyStackedCards, type StickyStackedCardsProps, type SwapCalculationMode, TEXT_CONTENT, type TabItem, Table, type TableColumnDef, type TableColumnWidth, type TableProps, type TableRowData, Tabs, type TabsProps, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, Testimonial, type TestimonialItem, type TestimonialProps, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant, TextScroll, type TextScrollProps, type TierAccent, type TierItem, Tiers, type TiersProps, TradingCalculator, TradingCalculatorHowTo, type TradingCalculatorHowToProps, type TradingCalculatorHowToVariant, type TradingCalculatorLabels, type TradingCalculatorProps, type TradingCalculatorResults, type TradingCalculatorVariant, type TradingSymbolSpec, dayNightTransitionV2Preset, isLottieSrc };
3200
+ export { AVATAR_DATA, Accordion, type AccordionProps, AffiliatesSlider, type AffiliatesSliderProps, ArticleHero, type ArticleHeroArticle, type ArticleHeroColumn, type ArticleHeroProps, ArticleSection, type ArticleSectionItem, type ArticleSectionProps, type ArticleSectionVariant, AvatarGrid, type AvatarGridProps, type AvatarItem, type AvatarPosition, type AwardItem, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CORAL_BANNER_DERIV_SLIDES, CTABanner, type CTABannerProps, type CalculationToken, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, ComparisonCards, type ComparisonCardsCard, type ComparisonCardsProps, type ComparisonCardsRow, type ComparisonCardsTheme, CoralBanner, type CoralBannerButton, type CoralBannerProps, type CoralBannerSlide, CountryLinkGrid, type CountryLinkGridHeadingLevel, type CountryLinkGridItem, type CountryLinkGridProps, CryptoMarketsTable, type CryptoMarketsTableLabels, type CryptoMarketsTableProps, type CryptoMarketsTableVariant, CryptoTradeConverter, type CryptoTradeConverterLabels, type CryptoTradeConverterProps, type CryptoTradeConverterVariant, DEFAULT_AWARDS, DEFAULT_CRYPTO_MARKETS_TABLE_LABELS, DEFAULT_CRYPTO_MARKETS_TABLE_TITLE, DEFAULT_CRYPTO_TRADE_CONVERTER_LABELS, DEFAULT_CRYPTO_TRADE_CONVERTER_SUBTITLE, DEFAULT_CRYPTO_TRADE_CONVERTER_TITLE, DEFAULT_CULTURE_CARDS, DEFAULT_EXCHANGE_RATE_WS_URL, DEFAULT_SYMBOLS_ENDPOINT, DEFAULT_TRADE_HREF, DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS, DEFAULT_TRADING_CALCULATOR_LABELS, DayNightTransition, type DayNightTransitionProps, DocumentChips, type DocumentChipsDocument, type DocumentChipsGroup, type DocumentChipsHeadingLevel, type DocumentChipsLanguageLink, type DocumentChipsProps, type DocumentChipsVariant, DotLottieInView, type DotLottieInViewProps, DownloadBadge, type DownloadBadgeColorScheme, type DownloadBadgePlatform, type DownloadBadgeProps, DownloadBanner, type DownloadBannerProps, type DownloadBannerStyle, DynamicTable, type DynamicTableColumnDef, type DynamicTableProps, type DynamicTableRowData, type DynamicTableVariant, EntityInfoSection, type EntityInfoSectionHeadingLevel, type EntityInfoSectionLink, type EntityInfoSectionProps, FEATURE_AWARDS_TEXT_CONTENT, FEATURE_BLOG_CATEGORIES_TEXT_CONTENT, FEATURE_BLOG_TEXT_CONTENT, FEATURE_OFFICES_TEXT_CONTENT, FEATURE_SCROLL_DATA, FaqAccordion, type FaqAccordionColorScheme, type FaqAccordionProps, type FaqItem, FeatureAwards, type FeatureAwardsProps, FeatureBlog, type FeatureBlogAuthor, FeatureBlogCategories, type FeatureBlogCategoriesProps, type FeatureBlogCategoryPost, type FeatureBlogCategoryTab, type FeatureBlogContentBlock, type FeatureBlogContentBlockType, FeatureBlogPage, type FeatureBlogPageProps, type FeatureBlogPost, type FeatureBlogProps, type FeatureBlogSharePlatform, FeatureBullets, type FeatureBulletsProps, type FeatureCardIconItem, type FeatureCardItem, FeatureCards, FeatureCardsCarousel, type FeatureCardsCarouselItem, type FeatureCardsCarouselProps, type FeatureCardsCarouselTone, FeatureCardsIcon, type FeatureCardsIconProps, type FeatureCardsProps, type FeatureOffice, type FeatureOfficeRegion, FeatureOffices, type FeatureOfficesProps, FeatureScroll, type FeatureScrollItem, type FeatureScrollProps, FeatureSplit, type FeatureSplitImagePosition, type FeatureSplitProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, type FormulaBlock, Header, type HeaderButtonProps, type HeaderProps, type HeaderVariant, type HelpCenterContentBlock, type HelpCenterContentBlockType, HelpCenterPage, type HelpCenterPageProps, type HelpCenterQuestionItem, HelpCentreCategories, type HelpCentreCategoriesProps, type HelpCentreCategoryItem, HelpCentreSubCategories, type HelpCentreSubCategoriesProps, type HelpCentreSubCategoryItem, Hero, type HeroButtonProps, type HeroProps, type HeroTrustpilotProps, type HeroVariant, IMAGE_BANNER_CHIPS_DEFAULT_IMAGE, ImageBanner, type ImageBannerProps, type ImageBannerVariant, type LanguageItem, LanguageSelectModal, type LanguageSelectModalOption, type LanguageSelectModalProps, type LeaderItem, Leaders, type LeadersProps, Link, type LinkColorScheme, LinkModal, type LinkModalProps, type LinkProps, type LogoItem, LogoMarquee, type LogoMarqueeProps, MasterPartner, type MasterPartnerNote, type MasterPartnerProps, type MasterPartnerStep, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, OPTIONS_TYPES_ACCUMULATOR_CONTENT, OPTIONS_TYPES_DIGITAL_CONTENT, OPTIONS_TYPES_EU_MULTIPLIERS_CONTENT, OPTIONS_TYPES_MULTIPLIERS_CONTENT, OPTIONS_TYPES_PLACEHOLDER_ITEMS, OPTIONS_TYPES_TURBO_CONTENT, OPTIONS_TYPES_VANILLA_CONTENT, OptionsTypes, type OptionsTypesAnimation, type OptionsTypesIcon, type OptionsTypesItem, type OptionsTypesMetaItem, type OptionsTypesProps, type OptionsTypesVariant, PARALLAX_BANNER_TEXT_CONTENT, Pagination, type PaginationProps, ParallaxBanner, type ParallaxBannerCultureCard, type ParallaxBannerProps, type PartnerPayoutItem, PartnersPayout, type PartnersPayoutProps, PeopleGrid, type PeopleGridProps, type PersonItem, RESOURCE_BANNER_DERIV_CONTENT, ResourceBanner, type ResourceBannerHeadingLevel, type ResourceBannerLink, type ResourceBannerProps, STEPS_DATA, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsAward, type StatsProps, StatsSimple, type StatsSimpleProps, type StepItem, Steps, type StepsImagePosition, type StepsProps, type StickyCardItem, type StickyCardTheme, type StickyMarketCardItem, type StickyMarketCardTheme, StickyMarketCards, StickyMarketCardsLottie, type StickyMarketCardsLottieItem, type StickyMarketCardsLottieProps, type StickyMarketCardsLottieTheme, type StickyMarketCardsProps, StickyStackedCards, type StickyStackedCardsProps, type SwapCalculationMode, TEXT_CONTENT, type TabItem, Table, type TableColumnDef, type TableColumnWidth, type TableProps, type TableRowData, Tabs, type TabsProps, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, Testimonial, type TestimonialItem, type TestimonialProps, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant, TextScroll, type TextScrollProps, type TierAccent, type TierItem, Tiers, type TiersProps, TradingCalculator, TradingCalculatorHowTo, type TradingCalculatorHowToLabels, type TradingCalculatorHowToProps, type TradingCalculatorHowToVariant, type TradingCalculatorLabels, type TradingCalculatorProps, type TradingCalculatorResults, type TradingCalculatorVariant, type TradingSymbolSpec, dayNightTransitionV2Preset, isLottieSrc };
package/dist/index.d.ts CHANGED
@@ -2395,6 +2395,50 @@ type FormulaBlock =
2395
2395
  content: string;
2396
2396
  }[];
2397
2397
  };
2398
+ /**
2399
+ * Optional UI copy overrides for Raven / Makima i18n.
2400
+ * Omit any key (or the whole object) to keep the English defaults baked into
2401
+ * the existing margin / pip / swap content. Does not add new variants — it
2402
+ * only replaces strings inside the block already on the page.
2403
+ *
2404
+ * Flat keys apply to whatever content is currently shown. For `swap-*`
2405
+ * instances (both formulas behind the tab switch), also pass
2406
+ * `swapPoints` / `swapPercentage` so each tab keeps its own translated body.
2407
+ *
2408
+ * Section `title` / `description` stay top-level props (already overridable).
2409
+ */
2410
+ type TradingCalculatorHowToLabels = {
2411
+ /** Left column heading. @default "Formula" */
2412
+ formulaHeading?: string;
2413
+ /** Right column heading. @default "Example" */
2414
+ exampleHeading?: string;
2415
+ /** Chip: "Swap calculation (In points)" */
2416
+ swapTabPoints?: string;
2417
+ /** Chip: "Swap calculation (In percentage)" */
2418
+ swapTabPercentage?: string;
2419
+ /** Formula column blocks. Replaces the whole column when set. */
2420
+ formulaBlocks?: FormulaBlock[];
2421
+ /** Lead paragraph under Example. */
2422
+ exampleIntro?: string;
2423
+ /** Optional second lead line (pip uses "The calculation would be:"). */
2424
+ exampleLead?: string;
2425
+ /** Annotated calculation strips. Replaces all strips when set. */
2426
+ calculations?: CalculationToken[][];
2427
+ /** Closing sentence after the strips. */
2428
+ resultText?: string;
2429
+ /** Muted note under the example. */
2430
+ note?: string;
2431
+ /**
2432
+ * Body overrides for the swap "In points" tab only.
2433
+ * Same shape as the flat body keys above (`formulaBlocks`, `exampleIntro`, …).
2434
+ */
2435
+ swapPoints?: Pick<TradingCalculatorHowToLabels, "formulaBlocks" | "exampleIntro" | "exampleLead" | "calculations" | "resultText" | "note" | "formulaHeading" | "exampleHeading">;
2436
+ /**
2437
+ * Body overrides for the swap "In percentage" tab only.
2438
+ * Same shape as the flat body keys above.
2439
+ */
2440
+ swapPercentage?: Pick<TradingCalculatorHowToLabels, "formulaBlocks" | "exampleIntro" | "exampleLead" | "calculations" | "resultText" | "note" | "formulaHeading" | "exampleHeading">;
2441
+ };
2398
2442
  interface TradingCalculatorHowToProps extends HTMLAttributes<HTMLElement> {
2399
2443
  /**
2400
2444
  * Which deriv.com "How to calculate…" page this instance mirrors.
@@ -2405,11 +2449,18 @@ interface TradingCalculatorHowToProps extends HTMLAttributes<HTMLElement> {
2405
2449
  title?: string;
2406
2450
  /** Section description, shown under the title. Defaults to the canonical copy for `variant`. */
2407
2451
  description?: string;
2452
+ /**
2453
+ * Optional UI copy overrides for Raven / Makima i18n.
2454
+ * Omit to keep English formula/example/chip defaults.
2455
+ */
2456
+ labels?: TradingCalculatorHowToLabels;
2408
2457
  /** Extra class name merged onto the root `<section>`. */
2409
2458
  className?: string;
2410
2459
  }
2460
+ /** Shared English defaults for column headings and swap chips. */
2461
+ declare const DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS: Required<Pick<TradingCalculatorHowToLabels, "formulaHeading" | "exampleHeading" | "swapTabPoints" | "swapTabPercentage">>;
2411
2462
 
2412
- declare const TradingCalculatorHowTo: ({ variant, title, description, className, ...props }: TradingCalculatorHowToProps) => react_jsx_runtime.JSX.Element;
2463
+ declare const TradingCalculatorHowTo: ({ variant, title, description, labels, className, ...props }: TradingCalculatorHowToProps) => react_jsx_runtime.JSX.Element;
2413
2464
 
2414
2465
  type CryptoTradeConverterVariant = "default";
2415
2466
  /**
@@ -3146,4 +3197,4 @@ interface AffiliatesSliderProps extends HTMLAttributes<HTMLElement> {
3146
3197
 
3147
3198
  declare const AffiliatesSlider: ({ title, description, min, max, step, defaultValue, value, onValueChange, referralsLabel, incomeLabel, incomePerReferral, currencySymbol, tickValues, disclaimer, disclaimerIconSrc, disclaimerIconAlt, sliderLabel, className, ...props }: AffiliatesSliderProps) => react_jsx_runtime.JSX.Element;
3148
3199
 
3149
- export { AVATAR_DATA, Accordion, type AccordionProps, AffiliatesSlider, type AffiliatesSliderProps, ArticleHero, type ArticleHeroArticle, type ArticleHeroColumn, type ArticleHeroProps, ArticleSection, type ArticleSectionItem, type ArticleSectionProps, type ArticleSectionVariant, AvatarGrid, type AvatarGridProps, type AvatarItem, type AvatarPosition, type AwardItem, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CORAL_BANNER_DERIV_SLIDES, CTABanner, type CTABannerProps, type CalculationToken, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, ComparisonCards, type ComparisonCardsCard, type ComparisonCardsProps, type ComparisonCardsRow, type ComparisonCardsTheme, CoralBanner, type CoralBannerButton, type CoralBannerProps, type CoralBannerSlide, CountryLinkGrid, type CountryLinkGridHeadingLevel, type CountryLinkGridItem, type CountryLinkGridProps, CryptoMarketsTable, type CryptoMarketsTableLabels, type CryptoMarketsTableProps, type CryptoMarketsTableVariant, CryptoTradeConverter, type CryptoTradeConverterLabels, type CryptoTradeConverterProps, type CryptoTradeConverterVariant, DEFAULT_AWARDS, DEFAULT_CRYPTO_MARKETS_TABLE_LABELS, DEFAULT_CRYPTO_MARKETS_TABLE_TITLE, DEFAULT_CRYPTO_TRADE_CONVERTER_LABELS, DEFAULT_CRYPTO_TRADE_CONVERTER_SUBTITLE, DEFAULT_CRYPTO_TRADE_CONVERTER_TITLE, DEFAULT_CULTURE_CARDS, DEFAULT_EXCHANGE_RATE_WS_URL, DEFAULT_SYMBOLS_ENDPOINT, DEFAULT_TRADE_HREF, DEFAULT_TRADING_CALCULATOR_LABELS, DayNightTransition, type DayNightTransitionProps, DocumentChips, type DocumentChipsDocument, type DocumentChipsGroup, type DocumentChipsHeadingLevel, type DocumentChipsLanguageLink, type DocumentChipsProps, type DocumentChipsVariant, DotLottieInView, type DotLottieInViewProps, DownloadBadge, type DownloadBadgeColorScheme, type DownloadBadgePlatform, type DownloadBadgeProps, DownloadBanner, type DownloadBannerProps, type DownloadBannerStyle, DynamicTable, type DynamicTableColumnDef, type DynamicTableProps, type DynamicTableRowData, type DynamicTableVariant, EntityInfoSection, type EntityInfoSectionHeadingLevel, type EntityInfoSectionLink, type EntityInfoSectionProps, FEATURE_AWARDS_TEXT_CONTENT, FEATURE_BLOG_CATEGORIES_TEXT_CONTENT, FEATURE_BLOG_TEXT_CONTENT, FEATURE_OFFICES_TEXT_CONTENT, FEATURE_SCROLL_DATA, FaqAccordion, type FaqAccordionColorScheme, type FaqAccordionProps, type FaqItem, FeatureAwards, type FeatureAwardsProps, FeatureBlog, type FeatureBlogAuthor, FeatureBlogCategories, type FeatureBlogCategoriesProps, type FeatureBlogCategoryPost, type FeatureBlogCategoryTab, type FeatureBlogContentBlock, type FeatureBlogContentBlockType, FeatureBlogPage, type FeatureBlogPageProps, type FeatureBlogPost, type FeatureBlogProps, type FeatureBlogSharePlatform, FeatureBullets, type FeatureBulletsProps, type FeatureCardIconItem, type FeatureCardItem, FeatureCards, FeatureCardsCarousel, type FeatureCardsCarouselItem, type FeatureCardsCarouselProps, type FeatureCardsCarouselTone, FeatureCardsIcon, type FeatureCardsIconProps, type FeatureCardsProps, type FeatureOffice, type FeatureOfficeRegion, FeatureOffices, type FeatureOfficesProps, FeatureScroll, type FeatureScrollItem, type FeatureScrollProps, FeatureSplit, type FeatureSplitImagePosition, type FeatureSplitProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, type FormulaBlock, Header, type HeaderButtonProps, type HeaderProps, type HeaderVariant, type HelpCenterContentBlock, type HelpCenterContentBlockType, HelpCenterPage, type HelpCenterPageProps, type HelpCenterQuestionItem, HelpCentreCategories, type HelpCentreCategoriesProps, type HelpCentreCategoryItem, HelpCentreSubCategories, type HelpCentreSubCategoriesProps, type HelpCentreSubCategoryItem, Hero, type HeroButtonProps, type HeroProps, type HeroTrustpilotProps, type HeroVariant, IMAGE_BANNER_CHIPS_DEFAULT_IMAGE, ImageBanner, type ImageBannerProps, type ImageBannerVariant, type LanguageItem, LanguageSelectModal, type LanguageSelectModalOption, type LanguageSelectModalProps, type LeaderItem, Leaders, type LeadersProps, Link, type LinkColorScheme, LinkModal, type LinkModalProps, type LinkProps, type LogoItem, LogoMarquee, type LogoMarqueeProps, MasterPartner, type MasterPartnerNote, type MasterPartnerProps, type MasterPartnerStep, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, OPTIONS_TYPES_ACCUMULATOR_CONTENT, OPTIONS_TYPES_DIGITAL_CONTENT, OPTIONS_TYPES_EU_MULTIPLIERS_CONTENT, OPTIONS_TYPES_MULTIPLIERS_CONTENT, OPTIONS_TYPES_PLACEHOLDER_ITEMS, OPTIONS_TYPES_TURBO_CONTENT, OPTIONS_TYPES_VANILLA_CONTENT, OptionsTypes, type OptionsTypesAnimation, type OptionsTypesIcon, type OptionsTypesItem, type OptionsTypesMetaItem, type OptionsTypesProps, type OptionsTypesVariant, PARALLAX_BANNER_TEXT_CONTENT, Pagination, type PaginationProps, ParallaxBanner, type ParallaxBannerCultureCard, type ParallaxBannerProps, type PartnerPayoutItem, PartnersPayout, type PartnersPayoutProps, PeopleGrid, type PeopleGridProps, type PersonItem, RESOURCE_BANNER_DERIV_CONTENT, ResourceBanner, type ResourceBannerHeadingLevel, type ResourceBannerLink, type ResourceBannerProps, STEPS_DATA, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsAward, type StatsProps, StatsSimple, type StatsSimpleProps, type StepItem, Steps, type StepsImagePosition, type StepsProps, type StickyCardItem, type StickyCardTheme, type StickyMarketCardItem, type StickyMarketCardTheme, StickyMarketCards, StickyMarketCardsLottie, type StickyMarketCardsLottieItem, type StickyMarketCardsLottieProps, type StickyMarketCardsLottieTheme, type StickyMarketCardsProps, StickyStackedCards, type StickyStackedCardsProps, type SwapCalculationMode, TEXT_CONTENT, type TabItem, Table, type TableColumnDef, type TableColumnWidth, type TableProps, type TableRowData, Tabs, type TabsProps, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, Testimonial, type TestimonialItem, type TestimonialProps, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant, TextScroll, type TextScrollProps, type TierAccent, type TierItem, Tiers, type TiersProps, TradingCalculator, TradingCalculatorHowTo, type TradingCalculatorHowToProps, type TradingCalculatorHowToVariant, type TradingCalculatorLabels, type TradingCalculatorProps, type TradingCalculatorResults, type TradingCalculatorVariant, type TradingSymbolSpec, dayNightTransitionV2Preset, isLottieSrc };
3200
+ export { AVATAR_DATA, Accordion, type AccordionProps, AffiliatesSlider, type AffiliatesSliderProps, ArticleHero, type ArticleHeroArticle, type ArticleHeroColumn, type ArticleHeroProps, ArticleSection, type ArticleSectionItem, type ArticleSectionProps, type ArticleSectionVariant, AvatarGrid, type AvatarGridProps, type AvatarItem, type AvatarPosition, type AwardItem, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CORAL_BANNER_DERIV_SLIDES, CTABanner, type CTABannerProps, type CalculationToken, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, ComparisonCards, type ComparisonCardsCard, type ComparisonCardsProps, type ComparisonCardsRow, type ComparisonCardsTheme, CoralBanner, type CoralBannerButton, type CoralBannerProps, type CoralBannerSlide, CountryLinkGrid, type CountryLinkGridHeadingLevel, type CountryLinkGridItem, type CountryLinkGridProps, CryptoMarketsTable, type CryptoMarketsTableLabels, type CryptoMarketsTableProps, type CryptoMarketsTableVariant, CryptoTradeConverter, type CryptoTradeConverterLabels, type CryptoTradeConverterProps, type CryptoTradeConverterVariant, DEFAULT_AWARDS, DEFAULT_CRYPTO_MARKETS_TABLE_LABELS, DEFAULT_CRYPTO_MARKETS_TABLE_TITLE, DEFAULT_CRYPTO_TRADE_CONVERTER_LABELS, DEFAULT_CRYPTO_TRADE_CONVERTER_SUBTITLE, DEFAULT_CRYPTO_TRADE_CONVERTER_TITLE, DEFAULT_CULTURE_CARDS, DEFAULT_EXCHANGE_RATE_WS_URL, DEFAULT_SYMBOLS_ENDPOINT, DEFAULT_TRADE_HREF, DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS, DEFAULT_TRADING_CALCULATOR_LABELS, DayNightTransition, type DayNightTransitionProps, DocumentChips, type DocumentChipsDocument, type DocumentChipsGroup, type DocumentChipsHeadingLevel, type DocumentChipsLanguageLink, type DocumentChipsProps, type DocumentChipsVariant, DotLottieInView, type DotLottieInViewProps, DownloadBadge, type DownloadBadgeColorScheme, type DownloadBadgePlatform, type DownloadBadgeProps, DownloadBanner, type DownloadBannerProps, type DownloadBannerStyle, DynamicTable, type DynamicTableColumnDef, type DynamicTableProps, type DynamicTableRowData, type DynamicTableVariant, EntityInfoSection, type EntityInfoSectionHeadingLevel, type EntityInfoSectionLink, type EntityInfoSectionProps, FEATURE_AWARDS_TEXT_CONTENT, FEATURE_BLOG_CATEGORIES_TEXT_CONTENT, FEATURE_BLOG_TEXT_CONTENT, FEATURE_OFFICES_TEXT_CONTENT, FEATURE_SCROLL_DATA, FaqAccordion, type FaqAccordionColorScheme, type FaqAccordionProps, type FaqItem, FeatureAwards, type FeatureAwardsProps, FeatureBlog, type FeatureBlogAuthor, FeatureBlogCategories, type FeatureBlogCategoriesProps, type FeatureBlogCategoryPost, type FeatureBlogCategoryTab, type FeatureBlogContentBlock, type FeatureBlogContentBlockType, FeatureBlogPage, type FeatureBlogPageProps, type FeatureBlogPost, type FeatureBlogProps, type FeatureBlogSharePlatform, FeatureBullets, type FeatureBulletsProps, type FeatureCardIconItem, type FeatureCardItem, FeatureCards, FeatureCardsCarousel, type FeatureCardsCarouselItem, type FeatureCardsCarouselProps, type FeatureCardsCarouselTone, FeatureCardsIcon, type FeatureCardsIconProps, type FeatureCardsProps, type FeatureOffice, type FeatureOfficeRegion, FeatureOffices, type FeatureOfficesProps, FeatureScroll, type FeatureScrollItem, type FeatureScrollProps, FeatureSplit, type FeatureSplitImagePosition, type FeatureSplitProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, type FormulaBlock, Header, type HeaderButtonProps, type HeaderProps, type HeaderVariant, type HelpCenterContentBlock, type HelpCenterContentBlockType, HelpCenterPage, type HelpCenterPageProps, type HelpCenterQuestionItem, HelpCentreCategories, type HelpCentreCategoriesProps, type HelpCentreCategoryItem, HelpCentreSubCategories, type HelpCentreSubCategoriesProps, type HelpCentreSubCategoryItem, Hero, type HeroButtonProps, type HeroProps, type HeroTrustpilotProps, type HeroVariant, IMAGE_BANNER_CHIPS_DEFAULT_IMAGE, ImageBanner, type ImageBannerProps, type ImageBannerVariant, type LanguageItem, LanguageSelectModal, type LanguageSelectModalOption, type LanguageSelectModalProps, type LeaderItem, Leaders, type LeadersProps, Link, type LinkColorScheme, LinkModal, type LinkModalProps, type LinkProps, type LogoItem, LogoMarquee, type LogoMarqueeProps, MasterPartner, type MasterPartnerNote, type MasterPartnerProps, type MasterPartnerStep, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, OPTIONS_TYPES_ACCUMULATOR_CONTENT, OPTIONS_TYPES_DIGITAL_CONTENT, OPTIONS_TYPES_EU_MULTIPLIERS_CONTENT, OPTIONS_TYPES_MULTIPLIERS_CONTENT, OPTIONS_TYPES_PLACEHOLDER_ITEMS, OPTIONS_TYPES_TURBO_CONTENT, OPTIONS_TYPES_VANILLA_CONTENT, OptionsTypes, type OptionsTypesAnimation, type OptionsTypesIcon, type OptionsTypesItem, type OptionsTypesMetaItem, type OptionsTypesProps, type OptionsTypesVariant, PARALLAX_BANNER_TEXT_CONTENT, Pagination, type PaginationProps, ParallaxBanner, type ParallaxBannerCultureCard, type ParallaxBannerProps, type PartnerPayoutItem, PartnersPayout, type PartnersPayoutProps, PeopleGrid, type PeopleGridProps, type PersonItem, RESOURCE_BANNER_DERIV_CONTENT, ResourceBanner, type ResourceBannerHeadingLevel, type ResourceBannerLink, type ResourceBannerProps, STEPS_DATA, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsAward, type StatsProps, StatsSimple, type StatsSimpleProps, type StepItem, Steps, type StepsImagePosition, type StepsProps, type StickyCardItem, type StickyCardTheme, type StickyMarketCardItem, type StickyMarketCardTheme, StickyMarketCards, StickyMarketCardsLottie, type StickyMarketCardsLottieItem, type StickyMarketCardsLottieProps, type StickyMarketCardsLottieTheme, type StickyMarketCardsProps, StickyStackedCards, type StickyStackedCardsProps, type SwapCalculationMode, TEXT_CONTENT, type TabItem, Table, type TableColumnDef, type TableColumnWidth, type TableProps, type TableRowData, Tabs, type TabsProps, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, Testimonial, type TestimonialItem, type TestimonialProps, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant, TextScroll, type TextScrollProps, type TierAccent, type TierItem, Tiers, type TiersProps, TradingCalculator, TradingCalculatorHowTo, type TradingCalculatorHowToLabels, type TradingCalculatorHowToProps, type TradingCalculatorHowToVariant, type TradingCalculatorLabels, type TradingCalculatorProps, type TradingCalculatorResults, type TradingCalculatorVariant, type TradingSymbolSpec, dayNightTransitionV2Preset, isLottieSrc };
package/dist/index.js CHANGED
@@ -61,6 +61,7 @@ __export(index_exports, {
61
61
  DEFAULT_EXCHANGE_RATE_WS_URL: () => DEFAULT_EXCHANGE_RATE_WS_URL,
62
62
  DEFAULT_SYMBOLS_ENDPOINT: () => DEFAULT_SYMBOLS_ENDPOINT,
63
63
  DEFAULT_TRADE_HREF: () => DEFAULT_TRADE_HREF,
64
+ DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS: () => DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS,
64
65
  DEFAULT_TRADING_CALCULATOR_LABELS: () => DEFAULT_TRADING_CALCULATOR_LABELS,
65
66
  DayNightTransition: () => DayNightTransition,
66
67
  DocumentChips: () => DocumentChips,
@@ -8922,7 +8923,53 @@ var TradingCalculator = ({
8922
8923
 
8923
8924
  // templates/TradingCalculatorHowTo/TradingCalculatorHowTo.tsx
8924
8925
  var import_react35 = require("react");
8926
+
8927
+ // templates/TradingCalculatorHowTo/TradingCalculatorHowTo.types.ts
8928
+ var DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS = {
8929
+ formulaHeading: "Formula",
8930
+ exampleHeading: "Example",
8931
+ swapTabPoints: "Swap calculation (In points)",
8932
+ swapTabPercentage: "Swap calculation (In percentage)"
8933
+ };
8934
+
8935
+ // templates/TradingCalculatorHowTo/TradingCalculatorHowTo.tsx
8925
8936
  var import_jsx_runtime61 = require("react/jsx-runtime");
8937
+ function applyContentLabels(base, overrides) {
8938
+ if (!overrides) {
8939
+ return {
8940
+ ...base,
8941
+ formulaHeading: DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS.formulaHeading,
8942
+ exampleHeading: DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS.exampleHeading
8943
+ };
8944
+ }
8945
+ return {
8946
+ ...base,
8947
+ formulaHeading: overrides.formulaHeading ?? DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS.formulaHeading,
8948
+ exampleHeading: overrides.exampleHeading ?? DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS.exampleHeading,
8949
+ formulaBlocks: overrides.formulaBlocks ?? base.formulaBlocks,
8950
+ exampleIntro: overrides.exampleIntro ?? base.exampleIntro,
8951
+ exampleLead: overrides.exampleLead ?? base.exampleLead,
8952
+ calculations: overrides.calculations ?? base.calculations,
8953
+ resultText: overrides.resultText ?? base.resultText,
8954
+ note: overrides.note ?? base.note
8955
+ };
8956
+ }
8957
+ function bodyLabelsForMode(labels, isSwap, swapTab) {
8958
+ if (!labels) return void 0;
8959
+ const flat = {
8960
+ formulaHeading: labels.formulaHeading,
8961
+ exampleHeading: labels.exampleHeading,
8962
+ formulaBlocks: labels.formulaBlocks,
8963
+ exampleIntro: labels.exampleIntro,
8964
+ exampleLead: labels.exampleLead,
8965
+ calculations: labels.calculations,
8966
+ resultText: labels.resultText,
8967
+ note: labels.note
8968
+ };
8969
+ if (!isSwap) return flat;
8970
+ const tabSpecific = swapTab === "percentage" ? labels.swapPercentage : labels.swapPoints;
8971
+ return { ...flat, ...tabSpecific };
8972
+ }
8926
8973
  var MARGIN_CONTENT = {
8927
8974
  title: "How to calculate margin requirements",
8928
8975
  description: "Use this formula to calculate how much margin is required based on your lot size, leverage ratio, and the current market price.",
@@ -9067,11 +9114,15 @@ var SWAP_PERCENTAGE_CONTENT = {
9067
9114
  ],
9068
9115
  resultText: "This means the swap charge is USD -0.26 to keep the position open overnight."
9069
9116
  };
9070
- var SWAP_TABS = [
9071
- { id: "points", label: "Swap calculation (In points)" },
9072
- { id: "percentage", label: "Swap calculation (In percentage)" }
9073
- ];
9074
9117
  var swapModeForVariant = (variant) => variant === "swap-percentage" ? "percentage" : "points";
9118
+ function swapTabsForLabels(labels) {
9119
+ const points = labels?.swapTabPoints ?? DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS.swapTabPoints;
9120
+ const percentage = labels?.swapTabPercentage ?? DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS.swapTabPercentage;
9121
+ return [
9122
+ { id: "points", label: points },
9123
+ { id: "percentage", label: percentage }
9124
+ ];
9125
+ }
9075
9126
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react35.useLayoutEffect : import_react35.useEffect;
9076
9127
  var FormulaBlockView = ({ block }) => {
9077
9128
  if (block.type === "footnote") {
@@ -9174,6 +9225,7 @@ var TradingCalculatorHowTo = ({
9174
9225
  variant = "margin",
9175
9226
  title,
9176
9227
  description,
9228
+ labels,
9177
9229
  className,
9178
9230
  ...props
9179
9231
  }) => {
@@ -9182,9 +9234,14 @@ var TradingCalculatorHowTo = ({
9182
9234
  (0, import_react35.useEffect)(() => {
9183
9235
  setSwapTab(swapModeForVariant(variant));
9184
9236
  }, [variant]);
9185
- const content = variant === "pip" ? PIP_CONTENT : isSwap ? swapTab === "percentage" ? SWAP_PERCENTAGE_CONTENT : SWAP_POINTS_CONTENT : MARGIN_CONTENT;
9237
+ const baseContent = variant === "pip" ? PIP_CONTENT : isSwap ? swapTab === "percentage" ? SWAP_PERCENTAGE_CONTENT : SWAP_POINTS_CONTENT : MARGIN_CONTENT;
9238
+ const content = applyContentLabels(
9239
+ baseContent,
9240
+ bodyLabelsForMode(labels, isSwap, swapTab)
9241
+ );
9186
9242
  const heading = title ?? content.title;
9187
9243
  const desc = description ?? content.description;
9244
+ const swapTabs = swapTabsForLabels(labels);
9188
9245
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("section", { className: ["tchow-section", className ?? ""].filter(Boolean).join(" "), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "tchow-container", children: [
9189
9246
  /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "tchow-intro", children: [
9190
9247
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("h2", { className: "tchow-title", children: heading }),
@@ -9194,7 +9251,7 @@ var TradingCalculatorHowTo = ({
9194
9251
  Tabs,
9195
9252
  {
9196
9253
  className: "tchow-tabs",
9197
- items: SWAP_TABS,
9254
+ items: swapTabs,
9198
9255
  activeId: swapTab,
9199
9256
  onChange: (id) => setSwapTab(id)
9200
9257
  }
@@ -12473,6 +12530,7 @@ var AffiliatesSlider = ({
12473
12530
  DEFAULT_EXCHANGE_RATE_WS_URL,
12474
12531
  DEFAULT_SYMBOLS_ENDPOINT,
12475
12532
  DEFAULT_TRADE_HREF,
12533
+ DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS,
12476
12534
  DEFAULT_TRADING_CALCULATOR_LABELS,
12477
12535
  DayNightTransition,
12478
12536
  DocumentChips,