@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
2
|
import React from 'react';
|
|
3
3
|
import { Plus, Settings } from '../../Symbols';
|
|
4
|
+
import { Box, Text } from '../Utility';
|
|
4
5
|
import { Button } from './Button';
|
|
5
6
|
|
|
6
7
|
const meta: Meta<typeof Button> = {
|
|
@@ -18,47 +19,17 @@ const meta: Meta<typeof Button> = {
|
|
|
18
19
|
argTypes: {
|
|
19
20
|
appearance: {
|
|
20
21
|
control: 'select',
|
|
21
|
-
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
size: {
|
|
32
|
-
control: 'select',
|
|
33
|
-
options: ['sm', 'md', 'lg'],
|
|
34
|
-
description: 'The size of the button',
|
|
35
|
-
},
|
|
36
|
-
disabled: {
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
description: 'Whether the button is disabled',
|
|
39
|
-
},
|
|
40
|
-
loading: {
|
|
41
|
-
control: 'boolean',
|
|
42
|
-
description: 'Whether the button is in loading state',
|
|
43
|
-
},
|
|
44
|
-
icon: {
|
|
45
|
-
control: 'select',
|
|
46
|
-
description: 'Optional icon component to display',
|
|
47
|
-
options: ['None', 'Plus', 'Settings'],
|
|
48
|
-
mapping: {
|
|
49
|
-
None: undefined,
|
|
50
|
-
Plus: Plus,
|
|
51
|
-
Settings: Settings,
|
|
22
|
+
icon: {
|
|
23
|
+
control: 'select',
|
|
24
|
+
description: 'Optional icon component to display',
|
|
25
|
+
options: ['None', 'Plus', 'Settings'],
|
|
26
|
+
mapping: {
|
|
27
|
+
None: undefined,
|
|
28
|
+
Plus: Plus,
|
|
29
|
+
Settings: Settings,
|
|
30
|
+
},
|
|
52
31
|
},
|
|
53
32
|
},
|
|
54
|
-
children: {
|
|
55
|
-
control: 'text',
|
|
56
|
-
description: 'The content to be displayed inside the button',
|
|
57
|
-
},
|
|
58
|
-
isFull: {
|
|
59
|
-
control: 'boolean',
|
|
60
|
-
description: 'Whether the button is full width',
|
|
61
|
-
},
|
|
62
33
|
},
|
|
63
34
|
};
|
|
64
35
|
|
|
@@ -77,6 +48,7 @@ export const Base: Story = {
|
|
|
77
48
|
appearance: 'base',
|
|
78
49
|
children: 'Base Button',
|
|
79
50
|
},
|
|
51
|
+
render: (args) => <Button {...args} />,
|
|
80
52
|
parameters: {
|
|
81
53
|
docs: {
|
|
82
54
|
source: {
|
|
@@ -146,31 +118,31 @@ export const AppearanceShowcase: Story = {
|
|
|
146
118
|
];
|
|
147
119
|
|
|
148
120
|
return (
|
|
149
|
-
<
|
|
121
|
+
<Box lx={{ flexDirection: 'row', gap: 's16', padding: 's8' }}>
|
|
150
122
|
{appearances.map(({ name, appearance }) => (
|
|
151
123
|
<Button key={appearance} appearance={appearance}>
|
|
152
124
|
{name}
|
|
153
125
|
</Button>
|
|
154
126
|
))}
|
|
155
|
-
</
|
|
127
|
+
</Box>
|
|
156
128
|
);
|
|
157
129
|
},
|
|
158
130
|
};
|
|
159
131
|
|
|
160
132
|
export const ContentTypesShowcase: Story = {
|
|
161
133
|
render: () => (
|
|
162
|
-
<
|
|
134
|
+
<Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's4' }}>
|
|
163
135
|
<Button appearance='base'>Text Only</Button>
|
|
164
136
|
<Button appearance='base' icon={Plus}>
|
|
165
137
|
With Icon
|
|
166
138
|
</Button>
|
|
167
|
-
</
|
|
139
|
+
</Box>
|
|
168
140
|
),
|
|
169
141
|
};
|
|
170
142
|
|
|
171
143
|
export const SizesShowcase: Story = {
|
|
172
144
|
render: () => (
|
|
173
|
-
<
|
|
145
|
+
<Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's4' }}>
|
|
174
146
|
<Button appearance='base' size='sm'>
|
|
175
147
|
Small
|
|
176
148
|
</Button>
|
|
@@ -180,13 +152,13 @@ export const SizesShowcase: Story = {
|
|
|
180
152
|
<Button appearance='base' size='lg' icon={Settings}>
|
|
181
153
|
Large
|
|
182
154
|
</Button>
|
|
183
|
-
</
|
|
155
|
+
</Box>
|
|
184
156
|
),
|
|
185
157
|
};
|
|
186
158
|
|
|
187
159
|
export const StatesShowcase: Story = {
|
|
188
160
|
render: () => (
|
|
189
|
-
<
|
|
161
|
+
<Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's4' }}>
|
|
190
162
|
<Button appearance='base'>Default</Button>
|
|
191
163
|
<Button appearance='base' disabled>
|
|
192
164
|
Disabled
|
|
@@ -194,35 +166,42 @@ export const StatesShowcase: Story = {
|
|
|
194
166
|
<Button appearance='base' loading>
|
|
195
167
|
Loading
|
|
196
168
|
</Button>
|
|
197
|
-
</
|
|
169
|
+
</Box>
|
|
198
170
|
),
|
|
199
171
|
};
|
|
200
172
|
|
|
201
173
|
export const ResponsiveLayout: Story = {
|
|
202
174
|
render: () => (
|
|
203
|
-
<
|
|
175
|
+
<Box
|
|
176
|
+
lx={{
|
|
177
|
+
flexDirection: 'column',
|
|
178
|
+
gap: 's8',
|
|
179
|
+
padding: 's8',
|
|
180
|
+
alignItems: 'flex-start',
|
|
181
|
+
}}
|
|
182
|
+
>
|
|
204
183
|
<Button appearance='base'>Short</Button>
|
|
205
184
|
<Button appearance='base'>Medium length button</Button>
|
|
206
185
|
<Button appearance='base' icon={Plus}>
|
|
207
186
|
This is a longer button text to show dynamic width
|
|
208
187
|
</Button>
|
|
209
|
-
</
|
|
188
|
+
</Box>
|
|
210
189
|
),
|
|
211
190
|
};
|
|
212
191
|
|
|
213
|
-
export const
|
|
192
|
+
export const LabelTruncate: Story = {
|
|
214
193
|
render: () => (
|
|
215
|
-
|
|
216
|
-
<
|
|
194
|
+
<Box>
|
|
195
|
+
<Text typography='body4SemiBold' lx={{ color: 'muted' }}>
|
|
217
196
|
This container has a fixed width.
|
|
218
|
-
</
|
|
219
|
-
<
|
|
197
|
+
</Text>
|
|
198
|
+
<Box lx={{ width: 's400', padding: 's16' }}>
|
|
220
199
|
<Button icon={Plus}>
|
|
221
200
|
This Base button has a fixed width container that should fit the
|
|
222
201
|
content width.
|
|
223
202
|
</Button>
|
|
224
|
-
</
|
|
225
|
-
|
|
203
|
+
</Box>
|
|
204
|
+
</Box>
|
|
226
205
|
),
|
|
227
206
|
};
|
|
228
207
|
|
|
@@ -244,7 +223,7 @@ export const InteractiveLoadingStates: Story = {
|
|
|
244
223
|
};
|
|
245
224
|
|
|
246
225
|
return (
|
|
247
|
-
<
|
|
226
|
+
<Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's4' }}>
|
|
248
227
|
<Button
|
|
249
228
|
appearance='red'
|
|
250
229
|
loading={states.text === 'loading'}
|
|
@@ -261,7 +240,7 @@ export const InteractiveLoadingStates: Story = {
|
|
|
261
240
|
>
|
|
262
241
|
{states.withIcon === 'red' ? 'Settings Error!' : 'With Icon'}
|
|
263
242
|
</Button>
|
|
264
|
-
</
|
|
243
|
+
</Box>
|
|
265
244
|
);
|
|
266
245
|
},
|
|
267
246
|
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Pressable } from '
|
|
2
|
+
import { Pressable } from '../Utility';
|
|
3
3
|
import { BaseButton } from './BaseButton';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export type ButtonProps = {
|
|
7
|
-
/**
|
|
8
|
-
* The content to display inside the button.
|
|
9
|
-
*/
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
} & BaseButtonProps;
|
|
4
|
+
import { ButtonProps } from './types';
|
|
12
5
|
|
|
13
6
|
/**
|
|
14
7
|
* A customizable button component that supports various appearances, sizes, full-width mode, loading states, and optional icons.
|
|
@@ -26,8 +19,8 @@ export type ButtonProps = {
|
|
|
26
19
|
* Click Me
|
|
27
20
|
* </Button>
|
|
28
21
|
*
|
|
29
|
-
* // Full-width button with
|
|
30
|
-
* <Button appearance="accent" isFull={true}
|
|
22
|
+
* // Full-width button with lx props
|
|
23
|
+
* <Button appearance="accent" isFull={true} lx={{ marginTop: 's16' }}>
|
|
31
24
|
* Submit
|
|
32
25
|
* </Button>
|
|
33
26
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './Button';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { StyledPressableProps } from '../../../styles';
|
|
3
4
|
import { IconSize } from '../Icon';
|
|
4
5
|
|
|
5
6
|
export type BaseButtonProps = {
|
|
@@ -15,6 +16,7 @@ export type BaseButtonProps = {
|
|
|
15
16
|
| 'red';
|
|
16
17
|
/**
|
|
17
18
|
* The size variant of the button.
|
|
19
|
+
* @default md
|
|
18
20
|
*/
|
|
19
21
|
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
20
22
|
/**
|
|
@@ -28,17 +30,21 @@ export type BaseButtonProps = {
|
|
|
28
30
|
/**
|
|
29
31
|
* An optional icon component to render inside the button.
|
|
30
32
|
*/
|
|
31
|
-
icon?:
|
|
33
|
+
icon?: ComponentType<{ size?: IconSize; style?: StyleProp<ViewStyle> }>;
|
|
32
34
|
/**
|
|
33
35
|
* Whether the button is disabled.
|
|
34
36
|
*/
|
|
35
37
|
disabled?: boolean;
|
|
36
38
|
/**
|
|
37
|
-
*
|
|
39
|
+
* The content to display inside the button.
|
|
38
40
|
*/
|
|
39
|
-
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
} & Omit<StyledPressableProps, 'children'>;
|
|
43
|
+
|
|
44
|
+
export type ButtonProps = {
|
|
40
45
|
/**
|
|
41
|
-
* The
|
|
46
|
+
* The size variant of the button.
|
|
47
|
+
* @default md
|
|
42
48
|
*/
|
|
43
|
-
|
|
44
|
-
} & Omit<
|
|
49
|
+
size?: 'sm' | 'md' | 'lg';
|
|
50
|
+
} & Omit<BaseButtonProps, 'size'>;
|
|
@@ -4,6 +4,7 @@ import { CardButton } from './CardButton';
|
|
|
4
4
|
import { CustomTabs, Tab } from '../../../../.storybook/components';
|
|
5
5
|
import { DoVsDontRow, DoBlockItem, DontBlockItem } from '../../../../.storybook/components/DoVsDont';
|
|
6
6
|
import CommonRulesDoAndDont from '../../../../.storybook/docs/CommonRulesDoAndDont.mdx';
|
|
7
|
+
import { Box } from '../Utility';
|
|
7
8
|
|
|
8
9
|
<Meta title='Action/CardButton' of={CardButtonStories} />
|
|
9
10
|
|
|
@@ -175,7 +176,7 @@ CardButtons automatically flow to fit their parent container width. No additiona
|
|
|
175
176
|
To control card button width, use container elements:
|
|
176
177
|
|
|
177
178
|
```tsx
|
|
178
|
-
import {
|
|
179
|
+
import { Box } from '@ledgerhq/lumen-ui-rnative';
|
|
179
180
|
|
|
180
181
|
{
|
|
181
182
|
/* Full container width */
|
|
@@ -187,26 +188,15 @@ import { View } from 'react-native';
|
|
|
187
188
|
/>;
|
|
188
189
|
|
|
189
190
|
{
|
|
190
|
-
/* Constrained width */
|
|
191
|
+
/* Constrained width using Box with lx prop */
|
|
191
192
|
}
|
|
192
|
-
<
|
|
193
|
+
<Box lx={{ maxWidth: 's320' }}>
|
|
193
194
|
<CardButton
|
|
194
195
|
title='Constrained'
|
|
195
196
|
description='This button is limited by its container'
|
|
196
197
|
onPress={() => console.log('Constrained pressed')}
|
|
197
198
|
/>
|
|
198
|
-
</
|
|
199
|
-
|
|
200
|
-
{
|
|
201
|
-
/* Using NativeWind classes */
|
|
202
|
-
}
|
|
203
|
-
<View className='max-w-md'>
|
|
204
|
-
<CardButton
|
|
205
|
-
title='Responsive'
|
|
206
|
-
description='Width adapts based on container'
|
|
207
|
-
onPress={() => console.log('Responsive pressed')}
|
|
208
|
-
/>
|
|
209
|
-
</View>;
|
|
199
|
+
</Box>;
|
|
210
200
|
```
|
|
211
201
|
|
|
212
202
|
### Outline Appearance
|
|
@@ -237,13 +227,13 @@ Disable the card button to prevent user interaction:
|
|
|
237
227
|
|
|
238
228
|
### Custom Styling
|
|
239
229
|
|
|
240
|
-
While the component comes with predefined styles, you can extend them using
|
|
230
|
+
While the component comes with predefined styles, you can extend them using the `lx` prop for layout purposes:
|
|
241
231
|
|
|
242
232
|
```tsx
|
|
243
233
|
<CardButton
|
|
244
234
|
title='Mobile Only'
|
|
245
235
|
description='This option is only available on mobile'
|
|
246
|
-
|
|
236
|
+
lx={{ marginTop: 's4', marginHorizontal: 's2' }}
|
|
247
237
|
appearance='base'
|
|
248
238
|
onPress={() => console.log('Mobile only pressed')}
|
|
249
239
|
/>
|
|
@@ -253,7 +243,7 @@ While the component comes with predefined styles, you can extend them using Nati
|
|
|
253
243
|
|
|
254
244
|
The following guidelines ensure consistent usage of the CardButton component and maintain design system principles.
|
|
255
245
|
|
|
256
|
-
<
|
|
246
|
+
<Box lx={{ flexDirection: 'column', gap: 's24' }}>
|
|
257
247
|
<DoVsDontRow>
|
|
258
248
|
<DoBlockItem
|
|
259
249
|
title='Use container elements to control width'
|
|
@@ -262,31 +252,31 @@ The following guidelines ensure consistent usage of the CardButton component and
|
|
|
262
252
|
|
|
263
253
|
{/* prettier-ignore */}
|
|
264
254
|
```tsx
|
|
265
|
-
<
|
|
255
|
+
<Box lx={{ maxWidth: 's400' }}>
|
|
266
256
|
<CardButton
|
|
267
257
|
title='Continue'
|
|
268
258
|
description='Proceed to next step'
|
|
269
259
|
onPress={() => console.log('Continue')}
|
|
270
260
|
/>
|
|
271
|
-
</
|
|
261
|
+
</Box>
|
|
272
262
|
```
|
|
273
263
|
|
|
274
264
|
</DoBlockItem>
|
|
275
265
|
<DontBlockItem
|
|
276
266
|
title="Don't modify width directly"
|
|
277
|
-
description='Avoid using
|
|
267
|
+
description='Avoid using lx to set width on CardButton itself'
|
|
278
268
|
>
|
|
279
269
|
|
|
280
270
|
{/* prettier-ignore */}
|
|
281
271
|
```tsx
|
|
282
|
-
<
|
|
272
|
+
<Box lx={{ maxWidth: 's400' }}>
|
|
283
273
|
<CardButton
|
|
284
274
|
title='Continue'
|
|
285
275
|
description='Proceed to next step'
|
|
286
|
-
|
|
276
|
+
lx={{ width: 's320' }}
|
|
287
277
|
onPress={() => console.log('Continue')}
|
|
288
278
|
/>
|
|
289
|
-
</
|
|
279
|
+
</Box>
|
|
290
280
|
```
|
|
291
281
|
|
|
292
282
|
</DontBlockItem>
|
|
@@ -294,7 +284,7 @@ The following guidelines ensure consistent usage of the CardButton component and
|
|
|
294
284
|
</DoVsDontRow>
|
|
295
285
|
|
|
296
286
|
<CommonRulesDoAndDont />
|
|
297
|
-
</
|
|
287
|
+
</Box>
|
|
298
288
|
|
|
299
289
|
</Tab>
|
|
300
290
|
</CustomTabs>
|
|
@@ -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, Plus, Coins, CreditCard, Bank } from '../../Symbols';
|
|
3
|
+
import { Box, Text } from '../Utility';
|
|
4
4
|
import { CardButton } from './CardButton';
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof CardButton> = {
|
|
@@ -59,6 +59,7 @@ export const Base: Story = {
|
|
|
59
59
|
appearance: 'base',
|
|
60
60
|
title: 'Basic Card Button',
|
|
61
61
|
},
|
|
62
|
+
render: (args) => <CardButton {...args} />,
|
|
62
63
|
parameters: {
|
|
63
64
|
docs: {
|
|
64
65
|
source: {
|
|
@@ -66,7 +67,6 @@ export const Base: Story = {
|
|
|
66
67
|
<CardButton
|
|
67
68
|
appearance="base"
|
|
68
69
|
title="Basic Card Button"
|
|
69
|
-
className="max-w-md"
|
|
70
70
|
/>
|
|
71
71
|
`,
|
|
72
72
|
},
|
|
@@ -79,7 +79,6 @@ export const WithIcon: Story = {
|
|
|
79
79
|
appearance: 'base',
|
|
80
80
|
title: 'Settings',
|
|
81
81
|
icon: Settings,
|
|
82
|
-
className: 'max-w-md',
|
|
83
82
|
},
|
|
84
83
|
parameters: {
|
|
85
84
|
docs: {
|
|
@@ -89,7 +88,6 @@ export const WithIcon: Story = {
|
|
|
89
88
|
appearance="base"
|
|
90
89
|
title="Settings"
|
|
91
90
|
icon={Settings}
|
|
92
|
-
className="max-w-md"
|
|
93
91
|
/>
|
|
94
92
|
`,
|
|
95
93
|
},
|
|
@@ -102,7 +100,6 @@ export const WithDescription: Story = {
|
|
|
102
100
|
appearance: 'base',
|
|
103
101
|
title: 'Payment Method',
|
|
104
102
|
description: 'Add or manage your payment options',
|
|
105
|
-
className: 'max-w-md',
|
|
106
103
|
},
|
|
107
104
|
parameters: {
|
|
108
105
|
docs: {
|
|
@@ -112,7 +109,6 @@ export const WithDescription: Story = {
|
|
|
112
109
|
appearance="base"
|
|
113
110
|
title="Payment Method"
|
|
114
111
|
description="Add or manage your payment options"
|
|
115
|
-
className="max-w-md"
|
|
116
112
|
/>
|
|
117
113
|
`,
|
|
118
114
|
},
|
|
@@ -125,7 +121,6 @@ export const WithoutChevron: Story = {
|
|
|
125
121
|
appearance: 'base',
|
|
126
122
|
title: 'Navigate Forward',
|
|
127
123
|
hideChevron: true,
|
|
128
|
-
className: 'max-w-md',
|
|
129
124
|
},
|
|
130
125
|
parameters: {
|
|
131
126
|
docs: {
|
|
@@ -135,7 +130,6 @@ export const WithoutChevron: Story = {
|
|
|
135
130
|
appearance="base"
|
|
136
131
|
title="Navigate Forward"
|
|
137
132
|
hideChevron
|
|
138
|
-
className="max-w-md"
|
|
139
133
|
/>
|
|
140
134
|
`,
|
|
141
135
|
},
|
|
@@ -149,7 +143,6 @@ export const FullFeatures: Story = {
|
|
|
149
143
|
title: 'Account Settings',
|
|
150
144
|
description: 'Manage your account preferences and security',
|
|
151
145
|
icon: Settings,
|
|
152
|
-
className: 'max-w-md',
|
|
153
146
|
},
|
|
154
147
|
parameters: {
|
|
155
148
|
docs: {
|
|
@@ -160,7 +153,6 @@ export const FullFeatures: Story = {
|
|
|
160
153
|
title="Account Settings"
|
|
161
154
|
description="Manage your account preferences and security"
|
|
162
155
|
icon={Settings}
|
|
163
|
-
className="max-w-md"
|
|
164
156
|
/>
|
|
165
157
|
`,
|
|
166
158
|
},
|
|
@@ -170,8 +162,11 @@ export const FullFeatures: Story = {
|
|
|
170
162
|
|
|
171
163
|
export const NaturalWidth: Story = {
|
|
172
164
|
render: () => (
|
|
173
|
-
<
|
|
174
|
-
<Text
|
|
165
|
+
<Box lx={{ backgroundColor: 'mutedPressed', padding: 's16' }}>
|
|
166
|
+
<Text
|
|
167
|
+
typography='body4SemiBold'
|
|
168
|
+
lx={{ color: 'muted', marginBottom: 's16' }}
|
|
169
|
+
>
|
|
175
170
|
CardButton naturally flows to fill parent container width
|
|
176
171
|
</Text>
|
|
177
172
|
<CardButton
|
|
@@ -180,7 +175,7 @@ export const NaturalWidth: Story = {
|
|
|
180
175
|
description='This card button demonstrates how it flows naturally to fill the full width of its parent container without any max-width constraints'
|
|
181
176
|
icon={CreditCard}
|
|
182
177
|
/>
|
|
183
|
-
</
|
|
178
|
+
</Box>
|
|
184
179
|
),
|
|
185
180
|
parameters: {
|
|
186
181
|
docs: {
|
|
@@ -209,7 +204,14 @@ export const AppearanceShowcase: Story = {
|
|
|
209
204
|
];
|
|
210
205
|
|
|
211
206
|
return (
|
|
212
|
-
<
|
|
207
|
+
<Box
|
|
208
|
+
lx={{
|
|
209
|
+
flexDirection: 'column',
|
|
210
|
+
gap: 's16',
|
|
211
|
+
padding: 's8',
|
|
212
|
+
maxWidth: 's400',
|
|
213
|
+
}}
|
|
214
|
+
>
|
|
213
215
|
{appearances.map(({ name, appearance }) => (
|
|
214
216
|
<CardButton
|
|
215
217
|
key={appearance}
|
|
@@ -219,14 +221,21 @@ export const AppearanceShowcase: Story = {
|
|
|
219
221
|
icon={Coins}
|
|
220
222
|
/>
|
|
221
223
|
))}
|
|
222
|
-
</
|
|
224
|
+
</Box>
|
|
223
225
|
);
|
|
224
226
|
},
|
|
225
227
|
};
|
|
226
228
|
|
|
227
229
|
export const ContentVariations: Story = {
|
|
228
230
|
render: () => (
|
|
229
|
-
<
|
|
231
|
+
<Box
|
|
232
|
+
lx={{
|
|
233
|
+
flexDirection: 'column',
|
|
234
|
+
gap: 's16',
|
|
235
|
+
padding: 's8',
|
|
236
|
+
maxWidth: 's400',
|
|
237
|
+
}}
|
|
238
|
+
>
|
|
230
239
|
<CardButton
|
|
231
240
|
appearance='base'
|
|
232
241
|
title='With Description'
|
|
@@ -253,13 +262,20 @@ export const ContentVariations: Story = {
|
|
|
253
262
|
/>
|
|
254
263
|
<CardButton appearance='base' title='With Icon' icon={Plus} hideChevron />
|
|
255
264
|
<CardButton appearance='base' title='With Chevron' />
|
|
256
|
-
</
|
|
265
|
+
</Box>
|
|
257
266
|
),
|
|
258
267
|
};
|
|
259
268
|
|
|
260
269
|
export const StatesShowcase: Story = {
|
|
261
270
|
render: () => (
|
|
262
|
-
<
|
|
271
|
+
<Box
|
|
272
|
+
lx={{
|
|
273
|
+
flexDirection: 'column',
|
|
274
|
+
gap: 's16',
|
|
275
|
+
padding: 's8',
|
|
276
|
+
maxWidth: 's400',
|
|
277
|
+
}}
|
|
278
|
+
>
|
|
263
279
|
<CardButton
|
|
264
280
|
appearance='base'
|
|
265
281
|
title='Base Default'
|
|
@@ -286,14 +302,24 @@ export const StatesShowcase: Story = {
|
|
|
286
302
|
icon={Bank}
|
|
287
303
|
disabled
|
|
288
304
|
/>
|
|
289
|
-
</
|
|
305
|
+
</Box>
|
|
290
306
|
),
|
|
291
307
|
};
|
|
292
308
|
|
|
293
309
|
export const ResponsiveLayout: Story = {
|
|
294
310
|
render: () => (
|
|
295
|
-
<
|
|
296
|
-
|
|
311
|
+
<Box
|
|
312
|
+
lx={{
|
|
313
|
+
width: 's320',
|
|
314
|
+
flexDirection: 'column',
|
|
315
|
+
gap: 's16',
|
|
316
|
+
backgroundColor: 'mutedPressed',
|
|
317
|
+
padding: 's16',
|
|
318
|
+
}}
|
|
319
|
+
>
|
|
320
|
+
<Text typography='body4SemiBold' lx={{ color: 'muted' }}>
|
|
321
|
+
Container: 320px wide
|
|
322
|
+
</Text>
|
|
297
323
|
<CardButton
|
|
298
324
|
appearance='base'
|
|
299
325
|
title='Short Title'
|
|
@@ -312,6 +338,6 @@ export const ResponsiveLayout: Story = {
|
|
|
312
338
|
description='This is a longer description that demonstrates how the card handles longer content within its constraints'
|
|
313
339
|
icon={Settings}
|
|
314
340
|
/>
|
|
315
|
-
</
|
|
341
|
+
</Box>
|
|
316
342
|
),
|
|
317
343
|
};
|