@ledgerhq/lumen-ui-rnative 0.0.44 → 0.0.45
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/.storybook/Decorator.tsx +78 -13
- package/.storybook/docs/getting-started/ThemeProvider.mdx +1 -1
- package/.storybook/docs/style-system/lx.mdx +144 -0
- package/.storybook/docs/style-system/useCreate.mdx +95 -0
- package/.storybook/docs/style-system/useTheme.mdx +52 -0
- package/.storybook/preview-head.html +2 -2
- package/.storybook/{preview.ts → preview.tsx} +6 -1
- package/dist/package.json +2 -3
- package/dist/src/lib/Components/AddressInput/AddressInput.js +1 -1
- package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts +7 -1
- package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/AddressInput/AddressInput.stories.js +98 -9
- package/dist/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/src/lib/Components/AmountInput/AmountInput.js +3 -3
- package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts +10 -1
- package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/AmountInput/AmountInput.stories.js +162 -9
- package/dist/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/src/lib/Components/BaseInput/BaseInput.js +2 -19
- package/dist/src/lib/Components/BottomSheet/BottomSheet.js +1 -1
- package/dist/src/lib/Components/BottomSheet/BottomSheet.stories.js +8 -8
- package/dist/src/lib/Components/Button/BaseButton.d.ts +3 -3
- package/dist/src/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/src/lib/Components/Button/BaseButton.js +99 -119
- package/dist/src/lib/Components/Button/Button.d.ts +4 -26
- package/dist/src/lib/Components/Button/Button.d.ts.map +1 -1
- package/dist/src/lib/Components/Button/Button.js +2 -2
- package/dist/src/lib/Components/Button/Button.stories.d.ts +1 -1
- package/dist/src/lib/Components/Button/Button.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/Button/Button.stories.js +25 -48
- package/dist/src/lib/Components/Button/index.d.ts +1 -1
- package/dist/src/lib/Components/Button/index.d.ts.map +1 -1
- package/dist/src/lib/Components/Button/index.js +1 -1
- package/dist/src/lib/Components/Button/{BaseButton.types.d.ts → types.d.ts} +15 -10
- package/dist/src/lib/Components/Button/types.d.ts.map +1 -0
- package/dist/src/lib/Components/CardButton/CardButton.d.ts +4 -3
- package/dist/src/lib/Components/CardButton/CardButton.d.ts.map +1 -1
- package/dist/src/lib/Components/CardButton/CardButton.js +65 -71
- package/dist/src/lib/Components/CardButton/CardButton.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/CardButton/CardButton.stories.js +28 -15
- package/dist/src/lib/Components/CardButton/index.d.ts +1 -1
- package/dist/src/lib/Components/CardButton/index.d.ts.map +1 -1
- package/dist/src/lib/Components/CardButton/index.js +1 -1
- package/dist/src/lib/Components/CardButton/{CardButton.types.d.ts → types.d.ts} +5 -4
- package/dist/src/lib/Components/CardButton/types.d.ts.map +1 -0
- package/dist/src/lib/Components/Icon/Icon.d.ts +6 -3
- package/dist/src/lib/Components/Icon/Icon.d.ts.map +1 -1
- package/dist/src/lib/Components/Icon/Icon.js +24 -25
- package/dist/src/lib/Components/Icon/Icon.stories.d.ts +2 -2
- package/dist/src/lib/Components/Icon/Icon.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/Icon/Icon.stories.js +73 -19
- package/dist/src/lib/Components/Icon/createIcon.d.ts +1 -1
- package/dist/src/lib/Components/Icon/createIcon.d.ts.map +1 -1
- package/dist/src/lib/Components/Icon/createIcon.js +1 -2
- package/dist/src/lib/Components/Icon/index.d.ts +1 -1
- package/dist/src/lib/Components/Icon/index.d.ts.map +1 -1
- package/dist/src/lib/Components/Icon/index.js +1 -1
- package/dist/src/lib/Components/Icon/{Icon.types.d.ts → types.d.ts} +7 -4
- package/dist/src/lib/Components/Icon/types.d.ts.map +1 -0
- package/dist/src/lib/Components/IconButton/IconButton.d.ts +2 -19
- package/dist/src/lib/Components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/src/lib/Components/IconButton/IconButton.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/IconButton/IconButton.stories.js +9 -11
- package/dist/src/lib/Components/IconButton/index.d.ts +1 -0
- package/dist/src/lib/Components/IconButton/index.d.ts.map +1 -1
- package/dist/src/lib/Components/IconButton/index.js +1 -0
- package/dist/src/lib/Components/IconButton/types.d.ts +12 -0
- package/dist/src/lib/Components/IconButton/types.d.ts.map +1 -0
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +2 -2
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.js +1 -1
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.js +34 -34
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts +1 -1
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.js +22 -9
- package/dist/src/lib/Components/InteractiveIcon/types.d.ts +3 -7
- package/dist/src/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
- package/dist/src/lib/Components/Link/Link.d.ts +7 -77
- package/dist/src/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/src/lib/Components/Link/Link.js +59 -75
- package/dist/src/lib/Components/Link/Link.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/Link/Link.stories.js +34 -11
- package/dist/src/lib/Components/Link/index.d.ts +1 -0
- package/dist/src/lib/Components/Link/index.d.ts.map +1 -1
- package/dist/src/lib/Components/Link/index.js +1 -0
- package/dist/src/lib/Components/Link/types.d.ts +43 -0
- package/dist/src/lib/Components/Link/types.d.ts.map +1 -0
- package/dist/src/lib/Components/Link/types.js +1 -0
- package/dist/src/lib/Components/Search/Search.stories.d.ts +6 -1
- package/dist/src/lib/Components/Search/Search.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/Search/Search.stories.js +71 -9
- package/dist/src/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/src/lib/Components/Select/Select.js +1 -17
- package/dist/src/lib/Components/Spinner/Spinner.d.ts +13 -16
- package/dist/src/lib/Components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/src/lib/Components/Spinner/Spinner.js +33 -5
- package/dist/src/lib/Components/Spinner/Spinner.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/Spinner/Spinner.stories.js +1 -1
- package/dist/src/lib/Components/Spinner/index.d.ts +1 -0
- package/dist/src/lib/Components/Spinner/index.d.ts.map +1 -1
- package/dist/src/lib/Components/Spinner/index.js +1 -0
- package/dist/src/lib/Components/Spinner/types.d.ts +15 -0
- package/dist/src/lib/Components/Spinner/types.d.ts.map +1 -0
- package/dist/src/lib/Components/Spinner/types.js +1 -0
- package/dist/src/lib/Components/Tag/Tag.d.ts +2 -1
- package/dist/src/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/src/lib/Components/Tag/Tag.js +15 -4
- package/dist/src/lib/Components/Tag/Tag.stories.js +1 -1
- package/dist/src/lib/Components/Tag/Tag.types.d.ts +7 -1
- package/dist/src/lib/Components/Tag/Tag.types.d.ts.map +1 -1
- package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts +8 -1
- package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/TextInput/TextInput.stories.js +104 -9
- package/dist/src/lib/Components/Tile/Tile.js +2 -2
- package/dist/src/lib/Components/Tooltip/Tooltip.stories.js +2 -2
- package/dist/src/lib/Components/Utility/Box/Box.d.ts +39 -0
- package/dist/src/lib/Components/Utility/Box/Box.d.ts.map +1 -0
- package/dist/src/lib/Components/{Box → Utility/Box}/Box.js +10 -11
- package/dist/src/lib/Components/Utility/Box/Box.stories.d.ts.map +1 -0
- package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.js +13 -12
- package/dist/src/lib/Components/Utility/Box/index.d.ts +2 -0
- package/dist/src/lib/Components/Utility/Box/index.d.ts.map +1 -0
- package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts +34 -0
- package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts.map +1 -0
- package/dist/src/lib/Components/Utility/Pressable/Pressable.js +33 -0
- package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts +7 -0
- package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts.map +1 -0
- package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.js +47 -0
- package/dist/src/lib/Components/Utility/Pressable/index.d.ts +3 -0
- package/dist/src/lib/Components/Utility/Pressable/index.d.ts.map +1 -0
- package/dist/src/lib/Components/Utility/Pressable/index.js +1 -0
- package/dist/src/lib/Components/Utility/Pressable/types.d.ts +3 -0
- package/dist/src/lib/Components/Utility/Pressable/types.d.ts.map +1 -0
- package/dist/src/lib/Components/Utility/Pressable/types.js +1 -0
- package/dist/src/lib/Components/Utility/Text/Text.d.ts +40 -0
- package/dist/src/lib/Components/Utility/Text/Text.d.ts.map +1 -0
- package/dist/src/lib/Components/{Text → Utility/Text}/Text.js +13 -9
- package/dist/src/lib/Components/Utility/Text/Text.stories.d.ts.map +1 -0
- package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.js +3 -3
- package/dist/src/lib/Components/Utility/Text/index.d.ts.map +1 -0
- package/dist/src/lib/Components/Utility/index.d.ts +4 -0
- package/dist/src/lib/Components/Utility/index.d.ts.map +1 -0
- package/dist/src/lib/Components/Utility/index.js +3 -0
- package/dist/src/lib/Components/index.d.ts +1 -3
- package/dist/src/lib/Components/index.d.ts.map +1 -1
- package/dist/src/lib/Components/index.js +1 -3
- package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts +6 -5
- package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts.map +1 -1
- package/dist/src/lib/utils/components/InjectStylesIntoChildren.js +6 -6
- package/dist/src/styles/LumenStyleSheet.d.ts +1 -1
- package/dist/src/styles/LumenStyleSheet.d.ts.map +1 -1
- package/dist/src/styles/Provider/createStylesheetTheme.d.ts +0 -1
- package/dist/src/styles/Provider/createStylesheetTheme.d.ts.map +1 -1
- package/dist/src/styles/Provider/createStylesheetTheme.js +0 -1
- package/dist/src/styles/create/useCreate.d.ts +2 -1
- package/dist/src/styles/create/useCreate.d.ts.map +1 -1
- package/dist/src/styles/create/useCreate.js +5 -5
- package/dist/src/styles/factories/areLxPropsEqual.d.ts +3 -0
- package/dist/src/styles/factories/areLxPropsEqual.d.ts.map +1 -0
- package/dist/src/styles/factories/areLxPropsEqual.js +15 -0
- package/dist/src/styles/factories/createStyledPressable.d.ts +26 -0
- package/dist/src/styles/factories/createStyledPressable.d.ts.map +1 -0
- package/dist/src/styles/factories/createStyledPressable.js +61 -0
- package/dist/src/styles/factories/createStyledText.d.ts +15 -26
- package/dist/src/styles/factories/createStyledText.d.ts.map +1 -1
- package/dist/src/styles/factories/createStyledText.js +13 -29
- package/dist/src/styles/factories/createStyledView.d.ts +7 -27
- package/dist/src/styles/factories/createStyledView.d.ts.map +1 -1
- package/dist/src/styles/factories/createStyledView.js +10 -30
- package/dist/src/styles/factories/index.d.ts +4 -0
- package/dist/src/styles/factories/index.d.ts.map +1 -0
- package/dist/src/styles/factories/index.js +3 -0
- package/dist/src/styles/index.d.ts +2 -3
- package/dist/src/styles/index.d.ts.map +1 -1
- package/dist/src/styles/index.js +2 -3
- package/dist/src/styles/resolveStyle/resolveConfig.d.ts +7 -7
- package/dist/src/styles/resolveStyle/resolveConfig.d.ts.map +1 -1
- package/dist/src/styles/resolveStyle/resolveConfig.js +9 -9
- package/dist/src/styles/resolveStyle/resolveStyle.d.ts +6 -20
- package/dist/src/styles/resolveStyle/resolveStyle.d.ts.map +1 -1
- package/dist/src/styles/resolveStyle/resolveStyle.js +4 -29
- package/dist/src/styles/types/create.types.d.ts +1 -1
- package/dist/src/styles/types/create.types.d.ts.map +1 -1
- package/dist/src/styles/types/styled.types.d.ts +72 -50
- package/dist/src/styles/types/styled.types.d.ts.map +1 -1
- package/dist/src/styles/types/utility.types.d.ts.map +1 -1
- package/dist/src/styles/utils/index.d.ts +2 -0
- package/dist/src/styles/utils/index.d.ts.map +1 -0
- package/dist/src/styles/utils/index.js +1 -0
- package/dist/src/styles/utils/mergeStyles.d.ts +16 -0
- package/dist/src/styles/utils/mergeStyles.d.ts.map +1 -0
- package/dist/src/styles/utils/mergeStyles.js +20 -0
- package/package.json +3 -4
- package/src/lib/Components/AddressInput/AddressInput.mdx +15 -4
- package/src/lib/Components/AddressInput/AddressInput.stories.tsx +133 -17
- package/src/lib/Components/AddressInput/AddressInput.tsx +1 -1
- package/src/lib/Components/AmountInput/AmountInput.mdx +20 -1
- package/src/lib/Components/AmountInput/AmountInput.stories.tsx +180 -17
- package/src/lib/Components/AmountInput/AmountInput.tsx +24 -15
- package/src/lib/Components/Banner/Banner.test.tsx +48 -15
- package/src/lib/Components/BaseInput/BaseInput.tsx +6 -35
- package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +8 -8
- package/src/lib/Components/BottomSheet/BottomSheet.tsx +1 -1
- package/src/lib/Components/Button/BaseButton.test.tsx +149 -0
- package/src/lib/Components/Button/BaseButton.tsx +193 -148
- package/src/lib/Components/Button/Button.mdx +34 -31
- package/src/lib/Components/Button/Button.stories.tsx +37 -58
- package/src/lib/Components/Button/Button.tsx +4 -11
- package/src/lib/Components/Button/index.ts +1 -1
- package/src/lib/Components/Button/{BaseButton.types.ts → types.ts} +14 -8
- package/src/lib/Components/CardButton/CardButton.mdx +15 -25
- package/src/lib/Components/CardButton/CardButton.stories.tsx +48 -22
- package/src/lib/Components/CardButton/CardButton.test.tsx +141 -0
- package/src/lib/Components/CardButton/CardButton.tsx +142 -108
- package/src/lib/Components/CardButton/index.ts +1 -1
- package/src/lib/Components/CardButton/{CardButton.types.ts → types.ts} +4 -3
- package/src/lib/Components/Checkbox/Checkbox.mdx +1 -1
- package/src/lib/Components/Checkbox/Checkbox.test.tsx +42 -17
- package/src/lib/Components/Icon/Icon.stories.tsx +143 -73
- package/src/lib/Components/Icon/Icon.test.tsx +84 -0
- package/src/lib/Components/Icon/Icon.tsx +32 -28
- package/src/lib/Components/Icon/createIcon.ts +2 -3
- package/src/lib/Components/Icon/index.ts +1 -1
- package/src/lib/Components/Icon/{Icon.types.ts → types.ts} +4 -3
- package/src/lib/Components/IconButton/IconButton.mdx +13 -10
- package/src/lib/Components/IconButton/IconButton.stories.tsx +12 -14
- package/src/lib/Components/IconButton/IconButton.test.tsx +141 -0
- package/src/lib/Components/IconButton/IconButton.tsx +3 -13
- package/src/lib/Components/IconButton/index.ts +1 -0
- package/src/lib/Components/IconButton/types.ts +12 -0
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx +1 -1
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.mdx +25 -27
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx +82 -43
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.test.tsx +30 -19
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.tsx +78 -45
- package/src/lib/Components/InteractiveIcon/types.ts +4 -7
- package/src/lib/Components/Link/Link.mdx +8 -18
- package/src/lib/Components/Link/Link.stories.tsx +56 -25
- package/src/lib/Components/Link/Link.test.tsx +141 -51
- package/src/lib/Components/Link/Link.tsx +128 -150
- package/src/lib/Components/Link/index.ts +1 -0
- package/src/lib/Components/Link/types.ts +44 -0
- package/src/lib/Components/Search/Search.mdx +14 -1
- package/src/lib/Components/Search/Search.stories.tsx +94 -15
- package/src/lib/Components/Select/Select.test.tsx +8 -4
- package/src/lib/Components/Select/Select.tsx +4 -31
- package/src/lib/Components/Spinner/Spinner.stories.tsx +1 -5
- package/src/lib/Components/Spinner/Spinner.tsx +60 -34
- package/src/lib/Components/Spinner/index.ts +1 -0
- package/src/lib/Components/Spinner/types.ts +15 -0
- package/src/lib/Components/Switch/Switch.mdx +1 -1
- package/src/lib/Components/Tag/Tag.stories.tsx +2 -2
- package/src/lib/Components/Tag/Tag.tsx +22 -6
- package/src/lib/Components/Tag/Tag.types.ts +7 -8
- package/src/lib/Components/TextInput/TextInput.mdx +24 -4
- package/src/lib/Components/TextInput/TextInput.stories.tsx +131 -15
- package/src/lib/Components/Tile/Tile.test.tsx +100 -63
- package/src/lib/Components/Tile/Tile.tsx +2 -2
- package/src/lib/Components/Tooltip/Tooltip.stories.tsx +2 -2
- package/src/lib/Components/Tooltip/Tooltip.test.tsx +8 -4
- package/src/lib/Components/{Box → Utility/Box}/Box.mdx +15 -13
- package/src/lib/Components/{Box → Utility/Box}/Box.stories.tsx +13 -11
- package/src/lib/Components/{Box → Utility/Box}/Box.tsx +11 -12
- package/src/lib/Components/Utility/Box/index.ts +1 -0
- package/src/lib/Components/Utility/Pressable/Pressable.mdx +103 -0
- package/src/lib/Components/Utility/Pressable/Pressable.stories.tsx +51 -0
- package/src/lib/Components/Utility/Pressable/Pressable.test.tsx +221 -0
- package/src/lib/Components/Utility/Pressable/Pressable.tsx +34 -0
- package/src/lib/Components/Utility/Pressable/index.ts +2 -0
- package/src/lib/Components/Utility/Pressable/types.ts +3 -0
- package/src/lib/Components/{Text → Utility/Text}/Text.mdx +15 -7
- package/src/lib/Components/{Text → Utility/Text}/Text.stories.tsx +3 -3
- package/src/lib/Components/Utility/Text/Text.tsx +39 -0
- package/src/lib/Components/Utility/index.ts +3 -0
- package/src/lib/Components/index.ts +1 -3
- package/src/lib/utils/components/InjectStylesIntoChildren.tsx +23 -14
- package/src/styles/Provider/createStylesheetTheme.ts +0 -1
- package/src/styles/create/useCreate.ts +8 -4
- package/src/styles/factories/areLxPropsEqual.ts +32 -0
- package/src/styles/factories/createStyledPressable.test.tsx +253 -0
- package/src/styles/factories/createStyledPressable.tsx +97 -0
- package/src/styles/factories/createStyledText.test.tsx +28 -20
- package/src/styles/factories/createStyledText.tsx +29 -49
- package/src/styles/factories/createStyledView.test.tsx +22 -16
- package/src/styles/factories/createStyledView.tsx +19 -53
- package/src/styles/factories/index.ts +3 -0
- package/src/styles/index.ts +2 -3
- package/src/styles/resolveStyle/resolveConfig.ts +16 -15
- package/src/styles/resolveStyle/resolveStyle.test.ts +13 -141
- package/src/styles/resolveStyle/resolveStyle.ts +10 -60
- package/src/styles/types/create.types.ts +1 -1
- package/src/styles/types/styled.types.ts +73 -105
- package/src/styles/types/utility.types.ts +1 -0
- package/src/styles/utils/index.ts +1 -0
- package/src/styles/utils/mergeStyles.test.ts +45 -0
- package/src/styles/utils/mergeStyles.ts +25 -0
- package/.storybook/docs/getting-started/StyleSystem.mdx +0 -133
- package/dist/src/lib/Components/Box/Box.d.ts +0 -592
- package/dist/src/lib/Components/Box/Box.d.ts.map +0 -1
- package/dist/src/lib/Components/Box/Box.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Box/Box.types.d.ts +0 -3
- package/dist/src/lib/Components/Box/Box.types.d.ts.map +0 -1
- package/dist/src/lib/Components/Box/index.d.ts +0 -3
- package/dist/src/lib/Components/Box/index.d.ts.map +0 -1
- package/dist/src/lib/Components/Button/BaseButton.types.d.ts.map +0 -1
- package/dist/src/lib/Components/CardButton/CardButton.types.d.ts.map +0 -1
- package/dist/src/lib/Components/Icon/Icon.types.d.ts.map +0 -1
- package/dist/src/lib/Components/Text/Text.d.ts +0 -602
- package/dist/src/lib/Components/Text/Text.d.ts.map +0 -1
- package/dist/src/lib/Components/Text/Text.stories.d.ts.map +0 -1
- package/dist/src/lib/Components/Text/index.d.ts.map +0 -1
- package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts +0 -9
- package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts.map +0 -1
- package/dist/src/lib/Components/_ToRemove/ToRemove.js +0 -43
- package/dist/src/styles/utils/styleVarianceAuthority.d.ts +0 -30
- package/dist/src/styles/utils/styleVarianceAuthority.d.ts.map +0 -1
- package/dist/src/styles/utils/styleVarianceAuthority.js +0 -97
- package/src/lib/Components/Box/Box.types.ts +0 -3
- package/src/lib/Components/Box/index.ts +0 -2
- package/src/lib/Components/Text/Text.tsx +0 -35
- package/src/lib/Components/_ToRemove/ToRemove.tsx +0 -65
- package/src/styles/utils/styleVarianceAuthority.test.ts +0 -302
- package/src/styles/utils/styleVarianceAuthority.ts +0 -154
- /package/dist/src/lib/Components/{Box/Box.types.js → Button/types.js} +0 -0
- /package/dist/src/lib/Components/{Button/BaseButton.types.js → CardButton/types.js} +0 -0
- /package/dist/src/lib/Components/{CardButton/CardButton.types.js → Icon/types.js} +0 -0
- /package/dist/src/lib/Components/{Icon/Icon.types.js → IconButton/types.js} +0 -0
- /package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.d.ts +0 -0
- /package/dist/src/lib/Components/{Box → Utility/Box}/index.js +0 -0
- /package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.d.ts +0 -0
- /package/dist/src/lib/Components/{Text → Utility/Text}/index.d.ts +0 -0
- /package/dist/src/lib/Components/{Text → Utility/Text}/index.js +0 -0
- /package/src/lib/Components/{Text → Utility/Text}/index.ts +0 -0
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { describe, it, expect, jest } from '@jest/globals';
|
|
2
|
+
import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
|
|
2
3
|
import { render, screen, fireEvent } from '@testing-library/react-native';
|
|
3
4
|
|
|
4
5
|
import { Settings, Plus } from '../../Symbols';
|
|
6
|
+
import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
|
|
5
7
|
import { InteractiveIcon } from './InteractiveIcon';
|
|
6
8
|
|
|
9
|
+
const renderWithProvider = (component: React.ReactElement) => {
|
|
10
|
+
return render(
|
|
11
|
+
<ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
|
|
12
|
+
{component}
|
|
13
|
+
</ThemeProvider>,
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
7
17
|
describe('InteractiveIcon Component', () => {
|
|
8
18
|
it('should render correctly with children icon', () => {
|
|
9
|
-
|
|
19
|
+
renderWithProvider(
|
|
10
20
|
<InteractiveIcon
|
|
11
21
|
iconType='filled'
|
|
12
|
-
|
|
22
|
+
accessibilityLabel='Settings'
|
|
13
23
|
testID='icon-button'
|
|
14
24
|
>
|
|
15
25
|
<Settings size={20} />
|
|
@@ -20,10 +30,10 @@ describe('InteractiveIcon Component', () => {
|
|
|
20
30
|
});
|
|
21
31
|
|
|
22
32
|
it('should render with filled iconType variant', () => {
|
|
23
|
-
|
|
33
|
+
renderWithProvider(
|
|
24
34
|
<InteractiveIcon
|
|
25
35
|
iconType='filled'
|
|
26
|
-
|
|
36
|
+
accessibilityLabel='Add item'
|
|
27
37
|
testID='filled-icon'
|
|
28
38
|
>
|
|
29
39
|
<Plus size={20} />
|
|
@@ -35,10 +45,10 @@ describe('InteractiveIcon Component', () => {
|
|
|
35
45
|
});
|
|
36
46
|
|
|
37
47
|
it('should render with stroked iconType variant', () => {
|
|
38
|
-
|
|
48
|
+
renderWithProvider(
|
|
39
49
|
<InteractiveIcon
|
|
40
50
|
iconType='stroked'
|
|
41
|
-
|
|
51
|
+
accessibilityLabel='Settings'
|
|
42
52
|
testID='stroked-icon'
|
|
43
53
|
>
|
|
44
54
|
<Settings size={20} />
|
|
@@ -50,10 +60,10 @@ describe('InteractiveIcon Component', () => {
|
|
|
50
60
|
});
|
|
51
61
|
|
|
52
62
|
it('should have correct accessibility label', () => {
|
|
53
|
-
|
|
63
|
+
renderWithProvider(
|
|
54
64
|
<InteractiveIcon
|
|
55
65
|
iconType='filled'
|
|
56
|
-
|
|
66
|
+
accessibilityLabel='Open menu'
|
|
57
67
|
testID='menu-icon'
|
|
58
68
|
>
|
|
59
69
|
<Settings size={20} />
|
|
@@ -64,10 +74,10 @@ describe('InteractiveIcon Component', () => {
|
|
|
64
74
|
});
|
|
65
75
|
|
|
66
76
|
it('should be disabled when the disabled prop is true', () => {
|
|
67
|
-
|
|
77
|
+
renderWithProvider(
|
|
68
78
|
<InteractiveIcon
|
|
69
79
|
iconType='filled'
|
|
70
|
-
|
|
80
|
+
accessibilityLabel='Disabled button'
|
|
71
81
|
disabled
|
|
72
82
|
testID='disabled-icon'
|
|
73
83
|
>
|
|
@@ -80,10 +90,10 @@ describe('InteractiveIcon Component', () => {
|
|
|
80
90
|
|
|
81
91
|
it('should call the onPress handler when pressed', () => {
|
|
82
92
|
const handlePress = jest.fn();
|
|
83
|
-
|
|
93
|
+
renderWithProvider(
|
|
84
94
|
<InteractiveIcon
|
|
85
95
|
iconType='filled'
|
|
86
|
-
|
|
96
|
+
accessibilityLabel='Pressable'
|
|
87
97
|
onPress={handlePress}
|
|
88
98
|
testID='pressable-icon'
|
|
89
99
|
>
|
|
@@ -99,10 +109,10 @@ describe('InteractiveIcon Component', () => {
|
|
|
99
109
|
|
|
100
110
|
it('should not call the onPress handler when disabled', () => {
|
|
101
111
|
const handlePress = jest.fn();
|
|
102
|
-
|
|
112
|
+
renderWithProvider(
|
|
103
113
|
<InteractiveIcon
|
|
104
114
|
iconType='filled'
|
|
105
|
-
|
|
115
|
+
accessibilityLabel='Disabled'
|
|
106
116
|
onPress={handlePress}
|
|
107
117
|
disabled
|
|
108
118
|
testID='disabled-pressable'
|
|
@@ -119,10 +129,10 @@ describe('InteractiveIcon Component', () => {
|
|
|
119
129
|
|
|
120
130
|
it('should call the onLongPress handler when long pressed', () => {
|
|
121
131
|
const handleLongPress = jest.fn();
|
|
122
|
-
|
|
132
|
+
renderWithProvider(
|
|
123
133
|
<InteractiveIcon
|
|
124
134
|
iconType='stroked'
|
|
125
|
-
|
|
135
|
+
accessibilityLabel='Long pressable'
|
|
126
136
|
onLongPress={handleLongPress}
|
|
127
137
|
testID='long-pressable-icon'
|
|
128
138
|
>
|
|
@@ -138,10 +148,10 @@ describe('InteractiveIcon Component', () => {
|
|
|
138
148
|
|
|
139
149
|
it('should apply custom style', () => {
|
|
140
150
|
const customStyle = { marginTop: 8 };
|
|
141
|
-
|
|
151
|
+
renderWithProvider(
|
|
142
152
|
<InteractiveIcon
|
|
143
153
|
iconType='filled'
|
|
144
|
-
|
|
154
|
+
accessibilityLabel='Custom'
|
|
145
155
|
style={customStyle}
|
|
146
156
|
testID='custom-icon'
|
|
147
157
|
>
|
|
@@ -149,6 +159,7 @@ describe('InteractiveIcon Component', () => {
|
|
|
149
159
|
</InteractiveIcon>,
|
|
150
160
|
);
|
|
151
161
|
const buttonElement = screen.getByTestId('custom-icon');
|
|
152
|
-
|
|
162
|
+
// Style is merged as an array [resolvedStyle, customStyle]
|
|
163
|
+
expect(buttonElement.props.style).toMatchObject(customStyle);
|
|
153
164
|
});
|
|
154
165
|
});
|
|
@@ -1,36 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { InjectStylesIntoChildren } from '../../utils';
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { LumenStyleSheet, mergeStyles } from '../../../styles';
|
|
4
|
+
|
|
5
|
+
import { InjectStylesIntoChildren } from '../../utils/components/InjectStylesIntoChildren';
|
|
6
|
+
import { Pressable } from '../Utility';
|
|
6
7
|
import { InteractiveIconProps } from './types';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
type IconType = InteractiveIconProps['iconType'];
|
|
10
|
+
|
|
11
|
+
const useStyles = ({
|
|
12
|
+
iconType,
|
|
13
|
+
pressed,
|
|
14
|
+
disabled,
|
|
15
|
+
}: {
|
|
16
|
+
iconType: IconType;
|
|
17
|
+
pressed: boolean;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
}) => {
|
|
20
|
+
return LumenStyleSheet.useCreate(
|
|
21
|
+
(t) => {
|
|
22
|
+
const backgroundStyle = {
|
|
23
|
+
filled: { backgroundColor: t.colors.bg.base },
|
|
24
|
+
stroked: { backgroundColor: t.colors.bg.baseTransparent },
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
container: mergeStyles(
|
|
29
|
+
{
|
|
30
|
+
borderRadius: t.borderRadius.full,
|
|
31
|
+
},
|
|
32
|
+
backgroundStyle[iconType],
|
|
33
|
+
iconType === 'stroked' &&
|
|
34
|
+
pressed && { backgroundColor: t.colors.bg.baseTransparentPressed },
|
|
35
|
+
),
|
|
36
|
+
icon: {
|
|
37
|
+
color: disabled
|
|
38
|
+
? t.colors.text.disabled
|
|
39
|
+
: pressed
|
|
40
|
+
? t.colors.text.mutedPressed
|
|
41
|
+
: t.colors.text.muted,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
24
44
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
pressed: true,
|
|
29
|
-
className: 'bg-base-transparent-pressed',
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
);
|
|
45
|
+
[iconType, pressed, disabled],
|
|
46
|
+
);
|
|
47
|
+
};
|
|
34
48
|
|
|
35
49
|
/**
|
|
36
50
|
* A specialized interactive component designed specifically for displaying pressable icons.
|
|
@@ -52,12 +66,12 @@ const buttonVariants = cva(
|
|
|
52
66
|
* import { DeleteCircleFill, Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
53
67
|
*
|
|
54
68
|
* // Filled interactive icon for destructive actions
|
|
55
|
-
* <InteractiveIcon iconType="filled"
|
|
69
|
+
* <InteractiveIcon iconType="filled" accessibilityLabel="Delete item" onPress={handleDelete}>
|
|
56
70
|
* <DeleteCircleFill size={20} />
|
|
57
71
|
* </InteractiveIcon>
|
|
58
72
|
*
|
|
59
73
|
* // Stroked interactive icon for secondary actions
|
|
60
|
-
* <InteractiveIcon iconType="stroked"
|
|
74
|
+
* <InteractiveIcon iconType="stroked" accessibilityLabel="Open settings" onPress={handleSettings}>
|
|
61
75
|
* <Settings size={20} />
|
|
62
76
|
* </InteractiveIcon>
|
|
63
77
|
*/
|
|
@@ -65,28 +79,47 @@ export const InteractiveIcon: FC<InteractiveIconProps> = ({
|
|
|
65
79
|
iconType,
|
|
66
80
|
children,
|
|
67
81
|
disabled = false,
|
|
82
|
+
style,
|
|
83
|
+
lx,
|
|
68
84
|
...props
|
|
69
85
|
}) => {
|
|
70
86
|
return (
|
|
71
87
|
<Pressable
|
|
88
|
+
lx={lx}
|
|
89
|
+
style={[style, { alignItems: 'center', justifyContent: 'center' }]}
|
|
72
90
|
accessibilityRole='button'
|
|
73
91
|
accessibilityState={{ disabled: !!disabled }}
|
|
74
92
|
disabled={disabled}
|
|
75
93
|
{...props}
|
|
76
94
|
>
|
|
77
|
-
{({ pressed }) =>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</InjectStylesIntoChildren>
|
|
87
|
-
</View>
|
|
88
|
-
);
|
|
89
|
-
}}
|
|
95
|
+
{({ pressed }) => (
|
|
96
|
+
<InteractiveIconContent
|
|
97
|
+
iconType={iconType}
|
|
98
|
+
pressed={pressed}
|
|
99
|
+
disabled={!!disabled}
|
|
100
|
+
>
|
|
101
|
+
{children}
|
|
102
|
+
</InteractiveIconContent>
|
|
103
|
+
)}
|
|
90
104
|
</Pressable>
|
|
91
105
|
);
|
|
92
106
|
};
|
|
107
|
+
|
|
108
|
+
const InteractiveIconContent: FC<
|
|
109
|
+
PropsWithChildren<{
|
|
110
|
+
iconType: IconType;
|
|
111
|
+
pressed: boolean;
|
|
112
|
+
disabled: boolean;
|
|
113
|
+
}>
|
|
114
|
+
> = ({ iconType, pressed, disabled, children }) => {
|
|
115
|
+
const styles = useStyles({ iconType, pressed, disabled });
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<View style={styles.container}>
|
|
119
|
+
<InjectStylesIntoChildren style={styles.icon}>
|
|
120
|
+
{children}
|
|
121
|
+
</InjectStylesIntoChildren>
|
|
122
|
+
</View>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
InteractiveIcon.displayName = 'InteractiveIcon';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { StyledPressableProps } from '../../../styles';
|
|
3
3
|
|
|
4
4
|
export type InteractiveIconProps = {
|
|
5
5
|
/**
|
|
@@ -7,8 +7,5 @@ export type InteractiveIconProps = {
|
|
|
7
7
|
* Choose 'filled' for icons with solid backgrounds or 'stroked' for outlined icons.
|
|
8
8
|
*/
|
|
9
9
|
iconType: 'filled' | 'stroked';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
children: ReactNode;
|
|
14
|
-
} & PressableProps;
|
|
10
|
+
} & PropsWithChildren &
|
|
11
|
+
Omit<StyledPressableProps, 'children'>;
|
|
@@ -52,21 +52,11 @@ The `underline` prop controls text decoration independently from appearance (def
|
|
|
52
52
|
|
|
53
53
|
Links come in two size options:
|
|
54
54
|
|
|
55
|
-
- **sm**: Small size
|
|
56
|
-
- **md** (default): Medium size
|
|
55
|
+
- **sm**: Small size
|
|
56
|
+
- **md** (default): Medium size
|
|
57
57
|
|
|
58
58
|
<Canvas of={LinkStories.SizesShowcase} />
|
|
59
59
|
|
|
60
|
-
> **⚠️ Important**: Icon sizes are automatically managed by the Link component based on the selected size. Never override the icon size using className or style props, as this will break the visual consistency of the design system. The Link component ensures proper scaling and alignment of icons across all sizes.
|
|
61
|
-
>
|
|
62
|
-
> ```tsx
|
|
63
|
-
> // ✅ Correct: Let Link handle icon sizing
|
|
64
|
-
> <Link size="sm" icon={ArrowRight} href="https://example.com">Continue</Link>
|
|
65
|
-
>
|
|
66
|
-
> // ❌ Wrong: Don't override icon size [it's not gonna work even if you try]
|
|
67
|
-
> <Link size="sm" icon={ArrowRight} className="w-6 h-6" href="https://example.com">Continue</Link>
|
|
68
|
-
> ```
|
|
69
|
-
|
|
70
60
|
### States
|
|
71
61
|
|
|
72
62
|
Links respond to press interactions with visual feedback:
|
|
@@ -108,12 +98,12 @@ function MyComponent() {
|
|
|
108
98
|
|
|
109
99
|
### Custom Styling
|
|
110
100
|
|
|
111
|
-
While the component comes with predefined styles, you can extend them using
|
|
101
|
+
While the component comes with predefined styles, you can extend them using the `lx` prop for layout purposes:
|
|
112
102
|
|
|
113
103
|
```tsx
|
|
114
104
|
<Link
|
|
115
105
|
href='https://example.com'
|
|
116
|
-
|
|
106
|
+
lx={{ marginTop: 's4' }}
|
|
117
107
|
>
|
|
118
108
|
Custom Link
|
|
119
109
|
</Link>
|
|
@@ -270,7 +260,7 @@ import { ArrowRight } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
270
260
|
<DoVsDontRow>
|
|
271
261
|
<DoBlockItem
|
|
272
262
|
title='Use underline prop to control text decoration'
|
|
273
|
-
description='Use the underline prop instead of
|
|
263
|
+
description='Use the underline prop instead of lx for text decoration'
|
|
274
264
|
>
|
|
275
265
|
|
|
276
266
|
{/* prettier-ignore */}
|
|
@@ -282,13 +272,13 @@ import { ArrowRight } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
282
272
|
|
|
283
273
|
</DoBlockItem>
|
|
284
274
|
<DontBlockItem
|
|
285
|
-
title="Don't use
|
|
286
|
-
description='Avoid using
|
|
275
|
+
title="Don't use lx to fake underline"
|
|
276
|
+
description='Avoid using lx with borderBottom to mimic underline styling'
|
|
287
277
|
>
|
|
288
278
|
|
|
289
279
|
{/* prettier-ignore */}
|
|
290
280
|
```tsx
|
|
291
|
-
<Link
|
|
281
|
+
<Link style={{ textDecorationLine: 'underline' }} href='https://example.com'>
|
|
292
282
|
Link without underline
|
|
293
283
|
</Link>
|
|
294
284
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import { View, Text } from 'react-native';
|
|
3
2
|
import { Settings, Information, ArrowRight } from '../../Symbols';
|
|
3
|
+
import { Box, Text } from '../Utility';
|
|
4
4
|
import { Link } from './Link';
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof Link> = {
|
|
@@ -160,7 +160,7 @@ export const AppearanceShowcase: Story = {
|
|
|
160
160
|
];
|
|
161
161
|
|
|
162
162
|
return (
|
|
163
|
-
<
|
|
163
|
+
<Box lx={{ flexDirection: 'row', gap: 's32', padding: 's8' }}>
|
|
164
164
|
{appearances.map(({ name, appearance }) => (
|
|
165
165
|
<Link
|
|
166
166
|
key={appearance}
|
|
@@ -173,14 +173,14 @@ export const AppearanceShowcase: Story = {
|
|
|
173
173
|
{name}
|
|
174
174
|
</Link>
|
|
175
175
|
))}
|
|
176
|
-
</
|
|
176
|
+
</Box>
|
|
177
177
|
);
|
|
178
178
|
},
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
export const UnderlineShowcase: Story = {
|
|
182
182
|
render: () => (
|
|
183
|
-
<
|
|
183
|
+
<Box lx={{ flexDirection: 'column', gap: 's16', padding: 's8' }}>
|
|
184
184
|
<Link appearance='accent' size='md' href='https://ledger.com'>
|
|
185
185
|
With underline
|
|
186
186
|
</Link>
|
|
@@ -192,14 +192,21 @@ export const UnderlineShowcase: Story = {
|
|
|
192
192
|
>
|
|
193
193
|
Without underline
|
|
194
194
|
</Link>
|
|
195
|
-
</
|
|
195
|
+
</Box>
|
|
196
196
|
),
|
|
197
197
|
};
|
|
198
198
|
|
|
199
199
|
export const SizesShowcase: Story = {
|
|
200
200
|
render: () => (
|
|
201
|
-
<
|
|
202
|
-
<
|
|
201
|
+
<Box lx={{ flexDirection: 'column', gap: 's16' }}>
|
|
202
|
+
<Box
|
|
203
|
+
lx={{
|
|
204
|
+
flexDirection: 'row',
|
|
205
|
+
alignItems: 'center',
|
|
206
|
+
gap: 's32',
|
|
207
|
+
padding: 's8',
|
|
208
|
+
}}
|
|
209
|
+
>
|
|
203
210
|
<Link
|
|
204
211
|
appearance='base'
|
|
205
212
|
size='sm'
|
|
@@ -218,8 +225,15 @@ export const SizesShowcase: Story = {
|
|
|
218
225
|
>
|
|
219
226
|
Medium
|
|
220
227
|
</Link>
|
|
221
|
-
</
|
|
222
|
-
<
|
|
228
|
+
</Box>
|
|
229
|
+
<Box
|
|
230
|
+
lx={{
|
|
231
|
+
flexDirection: 'row',
|
|
232
|
+
alignItems: 'center',
|
|
233
|
+
gap: 's32',
|
|
234
|
+
padding: 's8',
|
|
235
|
+
}}
|
|
236
|
+
>
|
|
223
237
|
<Link
|
|
224
238
|
appearance='accent'
|
|
225
239
|
size='sm'
|
|
@@ -238,27 +252,44 @@ export const SizesShowcase: Story = {
|
|
|
238
252
|
>
|
|
239
253
|
Medium Accent
|
|
240
254
|
</Link>
|
|
241
|
-
</
|
|
242
|
-
</
|
|
255
|
+
</Box>
|
|
256
|
+
</Box>
|
|
243
257
|
),
|
|
244
258
|
};
|
|
245
259
|
|
|
246
260
|
export const StatesShowcase: Story = {
|
|
247
261
|
render: () => (
|
|
248
|
-
<
|
|
262
|
+
<Box
|
|
263
|
+
lx={{
|
|
264
|
+
flexDirection: 'row',
|
|
265
|
+
alignItems: 'center',
|
|
266
|
+
gap: 's16',
|
|
267
|
+
padding: 's8',
|
|
268
|
+
}}
|
|
269
|
+
>
|
|
249
270
|
<Link appearance='base' href='https://ledger.com'>
|
|
250
271
|
Default
|
|
251
272
|
</Link>
|
|
252
273
|
<Link appearance='accent' href='https://ledger.com' icon={ArrowRight}>
|
|
253
274
|
With Icon
|
|
254
275
|
</Link>
|
|
255
|
-
</
|
|
276
|
+
</Box>
|
|
256
277
|
),
|
|
257
278
|
};
|
|
258
279
|
|
|
259
280
|
export const ResponsiveLayout: Story = {
|
|
260
281
|
render: () => (
|
|
261
|
-
<
|
|
282
|
+
<Box
|
|
283
|
+
lx={{
|
|
284
|
+
width: 's256',
|
|
285
|
+
flexDirection: 'column',
|
|
286
|
+
gap: 's8',
|
|
287
|
+
borderRadius: 'sm',
|
|
288
|
+
borderColor: 'mutedSubtle',
|
|
289
|
+
borderWidth: 's1',
|
|
290
|
+
padding: 's8',
|
|
291
|
+
}}
|
|
292
|
+
>
|
|
262
293
|
<Link underline href='https://ledger.com'>
|
|
263
294
|
Short Link
|
|
264
295
|
</Link>
|
|
@@ -274,7 +305,7 @@ export const ResponsiveLayout: Story = {
|
|
|
274
305
|
>
|
|
275
306
|
Base with long text that is cut off
|
|
276
307
|
</Link>
|
|
277
|
-
</
|
|
308
|
+
</Box>
|
|
278
309
|
),
|
|
279
310
|
};
|
|
280
311
|
|
|
@@ -286,7 +317,7 @@ export const WithCustomNavigation: Story = {
|
|
|
286
317
|
};
|
|
287
318
|
|
|
288
319
|
return (
|
|
289
|
-
<
|
|
320
|
+
<Box lx={{ flexDirection: 'column', gap: 's16', padding: 's8' }}>
|
|
290
321
|
<Link appearance='base' size='md' onPress={handlePress}>
|
|
291
322
|
Navigate to Dashboard
|
|
292
323
|
</Link>
|
|
@@ -298,7 +329,7 @@ export const WithCustomNavigation: Story = {
|
|
|
298
329
|
>
|
|
299
330
|
Continue to Next Screen
|
|
300
331
|
</Link>
|
|
301
|
-
</
|
|
332
|
+
</Box>
|
|
302
333
|
);
|
|
303
334
|
},
|
|
304
335
|
parameters: {
|
|
@@ -339,8 +370,8 @@ function MyComponent() {
|
|
|
339
370
|
|
|
340
371
|
export const InTextUsage: Story = {
|
|
341
372
|
render: () => (
|
|
342
|
-
<
|
|
343
|
-
<Text
|
|
373
|
+
<Box lx={{ flexDirection: 'column', gap: 's32', padding: 's8' }}>
|
|
374
|
+
<Text typography='body2' lx={{ color: 'base' }}>
|
|
344
375
|
By continuing, you agree to our{' '}
|
|
345
376
|
<Link appearance='base' size='sm' href='https://ledger.com/terms'>
|
|
346
377
|
Terms & Conditions
|
|
@@ -352,14 +383,14 @@ export const InTextUsage: Story = {
|
|
|
352
383
|
.
|
|
353
384
|
</Text>
|
|
354
385
|
|
|
355
|
-
<Text
|
|
386
|
+
<Text typography='body1SemiBold' lx={{ color: 'interactive' }}>
|
|
356
387
|
Need help?{' '}
|
|
357
388
|
<Link appearance='accent' size='md' href='https://ledger.com/support'>
|
|
358
389
|
Contact Support
|
|
359
390
|
</Link>
|
|
360
391
|
</Text>
|
|
361
392
|
|
|
362
|
-
<Text
|
|
393
|
+
<Text typography='body1SemiBold' lx={{ color: 'base' }}>
|
|
363
394
|
Already have an account?{' '}
|
|
364
395
|
<Link
|
|
365
396
|
appearance='accent'
|
|
@@ -370,14 +401,14 @@ export const InTextUsage: Story = {
|
|
|
370
401
|
Sign in
|
|
371
402
|
</Link>
|
|
372
403
|
</Text>
|
|
373
|
-
</
|
|
404
|
+
</Box>
|
|
374
405
|
),
|
|
375
406
|
parameters: {
|
|
376
407
|
docs: {
|
|
377
408
|
source: {
|
|
378
409
|
code: `
|
|
379
410
|
// Links within text content
|
|
380
|
-
<Text
|
|
411
|
+
<Text typography='body2' lx={{ color: 'base' }}>
|
|
381
412
|
By continuing, you agree to our{' '}
|
|
382
413
|
<Link appearance='base' size='sm' href='https://ledger.com/terms'>
|
|
383
414
|
Terms & Conditions
|
|
@@ -389,7 +420,7 @@ export const InTextUsage: Story = {
|
|
|
389
420
|
</Text>
|
|
390
421
|
|
|
391
422
|
// Heading with inline link
|
|
392
|
-
<Text
|
|
423
|
+
<Text typography='body1SemiBold' lx={{ color: 'interactive' }}>
|
|
393
424
|
Need help?{' '}
|
|
394
425
|
<Link appearance='accent' size='md' href='https://ledger.com/support'>
|
|
395
426
|
Contact Support
|
|
@@ -397,7 +428,7 @@ export const InTextUsage: Story = {
|
|
|
397
428
|
</Text>
|
|
398
429
|
|
|
399
430
|
// Bold text with ununderlined link
|
|
400
|
-
<Text
|
|
431
|
+
<Text typography='body1SemiBold' lx={{ color: 'base' }}>
|
|
401
432
|
Already have an account?{' '}
|
|
402
433
|
<Link
|
|
403
434
|
appearance='accent'
|