@ledgerhq/lumen-ui-rnative 0.1.64 → 0.1.66
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/dist/module/index.js +1 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/Components/core/AddressInput/AddressInput.js +1 -1
- package/dist/module/lib/Components/core/AddressInput/AddressInput.js.map +1 -1
- package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.js +1 -1
- package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.js.map +1 -1
- package/dist/module/lib/Components/core/AmountInput/AmountInput.js +1 -1
- package/dist/module/lib/Components/core/AmountInput/AmountInput.js.map +1 -1
- package/dist/module/lib/Components/core/Avatar/Avatar.js +1 -1
- package/dist/module/lib/Components/core/Avatar/Avatar.js.map +1 -1
- package/dist/module/lib/Components/core/Banner/Banner.js +1 -1
- package/dist/module/lib/Components/core/Banner/Banner.js.map +1 -1
- package/dist/module/lib/Components/core/BottomSheet/BottomSheetHeader.js +1 -1
- package/dist/module/lib/Components/core/BottomSheet/BottomSheetHeader.js.map +1 -1
- package/dist/module/lib/Components/core/CardButton/CardButton.js +2 -0
- package/dist/module/lib/Components/core/CardButton/CardButton.js.map +1 -1
- package/dist/module/lib/Components/core/CardButton/CardButton.mdx +4 -0
- package/dist/module/lib/Components/core/CardButton/CardButton.stories.js +1 -0
- package/dist/module/lib/Components/core/CardButton/CardButton.stories.js.map +1 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.js +1 -1
- package/dist/module/lib/Components/core/ContentBanner/ContentBanner.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.figma.js +2 -1
- package/dist/module/lib/Components/core/Link/Link.figma.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.js +5 -3
- package/dist/module/lib/Components/core/Link/Link.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.mdx +3 -2
- package/dist/module/lib/Components/core/Link/Link.stories.js +4 -1
- package/dist/module/lib/Components/core/Link/Link.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Link/Link.test.js +2 -2
- package/dist/module/lib/Components/core/Link/Link.test.js.map +1 -1
- package/dist/module/lib/Components/core/MediaBanner/MediaBanner.js +1 -1
- package/dist/module/lib/Components/core/MediaBanner/MediaBanner.js.map +1 -1
- package/dist/module/lib/Components/core/MediaCard/MediaCard.js +1 -1
- package/dist/module/lib/Components/core/MediaCard/MediaCard.js.map +1 -1
- package/dist/module/lib/Components/core/NavBar/NavBar.js +1 -1
- package/dist/module/lib/Components/core/NavBar/NavBar.js.map +1 -1
- package/dist/module/lib/Components/core/Spinner/Spinner.js +1 -1
- package/dist/module/lib/Components/core/Spinner/Spinner.js.map +1 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.js +77 -31
- package/dist/module/lib/Components/core/Stepper/Stepper.js.map +1 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.mdx +37 -16
- package/dist/module/lib/Components/core/Stepper/Stepper.stories.js +102 -2
- package/dist/module/lib/Components/core/Stepper/Stepper.stories.js.map +1 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.test.js +32 -1
- package/dist/module/lib/Components/core/Stepper/Stepper.test.js.map +1 -1
- package/dist/module/lib/Components/core/Subheader/Subheader.js +5 -1
- package/dist/module/lib/Components/core/Subheader/Subheader.js.map +1 -1
- package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.js +2 -2
- package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js +9 -0
- package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js.map +1 -1
- package/dist/module/lib/Components/core/Timeline/Timeline.figma.js +83 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.figma.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.js +464 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.mdx +49 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.stories.js +289 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.stories.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.test.js +234 -0
- package/dist/module/lib/Components/core/Timeline/Timeline.test.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/index.js +5 -0
- package/dist/module/lib/Components/core/Timeline/index.js.map +1 -0
- package/dist/module/lib/Components/core/Timeline/types.js +4 -0
- package/dist/module/lib/Components/core/Timeline/types.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toast.figma.js +39 -0
- package/dist/module/lib/Components/core/Toast/Toast.figma.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toast.js +138 -0
- package/dist/module/lib/Components/core/Toast/Toast.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toast.mdx +203 -0
- package/dist/module/lib/Components/core/Toast/Toast.stories.js +238 -0
- package/dist/module/lib/Components/core/Toast/Toast.stories.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toast.test.js +203 -0
- package/dist/module/lib/Components/core/Toast/Toast.test.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toaster.js +147 -0
- package/dist/module/lib/Components/core/Toast/Toaster.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/Toaster.test.js +732 -0
- package/dist/module/lib/Components/core/Toast/Toaster.test.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastAccessibility.js +70 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastAccessibility.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastCollapse.js +33 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastCollapse.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastGesture.js +224 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastGesture.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastMotion.js +82 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastMotion.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastViewportStyles.js +21 -0
- package/dist/module/lib/Components/core/Toast/hooks/useToastViewportStyles.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/index.js +7 -0
- package/dist/module/lib/Components/core/Toast/index.js.map +1 -0
- package/dist/module/lib/Components/core/Toast/types.js +4 -0
- package/dist/module/lib/Components/core/Toast/types.js.map +1 -0
- package/dist/module/lib/Components/core/Trend/Trend.js +1 -1
- package/dist/module/lib/Components/core/Trend/Trend.js.map +1 -1
- package/dist/module/lib/Components/core/index.js +2 -0
- package/dist/module/lib/Components/core/index.js.map +1 -1
- package/dist/module/lib/Components/internal/BaseInput/BaseInput.js +1 -1
- package/dist/module/lib/Components/internal/BaseInput/BaseInput.js.map +1 -1
- package/dist/module/lib/Components/visualization/CartesianChart/CartesianChart.js +6 -2
- package/dist/module/lib/Components/visualization/CartesianChart/CartesianChart.js.map +1 -1
- package/dist/module/lib/Components/visualization/DonutChart/DonutChart.js +8 -4
- package/dist/module/lib/Components/visualization/DonutChart/DonutChart.js.map +1 -1
- package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js +1 -1
- package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js.map +1 -1
- package/dist/module/lib/Components/visualization/DonutChart/DonutRing.js +12 -3
- package/dist/module/lib/Components/visualization/DonutChart/DonutRing.js.map +1 -1
- package/dist/module/lib/Components/visualization/Legend/Legend.js +1 -1
- package/dist/module/lib/Components/visualization/Legend/Legend.js.map +1 -1
- package/dist/module/lib/Components/visualization/Legend/Legend.test.js +12 -8
- package/dist/module/lib/Components/visualization/Legend/Legend.test.js.map +1 -1
- package/dist/module/lib/Components/visualization/LineChart/LineChart.js +8 -2
- package/dist/module/lib/Components/visualization/LineChart/LineChart.js.map +1 -1
- package/dist/module/lib/Components/visualization/LineChart/utils.js +3 -2
- package/dist/module/lib/Components/visualization/LineChart/utils.js.map +1 -1
- package/dist/module/lib/Components/visualization/LineChart/utils.test.js +8 -4
- package/dist/module/lib/Components/visualization/LineChart/utils.test.js.map +1 -1
- package/dist/module/lib/Components/visualization/config.js +1 -4
- package/dist/module/lib/Components/visualization/config.js.map +1 -1
- package/dist/module/translations/index.js +5 -0
- package/dist/module/translations/index.js.map +1 -0
- package/dist/module/{i18n → translations}/languages.js +0 -6
- package/dist/module/translations/languages.js.map +1 -0
- package/dist/module/{i18n → translations}/locales/de.json +0 -3
- package/{src/i18n → dist/module/translations}/locales/en.json +9 -3
- package/{src/i18n → dist/module/translations}/locales/es.json +0 -3
- package/dist/module/{i18n → translations}/locales/fr.json +0 -3
- package/{src/i18n → dist/module/translations}/locales/ja.json +0 -3
- package/dist/module/{i18n → translations}/locales/ko.json +0 -3
- package/dist/module/{i18n → translations}/locales/pt.json +0 -3
- package/dist/module/{i18n → translations}/locales/ru.json +0 -3
- package/dist/module/{i18n → translations}/locales/th.json +0 -3
- package/dist/module/{i18n → translations}/locales/tr.json +0 -3
- package/{src/i18n → dist/module/translations}/locales/zh.json +0 -3
- package/dist/module/translations/translations.js +36 -0
- package/dist/module/translations/translations.js.map +1 -0
- package/dist/module/translations/translations.test.js +34 -0
- package/dist/module/translations/translations.test.js.map +1 -0
- package/dist/typescript/src/index.d.ts +1 -1
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/CardButton/CardButton.d.ts +2 -0
- package/dist/typescript/src/lib/Components/core/CardButton/CardButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Link/Link.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/Link/Link.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Link/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/Link/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Stepper/Stepper.d.ts +4 -3
- package/dist/typescript/src/lib/Components/core/Stepper/Stepper.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Stepper/types.d.ts +12 -2
- package/dist/typescript/src/lib/Components/core/Stepper/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Subheader/Subheader.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/ThemeProvider/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/core/ThemeProvider/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts +56 -0
- package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Timeline/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/core/Timeline/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Timeline/types.d.ts +109 -0
- package/dist/typescript/src/lib/Components/core/Timeline/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/Toast.d.ts +24 -0
- package/dist/typescript/src/lib/Components/core/Toast/Toast.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/Toaster.d.ts +35 -0
- package/dist/typescript/src/lib/Components/core/Toast/Toaster.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastAccessibility.d.ts +17 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastAccessibility.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastCollapse.d.ts +19 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastCollapse.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastGesture.d.ts +14 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastGesture.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastMotion.d.ts +15 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastMotion.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastViewportStyles.d.ts +21 -0
- package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastViewportStyles.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/index.d.ts +5 -0
- package/dist/typescript/src/lib/Components/core/Toast/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/Toast/types.d.ts +75 -0
- package/dist/typescript/src/lib/Components/core/Toast/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/core/index.d.ts +2 -0
- package/dist/typescript/src/lib/Components/core/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/visualization/DonutChart/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/visualization/Legend/Legend.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/visualization/Legend/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/visualization/LineChart/LineChart.d.ts +1 -1
- package/dist/typescript/src/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/visualization/LineChart/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/visualization/LineChart/utils.d.ts +2 -1
- package/dist/typescript/src/lib/Components/visualization/LineChart/utils.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/visualization/config.d.ts +0 -3
- package/dist/typescript/src/lib/Components/visualization/config.d.ts.map +1 -1
- package/dist/typescript/src/translations/index.d.ts +3 -0
- package/dist/typescript/src/translations/index.d.ts.map +1 -0
- package/dist/typescript/src/{i18n → translations}/languages.d.ts +0 -5
- package/dist/typescript/src/translations/languages.d.ts.map +1 -0
- package/dist/typescript/src/translations/translations.d.ts +421 -0
- package/dist/typescript/src/translations/translations.d.ts.map +1 -0
- package/package.json +4 -6
- package/src/index.ts +1 -1
- package/src/lib/Components/core/AddressInput/AddressInput.tsx +1 -1
- package/src/lib/Components/core/AmountDisplay/AmountDisplay.tsx +1 -1
- package/src/lib/Components/core/AmountInput/AmountInput.tsx +1 -1
- package/src/lib/Components/core/Avatar/Avatar.tsx +1 -1
- package/src/lib/Components/core/Banner/Banner.tsx +1 -1
- package/src/lib/Components/core/BottomSheet/BottomSheetHeader.tsx +1 -1
- package/src/lib/Components/core/CardButton/CardButton.mdx +4 -0
- package/src/lib/Components/core/CardButton/CardButton.stories.tsx +1 -0
- package/src/lib/Components/core/CardButton/CardButton.tsx +2 -0
- package/src/lib/Components/core/ContentBanner/ContentBanner.tsx +1 -1
- package/src/lib/Components/core/Link/Link.figma.tsx +1 -0
- package/src/lib/Components/core/Link/Link.mdx +3 -2
- package/src/lib/Components/core/Link/Link.stories.tsx +3 -2
- package/src/lib/Components/core/Link/Link.test.tsx +2 -0
- package/src/lib/Components/core/Link/Link.tsx +3 -1
- package/src/lib/Components/core/Link/types.ts +1 -1
- package/src/lib/Components/core/MediaBanner/MediaBanner.tsx +1 -1
- package/src/lib/Components/core/MediaCard/MediaCard.tsx +1 -1
- package/src/lib/Components/core/NavBar/NavBar.tsx +1 -1
- package/src/lib/Components/core/Spinner/Spinner.tsx +1 -1
- package/src/lib/Components/core/Stepper/Stepper.mdx +37 -16
- package/src/lib/Components/core/Stepper/Stepper.stories.tsx +50 -2
- package/src/lib/Components/core/Stepper/Stepper.test.tsx +29 -1
- package/src/lib/Components/core/Stepper/Stepper.tsx +74 -33
- package/src/lib/Components/core/Stepper/types.ts +12 -2
- package/src/lib/Components/core/Subheader/Subheader.tsx +3 -1
- package/src/lib/Components/core/ThemeProvider/ThemeProvider.test.tsx +11 -0
- package/src/lib/Components/core/ThemeProvider/ThemeProvider.tsx +3 -3
- package/src/lib/Components/core/ThemeProvider/types.ts +1 -1
- package/src/lib/Components/core/Timeline/Timeline.figma.tsx +79 -0
- package/src/lib/Components/core/Timeline/Timeline.mdx +49 -0
- package/src/lib/Components/core/Timeline/Timeline.stories.tsx +250 -0
- package/src/lib/Components/core/Timeline/Timeline.test.tsx +275 -0
- package/src/lib/Components/core/Timeline/Timeline.tsx +576 -0
- package/src/lib/Components/core/Timeline/index.ts +2 -0
- package/src/lib/Components/core/Timeline/types.ts +124 -0
- package/src/lib/Components/core/Toast/Toast.figma.tsx +36 -0
- package/src/lib/Components/core/Toast/Toast.mdx +203 -0
- package/src/lib/Components/core/Toast/Toast.stories.tsx +260 -0
- package/src/lib/Components/core/Toast/Toast.test.tsx +181 -0
- package/src/lib/Components/core/Toast/Toast.tsx +163 -0
- package/src/lib/Components/core/Toast/Toaster.test.tsx +687 -0
- package/src/lib/Components/core/Toast/Toaster.tsx +157 -0
- package/src/lib/Components/core/Toast/hooks/useToastAccessibility.ts +82 -0
- package/src/lib/Components/core/Toast/hooks/useToastCollapse.ts +38 -0
- package/src/lib/Components/core/Toast/hooks/useToastGesture.ts +83 -0
- package/src/lib/Components/core/Toast/hooks/useToastMotion.ts +71 -0
- package/src/lib/Components/core/Toast/hooks/useToastViewportStyles.ts +45 -0
- package/src/lib/Components/core/Toast/index.ts +4 -0
- package/src/lib/Components/core/Toast/types.ts +94 -0
- package/src/lib/Components/core/Trend/Trend.tsx +1 -1
- package/src/lib/Components/core/index.ts +2 -0
- package/src/lib/Components/internal/BaseInput/BaseInput.tsx +1 -1
- package/src/lib/Components/visualization/CartesianChart/CartesianChart.tsx +4 -2
- package/src/lib/Components/visualization/CartesianChart/types.ts +1 -1
- package/src/lib/Components/visualization/DonutChart/DonutChart.test.tsx +1 -3
- package/src/lib/Components/visualization/DonutChart/DonutChart.tsx +7 -3
- package/src/lib/Components/visualization/DonutChart/DonutRing.tsx +11 -1
- package/src/lib/Components/visualization/DonutChart/types.ts +1 -1
- package/src/lib/Components/visualization/Legend/Legend.test.tsx +9 -8
- package/src/lib/Components/visualization/Legend/Legend.tsx +1 -1
- package/src/lib/Components/visualization/Legend/types.ts +2 -2
- package/src/lib/Components/visualization/LineChart/LineChart.tsx +10 -2
- package/src/lib/Components/visualization/LineChart/types.ts +1 -1
- package/src/lib/Components/visualization/LineChart/utils.test.ts +4 -0
- package/src/lib/Components/visualization/LineChart/utils.ts +6 -2
- package/src/lib/Components/visualization/config.ts +0 -3
- package/src/translations/index.ts +2 -0
- package/src/{i18n → translations}/languages.ts +0 -6
- package/src/{i18n → translations}/locales/de.json +0 -3
- package/{dist/module/i18n → src/translations}/locales/en.json +9 -3
- package/{dist/module/i18n → src/translations}/locales/es.json +0 -3
- package/src/{i18n → translations}/locales/fr.json +0 -3
- package/{dist/module/i18n → src/translations}/locales/ja.json +0 -3
- package/src/{i18n → translations}/locales/ko.json +0 -3
- package/src/{i18n → translations}/locales/pt.json +0 -3
- package/src/{i18n → translations}/locales/ru.json +0 -3
- package/src/{i18n → translations}/locales/th.json +0 -3
- package/src/{i18n → translations}/locales/tr.json +0 -3
- package/{dist/module/i18n → src/translations}/locales/zh.json +0 -3
- package/src/translations/translations.test.ts +56 -0
- package/src/translations/translations.ts +21 -0
- package/dist/module/i18n/I18nProvider.js +0 -20
- package/dist/module/i18n/I18nProvider.js.map +0 -1
- package/dist/module/i18n/i18n.js +0 -82
- package/dist/module/i18n/i18n.js.map +0 -1
- package/dist/module/i18n/index.js +0 -6
- package/dist/module/i18n/index.js.map +0 -1
- package/dist/module/i18n/languages.js.map +0 -1
- package/dist/module/i18n/useCommonTranslation.js +0 -8
- package/dist/module/i18n/useCommonTranslation.js.map +0 -1
- package/dist/typescript/src/i18n/I18nProvider.d.ts +0 -8
- package/dist/typescript/src/i18n/I18nProvider.d.ts.map +0 -1
- package/dist/typescript/src/i18n/i18n.d.ts +0 -13
- package/dist/typescript/src/i18n/i18n.d.ts.map +0 -1
- package/dist/typescript/src/i18n/index.d.ts +0 -4
- package/dist/typescript/src/i18n/index.d.ts.map +0 -1
- package/dist/typescript/src/i18n/languages.d.ts.map +0 -1
- package/dist/typescript/src/i18n/useCommonTranslation.d.ts +0 -2
- package/dist/typescript/src/i18n/useCommonTranslation.d.ts.map +0 -1
- package/src/i18n/I18nProvider.tsx +0 -20
- package/src/i18n/i18n.ts +0 -107
- package/src/i18n/index.ts +0 -3
- package/src/i18n/useCommonTranslation.ts +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { Image, StyleSheet, View } from 'react-native';
|
|
3
|
-
import { useCommonTranslation } from '../../../../i18n';
|
|
4
3
|
import { useStyleSheet, useTheme } from '../../../../styles';
|
|
4
|
+
import { useCommonTranslation } from '../../../../translations';
|
|
5
5
|
import { Box, LinearGradient, Pressable, Text } from '../../primitives';
|
|
6
6
|
import { Close } from '../../symbols';
|
|
7
7
|
import { InteractiveIcon } from '../InteractiveIcon';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { Image, StyleSheet, View } from 'react-native';
|
|
3
|
-
import { useCommonTranslation } from '../../../../i18n';
|
|
4
3
|
import { useStyleSheet } from '../../../../styles';
|
|
4
|
+
import { useCommonTranslation } from '../../../../translations';
|
|
5
5
|
import { LinearGradient, Pressable, Text } from '../../primitives';
|
|
6
6
|
import { Close } from '../../symbols';
|
|
7
7
|
import { InteractiveIcon } from '../InteractiveIcon';
|
|
@@ -3,8 +3,8 @@ import { createSafeContext } from '@ledgerhq/lumen-utils-shared';
|
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
import { Children, isValidElement } from 'react';
|
|
5
5
|
import { StyleSheet } from 'react-native';
|
|
6
|
-
import { useCommonTranslation } from '../../../../i18n';
|
|
7
6
|
import { useStyleSheet } from '../../../../styles';
|
|
7
|
+
import { useCommonTranslation } from '../../../../translations';
|
|
8
8
|
import { Box, Text } from '../../primitives';
|
|
9
9
|
import { ArrowLeft } from '../../symbols';
|
|
10
10
|
import { IconButton } from '../IconButton';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
import Svg, { Path } from 'react-native-svg';
|
|
3
|
-
import { useCommonTranslation } from '../../../../i18n';
|
|
4
3
|
import type { LumenTextStyle } from '../../../../styles';
|
|
5
4
|
import { useResolveTextStyle, useTheme } from '../../../../styles';
|
|
5
|
+
import { useCommonTranslation } from '../../../../translations';
|
|
6
6
|
import { Spin } from '../../animations/Spin';
|
|
7
7
|
import { Box } from '../../primitives';
|
|
8
8
|
import type { SpinnerProps } from './types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
|
|
1
|
+
import { Meta, Canvas, Controls, Source } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import { CustomTabs, Tab } from '../../../../../.storybook/components';
|
|
3
3
|
import * as StepperStories from './Stepper.stories';
|
|
4
4
|
import { Box } from '../../primitives/Box';
|
|
@@ -25,11 +25,12 @@ The Stepper component provides visual feedback for multi-step processes and work
|
|
|
25
25
|
## 🎯 Anatomy
|
|
26
26
|
|
|
27
27
|
The Stepper consists of:
|
|
28
|
-
|
|
29
|
-
- **
|
|
28
|
+
|
|
29
|
+
- **Track**: One muted segment per step, separated by gaps
|
|
30
|
+
- **Progress**: Completed steps filled with color, sweeping clockwise from the top
|
|
30
31
|
- **Label**: Centered text showing "current/total" steps (e.g., "2/4")
|
|
31
32
|
|
|
32
|
-
The
|
|
33
|
+
The gap between the first and last segments is centered at the top (12 o'clock). At 0 progress, no segment is filled.
|
|
33
34
|
|
|
34
35
|
---
|
|
35
36
|
|
|
@@ -37,22 +38,35 @@ The progress arc starts at the top (12 o'clock position) and fills clockwise. Wh
|
|
|
37
38
|
|
|
38
39
|
**Default label**: The default label is "currentStep/totalSteps" (e.g., "2/4").
|
|
39
40
|
|
|
40
|
-
|
|
41
41
|
### Step Ranges
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
- **`totalSteps`** must be between **2** and **8**
|
|
43
44
|
- **`currentStep`** must be between **0** and **`totalSteps`**
|
|
44
|
-
- Use `currentStep={0}` to show the initial state (minimal dot before starting)
|
|
45
45
|
|
|
46
|
-
> ⚠️ Using more than **
|
|
46
|
+
> ⚠️ Using more than **8** total steps or exceeding the valid range may cause the UI to break and text to be truncated inside the circular indicator.
|
|
47
47
|
|
|
48
48
|
> ⚠️ Values outside valid ranges are automatically clamped: **`currentStep`** is kept between **0** and **`totalSteps`**.
|
|
49
49
|
|
|
50
|
-
## 🎨
|
|
50
|
+
## 🎨 Appearance
|
|
51
51
|
|
|
52
|
-
The Stepper supports
|
|
52
|
+
The Stepper supports two appearances for the progress: `accent` (default) and `success`.
|
|
53
53
|
|
|
54
|
-
<Canvas of={StepperStories.
|
|
54
|
+
<Canvas of={StepperStories.AppearanceShowcase} />
|
|
55
|
+
|
|
56
|
+
## 📐 Sizes
|
|
57
|
+
|
|
58
|
+
The Stepper comes in two sizes:
|
|
59
|
+
|
|
60
|
+
- **`md`** (default): 48×48px
|
|
61
|
+
- **`lg`**: 72×72px
|
|
62
|
+
|
|
63
|
+
<Canvas of={StepperStories.SizeShowcase} />
|
|
64
|
+
|
|
65
|
+
## Disabled State
|
|
55
66
|
|
|
67
|
+
The Stepper supports a disabled state that changes the progress to a muted appearance:
|
|
68
|
+
|
|
69
|
+
<Canvas of={StepperStories.DisabledShowcase} />
|
|
56
70
|
|
|
57
71
|
## Custom Labels
|
|
58
72
|
|
|
@@ -60,7 +74,7 @@ By default, the stepper displays "currentStep/totalSteps" (e.g., "2/4"). You can
|
|
|
60
74
|
|
|
61
75
|
<Canvas of={StepperStories.WithCustomLabel} />
|
|
62
76
|
|
|
63
|
-
> ⚠️ **Note**: The label and step counts are automatically truncated if they overflow the circular indicator. Keep custom labels short to ensure readability within the
|
|
77
|
+
> ⚠️ **Note**: The label and step counts are automatically truncated if they overflow the circular indicator. Keep custom labels short to ensure readability within the circle.
|
|
64
78
|
|
|
65
79
|
---
|
|
66
80
|
|
|
@@ -102,6 +116,14 @@ function OnboardingFlow() {
|
|
|
102
116
|
}
|
|
103
117
|
```
|
|
104
118
|
|
|
119
|
+
### Appearance
|
|
120
|
+
|
|
121
|
+
<Source of={StepperStories.AppearanceShowcase} />
|
|
122
|
+
|
|
123
|
+
### Sizes
|
|
124
|
+
|
|
125
|
+
<Source of={StepperStories.SizeShowcase} />
|
|
126
|
+
|
|
105
127
|
### With Disabled State
|
|
106
128
|
|
|
107
129
|
Control the visual state based on step completion:
|
|
@@ -130,10 +152,10 @@ import { Stepper } from '@ledgerhq/lumen-ui-rnative';
|
|
|
130
152
|
function LocalizedStepper() {
|
|
131
153
|
const currentStep = 3;
|
|
132
154
|
const totalSteps = 5;
|
|
133
|
-
|
|
155
|
+
|
|
134
156
|
return (
|
|
135
|
-
<Stepper
|
|
136
|
-
currentStep={currentStep}
|
|
157
|
+
<Stepper
|
|
158
|
+
currentStep={currentStep}
|
|
137
159
|
totalSteps={totalSteps}
|
|
138
160
|
label={`Étape ${currentStep} sur ${totalSteps}`}
|
|
139
161
|
/>
|
|
@@ -141,6 +163,5 @@ function LocalizedStepper() {
|
|
|
141
163
|
}
|
|
142
164
|
```
|
|
143
165
|
|
|
144
|
-
|
|
145
166
|
</Tab>
|
|
146
167
|
</CustomTabs>
|
|
@@ -13,6 +13,8 @@ const meta = {
|
|
|
13
13
|
argTypes: {
|
|
14
14
|
currentStep: { control: 'number' },
|
|
15
15
|
totalSteps: { control: 'number' },
|
|
16
|
+
appearance: { control: 'select', options: ['accent', 'success'] },
|
|
17
|
+
size: { control: 'select', options: ['md', 'lg'] },
|
|
16
18
|
disabled: { control: 'boolean' },
|
|
17
19
|
},
|
|
18
20
|
} satisfies Meta<typeof Stepper>;
|
|
@@ -28,6 +30,52 @@ export const Base: Story = {
|
|
|
28
30
|
render: (args) => <Stepper {...args} />,
|
|
29
31
|
};
|
|
30
32
|
|
|
33
|
+
export const AppearanceShowcase: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
currentStep: 2,
|
|
36
|
+
totalSteps: 4,
|
|
37
|
+
},
|
|
38
|
+
render: () => (
|
|
39
|
+
<Box lx={{ flexDirection: 'row', gap: 's32', alignItems: 'center' }}>
|
|
40
|
+
<Box lx={{ alignItems: 'center', gap: 's8' }}>
|
|
41
|
+
<Text typography='body3' lx={{ color: 'muted' }}>
|
|
42
|
+
Accent
|
|
43
|
+
</Text>
|
|
44
|
+
<Stepper currentStep={2} totalSteps={4} appearance='accent' />
|
|
45
|
+
</Box>
|
|
46
|
+
<Box lx={{ alignItems: 'center', gap: 's8' }}>
|
|
47
|
+
<Text typography='body3' lx={{ color: 'muted' }}>
|
|
48
|
+
Success
|
|
49
|
+
</Text>
|
|
50
|
+
<Stepper currentStep={4} totalSteps={4} appearance='success' />
|
|
51
|
+
</Box>
|
|
52
|
+
</Box>
|
|
53
|
+
),
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const SizeShowcase: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
currentStep: 2,
|
|
59
|
+
totalSteps: 4,
|
|
60
|
+
},
|
|
61
|
+
render: () => (
|
|
62
|
+
<Box lx={{ flexDirection: 'row', gap: 's32', alignItems: 'center' }}>
|
|
63
|
+
<Box lx={{ alignItems: 'center', gap: 's8' }}>
|
|
64
|
+
<Text typography='body3' lx={{ color: 'muted' }}>
|
|
65
|
+
Medium (md)
|
|
66
|
+
</Text>
|
|
67
|
+
<Stepper currentStep={2} totalSteps={4} size='md' />
|
|
68
|
+
</Box>
|
|
69
|
+
<Box lx={{ alignItems: 'center', gap: 's8' }}>
|
|
70
|
+
<Text typography='body3' lx={{ color: 'muted' }}>
|
|
71
|
+
Large (lg)
|
|
72
|
+
</Text>
|
|
73
|
+
<Stepper currentStep={2} totalSteps={4} size='lg' />
|
|
74
|
+
</Box>
|
|
75
|
+
</Box>
|
|
76
|
+
),
|
|
77
|
+
};
|
|
78
|
+
|
|
31
79
|
export const DisabledShowcase: Story = {
|
|
32
80
|
args: {
|
|
33
81
|
currentStep: 2,
|
|
@@ -49,9 +97,9 @@ export const DisabledShowcase: Story = {
|
|
|
49
97
|
</Box>
|
|
50
98
|
<Box lx={{ alignItems: 'center', gap: 's8' }}>
|
|
51
99
|
<Text typography='body3' lx={{ color: 'muted' }}>
|
|
52
|
-
Unstarted (0/
|
|
100
|
+
Unstarted (0/8)
|
|
53
101
|
</Text>
|
|
54
|
-
<Stepper currentStep={0} totalSteps={
|
|
102
|
+
<Stepper currentStep={0} totalSteps={8} />
|
|
55
103
|
</Box>
|
|
56
104
|
</Box>
|
|
57
105
|
),
|
|
@@ -80,7 +80,7 @@ describe('Stepper Component', () => {
|
|
|
80
80
|
expect(stepper).toBeTruthy();
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
-
it('should handle currentStep <= 0
|
|
83
|
+
it('should handle currentStep <= 0', async () => {
|
|
84
84
|
const { findByLabelText } = render(
|
|
85
85
|
<TestWrapper>
|
|
86
86
|
<Stepper currentStep={0} totalSteps={4} />
|
|
@@ -110,6 +110,34 @@ describe('Stepper Component', () => {
|
|
|
110
110
|
expect(getByText('/4')).toBeTruthy();
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
+
it('should render md size by default', () => {
|
|
114
|
+
const { getByTestId } = render(
|
|
115
|
+
<TestWrapper>
|
|
116
|
+
<Stepper currentStep={2} totalSteps={4} testID='stepper' />
|
|
117
|
+
</TestWrapper>,
|
|
118
|
+
);
|
|
119
|
+
const style = getByTestId('stepper').props.style;
|
|
120
|
+
const flatStyle = Array.isArray(style)
|
|
121
|
+
? Object.assign({}, ...style)
|
|
122
|
+
: style;
|
|
123
|
+
expect(flatStyle.width).toBe(48);
|
|
124
|
+
expect(flatStyle.height).toBe(48);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it('should render lg size', () => {
|
|
128
|
+
const { getByTestId } = render(
|
|
129
|
+
<TestWrapper>
|
|
130
|
+
<Stepper currentStep={2} totalSteps={4} size='lg' testID='stepper' />
|
|
131
|
+
</TestWrapper>,
|
|
132
|
+
);
|
|
133
|
+
const style = getByTestId('stepper').props.style;
|
|
134
|
+
const flatStyle = Array.isArray(style)
|
|
135
|
+
? Object.assign({}, ...style)
|
|
136
|
+
: style;
|
|
137
|
+
expect(flatStyle.width).toBe(72);
|
|
138
|
+
expect(flatStyle.height).toBe(72);
|
|
139
|
+
});
|
|
140
|
+
|
|
113
141
|
it('should apply custom lx props', () => {
|
|
114
142
|
const { getByTestId } = render(
|
|
115
143
|
<TestWrapper>
|
|
@@ -2,23 +2,25 @@ import {
|
|
|
2
2
|
getStepperCalculations,
|
|
3
3
|
useDisabledContext,
|
|
4
4
|
} from '@ledgerhq/lumen-utils-shared';
|
|
5
|
-
import { useEffect } from 'react';
|
|
5
|
+
import { useEffect, useId } from 'react';
|
|
6
6
|
import Animated, {
|
|
7
7
|
cancelAnimation,
|
|
8
8
|
useAnimatedProps,
|
|
9
9
|
useSharedValue,
|
|
10
10
|
withTiming,
|
|
11
11
|
} from 'react-native-reanimated';
|
|
12
|
-
import Svg, { Circle } from 'react-native-svg';
|
|
13
|
-
import { useCommonTranslation } from '../../../../i18n';
|
|
12
|
+
import Svg, { Circle, Defs, Mask } from 'react-native-svg';
|
|
14
13
|
import { useTheme } from '../../../../styles';
|
|
14
|
+
import { useCommonTranslation } from '../../../../translations';
|
|
15
15
|
import { useTimingConfig } from '../../animations/useTimingConfig';
|
|
16
16
|
import { Box } from '../../primitives/Box';
|
|
17
17
|
import { Text } from '../../primitives/Text';
|
|
18
18
|
import type { StepperProps } from './types';
|
|
19
19
|
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const SIZES = {
|
|
21
|
+
md: { px: 48, strokeWidth: 4, token: 's48', typography: 'body2' },
|
|
22
|
+
lg: { px: 72, strokeWidth: 6, token: 's72', typography: 'heading4' },
|
|
23
|
+
} as const;
|
|
22
24
|
|
|
23
25
|
const AnimatedCircle = Animated.createAnimatedComponent(Circle);
|
|
24
26
|
|
|
@@ -50,16 +52,19 @@ const useAnimatedProgress = ({
|
|
|
50
52
|
|
|
51
53
|
/**
|
|
52
54
|
* A circular stepper component showing progress as current step out of total steps.
|
|
53
|
-
* Renders a track
|
|
55
|
+
* Renders a segmented track with progress and a center label.
|
|
54
56
|
*
|
|
55
57
|
* @see [Figma – Stepper](https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=11977-94&m=dev)
|
|
56
58
|
*
|
|
57
59
|
* @example
|
|
58
60
|
* <Stepper currentStep={1} totalSteps={4} />
|
|
59
|
-
* <Stepper currentStep={0} totalSteps={
|
|
61
|
+
* <Stepper currentStep={0} totalSteps={8} disabled /> // Empty progress, disabled style
|
|
62
|
+
* <Stepper currentStep={2} totalSteps={4} size="lg" />
|
|
60
63
|
*/
|
|
61
64
|
export const Stepper = ({
|
|
62
65
|
lx = {},
|
|
66
|
+
appearance = 'accent',
|
|
67
|
+
size = 'md',
|
|
63
68
|
currentStep,
|
|
64
69
|
totalSteps,
|
|
65
70
|
disabled: disabledProp = false,
|
|
@@ -71,25 +76,42 @@ export const Stepper = ({
|
|
|
71
76
|
consumerName: 'Stepper',
|
|
72
77
|
mergeWith: { disabled: disabledProp },
|
|
73
78
|
});
|
|
79
|
+
const maskId = useId();
|
|
74
80
|
const { t } = useCommonTranslation();
|
|
75
81
|
const { theme } = useTheme();
|
|
82
|
+
const {
|
|
83
|
+
px: diameter,
|
|
84
|
+
strokeWidth,
|
|
85
|
+
token: sizeToken,
|
|
86
|
+
typography,
|
|
87
|
+
} = SIZES[size];
|
|
76
88
|
|
|
77
89
|
const {
|
|
78
90
|
displayLabel,
|
|
79
91
|
r,
|
|
80
92
|
cx,
|
|
81
93
|
cy,
|
|
82
|
-
trackDashArray,
|
|
83
94
|
progressDashArray,
|
|
95
|
+
progressMaskDashArray,
|
|
84
96
|
progressDashOffset,
|
|
97
|
+
dashPatternOffset,
|
|
85
98
|
} = getStepperCalculations({
|
|
86
99
|
currentStep,
|
|
87
100
|
totalSteps,
|
|
88
|
-
size:
|
|
101
|
+
size: diameter,
|
|
89
102
|
label,
|
|
90
|
-
strokeWidth
|
|
103
|
+
strokeWidth,
|
|
91
104
|
});
|
|
92
105
|
|
|
106
|
+
const activeColor =
|
|
107
|
+
appearance === 'success'
|
|
108
|
+
? theme.colors.border.success
|
|
109
|
+
: theme.colors.border.active;
|
|
110
|
+
|
|
111
|
+
const progressColor = disabled
|
|
112
|
+
? theme.colors.border.mutedSubtleHover
|
|
113
|
+
: activeColor;
|
|
114
|
+
|
|
93
115
|
const animatedProgress = useAnimatedProgress({
|
|
94
116
|
progressDashOffset,
|
|
95
117
|
});
|
|
@@ -112,8 +134,8 @@ export const Stepper = ({
|
|
|
112
134
|
})
|
|
113
135
|
}
|
|
114
136
|
lx={{
|
|
115
|
-
width:
|
|
116
|
-
height:
|
|
137
|
+
width: sizeToken,
|
|
138
|
+
height: sizeToken,
|
|
117
139
|
flexShrink: 0,
|
|
118
140
|
alignItems: 'center',
|
|
119
141
|
justifyContent: 'center',
|
|
@@ -123,10 +145,10 @@ export const Stepper = ({
|
|
|
123
145
|
{...props}
|
|
124
146
|
>
|
|
125
147
|
<Svg
|
|
126
|
-
width={
|
|
127
|
-
height={
|
|
128
|
-
viewBox={`0 0 ${
|
|
129
|
-
style={{ transform: [{ rotate: '
|
|
148
|
+
width={diameter}
|
|
149
|
+
height={diameter}
|
|
150
|
+
viewBox={`0 0 ${diameter} ${diameter}`}
|
|
151
|
+
style={{ transform: [{ rotate: '-90deg' }] }}
|
|
130
152
|
>
|
|
131
153
|
<Circle
|
|
132
154
|
cx={cx}
|
|
@@ -135,24 +157,42 @@ export const Stepper = ({
|
|
|
135
157
|
fill='none'
|
|
136
158
|
stroke={theme.colors.border.mutedSubtle}
|
|
137
159
|
strokeLinecap='round'
|
|
138
|
-
strokeWidth={
|
|
139
|
-
strokeDasharray={
|
|
140
|
-
strokeDashoffset={
|
|
160
|
+
strokeWidth={strokeWidth}
|
|
161
|
+
strokeDasharray={progressDashArray}
|
|
162
|
+
strokeDashoffset={dashPatternOffset}
|
|
141
163
|
/>
|
|
142
|
-
<
|
|
164
|
+
<Defs>
|
|
165
|
+
<Mask
|
|
166
|
+
id={maskId}
|
|
167
|
+
maskUnits='userSpaceOnUse'
|
|
168
|
+
x={0}
|
|
169
|
+
y={0}
|
|
170
|
+
width={diameter}
|
|
171
|
+
height={diameter}
|
|
172
|
+
>
|
|
173
|
+
<AnimatedCircle
|
|
174
|
+
cx={cx}
|
|
175
|
+
cy={cy}
|
|
176
|
+
r={r}
|
|
177
|
+
fill='none'
|
|
178
|
+
stroke='white'
|
|
179
|
+
strokeWidth={strokeWidth}
|
|
180
|
+
strokeDasharray={progressMaskDashArray}
|
|
181
|
+
animatedProps={animatedProgress}
|
|
182
|
+
/>
|
|
183
|
+
</Mask>
|
|
184
|
+
</Defs>
|
|
185
|
+
<Circle
|
|
143
186
|
cx={cx}
|
|
144
187
|
cy={cy}
|
|
145
188
|
r={r}
|
|
146
189
|
fill='none'
|
|
147
|
-
stroke={
|
|
148
|
-
disabled
|
|
149
|
-
? theme.colors.border.mutedSubtleHover
|
|
150
|
-
: theme.colors.border.active
|
|
151
|
-
}
|
|
190
|
+
stroke={progressColor}
|
|
152
191
|
strokeLinecap='round'
|
|
153
|
-
strokeWidth={
|
|
192
|
+
strokeWidth={strokeWidth}
|
|
154
193
|
strokeDasharray={progressDashArray}
|
|
155
|
-
|
|
194
|
+
strokeDashoffset={dashPatternOffset}
|
|
195
|
+
mask={`url(#${maskId})`}
|
|
156
196
|
/>
|
|
157
197
|
</Svg>
|
|
158
198
|
<Box
|
|
@@ -169,24 +209,25 @@ export const Stepper = ({
|
|
|
169
209
|
>
|
|
170
210
|
{label ? (
|
|
171
211
|
<Text
|
|
172
|
-
typography=
|
|
173
|
-
lx={{ color: 'base' }}
|
|
212
|
+
typography={typography}
|
|
213
|
+
lx={{ color: disabled ? 'disabled' : 'base' }}
|
|
174
214
|
maxFontSizeMultiplier={1.4}
|
|
215
|
+
numberOfLines={1}
|
|
175
216
|
>
|
|
176
217
|
{label}
|
|
177
218
|
</Text>
|
|
178
219
|
) : (
|
|
179
220
|
<>
|
|
180
221
|
<Text
|
|
181
|
-
typography=
|
|
182
|
-
lx={{ color: 'base' }}
|
|
222
|
+
typography={typography}
|
|
223
|
+
lx={{ color: disabled ? 'disabled' : 'base' }}
|
|
183
224
|
maxFontSizeMultiplier={1.4}
|
|
184
225
|
>
|
|
185
226
|
{Math.min(Math.max(currentStep, 0), totalSteps)}
|
|
186
227
|
</Text>
|
|
187
228
|
<Text
|
|
188
|
-
typography=
|
|
189
|
-
lx={{ color: 'muted' }}
|
|
229
|
+
typography={typography}
|
|
230
|
+
lx={{ color: disabled ? 'disabled' : 'muted' }}
|
|
190
231
|
maxFontSizeMultiplier={1.4}
|
|
191
232
|
>
|
|
192
233
|
/{totalSteps}
|
|
@@ -2,7 +2,17 @@ import type { StyledViewProps } from '../../../../styles';
|
|
|
2
2
|
|
|
3
3
|
export type StepperProps = {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* The visual style of the stepper's segments.
|
|
6
|
+
* @default accent
|
|
7
|
+
*/
|
|
8
|
+
appearance?: 'accent' | 'success';
|
|
9
|
+
/**
|
|
10
|
+
* The overall dimensions of the stepper.
|
|
11
|
+
* @default md
|
|
12
|
+
*/
|
|
13
|
+
size?: 'md' | 'lg';
|
|
14
|
+
/**
|
|
15
|
+
* Current step number (1-based).
|
|
6
16
|
*/
|
|
7
17
|
currentStep: number;
|
|
8
18
|
/**
|
|
@@ -10,7 +20,7 @@ export type StepperProps = {
|
|
|
10
20
|
*/
|
|
11
21
|
totalSteps: number;
|
|
12
22
|
/**
|
|
13
|
-
* Whether the stepper is disabled. Changes the progress
|
|
23
|
+
* Whether the stepper is disabled. Changes the progress to a muted style.
|
|
14
24
|
* @default false
|
|
15
25
|
*/
|
|
16
26
|
disabled?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
import { useStyleSheet } from '../../../../styles';
|
|
3
|
+
import { useCommonTranslation } from '../../../../translations';
|
|
3
4
|
import { Box, Pressable, Text } from '../../primitives';
|
|
4
5
|
import { ChevronRight, Information } from '../../symbols';
|
|
5
6
|
import { InteractiveIcon } from '../InteractiveIcon';
|
|
@@ -130,12 +131,13 @@ export const SubheaderInfo = ({
|
|
|
130
131
|
style,
|
|
131
132
|
...props
|
|
132
133
|
}: SubheaderInfoProps) => {
|
|
134
|
+
const { t } = useCommonTranslation();
|
|
133
135
|
return (
|
|
134
136
|
<InteractiveIcon
|
|
135
137
|
iconType={iconType}
|
|
136
138
|
icon={Information}
|
|
137
139
|
size={16}
|
|
138
|
-
accessibilityLabel='
|
|
140
|
+
accessibilityLabel={t('components.subheader.moreInfoAriaLabel')}
|
|
139
141
|
style={style}
|
|
140
142
|
{...props}
|
|
141
143
|
/>
|
|
@@ -4,6 +4,7 @@ import { render, screen } from '@testing-library/react-native';
|
|
|
4
4
|
import { Box, Text } from '../../primitives';
|
|
5
5
|
import { ChevronBigLeft, Wallet } from '../../symbols';
|
|
6
6
|
import { Button } from '../Button';
|
|
7
|
+
import { Spinner } from '../Spinner';
|
|
7
8
|
import { Spot } from '../Spot';
|
|
8
9
|
import { Tile } from '../Tile/Tile';
|
|
9
10
|
import { ThemeProvider } from './ThemeProvider';
|
|
@@ -25,4 +26,14 @@ describe('ThemeProvider', () => {
|
|
|
25
26
|
expect(screen.getByTestId('child')).toBeTruthy();
|
|
26
27
|
expect(screen.getByText('Hello World')).toBeTruthy();
|
|
27
28
|
});
|
|
29
|
+
|
|
30
|
+
it('translates Lumen components in the given locale', () => {
|
|
31
|
+
render(
|
|
32
|
+
<ThemeProvider themes={ledgerLiveThemes} locale='fr'>
|
|
33
|
+
<Spinner />
|
|
34
|
+
</ThemeProvider>,
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
expect(screen.getByLabelText('Chargement')).toBeTruthy();
|
|
38
|
+
});
|
|
28
39
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSafeContext } from '@ledgerhq/lumen-utils-shared';
|
|
2
2
|
|
|
3
|
-
import { I18nProvider } from '../../../../i18n';
|
|
4
3
|
import { LumenStyleSheetProvider } from '../../../../styles';
|
|
4
|
+
import { TranslationsProvider } from '../../../../translations';
|
|
5
5
|
|
|
6
6
|
import { GlobalTooltipProvider } from '../Tooltip/GlobalTooltipContext';
|
|
7
7
|
import type { ThemeProviderProps } from './types';
|
|
@@ -17,9 +17,9 @@ const ThemeProvider = ({
|
|
|
17
17
|
return (
|
|
18
18
|
<ThemeContextProvider value={{}}>
|
|
19
19
|
<LumenStyleSheetProvider colorScheme={colorScheme} themes={themes}>
|
|
20
|
-
<
|
|
20
|
+
<TranslationsProvider locale={locale}>
|
|
21
21
|
<GlobalTooltipProvider>{children}</GlobalTooltipProvider>
|
|
22
|
-
</
|
|
22
|
+
</TranslationsProvider>
|
|
23
23
|
</LumenStyleSheetProvider>
|
|
24
24
|
</ThemeContextProvider>
|
|
25
25
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { ColorSchemeName } from 'react-native';
|
|
3
|
-
import type { SupportedLocale } from '../../../../i18n/languages';
|
|
4
3
|
import type { LumenThemes } from '../../../../styles';
|
|
4
|
+
import type { SupportedLocale } from '../../../../translations/languages';
|
|
5
5
|
|
|
6
6
|
export type ThemeProviderProps = PropsWithChildren & {
|
|
7
7
|
/**
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { Text } from '../../primitives';
|
|
3
|
+
import { Tag } from '../Tag';
|
|
4
|
+
import {
|
|
5
|
+
Timeline,
|
|
6
|
+
TimelineItem,
|
|
7
|
+
TimelineItemBody,
|
|
8
|
+
TimelineItemCaption,
|
|
9
|
+
TimelineItemDescription,
|
|
10
|
+
TimelineItemHeader,
|
|
11
|
+
TimelineItemLeading,
|
|
12
|
+
TimelineItemLeadingRow,
|
|
13
|
+
TimelineItemTitle,
|
|
14
|
+
TimelineItemTrailing,
|
|
15
|
+
} from './Timeline';
|
|
16
|
+
|
|
17
|
+
figma.connect(
|
|
18
|
+
Timeline,
|
|
19
|
+
'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=21769-4775',
|
|
20
|
+
{
|
|
21
|
+
imports: [
|
|
22
|
+
"import { Timeline, TimelineItem, TimelineItemHeader, TimelineItemLeading, TimelineItemCaption, TimelineItemLeadingRow, TimelineItemTitle, TimelineItemDescription, TimelineItemTrailing, TimelineItemBody } from '@ledgerhq/lumen-ui-rnative'",
|
|
23
|
+
"import { Tag, Text } from '@ledgerhq/lumen-ui-rnative'",
|
|
24
|
+
],
|
|
25
|
+
props: {
|
|
26
|
+
item: figma.enum('type', {
|
|
27
|
+
display: (
|
|
28
|
+
<TimelineItem>
|
|
29
|
+
<TimelineItemHeader>
|
|
30
|
+
<TimelineItemLeading>
|
|
31
|
+
<TimelineItemCaption>12 Mar 2024</TimelineItemCaption>
|
|
32
|
+
<TimelineItemLeadingRow>
|
|
33
|
+
<TimelineItemTitle>Payment confirmed</TimelineItemTitle>
|
|
34
|
+
<Tag appearance='success' label='Confirmed' size='sm' />
|
|
35
|
+
</TimelineItemLeadingRow>
|
|
36
|
+
<TimelineItemDescription>
|
|
37
|
+
Confirmed on device
|
|
38
|
+
</TimelineItemDescription>
|
|
39
|
+
</TimelineItemLeading>
|
|
40
|
+
<TimelineItemTrailing>
|
|
41
|
+
<Text typography='body2SemiBold'>0.42 ETH</Text>
|
|
42
|
+
</TimelineItemTrailing>
|
|
43
|
+
</TimelineItemHeader>
|
|
44
|
+
<TimelineItemBody>
|
|
45
|
+
<Text typography='body3' lx={{ color: 'muted' }}>
|
|
46
|
+
Viewed in Ledger Live.
|
|
47
|
+
</Text>
|
|
48
|
+
</TimelineItemBody>
|
|
49
|
+
</TimelineItem>
|
|
50
|
+
),
|
|
51
|
+
progress: (
|
|
52
|
+
<TimelineItem status='idle'>
|
|
53
|
+
<TimelineItemHeader>
|
|
54
|
+
<TimelineItemLeading>
|
|
55
|
+
<TimelineItemCaption>12 Mar 2024</TimelineItemCaption>
|
|
56
|
+
<TimelineItemLeadingRow>
|
|
57
|
+
<TimelineItemTitle>Payment confirmed</TimelineItemTitle>
|
|
58
|
+
<Tag appearance='success' label='Confirmed' size='sm' />
|
|
59
|
+
</TimelineItemLeadingRow>
|
|
60
|
+
<TimelineItemDescription>
|
|
61
|
+
Confirmed on device
|
|
62
|
+
</TimelineItemDescription>
|
|
63
|
+
</TimelineItemLeading>
|
|
64
|
+
<TimelineItemTrailing>
|
|
65
|
+
<Text typography='body2SemiBold'>0.42 ETH</Text>
|
|
66
|
+
</TimelineItemTrailing>
|
|
67
|
+
</TimelineItemHeader>
|
|
68
|
+
<TimelineItemBody>
|
|
69
|
+
<Text typography='body3' lx={{ color: 'muted' }}>
|
|
70
|
+
Viewed in Ledger Live.
|
|
71
|
+
</Text>
|
|
72
|
+
</TimelineItemBody>
|
|
73
|
+
</TimelineItem>
|
|
74
|
+
),
|
|
75
|
+
}),
|
|
76
|
+
},
|
|
77
|
+
example: (props) => <Timeline>{props.item}</Timeline>,
|
|
78
|
+
},
|
|
79
|
+
);
|