@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,10 +1,10 @@
|
|
|
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 { useIOTheme } from "../../core";
|
|
4
|
+
import { IOSelectionTickVisualParams, useIOTheme } from "../../core";
|
|
5
5
|
import { IOStyles } from "../../core/IOStyles";
|
|
6
6
|
import { triggerHaptic } from "../../functions/haptic-feedback/hapticFeedback";
|
|
7
|
-
import {
|
|
7
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
8
8
|
import { H6 } from "../typography/H6";
|
|
9
9
|
import { AnimatedRadio } from "./AnimatedRadio";
|
|
10
10
|
|
|
@@ -17,9 +17,9 @@ type Props = {
|
|
|
17
17
|
const DISABLED_OPACITY = 0.5;
|
|
18
18
|
|
|
19
19
|
type RadioButtonLabelProps = Props &
|
|
20
|
-
Pick<
|
|
20
|
+
Pick<ComponentProps<typeof AnimatedRadio>, "disabled" | "checked"> &
|
|
21
21
|
Pick<
|
|
22
|
-
|
|
22
|
+
ComponentProps<typeof Pressable>,
|
|
23
23
|
"onPress" | "accessibilityLabel" | "accessibilityHint"
|
|
24
24
|
>;
|
|
25
25
|
|
|
@@ -38,6 +38,7 @@ export const RadioButtonLabel = ({
|
|
|
38
38
|
accessibilityLabel,
|
|
39
39
|
accessibilityHint
|
|
40
40
|
}: RadioButtonLabelProps) => {
|
|
41
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
41
42
|
const theme = useIOTheme();
|
|
42
43
|
|
|
43
44
|
const [toggleValue, setToggleValue] = useState(checked ?? false);
|
|
@@ -70,7 +71,12 @@ export const RadioButtonLabel = ({
|
|
|
70
71
|
<View
|
|
71
72
|
style={[
|
|
72
73
|
IOStyles.row,
|
|
73
|
-
{
|
|
74
|
+
{
|
|
75
|
+
alignItems: "flex-start",
|
|
76
|
+
flexShrink: 1,
|
|
77
|
+
width: "100%",
|
|
78
|
+
columnGap: 8 * dynamicFontScale * spacingScaleMultiplier
|
|
79
|
+
}
|
|
74
80
|
]}
|
|
75
81
|
>
|
|
76
82
|
<View
|
|
@@ -78,9 +84,11 @@ export const RadioButtonLabel = ({
|
|
|
78
84
|
accessibilityElementsHidden
|
|
79
85
|
importantForAccessibility="no-hide-descendants"
|
|
80
86
|
>
|
|
81
|
-
<AnimatedRadio
|
|
87
|
+
<AnimatedRadio
|
|
88
|
+
size={IOSelectionTickVisualParams.size * dynamicFontScale}
|
|
89
|
+
checked={checked ?? toggleValue}
|
|
90
|
+
/>
|
|
82
91
|
</View>
|
|
83
|
-
<HSpacer size={8} />
|
|
84
92
|
<H6 style={{ flexShrink: 1 }} color={theme["textBody-default"]}>
|
|
85
93
|
{label}
|
|
86
94
|
</H6>
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "react-native";
|
|
22
22
|
import Animated, {
|
|
23
23
|
Easing,
|
|
24
|
-
|
|
24
|
+
Extrapolation,
|
|
25
25
|
interpolate,
|
|
26
26
|
interpolateColor,
|
|
27
27
|
useAnimatedStyle,
|
|
@@ -173,7 +173,7 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
173
173
|
showCancelButton,
|
|
174
174
|
[0, 1],
|
|
175
175
|
[cancelButtonWidth + IOVisualCostants.appMarginDefault, 0],
|
|
176
|
-
|
|
176
|
+
Extrapolation.CLAMP
|
|
177
177
|
)
|
|
178
178
|
}
|
|
179
179
|
],
|
|
@@ -235,7 +235,12 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
235
235
|
pointerEvents={pressable ? "none" : "auto"}
|
|
236
236
|
>
|
|
237
237
|
<View style={styles.iconContainer}>
|
|
238
|
-
<Icon
|
|
238
|
+
<Icon
|
|
239
|
+
allowFontScaling
|
|
240
|
+
name="search"
|
|
241
|
+
size={iconSize}
|
|
242
|
+
color={iconColor}
|
|
243
|
+
/>
|
|
239
244
|
</View>
|
|
240
245
|
<AnimatedTextInput
|
|
241
246
|
testID={testID}
|
|
@@ -328,7 +333,7 @@ const styles = StyleSheet.create({
|
|
|
328
333
|
inputFontSizePlaceholder,
|
|
329
334
|
"Titillio",
|
|
330
335
|
undefined,
|
|
331
|
-
"
|
|
336
|
+
"Medium"
|
|
332
337
|
)
|
|
333
338
|
},
|
|
334
339
|
placeholderLegacy: {
|
|
@@ -336,7 +341,7 @@ const styles = StyleSheet.create({
|
|
|
336
341
|
inputFontSizePlaceholder,
|
|
337
342
|
"TitilliumSansPro",
|
|
338
343
|
undefined,
|
|
339
|
-
"
|
|
344
|
+
"Semibold"
|
|
340
345
|
)
|
|
341
346
|
},
|
|
342
347
|
cancelButton: {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { hexToRgba, IOColors, IOSpacer } from "../../core";
|
|
4
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
4
5
|
|
|
5
6
|
type BaseSpacerProps = {
|
|
6
7
|
orientation: "vertical" | "horizontal";
|
|
7
8
|
size: IOSpacer;
|
|
9
|
+
allowScaleSpacing?: boolean;
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
type SpacerProps = {
|
|
11
13
|
size?: IOSpacer;
|
|
14
|
+
allowScaleSpacing?: boolean;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
const DEFAULT_SIZE: IOSpacer = 16;
|
|
@@ -22,20 +25,32 @@ Native `Spacer` component
|
|
|
22
25
|
@param {string} orientation
|
|
23
26
|
@param {IOSpacer} size
|
|
24
27
|
*/
|
|
25
|
-
const Spacer = ({ orientation, size }: BaseSpacerProps) => {
|
|
26
|
-
const
|
|
28
|
+
const Spacer = ({ allowScaleSpacing, orientation, size }: BaseSpacerProps) => {
|
|
29
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
30
|
+
|
|
31
|
+
const style = useMemo(
|
|
27
32
|
() => ({
|
|
28
33
|
...(orientation === "vertical" && {
|
|
29
|
-
height:
|
|
34
|
+
height: allowScaleSpacing
|
|
35
|
+
? size * dynamicFontScale * spacingScaleMultiplier
|
|
36
|
+
: size
|
|
30
37
|
}),
|
|
31
38
|
...(orientation === "horizontal" && {
|
|
32
|
-
width:
|
|
39
|
+
width: allowScaleSpacing
|
|
40
|
+
? size * dynamicFontScale * spacingScaleMultiplier
|
|
41
|
+
: size
|
|
33
42
|
}),
|
|
34
43
|
...((debugMode as boolean) && {
|
|
35
44
|
backgroundColor: debugBg
|
|
36
45
|
})
|
|
37
46
|
}),
|
|
38
|
-
[
|
|
47
|
+
[
|
|
48
|
+
allowScaleSpacing,
|
|
49
|
+
dynamicFontScale,
|
|
50
|
+
orientation,
|
|
51
|
+
size,
|
|
52
|
+
spacingScaleMultiplier
|
|
53
|
+
]
|
|
39
54
|
);
|
|
40
55
|
|
|
41
56
|
return <View style={style} />;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from "react";
|
|
2
2
|
import { View, ViewProps, ViewStyle } from "react-native";
|
|
3
3
|
import { IOSpacer } from "../../core";
|
|
4
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
4
5
|
|
|
5
6
|
type AllowedStyleProps = Pick<
|
|
6
7
|
ViewStyle,
|
|
@@ -15,6 +16,7 @@ type A11YRelatedProps = Pick<
|
|
|
15
16
|
type Stack = PropsWithChildren<{
|
|
16
17
|
space?: IOSpacer;
|
|
17
18
|
style?: AllowedStyleProps;
|
|
19
|
+
allowScaleSpacing?: boolean;
|
|
18
20
|
}> &
|
|
19
21
|
A11YRelatedProps;
|
|
20
22
|
|
|
@@ -22,30 +24,39 @@ type BaseStack = Stack & {
|
|
|
22
24
|
orientation: "vertical" | "horizontal";
|
|
23
25
|
};
|
|
24
26
|
|
|
27
|
+
const DEFAULT_SPACING_VALUE: IOSpacer = 16;
|
|
28
|
+
|
|
25
29
|
/**
|
|
26
30
|
Horizontal Stack component
|
|
27
31
|
@param {IOSpacer} space
|
|
28
32
|
*/
|
|
29
33
|
|
|
30
34
|
const Stack = ({
|
|
31
|
-
space,
|
|
35
|
+
space = DEFAULT_SPACING_VALUE,
|
|
32
36
|
style,
|
|
33
37
|
orientation = "vertical",
|
|
38
|
+
allowScaleSpacing,
|
|
34
39
|
children,
|
|
35
40
|
...props
|
|
36
|
-
}: BaseStack) =>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
}: BaseStack) => {
|
|
42
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<View
|
|
46
|
+
{...props}
|
|
47
|
+
style={{
|
|
48
|
+
display: "flex",
|
|
49
|
+
flexDirection: orientation === "horizontal" ? "row" : "column",
|
|
50
|
+
gap: allowScaleSpacing
|
|
51
|
+
? space * dynamicFontScale * spacingScaleMultiplier
|
|
52
|
+
: space,
|
|
53
|
+
...style
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
{children}
|
|
57
|
+
</View>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
49
60
|
|
|
50
61
|
export const HStack = ({ children, ...props }: Stack) => (
|
|
51
62
|
<Stack orientation="horizontal" {...props}>
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
1
|
+
import React, { useEffect, useMemo } from "react";
|
|
2
2
|
import { GestureResponderEvent, Pressable, StyleSheet } from "react-native";
|
|
3
3
|
import Animated, {
|
|
4
|
-
|
|
5
|
-
interpolate,
|
|
4
|
+
SharedValue,
|
|
6
5
|
interpolateColor,
|
|
7
6
|
useAnimatedStyle,
|
|
8
7
|
useDerivedValue,
|
|
8
|
+
useReducedMotion,
|
|
9
9
|
useSharedValue,
|
|
10
10
|
withSpring
|
|
11
11
|
} from "react-native-reanimated";
|
|
12
12
|
import {
|
|
13
13
|
IOColors,
|
|
14
|
-
IOScaleValues,
|
|
15
14
|
IOSpringValues,
|
|
16
15
|
hexToRgba,
|
|
17
16
|
useIOExperimentalDesign
|
|
18
17
|
} from "../../core";
|
|
19
|
-
import {
|
|
18
|
+
import { useScaleAnimation } from "../../hooks";
|
|
20
19
|
import { WithTestID } from "../../utils/types";
|
|
21
20
|
import { IOIcons, Icon } from "../icons";
|
|
22
|
-
import { HSpacer } from "../spacer";
|
|
23
21
|
import { BodySmall } from "../typography";
|
|
24
22
|
|
|
25
23
|
type ColorMode = "light" | "dark";
|
|
@@ -148,11 +146,9 @@ const TabItem = ({
|
|
|
148
146
|
icon,
|
|
149
147
|
iconSelected
|
|
150
148
|
}: TabItem) => {
|
|
151
|
-
const {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
onPressOut
|
|
155
|
-
} = useSpringPressProgressValue(IOSpringValues.selection);
|
|
149
|
+
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
150
|
+
useScaleAnimation();
|
|
151
|
+
const reducedMotion = useReducedMotion();
|
|
156
152
|
|
|
157
153
|
const { isExperimental } = useIOExperimentalDesign();
|
|
158
154
|
const colors = useMemo(
|
|
@@ -180,12 +176,12 @@ const TabItem = ({
|
|
|
180
176
|
0.1
|
|
181
177
|
);
|
|
182
178
|
|
|
183
|
-
const isSelected:
|
|
179
|
+
const isSelected: SharedValue<number> = useSharedValue(0);
|
|
184
180
|
const progressSelected = useDerivedValue(() =>
|
|
185
181
|
withSpring(isSelected.value, IOSpringValues.selection)
|
|
186
182
|
);
|
|
187
183
|
|
|
188
|
-
|
|
184
|
+
useEffect(() => {
|
|
189
185
|
// eslint-disable-next-line functional/immutable-data
|
|
190
186
|
isSelected.value = selected ? 1 : 0;
|
|
191
187
|
}, [isSelected, selected]);
|
|
@@ -194,7 +190,7 @@ const TabItem = ({
|
|
|
194
190
|
const animatedStyle = useAnimatedStyle(() => {
|
|
195
191
|
// Link color states to the pressed states
|
|
196
192
|
const pressedBackgroundColor = interpolateColor(
|
|
197
|
-
|
|
193
|
+
progress.value,
|
|
198
194
|
[0, 1],
|
|
199
195
|
[colors.background.default, opaquePressedBackgroundColor]
|
|
200
196
|
);
|
|
@@ -211,22 +207,13 @@ const TabItem = ({
|
|
|
211
207
|
[colors.border.default, colors.border.selected]
|
|
212
208
|
);
|
|
213
209
|
|
|
214
|
-
// Scale down button slightly when pressed
|
|
215
|
-
const scale = interpolate(
|
|
216
|
-
progressPressed.value,
|
|
217
|
-
[0, 1],
|
|
218
|
-
[1, IOScaleValues?.basicButton?.pressedState],
|
|
219
|
-
Extrapolate.CLAMP
|
|
220
|
-
);
|
|
221
|
-
|
|
222
210
|
return {
|
|
223
211
|
backgroundColor: selected
|
|
224
212
|
? selectedBackgroundColor
|
|
225
213
|
: pressedBackgroundColor,
|
|
226
|
-
borderColor: selected ? selectedBorderColor : borderColor
|
|
227
|
-
transform: [{ scale }]
|
|
214
|
+
borderColor: selected ? selectedBorderColor : borderColor
|
|
228
215
|
};
|
|
229
|
-
}, [
|
|
216
|
+
}, [progress, progressSelected, selected]);
|
|
230
217
|
|
|
231
218
|
const activeIcon = selected ? iconSelected ?? icon : icon;
|
|
232
219
|
|
|
@@ -246,16 +233,15 @@ const TabItem = ({
|
|
|
246
233
|
<Animated.View
|
|
247
234
|
style={[
|
|
248
235
|
styles.container,
|
|
236
|
+
{ columnGap: 4 },
|
|
237
|
+
!reducedMotion && scaleAnimatedStyle,
|
|
249
238
|
animatedStyle,
|
|
250
239
|
fullWidth && styles.fullWidth,
|
|
251
240
|
disabled && styles.disabled
|
|
252
241
|
]}
|
|
253
242
|
>
|
|
254
243
|
{activeIcon && (
|
|
255
|
-
|
|
256
|
-
<Icon name={activeIcon} color={foregroundColor} size={16} />
|
|
257
|
-
<HSpacer size={4} />
|
|
258
|
-
</>
|
|
244
|
+
<Icon name={activeIcon} color={foregroundColor} size={16} />
|
|
259
245
|
)}
|
|
260
246
|
<BodySmall weight="Semibold" color={foregroundColor}>
|
|
261
247
|
{label}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Platform, StyleSheet, View } from "react-native";
|
|
2
|
+
import { Platform, StyleSheet, View, ViewStyle } from "react-native";
|
|
3
3
|
import {
|
|
4
4
|
IOColors,
|
|
5
5
|
IOTagRadius,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
IOTagHSpacing,
|
|
14
14
|
IOTagVSpacing
|
|
15
15
|
} from "../../core/IOSpacing";
|
|
16
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
16
17
|
import { WithTestID } from "../../utils/types";
|
|
17
18
|
import { IOIconSizeScale, IOIcons, Icon } from "../icons";
|
|
18
19
|
import { IOText } from "../typography";
|
|
@@ -62,7 +63,9 @@ export type Tag = TextProps & { forceLightMode?: boolean } & WithTestID<
|
|
|
62
63
|
variant: "custom";
|
|
63
64
|
icon: VariantProps;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
+
> & {
|
|
67
|
+
allowFontScaling?: boolean;
|
|
68
|
+
};
|
|
66
69
|
|
|
67
70
|
const IOTagIconMargin: IOSpacingScale = 6;
|
|
68
71
|
const IOTagIconSize: IOIconSizeScale = 16;
|
|
@@ -79,16 +82,17 @@ const styles = StyleSheet.create({
|
|
|
79
82
|
}
|
|
80
83
|
}),
|
|
81
84
|
borderWidth: 1,
|
|
85
|
+
borderCurve: "continuous"
|
|
86
|
+
},
|
|
87
|
+
tagStatic: {
|
|
82
88
|
borderRadius: IOTagRadius,
|
|
83
89
|
borderCurve: "continuous",
|
|
84
90
|
paddingHorizontal: IOTagHSpacing,
|
|
85
|
-
paddingVertical: IOTagVSpacing
|
|
91
|
+
paddingVertical: IOTagVSpacing,
|
|
92
|
+
columnGap: IOTagIconMargin
|
|
86
93
|
},
|
|
87
94
|
iconWrapper: {
|
|
88
95
|
flexShrink: 1
|
|
89
|
-
},
|
|
90
|
-
spacer: {
|
|
91
|
-
width: IOTagIconMargin
|
|
92
96
|
}
|
|
93
97
|
});
|
|
94
98
|
|
|
@@ -151,9 +155,11 @@ export const Tag = ({
|
|
|
151
155
|
testID,
|
|
152
156
|
icon,
|
|
153
157
|
iconAccessibilityLabel,
|
|
158
|
+
allowFontScaling = true,
|
|
154
159
|
forceLightMode = false
|
|
155
160
|
}: Tag) => {
|
|
156
161
|
const theme = useIOTheme();
|
|
162
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
157
163
|
const { isExperimental } = useIOExperimentalDesign();
|
|
158
164
|
|
|
159
165
|
const variantProps = getVariantProps(variant, icon);
|
|
@@ -166,14 +172,26 @@ export const Tag = ({
|
|
|
166
172
|
? IOColors[IOThemeLight["appBackground-primary"]]
|
|
167
173
|
: IOColors[theme["appBackground-primary"]];
|
|
168
174
|
|
|
175
|
+
const tagDynamic: ViewStyle = {
|
|
176
|
+
paddingHorizontal: IOTagHSpacing * dynamicFontScale,
|
|
177
|
+
paddingVertical: IOTagVSpacing * dynamicFontScale,
|
|
178
|
+
columnGap: IOTagIconMargin * dynamicFontScale * spacingScaleMultiplier,
|
|
179
|
+
borderRadius: IOTagRadius * dynamicFontScale
|
|
180
|
+
};
|
|
181
|
+
|
|
169
182
|
return (
|
|
170
183
|
<View
|
|
171
184
|
testID={testID}
|
|
172
|
-
style={[
|
|
185
|
+
style={[
|
|
186
|
+
styles.tag,
|
|
187
|
+
allowFontScaling ? tagDynamic : styles.tagStatic,
|
|
188
|
+
{ borderColor, backgroundColor }
|
|
189
|
+
]}
|
|
173
190
|
>
|
|
174
191
|
{variantProps && (
|
|
175
192
|
<View style={styles.iconWrapper}>
|
|
176
193
|
<Icon
|
|
194
|
+
allowFontScaling={allowFontScaling}
|
|
177
195
|
name={variantProps.name}
|
|
178
196
|
color={
|
|
179
197
|
forceLightMode
|
|
@@ -186,9 +204,9 @@ export const Tag = ({
|
|
|
186
204
|
/>
|
|
187
205
|
</View>
|
|
188
206
|
)}
|
|
189
|
-
{variantProps && text && <View style={styles.spacer} />}
|
|
190
207
|
{text && (
|
|
191
208
|
<IOText
|
|
209
|
+
allowFontScaling={allowFontScaling}
|
|
192
210
|
font={isExperimental ? "Titillio" : "TitilliumSansPro"}
|
|
193
211
|
weight={"Semibold"}
|
|
194
212
|
size={12}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
2
3
|
import { TextInputBase } from "./TextInputBase";
|
|
3
4
|
|
|
4
5
|
type TextInputProps = Omit<
|
|
5
|
-
|
|
6
|
+
ComponentProps<typeof TextInputBase>,
|
|
6
7
|
| "rightElement"
|
|
7
8
|
| "status"
|
|
8
9
|
| "bottomMessageColor"
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
useIOExperimentalDesign,
|
|
27
27
|
useIOTheme
|
|
28
28
|
} from "../../core";
|
|
29
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
29
30
|
import { IOFontSize, makeFontStyleObject } from "../../utils/fonts";
|
|
30
31
|
import { RNTextInputProps, getInputPropsByType } from "../../utils/textInput";
|
|
31
32
|
import { InputType, WithTestID } from "../../utils/types";
|
|
@@ -78,8 +79,7 @@ const styles = StyleSheet.create({
|
|
|
78
79
|
flexDirection: "row",
|
|
79
80
|
alignItems: "center",
|
|
80
81
|
height: inputHeight,
|
|
81
|
-
paddingVertical: inputPaddingVertical
|
|
82
|
-
paddingHorizontal: inputPaddingHorizontal
|
|
82
|
+
paddingVertical: inputPaddingVertical
|
|
83
83
|
},
|
|
84
84
|
textInputOuterBorder: {
|
|
85
85
|
...StyleSheet.absoluteFillObject,
|
|
@@ -107,7 +107,7 @@ const styles = StyleSheet.create({
|
|
|
107
107
|
...(Platform.OS === "android" && { marginLeft: -4 })
|
|
108
108
|
},
|
|
109
109
|
textInputStyleFont: {
|
|
110
|
-
...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "
|
|
110
|
+
...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Medium")
|
|
111
111
|
},
|
|
112
112
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
113
113
|
textInputStyleLegacyFont: {
|
|
@@ -120,20 +120,23 @@ const styles = StyleSheet.create({
|
|
|
120
120
|
},
|
|
121
121
|
textInputLabelWrapper: {
|
|
122
122
|
position: "absolute",
|
|
123
|
-
paddingHorizontal: inputPaddingHorizontal,
|
|
124
123
|
zIndex: 10,
|
|
125
124
|
bottom: 0,
|
|
126
125
|
top: 0,
|
|
127
126
|
justifyContent: "center"
|
|
128
127
|
},
|
|
129
128
|
textInputLabel: {
|
|
129
|
+
color: inputLabelColor,
|
|
130
|
+
...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Regular")
|
|
131
|
+
},
|
|
132
|
+
textInputLabelLegacyFont: {
|
|
133
|
+
color: inputLabelColor,
|
|
130
134
|
...makeFontStyleObject(
|
|
131
135
|
inputLabelFontSize,
|
|
132
136
|
"TitilliumSansPro",
|
|
133
137
|
undefined,
|
|
134
138
|
"Regular"
|
|
135
|
-
)
|
|
136
|
-
color: inputLabelColor
|
|
139
|
+
)
|
|
137
140
|
}
|
|
138
141
|
});
|
|
139
142
|
|
|
@@ -227,6 +230,9 @@ export const TextInputBase = ({
|
|
|
227
230
|
disabled ? "disabled" : "initial"
|
|
228
231
|
);
|
|
229
232
|
const focusedState = useSharedValue<number>(0);
|
|
233
|
+
|
|
234
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
235
|
+
|
|
230
236
|
const theme = useIOTheme();
|
|
231
237
|
|
|
232
238
|
/* Get the label width to enable the correct translation */
|
|
@@ -361,7 +367,11 @@ export const TextInputBase = ({
|
|
|
361
367
|
onPress={onTextInputPress}
|
|
362
368
|
style={[
|
|
363
369
|
inputStatus === "disabled" ? { opacity: inputDisabledOpacity } : {},
|
|
364
|
-
styles.textInput
|
|
370
|
+
styles.textInput,
|
|
371
|
+
{
|
|
372
|
+
paddingHorizontal:
|
|
373
|
+
inputPaddingHorizontal * dynamicFontScale * spacingScaleMultiplier
|
|
374
|
+
}
|
|
365
375
|
]}
|
|
366
376
|
accessible={false}
|
|
367
377
|
accessibilityRole={"none"}
|
|
@@ -384,8 +394,13 @@ export const TextInputBase = ({
|
|
|
384
394
|
|
|
385
395
|
{icon && (
|
|
386
396
|
<>
|
|
387
|
-
<Icon
|
|
388
|
-
|
|
397
|
+
<Icon
|
|
398
|
+
allowFontScaling
|
|
399
|
+
name={icon}
|
|
400
|
+
color={iconColor}
|
|
401
|
+
size={iconSize}
|
|
402
|
+
/>
|
|
403
|
+
<HSpacer allowScaleSpacing size={iconMargin} />
|
|
389
404
|
</>
|
|
390
405
|
)}
|
|
391
406
|
<TextInput
|
|
@@ -428,14 +443,32 @@ export const TextInputBase = ({
|
|
|
428
443
|
pointerEvents={"none"}
|
|
429
444
|
style={[
|
|
430
445
|
styles.textInputLabelWrapper,
|
|
431
|
-
|
|
446
|
+
{
|
|
447
|
+
paddingHorizontal:
|
|
448
|
+
inputPaddingHorizontal *
|
|
449
|
+
dynamicFontScale *
|
|
450
|
+
spacingScaleMultiplier
|
|
451
|
+
},
|
|
452
|
+
icon
|
|
453
|
+
? {
|
|
454
|
+
left:
|
|
455
|
+
(iconSize + iconMargin) *
|
|
456
|
+
dynamicFontScale *
|
|
457
|
+
spacingScaleMultiplier
|
|
458
|
+
}
|
|
459
|
+
: {}
|
|
432
460
|
]}
|
|
433
461
|
>
|
|
434
462
|
<Animated.Text
|
|
435
463
|
onLayout={getLabelWidth}
|
|
436
464
|
numberOfLines={1}
|
|
437
465
|
accessible={false}
|
|
438
|
-
style={[
|
|
466
|
+
style={[
|
|
467
|
+
isExperimental
|
|
468
|
+
? styles.textInputLabel
|
|
469
|
+
: styles.textInputLabelLegacyFont,
|
|
470
|
+
animatedLabelStyle
|
|
471
|
+
]}
|
|
439
472
|
>
|
|
440
473
|
{placeholder}
|
|
441
474
|
</Animated.Text>
|
|
@@ -6,10 +6,11 @@ import {
|
|
|
6
6
|
TextStyle,
|
|
7
7
|
View
|
|
8
8
|
} from "react-native";
|
|
9
|
-
import { IOColors,
|
|
9
|
+
import { IOColors, useIOTheme } from "../../core";
|
|
10
10
|
import { useBoldTextEnabled } from "../../utils/accessibility";
|
|
11
11
|
import {
|
|
12
12
|
IOFontFamily,
|
|
13
|
+
IOFontSizeMultiplier,
|
|
13
14
|
IOFontWeight,
|
|
14
15
|
makeFontStyleObject
|
|
15
16
|
} from "../../utils/fonts";
|
|
@@ -94,7 +95,7 @@ export const IOText = forwardRef<View, IOTextProps>(
|
|
|
94
95
|
textStyle,
|
|
95
96
|
style,
|
|
96
97
|
children,
|
|
97
|
-
allowFontScaling,
|
|
98
|
+
allowFontScaling = true,
|
|
98
99
|
maxFontSizeMultiplier,
|
|
99
100
|
...props
|
|
100
101
|
},
|
|
@@ -103,8 +104,6 @@ export const IOText = forwardRef<View, IOTextProps>(
|
|
|
103
104
|
const theme = useIOTheme();
|
|
104
105
|
const boldEnabled = useBoldTextEnabled();
|
|
105
106
|
|
|
106
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
107
|
-
|
|
108
107
|
const computedStyleObj = useMemo(
|
|
109
108
|
() =>
|
|
110
109
|
calculateTextStyle(
|
|
@@ -142,8 +141,8 @@ export const IOText = forwardRef<View, IOTextProps>(
|
|
|
142
141
|
|
|
143
142
|
/* Accessible typography based on the `fontScale` parameter */
|
|
144
143
|
const accessibleFontSizeProps: ComponentProps<typeof Text> = {
|
|
145
|
-
allowFontScaling
|
|
146
|
-
maxFontSizeMultiplier: maxFontSizeMultiplier ??
|
|
144
|
+
allowFontScaling,
|
|
145
|
+
maxFontSizeMultiplier: maxFontSizeMultiplier ?? IOFontSizeMultiplier
|
|
147
146
|
};
|
|
148
147
|
|
|
149
148
|
return (
|