@pagopa/io-app-design-system 4.3.0 → 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 +34 -34
- package/lib/commonjs/components/alert/Alert.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.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/lib/commonjs/components/buttons/ButtonLink.js +6 -1
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +11 -9
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +10 -6
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButton.js +2 -0
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonSolid.js +1 -0
- package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +27 -9
- 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/listitems/ListItemAction.js +11 -7
- 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 +12 -7
- package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemHeader.js +9 -2
- 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 +15 -13
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +20 -17
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +19 -14
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +24 -9
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +5 -0
- 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 +2 -0
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +435 -429
- 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/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -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/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/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/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +3 -3
- package/lib/module/components/alert/Alert.js +35 -35
- package/lib/module/components/alert/Alert.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.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/lib/module/components/buttons/ButtonLink.js +6 -1
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +11 -9
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +10 -6
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/IconButton.js +2 -0
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/IconButtonSolid.js +1 -0
- package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +27 -9
- 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/listitems/ListItemAction.js +11 -7
- 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 +14 -9
- package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/module/components/listitems/ListItemHeader.js +9 -2
- 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 +15 -13
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +22 -19
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +21 -16
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +25 -10
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js +6 -1
- 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 +2 -0
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +435 -429
- 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/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -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/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/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/typescript/components/alert/Alert.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/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/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.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/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/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/IOStyles.d.ts +7 -7
- 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/package.json +1 -1
- package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +3 -3
- package/src/components/alert/Alert.tsx +43 -61
- 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 +0 -2
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/src/components/buttons/ButtonLink.tsx +4 -0
- package/src/components/buttons/ButtonOutline.tsx +24 -25
- package/src/components/buttons/ButtonSolid.tsx +10 -9
- package/src/components/buttons/IconButton.tsx +2 -0
- package/src/components/buttons/IconButtonSolid.tsx +1 -0
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +27 -9
- 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/listitems/ListItemAction.tsx +19 -8
- package/src/components/listitems/ListItemAmount.tsx +16 -11
- package/src/components/listitems/ListItemCheckbox.tsx +29 -15
- package/src/components/listitems/ListItemHeader.tsx +12 -2
- package/src/components/listitems/ListItemInfo.tsx +27 -20
- package/src/components/listitems/ListItemInfoCopy.tsx +27 -16
- package/src/components/listitems/ListItemNav.tsx +44 -40
- package/src/components/listitems/ListItemNavAlert.tsx +30 -16
- package/src/components/listitems/ListItemRadio.tsx +46 -32
- package/src/components/listitems/ListItemRadioWithAmount.tsx +7 -2
- package/src/components/listitems/ListItemSwitch.tsx +21 -27
- package/src/components/listitems/ListItemTransaction.tsx +3 -0
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +435 -429
- package/src/components/modules/ModuleCredential.tsx +5 -2
- package/src/components/modules/ModuleNavigation.tsx +3 -1
- package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -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/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/utils/accessibility.ts +32 -1
- package/src/utils/fonts.ts +1 -0
|
@@ -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
|
);
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
useIOTheme
|
|
9
9
|
} from "../../core";
|
|
10
10
|
import { useListItemAnimation } from "../../hooks";
|
|
11
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
11
12
|
import { WithTestID } from "../../utils/types";
|
|
12
13
|
import { AnimatedIcon, IOIcons } from "../icons";
|
|
13
14
|
import { ButtonText } from "../typography/ButtonText";
|
|
@@ -37,6 +38,8 @@ export const ListItemAction = ({
|
|
|
37
38
|
|
|
38
39
|
const theme = useIOTheme();
|
|
39
40
|
|
|
41
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
42
|
+
|
|
40
43
|
const listItemAccessibilityLabel = useMemo(
|
|
41
44
|
() => (accessibilityLabel ? accessibilityLabel : `${label}`),
|
|
42
45
|
[label, accessibilityLabel]
|
|
@@ -68,16 +71,24 @@ export const ListItemAction = ({
|
|
|
68
71
|
accessibilityElementsHidden
|
|
69
72
|
>
|
|
70
73
|
<Animated.View
|
|
71
|
-
style={[
|
|
74
|
+
style={[
|
|
75
|
+
IOListItemStyles.listItemInner,
|
|
76
|
+
{
|
|
77
|
+
columnGap:
|
|
78
|
+
IOListItemVisualParams.iconMargin *
|
|
79
|
+
dynamicFontScale *
|
|
80
|
+
spacingScaleMultiplier
|
|
81
|
+
},
|
|
82
|
+
scaleAnimatedStyle
|
|
83
|
+
]}
|
|
72
84
|
>
|
|
73
85
|
{icon && (
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</View>
|
|
86
|
+
<AnimatedIcon
|
|
87
|
+
allowFontScaling
|
|
88
|
+
name={icon}
|
|
89
|
+
color={IOColors[mapForegroundColor[variant]]}
|
|
90
|
+
size={IOListItemVisualParams.iconSize}
|
|
91
|
+
/>
|
|
81
92
|
)}
|
|
82
93
|
<View style={{ flexGrow: 1, flexShrink: 1 }}>
|
|
83
94
|
<ButtonText color={mapForegroundColor[variant]}>{label}</ButtonText>
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
IOStyles,
|
|
8
8
|
useIOTheme
|
|
9
9
|
} from "../../core";
|
|
10
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
10
11
|
import { WithTestID } from "../../utils/types";
|
|
11
12
|
import { IOIcons, Icon } from "../icons";
|
|
12
|
-
import { HSpacer } from "../spacer";
|
|
13
13
|
import { H3, H6 } from "../typography";
|
|
14
14
|
|
|
15
15
|
type ValueProps = ComponentProps<typeof H3>;
|
|
@@ -42,6 +42,8 @@ export const ListItemAmount = ({
|
|
|
42
42
|
testID
|
|
43
43
|
}: ListItemAmount) => {
|
|
44
44
|
const theme = useIOTheme();
|
|
45
|
+
const { dynamicFontScale, spacingScaleMultiplier, hugeFontEnabled } =
|
|
46
|
+
useIOFontDynamicScale();
|
|
45
47
|
|
|
46
48
|
const listItemAccessibilityLabel = useMemo(
|
|
47
49
|
() => (accessibilityLabel ? accessibilityLabel : `${label}`),
|
|
@@ -65,18 +67,21 @@ export const ListItemAmount = ({
|
|
|
65
67
|
accessible
|
|
66
68
|
accessibilityLabel={listItemAccessibilityLabel}
|
|
67
69
|
>
|
|
68
|
-
<View
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
<View
|
|
71
|
+
style={[
|
|
72
|
+
IOListItemStyles.listItemInner,
|
|
73
|
+
{ columnGap: iconMargin * dynamicFontScale * spacingScaleMultiplier }
|
|
74
|
+
]}
|
|
75
|
+
>
|
|
76
|
+
{iconName && !hugeFontEnabled && (
|
|
77
|
+
<Icon
|
|
78
|
+
allowFontScaling
|
|
79
|
+
name={iconName}
|
|
80
|
+
color={iconColor ?? theme["icon-decorative"]}
|
|
81
|
+
size={IOListItemVisualParams.iconSize}
|
|
82
|
+
/>
|
|
77
83
|
)}
|
|
78
84
|
<View style={IOStyles.flex}>{itemInfoTextComponent}</View>
|
|
79
|
-
<HSpacer size={4} />
|
|
80
85
|
<H3
|
|
81
86
|
{...valueElementProps}
|
|
82
87
|
color={theme["textBody-default"]}
|
|
@@ -6,14 +6,16 @@ import Animated from "react-native-reanimated";
|
|
|
6
6
|
import {
|
|
7
7
|
IOSelectionListItemStyles,
|
|
8
8
|
IOSelectionListItemVisualParams,
|
|
9
|
+
IOSelectionTickVisualParams,
|
|
9
10
|
IOStyles,
|
|
10
11
|
useIOTheme
|
|
11
12
|
} from "../../core";
|
|
12
13
|
import { useListItemAnimation } from "../../hooks";
|
|
14
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
13
15
|
import { AnimatedCheckbox } from "../checkbox/AnimatedCheckbox";
|
|
14
16
|
import { IOIcons, Icon } from "../icons";
|
|
15
17
|
import { HSpacer, VSpacer } from "../spacer";
|
|
16
|
-
import {
|
|
18
|
+
import { BodySmall, H6 } from "../typography";
|
|
17
19
|
|
|
18
20
|
type Props = {
|
|
19
21
|
value: string;
|
|
@@ -48,6 +50,9 @@ export const ListItemCheckbox = ({
|
|
|
48
50
|
disabled,
|
|
49
51
|
onValueChange
|
|
50
52
|
}: ListItemCheckboxProps) => {
|
|
53
|
+
const { dynamicFontScale, spacingScaleMultiplier, hugeFontEnabled } =
|
|
54
|
+
useIOFontDynamicScale();
|
|
55
|
+
|
|
51
56
|
const [toggleValue, setToggleValue] = useState(selected ?? false);
|
|
52
57
|
const { onPressIn, onPressOut, scaleAnimatedStyle, backgroundAnimatedStyle } =
|
|
53
58
|
useListItemAnimation();
|
|
@@ -98,19 +103,25 @@ export const ListItemCheckbox = ({
|
|
|
98
103
|
>
|
|
99
104
|
<Animated.View style={scaleAnimatedStyle}>
|
|
100
105
|
<View style={IOSelectionListItemStyles.listItemInner}>
|
|
101
|
-
<View
|
|
102
|
-
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
<View
|
|
107
|
+
style={[
|
|
108
|
+
IOStyles.row,
|
|
109
|
+
{
|
|
110
|
+
flexShrink: 1,
|
|
111
|
+
columnGap:
|
|
112
|
+
IOSelectionListItemVisualParams.iconMargin *
|
|
113
|
+
dynamicFontScale *
|
|
114
|
+
spacingScaleMultiplier
|
|
115
|
+
}
|
|
116
|
+
]}
|
|
117
|
+
>
|
|
118
|
+
{icon && !hugeFontEnabled && (
|
|
119
|
+
<Icon
|
|
120
|
+
allowFontScaling
|
|
121
|
+
name={icon}
|
|
122
|
+
color="grey-300"
|
|
123
|
+
size={IOSelectionListItemVisualParams.iconSize}
|
|
124
|
+
/>
|
|
114
125
|
)}
|
|
115
126
|
<H6 color={theme["textBody-default"]} style={{ flexShrink: 1 }}>
|
|
116
127
|
{value}
|
|
@@ -122,7 +133,10 @@ export const ListItemCheckbox = ({
|
|
|
122
133
|
accessibilityElementsHidden
|
|
123
134
|
importantForAccessibility="no-hide-descendants"
|
|
124
135
|
>
|
|
125
|
-
<AnimatedCheckbox
|
|
136
|
+
<AnimatedCheckbox
|
|
137
|
+
size={IOSelectionTickVisualParams.size * dynamicFontScale}
|
|
138
|
+
checked={selected ?? toggleValue}
|
|
139
|
+
/>
|
|
126
140
|
</View>
|
|
127
141
|
</View>
|
|
128
142
|
{description && (
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
IOStyles,
|
|
8
8
|
useIOTheme
|
|
9
9
|
} from "../../core";
|
|
10
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
10
11
|
import { WithTestID } from "../../utils/types";
|
|
11
12
|
import { Badge } from "../badge";
|
|
12
13
|
import { ButtonLink, IconButton } from "../buttons";
|
|
@@ -61,6 +62,9 @@ export const ListItemHeader = ({
|
|
|
61
62
|
}: ListItemHeader) => {
|
|
62
63
|
const theme = useIOTheme();
|
|
63
64
|
|
|
65
|
+
const { dynamicFontScale, spacingScaleMultiplier, hugeFontEnabled } =
|
|
66
|
+
useIOFontDynamicScale();
|
|
67
|
+
|
|
64
68
|
const listItemAccessibilityLabel = useMemo(
|
|
65
69
|
() => (accessibilityLabel ? accessibilityLabel : `${label}`),
|
|
66
70
|
[label, accessibilityLabel]
|
|
@@ -129,9 +133,15 @@ export const ListItemHeader = ({
|
|
|
129
133
|
style={IOListItemStyles.listItemInner}
|
|
130
134
|
importantForAccessibility={endElement ? "auto" : "no-hide-descendants"}
|
|
131
135
|
>
|
|
132
|
-
{iconName && (
|
|
133
|
-
<View
|
|
136
|
+
{iconName && !hugeFontEnabled && (
|
|
137
|
+
<View
|
|
138
|
+
style={{
|
|
139
|
+
marginRight:
|
|
140
|
+
iconMargin * dynamicFontScale * spacingScaleMultiplier
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
134
143
|
<Icon
|
|
144
|
+
allowFontScaling
|
|
135
145
|
name={iconName}
|
|
136
146
|
color={iconColor ?? theme["icon-decorative"]}
|
|
137
147
|
size={IOListItemVisualParams.iconSize}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
IOStyles,
|
|
7
7
|
useIOTheme
|
|
8
8
|
} from "../../core";
|
|
9
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
9
10
|
import { WithTestID } from "../../utils/types";
|
|
10
11
|
import { Badge } from "../badge";
|
|
11
12
|
import { ButtonLink, IconButton } from "../buttons";
|
|
@@ -68,6 +69,9 @@ export const ListItemInfo = ({
|
|
|
68
69
|
testID
|
|
69
70
|
}: ListItemInfo) => {
|
|
70
71
|
const theme = useIOTheme();
|
|
72
|
+
const { dynamicFontScale, spacingScaleMultiplier, hugeFontEnabled } =
|
|
73
|
+
useIOFontDynamicScale();
|
|
74
|
+
|
|
71
75
|
const componentValueToAccessibility = useMemo(
|
|
72
76
|
() => (typeof value === "string" ? value : ""),
|
|
73
77
|
[value]
|
|
@@ -140,30 +144,33 @@ export const ListItemInfo = ({
|
|
|
140
144
|
accessibilityLabel={listItemAccessibilityLabel}
|
|
141
145
|
accessibilityRole={accessibilityRole}
|
|
142
146
|
>
|
|
143
|
-
<View
|
|
144
|
-
{
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
<View
|
|
148
|
+
style={[
|
|
149
|
+
IOListItemStyles.listItemInner,
|
|
150
|
+
{
|
|
151
|
+
columnGap:
|
|
152
|
+
IOListItemVisualParams.iconMargin *
|
|
153
|
+
dynamicFontScale *
|
|
154
|
+
spacingScaleMultiplier
|
|
155
|
+
}
|
|
156
|
+
]}
|
|
157
|
+
>
|
|
158
|
+
{icon && !hugeFontEnabled && (
|
|
159
|
+
<Icon
|
|
160
|
+
allowFontScaling
|
|
161
|
+
name={icon}
|
|
162
|
+
color="grey-450"
|
|
163
|
+
size={IOListItemVisualParams.iconSize}
|
|
164
|
+
/>
|
|
152
165
|
)}
|
|
153
166
|
{paymentLogoIcon && (
|
|
154
|
-
<
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
/>
|
|
159
|
-
</View>
|
|
167
|
+
<LogoPaymentWithFallback
|
|
168
|
+
brand={paymentLogoIcon}
|
|
169
|
+
size={PAYMENT_LOGO_SIZE}
|
|
170
|
+
/>
|
|
160
171
|
)}
|
|
161
172
|
<View style={IOStyles.flex}>{itemInfoTextComponent}</View>
|
|
162
|
-
{endElement && (
|
|
163
|
-
<View style={{ marginLeft: IOListItemVisualParams.actionMargin }}>
|
|
164
|
-
{listItemInfoAction()}
|
|
165
|
-
</View>
|
|
166
|
-
)}
|
|
173
|
+
{endElement && <View>{listItemInfoAction()}</View>}
|
|
167
174
|
</View>
|
|
168
175
|
</View>
|
|
169
176
|
);
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
useIOTheme
|
|
9
9
|
} from "../../core";
|
|
10
10
|
import { useListItemAnimation } from "../../hooks";
|
|
11
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
11
12
|
import { WithTestID } from "../../utils/types";
|
|
12
13
|
import { IOIcons, Icon } from "../icons";
|
|
13
14
|
import { BodySmall, H6 } from "../typography";
|
|
@@ -38,6 +39,9 @@ export const ListItemInfoCopy = ({
|
|
|
38
39
|
const { onPressIn, onPressOut, scaleAnimatedStyle, backgroundAnimatedStyle } =
|
|
39
40
|
useListItemAnimation();
|
|
40
41
|
|
|
42
|
+
const { dynamicFontScale, spacingScaleMultiplier, hugeFontEnabled } =
|
|
43
|
+
useIOFontDynamicScale();
|
|
44
|
+
|
|
41
45
|
const componentValueToAccessibility = useMemo(
|
|
42
46
|
() => (typeof value === "string" ? value : ""),
|
|
43
47
|
[value]
|
|
@@ -87,25 +91,32 @@ export const ListItemInfoCopy = ({
|
|
|
87
91
|
style={[IOListItemStyles.listItem, backgroundAnimatedStyle]}
|
|
88
92
|
>
|
|
89
93
|
<Animated.View
|
|
90
|
-
style={[
|
|
94
|
+
style={[
|
|
95
|
+
IOListItemStyles.listItemInner,
|
|
96
|
+
{
|
|
97
|
+
columnGap:
|
|
98
|
+
IOListItemVisualParams.iconMargin *
|
|
99
|
+
dynamicFontScale *
|
|
100
|
+
spacingScaleMultiplier
|
|
101
|
+
},
|
|
102
|
+
scaleAnimatedStyle
|
|
103
|
+
]}
|
|
91
104
|
>
|
|
92
|
-
{icon && (
|
|
93
|
-
<View style={{ marginRight: IOListItemVisualParams.iconMargin }}>
|
|
94
|
-
<Icon
|
|
95
|
-
name={icon}
|
|
96
|
-
color="grey-450"
|
|
97
|
-
size={IOListItemVisualParams.iconSize}
|
|
98
|
-
/>
|
|
99
|
-
</View>
|
|
100
|
-
)}
|
|
101
|
-
<View style={IOStyles.flex}>{listItemInfoCopyContent}</View>
|
|
102
|
-
<View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
|
|
105
|
+
{icon && !hugeFontEnabled && (
|
|
103
106
|
<Icon
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
allowFontScaling
|
|
108
|
+
name={icon}
|
|
109
|
+
color="grey-450"
|
|
110
|
+
size={IOListItemVisualParams.iconSize}
|
|
107
111
|
/>
|
|
108
|
-
|
|
112
|
+
)}
|
|
113
|
+
<View style={IOStyles.flex}>{listItemInfoCopyContent}</View>
|
|
114
|
+
<Icon
|
|
115
|
+
allowFontScaling
|
|
116
|
+
name="copy"
|
|
117
|
+
color={foregroundColor}
|
|
118
|
+
size={IOListItemVisualParams.chevronSize}
|
|
119
|
+
/>
|
|
109
120
|
</Animated.View>
|
|
110
121
|
</Animated.View>
|
|
111
122
|
</Pressable>
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import React, { ComponentProps
|
|
2
|
-
import {
|
|
3
|
-
GestureResponderEvent,
|
|
4
|
-
Image,
|
|
5
|
-
Pressable,
|
|
6
|
-
StyleSheet,
|
|
7
|
-
View
|
|
8
|
-
} from "react-native";
|
|
1
|
+
import React, { ComponentProps } from "react";
|
|
2
|
+
import { GestureResponderEvent, Image, Pressable, View } from "react-native";
|
|
9
3
|
import Animated from "react-native-reanimated";
|
|
10
4
|
import {
|
|
11
5
|
IOColors,
|
|
@@ -16,13 +10,14 @@ import {
|
|
|
16
10
|
useIOTheme
|
|
17
11
|
} from "../../core";
|
|
18
12
|
import { useListItemAnimation } from "../../hooks";
|
|
13
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
19
14
|
import { WithTestID } from "../../utils/types";
|
|
20
15
|
import { Avatar } from "../avatar";
|
|
21
16
|
import { Badge } from "../badge";
|
|
22
17
|
import { IOIcons, Icon } from "../icons";
|
|
23
18
|
import { LoadingSpinner } from "../loadingSpinner";
|
|
24
19
|
import { HSpacer, VSpacer } from "../spacer";
|
|
25
|
-
import { Caption, H6
|
|
20
|
+
import { BodySmall, Caption, H6 } from "../typography";
|
|
26
21
|
|
|
27
22
|
type ListItemTopElementProps =
|
|
28
23
|
| {
|
|
@@ -80,13 +75,6 @@ export type ListItemNavGraphicProps =
|
|
|
80
75
|
|
|
81
76
|
export type ListItemNav = ListItemNavPartialProps & ListItemNavGraphicProps;
|
|
82
77
|
|
|
83
|
-
const styles = StyleSheet.create({
|
|
84
|
-
paymentLogoSize: {
|
|
85
|
-
width: IOSelectionListItemVisualParams.iconSize,
|
|
86
|
-
height: IOSelectionListItemVisualParams.iconSize
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
78
|
export const ListItemNav = ({
|
|
91
79
|
value,
|
|
92
80
|
description,
|
|
@@ -107,11 +95,8 @@ export const ListItemNav = ({
|
|
|
107
95
|
useListItemAnimation();
|
|
108
96
|
const theme = useIOTheme();
|
|
109
97
|
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
{GraphicalAsset}
|
|
113
|
-
</View>
|
|
114
|
-
);
|
|
98
|
+
const { dynamicFontScale, spacingScaleMultiplier, hugeFontEnabled } =
|
|
99
|
+
useIOFontDynamicScale();
|
|
115
100
|
|
|
116
101
|
const listItemNavContent = (
|
|
117
102
|
<>
|
|
@@ -128,7 +113,12 @@ export const ListItemNav = ({
|
|
|
128
113
|
{topElement.dateValue && (
|
|
129
114
|
<>
|
|
130
115
|
<View style={{ alignSelf: "flex-start", flexDirection: "row" }}>
|
|
131
|
-
<Icon
|
|
116
|
+
<Icon
|
|
117
|
+
allowFontScaling
|
|
118
|
+
name="calendar"
|
|
119
|
+
size={16}
|
|
120
|
+
color="grey-300"
|
|
121
|
+
/>
|
|
132
122
|
<HSpacer size={4} />
|
|
133
123
|
<Caption color={theme["textBody-tertiary"]}>
|
|
134
124
|
{topElement.dateValue}
|
|
@@ -186,35 +176,49 @@ export const ListItemNav = ({
|
|
|
186
176
|
style={[IOListItemStyles.listItem, backgroundAnimatedStyle]}
|
|
187
177
|
>
|
|
188
178
|
<Animated.View
|
|
189
|
-
style={[
|
|
179
|
+
style={[
|
|
180
|
+
IOListItemStyles.listItemInner,
|
|
181
|
+
{
|
|
182
|
+
columnGap:
|
|
183
|
+
IOListItemVisualParams.iconMargin *
|
|
184
|
+
dynamicFontScale *
|
|
185
|
+
spacingScaleMultiplier
|
|
186
|
+
},
|
|
187
|
+
scaleAnimatedStyle
|
|
188
|
+
]}
|
|
190
189
|
>
|
|
191
190
|
{/* Possibile graphical assets
|
|
192
191
|
- Icon
|
|
193
192
|
- Image URL (for payment logos)
|
|
194
193
|
- Avatar
|
|
195
194
|
*/}
|
|
196
|
-
{icon &&
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
{paymentLogoUri &&
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
195
|
+
{icon && !hugeFontEnabled && (
|
|
196
|
+
<Icon
|
|
197
|
+
allowFontScaling
|
|
198
|
+
name={icon}
|
|
199
|
+
color={iconColor}
|
|
200
|
+
size={IOListItemVisualParams.iconSize}
|
|
201
|
+
/>
|
|
202
|
+
)}
|
|
203
|
+
{paymentLogoUri && (
|
|
204
|
+
<Image
|
|
205
|
+
accessibilityIgnoresInvertColors
|
|
206
|
+
source={{ uri: paymentLogoUri }}
|
|
207
|
+
style={{
|
|
208
|
+
width:
|
|
209
|
+
IOSelectionListItemVisualParams.iconSize * dynamicFontScale,
|
|
210
|
+
height:
|
|
211
|
+
IOSelectionListItemVisualParams.iconSize * dynamicFontScale
|
|
212
|
+
}}
|
|
213
|
+
/>
|
|
214
|
+
)}
|
|
215
|
+
{avatar && <Avatar size="small" {...avatar} />}
|
|
213
216
|
|
|
214
217
|
<View style={IOStyles.flex}>{listItemNavContent}</View>
|
|
215
218
|
{loading && <LoadingSpinner color={interactiveColor} />}
|
|
216
219
|
{!loading && !hideChevron && (
|
|
217
220
|
<Icon
|
|
221
|
+
allowFontScaling
|
|
218
222
|
name="chevronRightListItem"
|
|
219
223
|
color={interactiveColor}
|
|
220
224
|
size={IOListItemVisualParams.chevronSize}
|
|
@@ -5,12 +5,14 @@ import {
|
|
|
5
5
|
IOListItemStyles,
|
|
6
6
|
IOListItemVisualParams,
|
|
7
7
|
IOStyles,
|
|
8
|
+
useIOExperimentalDesign,
|
|
8
9
|
useIOTheme
|
|
9
10
|
} from "../../core";
|
|
10
11
|
import { useListItemAnimation } from "../../hooks";
|
|
12
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
11
13
|
import { WithTestID } from "../../utils/types";
|
|
12
14
|
import { Icon } from "../icons";
|
|
13
|
-
import {
|
|
15
|
+
import { BodySmall, H6 } from "../typography";
|
|
14
16
|
|
|
15
17
|
export type ListItemNavAlert = WithTestID<{
|
|
16
18
|
value: string | React.ReactNode;
|
|
@@ -35,6 +37,8 @@ export const ListItemNavAlert = ({
|
|
|
35
37
|
const theme = useIOTheme();
|
|
36
38
|
const { onPressIn, onPressOut, scaleAnimatedStyle, backgroundAnimatedStyle } =
|
|
37
39
|
useListItemAnimation();
|
|
40
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
41
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
38
42
|
|
|
39
43
|
const componentValueToAccessibility = typeof value === "string" ? value : "";
|
|
40
44
|
const componentDescriptionToAccessibility =
|
|
@@ -67,6 +71,8 @@ export const ListItemNavAlert = ({
|
|
|
67
71
|
</>
|
|
68
72
|
);
|
|
69
73
|
|
|
74
|
+
const iconColor = isExperimental ? theme["interactiveElem-default"] : "blue";
|
|
75
|
+
|
|
70
76
|
return (
|
|
71
77
|
<Pressable
|
|
72
78
|
onPress={onPress}
|
|
@@ -85,25 +91,33 @@ export const ListItemNavAlert = ({
|
|
|
85
91
|
accessibilityElementsHidden
|
|
86
92
|
>
|
|
87
93
|
<Animated.View
|
|
88
|
-
style={[
|
|
94
|
+
style={[
|
|
95
|
+
IOListItemStyles.listItemInner,
|
|
96
|
+
{
|
|
97
|
+
columnGap:
|
|
98
|
+
IOListItemVisualParams.iconMargin *
|
|
99
|
+
dynamicFontScale *
|
|
100
|
+
spacingScaleMultiplier
|
|
101
|
+
},
|
|
102
|
+
scaleAnimatedStyle
|
|
103
|
+
]}
|
|
89
104
|
>
|
|
90
105
|
{!withoutIcon && (
|
|
91
|
-
<View style={{ marginRight: IOListItemVisualParams.iconMargin }}>
|
|
92
|
-
<Icon
|
|
93
|
-
name="errorFilled"
|
|
94
|
-
color={theme.errorIcon}
|
|
95
|
-
size={IOListItemVisualParams.iconSize}
|
|
96
|
-
/>
|
|
97
|
-
</View>
|
|
98
|
-
)}
|
|
99
|
-
<View style={IOStyles.flex}>{listItemNavAlertContent}</View>
|
|
100
|
-
<View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
|
|
101
106
|
<Icon
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
allowFontScaling
|
|
108
|
+
name="errorFilled"
|
|
109
|
+
color={theme.errorIcon}
|
|
110
|
+
size={IOListItemVisualParams.iconSize}
|
|
105
111
|
/>
|
|
106
|
-
|
|
112
|
+
)}
|
|
113
|
+
<View style={IOStyles.flex}>{listItemNavAlertContent}</View>
|
|
114
|
+
|
|
115
|
+
<Icon
|
|
116
|
+
allowFontScaling
|
|
117
|
+
name="chevronRightListItem"
|
|
118
|
+
color={iconColor}
|
|
119
|
+
size={IOListItemVisualParams.chevronSize}
|
|
120
|
+
/>
|
|
107
121
|
</Animated.View>
|
|
108
122
|
</Animated.View>
|
|
109
123
|
</Pressable>
|