@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,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { AmountInput, type AmountInputProps } from './AmountInput';
|
|
4
5
|
|
|
5
6
|
const meta: Meta<typeof AmountInput> = {
|
|
6
7
|
component: AmountInput,
|
|
@@ -14,25 +15,187 @@ const meta: Meta<typeof AmountInput> = {
|
|
|
14
15
|
},
|
|
15
16
|
},
|
|
16
17
|
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
currencyText: {
|
|
20
|
+
control: 'text',
|
|
21
|
+
description: 'Currency text to display (e.g. USD, EUR, $)',
|
|
22
|
+
},
|
|
23
|
+
currencyPosition: {
|
|
24
|
+
control: 'radio',
|
|
25
|
+
options: ['left', 'right'],
|
|
26
|
+
description: 'Position of the currency text',
|
|
27
|
+
},
|
|
28
|
+
allowDecimals: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Whether to allow decimal values',
|
|
31
|
+
},
|
|
32
|
+
thousandsSeparator: {
|
|
33
|
+
control: 'boolean',
|
|
34
|
+
description: 'Whether to display thousands separator',
|
|
35
|
+
},
|
|
36
|
+
maxIntegerLength: {
|
|
37
|
+
control: 'number',
|
|
38
|
+
description: 'Maximum digits for integer part',
|
|
39
|
+
},
|
|
40
|
+
maxDecimalLength: {
|
|
41
|
+
control: 'number',
|
|
42
|
+
description: 'Maximum digits for decimal part',
|
|
43
|
+
},
|
|
44
|
+
isInvalid: {
|
|
45
|
+
control: 'boolean',
|
|
46
|
+
description: 'Whether the input is in error state',
|
|
47
|
+
},
|
|
48
|
+
editable: {
|
|
49
|
+
control: 'boolean',
|
|
50
|
+
description: 'Whether the input is editable',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
17
53
|
};
|
|
18
54
|
|
|
19
55
|
export default meta;
|
|
20
56
|
type Story = StoryObj<typeof AmountInput>;
|
|
21
57
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
58
|
+
const AmountInputStory = (args: AmountInputProps) => {
|
|
59
|
+
const [value, setValue] = useState(args.value?.toString() ?? '');
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<View className='flex min-h-400 items-center justify-center p-24'>
|
|
63
|
+
<View className='w-full max-w-320'>
|
|
64
|
+
<AmountInput {...args} value={value} onChangeText={setValue} />
|
|
65
|
+
</View>
|
|
66
|
+
</View>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const Base: Story = {
|
|
71
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
72
|
+
args: {
|
|
73
|
+
currencyText: 'USD',
|
|
74
|
+
currencyPosition: 'left',
|
|
75
|
+
allowDecimals: true,
|
|
76
|
+
thousandsSeparator: true,
|
|
77
|
+
maxIntegerLength: 9,
|
|
78
|
+
maxDecimalLength: 9,
|
|
79
|
+
isInvalid: false,
|
|
80
|
+
editable: true,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const WithValue: Story = {
|
|
85
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
86
|
+
args: {
|
|
87
|
+
value: '1234.56',
|
|
88
|
+
currencyText: 'USD',
|
|
89
|
+
currencyPosition: 'left',
|
|
90
|
+
allowDecimals: true,
|
|
91
|
+
thousandsSeparator: true,
|
|
92
|
+
isInvalid: false,
|
|
93
|
+
editable: true,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const CurrencyPositionLeft: Story = {
|
|
98
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
99
|
+
args: {
|
|
100
|
+
value: '1000',
|
|
101
|
+
currencyText: '$',
|
|
102
|
+
currencyPosition: 'left',
|
|
103
|
+
allowDecimals: true,
|
|
104
|
+
thousandsSeparator: true,
|
|
105
|
+
isInvalid: false,
|
|
106
|
+
editable: true,
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const CurrencyPositionRight: Story = {
|
|
111
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
112
|
+
args: {
|
|
113
|
+
value: '1000',
|
|
114
|
+
currencyText: 'ETH',
|
|
115
|
+
currencyPosition: 'right',
|
|
116
|
+
allowDecimals: true,
|
|
117
|
+
thousandsSeparator: true,
|
|
118
|
+
isInvalid: false,
|
|
119
|
+
editable: true,
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export const IntegerOnly: Story = {
|
|
124
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
125
|
+
args: {
|
|
126
|
+
value: '1234',
|
|
127
|
+
currencyText: 'items',
|
|
128
|
+
currencyPosition: 'right',
|
|
129
|
+
allowDecimals: false,
|
|
130
|
+
thousandsSeparator: true,
|
|
131
|
+
isInvalid: false,
|
|
132
|
+
editable: true,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const WithThousandsSeparator: Story = {
|
|
137
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
138
|
+
args: {
|
|
139
|
+
value: '1000000',
|
|
140
|
+
currencyText: 'USD',
|
|
141
|
+
currencyPosition: 'left',
|
|
142
|
+
allowDecimals: true,
|
|
143
|
+
thousandsSeparator: true,
|
|
144
|
+
isInvalid: false,
|
|
145
|
+
editable: true,
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const WithoutThousandsSeparator: Story = {
|
|
150
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
151
|
+
args: {
|
|
152
|
+
value: '1000000',
|
|
153
|
+
currencyText: 'USD',
|
|
154
|
+
currencyPosition: 'left',
|
|
155
|
+
allowDecimals: true,
|
|
156
|
+
thousandsSeparator: false,
|
|
157
|
+
isInvalid: false,
|
|
158
|
+
editable: true,
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export const ErrorState: Story = {
|
|
163
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
164
|
+
args: {
|
|
165
|
+
value: '1234.56',
|
|
166
|
+
currencyText: 'USD',
|
|
167
|
+
currencyPosition: 'left',
|
|
168
|
+
allowDecimals: true,
|
|
169
|
+
thousandsSeparator: true,
|
|
170
|
+
isInvalid: true,
|
|
171
|
+
editable: true,
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export const DisabledAmountInput: Story = {
|
|
176
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
177
|
+
args: {
|
|
178
|
+
value: '1234.56',
|
|
179
|
+
currencyText: 'USD',
|
|
180
|
+
currencyPosition: 'left',
|
|
181
|
+
allowDecimals: true,
|
|
182
|
+
thousandsSeparator: true,
|
|
183
|
+
isInvalid: false,
|
|
184
|
+
editable: false,
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export const CustomLengthLimits: Story = {
|
|
189
|
+
render: (args) => <AmountInputStory {...args} />,
|
|
190
|
+
args: {
|
|
191
|
+
value: '123',
|
|
192
|
+
currencyText: '$',
|
|
193
|
+
currencyPosition: 'left',
|
|
194
|
+
allowDecimals: true,
|
|
195
|
+
thousandsSeparator: true,
|
|
196
|
+
maxIntegerLength: 6,
|
|
197
|
+
maxDecimalLength: 2,
|
|
198
|
+
isInvalid: false,
|
|
199
|
+
editable: true,
|
|
37
200
|
},
|
|
38
201
|
};
|
|
@@ -102,21 +102,30 @@ export const AmountInput = React.forwardRef<TextInput, AmountInputProps>(
|
|
|
102
102
|
|
|
103
103
|
useImperativeHandle(ref, () => inputRef.current as TextInput, []);
|
|
104
104
|
|
|
105
|
-
const animatedInputStyle = useAnimatedStyle(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
105
|
+
const animatedInputStyle = useAnimatedStyle(
|
|
106
|
+
() => ({
|
|
107
|
+
transform: [{ translateX: translateX.value }],
|
|
108
|
+
fontSize: animatedFontSize.value,
|
|
109
|
+
letterSpacing: 0,
|
|
110
|
+
}),
|
|
111
|
+
[translateX, animatedFontSize],
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
const animatedCurrencyStyle = useAnimatedStyle(
|
|
115
|
+
() => ({
|
|
116
|
+
fontSize: animatedFontSize.value,
|
|
117
|
+
letterSpacing: 0,
|
|
118
|
+
}),
|
|
119
|
+
[animatedFontSize],
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
const animatedCaretStyle = useAnimatedStyle(
|
|
123
|
+
() => ({
|
|
124
|
+
opacity: caretOpacity.value,
|
|
125
|
+
height: animatedFontSize.value,
|
|
126
|
+
}),
|
|
127
|
+
[caretOpacity, animatedFontSize],
|
|
128
|
+
);
|
|
120
129
|
|
|
121
130
|
useEffect(() => {
|
|
122
131
|
const newSize = getFontSize(inputValue);
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { describe, it, expect, jest } from '@jest/globals';
|
|
2
|
+
import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
|
|
2
3
|
import { fireEvent, render } from '@testing-library/react-native';
|
|
4
|
+
import React from 'react';
|
|
3
5
|
import { Button } from '../Button';
|
|
6
|
+
import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
|
|
4
7
|
import { Banner } from './Banner';
|
|
5
8
|
|
|
9
|
+
const TestWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (
|
|
10
|
+
<ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
|
|
11
|
+
{children}
|
|
12
|
+
</ThemeProvider>
|
|
13
|
+
);
|
|
14
|
+
|
|
6
15
|
describe('Banner Component', () => {
|
|
7
16
|
it('should render correctly with minimal props', () => {
|
|
8
17
|
const { getByText } = render(
|
|
9
|
-
<
|
|
18
|
+
<TestWrapper>
|
|
19
|
+
<Banner title='banner-title' description='banner-description' />
|
|
20
|
+
</TestWrapper>,
|
|
10
21
|
);
|
|
11
22
|
getByText('banner-title');
|
|
12
23
|
getByText('banner-description');
|
|
@@ -14,33 +25,51 @@ describe('Banner Component', () => {
|
|
|
14
25
|
|
|
15
26
|
it('should render with different appearances', () => {
|
|
16
27
|
const { getByTestId, rerender } = render(
|
|
17
|
-
<
|
|
28
|
+
<TestWrapper>
|
|
29
|
+
<Banner testID='banner-id' title='Info Banner' appearance='info' />
|
|
30
|
+
</TestWrapper>,
|
|
18
31
|
);
|
|
19
32
|
expect(getByTestId('banner-id').props.className).toContain('bg-surface');
|
|
20
33
|
|
|
21
34
|
rerender(
|
|
22
|
-
<
|
|
35
|
+
<TestWrapper>
|
|
36
|
+
<Banner
|
|
37
|
+
testID='banner-id'
|
|
38
|
+
title='Success Banner'
|
|
39
|
+
appearance='success'
|
|
40
|
+
/>
|
|
41
|
+
</TestWrapper>,
|
|
23
42
|
);
|
|
24
43
|
expect(getByTestId('banner-id').props.className).toContain('bg-success');
|
|
25
44
|
|
|
26
45
|
rerender(
|
|
27
|
-
<
|
|
46
|
+
<TestWrapper>
|
|
47
|
+
<Banner
|
|
48
|
+
testID='banner-id'
|
|
49
|
+
title='Warning Banner'
|
|
50
|
+
appearance='warning'
|
|
51
|
+
/>
|
|
52
|
+
</TestWrapper>,
|
|
28
53
|
);
|
|
29
54
|
expect(getByTestId('banner-id').props.className).toContain('bg-warning');
|
|
30
55
|
|
|
31
56
|
rerender(
|
|
32
|
-
<
|
|
57
|
+
<TestWrapper>
|
|
58
|
+
<Banner testID='banner-id' title='Error Banner' appearance='error' />
|
|
59
|
+
</TestWrapper>,
|
|
33
60
|
);
|
|
34
61
|
expect(getByTestId('banner-id').props.className).toContain('bg-error');
|
|
35
62
|
});
|
|
36
63
|
|
|
37
64
|
it('should render primary and secondary actions', () => {
|
|
38
65
|
const { getByText } = render(
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
66
|
+
<TestWrapper>
|
|
67
|
+
<Banner
|
|
68
|
+
title='Banner with Primary'
|
|
69
|
+
primaryAction={<Button>Primary</Button>}
|
|
70
|
+
secondaryAction={<Button>Secondary</Button>}
|
|
71
|
+
/>
|
|
72
|
+
</TestWrapper>,
|
|
44
73
|
);
|
|
45
74
|
|
|
46
75
|
getByText('Primary');
|
|
@@ -50,10 +79,12 @@ describe('Banner Component', () => {
|
|
|
50
79
|
it('should handle primaryAction button clicks', () => {
|
|
51
80
|
const onPressMock = jest.fn();
|
|
52
81
|
const { getByText } = render(
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
82
|
+
<TestWrapper>
|
|
83
|
+
<Banner
|
|
84
|
+
title='Banner with Primary'
|
|
85
|
+
primaryAction={<Button onPress={onPressMock}>Primary</Button>}
|
|
86
|
+
/>
|
|
87
|
+
</TestWrapper>,
|
|
57
88
|
);
|
|
58
89
|
|
|
59
90
|
expect(onPressMock).not.toHaveBeenCalled();
|
|
@@ -64,7 +95,9 @@ describe('Banner Component', () => {
|
|
|
64
95
|
it('should handle onClose button clicks', () => {
|
|
65
96
|
const onCloseMock = jest.fn();
|
|
66
97
|
const { getByTestId } = render(
|
|
67
|
-
<
|
|
98
|
+
<TestWrapper>
|
|
99
|
+
<Banner title='Banner with Primary' onClose={onCloseMock} />
|
|
100
|
+
</TestWrapper>,
|
|
68
101
|
);
|
|
69
102
|
|
|
70
103
|
expect(onCloseMock).not.toHaveBeenCalled();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { cn } from '@ledgerhq/lumen-utils-shared';
|
|
2
2
|
import React, {
|
|
3
3
|
useCallback,
|
|
4
|
-
useEffect,
|
|
5
4
|
useImperativeHandle,
|
|
6
5
|
useRef,
|
|
7
6
|
useState,
|
|
@@ -13,11 +12,6 @@ import {
|
|
|
13
12
|
type TextInputProps,
|
|
14
13
|
View,
|
|
15
14
|
} from 'react-native';
|
|
16
|
-
import Animated, {
|
|
17
|
-
useAnimatedStyle,
|
|
18
|
-
useSharedValue,
|
|
19
|
-
withTiming,
|
|
20
|
-
} from 'react-native-reanimated';
|
|
21
15
|
import { useCommonTranslation } from '../../../i18n';
|
|
22
16
|
import { DeleteCircleFill } from '../../Symbols/Icons/DeleteCircleFill';
|
|
23
17
|
import { InteractiveIcon } from '../InteractiveIcon';
|
|
@@ -71,8 +65,6 @@ const baseInputStyles = cn(
|
|
|
71
65
|
'relative flex-1 pt-16 pb-2 size-full text-base transition-colors bg-muted outline-none',
|
|
72
66
|
);
|
|
73
67
|
|
|
74
|
-
const AnimatedLabel = Animated.createAnimatedComponent(Animated.Text);
|
|
75
|
-
|
|
76
68
|
export const BaseInput = React.forwardRef<TextInput, BaseInputProps>(
|
|
77
69
|
(
|
|
78
70
|
{
|
|
@@ -106,30 +98,9 @@ export const BaseInput = React.forwardRef<TextInput, BaseInputProps>(
|
|
|
106
98
|
? !!props.value && props.value.length > 0
|
|
107
99
|
: uncontrolledValue.length > 0;
|
|
108
100
|
|
|
109
|
-
// floating label styling
|
|
110
|
-
const labelFontSize = useSharedValue(14);
|
|
111
|
-
const labelTop = useSharedValue(14);
|
|
112
101
|
const isFloatingLabel = isFocused || hasContent;
|
|
113
|
-
|
|
114
|
-
const animatedLabelStyle = useAnimatedStyle(
|
|
115
|
-
() => ({
|
|
116
|
-
fontSize: labelFontSize.value,
|
|
117
|
-
top: labelTop.value,
|
|
118
|
-
}),
|
|
119
|
-
[],
|
|
120
|
-
);
|
|
121
|
-
|
|
122
102
|
const showClearButton = hasContent && editable && !hideClearButton;
|
|
123
103
|
|
|
124
|
-
useEffect(() => {
|
|
125
|
-
labelFontSize.value = withTiming(isFloatingLabel ? 10 : 14, {
|
|
126
|
-
duration: 200,
|
|
127
|
-
});
|
|
128
|
-
labelTop.value = withTiming(isFloatingLabel ? 8 : 14, {
|
|
129
|
-
duration: 200,
|
|
130
|
-
});
|
|
131
|
-
}, [isFloatingLabel, labelFontSize, labelTop]);
|
|
132
|
-
|
|
133
104
|
const handleChangeText = useCallback(
|
|
134
105
|
(text: string) => {
|
|
135
106
|
if (!isControlled) {
|
|
@@ -185,24 +156,24 @@ export const BaseInput = React.forwardRef<TextInput, BaseInputProps>(
|
|
|
185
156
|
/>
|
|
186
157
|
|
|
187
158
|
{label && (
|
|
188
|
-
<
|
|
159
|
+
<Text
|
|
189
160
|
className={cn(
|
|
190
|
-
'absolute left-16 text-muted w-full',
|
|
161
|
+
'absolute left-16 text-muted w-full transition-all duration-200',
|
|
162
|
+
isFloatingLabel ? 'top-6 body-4' : 'top-12 body-2',
|
|
191
163
|
hasContent && showClearButton && 'w-[92%]',
|
|
192
164
|
!editable && 'text-disabled',
|
|
193
165
|
errorMessage && 'text-error',
|
|
194
166
|
labelClassName,
|
|
195
167
|
)}
|
|
196
|
-
style={animatedLabelStyle}
|
|
197
168
|
numberOfLines={1}
|
|
198
169
|
>
|
|
199
170
|
{label}
|
|
200
|
-
</
|
|
171
|
+
</Text>
|
|
201
172
|
)}
|
|
202
173
|
|
|
203
174
|
{showClearButton && (
|
|
204
175
|
<InteractiveIcon
|
|
205
|
-
iconType='
|
|
176
|
+
iconType='stroked'
|
|
206
177
|
onPress={handleClear}
|
|
207
178
|
accessibilityLabel={t('components.baseInput.clearInputAriaLabel')}
|
|
208
179
|
>
|
|
@@ -215,7 +186,7 @@ export const BaseInput = React.forwardRef<TextInput, BaseInputProps>(
|
|
|
215
186
|
|
|
216
187
|
{errorMessage && (
|
|
217
188
|
<View className='mt-8 flex-row items-center gap-2'>
|
|
218
|
-
<DeleteCircleFill size={16} className='shrink-0
|
|
189
|
+
<DeleteCircleFill size={16} className='text-error shrink-0' />
|
|
219
190
|
<Text className='text-error body-3'>{errorMessage}</Text>
|
|
220
191
|
</View>
|
|
221
192
|
)}
|
|
@@ -98,7 +98,7 @@ export const Base: Story = {
|
|
|
98
98
|
|
|
99
99
|
return (
|
|
100
100
|
<View className='h-320 w-full items-center justify-center pt-32'>
|
|
101
|
-
<Button size='
|
|
101
|
+
<Button size='sm' onPress={() => bottomSheetRef.current?.expand()}>
|
|
102
102
|
Toggle open
|
|
103
103
|
</Button>
|
|
104
104
|
<BottomSheet {...args} ref={bottomSheetRef}>
|
|
@@ -140,7 +140,7 @@ export const TitleExpanded: Story = {
|
|
|
140
140
|
|
|
141
141
|
return (
|
|
142
142
|
<View className='h-320 w-full items-center justify-center pt-32'>
|
|
143
|
-
<Button size='
|
|
143
|
+
<Button size='sm' onPress={() => bottomSheetRef.current?.expand()}>
|
|
144
144
|
Toggle open
|
|
145
145
|
</Button>
|
|
146
146
|
<BottomSheet {...args} ref={bottomSheetRef}>
|
|
@@ -178,7 +178,7 @@ export const DynamicSizingWithoutSnapPoints: Story = {
|
|
|
178
178
|
|
|
179
179
|
return (
|
|
180
180
|
<View className='h-320 w-full items-center justify-center'>
|
|
181
|
-
<Button size='
|
|
181
|
+
<Button size='sm' onPress={() => bottomSheetRef.current?.expand()}>
|
|
182
182
|
Toggle open
|
|
183
183
|
</Button>
|
|
184
184
|
<BottomSheet {...args} ref={bottomSheetRef}>
|
|
@@ -214,7 +214,7 @@ export const DynamicSizingWithSnapPoints: Story = {
|
|
|
214
214
|
return (
|
|
215
215
|
<View className='h-320 w-full items-center justify-center'>
|
|
216
216
|
<Button
|
|
217
|
-
size='
|
|
217
|
+
size='sm'
|
|
218
218
|
onPress={() => bottomSheetRef.current?.snapToIndex(1)}
|
|
219
219
|
>
|
|
220
220
|
Toggle open
|
|
@@ -253,7 +253,7 @@ export const PreventClose: Story = {
|
|
|
253
253
|
|
|
254
254
|
return (
|
|
255
255
|
<View className='h-320 w-full items-center justify-center pt-32'>
|
|
256
|
-
<Button size='
|
|
256
|
+
<Button size='sm' onPress={() => bottomSheetRef.current?.expand()}>
|
|
257
257
|
Toggle open
|
|
258
258
|
</Button>
|
|
259
259
|
<BottomSheet {...args} ref={bottomSheetRef}>
|
|
@@ -288,7 +288,7 @@ export const ScrollView: Story = {
|
|
|
288
288
|
|
|
289
289
|
return (
|
|
290
290
|
<View className='h-320 w-full items-center justify-center bg-base pt-32'>
|
|
291
|
-
<Button size='
|
|
291
|
+
<Button size='sm' onPress={() => bottomSheetRef.current?.expand()}>
|
|
292
292
|
Toggle open
|
|
293
293
|
</Button>
|
|
294
294
|
<BottomSheet {...args} ref={bottomSheetRef}>
|
|
@@ -336,7 +336,7 @@ export const VirtualList: Story = {
|
|
|
336
336
|
|
|
337
337
|
return (
|
|
338
338
|
<View className='h-320 w-full items-center justify-center pt-32'>
|
|
339
|
-
<Button size='
|
|
339
|
+
<Button size='sm' onPress={() => bottomSheetRef.current?.expand()}>
|
|
340
340
|
Toggle open
|
|
341
341
|
</Button>
|
|
342
342
|
<BottomSheet {...args} ref={bottomSheetRef}>
|
|
@@ -396,7 +396,7 @@ export const VirtualizedList: Story = {
|
|
|
396
396
|
|
|
397
397
|
return (
|
|
398
398
|
<View className='h-320 w-full items-center justify-center pt-32'>
|
|
399
|
-
<Button size='
|
|
399
|
+
<Button size='sm' onPress={() => bottomSheetRef.current?.expand()}>
|
|
400
400
|
Toggle open
|
|
401
401
|
</Button>
|
|
402
402
|
<BottomSheet {...args} ref={bottomSheetRef}>
|