@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
|
@@ -10,7 +10,7 @@ import ListItemNav from "../ListItemNav";
|
|
|
10
10
|
import ListItemNavAlert from "../ListItemNavAlert";
|
|
11
11
|
import { ListItemRadioWithAmount } from "../ListItemRadioWithAmount";
|
|
12
12
|
import { ListItemTransaction } from "../ListItemTransaction";
|
|
13
|
-
import { PressableListItemBase } from "../
|
|
13
|
+
import { PressableListItemBase } from "../PressableListItemBase";
|
|
14
14
|
|
|
15
15
|
const onButtonPress = () => {
|
|
16
16
|
Alert.alert("Alert", "Action triggered");
|
|
@@ -5,9 +5,9 @@ export * from "./ListItemInfoCopy";
|
|
|
5
5
|
export * from "./ListItemNav";
|
|
6
6
|
export * from "./ListItemNavAlert";
|
|
7
7
|
export * from "./ListItemTransaction";
|
|
8
|
-
export * from "./PressableListItemsBase";
|
|
9
8
|
export * from "./ListItemSwitch";
|
|
10
9
|
export * from "./ListItemCheckbox";
|
|
11
10
|
export * from "./ListItemRadio";
|
|
12
11
|
export * from "./ListItemRadioWithAmount";
|
|
13
12
|
export * from "./ListItemAmount";
|
|
13
|
+
export * from "./PressableListItemBase";
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
IOVisualCostants,
|
|
14
14
|
useIOTheme
|
|
15
15
|
} from "../../core";
|
|
16
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
16
17
|
import { WithTestID } from "../../utils/types";
|
|
17
18
|
import { Badge } from "../badge";
|
|
18
19
|
import { IOIcons, Icon } from "../icons";
|
|
@@ -63,12 +64,14 @@ const ModuleCredentialContent = ({
|
|
|
63
64
|
...pressableProps
|
|
64
65
|
}: WithTestID<ModuleCredentialProps>) => {
|
|
65
66
|
const theme = useIOTheme();
|
|
67
|
+
const { hugeFontEnabled } = useIOFontDynamicScale();
|
|
66
68
|
|
|
67
|
-
const iconComponent = icon && (
|
|
69
|
+
const iconComponent = icon && !hugeFontEnabled && (
|
|
68
70
|
<Icon
|
|
71
|
+
allowFontScaling
|
|
69
72
|
name={icon}
|
|
70
73
|
size={IOSelectionListItemVisualParams.iconSize}
|
|
71
|
-
color="
|
|
74
|
+
color={theme["icon-decorative"]}
|
|
72
75
|
/>
|
|
73
76
|
);
|
|
74
77
|
|
|
@@ -19,6 +19,7 @@ import { Badge } from "../badge";
|
|
|
19
19
|
import { IOIcons, Icon } from "../icons";
|
|
20
20
|
import { HStack, VStack } from "../stack";
|
|
21
21
|
import { LabelMini, BodySmall } from "../typography";
|
|
22
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
22
23
|
import { ModuleStatic } from "./ModuleStatic";
|
|
23
24
|
import {
|
|
24
25
|
PressableModuleBase,
|
|
@@ -45,6 +46,7 @@ type ModuleNavigationProps = LoadingProps | BaseProps;
|
|
|
45
46
|
|
|
46
47
|
export const ModuleNavigation = (props: WithTestID<ModuleNavigationProps>) => {
|
|
47
48
|
const theme = useIOTheme();
|
|
49
|
+
const { hugeFontEnabled } = useIOFontDynamicScale();
|
|
48
50
|
|
|
49
51
|
if (props.isLoading) {
|
|
50
52
|
return <ModuleNavigationSkeleton />;
|
|
@@ -53,7 +55,7 @@ export const ModuleNavigation = (props: WithTestID<ModuleNavigationProps>) => {
|
|
|
53
55
|
const { icon, image, title, subtitle, onPress, badge, ...pressableProps } =
|
|
54
56
|
props;
|
|
55
57
|
|
|
56
|
-
const iconComponent = icon && (
|
|
58
|
+
const iconComponent = icon && !hugeFontEnabled && (
|
|
57
59
|
<Icon
|
|
58
60
|
name={icon}
|
|
59
61
|
size={IOSelectionListItemVisualParams.iconSize}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
3
|
import { Pressable } from "react-native";
|
|
4
|
-
import Animated from "react-native-reanimated";
|
|
4
|
+
import Animated, { useReducedMotion } from "react-native-reanimated";
|
|
5
|
+
import { useScaleAnimation } from "../../hooks";
|
|
5
6
|
import {
|
|
6
7
|
IOColors,
|
|
7
8
|
IOModuleIDPSavedVSpacing,
|
|
@@ -9,7 +10,6 @@ import {
|
|
|
9
10
|
useIOTheme
|
|
10
11
|
} from "../../core";
|
|
11
12
|
import { WithTestID } from "../../utils/types";
|
|
12
|
-
import { useModuleSpringAnimation } from "./hooks/useModuleSpringAnimation";
|
|
13
13
|
|
|
14
14
|
export type PressableModuleBaseProps = WithTestID<
|
|
15
15
|
{
|
|
@@ -29,17 +29,24 @@ export const PressableModuleBase = ({
|
|
|
29
29
|
children
|
|
30
30
|
}: PropsWithChildren<PressableModuleBaseProps>) => {
|
|
31
31
|
const theme = useIOTheme();
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const reducedMotion = useReducedMotion();
|
|
33
|
+
const { onPressIn, onPressOut, scaleAnimatedStyle } = useScaleAnimation(
|
|
34
|
+
reducedMotion ? "slight" : "medium"
|
|
35
|
+
);
|
|
36
|
+
/* We use a slight scaleEffect if `reducedMotion` is enabled.
|
|
37
|
+
We don't disable it completely because that's the only
|
|
38
|
+
difference between the two states "default" and "pressed".
|
|
39
|
+
If we remove it, they they won't be able to understand
|
|
40
|
+
if there's an ongoing interaction. */
|
|
34
41
|
|
|
35
42
|
return (
|
|
36
43
|
<Pressable
|
|
37
44
|
onPress={onPress}
|
|
38
45
|
testID={testID}
|
|
39
46
|
accessible={true}
|
|
40
|
-
onPressIn={
|
|
41
|
-
onPressOut={
|
|
42
|
-
onTouchEnd={
|
|
47
|
+
onPressIn={onPressIn}
|
|
48
|
+
onPressOut={onPressOut}
|
|
49
|
+
onTouchEnd={onPressOut}
|
|
43
50
|
accessibilityLabel={accessibilityLabel}
|
|
44
51
|
accessibilityHint={accessibilityHint}
|
|
45
52
|
accessibilityRole="button"
|
|
@@ -49,7 +56,7 @@ export const PressableModuleBase = ({
|
|
|
49
56
|
IOModuleStyles.button,
|
|
50
57
|
{ borderColor: IOColors[theme["cardBorder-default"]] },
|
|
51
58
|
withLooseSpacing && { paddingVertical: IOModuleIDPSavedVSpacing },
|
|
52
|
-
|
|
59
|
+
scaleAnimatedStyle
|
|
53
60
|
]}
|
|
54
61
|
>
|
|
55
62
|
{children}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import React, { memo, useCallback, useMemo } from "react";
|
|
2
2
|
import { Pressable } from "react-native";
|
|
3
3
|
import Animated, {
|
|
4
|
-
Extrapolate,
|
|
5
|
-
interpolate,
|
|
6
4
|
interpolateColor,
|
|
7
5
|
useAnimatedStyle,
|
|
8
|
-
|
|
9
|
-
useSharedValue,
|
|
10
|
-
withSpring
|
|
6
|
+
useReducedMotion
|
|
11
7
|
} from "react-native-reanimated";
|
|
12
8
|
import {
|
|
13
9
|
IOColors,
|
|
14
10
|
IONumberPadButtonStyles,
|
|
15
|
-
IOScaleValues,
|
|
16
|
-
IOSpringValues,
|
|
17
11
|
hexToRgba,
|
|
18
12
|
useIOExperimentalDesign
|
|
19
13
|
} from "../../core";
|
|
14
|
+
import { useScaleAnimation } from "../../hooks";
|
|
20
15
|
import { H3 } from "../typography";
|
|
21
16
|
|
|
22
17
|
type NumberButtonVariantType = "light" | "dark";
|
|
@@ -76,51 +71,24 @@ const legacyColorMap: Record<NumberButtonVariantType, ColorMapVariant> = {
|
|
|
76
71
|
*/
|
|
77
72
|
export const NumberButton = memo(
|
|
78
73
|
({ number, variant, onPress }: NumberButtonProps) => {
|
|
74
|
+
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
75
|
+
useScaleAnimation("slight");
|
|
76
|
+
const reducedMotion = useReducedMotion();
|
|
79
77
|
const { isExperimental } = useIOExperimentalDesign();
|
|
80
78
|
|
|
81
79
|
const colors = useMemo(
|
|
82
80
|
() => (isExperimental ? colorMap[variant] : legacyColorMap[variant]),
|
|
83
81
|
[variant, isExperimental]
|
|
84
82
|
);
|
|
85
|
-
const isPressed = useSharedValue(0);
|
|
86
|
-
// Scaling transformation applied when the button is pressed
|
|
87
|
-
const animationScaleValue = IOScaleValues?.basicButton?.pressedState;
|
|
88
|
-
// Using a spring-based animation for our interpolations
|
|
89
|
-
const progressPressed = useDerivedValue(() =>
|
|
90
|
-
withSpring(isPressed.value, IOSpringValues.button)
|
|
91
|
-
);
|
|
92
83
|
|
|
93
84
|
// Interpolate animation values from `isPressed` values
|
|
94
|
-
const pressedAnimationStyle = useAnimatedStyle(() => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
progressPressed.value,
|
|
85
|
+
const pressedAnimationStyle = useAnimatedStyle(() => ({
|
|
86
|
+
backgroundColor: interpolateColor(
|
|
87
|
+
progress.value,
|
|
98
88
|
[0, 1],
|
|
99
89
|
[colors.background, colors.pressed]
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
// Scale down button slightly when pressed
|
|
103
|
-
const scale = interpolate(
|
|
104
|
-
progressPressed.value,
|
|
105
|
-
[0, 1],
|
|
106
|
-
[1, animationScaleValue],
|
|
107
|
-
Extrapolate.CLAMP
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
return {
|
|
111
|
-
backgroundColor: bgColor,
|
|
112
|
-
transform: [{ scale }]
|
|
113
|
-
};
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const onPressIn = useCallback(() => {
|
|
117
|
-
// eslint-disable-next-line functional/immutable-data
|
|
118
|
-
isPressed.value = 1;
|
|
119
|
-
}, [isPressed]);
|
|
120
|
-
const onPressOut = useCallback(() => {
|
|
121
|
-
// eslint-disable-next-line functional/immutable-data
|
|
122
|
-
isPressed.value = 0;
|
|
123
|
-
}, [isPressed]);
|
|
90
|
+
)
|
|
91
|
+
}));
|
|
124
92
|
|
|
125
93
|
const handleOnPress = useCallback(() => {
|
|
126
94
|
onPress(number);
|
|
@@ -139,7 +107,8 @@ export const NumberButton = memo(
|
|
|
139
107
|
IONumberPadButtonStyles.button,
|
|
140
108
|
IONumberPadButtonStyles.circularShape,
|
|
141
109
|
IONumberPadButtonStyles.buttonSize,
|
|
142
|
-
pressedAnimationStyle
|
|
110
|
+
pressedAnimationStyle,
|
|
111
|
+
!reducedMotion && scaleAnimatedStyle
|
|
143
112
|
]}
|
|
144
113
|
>
|
|
145
114
|
<H3 color={colors.foreground}>{number}</H3>
|
|
@@ -80,6 +80,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
"backgroundColor": undefined,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
83
85
|
"transform": [
|
|
84
86
|
{
|
|
85
87
|
"scale": undefined,
|
|
@@ -90,9 +92,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
90
92
|
}
|
|
91
93
|
>
|
|
92
94
|
<Text
|
|
93
|
-
allowFontScaling={
|
|
95
|
+
allowFontScaling={true}
|
|
94
96
|
dynamicTypeRamp="title2"
|
|
95
|
-
maxFontSizeMultiplier={1.
|
|
97
|
+
maxFontSizeMultiplier={1.5}
|
|
96
98
|
style={
|
|
97
99
|
[
|
|
98
100
|
{},
|
|
@@ -159,6 +161,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
159
161
|
},
|
|
160
162
|
{
|
|
161
163
|
"backgroundColor": undefined,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
162
166
|
"transform": [
|
|
163
167
|
{
|
|
164
168
|
"scale": undefined,
|
|
@@ -169,9 +173,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
169
173
|
}
|
|
170
174
|
>
|
|
171
175
|
<Text
|
|
172
|
-
allowFontScaling={
|
|
176
|
+
allowFontScaling={true}
|
|
173
177
|
dynamicTypeRamp="title2"
|
|
174
|
-
maxFontSizeMultiplier={1.
|
|
178
|
+
maxFontSizeMultiplier={1.5}
|
|
175
179
|
style={
|
|
176
180
|
[
|
|
177
181
|
{},
|
|
@@ -238,6 +242,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
238
242
|
},
|
|
239
243
|
{
|
|
240
244
|
"backgroundColor": undefined,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
241
247
|
"transform": [
|
|
242
248
|
{
|
|
243
249
|
"scale": undefined,
|
|
@@ -248,9 +254,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
248
254
|
}
|
|
249
255
|
>
|
|
250
256
|
<Text
|
|
251
|
-
allowFontScaling={
|
|
257
|
+
allowFontScaling={true}
|
|
252
258
|
dynamicTypeRamp="title2"
|
|
253
|
-
maxFontSizeMultiplier={1.
|
|
259
|
+
maxFontSizeMultiplier={1.5}
|
|
254
260
|
style={
|
|
255
261
|
[
|
|
256
262
|
{},
|
|
@@ -333,6 +339,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
333
339
|
},
|
|
334
340
|
{
|
|
335
341
|
"backgroundColor": undefined,
|
|
342
|
+
},
|
|
343
|
+
{
|
|
336
344
|
"transform": [
|
|
337
345
|
{
|
|
338
346
|
"scale": undefined,
|
|
@@ -343,9 +351,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
343
351
|
}
|
|
344
352
|
>
|
|
345
353
|
<Text
|
|
346
|
-
allowFontScaling={
|
|
354
|
+
allowFontScaling={true}
|
|
347
355
|
dynamicTypeRamp="title2"
|
|
348
|
-
maxFontSizeMultiplier={1.
|
|
356
|
+
maxFontSizeMultiplier={1.5}
|
|
349
357
|
style={
|
|
350
358
|
[
|
|
351
359
|
{},
|
|
@@ -412,6 +420,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
412
420
|
},
|
|
413
421
|
{
|
|
414
422
|
"backgroundColor": undefined,
|
|
423
|
+
},
|
|
424
|
+
{
|
|
415
425
|
"transform": [
|
|
416
426
|
{
|
|
417
427
|
"scale": undefined,
|
|
@@ -422,9 +432,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
422
432
|
}
|
|
423
433
|
>
|
|
424
434
|
<Text
|
|
425
|
-
allowFontScaling={
|
|
435
|
+
allowFontScaling={true}
|
|
426
436
|
dynamicTypeRamp="title2"
|
|
427
|
-
maxFontSizeMultiplier={1.
|
|
437
|
+
maxFontSizeMultiplier={1.5}
|
|
428
438
|
style={
|
|
429
439
|
[
|
|
430
440
|
{},
|
|
@@ -491,6 +501,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
491
501
|
},
|
|
492
502
|
{
|
|
493
503
|
"backgroundColor": undefined,
|
|
504
|
+
},
|
|
505
|
+
{
|
|
494
506
|
"transform": [
|
|
495
507
|
{
|
|
496
508
|
"scale": undefined,
|
|
@@ -501,9 +513,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
501
513
|
}
|
|
502
514
|
>
|
|
503
515
|
<Text
|
|
504
|
-
allowFontScaling={
|
|
516
|
+
allowFontScaling={true}
|
|
505
517
|
dynamicTypeRamp="title2"
|
|
506
|
-
maxFontSizeMultiplier={1.
|
|
518
|
+
maxFontSizeMultiplier={1.5}
|
|
507
519
|
style={
|
|
508
520
|
[
|
|
509
521
|
{},
|
|
@@ -586,6 +598,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
586
598
|
},
|
|
587
599
|
{
|
|
588
600
|
"backgroundColor": undefined,
|
|
601
|
+
},
|
|
602
|
+
{
|
|
589
603
|
"transform": [
|
|
590
604
|
{
|
|
591
605
|
"scale": undefined,
|
|
@@ -596,9 +610,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
596
610
|
}
|
|
597
611
|
>
|
|
598
612
|
<Text
|
|
599
|
-
allowFontScaling={
|
|
613
|
+
allowFontScaling={true}
|
|
600
614
|
dynamicTypeRamp="title2"
|
|
601
|
-
maxFontSizeMultiplier={1.
|
|
615
|
+
maxFontSizeMultiplier={1.5}
|
|
602
616
|
style={
|
|
603
617
|
[
|
|
604
618
|
{},
|
|
@@ -665,6 +679,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
665
679
|
},
|
|
666
680
|
{
|
|
667
681
|
"backgroundColor": undefined,
|
|
682
|
+
},
|
|
683
|
+
{
|
|
668
684
|
"transform": [
|
|
669
685
|
{
|
|
670
686
|
"scale": undefined,
|
|
@@ -675,9 +691,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
675
691
|
}
|
|
676
692
|
>
|
|
677
693
|
<Text
|
|
678
|
-
allowFontScaling={
|
|
694
|
+
allowFontScaling={true}
|
|
679
695
|
dynamicTypeRamp="title2"
|
|
680
|
-
maxFontSizeMultiplier={1.
|
|
696
|
+
maxFontSizeMultiplier={1.5}
|
|
681
697
|
style={
|
|
682
698
|
[
|
|
683
699
|
{},
|
|
@@ -744,6 +760,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
744
760
|
},
|
|
745
761
|
{
|
|
746
762
|
"backgroundColor": undefined,
|
|
763
|
+
},
|
|
764
|
+
{
|
|
747
765
|
"transform": [
|
|
748
766
|
{
|
|
749
767
|
"scale": undefined,
|
|
@@ -754,9 +772,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
754
772
|
}
|
|
755
773
|
>
|
|
756
774
|
<Text
|
|
757
|
-
allowFontScaling={
|
|
775
|
+
allowFontScaling={true}
|
|
758
776
|
dynamicTypeRamp="title2"
|
|
759
|
-
maxFontSizeMultiplier={1.
|
|
777
|
+
maxFontSizeMultiplier={1.5}
|
|
760
778
|
style={
|
|
761
779
|
[
|
|
762
780
|
{},
|
|
@@ -980,6 +998,8 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
980
998
|
},
|
|
981
999
|
{
|
|
982
1000
|
"backgroundColor": undefined,
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
983
1003
|
"transform": [
|
|
984
1004
|
{
|
|
985
1005
|
"scale": undefined,
|
|
@@ -990,9 +1010,9 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
990
1010
|
}
|
|
991
1011
|
>
|
|
992
1012
|
<Text
|
|
993
|
-
allowFontScaling={
|
|
1013
|
+
allowFontScaling={true}
|
|
994
1014
|
dynamicTypeRamp="title2"
|
|
995
|
-
maxFontSizeMultiplier={1.
|
|
1015
|
+
maxFontSizeMultiplier={1.5}
|
|
996
1016
|
style={
|
|
997
1017
|
[
|
|
998
1018
|
{},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { ColorValue } from "react-native";
|
|
3
3
|
import { IOColors, IOThemeDark, IOThemeLight, useIOTheme } from "../../core";
|
|
4
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
4
5
|
|
|
5
6
|
import PictogramAccessDenied from "./svg/PictogramAccessDenied";
|
|
6
7
|
import PictogramActivate from "./svg/PictogramActivate";
|
|
@@ -113,7 +114,7 @@ import PictogramSmile from "./svg/PictogramSmile";
|
|
|
113
114
|
import PictogramStar from "./svg/PictogramStar";
|
|
114
115
|
import PictogramTiming from "./svg/PictogramTiming";
|
|
115
116
|
import PictogramWalletDoc from "./svg/PictogramWalletDoc";
|
|
116
|
-
import {
|
|
117
|
+
import { SVGPictogramProps } from "./types";
|
|
117
118
|
|
|
118
119
|
export const IOPictograms = {
|
|
119
120
|
// Start legacy pictograms //
|
|
@@ -192,6 +193,8 @@ export const IOPictograms = {
|
|
|
192
193
|
|
|
193
194
|
export type IOPictograms = keyof typeof IOPictograms;
|
|
194
195
|
|
|
196
|
+
export type IOPictogramSizeScale = 48 | 64 | 72 | 80 | 120 | 180;
|
|
197
|
+
|
|
195
198
|
type IOPictogramsProps = {
|
|
196
199
|
name: IOPictograms;
|
|
197
200
|
color?: IOColors;
|
|
@@ -200,6 +203,7 @@ type IOPictogramsProps = {
|
|
|
200
203
|
component props. */
|
|
201
204
|
pictogramStyle?: "default" | "light-content" | "dark-content";
|
|
202
205
|
size?: IOPictogramSizeScale | "100%";
|
|
206
|
+
allowFontScaling?: boolean;
|
|
203
207
|
};
|
|
204
208
|
|
|
205
209
|
type PictogramPalette = {
|
|
@@ -214,10 +218,18 @@ export const Pictogram = ({
|
|
|
214
218
|
color = "aqua",
|
|
215
219
|
pictogramStyle = "default",
|
|
216
220
|
size = 120,
|
|
221
|
+
allowFontScaling = false,
|
|
217
222
|
...props
|
|
218
223
|
}: IOPictogramsProps) => {
|
|
219
|
-
const PictogramElement = IOPictograms[name];
|
|
220
224
|
const theme = useIOTheme();
|
|
225
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
226
|
+
|
|
227
|
+
const PictogramElement = IOPictograms[name];
|
|
228
|
+
|
|
229
|
+
const pictogramSize =
|
|
230
|
+
allowFontScaling && typeof size === "number"
|
|
231
|
+
? size * dynamicFontScale * spacingScaleMultiplier
|
|
232
|
+
: size;
|
|
221
233
|
|
|
222
234
|
const themeObj = useMemo(() => {
|
|
223
235
|
switch (pictogramStyle) {
|
|
@@ -243,7 +255,7 @@ export const Pictogram = ({
|
|
|
243
255
|
return (
|
|
244
256
|
<PictogramElement
|
|
245
257
|
{...props}
|
|
246
|
-
size={
|
|
258
|
+
size={pictogramSize}
|
|
247
259
|
color={IOColors[color]}
|
|
248
260
|
colorValues={colorValues}
|
|
249
261
|
/>
|
|
@@ -356,11 +368,18 @@ export const PictogramBleed = ({
|
|
|
356
368
|
color = "aqua",
|
|
357
369
|
size = 80,
|
|
358
370
|
pictogramStyle = "default",
|
|
371
|
+
allowFontScaling = false,
|
|
359
372
|
...props
|
|
360
373
|
}: IOPictogramsProps) => {
|
|
374
|
+
const theme = useIOTheme();
|
|
375
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
376
|
+
|
|
361
377
|
const PictogramElement = IOPictogramsBleed[name as IOPictogramsBleed];
|
|
362
378
|
|
|
363
|
-
const
|
|
379
|
+
const pictogramSize =
|
|
380
|
+
allowFontScaling && typeof size === "number"
|
|
381
|
+
? size * dynamicFontScale * spacingScaleMultiplier
|
|
382
|
+
: size;
|
|
364
383
|
|
|
365
384
|
const themeObj = useMemo(() => {
|
|
366
385
|
switch (pictogramStyle) {
|
|
@@ -386,7 +405,7 @@ export const PictogramBleed = ({
|
|
|
386
405
|
return (
|
|
387
406
|
<PictogramElement
|
|
388
407
|
{...props}
|
|
389
|
-
size={
|
|
408
|
+
size={pictogramSize}
|
|
390
409
|
color={IOColors[color]}
|
|
391
410
|
colorValues={colorValues}
|
|
392
411
|
/>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ColorValue } from "react-native";
|
|
2
2
|
|
|
3
|
-
export type IOPictogramSizeScale = 48 | 64 | 72 | 80 | 120 | 180;
|
|
4
|
-
|
|
5
3
|
export type SVGPictogramProps = {
|
|
6
|
-
size:
|
|
4
|
+
size: number | "100%";
|
|
7
5
|
color: ColorValue;
|
|
8
6
|
colorValues: Record<string, ColorValue>;
|
|
9
7
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Pressable,
|
|
4
|
+
PressableProps,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
View,
|
|
7
|
+
ViewStyle
|
|
8
|
+
} from "react-native";
|
|
3
9
|
import Animated, {
|
|
4
10
|
Easing,
|
|
5
11
|
interpolate,
|
|
@@ -18,32 +24,23 @@ import {
|
|
|
18
24
|
import { AnimatedTick } from "../common/AnimatedTick";
|
|
19
25
|
|
|
20
26
|
type Props = {
|
|
27
|
+
size: number;
|
|
21
28
|
checked?: boolean;
|
|
22
29
|
};
|
|
23
30
|
|
|
24
31
|
type OwnProps = Props & Pick<PressableProps, "disabled" | "onPress">;
|
|
25
32
|
|
|
26
33
|
const styles = StyleSheet.create({
|
|
27
|
-
radioWrapper: {
|
|
28
|
-
width: IOSelectionTickVisualParams.size,
|
|
29
|
-
height: IOSelectionTickVisualParams.size
|
|
30
|
-
},
|
|
31
34
|
radioBorder: {
|
|
32
35
|
position: "absolute",
|
|
33
36
|
left: 0,
|
|
34
37
|
top: 0,
|
|
35
|
-
|
|
36
|
-
height: IOSelectionTickVisualParams.size,
|
|
37
|
-
borderWidth: IOSelectionTickVisualParams.borderWidth,
|
|
38
|
-
borderRadius: IOSelectionTickVisualParams.size / 2
|
|
38
|
+
borderWidth: IOSelectionTickVisualParams.borderWidth
|
|
39
39
|
},
|
|
40
40
|
radioCircle: {
|
|
41
41
|
position: "absolute",
|
|
42
42
|
left: 0,
|
|
43
|
-
top: 0
|
|
44
|
-
width: IOSelectionTickVisualParams.size,
|
|
45
|
-
height: IOSelectionTickVisualParams.size,
|
|
46
|
-
borderRadius: IOSelectionTickVisualParams.size / 2
|
|
43
|
+
top: 0
|
|
47
44
|
}
|
|
48
45
|
});
|
|
49
46
|
|
|
@@ -51,7 +48,12 @@ const styles = StyleSheet.create({
|
|
|
51
48
|
* An animated checkbox. This can be used to implement a
|
|
52
49
|
* standard {@link CheckBox} or other composite components.
|
|
53
50
|
*/
|
|
54
|
-
export const AnimatedRadio = ({
|
|
51
|
+
export const AnimatedRadio = ({
|
|
52
|
+
size,
|
|
53
|
+
checked,
|
|
54
|
+
onPress,
|
|
55
|
+
disabled
|
|
56
|
+
}: OwnProps) => {
|
|
55
57
|
const isChecked = checked ?? false;
|
|
56
58
|
|
|
57
59
|
const { isExperimental } = useIOExperimentalDesign();
|
|
@@ -76,6 +78,17 @@ export const AnimatedRadio = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
76
78
|
const circleAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
77
79
|
const tickAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
78
80
|
|
|
81
|
+
const radioButtonSizeStyle: ViewStyle = {
|
|
82
|
+
width: size,
|
|
83
|
+
height: size,
|
|
84
|
+
borderRadius: size / 2
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const radioButtonWrapperSizeStyle: ViewStyle = {
|
|
88
|
+
width: size,
|
|
89
|
+
height: size
|
|
90
|
+
};
|
|
91
|
+
|
|
79
92
|
useEffect(() => {
|
|
80
93
|
// eslint-disable-next-line functional/immutable-data
|
|
81
94
|
circleAnimationProgress.value = withSpring(
|
|
@@ -105,11 +118,12 @@ export const AnimatedRadio = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
105
118
|
disabled={disabled}
|
|
106
119
|
testID="AnimatedRadioInput"
|
|
107
120
|
onPress={onPress}
|
|
108
|
-
style={
|
|
121
|
+
style={radioButtonWrapperSizeStyle}
|
|
109
122
|
>
|
|
110
123
|
<View
|
|
111
124
|
style={[
|
|
112
125
|
styles.radioBorder,
|
|
126
|
+
radioButtonSizeStyle,
|
|
113
127
|
{
|
|
114
128
|
borderColor: borderColorProp
|
|
115
129
|
}
|
|
@@ -118,6 +132,7 @@ export const AnimatedRadio = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
118
132
|
<Animated.View
|
|
119
133
|
style={[
|
|
120
134
|
styles.radioCircle,
|
|
135
|
+
radioButtonSizeStyle,
|
|
121
136
|
{
|
|
122
137
|
backgroundColor: backgroundColorProp
|
|
123
138
|
},
|
|
@@ -127,6 +142,7 @@ export const AnimatedRadio = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
127
142
|
{isChecked && (
|
|
128
143
|
<View>
|
|
129
144
|
<AnimatedTick
|
|
145
|
+
size={size}
|
|
130
146
|
progress={tickAnimationProgress}
|
|
131
147
|
stroke={IOColors[IOSelectionTickVisualParams.tickColor]}
|
|
132
148
|
/>
|