@pagopa/io-app-design-system 4.2.1 → 4.4.0
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/lib/commonjs/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +3 -3
- package/lib/commonjs/components/alert/Alert.js +44 -65
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/alert/AlertEdgeToEdge.js +9 -29
- package/lib/commonjs/components/alert/AlertEdgeToEdge.js.map +1 -1
- package/lib/commonjs/components/badge/Badge.js +16 -3
- package/lib/commonjs/components/badge/Badge.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +9 -5
- package/lib/commonjs/components/banner/Banner.js +10 -34
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/lib/commonjs/components/buttons/ButtonLink.js +26 -54
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +27 -45
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +24 -45
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButton.js +15 -32
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonContained.js +19 -42
- package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonSolid.js +16 -31
- package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +61 -19
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +23 -18
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/commonjs/components/checkbox/CheckboxLabel.js +13 -8
- package/lib/commonjs/components/checkbox/CheckboxLabel.js.map +1 -1
- package/lib/commonjs/components/common/AnimatedTick.js +7 -3
- package/lib/commonjs/components/common/AnimatedTick.js.map +1 -1
- package/lib/commonjs/components/common/LogoPaymentWithFallback.js +9 -3
- package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -1
- package/lib/commonjs/components/featureInfo/FeatureInfo.js +9 -6
- package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/commonjs/components/icons/Icon.js +14 -7
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderFirstLevel.js +7 -10
- package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderSecondLevel.js +8 -9
- package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/layout/index.js +0 -11
- package/lib/commonjs/components/layout/index.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAction.js +24 -46
- package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAmount.js +13 -11
- package/lib/commonjs/components/listitems/ListItemAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js +25 -48
- package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemHeader.js +11 -4
- package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js +14 -17
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +29 -55
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +36 -64
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +32 -58
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +43 -58
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +7 -2
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js +12 -14
- package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +4 -2
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/{PressableListItemsBase.js → PressableListItemBase.js} +7 -7
- package/lib/commonjs/components/listitems/PressableListItemBase.js.map +1 -0
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +442 -430
- package/lib/commonjs/components/listitems/__test__/listitem.test.js +3 -3
- package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/commonjs/components/listitems/index.js +11 -11
- package/lib/commonjs/components/listitems/index.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCredential.js +7 -2
- package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleNavigation.js +5 -1
- package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/commonjs/components/modules/PressableModuleBase.js +17 -11
- package/lib/commonjs/components/modules/PressableModuleBase.js.map +1 -1
- package/lib/commonjs/components/modules/index.js +8 -8
- package/lib/commonjs/components/modules/index.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberButton.js +12 -28
- package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
- package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +40 -20
- package/lib/commonjs/components/pictograms/Pictogram.js +17 -4
- package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
- package/lib/commonjs/components/radio/AnimatedRadio.js +16 -15
- package/lib/commonjs/components/radio/AnimatedRadio.js.map +1 -1
- package/lib/commonjs/components/radio/RadioButtonLabel.js +9 -5
- package/lib/commonjs/components/radio/RadioButtonLabel.js.map +1 -1
- package/lib/commonjs/components/searchInput/SearchInput.js +4 -3
- package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
- package/lib/commonjs/components/spacer/Spacer.js +13 -6
- package/lib/commonjs/components/spacer/Spacer.js.map +1 -1
- package/lib/commonjs/components/stack/Stack.js +19 -9
- package/lib/commonjs/components/stack/Stack.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +15 -21
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/tag/Tag.js +21 -8
- package/lib/commonjs/components/tag/Tag.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInput.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +23 -10
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/components/typography/IOText.js +3 -6
- package/lib/commonjs/components/typography/IOText.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +84 -84
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -50
- package/lib/commonjs/core/IOAnimations.js +6 -12
- package/lib/commonjs/core/IOAnimations.js.map +1 -1
- package/lib/commonjs/hooks/index.js +28 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useListItemAnimation.js +40 -0
- package/lib/commonjs/hooks/useListItemAnimation.js.map +1 -0
- package/lib/commonjs/hooks/useScaleAnimation.js +36 -0
- package/lib/commonjs/hooks/useScaleAnimation.js.map +1 -0
- package/lib/commonjs/index.js +11 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/accessibility.js +29 -1
- package/lib/commonjs/utils/accessibility.js.map +1 -1
- package/lib/commonjs/utils/fonts.js +3 -2
- package/lib/commonjs/utils/fonts.js.map +1 -1
- package/lib/commonjs/utils/hooks/index.js +28 -0
- package/lib/commonjs/utils/hooks/index.js.map +1 -0
- package/lib/commonjs/utils/hooks/useSpringPressProgressValue.js +5 -7
- package/lib/commonjs/utils/hooks/useSpringPressProgressValue.js.map +1 -1
- package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +3 -3
- package/lib/module/components/alert/Alert.js +45 -67
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/alert/AlertEdgeToEdge.js +10 -31
- package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
- package/lib/module/components/badge/Badge.js +16 -3
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +9 -5
- package/lib/module/components/banner/Banner.js +10 -33
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/lib/module/components/buttons/ButtonLink.js +29 -57
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +30 -48
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +27 -48
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/IconButton.js +18 -35
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/IconButtonContained.js +21 -45
- package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/module/components/buttons/IconButtonSolid.js +18 -34
- package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +61 -19
- package/lib/module/components/checkbox/AnimatedCheckbox.js +23 -18
- package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/module/components/checkbox/CheckboxLabel.js +14 -9
- package/lib/module/components/checkbox/CheckboxLabel.js.map +1 -1
- package/lib/module/components/common/AnimatedTick.js +7 -3
- package/lib/module/components/common/AnimatedTick.js.map +1 -1
- package/lib/module/components/common/LogoPaymentWithFallback.js +9 -3
- package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -1
- package/lib/module/components/featureInfo/FeatureInfo.js +11 -8
- package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/module/components/icons/Icon.js +15 -6
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/layout/HeaderFirstLevel.js +8 -11
- package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/module/components/layout/HeaderSecondLevel.js +9 -10
- package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/layout/index.js +0 -1
- package/lib/module/components/layout/index.js.map +1 -1
- package/lib/module/components/listitems/ListItemAction.js +25 -48
- package/lib/module/components/listitems/ListItemAction.js.map +1 -1
- package/lib/module/components/listitems/ListItemAmount.js +13 -11
- package/lib/module/components/listitems/ListItemAmount.js.map +1 -1
- package/lib/module/components/listitems/ListItemCheckbox.js +28 -51
- package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/module/components/listitems/ListItemHeader.js +11 -4
- package/lib/module/components/listitems/ListItemHeader.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfo.js +14 -17
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +30 -57
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +38 -65
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +33 -58
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +46 -61
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js +7 -2
- package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/module/components/listitems/ListItemSwitch.js +12 -14
- package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +3 -1
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/{PressableListItemsBase.js → PressableListItemBase.js} +7 -7
- package/lib/module/components/listitems/PressableListItemBase.js.map +1 -0
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +442 -430
- package/lib/module/components/listitems/__test__/listitem.test.js +1 -1
- package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/module/components/listitems/index.js +1 -1
- package/lib/module/components/listitems/index.js.map +1 -1
- package/lib/module/components/modules/ModuleCredential.js +7 -2
- package/lib/module/components/modules/ModuleCredential.js.map +1 -1
- package/lib/module/components/modules/ModuleNavigation.js +5 -1
- package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/module/components/modules/PressableModuleBase.js +17 -10
- package/lib/module/components/modules/PressableModuleBase.js.map +1 -1
- package/lib/module/components/modules/index.js +1 -1
- package/lib/module/components/modules/index.js.map +1 -1
- package/lib/module/components/numberpad/NumberButton.js +14 -30
- package/lib/module/components/numberpad/NumberButton.js.map +1 -1
- package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +40 -20
- package/lib/module/components/pictograms/Pictogram.js +17 -4
- package/lib/module/components/pictograms/Pictogram.js.map +1 -1
- package/lib/module/components/radio/AnimatedRadio.js +16 -15
- package/lib/module/components/radio/AnimatedRadio.js.map +1 -1
- package/lib/module/components/radio/RadioButtonLabel.js +10 -6
- package/lib/module/components/radio/RadioButtonLabel.js.map +1 -1
- package/lib/module/components/searchInput/SearchInput.js +5 -4
- package/lib/module/components/searchInput/SearchInput.js.map +1 -1
- package/lib/module/components/spacer/Spacer.js +11 -5
- package/lib/module/components/spacer/Spacer.js.map +1 -1
- package/lib/module/components/stack/Stack.js +19 -9
- package/lib/module/components/stack/Stack.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +18 -24
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/tag/Tag.js +21 -8
- package/lib/module/components/tag/Tag.js.map +1 -1
- package/lib/module/components/textInput/TextInput.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +23 -10
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/components/typography/IOText.js +5 -8
- package/lib/module/components/typography/IOText.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +84 -84
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -50
- package/lib/module/core/IOAnimations.js +4 -10
- package/lib/module/core/IOAnimations.js.map +1 -1
- package/lib/module/hooks/index.js +3 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useListItemAnimation.js +33 -0
- package/lib/module/hooks/useListItemAnimation.js.map +1 -0
- package/lib/module/hooks/useScaleAnimation.js +29 -0
- package/lib/module/hooks/useScaleAnimation.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/accessibility.js +28 -1
- package/lib/module/utils/accessibility.js.map +1 -1
- package/lib/module/utils/fonts.js +1 -0
- package/lib/module/utils/fonts.js.map +1 -1
- package/lib/module/utils/hooks/index.js +3 -0
- package/lib/module/utils/hooks/index.js.map +1 -0
- package/lib/module/utils/hooks/useSpringPressProgressValue.js +5 -5
- package/lib/module/utils/hooks/useSpringPressProgressValue.js.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/alert/AlertEdgeToEdge.d.ts.map +1 -1
- package/lib/typescript/components/badge/Badge.d.ts +2 -1
- package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts +2 -1
- package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/checkbox/CheckboxLabel.d.ts +2 -1
- package/lib/typescript/components/checkbox/CheckboxLabel.d.ts.map +1 -1
- package/lib/typescript/components/common/AnimatedTick.d.ts +4 -3
- package/lib/typescript/components/common/AnimatedTick.d.ts.map +1 -1
- package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -1
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +5 -3
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
- package/lib/typescript/components/layout/index.d.ts +0 -1
- package/lib/typescript/components/layout/index.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemAction.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemAmount.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts +2 -2
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/listitems/{PressableListItemsBase.d.ts → PressableListItemBase.d.ts} +3 -2
- package/lib/typescript/components/listitems/PressableListItemBase.d.ts.map +1 -0
- package/lib/typescript/components/listitems/index.d.ts +1 -1
- package/lib/typescript/components/listitems/index.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleCredential.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
- package/lib/typescript/components/modules/PressableModuleBase.d.ts.map +1 -1
- package/lib/typescript/components/modules/index.d.ts +1 -1
- package/lib/typescript/components/modules/index.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/Pictogram.d.ts +5 -3
- package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/types.d.ts +1 -2
- package/lib/typescript/components/pictograms/types.d.ts.map +1 -1
- package/lib/typescript/components/radio/AnimatedRadio.d.ts +2 -1
- package/lib/typescript/components/radio/AnimatedRadio.d.ts.map +1 -1
- package/lib/typescript/components/radio/RadioButtonLabel.d.ts +2 -1
- package/lib/typescript/components/radio/RadioButtonLabel.d.ts.map +1 -1
- package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
- package/lib/typescript/components/spacer/Spacer.d.ts +1 -0
- package/lib/typescript/components/spacer/Spacer.d.ts.map +1 -1
- package/lib/typescript/components/stack/Stack.d.ts +2 -1
- package/lib/typescript/components/stack/Stack.d.ts.map +1 -1
- package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
- package/lib/typescript/components/tag/Tag.d.ts +4 -2
- package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInput.d.ts +2 -1
- package/lib/typescript/components/textInput/TextInput.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodyMonospace.d.ts +1 -1
- package/lib/typescript/components/typography/ButtonText.d.ts +1 -1
- package/lib/typescript/components/typography/Caption.d.ts +1 -1
- package/lib/typescript/components/typography/H1.d.ts +1 -1
- package/lib/typescript/components/typography/H2.d.ts +1 -1
- package/lib/typescript/components/typography/H3.d.ts +1 -1
- package/lib/typescript/components/typography/H4.d.ts +1 -1
- package/lib/typescript/components/typography/H5.d.ts +1 -1
- package/lib/typescript/components/typography/H6.d.ts +1 -1
- package/lib/typescript/components/typography/Hero.d.ts +1 -1
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH1.d.ts +1 -1
- package/lib/typescript/components/typography/markdown/MdH2.d.ts +1 -1
- package/lib/typescript/components/typography/markdown/MdH3.d.ts +1 -1
- package/lib/typescript/core/IOAnimations.d.ts +6 -10
- package/lib/typescript/core/IOAnimations.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +7 -7
- package/lib/typescript/hooks/index.d.ts +3 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useListItemAnimation.d.ts +10 -0
- package/lib/typescript/hooks/useListItemAnimation.d.ts.map +1 -0
- package/lib/typescript/hooks/useScaleAnimation.d.ts +10 -0
- package/lib/typescript/hooks/useScaleAnimation.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/accessibility.d.ts +10 -0
- package/lib/typescript/utils/accessibility.d.ts.map +1 -1
- package/lib/typescript/utils/fonts.d.ts +2 -1
- package/lib/typescript/utils/fonts.d.ts.map +1 -1
- package/lib/typescript/utils/hooks/index.d.ts +3 -0
- package/lib/typescript/utils/hooks/index.d.ts.map +1 -0
- package/lib/typescript/utils/hooks/useSpringPressProgressValue.d.ts +7 -8
- package/lib/typescript/utils/hooks/useSpringPressProgressValue.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +3 -3
- package/src/components/alert/Alert.tsx +49 -106
- package/src/components/alert/AlertEdgeToEdge.tsx +6 -46
- package/src/components/badge/Badge.tsx +29 -4
- package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +9 -5
- package/src/components/banner/Banner.tsx +6 -54
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/src/components/buttons/ButtonLink.tsx +36 -89
- package/src/components/buttons/ButtonOutline.tsx +40 -75
- package/src/components/buttons/ButtonSolid.tsx +21 -67
- package/src/components/buttons/IconButton.tsx +12 -47
- package/src/components/buttons/IconButtonContained.tsx +21 -57
- package/src/components/buttons/IconButtonSolid.tsx +16 -46
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +61 -19
- package/src/components/checkbox/AnimatedCheckbox.tsx +36 -18
- package/src/components/checkbox/CheckboxLabel.tsx +22 -10
- package/src/components/common/AnimatedTick.tsx +9 -3
- package/src/components/common/LogoPaymentWithFallback.tsx +27 -5
- package/src/components/featureInfo/FeatureInfo.tsx +13 -9
- package/src/components/icons/Icon.tsx +23 -7
- package/src/components/layout/HeaderFirstLevel.tsx +11 -21
- package/src/components/layout/HeaderSecondLevel.tsx +5 -14
- package/src/components/layout/index.tsx +0 -1
- package/src/components/listitems/ListItemAction.tsx +28 -73
- package/src/components/listitems/ListItemAmount.tsx +16 -11
- package/src/components/listitems/ListItemCheckbox.tsx +39 -83
- package/src/components/listitems/ListItemHeader.tsx +14 -4
- package/src/components/listitems/ListItemInfo.tsx +27 -20
- package/src/components/listitems/ListItemInfoCopy.tsx +37 -86
- package/src/components/listitems/ListItemNav.tsx +55 -112
- package/src/components/listitems/ListItemNavAlert.tsx +42 -102
- package/src/components/listitems/ListItemRadio.tsx +60 -107
- package/src/components/listitems/ListItemRadioWithAmount.tsx +9 -3
- package/src/components/listitems/ListItemSwitch.tsx +21 -27
- package/src/components/listitems/ListItemTransaction.tsx +4 -1
- package/src/components/listitems/{PressableListItemsBase.tsx → PressableListItemBase.tsx} +7 -6
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +442 -430
- package/src/components/listitems/__test__/listitem.test.tsx +1 -1
- package/src/components/listitems/index.tsx +1 -1
- package/src/components/modules/ModuleCredential.tsx +5 -2
- package/src/components/modules/ModuleNavigation.tsx +3 -1
- package/src/components/modules/PressableModuleBase.tsx +15 -8
- package/src/components/modules/index.tsx +1 -1
- package/src/components/numberpad/NumberButton.tsx +12 -43
- package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +40 -20
- package/src/components/pictograms/Pictogram.tsx +24 -5
- package/src/components/pictograms/types.ts +1 -3
- package/src/components/radio/AnimatedRadio.tsx +31 -15
- package/src/components/radio/RadioButtonLabel.tsx +16 -8
- package/src/components/searchInput/SearchInput.tsx +10 -5
- package/src/components/spacer/Spacer.tsx +21 -6
- package/src/components/stack/Stack.tsx +25 -14
- package/src/components/tabs/TabItem.tsx +15 -29
- package/src/components/tag/Tag.tsx +26 -8
- package/src/components/textInput/TextInput.tsx +2 -1
- package/src/components/textInput/TextInputBase.tsx +44 -11
- package/src/components/typography/IOText.tsx +5 -6
- package/src/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +84 -84
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -50
- package/src/core/IOAnimations.ts +8 -10
- package/src/hooks/index.tsx +2 -0
- package/src/hooks/useListItemAnimation.tsx +59 -0
- package/src/hooks/useScaleAnimation.tsx +41 -0
- package/src/index.tsx +1 -0
- package/src/utils/accessibility.ts +32 -1
- package/src/utils/fonts.ts +1 -0
- package/src/utils/hooks/index.tsx +2 -0
- package/src/utils/hooks/useSpringPressProgressValue.ts +14 -8
- package/lib/commonjs/components/layout/FooterWithButtons.js +0 -84
- package/lib/commonjs/components/layout/FooterWithButtons.js.map +0 -1
- package/lib/commonjs/components/listitems/PressableListItemsBase.js.map +0 -1
- package/lib/commonjs/components/listitems/hooks/useListItemSpringAnimation.js +0 -56
- package/lib/commonjs/components/listitems/hooks/useListItemSpringAnimation.js.map +0 -1
- package/lib/commonjs/components/modules/hooks/useModuleSpringAnimation.js +0 -41
- package/lib/commonjs/components/modules/hooks/useModuleSpringAnimation.js.map +0 -1
- package/lib/module/components/layout/FooterWithButtons.js +0 -75
- package/lib/module/components/layout/FooterWithButtons.js.map +0 -1
- package/lib/module/components/listitems/PressableListItemsBase.js.map +0 -1
- package/lib/module/components/listitems/hooks/useListItemSpringAnimation.js +0 -47
- package/lib/module/components/listitems/hooks/useListItemSpringAnimation.js.map +0 -1
- package/lib/module/components/modules/hooks/useModuleSpringAnimation.js +0 -34
- package/lib/module/components/modules/hooks/useModuleSpringAnimation.js.map +0 -1
- package/lib/typescript/components/layout/FooterWithButtons.d.ts +0 -16
- package/lib/typescript/components/layout/FooterWithButtons.d.ts.map +0 -1
- package/lib/typescript/components/listitems/PressableListItemsBase.d.ts.map +0 -1
- package/lib/typescript/components/listitems/hooks/useListItemSpringAnimation.d.ts +0 -13
- package/lib/typescript/components/listitems/hooks/useListItemSpringAnimation.d.ts.map +0 -1
- package/lib/typescript/components/modules/hooks/useModuleSpringAnimation.d.ts +0 -10
- package/lib/typescript/components/modules/hooks/useModuleSpringAnimation.d.ts.map +0 -1
- package/src/components/layout/FooterWithButtons.tsx +0 -90
- package/src/components/listitems/hooks/useListItemSpringAnimation.ts +0 -72
- package/src/components/modules/hooks/useModuleSpringAnimation.ts +0 -49
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { GestureResponderEvent, Pressable } from "react-native";
|
|
3
3
|
import Animated, {
|
|
4
|
-
Extrapolate,
|
|
5
|
-
interpolate,
|
|
6
4
|
interpolateColor,
|
|
7
5
|
useAnimatedProps,
|
|
8
|
-
|
|
9
|
-
useDerivedValue,
|
|
10
|
-
useSharedValue,
|
|
11
|
-
withSpring
|
|
6
|
+
useReducedMotion
|
|
12
7
|
} from "react-native-reanimated";
|
|
13
8
|
import {
|
|
14
9
|
IOColors,
|
|
15
10
|
IOIconButtonStyles,
|
|
16
|
-
IOScaleValues,
|
|
17
|
-
IOSpringValues,
|
|
18
11
|
IOStyles,
|
|
19
12
|
hexToRgba,
|
|
20
13
|
useIOExperimentalDesign
|
|
21
14
|
} from "../../core";
|
|
15
|
+
import { useScaleAnimation } from "../../hooks";
|
|
22
16
|
import { WithTestID } from "../../utils/types";
|
|
23
17
|
import {
|
|
24
18
|
AnimatedIcon,
|
|
@@ -116,7 +110,9 @@ export const IconButton = ({
|
|
|
116
110
|
accessibilityHint,
|
|
117
111
|
testID
|
|
118
112
|
}: IconButton) => {
|
|
119
|
-
const
|
|
113
|
+
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
114
|
+
useScaleAnimation("exaggerated");
|
|
115
|
+
const reducedMotion = useReducedMotion();
|
|
120
116
|
|
|
121
117
|
const { isExperimental } = useIOExperimentalDesign();
|
|
122
118
|
|
|
@@ -125,56 +121,23 @@ export const IconButton = ({
|
|
|
125
121
|
[isExperimental]
|
|
126
122
|
);
|
|
127
123
|
|
|
128
|
-
// Scaling transformation applied when the button is pressed
|
|
129
|
-
const animationScaleValue = IOScaleValues?.exaggeratedButton?.pressedState;
|
|
130
|
-
|
|
131
|
-
// Using a spring-based animation for our interpolations
|
|
132
|
-
const progressPressed = useDerivedValue(() =>
|
|
133
|
-
withSpring(isPressed.value, IOSpringValues.button)
|
|
134
|
-
);
|
|
135
|
-
|
|
136
|
-
// Interpolate animation values from `isPressed` values
|
|
137
|
-
|
|
138
|
-
const pressedAnimationStyle = useAnimatedStyle(() => {
|
|
139
|
-
// Scale down button slightly when pressed
|
|
140
|
-
const scale = interpolate(
|
|
141
|
-
progressPressed.value,
|
|
142
|
-
[0, 1],
|
|
143
|
-
[1, animationScaleValue],
|
|
144
|
-
Extrapolate.CLAMP
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
return {
|
|
148
|
-
transform: [{ scale }]
|
|
149
|
-
};
|
|
150
|
-
});
|
|
151
|
-
|
|
152
124
|
// Animate the <Icon> color prop
|
|
153
125
|
const animatedColor = useAnimatedProps(() => {
|
|
154
126
|
const iconColor = interpolateColor(
|
|
155
|
-
|
|
127
|
+
progress.value,
|
|
156
128
|
[0, 1],
|
|
157
129
|
[colorMap[color].icon.default, colorMap[color].icon.pressed]
|
|
158
130
|
);
|
|
159
131
|
return { color: iconColor };
|
|
160
132
|
});
|
|
161
133
|
|
|
162
|
-
const handlePressIn = useCallback(() => {
|
|
163
|
-
// eslint-disable-next-line functional/immutable-data
|
|
164
|
-
isPressed.value = 1;
|
|
165
|
-
}, [isPressed]);
|
|
166
|
-
const handlePressOut = useCallback(() => {
|
|
167
|
-
// eslint-disable-next-line functional/immutable-data
|
|
168
|
-
isPressed.value = 0;
|
|
169
|
-
}, [isPressed]);
|
|
170
|
-
|
|
171
134
|
return (
|
|
172
135
|
<Pressable
|
|
173
136
|
disabled={disabled}
|
|
174
137
|
// Events
|
|
175
138
|
onPress={onPress}
|
|
176
|
-
onPressIn={
|
|
177
|
-
onPressOut={
|
|
139
|
+
onPressIn={onPressIn}
|
|
140
|
+
onPressOut={onPressOut}
|
|
178
141
|
// Accessibility
|
|
179
142
|
accessible={true}
|
|
180
143
|
accessibilityRole={"button"}
|
|
@@ -192,11 +155,12 @@ export const IconButton = ({
|
|
|
192
155
|
IOIconButtonStyles.buttonSizeSmall,
|
|
193
156
|
IOStyles.alignCenter,
|
|
194
157
|
IOStyles.centerJustified,
|
|
195
|
-
!disabled &&
|
|
158
|
+
!disabled && !reducedMotion && scaleAnimatedStyle
|
|
196
159
|
]}
|
|
197
160
|
>
|
|
198
161
|
{!disabled ? (
|
|
199
162
|
<AnimatedIconClassComponent
|
|
163
|
+
allowFontScaling
|
|
200
164
|
name={icon}
|
|
201
165
|
size={iconSize}
|
|
202
166
|
animatedProps={animatedColor}
|
|
@@ -204,6 +168,7 @@ export const IconButton = ({
|
|
|
204
168
|
/>
|
|
205
169
|
) : (
|
|
206
170
|
<AnimatedIcon
|
|
171
|
+
allowFontScaling
|
|
207
172
|
name={icon}
|
|
208
173
|
size={iconSize}
|
|
209
174
|
color={colorMap[color]?.icon?.disabled}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
2
|
import { GestureResponderEvent, Pressable } from "react-native";
|
|
4
3
|
import Animated, {
|
|
5
|
-
Extrapolate,
|
|
6
|
-
interpolate,
|
|
7
4
|
interpolateColor,
|
|
8
5
|
useAnimatedProps,
|
|
9
6
|
useAnimatedStyle,
|
|
10
|
-
|
|
11
|
-
useSharedValue,
|
|
12
|
-
withSpring
|
|
7
|
+
useReducedMotion
|
|
13
8
|
} from "react-native-reanimated";
|
|
14
9
|
import {
|
|
15
10
|
AnimatedIcon,
|
|
@@ -20,11 +15,10 @@ import {
|
|
|
20
15
|
IOButtonStyles,
|
|
21
16
|
IOColors,
|
|
22
17
|
IOIconButtonStyles,
|
|
23
|
-
IOScaleValues,
|
|
24
|
-
IOSpringValues,
|
|
25
18
|
hexToRgba,
|
|
26
19
|
useIOExperimentalDesign
|
|
27
20
|
} from "../../core";
|
|
21
|
+
import { useScaleAnimation } from "../../hooks";
|
|
28
22
|
import { WithTestID } from "../../utils/types";
|
|
29
23
|
|
|
30
24
|
export type IconButtonContained = WithTestID<{
|
|
@@ -151,64 +145,33 @@ export const IconButtonContained = ({
|
|
|
151
145
|
accessibilityHint,
|
|
152
146
|
testID
|
|
153
147
|
}: IconButtonContained) => {
|
|
154
|
-
const isPressed = useSharedValue(0);
|
|
155
148
|
const { isExperimental } = useIOExperimentalDesign();
|
|
156
149
|
|
|
150
|
+
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
151
|
+
useScaleAnimation("exaggerated");
|
|
152
|
+
const reducedMotion = useReducedMotion();
|
|
153
|
+
|
|
157
154
|
const colorMap = React.useMemo(
|
|
158
155
|
() => (isExperimental ? mapColorStates : mapLegacyColorStates),
|
|
159
156
|
[isExperimental]
|
|
160
157
|
);
|
|
161
158
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
// Using a spring-based animation for our interpolations
|
|
166
|
-
const progressPressed = useDerivedValue(() =>
|
|
167
|
-
withSpring(isPressed.value, IOSpringValues.button)
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
// Interpolate animation values from `isPressed` values
|
|
171
|
-
|
|
172
|
-
const pressedAnimationStyle = useAnimatedStyle(() => {
|
|
173
|
-
// Link color states to the pressed states
|
|
174
|
-
const backgroundColor = interpolateColor(
|
|
175
|
-
progressPressed.value,
|
|
159
|
+
const backgroundColorAnimationStyle = useAnimatedStyle(() => ({
|
|
160
|
+
backgroundColor: interpolateColor(
|
|
161
|
+
progress.value,
|
|
176
162
|
[0, 1],
|
|
177
163
|
[colorMap[color].background.default, colorMap[color].background.pressed]
|
|
178
|
-
)
|
|
179
|
-
|
|
180
|
-
// Scale down button slightly when pressed
|
|
181
|
-
const scale = interpolate(
|
|
182
|
-
progressPressed.value,
|
|
183
|
-
[0, 1],
|
|
184
|
-
[1, animationScaleValue],
|
|
185
|
-
Extrapolate.CLAMP
|
|
186
|
-
);
|
|
187
|
-
|
|
188
|
-
return {
|
|
189
|
-
backgroundColor,
|
|
190
|
-
transform: [{ scale }]
|
|
191
|
-
};
|
|
192
|
-
});
|
|
164
|
+
)
|
|
165
|
+
}));
|
|
193
166
|
|
|
194
167
|
// Animate the <Icon> color prop
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
168
|
+
const iconColorAnimationStyle = useAnimatedProps(() => ({
|
|
169
|
+
color: interpolateColor(
|
|
170
|
+
progress.value,
|
|
198
171
|
[0, 1],
|
|
199
172
|
[colorMap[color].icon.default, colorMap[color].icon.pressed]
|
|
200
|
-
)
|
|
201
|
-
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
const handlePressIn = useCallback(() => {
|
|
205
|
-
// eslint-disable-next-line functional/immutable-data
|
|
206
|
-
isPressed.value = 1;
|
|
207
|
-
}, [isPressed]);
|
|
208
|
-
const handlePressOut = useCallback(() => {
|
|
209
|
-
// eslint-disable-next-line functional/immutable-data
|
|
210
|
-
isPressed.value = 0;
|
|
211
|
-
}, [isPressed]);
|
|
173
|
+
)
|
|
174
|
+
}));
|
|
212
175
|
|
|
213
176
|
return (
|
|
214
177
|
<Pressable
|
|
@@ -218,8 +181,8 @@ export const IconButtonContained = ({
|
|
|
218
181
|
accessibilityState={{ disabled }}
|
|
219
182
|
testID={testID}
|
|
220
183
|
onPress={onPress}
|
|
221
|
-
onPressIn={
|
|
222
|
-
onPressOut={
|
|
184
|
+
onPressIn={onPressIn}
|
|
185
|
+
onPressOut={onPressOut}
|
|
223
186
|
accessible={true}
|
|
224
187
|
disabled={disabled}
|
|
225
188
|
style={IOButtonStyles.dimensionsDefault}
|
|
@@ -228,13 +191,14 @@ export const IconButtonContained = ({
|
|
|
228
191
|
style={[
|
|
229
192
|
IOIconButtonStyles.button,
|
|
230
193
|
IOIconButtonStyles.buttonSizeDefault,
|
|
231
|
-
!disabled &&
|
|
194
|
+
!disabled && !reducedMotion && scaleAnimatedStyle,
|
|
195
|
+
!disabled && backgroundColorAnimationStyle
|
|
232
196
|
]}
|
|
233
197
|
>
|
|
234
198
|
{!disabled ? (
|
|
235
199
|
<AnimatedIconClassComponent
|
|
236
200
|
name={icon}
|
|
237
|
-
animatedProps={
|
|
201
|
+
animatedProps={iconColorAnimationStyle}
|
|
238
202
|
color={colorMap[color]?.icon?.default}
|
|
239
203
|
/>
|
|
240
204
|
) : (
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
2
|
import { GestureResponderEvent, Pressable } from "react-native";
|
|
4
3
|
import Animated, {
|
|
5
|
-
Extrapolate,
|
|
6
|
-
interpolate,
|
|
7
4
|
interpolateColor,
|
|
8
5
|
useAnimatedStyle,
|
|
9
|
-
|
|
10
|
-
useSharedValue,
|
|
11
|
-
withSpring
|
|
6
|
+
useReducedMotion
|
|
12
7
|
} from "react-native-reanimated";
|
|
13
8
|
import {
|
|
14
9
|
IOButtonStyles,
|
|
15
10
|
IOIconButtonStyles,
|
|
16
|
-
IOScaleValues,
|
|
17
|
-
IOSpringValues,
|
|
18
11
|
useIOExperimentalDesign
|
|
19
12
|
} from "../../core";
|
|
20
13
|
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
14
|
+
import { useScaleAnimation } from "../../hooks";
|
|
21
15
|
import { WithTestID } from "../../utils/types";
|
|
22
16
|
import { AnimatedIcon, IOIcons } from "../icons";
|
|
23
17
|
|
|
@@ -110,50 +104,24 @@ export const IconButtonSolid = ({
|
|
|
110
104
|
accessibilityHint,
|
|
111
105
|
testID
|
|
112
106
|
}: IconButtonSolid) => {
|
|
113
|
-
const isPressed = useSharedValue(0);
|
|
114
107
|
const { isExperimental } = useIOExperimentalDesign();
|
|
115
|
-
// Scaling transformation applied when the button is pressed
|
|
116
|
-
const animationScaleValue = IOScaleValues?.exaggeratedButton?.pressedState;
|
|
117
108
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
);
|
|
109
|
+
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
110
|
+
useScaleAnimation("exaggerated");
|
|
111
|
+
const reducedMotion = useReducedMotion();
|
|
122
112
|
|
|
123
113
|
const colorMap = React.useMemo(
|
|
124
114
|
() => (isExperimental ? mapColorStates : mapLegacyColorStates),
|
|
125
115
|
[isExperimental]
|
|
126
116
|
);
|
|
127
|
-
// Interpolate animation values from `isPressed` values
|
|
128
|
-
const pressedAnimationStyle = useAnimatedStyle(() => {
|
|
129
|
-
const backgroundColor = interpolateColor(
|
|
130
|
-
progressPressed.value,
|
|
131
|
-
[0, 1],
|
|
132
|
-
[colorMap[color].background.default, colorMap[color].background.pressed]
|
|
133
|
-
);
|
|
134
117
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
118
|
+
const backgroundColorAnimationStyle = useAnimatedStyle(() => ({
|
|
119
|
+
backgroundColor: interpolateColor(
|
|
120
|
+
progress.value,
|
|
138
121
|
[0, 1],
|
|
139
|
-
[
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return {
|
|
144
|
-
backgroundColor,
|
|
145
|
-
transform: [{ scale }]
|
|
146
|
-
};
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
const handlePressIn = useCallback(() => {
|
|
150
|
-
// eslint-disable-next-line functional/immutable-data
|
|
151
|
-
isPressed.value = 1;
|
|
152
|
-
}, [isPressed]);
|
|
153
|
-
const handlePressOut = useCallback(() => {
|
|
154
|
-
// eslint-disable-next-line functional/immutable-data
|
|
155
|
-
isPressed.value = 0;
|
|
156
|
-
}, [isPressed]);
|
|
122
|
+
[colorMap[color].background.default, colorMap[color].background.pressed]
|
|
123
|
+
)
|
|
124
|
+
}));
|
|
157
125
|
|
|
158
126
|
return (
|
|
159
127
|
<Pressable
|
|
@@ -163,8 +131,8 @@ export const IconButtonSolid = ({
|
|
|
163
131
|
accessibilityState={{ disabled }}
|
|
164
132
|
testID={testID}
|
|
165
133
|
onPress={onPress}
|
|
166
|
-
onPressIn={
|
|
167
|
-
onPressOut={
|
|
134
|
+
onPressIn={onPressIn}
|
|
135
|
+
onPressOut={onPressOut}
|
|
168
136
|
accessible={true}
|
|
169
137
|
disabled={disabled}
|
|
170
138
|
style={IOButtonStyles.dimensionsDefault}
|
|
@@ -173,7 +141,8 @@ export const IconButtonSolid = ({
|
|
|
173
141
|
style={[
|
|
174
142
|
IOIconButtonStyles.button,
|
|
175
143
|
IOIconButtonStyles.buttonSizeLarge,
|
|
176
|
-
!disabled &&
|
|
144
|
+
!disabled && !reducedMotion && scaleAnimatedStyle,
|
|
145
|
+
!disabled && backgroundColorAnimationStyle,
|
|
177
146
|
disabled
|
|
178
147
|
? {
|
|
179
148
|
backgroundColor: colorMap[color]?.background?.disabled
|
|
@@ -184,6 +153,7 @@ export const IconButtonSolid = ({
|
|
|
184
153
|
]}
|
|
185
154
|
>
|
|
186
155
|
<AnimatedIcon
|
|
156
|
+
allowFontScaling
|
|
187
157
|
name={icon}
|
|
188
158
|
color={
|
|
189
159
|
!disabled
|
|
@@ -59,7 +59,13 @@ exports[`Test Buttons Components - Experimental Enabled ButtonLink Snapshot 1`]
|
|
|
59
59
|
"textAlignVertical": "center",
|
|
60
60
|
},
|
|
61
61
|
false,
|
|
62
|
+
{
|
|
63
|
+
"columnGap": 8,
|
|
64
|
+
},
|
|
62
65
|
{},
|
|
66
|
+
{
|
|
67
|
+
"columnGap": 8,
|
|
68
|
+
},
|
|
63
69
|
{
|
|
64
70
|
"transform": [
|
|
65
71
|
{
|
|
@@ -76,7 +82,7 @@ exports[`Test Buttons Components - Experimental Enabled ButtonLink Snapshot 1`]
|
|
|
76
82
|
allowFontScaling={true}
|
|
77
83
|
ellipsizeMode="tail"
|
|
78
84
|
importantForAccessibility="no-hide-descendants"
|
|
79
|
-
maxFontSizeMultiplier={1.
|
|
85
|
+
maxFontSizeMultiplier={1.5}
|
|
80
86
|
numberOfLines={1}
|
|
81
87
|
style={
|
|
82
88
|
[
|
|
@@ -160,20 +166,25 @@ exports[`Test Buttons Components - Experimental Enabled ButtonOutline Snapshot 1
|
|
|
160
166
|
{
|
|
161
167
|
"height": 48,
|
|
162
168
|
},
|
|
169
|
+
{
|
|
170
|
+
"columnGap": 8,
|
|
171
|
+
},
|
|
163
172
|
false,
|
|
164
173
|
{
|
|
165
174
|
"backgroundColor": "rgba(231,236,252,0)",
|
|
166
175
|
"borderColor": "#0B3EE3",
|
|
167
176
|
},
|
|
168
177
|
{
|
|
169
|
-
"backgroundColor": undefined,
|
|
170
|
-
"borderColor": undefined,
|
|
171
178
|
"transform": [
|
|
172
179
|
{
|
|
173
180
|
"scale": undefined,
|
|
174
181
|
},
|
|
175
182
|
],
|
|
176
183
|
},
|
|
184
|
+
{
|
|
185
|
+
"backgroundColor": undefined,
|
|
186
|
+
"borderColor": undefined,
|
|
187
|
+
},
|
|
177
188
|
]
|
|
178
189
|
}
|
|
179
190
|
>
|
|
@@ -183,7 +194,7 @@ exports[`Test Buttons Components - Experimental Enabled ButtonOutline Snapshot 1
|
|
|
183
194
|
allowFontScaling={true}
|
|
184
195
|
ellipsizeMode="tail"
|
|
185
196
|
importantForAccessibility="no-hide-descendants"
|
|
186
|
-
maxFontSizeMultiplier={1.
|
|
197
|
+
maxFontSizeMultiplier={1.5}
|
|
187
198
|
numberOfLines={1}
|
|
188
199
|
style={
|
|
189
200
|
[
|
|
@@ -276,17 +287,20 @@ exports[`Test Buttons Components - Experimental Enabled ButtonSolid Snapshot 1`]
|
|
|
276
287
|
"backgroundColor": "#0B3EE3",
|
|
277
288
|
},
|
|
278
289
|
{
|
|
279
|
-
"backgroundColor": undefined,
|
|
280
290
|
"transform": [
|
|
281
291
|
{
|
|
282
292
|
"scale": undefined,
|
|
283
293
|
},
|
|
284
294
|
],
|
|
285
295
|
},
|
|
296
|
+
{
|
|
297
|
+
"backgroundColor": undefined,
|
|
298
|
+
},
|
|
286
299
|
]
|
|
287
300
|
}
|
|
288
301
|
>
|
|
289
302
|
<View
|
|
303
|
+
entering={[Function]}
|
|
290
304
|
style={
|
|
291
305
|
[
|
|
292
306
|
{
|
|
@@ -294,6 +308,9 @@ exports[`Test Buttons Components - Experimental Enabled ButtonSolid Snapshot 1`]
|
|
|
294
308
|
"flexDirection": "row",
|
|
295
309
|
"justifyContent": "center",
|
|
296
310
|
},
|
|
311
|
+
{
|
|
312
|
+
"columnGap": 8,
|
|
313
|
+
},
|
|
297
314
|
false,
|
|
298
315
|
]
|
|
299
316
|
}
|
|
@@ -304,7 +321,7 @@ exports[`Test Buttons Components - Experimental Enabled ButtonSolid Snapshot 1`]
|
|
|
304
321
|
allowFontScaling={true}
|
|
305
322
|
ellipsizeMode="tail"
|
|
306
323
|
importantForAccessibility="no-hide-descendants"
|
|
307
|
-
maxFontSizeMultiplier={1.
|
|
324
|
+
maxFontSizeMultiplier={1.5}
|
|
308
325
|
numberOfLines={1}
|
|
309
326
|
style={
|
|
310
327
|
[
|
|
@@ -510,13 +527,15 @@ exports[`Test Buttons Components - Experimental Enabled IconButtonContained Snap
|
|
|
510
527
|
"width": 48,
|
|
511
528
|
},
|
|
512
529
|
{
|
|
513
|
-
"backgroundColor": undefined,
|
|
514
530
|
"transform": [
|
|
515
531
|
{
|
|
516
532
|
"scale": undefined,
|
|
517
533
|
},
|
|
518
534
|
],
|
|
519
535
|
},
|
|
536
|
+
{
|
|
537
|
+
"backgroundColor": undefined,
|
|
538
|
+
},
|
|
520
539
|
]
|
|
521
540
|
}
|
|
522
541
|
>
|
|
@@ -642,13 +661,15 @@ exports[`Test Buttons Components - Experimental Enabled IconButtonSolid Snapshot
|
|
|
642
661
|
"width": 56,
|
|
643
662
|
},
|
|
644
663
|
{
|
|
645
|
-
"backgroundColor": undefined,
|
|
646
664
|
"transform": [
|
|
647
665
|
{
|
|
648
666
|
"scale": undefined,
|
|
649
667
|
},
|
|
650
668
|
],
|
|
651
669
|
},
|
|
670
|
+
{
|
|
671
|
+
"backgroundColor": undefined,
|
|
672
|
+
},
|
|
652
673
|
{
|
|
653
674
|
"backgroundColor": "#0B3EE3",
|
|
654
675
|
},
|
|
@@ -778,7 +799,13 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
778
799
|
"textAlignVertical": "center",
|
|
779
800
|
},
|
|
780
801
|
false,
|
|
802
|
+
{
|
|
803
|
+
"columnGap": 8,
|
|
804
|
+
},
|
|
781
805
|
{},
|
|
806
|
+
{
|
|
807
|
+
"columnGap": 8,
|
|
808
|
+
},
|
|
782
809
|
{
|
|
783
810
|
"transform": [
|
|
784
811
|
{
|
|
@@ -792,10 +819,10 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
792
819
|
<Text
|
|
793
820
|
accessibilityElementsHidden={true}
|
|
794
821
|
accessible={false}
|
|
795
|
-
allowFontScaling={
|
|
822
|
+
allowFontScaling={true}
|
|
796
823
|
ellipsizeMode="tail"
|
|
797
824
|
importantForAccessibility="no-hide-descendants"
|
|
798
|
-
maxFontSizeMultiplier={1.
|
|
825
|
+
maxFontSizeMultiplier={1.5}
|
|
799
826
|
numberOfLines={1}
|
|
800
827
|
style={
|
|
801
828
|
[
|
|
@@ -878,30 +905,35 @@ exports[`Test Buttons Components ButtonOutline Snapshot 1`] = `
|
|
|
878
905
|
{
|
|
879
906
|
"height": 40,
|
|
880
907
|
},
|
|
908
|
+
{
|
|
909
|
+
"columnGap": 8,
|
|
910
|
+
},
|
|
881
911
|
false,
|
|
882
912
|
{
|
|
883
913
|
"backgroundColor": "rgba(0,115,230,0)",
|
|
884
914
|
"borderColor": "#0073E6",
|
|
885
915
|
},
|
|
886
916
|
{
|
|
887
|
-
"backgroundColor": undefined,
|
|
888
|
-
"borderColor": undefined,
|
|
889
917
|
"transform": [
|
|
890
918
|
{
|
|
891
919
|
"scale": undefined,
|
|
892
920
|
},
|
|
893
921
|
],
|
|
894
922
|
},
|
|
923
|
+
{
|
|
924
|
+
"backgroundColor": undefined,
|
|
925
|
+
"borderColor": undefined,
|
|
926
|
+
},
|
|
895
927
|
]
|
|
896
928
|
}
|
|
897
929
|
>
|
|
898
930
|
<Text
|
|
899
931
|
accessibilityElementsHidden={true}
|
|
900
932
|
accessible={false}
|
|
901
|
-
allowFontScaling={
|
|
933
|
+
allowFontScaling={true}
|
|
902
934
|
ellipsizeMode="tail"
|
|
903
935
|
importantForAccessibility="no-hide-descendants"
|
|
904
|
-
maxFontSizeMultiplier={1.
|
|
936
|
+
maxFontSizeMultiplier={1.5}
|
|
905
937
|
numberOfLines={1}
|
|
906
938
|
style={
|
|
907
939
|
[
|
|
@@ -993,17 +1025,20 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
993
1025
|
"backgroundColor": "#0073E6",
|
|
994
1026
|
},
|
|
995
1027
|
{
|
|
996
|
-
"backgroundColor": undefined,
|
|
997
1028
|
"transform": [
|
|
998
1029
|
{
|
|
999
1030
|
"scale": undefined,
|
|
1000
1031
|
},
|
|
1001
1032
|
],
|
|
1002
1033
|
},
|
|
1034
|
+
{
|
|
1035
|
+
"backgroundColor": undefined,
|
|
1036
|
+
},
|
|
1003
1037
|
]
|
|
1004
1038
|
}
|
|
1005
1039
|
>
|
|
1006
1040
|
<View
|
|
1041
|
+
entering={[Function]}
|
|
1007
1042
|
style={
|
|
1008
1043
|
[
|
|
1009
1044
|
{
|
|
@@ -1011,6 +1046,9 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1011
1046
|
"flexDirection": "row",
|
|
1012
1047
|
"justifyContent": "center",
|
|
1013
1048
|
},
|
|
1049
|
+
{
|
|
1050
|
+
"columnGap": 8,
|
|
1051
|
+
},
|
|
1014
1052
|
false,
|
|
1015
1053
|
]
|
|
1016
1054
|
}
|
|
@@ -1018,10 +1056,10 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1018
1056
|
<Text
|
|
1019
1057
|
accessibilityElementsHidden={true}
|
|
1020
1058
|
accessible={false}
|
|
1021
|
-
allowFontScaling={
|
|
1059
|
+
allowFontScaling={true}
|
|
1022
1060
|
ellipsizeMode="tail"
|
|
1023
1061
|
importantForAccessibility="no-hide-descendants"
|
|
1024
|
-
maxFontSizeMultiplier={1.
|
|
1062
|
+
maxFontSizeMultiplier={1.5}
|
|
1025
1063
|
numberOfLines={1}
|
|
1026
1064
|
style={
|
|
1027
1065
|
[
|
|
@@ -1227,13 +1265,15 @@ exports[`Test Buttons Components IconButtonContained Snapshot 1`] = `
|
|
|
1227
1265
|
"width": 48,
|
|
1228
1266
|
},
|
|
1229
1267
|
{
|
|
1230
|
-
"backgroundColor": undefined,
|
|
1231
1268
|
"transform": [
|
|
1232
1269
|
{
|
|
1233
1270
|
"scale": undefined,
|
|
1234
1271
|
},
|
|
1235
1272
|
],
|
|
1236
1273
|
},
|
|
1274
|
+
{
|
|
1275
|
+
"backgroundColor": undefined,
|
|
1276
|
+
},
|
|
1237
1277
|
]
|
|
1238
1278
|
}
|
|
1239
1279
|
>
|
|
@@ -1359,13 +1399,15 @@ exports[`Test Buttons Components IconButtonSolid Snapshot 1`] = `
|
|
|
1359
1399
|
"width": 56,
|
|
1360
1400
|
},
|
|
1361
1401
|
{
|
|
1362
|
-
"backgroundColor": undefined,
|
|
1363
1402
|
"transform": [
|
|
1364
1403
|
{
|
|
1365
1404
|
"scale": undefined,
|
|
1366
1405
|
},
|
|
1367
1406
|
],
|
|
1368
1407
|
},
|
|
1408
|
+
{
|
|
1409
|
+
"backgroundColor": undefined,
|
|
1410
|
+
},
|
|
1369
1411
|
{
|
|
1370
1412
|
"backgroundColor": "#0073E6",
|
|
1371
1413
|
},
|