@pagopa/io-app-design-system 1.16.1 → 1.17.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/README.md +131 -54
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +6 -2
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/commonjs/components/codeInput/CodeInput.js +103 -0
- package/lib/commonjs/components/codeInput/CodeInput.js.map +1 -0
- package/lib/commonjs/components/codeInput/index.js +17 -0
- package/lib/commonjs/components/codeInput/index.js.map +1 -0
- package/lib/commonjs/components/icons/Icon.js +2 -0
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/README.md +79 -19
- package/lib/commonjs/components/icons/svg/IconSparkles.js +30 -0
- package/lib/commonjs/components/icons/svg/IconSparkles.js.map +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconSparkles.svg +3 -0
- package/lib/commonjs/components/index.js +48 -26
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderSecondLevel.js +5 -4
- package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAction.js +4 -3
- package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemHeader.js +87 -0
- package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -0
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +5 -30
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +15 -23
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +4 -22
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +69 -10
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +64 -0
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -0
- package/lib/commonjs/components/listitems/ListItemTransaction.js +8 -5
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
- package/lib/commonjs/components/listitems/__test__/listitem.test.js +17 -0
- package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/commonjs/components/listitems/index.js +22 -0
- package/lib/commonjs/components/listitems/index.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCheckout.js +103 -0
- package/lib/commonjs/components/modules/ModuleCheckout.js.map +1 -0
- package/lib/commonjs/components/modules/index.js +11 -0
- package/lib/commonjs/components/modules/index.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberPad.js +7 -10
- package/lib/commonjs/components/numberpad/NumberPad.js.map +1 -1
- package/lib/commonjs/components/pictograms/Pictogram.js +19 -1
- package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
- package/lib/commonjs/components/pictograms/README.md +103 -14
- package/lib/commonjs/components/pictograms/svg/PictogramBiometric.js +82 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBiometric.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedEnded.js +43 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedEnded.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedLostConnection.js +64 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedLostConnection.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedPending.js +15 -9
- package/lib/commonjs/components/pictograms/svg/PictogramBleedPending.js.map +1 -1
- package/lib/commonjs/components/pictograms/svg/PictogramBleedQrCode.js +79 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedQrCode.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmailDotCheck.js +60 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmailDotCheck.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmailDotNotif.js +58 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmailDotNotif.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEnded.js +43 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEnded.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramLostConnection.js +58 -0
- package/lib/commonjs/components/pictograms/svg/PictogramLostConnection.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramPending.js +15 -9
- package/lib/commonjs/components/pictograms/svg/PictogramPending.js.map +1 -1
- package/lib/commonjs/components/pictograms/svg/PictogramQrCode.js +91 -0
- package/lib/commonjs/components/pictograms/svg/PictogramQrCode.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramPending.svg +1 -1
- package/lib/commonjs/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
- package/lib/commonjs/components/radio/RadioGroup.js +2 -1
- package/lib/commonjs/components/radio/RadioGroup.js.map +1 -1
- package/lib/commonjs/components/stepper/Stepper.js +52 -0
- package/lib/commonjs/components/stepper/Stepper.js.map +1 -0
- package/lib/commonjs/components/stepper/index.js +17 -0
- package/lib/commonjs/components/stepper/index.js.map +1 -0
- package/lib/commonjs/components/typography/H1.js +5 -3
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +5 -3
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +5 -3
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +2 -1
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +4 -2
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +7 -3
- package/lib/commonjs/components/typography/Hero.js.map +1 -1
- package/lib/commonjs/components/typography/LabelSmall.js +6 -1
- package/lib/commonjs/components/typography/LabelSmall.js.map +1 -1
- package/lib/commonjs/components/typography/LabelSmallAlt.js +39 -0
- package/lib/commonjs/components/typography/LabelSmallAlt.js.map +1 -0
- package/lib/commonjs/components/typography/README.md +23 -0
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
- package/lib/commonjs/components/typography/index.js +11 -0
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
- package/lib/module/components/checkbox/AnimatedCheckbox.js +6 -2
- package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/module/components/codeInput/CodeInput.js +94 -0
- package/lib/module/components/codeInput/CodeInput.js.map +1 -0
- package/lib/module/components/codeInput/index.js +2 -0
- package/lib/module/components/codeInput/index.js.map +1 -0
- package/lib/module/components/icons/Icon.js +2 -0
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/README.md +79 -19
- package/lib/module/components/icons/svg/IconSparkles.js +21 -0
- package/lib/module/components/icons/svg/IconSparkles.js.map +1 -0
- package/lib/module/components/icons/svg/originals/IconSparkles.svg +3 -0
- package/lib/module/components/index.js +5 -3
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/HeaderSecondLevel.js +5 -4
- package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemAction.js +4 -3
- package/lib/module/components/listitems/ListItemAction.js.map +1 -1
- package/lib/module/components/listitems/ListItemHeader.js +77 -0
- package/lib/module/components/listitems/ListItemHeader.js.map +1 -0
- package/lib/module/components/listitems/ListItemInfoCopy.js +7 -32
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +17 -26
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +6 -24
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +69 -10
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js +54 -0
- package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -0
- package/lib/module/components/listitems/ListItemTransaction.js +10 -7
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
- package/lib/module/components/listitems/__test__/listitem.test.js +17 -0
- package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/module/components/listitems/index.js +2 -0
- package/lib/module/components/listitems/index.js.map +1 -1
- package/lib/module/components/modules/ModuleCheckout.js +95 -0
- package/lib/module/components/modules/ModuleCheckout.js.map +1 -0
- package/lib/module/components/modules/index.js +1 -0
- package/lib/module/components/modules/index.js.map +1 -1
- package/lib/module/components/numberpad/NumberPad.js +6 -7
- package/lib/module/components/numberpad/NumberPad.js.map +1 -1
- package/lib/module/components/pictograms/Pictogram.js +19 -1
- package/lib/module/components/pictograms/Pictogram.js.map +1 -1
- package/lib/module/components/pictograms/README.md +103 -14
- package/lib/module/components/pictograms/svg/PictogramBiometric.js +74 -0
- package/lib/module/components/pictograms/svg/PictogramBiometric.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramBleedEnded.js +35 -0
- package/lib/module/components/pictograms/svg/PictogramBleedEnded.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramBleedLostConnection.js +56 -0
- package/lib/module/components/pictograms/svg/PictogramBleedLostConnection.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramBleedPending.js +15 -9
- package/lib/module/components/pictograms/svg/PictogramBleedPending.js.map +1 -1
- package/lib/module/components/pictograms/svg/PictogramBleedQrCode.js +71 -0
- package/lib/module/components/pictograms/svg/PictogramBleedQrCode.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramEmailDotCheck.js +52 -0
- package/lib/module/components/pictograms/svg/PictogramEmailDotCheck.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramEmailDotNotif.js +50 -0
- package/lib/module/components/pictograms/svg/PictogramEmailDotNotif.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramEnded.js +35 -0
- package/lib/module/components/pictograms/svg/PictogramEnded.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramLostConnection.js +50 -0
- package/lib/module/components/pictograms/svg/PictogramLostConnection.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramPending.js +15 -9
- package/lib/module/components/pictograms/svg/PictogramPending.js.map +1 -1
- package/lib/module/components/pictograms/svg/PictogramQrCode.js +83 -0
- package/lib/module/components/pictograms/svg/PictogramQrCode.js.map +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
- package/lib/module/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
- package/lib/module/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
- package/lib/module/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramPending.svg +1 -1
- package/lib/module/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
- package/lib/module/components/radio/RadioGroup.js +2 -1
- package/lib/module/components/radio/RadioGroup.js.map +1 -1
- package/lib/module/components/stepper/Stepper.js +43 -0
- package/lib/module/components/stepper/Stepper.js.map +1 -0
- package/lib/module/components/stepper/index.js +2 -0
- package/lib/module/components/stepper/index.js.map +1 -0
- package/lib/module/components/typography/H1.js +5 -3
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +5 -3
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +5 -3
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +2 -1
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H6.js +4 -2
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +7 -3
- package/lib/module/components/typography/Hero.js.map +1 -1
- package/lib/module/components/typography/LabelSmall.js +6 -1
- package/lib/module/components/typography/LabelSmall.js.map +1 -1
- package/lib/module/components/typography/LabelSmallAlt.js +32 -0
- package/lib/module/components/typography/LabelSmallAlt.js.map +1 -0
- package/lib/module/components/typography/README.md +23 -0
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
- package/lib/module/components/typography/index.js +1 -0
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/codeInput/CodeInput.d.ts +11 -0
- package/lib/typescript/components/codeInput/CodeInput.d.ts.map +1 -0
- package/lib/typescript/components/codeInput/index.d.ts +2 -0
- package/lib/typescript/components/codeInput/index.d.ts.map +1 -0
- package/lib/typescript/components/icons/Icon.d.ts +1 -0
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconSparkles.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconSparkles.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +5 -3
- package/lib/typescript/components/index.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/ListItemHeader.d.ts +34 -0
- package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNav.d.ts +4 -1
- package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNavAlert.d.ts +2 -2
- package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadio.d.ts +21 -3
- package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts +13 -0
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/listitems/index.d.ts +2 -0
- package/lib/typescript/components/listitems/index.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleCheckout.d.ts +15 -0
- package/lib/typescript/components/modules/ModuleCheckout.d.ts.map +1 -0
- package/lib/typescript/components/modules/index.d.ts +1 -0
- package/lib/typescript/components/modules/index.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberPad.d.ts +2 -1
- package/lib/typescript/components/numberpad/NumberPad.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/Pictogram.d.ts +7 -1
- package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramBiometric.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBiometric.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedEnded.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedEnded.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedLostConnection.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedLostConnection.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedPending.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramBleedQrCode.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedQrCode.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmailDotCheck.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmailDotCheck.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmailDotNotif.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmailDotNotif.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramEnded.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramEnded.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramLostConnection.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramLostConnection.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramPending.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramQrCode.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramQrCode.d.ts.map +1 -0
- package/lib/typescript/components/radio/RadioGroup.d.ts +4 -3
- package/lib/typescript/components/radio/RadioGroup.d.ts.map +1 -1
- package/lib/typescript/components/stepper/Stepper.d.ts +8 -0
- package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -0
- package/lib/typescript/components/stepper/index.d.ts +2 -0
- package/lib/typescript/components/stepper/index.d.ts.map +1 -0
- package/lib/typescript/components/typography/H1.d.ts +1 -1
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H2.d.ts +1 -1
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +1 -1
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H4.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/Hero.d.ts +1 -1
- package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelSmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts +14 -0
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts.map +1 -0
- package/lib/typescript/components/typography/index.d.ts +1 -0
- package/lib/typescript/components/typography/index.d.ts.map +1 -1
- package/package.json +9 -2
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
- package/src/components/checkbox/AnimatedCheckbox.tsx +6 -4
- package/src/components/codeInput/CodeInput.tsx +121 -0
- package/src/components/codeInput/index.tsx +1 -0
- package/src/components/icons/Icon.tsx +2 -0
- package/src/components/icons/README.md +79 -19
- package/src/components/icons/svg/IconSparkles.tsx +14 -0
- package/src/components/icons/svg/originals/IconSparkles.svg +3 -0
- package/src/components/index.tsx +5 -3
- package/src/components/layout/HeaderSecondLevel.tsx +6 -9
- package/src/components/listitems/ListItemAction.tsx +4 -3
- package/src/components/listitems/ListItemHeader.tsx +146 -0
- package/src/components/listitems/ListItemInfoCopy.tsx +14 -57
- package/src/components/listitems/ListItemNav.tsx +32 -44
- package/src/components/listitems/ListItemNavAlert.tsx +21 -42
- package/src/components/listitems/ListItemRadio.tsx +99 -12
- package/src/components/listitems/ListItemRadioWithAmount.tsx +69 -0
- package/src/components/listitems/ListItemTransaction.tsx +12 -7
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
- package/src/components/listitems/__test__/listitem.test.tsx +21 -0
- package/src/components/listitems/index.tsx +2 -0
- package/src/components/modules/ModuleCheckout.tsx +98 -0
- package/src/components/modules/index.tsx +1 -0
- package/src/components/numberpad/NumberPad.tsx +7 -8
- package/src/components/pictograms/Pictogram.tsx +23 -2
- package/src/components/pictograms/README.md +103 -14
- package/src/components/pictograms/svg/PictogramBiometric.tsx +78 -0
- package/src/components/pictograms/svg/PictogramBleedEnded.tsx +38 -0
- package/src/components/pictograms/svg/PictogramBleedLostConnection.tsx +66 -0
- package/src/components/pictograms/svg/PictogramBleedPending.tsx +17 -9
- package/src/components/pictograms/svg/PictogramBleedQrCode.tsx +86 -0
- package/src/components/pictograms/svg/PictogramEmailDotCheck.tsx +53 -0
- package/src/components/pictograms/svg/PictogramEmailDotNotif.tsx +51 -0
- package/src/components/pictograms/svg/PictogramEnded.tsx +34 -0
- package/src/components/pictograms/svg/PictogramLostConnection.tsx +58 -0
- package/src/components/pictograms/svg/PictogramPending.tsx +17 -9
- package/src/components/pictograms/svg/PictogramQrCode.tsx +102 -0
- package/src/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
- package/src/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
- package/src/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
- package/src/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramPending.svg +1 -1
- package/src/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
- package/src/components/radio/RadioGroup.tsx +5 -4
- package/src/components/stepper/Stepper.tsx +62 -0
- package/src/components/stepper/index.tsx +1 -0
- package/src/components/typography/H1.tsx +8 -3
- package/src/components/typography/H2.tsx +8 -3
- package/src/components/typography/H3.tsx +8 -3
- package/src/components/typography/H4.tsx +5 -1
- package/src/components/typography/H6.tsx +6 -1
- package/src/components/typography/Hero.tsx +10 -3
- package/src/components/typography/LabelSmall.tsx +8 -1
- package/src/components/typography/LabelSmallAlt.tsx +51 -0
- package/src/components/typography/README.md +23 -0
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
- package/src/components/typography/index.tsx +1 -0
- package/lib/commonjs/components/icons/generateNewIcons.js +0 -165
- package/lib/commonjs/components/icons/generateNewIcons.js.map +0 -1
- package/lib/commonjs/components/icons/generateNewTimestamp.js +0 -8
- package/lib/commonjs/components/icons/generateNewTimestamp.js.map +0 -1
- package/lib/commonjs/components/icons/timestamp.txt +0 -1
- package/lib/commonjs/components/pictograms/generateNewPictograms.js +0 -163
- package/lib/commonjs/components/pictograms/generateNewPictograms.js.map +0 -1
- package/lib/commonjs/components/pictograms/timestamp.txt +0 -1
- package/lib/commonjs/stories/ButtonDS.stories.js +0 -34
- package/lib/commonjs/stories/ButtonDS.stories.js.map +0 -1
- package/lib/commonjs/stories/H1.stories.js +0 -33
- package/lib/commonjs/stories/H1.stories.js.map +0 -1
- package/lib/commonjs/stories/H2.stories.js +0 -33
- package/lib/commonjs/stories/H2.stories.js.map +0 -1
- package/lib/commonjs/stories/H3.stories.js +0 -33
- package/lib/commonjs/stories/H3.stories.js.map +0 -1
- package/lib/commonjs/stories/H4.stories.js +0 -33
- package/lib/commonjs/stories/H4.stories.js.map +0 -1
- package/lib/commonjs/stories/H5.stories.js +0 -33
- package/lib/commonjs/stories/H5.stories.js.map +0 -1
- package/lib/commonjs/stories/H6.stories.js +0 -33
- package/lib/commonjs/stories/H6.stories.js.map +0 -1
- package/lib/commonjs/stories/Label.stories.js +0 -33
- package/lib/commonjs/stories/Label.stories.js.map +0 -1
- package/lib/commonjs/stories/LabelSmall.stories.js +0 -33
- package/lib/commonjs/stories/LabelSmall.stories.js.map +0 -1
- package/lib/commonjs/stories/Link.stories.js +0 -33
- package/lib/commonjs/stories/Link.stories.js.map +0 -1
- package/lib/commonjs/stories/ModuleIDP.stories.js +0 -45
- package/lib/commonjs/stories/ModuleIDP.stories.js.map +0 -1
- package/lib/commonjs/stories/Monospace.stories.js +0 -33
- package/lib/commonjs/stories/Monospace.stories.js.map +0 -1
- package/lib/module/components/icons/generateNewIcons.js +0 -163
- package/lib/module/components/icons/generateNewIcons.js.map +0 -1
- package/lib/module/components/icons/generateNewTimestamp.js +0 -6
- package/lib/module/components/icons/generateNewTimestamp.js.map +0 -1
- package/lib/module/components/icons/timestamp.txt +0 -1
- package/lib/module/components/pictograms/generateNewPictograms.js +0 -161
- package/lib/module/components/pictograms/generateNewPictograms.js.map +0 -1
- package/lib/module/components/pictograms/timestamp.txt +0 -1
- package/lib/module/stories/ButtonDS.stories.js +0 -27
- package/lib/module/stories/ButtonDS.stories.js.map +0 -1
- package/lib/module/stories/H1.stories.js +0 -26
- package/lib/module/stories/H1.stories.js.map +0 -1
- package/lib/module/stories/H2.stories.js +0 -26
- package/lib/module/stories/H2.stories.js.map +0 -1
- package/lib/module/stories/H3.stories.js +0 -26
- package/lib/module/stories/H3.stories.js.map +0 -1
- package/lib/module/stories/H4.stories.js +0 -26
- package/lib/module/stories/H4.stories.js.map +0 -1
- package/lib/module/stories/H5.stories.js +0 -26
- package/lib/module/stories/H5.stories.js.map +0 -1
- package/lib/module/stories/H6.stories.js +0 -26
- package/lib/module/stories/H6.stories.js.map +0 -1
- package/lib/module/stories/Label.stories.js +0 -26
- package/lib/module/stories/Label.stories.js.map +0 -1
- package/lib/module/stories/LabelSmall.stories.js +0 -26
- package/lib/module/stories/LabelSmall.stories.js.map +0 -1
- package/lib/module/stories/Link.stories.js +0 -26
- package/lib/module/stories/Link.stories.js.map +0 -1
- package/lib/module/stories/ModuleIDP.stories.js +0 -37
- package/lib/module/stories/ModuleIDP.stories.js.map +0 -1
- package/lib/module/stories/Monospace.stories.js +0 -26
- package/lib/module/stories/Monospace.stories.js.map +0 -1
- package/lib/typescript/stories/ButtonDS.stories.d.ts +0 -14
- package/lib/typescript/stories/ButtonDS.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H1.stories.d.ts +0 -19
- package/lib/typescript/stories/H1.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H2.stories.d.ts +0 -19
- package/lib/typescript/stories/H2.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H3.stories.d.ts +0 -19
- package/lib/typescript/stories/H3.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H4.stories.d.ts +0 -19
- package/lib/typescript/stories/H4.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H5.stories.d.ts +0 -19
- package/lib/typescript/stories/H5.stories.d.ts.map +0 -1
- package/lib/typescript/stories/H6.stories.d.ts +0 -19
- package/lib/typescript/stories/H6.stories.d.ts.map +0 -1
- package/lib/typescript/stories/Label.stories.d.ts +0 -21
- package/lib/typescript/stories/Label.stories.d.ts.map +0 -1
- package/lib/typescript/stories/LabelSmall.stories.d.ts +0 -21
- package/lib/typescript/stories/LabelSmall.stories.d.ts.map +0 -1
- package/lib/typescript/stories/Link.stories.d.ts +0 -21
- package/lib/typescript/stories/Link.stories.d.ts.map +0 -1
- package/lib/typescript/stories/ModuleIDP.stories.d.ts +0 -24
- package/lib/typescript/stories/ModuleIDP.stories.d.ts.map +0 -1
- package/lib/typescript/stories/Monospace.stories.d.ts +0 -19
- package/lib/typescript/stories/Monospace.stories.d.ts.map +0 -1
- package/src/components/icons/generateNewIcons.js +0 -186
- package/src/components/icons/generateNewTimestamp.js +0 -7
- package/src/components/icons/timestamp.txt +0 -1
- package/src/components/pictograms/generateNewPictograms.js +0 -181
- package/src/components/pictograms/timestamp.txt +0 -1
- package/src/stories/ButtonDS.stories.ts +0 -31
- package/src/stories/H1.stories.ts +0 -28
- package/src/stories/H2.stories.ts +0 -28
- package/src/stories/H3.stories.ts +0 -28
- package/src/stories/H4.stories.ts +0 -28
- package/src/stories/H5.stories.ts +0 -28
- package/src/stories/H6.stories.ts +0 -28
- package/src/stories/Label.stories.ts +0 -28
- package/src/stories/LabelSmall.stories.ts +0 -28
- package/src/stories/Link.stories.ts +0 -28
- package/src/stories/ModuleIDP.stories.tsx +0 -44
- package/src/stories/Monospace.stories.ts +0 -28
|
@@ -8,20 +8,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
10
|
var _core = require("../../core");
|
|
11
|
-
var _fonts = require("../../utils/fonts");
|
|
12
11
|
var _icons = require("../icons");
|
|
13
|
-
var _spacer = require("../spacer");
|
|
14
12
|
var _typography = require("../typography");
|
|
15
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
18
|
-
const legacyStyles = _reactNative.StyleSheet.create({
|
|
19
|
-
textValue: {
|
|
20
|
-
fontSize: 18,
|
|
21
|
-
lineHeight: 24,
|
|
22
|
-
...(0, _fonts.makeFontStyleObject)("SemiBold", undefined, "TitilliumWeb")
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
15
|
const ListItemInfoCopy = _ref => {
|
|
26
16
|
var _IOScaleValues$basicB;
|
|
27
17
|
let {
|
|
@@ -38,31 +28,16 @@ const ListItemInfoCopy = _ref => {
|
|
|
38
28
|
isExperimental
|
|
39
29
|
} = (0, _core.useIOExperimentalDesign)();
|
|
40
30
|
const theme = (0, _core.useIOTheme)();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const legacyInfoCopyText = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_typography.Body, {
|
|
44
|
-
weight: "Regular"
|
|
45
|
-
}, label), /*#__PURE__*/_react.default.createElement(_spacer.VSpacer, {
|
|
46
|
-
size: 4
|
|
47
|
-
}), typeof value === "string" ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
48
|
-
style: [legacyStyles.textValue, {
|
|
49
|
-
color: _core.IOColors.blue
|
|
50
|
-
}],
|
|
51
|
-
numberOfLines: numberOfLines
|
|
52
|
-
}, value) : {
|
|
53
|
-
value
|
|
54
|
-
});
|
|
55
|
-
const infoCopyText = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_typography.LabelSmall, {
|
|
31
|
+
const foregroundColor = isExperimental ? theme["interactiveElem-default"] : "blue";
|
|
32
|
+
const listItemInfoCopyContent = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_typography.LabelSmall, {
|
|
56
33
|
weight: "Regular",
|
|
57
34
|
color: theme["textBody-tertiary"]
|
|
58
35
|
}, label), typeof value === "string" ? /*#__PURE__*/_react.default.createElement(_typography.H6, {
|
|
59
|
-
color:
|
|
36
|
+
color: foregroundColor,
|
|
60
37
|
numberOfLines: numberOfLines
|
|
61
38
|
}, value) : {
|
|
62
39
|
value
|
|
63
40
|
});
|
|
64
|
-
const infoCopyTextComponent = isExperimental ? infoCopyText : legacyInfoCopyText;
|
|
65
|
-
const iconColor = isExperimental ? theme["interactiveElem-default"] : "blue";
|
|
66
41
|
const mapBackgroundStates = {
|
|
67
42
|
default: (0, _core.hexToRgba)(_core.IOColors[theme["listItem-pressed"]], 0),
|
|
68
43
|
pressed: _core.IOColors[theme["listItem-pressed"]]
|
|
@@ -117,13 +92,13 @@ const ListItemInfoCopy = _ref => {
|
|
|
117
92
|
size: _core.IOListItemVisualParams.iconSize
|
|
118
93
|
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
119
94
|
style: _core.IOStyles.flex
|
|
120
|
-
},
|
|
95
|
+
}, listItemInfoCopyContent), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
121
96
|
style: {
|
|
122
97
|
marginLeft: _core.IOListItemVisualParams.iconMargin
|
|
123
98
|
}
|
|
124
99
|
}, /*#__PURE__*/_react.default.createElement(_icons.Icon, {
|
|
125
100
|
name: "copy",
|
|
126
|
-
color:
|
|
101
|
+
color: foregroundColor,
|
|
127
102
|
size: _core.IOListItemVisualParams.chevronSize
|
|
128
103
|
})))));
|
|
129
104
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","_icons","_typography","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ListItemInfoCopy","_ref","_IOScaleValues$basicB","label","value","numberOfLines","onPress","icon","accessibilityLabel","testID","isPressed","useSharedValue","isExperimental","useIOExperimentalDesign","theme","useIOTheme","foregroundColor","listItemInfoCopyContent","createElement","Fragment","LabelSmall","weight","color","H6","mapBackgroundStates","hexToRgba","IOColors","pressed","animationScaleValue","IOScaleValues","basicButton","pressedState","progressPressed","useDerivedValue","withSpring","IOSpringValues","button","animatedScaleStyle","useAnimatedStyle","scale","interpolate","Extrapolate","CLAMP","transform","animatedBackgroundStyle","backgroundColor","interpolateColor","handlePressIn","useCallback","handlePressOut","Pressable","onPressIn","onPressOut","accessible","accessibilityRole","View","style","IOListItemStyles","listItem","listItemInner","marginRight","IOListItemVisualParams","iconMargin","Icon","name","size","iconSize","IOStyles","flex","marginLeft","chevronSize","exports","_default"],"sourceRoot":"../../../../src","sources":["components/listitems/ListItemInfoCopy.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AASA,IAAAG,KAAA,GAAAH,OAAA;AAYA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAA+C,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,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AACC;IAAW;EAAE,gBAC9D5F,MAAA,CAAAe,OAAA,CAAAiC,aAAA,CAAC1C,MAAA,CAAAuF,IAAI;IACHC,IAAI,EAAEzD,IAAK;IACXe,KAAK,EAAC,UAAU;IAChB2C,IAAI,EAAEJ,4BAAsB,CAACK;EAAS,CACvC,CACG,CACP,eACDhG,MAAA,CAAAe,OAAA,CAAAiC,aAAA,CAAC7C,YAAA,CAAAkF,IAAI;IAACC,KAAK,EAAEW,cAAQ,CAACC;EAAK,GAAEnD,uBAA8B,CAAC,eAC5D/C,MAAA,CAAAe,OAAA,CAAAiC,aAAA,CAAC7C,YAAA,CAAAkF,IAAI;IAACC,KAAK,EAAE;MAAEa,UAAU,EAAER,4BAAsB,CAACC;IAAW;EAAE,gBAC7D5F,MAAA,CAAAe,OAAA,CAAAiC,aAAA,CAAC1C,MAAA,CAAAuF,IAAI;IACHC,IAAI,EAAC,MAAM;IACX1C,KAAK,EAAEN,eAAgB;IACvBiD,IAAI,EAAEJ,4BAAsB,CAACS;EAAY,CAC1C,CACG,CACO,CACF,CACN,CAAC;AAEhB,CAAC;AAACC,OAAA,CAAAvE,gBAAA,GAAAA,gBAAA;AAAA,IAAAwE,QAAA,GAEaxE,gBAAgB;AAAAuE,OAAA,CAAAtF,OAAA,GAAAuF,QAAA"}
|
|
@@ -8,21 +8,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
10
|
var _core = require("../../core");
|
|
11
|
-
var
|
|
11
|
+
var _badge = require("../badge");
|
|
12
12
|
var _icons = require("../icons");
|
|
13
13
|
var _logos = require("../logos");
|
|
14
|
+
var _spacer = require("../spacer");
|
|
14
15
|
var _typography = require("../typography");
|
|
15
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
18
|
-
const legacyStyles = _reactNative.StyleSheet.create({
|
|
19
|
-
textValue: {
|
|
20
|
-
fontSize: 18,
|
|
21
|
-
lineHeight: 24,
|
|
22
|
-
color: _core.IOColors.bluegreyDark,
|
|
23
|
-
...(0, _fonts.makeFontStyleObject)("SemiBold", undefined, "TitilliumWeb")
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
18
|
const ListItemNav = _ref => {
|
|
27
19
|
var _IOScaleValues$basicB;
|
|
28
20
|
let {
|
|
@@ -33,27 +25,27 @@ const ListItemNav = _ref => {
|
|
|
33
25
|
iconColor = "grey-450",
|
|
34
26
|
paymentLogo,
|
|
35
27
|
accessibilityLabel,
|
|
36
|
-
testID
|
|
28
|
+
testID,
|
|
29
|
+
hideChevron = false,
|
|
30
|
+
badgeProps
|
|
37
31
|
} = _ref;
|
|
38
32
|
const isPressed = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
39
33
|
const {
|
|
40
34
|
isExperimental
|
|
41
35
|
} = (0, _core.useIOExperimentalDesign)();
|
|
42
36
|
const theme = (0, _core.useIOTheme)();
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
const navText = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_typography.H6, {
|
|
37
|
+
const listItemNavContent = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, badgeProps && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
38
|
+
style: {
|
|
39
|
+
alignSelf: "flex-start"
|
|
40
|
+
}
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_badge.Badge, badgeProps)), /*#__PURE__*/_react.default.createElement(_spacer.VSpacer, {
|
|
42
|
+
size: 4
|
|
43
|
+
})), typeof value === "string" ? /*#__PURE__*/_react.default.createElement(_typography.H6, {
|
|
51
44
|
color: theme["textBody-default"]
|
|
52
|
-
}, value), description && /*#__PURE__*/_react.default.createElement(_typography.LabelSmall, {
|
|
45
|
+
}, value) : value, description && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, typeof description === "string" ? /*#__PURE__*/_react.default.createElement(_typography.LabelSmall, {
|
|
53
46
|
weight: "Regular",
|
|
54
47
|
color: theme["textBody-tertiary"]
|
|
55
|
-
}, description));
|
|
56
|
-
const navTextComponent = isExperimental ? navText : legacyNavText;
|
|
48
|
+
}, description) : description));
|
|
57
49
|
const mapBackgroundStates = {
|
|
58
50
|
default: (0, _core.hexToRgba)(_core.IOColors[theme["listItem-pressed"]], 0),
|
|
59
51
|
pressed: _core.IOColors[theme["listItem-pressed"]]
|
|
@@ -116,7 +108,7 @@ const ListItemNav = _ref => {
|
|
|
116
108
|
size: _core.IOListItemVisualParams.iconSize
|
|
117
109
|
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
118
110
|
style: _core.IOStyles.flex
|
|
119
|
-
},
|
|
111
|
+
}, listItemNavContent), !hideChevron && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
120
112
|
style: {
|
|
121
113
|
marginLeft: _core.IOListItemVisualParams.iconMargin
|
|
122
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","_badge","_icons","_logos","_spacer","_typography","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ListItemNav","_ref","_IOScaleValues$basicB","value","description","onPress","icon","iconColor","paymentLogo","accessibilityLabel","testID","hideChevron","badgeProps","isPressed","useSharedValue","isExperimental","useIOExperimentalDesign","theme","useIOTheme","listItemNavContent","createElement","Fragment","View","style","alignSelf","Badge","VSpacer","size","H6","color","LabelSmall","weight","mapBackgroundStates","hexToRgba","IOColors","pressed","navIconColor","animationScaleValue","IOScaleValues","basicButton","pressedState","progressPressed","useDerivedValue","withSpring","IOSpringValues","button","animatedScaleStyle","useAnimatedStyle","scale","interpolate","Extrapolate","CLAMP","transform","animatedBackgroundStyle","backgroundColor","interpolateColor","handlePressIn","useCallback","handlePressOut","Pressable","onPressIn","onPressOut","accessible","accessibilityRole","IOListItemStyles","listItem","listItemInner","marginRight","IOListItemVisualParams","iconMargin","Icon","name","iconSize","LogoPayment","IOStyles","flex","marginLeft","chevronSize","exports","_default"],"sourceRoot":"../../../../src","sources":["components/listitems/ListItemNav.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AASA,IAAAG,KAAA,GAAAH,OAAA;AAYA,IAAAI,MAAA,GAAA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C9C,MAAA,CAAAgG,IAAI;IACHC,IAAI,EAAEjE,IAAK;IACXuB,KAAK,EAAEtB,SAAU;IACjBoB,IAAI,EAAEyC,4BAAsB,CAACI;EAAS,CACvC,CACG,CACP,EACAhE,WAAW,iBACVzC,MAAA,CAAAkB,OAAA,CAAAmC,aAAA,CAAClD,YAAA,CAAAoD,IAAI;IAACC,KAAK,EAAE;MAAE4C,WAAW,EAAEC,4BAAsB,CAACC;IAAW;EAAE,gBAC9DtG,MAAA,CAAAkB,OAAA,CAAAmC,aAAA,CAAC7C,MAAA,CAAAkG,WAAW;IACVF,IAAI,EAAE/D,WAAY;IAClBmB,IAAI,EAAEyC,4BAAsB,CAACI;EAAS,CACvC,CACG,CACP,eACDzG,MAAA,CAAAkB,OAAA,CAAAmC,aAAA,CAAClD,YAAA,CAAAoD,IAAI;IAACC,KAAK,EAAEmD,cAAQ,CAACC;EAAK,GAAExD,kBAAyB,CAAC,EACtD,CAACR,WAAW,iBACX5C,MAAA,CAAAkB,OAAA,CAAAmC,aAAA,CAAClD,YAAA,CAAAoD,IAAI;IAACC,KAAK,EAAE;MAAEqD,UAAU,EAAER,4BAAsB,CAACC;IAAW;EAAE,gBAC7DtG,MAAA,CAAAkB,OAAA,CAAAmC,aAAA,CAAC9C,MAAA,CAAAgG,IAAI;IACHC,IAAI,EAAC,sBAAsB;IAC3B1C,KAAK,EAAEO,YAAa;IACpBT,IAAI,EAAEyC,4BAAsB,CAACS;EAAY,CAC1C,CACG,CAEK,CACF,CACN,CAAC;AAEhB,CAAC;AAACC,OAAA,CAAA9E,WAAA,GAAAA,WAAA;AAAA,IAAA+E,QAAA,GAEa/E,WAAW;AAAA8E,OAAA,CAAA7F,OAAA,GAAA8F,QAAA"}
|
|
@@ -8,19 +8,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
10
|
var _core = require("../../core");
|
|
11
|
-
var _fonts = require("../../utils/fonts");
|
|
12
11
|
var _icons = require("../icons");
|
|
13
12
|
var _typography = require("../typography");
|
|
14
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
17
|
-
const legacyStyles = _reactNative.StyleSheet.create({
|
|
18
|
-
textValue: {
|
|
19
|
-
fontSize: 18,
|
|
20
|
-
lineHeight: 24,
|
|
21
|
-
...(0, _fonts.makeFontStyleObject)("SemiBold", undefined, "TitilliumWeb")
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
15
|
const ListItemNavAlert = _ref => {
|
|
25
16
|
var _IOScaleValues$basicB;
|
|
26
17
|
let {
|
|
@@ -38,21 +29,12 @@ const ListItemNavAlert = _ref => {
|
|
|
38
29
|
const theme = (0, _core.useIOTheme)();
|
|
39
30
|
|
|
40
31
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
41
|
-
const
|
|
42
|
-
style: [legacyStyles.textValue, {
|
|
43
|
-
color: _core.IOColors.bluegreyDark
|
|
44
|
-
}]
|
|
45
|
-
}, value), description && /*#__PURE__*/_react.default.createElement(_typography.Body, {
|
|
46
|
-
weight: "SemiBold",
|
|
47
|
-
color: theme.errorText
|
|
48
|
-
}, description));
|
|
49
|
-
const navAlertText = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_typography.H6, {
|
|
32
|
+
const listItemNavAlertContent = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, typeof value === "string" ? /*#__PURE__*/_react.default.createElement(_typography.H6, {
|
|
50
33
|
color: theme["textBody-default"]
|
|
51
|
-
}, value), description && /*#__PURE__*/_react.default.createElement(_typography.LabelSmall, {
|
|
34
|
+
}, value) : value, description && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, typeof description === "string" ? /*#__PURE__*/_react.default.createElement(_typography.LabelSmall, {
|
|
52
35
|
weight: "SemiBold",
|
|
53
36
|
color: theme.errorText
|
|
54
|
-
}, description));
|
|
55
|
-
const navAlertTextComponent = isExperimental ? navAlertText : legacyNavAlertText;
|
|
37
|
+
}, description) : description));
|
|
56
38
|
const iconColor = isExperimental ? theme["interactiveElem-default"] : "blue";
|
|
57
39
|
const mapBackgroundStates = {
|
|
58
40
|
default: (0, _core.hexToRgba)(_core.IOColors[theme["listItem-pressed"]], 0),
|
|
@@ -108,7 +90,7 @@ const ListItemNavAlert = _ref => {
|
|
|
108
90
|
size: _core.IOListItemVisualParams.iconSize
|
|
109
91
|
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
110
92
|
style: _core.IOStyles.flex
|
|
111
|
-
},
|
|
93
|
+
}, listItemNavAlertContent), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
112
94
|
style: {
|
|
113
95
|
marginLeft: _core.IOListItemVisualParams.iconMargin
|
|
114
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","_icons","_typography","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ListItemNavAlert","_ref","_IOScaleValues$basicB","value","description","withoutIcon","onPress","accessibilityLabel","testID","isPressed","useSharedValue","isExperimental","useIOExperimentalDesign","theme","useIOTheme","listItemNavAlertContent","createElement","Fragment","H6","color","LabelSmall","weight","errorText","iconColor","mapBackgroundStates","hexToRgba","IOColors","pressed","animationScaleValue","IOScaleValues","basicButton","pressedState","progressPressed","useDerivedValue","withSpring","IOSpringValues","button","animatedScaleStyle","useAnimatedStyle","scale","interpolate","Extrapolate","CLAMP","transform","animatedBackgroundStyle","backgroundColor","interpolateColor","handlePressIn","useCallback","handlePressOut","Pressable","onPressIn","onPressOut","accessible","accessibilityRole","View","style","IOListItemStyles","listItem","listItemInner","marginRight","IOListItemVisualParams","iconMargin","Icon","name","errorIcon","size","iconSize","IOStyles","flex","marginLeft","chevronSize","exports","_default"],"sourceRoot":"../../../../src","sources":["components/listitems/ListItemNavAlert.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AASA,IAAAG,KAAA,GAAAH,OAAA;AAYA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAA+C,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,G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|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeHapticFeedback = _interopRequireDefault(require("react-native-haptic-feedback"));
|
|
10
10
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
+
var _rnPlaceholder = _interopRequireDefault(require("rn-placeholder"));
|
|
11
12
|
var _core = require("../../core");
|
|
12
13
|
var _icons = require("../icons");
|
|
13
14
|
var _spacer = require("../spacer");
|
|
14
15
|
var _typography = require("../typography");
|
|
15
16
|
var _AnimatedRadio = require("../radio/AnimatedRadio");
|
|
17
|
+
var _logos = require("../logos");
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -21,7 +23,7 @@ const DISABLED_OPACITY = 0.5;
|
|
|
21
23
|
// disabled: the component is no longer touchable
|
|
22
24
|
// onPress:
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* `ListItemRadio` component with the automatic state management that uses a {@link AnimatedCheckBox}
|
|
25
27
|
* The toggleValue change when a `onPress` event is received and dispatch the `onValueChange`.
|
|
26
28
|
*
|
|
27
29
|
* @param props
|
|
@@ -32,16 +34,16 @@ const ListItemRadio = _ref => {
|
|
|
32
34
|
let {
|
|
33
35
|
value,
|
|
34
36
|
description,
|
|
35
|
-
|
|
37
|
+
startImage,
|
|
36
38
|
selected,
|
|
37
39
|
disabled,
|
|
38
40
|
onValueChange,
|
|
41
|
+
loadingProps,
|
|
39
42
|
testID
|
|
40
43
|
} = _ref;
|
|
41
44
|
const [toggleValue, setToggleValue] = (0, React.useState)(selected ?? false);
|
|
42
45
|
// Animations
|
|
43
46
|
const isPressed = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
44
|
-
|
|
45
47
|
// Scaling transformation applied when the button is pressed
|
|
46
48
|
const animationScaleValue = _core.IOScaleValues === null || _core.IOScaleValues === void 0 || (_IOScaleValues$basicB = _core.IOScaleValues.basicButton) === null || _IOScaleValues$basicB === void 0 ? void 0 : _IOScaleValues$basicB.pressedState;
|
|
47
49
|
const progressPressed = (0, _reactNativeReanimated.useDerivedValue)(() => (0, _reactNativeReanimated.withSpring)(isPressed.value, _core.IOSpringValues.button));
|
|
@@ -83,7 +85,63 @@ const ListItemRadio = _ref => {
|
|
|
83
85
|
onValueChange(!toggleValue);
|
|
84
86
|
}
|
|
85
87
|
};
|
|
86
|
-
|
|
88
|
+
const disabledStyle = {
|
|
89
|
+
opacity: disabled ? DISABLED_OPACITY : 1
|
|
90
|
+
};
|
|
91
|
+
const SkeletonDescriptionLines = () => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_spacer.VSpacer, {
|
|
92
|
+
size: 8
|
|
93
|
+
}), /*#__PURE__*/React.createElement(_rnPlaceholder.default.Box, {
|
|
94
|
+
animate: "fade",
|
|
95
|
+
radius: 8,
|
|
96
|
+
width: "100%",
|
|
97
|
+
height: 8
|
|
98
|
+
}), /*#__PURE__*/React.createElement(_spacer.VSpacer, {
|
|
99
|
+
size: 8
|
|
100
|
+
}), /*#__PURE__*/React.createElement(_rnPlaceholder.default.Box, {
|
|
101
|
+
animate: "fade",
|
|
102
|
+
radius: 8,
|
|
103
|
+
width: "100%",
|
|
104
|
+
height: 8
|
|
105
|
+
}), /*#__PURE__*/React.createElement(_spacer.VSpacer, {
|
|
106
|
+
size: 8
|
|
107
|
+
}), /*#__PURE__*/React.createElement(_rnPlaceholder.default.Box, {
|
|
108
|
+
animate: "fade",
|
|
109
|
+
radius: 8,
|
|
110
|
+
width: "100%",
|
|
111
|
+
height: 8
|
|
112
|
+
}));
|
|
113
|
+
const SkeletonIcon = () => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
114
|
+
style: {
|
|
115
|
+
marginRight: _core.IOSelectionListItemVisualParams.iconMargin
|
|
116
|
+
}
|
|
117
|
+
}, /*#__PURE__*/React.createElement(_rnPlaceholder.default.Box, {
|
|
118
|
+
animate: "fade",
|
|
119
|
+
radius: 4,
|
|
120
|
+
width: _core.IOSelectionListItemVisualParams.iconSize,
|
|
121
|
+
height: _core.IOSelectionListItemVisualParams.iconSize
|
|
122
|
+
}));
|
|
123
|
+
const SkeletonComponent = () => /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
124
|
+
style: _core.IOSelectionListItemStyles.listItem
|
|
125
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
126
|
+
style: _core.IOSelectionListItemStyles.listItemInner
|
|
127
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
128
|
+
style: [_core.IOStyles.flex, _core.IOStyles.rowSpaceBetween, _core.IOStyles.alignCenter]
|
|
129
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
130
|
+
style: [_core.IOStyles.row, _core.IOStyles.alignCenter]
|
|
131
|
+
}, (loadingProps === null || loadingProps === void 0 ? void 0 : loadingProps.skeletonIcon) && /*#__PURE__*/React.createElement(SkeletonIcon, null), /*#__PURE__*/React.createElement(_rnPlaceholder.default.Box, {
|
|
132
|
+
animate: "fade",
|
|
133
|
+
radius: 8,
|
|
134
|
+
width: 179,
|
|
135
|
+
height: 16
|
|
136
|
+
})), /*#__PURE__*/React.createElement(_spacer.HSpacer, {
|
|
137
|
+
size: 8
|
|
138
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
139
|
+
pointerEvents: "none",
|
|
140
|
+
style: disabledStyle
|
|
141
|
+
}, /*#__PURE__*/React.createElement(_AnimatedRadio.AnimatedRadio, {
|
|
142
|
+
checked: toggleValue
|
|
143
|
+
})))), (loadingProps === null || loadingProps === void 0 ? void 0 : loadingProps.skeletonDescription) && /*#__PURE__*/React.createElement(SkeletonDescriptionLines, null));
|
|
144
|
+
return loadingProps !== null && loadingProps !== void 0 && loadingProps.state ? /*#__PURE__*/React.createElement(SkeletonComponent, null) : /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
87
145
|
onPress: toggleRadioItem,
|
|
88
146
|
onPressIn: handlePressIn,
|
|
89
147
|
onPressOut: handlePressOut,
|
|
@@ -91,9 +149,7 @@ const ListItemRadio = _ref => {
|
|
|
91
149
|
testID: testID,
|
|
92
150
|
disabled: disabled
|
|
93
151
|
}, /*#__PURE__*/React.createElement(_reactNativeReanimated.default.View, {
|
|
94
|
-
style: [_core.IOSelectionListItemStyles.listItem, animatedBackgroundStyle,
|
|
95
|
-
opacity: disabled ? DISABLED_OPACITY : 1
|
|
96
|
-
}]
|
|
152
|
+
style: [_core.IOSelectionListItemStyles.listItem, animatedBackgroundStyle, disabledStyle]
|
|
97
153
|
// This is required to avoid opacity
|
|
98
154
|
// inheritance on Android
|
|
99
155
|
,
|
|
@@ -106,14 +162,17 @@ const ListItemRadio = _ref => {
|
|
|
106
162
|
style: [_core.IOStyles.row, {
|
|
107
163
|
flexShrink: 1
|
|
108
164
|
}]
|
|
109
|
-
},
|
|
165
|
+
}, startImage && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
110
166
|
style: {
|
|
111
167
|
marginRight: _core.IOSelectionListItemVisualParams.iconMargin
|
|
112
168
|
}
|
|
113
|
-
}, /*#__PURE__*/React.createElement(_icons.Icon, {
|
|
114
|
-
name: icon,
|
|
169
|
+
}, startImage.icon && /*#__PURE__*/React.createElement(_icons.Icon, {
|
|
170
|
+
name: startImage.icon,
|
|
115
171
|
color: "grey-300",
|
|
116
172
|
size: _core.IOSelectionListItemVisualParams.iconSize
|
|
173
|
+
}), startImage.paymentLogo && /*#__PURE__*/React.createElement(_logos.LogoPayment, {
|
|
174
|
+
name: startImage.paymentLogo,
|
|
175
|
+
size: _core.IOSelectionListItemVisualParams.iconSize
|
|
117
176
|
})), /*#__PURE__*/React.createElement(_typography.H6, {
|
|
118
177
|
color: "black",
|
|
119
178
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeHapticFeedback","_interopRequireDefault","_reactNativeReanimated","_core","_icons","_spacer","_typography","_AnimatedRadio","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","DISABLED_OPACITY","ListItemRadio","_ref","_IOScaleValues$basicB","value","description","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeHapticFeedback","_interopRequireDefault","_reactNativeReanimated","_rnPlaceholder","_core","_icons","_spacer","_typography","_AnimatedRadio","_logos","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","DISABLED_OPACITY","ListItemRadio","_ref","_IOScaleValues$basicB","value","description","startImage","selected","disabled","onValueChange","loadingProps","testID","toggleValue","setToggleValue","useState","isPressed","useSharedValue","animationScaleValue","IOScaleValues","basicButton","pressedState","progressPressed","useDerivedValue","withSpring","IOSpringValues","button","theme","useIOTheme","mapBackgroundStates","hexToRgba","IOColors","pressed","animatedScaleStyle","useAnimatedStyle","scale","interpolate","Extrapolate","CLAMP","transform","handlePressIn","useCallback","handlePressOut","animatedBackgroundStyle","backgroundColor","interpolateColor","toggleRadioItem","ReactNativeHapticFeedback","trigger","undefined","disabledStyle","opacity","SkeletonDescriptionLines","createElement","Fragment","VSpacer","size","Box","animate","radius","width","height","SkeletonIcon","View","style","marginRight","IOSelectionListItemVisualParams","iconMargin","iconSize","SkeletonComponent","IOSelectionListItemStyles","listItem","listItemInner","IOStyles","flex","rowSpaceBetween","alignCenter","row","skeletonIcon","HSpacer","pointerEvents","AnimatedRadio","checked","skeletonDescription","state","Pressable","onPress","onPressIn","onPressOut","onTouchEnd","needsOffscreenAlphaCompositing","flexShrink","icon","Icon","name","color","paymentLogo","LogoPayment","H6","descriptionMargin","LabelSmall","weight","exports"],"sourceRoot":"../../../../src","sources":["components/listitems/ListItemRadio.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAL,uBAAA,CAAAC,OAAA;AASA,IAAAK,cAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAWA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAA0D,SAAAG,uBAAAS,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OA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EAAE,CAAE,CAAC,eACpB3F,KAAA,CAAAwF,aAAA,CAACrF,YAAA,CAAA+F,IAAI;IAACiB,aAAa,EAAC;EAAM,gBACxBnH,KAAA,CAAAwF,aAAA,CAAC5E,cAAA,CAAAwG,aAAa;IAACC,OAAO,EAAE1E,QAAQ,IAAIK;EAAY,CAAE,CAC9C,CACF,CAAC,EACNP,WAAW,iBACVzC,KAAA,CAAAwF,aAAA,CAACrF,YAAA,CAAA+F,IAAI,qBACHlG,KAAA,CAAAwF,aAAA,CAAC9E,OAAA,CAAAgF,OAAO;IACNC,IAAI,EAAEU,qCAA+B,CAACiC;EAAkB,CACzD,CAAC,eACFtI,KAAA,CAAAwF,aAAA,CAAC7E,WAAA,CAAA4H,UAAU;IAACC,MAAM,EAAC,SAAS;IAACN,KAAK,EAAEpE,KAAK,CAAC,mBAAmB;EAAE,GAC5DrB,WACS,CACR,CAEK,CACF,CACN,CACZ;AACH,CAAC;AAACgG,OAAA,CAAApG,aAAA,GAAAA,aAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ListItemRadioWithAmount = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeHapticFeedback = _interopRequireDefault(require("react-native-haptic-feedback"));
|
|
10
|
+
var _core = require("../../core");
|
|
11
|
+
var _icons = require("../icons");
|
|
12
|
+
var _AnimatedRadio = require("../radio/AnimatedRadio");
|
|
13
|
+
var _spacer = require("../spacer");
|
|
14
|
+
var _typography = require("../typography");
|
|
15
|
+
var _LabelSmall = require("../typography/LabelSmall");
|
|
16
|
+
var _PressableListItemsBase = require("./PressableListItemsBase");
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
|
+
const ListItemRadioWithAmount = props => {
|
|
21
|
+
const [toggleValue, setToggleValue] = React.useState(props.selected ?? false);
|
|
22
|
+
const pressHandler = () => {
|
|
23
|
+
_reactNativeHapticFeedback.default.trigger("impactLight");
|
|
24
|
+
setToggleValue(val => !val);
|
|
25
|
+
};
|
|
26
|
+
const isExperimental = (0, _core.useIOExperimentalDesign)();
|
|
27
|
+
const interactiveColor = isExperimental ? "blueIO-500" : "blue";
|
|
28
|
+
const suggestColor = "hanPurple-500";
|
|
29
|
+
return /*#__PURE__*/React.createElement(_PressableListItemsBase.PressableListItemBase, {
|
|
30
|
+
onPress: pressHandler
|
|
31
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, /*#__PURE__*/React.createElement(_typography.LabelSmallAlt, null, props.label), props.isSuggested && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_spacer.VSpacer, {
|
|
32
|
+
size: 4
|
|
33
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
34
|
+
style: styles.rowCenter
|
|
35
|
+
}, /*#__PURE__*/React.createElement(_icons.Icon, {
|
|
36
|
+
name: "sparkles",
|
|
37
|
+
size: 16,
|
|
38
|
+
color: suggestColor
|
|
39
|
+
}), /*#__PURE__*/React.createElement(_spacer.HSpacer, {
|
|
40
|
+
size: 4
|
|
41
|
+
}), /*#__PURE__*/React.createElement(_LabelSmall.LabelSmall, {
|
|
42
|
+
weight: "Regular",
|
|
43
|
+
color: suggestColor
|
|
44
|
+
}, props.suggestReason)))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
45
|
+
pointerEvents: "none",
|
|
46
|
+
style: {
|
|
47
|
+
flexDirection: "row"
|
|
48
|
+
}
|
|
49
|
+
}, /*#__PURE__*/React.createElement(_typography.H6, {
|
|
50
|
+
color: interactiveColor
|
|
51
|
+
}, props.formattedAmountString), /*#__PURE__*/React.createElement(_spacer.HSpacer, {
|
|
52
|
+
size: 8
|
|
53
|
+
}), /*#__PURE__*/React.createElement(_AnimatedRadio.AnimatedRadio, {
|
|
54
|
+
checked: toggleValue
|
|
55
|
+
})));
|
|
56
|
+
};
|
|
57
|
+
exports.ListItemRadioWithAmount = ListItemRadioWithAmount;
|
|
58
|
+
const styles = _reactNative.StyleSheet.create({
|
|
59
|
+
rowCenter: {
|
|
60
|
+
flexDirection: "row",
|
|
61
|
+
alignItems: "center"
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=ListItemRadioWithAmount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeHapticFeedback","_interopRequireDefault","_core","_icons","_AnimatedRadio","_spacer","_typography","_LabelSmall","_PressableListItemsBase","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ListItemRadioWithAmount","props","toggleValue","setToggleValue","useState","selected","pressHandler","RNReactNativeHapticFeedback","trigger","val","isExperimental","useIOExperimentalDesign","interactiveColor","suggestColor","createElement","PressableListItemBase","onPress","View","LabelSmallAlt","label","isSuggested","Fragment","VSpacer","size","style","styles","rowCenter","Icon","name","color","HSpacer","LabelSmall","weight","suggestReason","pointerEvents","flexDirection","H6","formattedAmountString","AnimatedRadio","checked","exports","StyleSheet","create","alignItems"],"sourceRoot":"../../../../src","sources":["components/listitems/ListItemRadioWithAmount.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,uBAAA,GAAAV,OAAA;AAAiE,SAAAG,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAhB,wBAAAY,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,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