@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,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,
|
|
@@ -8,6 +14,7 @@ import Animated, {
|
|
|
8
14
|
withSpring,
|
|
9
15
|
withTiming
|
|
10
16
|
} from "react-native-reanimated";
|
|
17
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
11
18
|
import { useIOExperimentalDesign } from "../../core";
|
|
12
19
|
import { IOSpringValues } from "../../core/IOAnimations";
|
|
13
20
|
import { IOColors } from "../../core/IOColors";
|
|
@@ -18,6 +25,7 @@ import {
|
|
|
18
25
|
import { AnimatedTick } from "../common/AnimatedTick";
|
|
19
26
|
|
|
20
27
|
type Props = {
|
|
28
|
+
size: number;
|
|
21
29
|
checked?: boolean;
|
|
22
30
|
};
|
|
23
31
|
|
|
@@ -26,28 +34,18 @@ type OwnProps = Props & Pick<PressableProps, "disabled" | "onPress">;
|
|
|
26
34
|
const checkBoxRadius: number = 5;
|
|
27
35
|
|
|
28
36
|
const styles = StyleSheet.create({
|
|
29
|
-
checkBoxWrapper: {
|
|
30
|
-
width: IOSelectionTickVisualParams.size,
|
|
31
|
-
height: IOSelectionTickVisualParams.size
|
|
32
|
-
},
|
|
33
37
|
checkboxBorder: {
|
|
38
|
+
borderWidth: IOSelectionTickVisualParams.borderWidth,
|
|
39
|
+
borderCurve: "continuous",
|
|
34
40
|
position: "absolute",
|
|
35
41
|
left: 0,
|
|
36
|
-
top: 0
|
|
37
|
-
width: IOSelectionTickVisualParams.size,
|
|
38
|
-
height: IOSelectionTickVisualParams.size,
|
|
39
|
-
borderWidth: IOSelectionTickVisualParams.borderWidth,
|
|
40
|
-
borderRadius: checkBoxRadius,
|
|
41
|
-
borderCurve: "continuous"
|
|
42
|
+
top: 0
|
|
42
43
|
},
|
|
43
44
|
checkBoxSquare: {
|
|
45
|
+
borderCurve: "continuous",
|
|
44
46
|
position: "absolute",
|
|
45
47
|
left: 0,
|
|
46
|
-
top: 0
|
|
47
|
-
width: IOSelectionTickVisualParams.size,
|
|
48
|
-
height: IOSelectionTickVisualParams.size,
|
|
49
|
-
borderRadius: checkBoxRadius,
|
|
50
|
-
borderCurve: "continuous"
|
|
48
|
+
top: 0
|
|
51
49
|
}
|
|
52
50
|
});
|
|
53
51
|
|
|
@@ -55,7 +53,13 @@ const styles = StyleSheet.create({
|
|
|
55
53
|
* An animated checkbox. This can be used to implement a
|
|
56
54
|
* standard {@link CheckBox} or other composite components.
|
|
57
55
|
*/
|
|
58
|
-
export const AnimatedCheckbox = ({
|
|
56
|
+
export const AnimatedCheckbox = ({
|
|
57
|
+
size,
|
|
58
|
+
checked,
|
|
59
|
+
onPress,
|
|
60
|
+
disabled
|
|
61
|
+
}: OwnProps) => {
|
|
62
|
+
const { dynamicFontScale } = useIOFontDynamicScale();
|
|
59
63
|
const isChecked = checked ?? false;
|
|
60
64
|
|
|
61
65
|
const { isExperimental } = useIOExperimentalDesign();
|
|
@@ -80,6 +84,17 @@ export const AnimatedCheckbox = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
80
84
|
const squareAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
81
85
|
const tickAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
82
86
|
|
|
87
|
+
const checkboxSizeStyle: ViewStyle = {
|
|
88
|
+
width: size,
|
|
89
|
+
height: size,
|
|
90
|
+
borderRadius: checkBoxRadius * dynamicFontScale
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const checkboxWrapperSizeStyle: ViewStyle = {
|
|
94
|
+
width: size,
|
|
95
|
+
height: size
|
|
96
|
+
};
|
|
97
|
+
|
|
83
98
|
useEffect(() => {
|
|
84
99
|
// eslint-disable-next-line functional/immutable-data
|
|
85
100
|
squareAnimationProgress.value = withSpring(
|
|
@@ -108,12 +123,13 @@ export const AnimatedCheckbox = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
108
123
|
accessible={false}
|
|
109
124
|
disabled={disabled}
|
|
110
125
|
onPress={onPress}
|
|
111
|
-
style={
|
|
126
|
+
style={checkboxWrapperSizeStyle}
|
|
112
127
|
testID="AnimatedCheckboxInput"
|
|
113
128
|
>
|
|
114
129
|
<View
|
|
115
130
|
style={[
|
|
116
131
|
styles.checkboxBorder,
|
|
132
|
+
checkboxSizeStyle,
|
|
117
133
|
{
|
|
118
134
|
borderColor: borderColorProp
|
|
119
135
|
}
|
|
@@ -122,6 +138,7 @@ export const AnimatedCheckbox = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
122
138
|
<Animated.View
|
|
123
139
|
style={[
|
|
124
140
|
styles.checkBoxSquare,
|
|
141
|
+
checkboxSizeStyle,
|
|
125
142
|
{
|
|
126
143
|
backgroundColor: backgroundColorProp
|
|
127
144
|
},
|
|
@@ -131,6 +148,7 @@ export const AnimatedCheckbox = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
131
148
|
{isChecked && (
|
|
132
149
|
<View style={{ zIndex: 1 }}>
|
|
133
150
|
<AnimatedTick
|
|
151
|
+
size={size}
|
|
134
152
|
progress={tickAnimationProgress}
|
|
135
153
|
stroke={IOColors[IOSelectionTickVisualParams.tickColor]}
|
|
136
154
|
/>
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useState } from "react";
|
|
2
|
+
import { ComponentProps, useState } from "react";
|
|
3
3
|
import { Pressable, View } from "react-native";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
IOSelectionTickVisualParams,
|
|
6
|
+
IOSpacingScale,
|
|
7
|
+
useIOTheme
|
|
8
|
+
} from "../../core";
|
|
6
9
|
import { triggerHaptic } from "../../functions/haptic-feedback/hapticFeedback";
|
|
7
|
-
import {
|
|
10
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
11
|
+
import { HStack } from "../stack";
|
|
8
12
|
import { H6 } from "../typography/H6";
|
|
9
13
|
import { AnimatedCheckbox } from "./AnimatedCheckbox";
|
|
10
14
|
|
|
@@ -15,12 +19,13 @@ type Props = {
|
|
|
15
19
|
};
|
|
16
20
|
|
|
17
21
|
const DISABLED_OPACITY = 0.5;
|
|
22
|
+
const CHECKBOX_MARGIN: IOSpacingScale = 8;
|
|
18
23
|
|
|
19
24
|
// disabled: the component is no longer touchable
|
|
20
25
|
// onPress:
|
|
21
26
|
type OwnProps = Props &
|
|
22
|
-
Pick<
|
|
23
|
-
Pick<
|
|
27
|
+
Pick<ComponentProps<typeof AnimatedCheckbox>, "disabled" | "checked"> &
|
|
28
|
+
Pick<ComponentProps<typeof Pressable>, "onPress">;
|
|
24
29
|
|
|
25
30
|
/**
|
|
26
31
|
* A checkbox with the automatic state management that uses a {@link AnimatedCheckBox}
|
|
@@ -36,6 +41,7 @@ export const CheckboxLabel = ({
|
|
|
36
41
|
onValueChange
|
|
37
42
|
}: OwnProps) => {
|
|
38
43
|
const theme = useIOTheme();
|
|
44
|
+
const { dynamicFontScale } = useIOFontDynamicScale();
|
|
39
45
|
|
|
40
46
|
const [toggleValue, setToggleValue] = useState(checked ?? false);
|
|
41
47
|
|
|
@@ -65,7 +71,11 @@ export const CheckboxLabel = ({
|
|
|
65
71
|
// inheritance on Android
|
|
66
72
|
needsOffscreenAlphaCompositing={true}
|
|
67
73
|
>
|
|
68
|
-
<
|
|
74
|
+
<HStack
|
|
75
|
+
allowScaleSpacing
|
|
76
|
+
style={{ alignItems: "center", width: "100%" }}
|
|
77
|
+
space={CHECKBOX_MARGIN}
|
|
78
|
+
>
|
|
69
79
|
<View
|
|
70
80
|
pointerEvents="none"
|
|
71
81
|
accessibilityElementsHidden
|
|
@@ -74,13 +84,15 @@ export const CheckboxLabel = ({
|
|
|
74
84
|
alignSelf: "flex-start"
|
|
75
85
|
}}
|
|
76
86
|
>
|
|
77
|
-
<AnimatedCheckbox
|
|
87
|
+
<AnimatedCheckbox
|
|
88
|
+
size={IOSelectionTickVisualParams.size * dynamicFontScale}
|
|
89
|
+
checked={checked ?? toggleValue}
|
|
90
|
+
/>
|
|
78
91
|
</View>
|
|
79
|
-
<HSpacer size={8} />
|
|
80
92
|
<H6 style={{ flexShrink: 1 }} color={theme["textBody-default"]}>
|
|
81
93
|
{label}
|
|
82
94
|
</H6>
|
|
83
|
-
</
|
|
95
|
+
</HStack>
|
|
84
96
|
</Pressable>
|
|
85
97
|
);
|
|
86
98
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import Animated, {
|
|
3
|
+
SharedValue,
|
|
3
4
|
useAnimatedProps,
|
|
4
5
|
useAnimatedRef
|
|
5
6
|
} from "react-native-reanimated";
|
|
@@ -8,7 +9,8 @@ import Svg, { Path, PathProps } from "react-native-svg";
|
|
|
8
9
|
const AnimatedPath = Animated.createAnimatedComponent(Path);
|
|
9
10
|
|
|
10
11
|
interface AnimatedTickProps extends PathProps {
|
|
11
|
-
|
|
12
|
+
size?: number;
|
|
13
|
+
progress: SharedValue<number>;
|
|
12
14
|
onLayout?: () => void;
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -20,7 +22,11 @@ const TickSVGPath = "m7 12 4 4 7-7";
|
|
|
20
22
|
* It comes without any state logic.
|
|
21
23
|
*
|
|
22
24
|
*/
|
|
23
|
-
export const AnimatedTick = ({
|
|
25
|
+
export const AnimatedTick = ({
|
|
26
|
+
size,
|
|
27
|
+
progress,
|
|
28
|
+
...pathProps
|
|
29
|
+
}: AnimatedTickProps) => {
|
|
24
30
|
const [length, setLength] = useState(0);
|
|
25
31
|
const ref = useAnimatedRef();
|
|
26
32
|
|
|
@@ -38,7 +44,7 @@ export const AnimatedTick = ({ progress, ...pathProps }: AnimatedTickProps) => {
|
|
|
38
44
|
};
|
|
39
45
|
|
|
40
46
|
return (
|
|
41
|
-
<Svg viewBox=
|
|
47
|
+
<Svg viewBox={`0 0 24 24`} {...(size ? { width: size, height: size } : {})}>
|
|
42
48
|
<AnimatedPath
|
|
43
49
|
ref={ref}
|
|
44
50
|
onLayout={onLayout}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { IOColors } from "../../core";
|
|
3
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
4
|
+
import { findFirstCaseInsensitive } from "../../utils/object";
|
|
3
5
|
import { IOIconSizeScale, Icon } from "../icons";
|
|
4
6
|
import {
|
|
5
7
|
IOLogoPaymentExtType,
|
|
@@ -9,7 +11,6 @@ import {
|
|
|
9
11
|
LogoPayment,
|
|
10
12
|
LogoPaymentExt
|
|
11
13
|
} from "../logos";
|
|
12
|
-
import { findFirstCaseInsensitive } from "../../utils/object";
|
|
13
14
|
|
|
14
15
|
export type LogoPaymentWithFallback = {
|
|
15
16
|
brand?: string;
|
|
@@ -38,21 +39,42 @@ export const LogoPaymentWithFallback = ({
|
|
|
38
39
|
isExtended = false,
|
|
39
40
|
size = isExtended ? 48 : 24
|
|
40
41
|
}: LogoPaymentWithFallback) => {
|
|
42
|
+
const { dynamicFontScale } = useIOFontDynamicScale();
|
|
41
43
|
const logos = isExtended ? IOPaymentExtLogos : IOPaymentLogos;
|
|
42
44
|
|
|
43
45
|
if (!brand) {
|
|
44
|
-
return
|
|
46
|
+
return (
|
|
47
|
+
<Icon
|
|
48
|
+
allowFontScaling
|
|
49
|
+
name="creditCard"
|
|
50
|
+
size={size}
|
|
51
|
+
color={fallbackIconColor}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
const findCase = findFirstCaseInsensitive(logos, brand);
|
|
48
57
|
|
|
49
58
|
if (!findCase) {
|
|
50
|
-
return
|
|
59
|
+
return (
|
|
60
|
+
<Icon
|
|
61
|
+
allowFontScaling
|
|
62
|
+
name="creditCard"
|
|
63
|
+
size={size}
|
|
64
|
+
color={fallbackIconColor}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
51
67
|
}
|
|
52
68
|
|
|
53
69
|
return isExtended ? (
|
|
54
|
-
<LogoPaymentExt
|
|
70
|
+
<LogoPaymentExt
|
|
71
|
+
name={findCase as IOLogoPaymentExtType}
|
|
72
|
+
size={size * dynamicFontScale}
|
|
73
|
+
/>
|
|
55
74
|
) : (
|
|
56
|
-
<LogoPayment
|
|
75
|
+
<LogoPayment
|
|
76
|
+
name={findCase as IOLogoPaymentType}
|
|
77
|
+
size={size * dynamicFontScale}
|
|
78
|
+
/>
|
|
57
79
|
);
|
|
58
80
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
-
import { GestureResponderEvent
|
|
2
|
+
import { GestureResponderEvent } from "react-native";
|
|
3
3
|
import {
|
|
4
4
|
BodySmall,
|
|
5
|
-
|
|
5
|
+
HStack,
|
|
6
6
|
IOIconSizeScale,
|
|
7
7
|
IOIcons,
|
|
8
8
|
IOPictogramSizeScale,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Pictogram,
|
|
12
12
|
VStack
|
|
13
13
|
} from "../../components";
|
|
14
|
-
import {
|
|
14
|
+
import { useIOTheme } from "../../core";
|
|
15
15
|
|
|
16
16
|
type PartialFeatureInfo = {
|
|
17
17
|
// Necessary to render main body with different formatting
|
|
@@ -57,24 +57,28 @@ export const FeatureInfo = ({
|
|
|
57
57
|
const theme = useIOTheme();
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
|
-
<
|
|
60
|
+
<HStack style={{ alignItems: "center" }} space={24}>
|
|
61
61
|
{iconName && (
|
|
62
62
|
<Icon
|
|
63
|
+
allowFontScaling
|
|
63
64
|
name={iconName}
|
|
64
65
|
size={DEFAULT_ICON_SIZE}
|
|
65
66
|
color={theme["icon-decorative"]}
|
|
66
67
|
/>
|
|
67
68
|
)}
|
|
68
69
|
{pictogramName && (
|
|
69
|
-
<Pictogram
|
|
70
|
+
<Pictogram
|
|
71
|
+
allowFontScaling
|
|
72
|
+
name={pictogramName}
|
|
73
|
+
size={DEFAULT_PICTOGRAM_SIZE}
|
|
74
|
+
/>
|
|
70
75
|
)}
|
|
71
|
-
<
|
|
72
|
-
<VStack space={4} style={{ flexShrink: 1 }}>
|
|
76
|
+
<VStack allowScaleSpacing space={4} style={{ flexShrink: 1 }}>
|
|
73
77
|
{renderNode(body)}
|
|
74
78
|
{action && (
|
|
75
79
|
<BodySmall
|
|
76
|
-
weight="Semibold"
|
|
77
80
|
asLink
|
|
81
|
+
weight="Semibold"
|
|
78
82
|
onPress={action.onPress}
|
|
79
83
|
accessible
|
|
80
84
|
importantForAccessibility={"yes"}
|
|
@@ -84,6 +88,6 @@ export const FeatureInfo = ({
|
|
|
84
88
|
</BodySmall>
|
|
85
89
|
)}
|
|
86
90
|
</VStack>
|
|
87
|
-
</
|
|
91
|
+
</HStack>
|
|
88
92
|
);
|
|
89
93
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ColorValue } from "react-native";
|
|
3
3
|
import { IOColors } from "../../core/IOColors";
|
|
4
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
4
5
|
|
|
5
6
|
/* Icons */
|
|
6
7
|
import IconAbacus from "./svg/IconAbacus";
|
|
@@ -51,6 +52,7 @@ import IconChevronRight from "./svg/IconChevronRight";
|
|
|
51
52
|
import IconChevronRightListItem from "./svg/IconChevronRightListItem";
|
|
52
53
|
import IconChevronTop from "./svg/IconChevronTop";
|
|
53
54
|
import IconCie from "./svg/IconCie";
|
|
55
|
+
import IconCieLetter from "./svg/IconCieLetter";
|
|
54
56
|
import IconCloseLarge from "./svg/IconCloseLarge";
|
|
55
57
|
import IconCloseMedium from "./svg/IconCloseMedium";
|
|
56
58
|
import IconCloseSmall from "./svg/IconCloseSmall";
|
|
@@ -200,7 +202,6 @@ import LegIconCheckOff from "./svg/LegIconCheckOff";
|
|
|
200
202
|
import LegIconCheckOn from "./svg/LegIconCheckOn";
|
|
201
203
|
import LegIconRadioOff from "./svg/LegIconRadioOff";
|
|
202
204
|
import LegIconRadioOn from "./svg/LegIconRadioOn";
|
|
203
|
-
import IconCieLetter from "./svg/IconCieLetter";
|
|
204
205
|
|
|
205
206
|
export const IOIcons = {
|
|
206
207
|
spid: IconSpid,
|
|
@@ -406,10 +407,7 @@ export const IOIcons = {
|
|
|
406
407
|
|
|
407
408
|
export type IOIcons = keyof typeof IOIcons;
|
|
408
409
|
|
|
409
|
-
|
|
410
|
-
/* 96 is too big for an icon, it should be replaced
|
|
411
|
-
with a Pictogram instead */
|
|
412
|
-
export type IOIconSizeScale = 12 | 16 | 20 | 24 | 30 | 32 | 48 | 96;
|
|
410
|
+
export type IOIconSizeScale = 16 | 20 | 24 | 32 | 48;
|
|
413
411
|
/* Sizes used exclusively for the Checkbox component */
|
|
414
412
|
export type IOIconSizeScaleCheckbox = 14 | 18;
|
|
415
413
|
|
|
@@ -420,6 +418,7 @@ export type IOIconsProps = {
|
|
|
420
418
|
testID?: string;
|
|
421
419
|
accessible?: boolean;
|
|
422
420
|
accessibilityLabel?: string;
|
|
421
|
+
allowFontScaling?: boolean;
|
|
423
422
|
};
|
|
424
423
|
|
|
425
424
|
/*
|
|
@@ -432,15 +431,23 @@ export const Icon = ({
|
|
|
432
431
|
size = 24,
|
|
433
432
|
accessible = false,
|
|
434
433
|
accessibilityLabel = "",
|
|
434
|
+
allowFontScaling = false,
|
|
435
435
|
...props
|
|
436
436
|
}: IOIconsProps) => {
|
|
437
|
+
const { dynamicFontScale } = useIOFontDynamicScale();
|
|
438
|
+
|
|
437
439
|
const IconElement = IOIcons[name];
|
|
438
440
|
const isAccessible = accessible && accessibilityLabel.trim().length > 0;
|
|
441
|
+
const iconSize =
|
|
442
|
+
allowFontScaling && typeof size === "number"
|
|
443
|
+
? size * dynamicFontScale
|
|
444
|
+
: size;
|
|
445
|
+
|
|
439
446
|
return (
|
|
440
447
|
<IconElement
|
|
441
448
|
{...props}
|
|
442
449
|
style={{ color: IOColors[color] }}
|
|
443
|
-
size={
|
|
450
|
+
size={iconSize}
|
|
444
451
|
accessible={isAccessible}
|
|
445
452
|
accessibilityElementsHidden={!isAccessible}
|
|
446
453
|
accessibilityLabel={accessibilityLabel}
|
|
@@ -459,6 +466,7 @@ type IOAnimatedIconsProps = {
|
|
|
459
466
|
color?: ColorValue;
|
|
460
467
|
size?: IOIconSizeScale | "100%";
|
|
461
468
|
accessible?: boolean;
|
|
469
|
+
allowFontScaling?: boolean;
|
|
462
470
|
};
|
|
463
471
|
|
|
464
472
|
export const AnimatedIcon = ({
|
|
@@ -466,14 +474,22 @@ export const AnimatedIcon = ({
|
|
|
466
474
|
color = IOColors.bluegrey,
|
|
467
475
|
size = 24,
|
|
468
476
|
accessible = false,
|
|
477
|
+
allowFontScaling = false,
|
|
469
478
|
...props
|
|
470
479
|
}: IOAnimatedIconsProps) => {
|
|
480
|
+
const { dynamicFontScale } = useIOFontDynamicScale();
|
|
481
|
+
|
|
471
482
|
const IconElement = IOIcons[name];
|
|
483
|
+
const iconSize =
|
|
484
|
+
allowFontScaling && typeof size === "number"
|
|
485
|
+
? size * dynamicFontScale
|
|
486
|
+
: size;
|
|
487
|
+
|
|
472
488
|
return (
|
|
473
489
|
<IconElement
|
|
474
490
|
{...props}
|
|
475
491
|
style={{ color }}
|
|
476
|
-
size={
|
|
492
|
+
size={iconSize}
|
|
477
493
|
accessible={accessible}
|
|
478
494
|
accessibilityElementsHidden={true}
|
|
479
495
|
accessibilityLabel={""}
|
|
@@ -15,13 +15,12 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
|
15
15
|
import {
|
|
16
16
|
alertEdgeToEdgeInsetTransitionConfig,
|
|
17
17
|
IOColors,
|
|
18
|
-
IOStyles,
|
|
19
18
|
IOVisualCostants,
|
|
20
19
|
useIOTheme
|
|
21
20
|
} from "../../core";
|
|
22
21
|
import { WithTestID } from "../../utils/types";
|
|
23
22
|
import { IconButton } from "../buttons";
|
|
24
|
-
import {
|
|
23
|
+
import { HStack } from "../stack";
|
|
25
24
|
import { H3 } from "../typography";
|
|
26
25
|
import { HeaderActionProps } from "./common";
|
|
27
26
|
|
|
@@ -136,27 +135,18 @@ export const HeaderFirstLevel = ({
|
|
|
136
135
|
{title}
|
|
137
136
|
</H3>
|
|
138
137
|
</View>
|
|
139
|
-
<
|
|
138
|
+
<HStack space={16} style={{ flexShrink: 0 }}>
|
|
140
139
|
{type === "threeActions" && (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
/>
|
|
146
|
-
{/* Ideally, with the "gap" flex property,
|
|
147
|
-
we can get rid of these ugly constructs */}
|
|
148
|
-
<HSpacer size={16} />
|
|
149
|
-
</>
|
|
140
|
+
<IconButton
|
|
141
|
+
{...thirdAction}
|
|
142
|
+
color={backgroundColor === "dark" ? "contrast" : "primary"}
|
|
143
|
+
/>
|
|
150
144
|
)}
|
|
151
145
|
{(type === "twoActions" || type === "threeActions") && (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
/>
|
|
157
|
-
{/* Same as above */}
|
|
158
|
-
<HSpacer size={16} />
|
|
159
|
-
</>
|
|
146
|
+
<IconButton
|
|
147
|
+
{...secondAction}
|
|
148
|
+
color={backgroundColor === "dark" ? "contrast" : "primary"}
|
|
149
|
+
/>
|
|
160
150
|
)}
|
|
161
151
|
{type !== "base" && (
|
|
162
152
|
<IconButton
|
|
@@ -164,7 +154,7 @@ export const HeaderFirstLevel = ({
|
|
|
164
154
|
color={backgroundColor === "dark" ? "contrast" : "primary"}
|
|
165
155
|
/>
|
|
166
156
|
)}
|
|
167
|
-
</
|
|
157
|
+
</HStack>
|
|
168
158
|
</View>
|
|
169
159
|
</Animated.View>
|
|
170
160
|
);
|
|
@@ -24,7 +24,6 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
|
24
24
|
import {
|
|
25
25
|
IOColors,
|
|
26
26
|
IOSpringValues,
|
|
27
|
-
IOStyles,
|
|
28
27
|
IOVisualCostants,
|
|
29
28
|
alertEdgeToEdgeInsetTransitionConfig,
|
|
30
29
|
hexToRgba,
|
|
@@ -37,6 +36,7 @@ import type { IOSpacer, IOSpacingScale } from "../../core/IOSpacing";
|
|
|
37
36
|
import { WithTestID } from "../../utils/types";
|
|
38
37
|
import IconButton from "../buttons/IconButton";
|
|
39
38
|
import { HSpacer } from "../spacer";
|
|
39
|
+
import { HStack } from "../stack";
|
|
40
40
|
import { IOText } from "../typography";
|
|
41
41
|
import { HeaderActionProps } from "./common";
|
|
42
42
|
|
|
@@ -310,28 +310,19 @@ export const HeaderSecondLevel = ({
|
|
|
310
310
|
{title}
|
|
311
311
|
</AnimatedIOText>
|
|
312
312
|
</View>
|
|
313
|
-
<
|
|
313
|
+
<HStack allowScaleSpacing space={16} style={{ flexShrink: 0 }}>
|
|
314
314
|
{type === "threeActions" && (
|
|
315
|
-
|
|
316
|
-
<IconButton {...thirdAction} color={iconButtonColor} />
|
|
317
|
-
{/* Same as above */}
|
|
318
|
-
<HSpacer size={16} />
|
|
319
|
-
</>
|
|
315
|
+
<IconButton {...thirdAction} color={iconButtonColor} />
|
|
320
316
|
)}
|
|
321
317
|
{(type === "twoActions" || type === "threeActions") && (
|
|
322
|
-
|
|
323
|
-
<IconButton {...secondAction} color={iconButtonColor} />
|
|
324
|
-
{/* Ideally, with the "gap" flex property,
|
|
325
|
-
we can get rid of these ugly constructs */}
|
|
326
|
-
<HSpacer size={16} />
|
|
327
|
-
</>
|
|
318
|
+
<IconButton {...secondAction} color={iconButtonColor} />
|
|
328
319
|
)}
|
|
329
320
|
{type !== "base" ? (
|
|
330
321
|
<IconButton {...firstAction} color={iconButtonColor} />
|
|
331
322
|
) : (
|
|
332
323
|
<HSpacer size={iconBtnSizeSmall as IOSpacer} />
|
|
333
324
|
)}
|
|
334
|
-
</
|
|
325
|
+
</HStack>
|
|
335
326
|
</Animated.View>
|
|
336
327
|
</Animated.View>
|
|
337
328
|
);
|