@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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { describe, expect, it, jest } from '@jest/globals';
|
|
2
|
+
import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
|
|
3
|
+
import { fireEvent, render, screen } from '@testing-library/react-native';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { Settings, Plus } from '../../Symbols';
|
|
7
|
+
import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
|
|
8
|
+
import { IconButton } from './IconButton';
|
|
9
|
+
|
|
10
|
+
const renderWithProvider = (component: React.ReactElement) => {
|
|
11
|
+
return render(
|
|
12
|
+
<ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
|
|
13
|
+
{component}
|
|
14
|
+
</ThemeProvider>,
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
describe('IconButton Component', () => {
|
|
19
|
+
describe('Rendering', () => {
|
|
20
|
+
it('should render with required props', () => {
|
|
21
|
+
renderWithProvider(
|
|
22
|
+
<IconButton
|
|
23
|
+
testID='icon-button'
|
|
24
|
+
accessibilityLabel='Settings'
|
|
25
|
+
icon={Settings}
|
|
26
|
+
/>,
|
|
27
|
+
);
|
|
28
|
+
expect(screen.getByTestId('icon-button')).toBeTruthy();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should have correct accessibility role', () => {
|
|
32
|
+
renderWithProvider(
|
|
33
|
+
<IconButton
|
|
34
|
+
testID='icon-button'
|
|
35
|
+
accessibilityLabel='Settings'
|
|
36
|
+
icon={Settings}
|
|
37
|
+
/>,
|
|
38
|
+
);
|
|
39
|
+
const button = screen.getByTestId('icon-button');
|
|
40
|
+
expect(button.props.accessibilityRole).toBe('button');
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
describe('Appearances', () => {
|
|
45
|
+
it.each([
|
|
46
|
+
'base',
|
|
47
|
+
'accent',
|
|
48
|
+
'gray',
|
|
49
|
+
'transparent',
|
|
50
|
+
'no-background',
|
|
51
|
+
'red',
|
|
52
|
+
] as const)('should render with %s appearance', (appearance) => {
|
|
53
|
+
renderWithProvider(
|
|
54
|
+
<IconButton
|
|
55
|
+
testID='icon-button'
|
|
56
|
+
accessibilityLabel='Add'
|
|
57
|
+
icon={Plus}
|
|
58
|
+
appearance={appearance}
|
|
59
|
+
/>,
|
|
60
|
+
);
|
|
61
|
+
expect(screen.getByTestId('icon-button')).toBeTruthy();
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe('Sizes', () => {
|
|
66
|
+
it.each(['xs', 'sm', 'md', 'lg'] as const)(
|
|
67
|
+
'should render with %s size',
|
|
68
|
+
(size) => {
|
|
69
|
+
renderWithProvider(
|
|
70
|
+
<IconButton
|
|
71
|
+
testID='icon-button'
|
|
72
|
+
accessibilityLabel='Settings'
|
|
73
|
+
icon={Settings}
|
|
74
|
+
size={size}
|
|
75
|
+
/>,
|
|
76
|
+
);
|
|
77
|
+
expect(screen.getByTestId('icon-button')).toBeTruthy();
|
|
78
|
+
},
|
|
79
|
+
);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe('States', () => {
|
|
83
|
+
it('should be disabled when disabled prop is true', () => {
|
|
84
|
+
renderWithProvider(
|
|
85
|
+
<IconButton
|
|
86
|
+
testID='icon-button'
|
|
87
|
+
accessibilityLabel='Settings'
|
|
88
|
+
icon={Settings}
|
|
89
|
+
disabled
|
|
90
|
+
/>,
|
|
91
|
+
);
|
|
92
|
+
const button = screen.getByTestId('icon-button');
|
|
93
|
+
expect(button.props.accessibilityState.disabled).toBe(true);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it('should render loading state', () => {
|
|
97
|
+
renderWithProvider(
|
|
98
|
+
<IconButton
|
|
99
|
+
testID='icon-button'
|
|
100
|
+
accessibilityLabel='Settings'
|
|
101
|
+
icon={Settings}
|
|
102
|
+
loading
|
|
103
|
+
/>,
|
|
104
|
+
);
|
|
105
|
+
expect(screen.getByTestId('icon-button')).toBeTruthy();
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
describe('Interactions', () => {
|
|
110
|
+
it('should call onPress when pressed', () => {
|
|
111
|
+
const handlePress = jest.fn();
|
|
112
|
+
renderWithProvider(
|
|
113
|
+
<IconButton
|
|
114
|
+
testID='icon-button'
|
|
115
|
+
accessibilityLabel='Settings'
|
|
116
|
+
icon={Settings}
|
|
117
|
+
onPress={handlePress}
|
|
118
|
+
/>,
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
fireEvent.press(screen.getByTestId('icon-button'));
|
|
122
|
+
expect(handlePress).toHaveBeenCalledTimes(1);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('should not call onPress when disabled', () => {
|
|
126
|
+
const handlePress = jest.fn();
|
|
127
|
+
renderWithProvider(
|
|
128
|
+
<IconButton
|
|
129
|
+
testID='icon-button'
|
|
130
|
+
accessibilityLabel='Settings'
|
|
131
|
+
icon={Settings}
|
|
132
|
+
onPress={handlePress}
|
|
133
|
+
disabled
|
|
134
|
+
/>,
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
fireEvent.press(screen.getByTestId('icon-button'));
|
|
138
|
+
expect(handlePress).not.toHaveBeenCalled();
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
});
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { BaseButtonProps } from '../Button';
|
|
4
3
|
import { BaseButton } from '../Button/BaseButton';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Accessible label for the IconButton
|
|
9
|
-
*/
|
|
10
|
-
accessibilityLabel: string;
|
|
11
|
-
/**
|
|
12
|
-
* The icon to display in the button
|
|
13
|
-
*/
|
|
14
|
-
icon: NonNullable<BaseButtonProps['icon']>;
|
|
15
|
-
} & Omit<BaseButtonProps, 'isFull'>;
|
|
4
|
+
import { Pressable } from '../Utility';
|
|
5
|
+
import { IconButtonProps } from './types';
|
|
16
6
|
|
|
17
7
|
export const IconButton = React.forwardRef<
|
|
18
|
-
React.ElementRef<typeof
|
|
8
|
+
React.ElementRef<typeof Pressable>,
|
|
19
9
|
IconButtonProps
|
|
20
10
|
>((props, ref) => {
|
|
21
11
|
return <BaseButton ref={ref} {...props} />;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseButtonProps } from '../Button';
|
|
2
|
+
|
|
3
|
+
export type IconButtonProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Accessible label for the IconButton
|
|
6
|
+
*/
|
|
7
|
+
accessibilityLabel: string;
|
|
8
|
+
/**
|
|
9
|
+
* The icon to display in the button
|
|
10
|
+
*/
|
|
11
|
+
icon: NonNullable<BaseButtonProps['icon']>;
|
|
12
|
+
} & Omit<BaseButtonProps, 'isFull'>;
|
|
@@ -29,8 +29,8 @@ InteractiveIcons are specialized interactive elements designed exclusively for i
|
|
|
29
29
|
|
|
30
30
|
### Overview
|
|
31
31
|
|
|
32
|
-
<Canvas of={InteractiveIconStories.
|
|
33
|
-
<Controls of={InteractiveIconStories.
|
|
32
|
+
<Canvas of={InteractiveIconStories.Base} />
|
|
33
|
+
<Controls of={InteractiveIconStories.Base} />
|
|
34
34
|
|
|
35
35
|
### Icon Types
|
|
36
36
|
|
|
@@ -95,17 +95,16 @@ Install and set up the library with our [Setup Guide →](?path=/docs/getting-st
|
|
|
95
95
|
### Basic usage
|
|
96
96
|
|
|
97
97
|
```tsx
|
|
98
|
-
import { InteractiveIcon } from '@ledgerhq/lumen-ui-rnative';
|
|
98
|
+
import { InteractiveIcon, Box } from '@ledgerhq/lumen-ui-rnative';
|
|
99
99
|
import { Settings, DeleteCircleFill } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
100
|
-
import { View } from 'react-native';
|
|
101
100
|
|
|
102
101
|
function MyComponent() {
|
|
103
102
|
return (
|
|
104
|
-
<
|
|
103
|
+
<Box lx={{ gap: 's8' }}>
|
|
105
104
|
{/* Stroked interactive icon */}
|
|
106
105
|
<InteractiveIcon
|
|
107
106
|
iconType='stroked'
|
|
108
|
-
|
|
107
|
+
accessibilityLabel='Open settings'
|
|
109
108
|
onPress={handleSettings}
|
|
110
109
|
>
|
|
111
110
|
<Settings size={20} />
|
|
@@ -114,12 +113,12 @@ function MyComponent() {
|
|
|
114
113
|
{/* Filled interactive icon */}
|
|
115
114
|
<InteractiveIcon
|
|
116
115
|
iconType='filled'
|
|
117
|
-
|
|
116
|
+
accessibilityLabel='Delete item'
|
|
118
117
|
onPress={handleDelete}
|
|
119
118
|
>
|
|
120
119
|
<DeleteCircleFill size={20} />
|
|
121
120
|
</InteractiveIcon>
|
|
122
|
-
</
|
|
121
|
+
</Box>
|
|
123
122
|
);
|
|
124
123
|
}
|
|
125
124
|
```
|
|
@@ -137,7 +136,7 @@ function LikeButton({ isSelected, onToggle }) {
|
|
|
137
136
|
return (
|
|
138
137
|
<InteractiveIcon
|
|
139
138
|
iconType={isSelected ? 'filled' : 'stroked'}
|
|
140
|
-
|
|
139
|
+
accessibilityLabel={isSelected ? 'Deselect' : 'Select'}
|
|
141
140
|
onPress={onToggle}
|
|
142
141
|
>
|
|
143
142
|
{isSelected ? (
|
|
@@ -153,33 +152,32 @@ function LikeButton({ isSelected, onToggle }) {
|
|
|
153
152
|
### Different Icon Sizes
|
|
154
153
|
|
|
155
154
|
```tsx
|
|
156
|
-
import { InteractiveIcon } from '@ledgerhq/lumen-ui-rnative';
|
|
155
|
+
import { InteractiveIcon, Box } from '@ledgerhq/lumen-ui-rnative';
|
|
157
156
|
import { Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
158
|
-
import { View } from 'react-native';
|
|
159
157
|
|
|
160
158
|
function SizeExamples() {
|
|
161
159
|
return (
|
|
162
|
-
<
|
|
160
|
+
<Box lx={{ alignItems: 'center', gap: 's4' }}>
|
|
163
161
|
{/* Compact size for dense interfaces */}
|
|
164
|
-
<InteractiveIcon iconType='stroked'
|
|
162
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='Settings'>
|
|
165
163
|
<Settings size={16} />
|
|
166
164
|
</InteractiveIcon>
|
|
167
165
|
|
|
168
166
|
{/* Standard size */}
|
|
169
|
-
<InteractiveIcon iconType='stroked'
|
|
167
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='Settings'>
|
|
170
168
|
<Settings size={20} />
|
|
171
169
|
</InteractiveIcon>
|
|
172
170
|
|
|
173
171
|
{/* Prominent size */}
|
|
174
|
-
<InteractiveIcon iconType='stroked'
|
|
172
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='Settings'>
|
|
175
173
|
<Settings size={24} />
|
|
176
174
|
</InteractiveIcon>
|
|
177
175
|
|
|
178
176
|
{/* Large touch target for mobile */}
|
|
179
|
-
<InteractiveIcon iconType='stroked'
|
|
177
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='Settings'>
|
|
180
178
|
<Settings size={40} />
|
|
181
179
|
</InteractiveIcon>
|
|
182
|
-
</
|
|
180
|
+
</Box>
|
|
183
181
|
);
|
|
184
182
|
}
|
|
185
183
|
```
|
|
@@ -200,12 +198,12 @@ The following guidelines are based on our design system principles and accessibi
|
|
|
200
198
|
import { DeleteCircleFill, Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
201
199
|
|
|
202
200
|
// Filled icon with filled variant
|
|
203
|
-
<InteractiveIcon iconType='filled'
|
|
201
|
+
<InteractiveIcon iconType='filled' accessibilityLabel='Delete'>
|
|
204
202
|
<DeleteCircleFill size={20} />
|
|
205
203
|
</InteractiveIcon>
|
|
206
204
|
|
|
207
205
|
// Outlined icon with stroked variant
|
|
208
|
-
<InteractiveIcon iconType='stroked'
|
|
206
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='Settings'>
|
|
209
207
|
<Settings size={20} />
|
|
210
208
|
</InteractiveIcon>
|
|
211
209
|
```
|
|
@@ -221,12 +219,12 @@ import { DeleteCircleFill, Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
221
219
|
import { DeleteCircleFill, Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
222
220
|
|
|
223
221
|
// Filled icon with stroked variant (wrong)
|
|
224
|
-
<InteractiveIcon iconType='stroked'
|
|
222
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='Delete'>
|
|
225
223
|
<DeleteCircleFill size={20} />
|
|
226
224
|
</InteractiveIcon>
|
|
227
225
|
|
|
228
226
|
// Outlined icon with filled variant (wrong)
|
|
229
|
-
<InteractiveIcon iconType='filled'
|
|
227
|
+
<InteractiveIcon iconType='filled' accessibilityLabel='Settings'>
|
|
230
228
|
<Settings size={20} />
|
|
231
229
|
</InteractiveIcon>
|
|
232
230
|
```
|
|
@@ -237,7 +235,7 @@ import { DeleteCircleFill, Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
237
235
|
|
|
238
236
|
<DoVsDontRow>
|
|
239
237
|
<DoBlockItem
|
|
240
|
-
title='Always provide descriptive
|
|
238
|
+
title='Always provide descriptive accessibilityLabel'
|
|
241
239
|
description='Use clear, action-oriented labels that describe what the icon does'
|
|
242
240
|
>
|
|
243
241
|
|
|
@@ -245,14 +243,14 @@ import { DeleteCircleFill, Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
245
243
|
```tsx
|
|
246
244
|
import { Download } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
247
245
|
|
|
248
|
-
<InteractiveIcon iconType='stroked'
|
|
246
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='Download PDF document'>
|
|
249
247
|
<Download size={20} />
|
|
250
248
|
</InteractiveIcon>
|
|
251
249
|
```
|
|
252
250
|
|
|
253
251
|
</DoBlockItem>
|
|
254
252
|
<DontBlockItem
|
|
255
|
-
title="Don't omit or use generic
|
|
253
|
+
title="Don't omit or use generic accessibilityLabel"
|
|
256
254
|
description='Avoid missing labels, generic labels like "Click here", or icon names as labels'
|
|
257
255
|
>
|
|
258
256
|
|
|
@@ -260,7 +258,7 @@ import { Download } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
260
258
|
```tsx
|
|
261
259
|
import { Download } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
262
260
|
|
|
263
|
-
<InteractiveIcon iconType='stroked'
|
|
261
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='Click here'>
|
|
264
262
|
<Download size={20} />
|
|
265
263
|
</InteractiveIcon>
|
|
266
264
|
```
|
|
@@ -279,7 +277,7 @@ import { Download } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
279
277
|
```tsx
|
|
280
278
|
import { MoreVertical } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
281
279
|
|
|
282
|
-
<InteractiveIcon iconType='stroked'
|
|
280
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='More actions'>
|
|
283
281
|
<MoreVertical size={20} />
|
|
284
282
|
</InteractiveIcon>
|
|
285
283
|
```
|
|
@@ -294,7 +292,7 @@ import { MoreVertical } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
|
294
292
|
```tsx
|
|
295
293
|
import { MoreVertical } from '@ledgerhq/lumen-ui-rnative/symbols';
|
|
296
294
|
|
|
297
|
-
<InteractiveIcon iconType='stroked'
|
|
295
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='More actions'>
|
|
298
296
|
Settings
|
|
299
297
|
</InteractiveIcon>
|
|
300
298
|
```
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-native';
|
|
2
|
-
import {
|
|
2
|
+
import { LUMEN_VIEW_STYLE_PROPS } from '../../../styles/resolveStyle/resolveConfig';
|
|
3
3
|
import {
|
|
4
4
|
Settings,
|
|
5
5
|
PenEdit,
|
|
6
6
|
DeleteCircleFill,
|
|
7
7
|
MoreVertical,
|
|
8
8
|
} from '../../Symbols';
|
|
9
|
+
import { Box, Text } from '../Utility';
|
|
9
10
|
import { InteractiveIcon } from './InteractiveIcon';
|
|
10
11
|
|
|
11
12
|
const meta: Meta<typeof InteractiveIcon> = {
|
|
@@ -19,6 +20,9 @@ const meta: Meta<typeof InteractiveIcon> = {
|
|
|
19
20
|
type: 'code',
|
|
20
21
|
},
|
|
21
22
|
},
|
|
23
|
+
controls: {
|
|
24
|
+
exclude: Array.from(LUMEN_VIEW_STYLE_PROPS),
|
|
25
|
+
},
|
|
22
26
|
},
|
|
23
27
|
argTypes: {
|
|
24
28
|
children: {
|
|
@@ -36,17 +40,17 @@ const meta: Meta<typeof InteractiveIcon> = {
|
|
|
36
40
|
export default meta;
|
|
37
41
|
type Story = StoryObj<typeof InteractiveIcon>;
|
|
38
42
|
|
|
39
|
-
export const
|
|
43
|
+
export const Base: Story = {
|
|
40
44
|
args: {
|
|
41
45
|
iconType: 'filled',
|
|
42
46
|
children: <DeleteCircleFill />,
|
|
43
|
-
|
|
47
|
+
accessibilityLabel: 'Delete',
|
|
44
48
|
},
|
|
45
49
|
parameters: {
|
|
46
50
|
docs: {
|
|
47
51
|
source: {
|
|
48
52
|
code: `
|
|
49
|
-
<InteractiveIcon iconType="filled"
|
|
53
|
+
<InteractiveIcon iconType="filled" accessibilityLabel="Delete">
|
|
50
54
|
<DeleteCircleFill />
|
|
51
55
|
</InteractiveIcon>
|
|
52
56
|
`,
|
|
@@ -59,13 +63,13 @@ export const Stroked: Story = {
|
|
|
59
63
|
args: {
|
|
60
64
|
iconType: 'stroked',
|
|
61
65
|
children: <MoreVertical />,
|
|
62
|
-
|
|
66
|
+
accessibilityLabel: 'More actions',
|
|
63
67
|
},
|
|
64
68
|
parameters: {
|
|
65
69
|
docs: {
|
|
66
70
|
source: {
|
|
67
71
|
code: `
|
|
68
|
-
<InteractiveIcon iconType="stroked"
|
|
72
|
+
<InteractiveIcon iconType="stroked" accessibilityLabel="More actions">
|
|
69
73
|
<MoreVertical />
|
|
70
74
|
</InteractiveIcon>
|
|
71
75
|
`,
|
|
@@ -77,20 +81,24 @@ export const Stroked: Story = {
|
|
|
77
81
|
export const IconTypeShowcase: Story = {
|
|
78
82
|
render: () => {
|
|
79
83
|
return (
|
|
80
|
-
<
|
|
81
|
-
<
|
|
82
|
-
<Text
|
|
83
|
-
|
|
84
|
+
<Box lx={{ flexDirection: 'row', gap: 's16', padding: 's8' }}>
|
|
85
|
+
<Box lx={{ flexDirection: 'column', alignItems: 'center', gap: 's4' }}>
|
|
86
|
+
<Text lx={{ color: 'muted' }} typography='body3'>
|
|
87
|
+
Filled
|
|
88
|
+
</Text>
|
|
89
|
+
<InteractiveIcon iconType='filled' accessibilityLabel='Delete'>
|
|
84
90
|
<DeleteCircleFill />
|
|
85
91
|
</InteractiveIcon>
|
|
86
|
-
</
|
|
87
|
-
<
|
|
88
|
-
<Text
|
|
89
|
-
|
|
92
|
+
</Box>
|
|
93
|
+
<Box lx={{ flexDirection: 'column', alignItems: 'center', gap: 's4' }}>
|
|
94
|
+
<Text lx={{ color: 'muted' }} typography='body3'>
|
|
95
|
+
Stroked
|
|
96
|
+
</Text>
|
|
97
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='More actions'>
|
|
90
98
|
<MoreVertical />
|
|
91
99
|
</InteractiveIcon>
|
|
92
|
-
</
|
|
93
|
-
</
|
|
100
|
+
</Box>
|
|
101
|
+
</Box>
|
|
94
102
|
);
|
|
95
103
|
},
|
|
96
104
|
};
|
|
@@ -99,18 +107,30 @@ export const SizesShowcase: Story = {
|
|
|
99
107
|
render: () => {
|
|
100
108
|
const iconSizes = [16, 20, 24, 40] as const;
|
|
101
109
|
return (
|
|
102
|
-
<
|
|
110
|
+
<Box lx={{ flexDirection: 'row', gap: 's12', padding: 's8' }}>
|
|
103
111
|
{iconSizes.map((size) => (
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
<Box key={size} lx={{ flexDirection: 'column', gap: 's16' }}>
|
|
113
|
+
<Box
|
|
114
|
+
lx={{
|
|
115
|
+
width: 's72',
|
|
116
|
+
alignItems: 'center',
|
|
117
|
+
justifyContent: 'center',
|
|
118
|
+
}}
|
|
119
|
+
>
|
|
120
|
+
<InteractiveIcon
|
|
121
|
+
key={size}
|
|
122
|
+
iconType='stroked'
|
|
123
|
+
accessibilityLabel='More'
|
|
124
|
+
>
|
|
125
|
+
<DeleteCircleFill size={size} />
|
|
108
126
|
</InteractiveIcon>
|
|
109
|
-
</
|
|
110
|
-
<Text
|
|
111
|
-
|
|
127
|
+
</Box>
|
|
128
|
+
<Text lx={{ textAlign: 'center' }} typography='body3'>
|
|
129
|
+
{size}px
|
|
130
|
+
</Text>
|
|
131
|
+
</Box>
|
|
112
132
|
))}
|
|
113
|
-
</
|
|
133
|
+
</Box>
|
|
114
134
|
);
|
|
115
135
|
},
|
|
116
136
|
};
|
|
@@ -118,36 +138,55 @@ export const SizesShowcase: Story = {
|
|
|
118
138
|
export const StatesShowcase: Story = {
|
|
119
139
|
render: () => {
|
|
120
140
|
return (
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
141
|
+
<Box
|
|
142
|
+
lx={{
|
|
143
|
+
flexDirection: 'row',
|
|
144
|
+
gap: 's16',
|
|
145
|
+
backgroundColor: 'base',
|
|
146
|
+
padding: 's8',
|
|
147
|
+
}}
|
|
148
|
+
>
|
|
149
|
+
<Box lx={{ flexDirection: 'column', alignItems: 'center', gap: 's4' }}>
|
|
150
|
+
<Text lx={{ color: 'muted' }} typography='body3'>
|
|
151
|
+
Filled enabled
|
|
152
|
+
</Text>
|
|
153
|
+
<InteractiveIcon iconType='filled' accessibilityLabel='Delete'>
|
|
125
154
|
<DeleteCircleFill />
|
|
126
155
|
</InteractiveIcon>
|
|
127
|
-
</
|
|
128
|
-
<
|
|
129
|
-
<Text
|
|
130
|
-
|
|
156
|
+
</Box>
|
|
157
|
+
<Box lx={{ flexDirection: 'column', alignItems: 'center', gap: 's4' }}>
|
|
158
|
+
<Text lx={{ color: 'muted' }} typography='body3'>
|
|
159
|
+
Stroked enabled
|
|
160
|
+
</Text>
|
|
161
|
+
<InteractiveIcon iconType='stroked' accessibilityLabel='More actions'>
|
|
131
162
|
<MoreVertical />
|
|
132
163
|
</InteractiveIcon>
|
|
133
|
-
</
|
|
134
|
-
<
|
|
135
|
-
<Text
|
|
136
|
-
|
|
164
|
+
</Box>
|
|
165
|
+
<Box lx={{ flexDirection: 'column', alignItems: 'center', gap: 's4' }}>
|
|
166
|
+
<Text lx={{ color: 'muted' }} typography='body3'>
|
|
167
|
+
Filled disabled
|
|
168
|
+
</Text>
|
|
169
|
+
<InteractiveIcon
|
|
170
|
+
iconType='filled'
|
|
171
|
+
accessibilityLabel='Delete'
|
|
172
|
+
disabled
|
|
173
|
+
>
|
|
137
174
|
<DeleteCircleFill />
|
|
138
175
|
</InteractiveIcon>
|
|
139
|
-
</
|
|
140
|
-
<
|
|
141
|
-
<Text
|
|
176
|
+
</Box>
|
|
177
|
+
<Box lx={{ flexDirection: 'column', alignItems: 'center', gap: 's4' }}>
|
|
178
|
+
<Text lx={{ color: 'muted' }} typography='body3'>
|
|
179
|
+
Stroked disabled
|
|
180
|
+
</Text>
|
|
142
181
|
<InteractiveIcon
|
|
143
182
|
iconType='stroked'
|
|
144
|
-
|
|
183
|
+
accessibilityLabel='More actions'
|
|
145
184
|
disabled
|
|
146
185
|
>
|
|
147
186
|
<MoreVertical />
|
|
148
187
|
</InteractiveIcon>
|
|
149
|
-
</
|
|
150
|
-
</
|
|
188
|
+
</Box>
|
|
189
|
+
</Box>
|
|
151
190
|
);
|
|
152
191
|
},
|
|
153
192
|
};
|