@pagopa/io-app-design-system 2.1.0-3 → 2.1.1
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/alert/Alert.js +12 -5
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/banner/Banner.js +5 -1
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -0
- package/lib/commonjs/components/banner/__test__/banner.test.js +4 -2
- package/lib/commonjs/components/banner/__test__/banner.test.js.map +1 -1
- package/lib/commonjs/components/codeInput/CodeInput.js +1 -1
- package/lib/commonjs/components/common/LogoPaymentWithFallback.js +20 -11
- package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -1
- package/lib/commonjs/components/icons/Icon.js +6 -2
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/svg/IconNavQrWallet.js +28 -0
- package/lib/commonjs/components/icons/svg/IconNavQrWallet.js.map +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconNavQrWallet.svg +1 -0
- package/lib/commonjs/components/listitems/ListItemInfo.js +6 -4
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +27 -25
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -10
- package/lib/commonjs/components/listitems/__test__/listitem.test.js +10 -4
- package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleIDP.js +2 -9
- package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
- package/lib/commonjs/components/modules/ModulePaymentNotice.js +8 -6
- package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/commonjs/components/otpInput/BoxedInput.js +1 -1
- package/lib/commonjs/components/pictograms/Pictogram.js +4 -0
- package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
- package/lib/commonjs/components/pictograms/svg/PictogramEmptyWallet.js +43 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEmptyWallet.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramMeterLimit.js +46 -0
- package/lib/commonjs/components/pictograms/svg/PictogramMeterLimit.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramEmptyWallet.svg +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramMeterLimit.svg +1 -0
- package/lib/commonjs/components/tag/Tag.js +4 -11
- package/lib/commonjs/components/tag/Tag.js.map +1 -1
- package/lib/commonjs/components/typography/ComposedBodyFromArray.js +26 -0
- package/lib/commonjs/components/typography/ComposedBodyFromArray.js.map +1 -0
- package/lib/commonjs/components/typography/H2.js +2 -2
- package/lib/commonjs/components/typography/IOText.js +4 -2
- package/lib/commonjs/components/typography/IOText.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/ComposedBodyFromArray.test.js +107 -0
- package/lib/commonjs/components/typography/__test__/ComposedBodyFromArray.test.js.map +1 -0
- package/lib/commonjs/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +895 -0
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +1 -1
- package/lib/commonjs/components/typography/index.js +11 -0
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/core/IODSExperimentalContextProvider.js +1 -2
- package/lib/commonjs/core/IODSExperimentalContextProvider.js.map +1 -1
- package/lib/commonjs/core/IOThemeContextProvider.js +1 -2
- package/lib/commonjs/core/IOThemeContextProvider.js.map +1 -1
- package/lib/commonjs/utils/accessibility.js +1 -14
- package/lib/commonjs/utils/accessibility.js.map +1 -1
- package/lib/commonjs/utils/image.js +23 -14
- package/lib/commonjs/utils/image.js.map +1 -1
- package/lib/commonjs/utils/object.js +10 -5
- package/lib/commonjs/utils/object.js.map +1 -1
- package/lib/module/components/alert/Alert.js +14 -7
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/banner/Banner.js +5 -1
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -0
- package/lib/module/components/banner/__test__/banner.test.js +4 -2
- package/lib/module/components/banner/__test__/banner.test.js.map +1 -1
- package/lib/module/components/codeInput/CodeInput.js +1 -1
- package/lib/module/components/common/LogoPaymentWithFallback.js +20 -11
- package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -1
- package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/module/components/icons/Icon.js +7 -3
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/svg/IconNavQrWallet.js +20 -0
- package/lib/module/components/icons/svg/IconNavQrWallet.js.map +1 -0
- package/lib/module/components/icons/svg/originals/IconNavQrWallet.svg +1 -0
- package/lib/module/components/listitems/ListItemInfo.js +6 -4
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +27 -23
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -10
- package/lib/module/components/listitems/__test__/listitem.test.js +10 -4
- package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/module/components/modules/ModuleIDP.js +3 -10
- package/lib/module/components/modules/ModuleIDP.js.map +1 -1
- package/lib/module/components/modules/ModulePaymentNotice.js +8 -6
- package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/module/components/otpInput/BoxedInput.js +1 -1
- package/lib/module/components/pictograms/Pictogram.js +4 -0
- package/lib/module/components/pictograms/Pictogram.js.map +1 -1
- package/lib/module/components/pictograms/svg/PictogramEmptyWallet.js +35 -0
- package/lib/module/components/pictograms/svg/PictogramEmptyWallet.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramMeterLimit.js +38 -0
- package/lib/module/components/pictograms/svg/PictogramMeterLimit.js.map +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramEmptyWallet.svg +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramMeterLimit.svg +1 -0
- package/lib/module/components/tag/Tag.js +4 -9
- package/lib/module/components/tag/Tag.js.map +1 -1
- package/lib/module/components/typography/ComposedBodyFromArray.js +18 -0
- package/lib/module/components/typography/ComposedBodyFromArray.js.map +1 -0
- package/lib/module/components/typography/H2.js +2 -2
- package/lib/module/components/typography/IOText.js +4 -2
- package/lib/module/components/typography/IOText.js.map +1 -1
- package/lib/module/components/typography/__test__/ComposedBodyFromArray.test.js +104 -0
- package/lib/module/components/typography/__test__/ComposedBodyFromArray.test.js.map +1 -0
- package/lib/module/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +895 -0
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +1 -1
- package/lib/module/components/typography/index.js +1 -0
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/core/IODSExperimentalContextProvider.js +1 -2
- package/lib/module/core/IODSExperimentalContextProvider.js.map +1 -1
- package/lib/module/core/IOThemeContextProvider.js +1 -2
- package/lib/module/core/IOThemeContextProvider.js.map +1 -1
- package/lib/module/utils/accessibility.js +0 -9
- package/lib/module/utils/accessibility.js.map +1 -1
- package/lib/module/utils/image.js +23 -12
- package/lib/module/utils/image.js.map +1 -1
- package/lib/module/utils/object.js +10 -3
- package/lib/module/utils/object.js.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts +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/ButtonOutline.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
- package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -1
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts +2 -2
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +2 -0
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconNavQrWallet.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconNavQrWallet.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemInfo.d.ts +5 -3
- package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts +11 -5
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleIDP.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModulePaymentNotice.d.ts +10 -4
- package/lib/typescript/components/modules/ModulePaymentNotice.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/Pictogram.d.ts +2 -0
- package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramEmptyWallet.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramEmptyWallet.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramMeterLimit.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramMeterLimit.d.ts.map +1 -0
- package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
- package/lib/typescript/components/typography/ComposedBodyFromArray.d.ts +13 -0
- package/lib/typescript/components/typography/ComposedBodyFromArray.d.ts.map +1 -0
- package/lib/typescript/components/typography/H2.d.ts +1 -1
- package/lib/typescript/components/typography/IOText.d.ts +1 -1
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/components/typography/__test__/ComposedBodyFromArray.test.d.ts +2 -0
- package/lib/typescript/components/typography/__test__/ComposedBodyFromArray.test.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/lib/typescript/core/IODSExperimentalContextProvider.d.ts.map +1 -1
- package/lib/typescript/core/IOThemeContextProvider.d.ts.map +1 -1
- package/lib/typescript/utils/accessibility.d.ts +0 -5
- package/lib/typescript/utils/accessibility.d.ts.map +1 -1
- package/lib/typescript/utils/image.d.ts +2 -2
- package/lib/typescript/utils/image.d.ts.map +1 -1
- package/lib/typescript/utils/object.d.ts +1 -2
- package/lib/typescript/utils/object.d.ts.map +1 -1
- package/package.json +2 -5
- package/src/components/alert/Alert.tsx +27 -7
- package/src/components/banner/Banner.tsx +6 -2
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -0
- package/src/components/banner/__test__/banner.test.tsx +2 -0
- package/src/components/codeInput/CodeInput.tsx +1 -1
- package/src/components/common/LogoPaymentWithFallback.tsx +15 -17
- package/src/components/featureInfo/FeatureInfo.tsx +2 -2
- package/src/components/icons/Icon.tsx +7 -3
- package/src/components/icons/svg/IconNavQrWallet.tsx +16 -0
- package/src/components/icons/svg/originals/IconNavQrWallet.svg +1 -0
- package/src/components/listitems/ListItemInfo.tsx +7 -4
- package/src/components/listitems/ListItemTransaction.tsx +40 -46
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -10
- package/src/components/listitems/__test__/listitem.test.tsx +10 -4
- package/src/components/modules/ModuleIDP.tsx +4 -13
- package/src/components/modules/ModulePaymentNotice.tsx +14 -10
- package/src/components/otpInput/BoxedInput.tsx +1 -1
- package/src/components/pictograms/Pictogram.tsx +4 -0
- package/src/components/pictograms/svg/PictogramEmptyWallet.tsx +42 -0
- package/src/components/pictograms/svg/PictogramMeterLimit.tsx +46 -0
- package/src/components/pictograms/svg/originals/PictogramEmptyWallet.svg +1 -0
- package/src/components/pictograms/svg/originals/PictogramMeterLimit.svg +1 -0
- package/src/components/tag/Tag.tsx +10 -19
- package/src/components/typography/ComposedBodyFromArray.tsx +25 -0
- package/src/components/typography/H2.tsx +2 -2
- package/src/components/typography/IOText.tsx +5 -6
- package/src/components/typography/__test__/ComposedBodyFromArray.test.tsx +99 -0
- package/src/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +895 -0
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +1 -1
- package/src/components/typography/index.tsx +1 -0
- package/src/core/IODSExperimentalContextProvider.tsx +1 -2
- package/src/core/IOThemeContextProvider.tsx +1 -2
- package/src/utils/accessibility.ts +0 -17
- package/src/utils/image.ts +28 -28
- package/src/utils/object.ts +13 -12
- package/lib/commonjs/utils/dates.js +0 -20
- package/lib/commonjs/utils/dates.js.map +0 -1
- package/lib/module/utils/dates.js +0 -11
- package/lib/module/utils/dates.js.map +0 -1
- package/lib/typescript/utils/dates.d.ts +0 -9
- package/lib/typescript/utils/dates.d.ts.map +0 -1
- package/src/utils/dates.ts +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/IOText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AACnE,OAAO,EAEL,qBAAqB,EACrB,IAAI,EACJ,SAAS,EACT,IAAI,EACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAuC,MAAM,YAAY,CAAC;AAE3E,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,SAAS,EACT,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,CACtE,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,WAAW,EACX,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAC5E,GAAG;IAAE,SAAS,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,GAAG;IACrD,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,KAAK,mBAAmB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"IOText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/IOText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AACnE,OAAO,EAEL,qBAAqB,EACrB,IAAI,EACJ,SAAS,EACT,IAAI,EACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAuC,MAAM,YAAY,CAAC;AAE3E,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,SAAS,EACT,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,CACtE,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,WAAW,EACX,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAC5E,GAAG;IAAE,SAAS,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,GAAG;IACrD,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,KAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,mBAAmB,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GACnC;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,GACD;IAAE,KAAK,CAAC,EAAE,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAezC;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,oGAsElB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComposedBodyFromArray.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/typography/__test__/ComposedBodyFromArray.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IODSExperimentalContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IODSExperimentalContextProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IODSExperimentalContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IODSExperimentalContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,2BAA2B,0CAIpC,CAAC;AAEL,eAAO,MAAM,uBAAuB,iCACW,CAAC;AAEhD,KAAK,kCAAkC,GAAG;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,+BAA+B,uCAGzC,MAAM,iBAAiB,CAAC,kCAAkC,CAAC,sBAY7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOThemeContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IOThemeContextProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IOThemeContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IOThemeContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,OAAO,EAIR,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,QAAQ;;;CAA6C,CAAC;AACnE,eAAO,MAAM,cAAc;;;CAAmD,CAAC;AAC/E,KAAK,WAAW,GAAG,MAAM,OAAO,QAAQ,CAAC;AAEzC,KAAK,kBAAkB,GAAG;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAMzD,CAAC;AAEL,eAAO,MAAM,iBAAiB,0BAAyC,CAAC;AAExE,eAAO,MAAM,UAAU,eAAkC,CAAC;AAE1D,KAAK,2BAA2B,GAAG;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,sBAAsB,wBAGhC,MAAM,iBAAiB,CAAC,2BAA2B,CAAC,sBAsBtD,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function is used to get the text that will be read by the screen reader
|
|
3
|
-
* with the correct minus symbol pronunciation.
|
|
4
|
-
*/
|
|
5
|
-
export declare const getAccessibleAmountText: (amount?: string) => string | undefined;
|
|
6
1
|
/**
|
|
7
2
|
* Query whether a bold text is currently enabled. The result is true
|
|
8
3
|
* when bold text is enabled and false otherwise.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/utils/accessibility.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/utils/accessibility.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,eA0B9B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ImageSourcePropType } from "react-native";
|
|
2
2
|
/**
|
|
3
3
|
* Adds a locale timestamp to the image URI to invalidate cache on the following day if the current platform is Android.
|
|
4
4
|
* Useful to bypass React Native Image component aggressive cache on Android.
|
|
@@ -6,5 +6,5 @@ import { ImageURISource } from "react-native";
|
|
|
6
6
|
* @returns a new source with a modified URI which includes the actual timestamp in the locale format without slashes
|
|
7
7
|
* if the platform is Android and the source contains an URI. The same source otherwise.
|
|
8
8
|
*/
|
|
9
|
-
export declare const addCacheTimestampToUri: (source:
|
|
9
|
+
export declare const addCacheTimestampToUri: (source: ImageSourcePropType) => ImageSourcePropType;
|
|
10
10
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/utils/image.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/utils/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAY,MAAM,cAAc,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,WAAY,mBAAmB,wBA4BjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,WAC9B;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;CAAE,OACpB,MAAM,kBASZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/io-app-design-system",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "The library defining the core components of the design system of @pagopa/io-app",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -100,7 +100,6 @@
|
|
|
100
100
|
"react-dom": "^18.2.0",
|
|
101
101
|
"react-native": "0.71.8",
|
|
102
102
|
"react-native-builder-bob": "^0.20.0",
|
|
103
|
-
"react-native-i18n": "^2.0.15",
|
|
104
103
|
"react-native-web": "^0.18.12",
|
|
105
104
|
"react-native-web-linear-gradient": "^1.1.2",
|
|
106
105
|
"react-test-renderer": "^18.2.0",
|
|
@@ -181,9 +180,7 @@
|
|
|
181
180
|
]
|
|
182
181
|
},
|
|
183
182
|
"dependencies": {
|
|
184
|
-
"@pagopa/ts-commons": "^12.0.0",
|
|
185
183
|
"@testing-library/jest-native": "^5.4.2",
|
|
186
|
-
"@types/react-native-i18n": "2.0.0",
|
|
187
184
|
"@types/react-test-renderer": "^18.0.0",
|
|
188
185
|
"auto-changelog": "^2.4.0",
|
|
189
186
|
"lodash": "^4.17.21",
|
|
@@ -191,7 +188,7 @@
|
|
|
191
188
|
"react-native-gesture-handler": "^2.12.0",
|
|
192
189
|
"react-native-haptic-feedback": "^2.0.2",
|
|
193
190
|
"react-native-linear-gradient": "^2.5.6",
|
|
194
|
-
"react-native-reanimated": "3.
|
|
191
|
+
"react-native-reanimated": "3.15.0",
|
|
195
192
|
"react-native-safe-area-context": "^3.3.2",
|
|
196
193
|
"react-native-svg": "^15.1.0",
|
|
197
194
|
"rn-placeholder": "1.3.3"
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import React, { useCallback } from "react";
|
|
1
|
+
import React, { useCallback, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
GestureResponderEvent,
|
|
4
|
+
NativeSyntheticEvent,
|
|
4
5
|
PixelRatio,
|
|
5
6
|
Pressable,
|
|
6
7
|
StyleSheet,
|
|
8
|
+
TextLayoutEventData,
|
|
7
9
|
View
|
|
8
10
|
} from "react-native";
|
|
9
11
|
import Animated, {
|
|
10
|
-
|
|
12
|
+
Extrapolation,
|
|
13
|
+
SharedValue,
|
|
11
14
|
interpolate,
|
|
12
15
|
useAnimatedStyle,
|
|
13
16
|
useDerivedValue,
|
|
@@ -119,7 +122,16 @@ export const Alert = React.forwardRef<View, AlertType>(
|
|
|
119
122
|
}: AlertType,
|
|
120
123
|
viewRef
|
|
121
124
|
): JSX.Element => {
|
|
122
|
-
const isPressed:
|
|
125
|
+
const isPressed: SharedValue<number> = useSharedValue(0);
|
|
126
|
+
|
|
127
|
+
const [isMultiline, setIsMultiline] = useState(false);
|
|
128
|
+
|
|
129
|
+
const onTextLayout = useCallback(
|
|
130
|
+
(event: NativeSyntheticEvent<TextLayoutEventData>) => {
|
|
131
|
+
setIsMultiline(event.nativeEvent.lines.length > 1);
|
|
132
|
+
},
|
|
133
|
+
[]
|
|
134
|
+
);
|
|
123
135
|
|
|
124
136
|
// Scaling transformation applied when the button is pressed
|
|
125
137
|
const animationScaleValue = IOScaleValues?.magnifiedButton?.pressedState;
|
|
@@ -136,7 +148,7 @@ export const Alert = React.forwardRef<View, AlertType>(
|
|
|
136
148
|
progressPressed.value,
|
|
137
149
|
[0, 1],
|
|
138
150
|
[1, animationScaleValue],
|
|
139
|
-
|
|
151
|
+
Extrapolation.CLAMP
|
|
140
152
|
);
|
|
141
153
|
|
|
142
154
|
return {
|
|
@@ -155,7 +167,12 @@ export const Alert = React.forwardRef<View, AlertType>(
|
|
|
155
167
|
|
|
156
168
|
const renderMainBlock = () => (
|
|
157
169
|
<>
|
|
158
|
-
<View
|
|
170
|
+
<View
|
|
171
|
+
style={{
|
|
172
|
+
marginRight: IOVisualCostants.iconMargin,
|
|
173
|
+
alignSelf: "flex-start"
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
159
176
|
<Icon
|
|
160
177
|
name={mapVariantStates[variant].icon}
|
|
161
178
|
size={iconSize}
|
|
@@ -168,8 +185,10 @@ export const Alert = React.forwardRef<View, AlertType>(
|
|
|
168
185
|
Tested on both Android and iOS. */}
|
|
169
186
|
<View
|
|
170
187
|
style={[
|
|
171
|
-
!title &&
|
|
172
|
-
|
|
188
|
+
!title &&
|
|
189
|
+
isMultiline && { marginTop: -5 * PixelRatio.getFontScale() },
|
|
190
|
+
isMultiline && { marginBottom: -3 * PixelRatio.getFontScale() },
|
|
191
|
+
{ flex: 1 }
|
|
173
192
|
]}
|
|
174
193
|
>
|
|
175
194
|
{title && (
|
|
@@ -182,6 +201,7 @@ export const Alert = React.forwardRef<View, AlertType>(
|
|
|
182
201
|
color={mapVariantStates[variant].foreground}
|
|
183
202
|
weight={"Regular"}
|
|
184
203
|
accessibilityRole="text"
|
|
204
|
+
onTextLayout={onTextLayout}
|
|
185
205
|
>
|
|
186
206
|
{content}
|
|
187
207
|
</Label>
|
|
@@ -157,7 +157,7 @@ export const Banner = ({
|
|
|
157
157
|
onClose,
|
|
158
158
|
accessibilityHint,
|
|
159
159
|
accessibilityLabel,
|
|
160
|
-
testID
|
|
160
|
+
testID,
|
|
161
161
|
}: Banner) => {
|
|
162
162
|
const isPressed: Animated.SharedValue<number> = useSharedValue(0);
|
|
163
163
|
|
|
@@ -195,13 +195,17 @@ export const Banner = ({
|
|
|
195
195
|
isPressed.value = 0;
|
|
196
196
|
}, [isPressed]);
|
|
197
197
|
|
|
198
|
+
/* Generates a complete fallbackAccessibilityLabel by concatenating the title, content, and action
|
|
199
|
+
if they are present. */
|
|
200
|
+
const fallbackAccessibilityLabel = [title, content, action].filter(Boolean).join(" ");
|
|
201
|
+
|
|
198
202
|
const renderMainBlock = () => (
|
|
199
203
|
<>
|
|
200
204
|
<View
|
|
201
205
|
style={[IOStyles.flex, IOStyles.selfCenter]}
|
|
202
206
|
accessible={true}
|
|
203
207
|
// A11y related props
|
|
204
|
-
accessibilityLabel={accessibilityLabel}
|
|
208
|
+
accessibilityLabel={accessibilityLabel ?? fallbackAccessibilityLabel}
|
|
205
209
|
accessibilityHint={accessibilityHint}
|
|
206
210
|
accessibilityRole={action !== undefined ? "button" : undefined}
|
|
207
211
|
>
|
|
@@ -58,6 +58,7 @@ exports[`Test Banner Components - Experimental Enabled Banner Snapshot 1`] = `
|
|
|
58
58
|
}
|
|
59
59
|
>
|
|
60
60
|
<View
|
|
61
|
+
accessibilityLabel="Action text"
|
|
61
62
|
accessibilityRole="button"
|
|
62
63
|
accessible={true}
|
|
63
64
|
style={
|
|
@@ -407,6 +408,7 @@ exports[`Test Banner Components Banner Snapshot 1`] = `
|
|
|
407
408
|
}
|
|
408
409
|
>
|
|
409
410
|
<View
|
|
411
|
+
accessibilityLabel="Action text"
|
|
410
412
|
accessibilityRole="button"
|
|
411
413
|
accessible={true}
|
|
412
414
|
style={
|
|
@@ -18,6 +18,7 @@ describe("Test Banner Components", () => {
|
|
|
18
18
|
pictogramName="charity"
|
|
19
19
|
action="Action text"
|
|
20
20
|
onPress={onLinkPress}
|
|
21
|
+
accessibilityLabel="Action text"
|
|
21
22
|
/>
|
|
22
23
|
).toJSON();
|
|
23
24
|
expect(advice).toMatchSnapshot();
|
|
@@ -34,6 +35,7 @@ describe("Test Banner Components - Experimental Enabled", () => {
|
|
|
34
35
|
pictogramName="charity"
|
|
35
36
|
action="Action text"
|
|
36
37
|
onPress={onLinkPress}
|
|
38
|
+
accessibilityLabel="Action text"
|
|
37
39
|
/>
|
|
38
40
|
).toJSON();
|
|
39
41
|
expect(advice).toMatchSnapshot();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import * as O from "fp-ts/lib/Option";
|
|
2
|
-
import { pipe } from "fp-ts/lib/function";
|
|
3
1
|
import * as React from "react";
|
|
4
|
-
import { findFirstCaseInsensitive } from "../../utils/object";
|
|
5
2
|
import { IOColors } from "../../core";
|
|
6
3
|
import { IOIconSizeScale, Icon } from "../icons";
|
|
7
4
|
import {
|
|
@@ -12,6 +9,7 @@ import {
|
|
|
12
9
|
LogoPayment,
|
|
13
10
|
LogoPaymentExt
|
|
14
11
|
} from "../logos";
|
|
12
|
+
import { findFirstCaseInsensitive } from "../../utils/object";
|
|
15
13
|
|
|
16
14
|
export type LogoPaymentWithFallback = {
|
|
17
15
|
brand?: string;
|
|
@@ -42,19 +40,19 @@ export const LogoPaymentWithFallback = ({
|
|
|
42
40
|
}: LogoPaymentWithFallback) => {
|
|
43
41
|
const logos = isExtended ? IOPaymentExtLogos : IOPaymentLogos;
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
if (!brand) {
|
|
44
|
+
return <Icon name="creditCard" size={size} color={fallbackIconColor} />;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const findCase = findFirstCaseInsensitive(logos, brand);
|
|
48
|
+
|
|
49
|
+
if (!findCase) {
|
|
50
|
+
return <Icon name="creditCard" size={size} color={fallbackIconColor} />;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return isExtended ? (
|
|
54
|
+
<LogoPaymentExt name={findCase as IOLogoPaymentExtType} size={size} />
|
|
55
|
+
) : (
|
|
56
|
+
<LogoPayment name={findCase as IOLogoPaymentType} size={size} />
|
|
59
57
|
);
|
|
60
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { GestureResponderEvent, View } from "react-native";
|
|
3
3
|
import {
|
|
4
4
|
Body,
|
|
@@ -16,7 +16,7 @@ import { IOStyles } from "../../core";
|
|
|
16
16
|
|
|
17
17
|
type PartialFeatureInfo = {
|
|
18
18
|
// Necessary to render main body with different formatting
|
|
19
|
-
body?: string |
|
|
19
|
+
body?: string | ReactNode;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
type FeatureInfoActionProps =
|
|
@@ -135,6 +135,7 @@ import IconNavServices from "./svg/IconNavServices";
|
|
|
135
135
|
import IconNavServicesFocused from "./svg/IconNavServicesFocused";
|
|
136
136
|
import IconNavWallet from "./svg/IconNavWallet";
|
|
137
137
|
import IconNavWalletFocused from "./svg/IconNavWalletFocused";
|
|
138
|
+
import IconNavQrWallet from "./svg/IconNavQrWallet";
|
|
138
139
|
import IconNotes from "./svg/IconNotes";
|
|
139
140
|
import IconNotice from "./svg/IconNotice";
|
|
140
141
|
import IconNoticeFilled from "./svg/IconNoticeFilled";
|
|
@@ -199,7 +200,7 @@ import LegIconCheckOff from "./svg/LegIconCheckOff";
|
|
|
199
200
|
import LegIconCheckOn from "./svg/LegIconCheckOn";
|
|
200
201
|
import LegIconRadioOff from "./svg/LegIconRadioOff";
|
|
201
202
|
import LegIconRadioOn from "./svg/LegIconRadioOn";
|
|
202
|
-
import IconCieLetter from
|
|
203
|
+
import IconCieLetter from "./svg/IconCieLetter";
|
|
203
204
|
|
|
204
205
|
export const IOIcons = {
|
|
205
206
|
spid: IconSpid,
|
|
@@ -360,6 +361,7 @@ export const IOIcons = {
|
|
|
360
361
|
navMessagesFocused: IconNavMessagesFocused,
|
|
361
362
|
navWallet: IconNavWallet,
|
|
362
363
|
navWalletFocused: IconNavWalletFocused,
|
|
364
|
+
navQrWallet: IconNavQrWallet,
|
|
363
365
|
navScan: IconNavScan,
|
|
364
366
|
navServices: IconNavServices,
|
|
365
367
|
navServicesFocused: IconNavServicesFocused,
|
|
@@ -517,7 +519,8 @@ const {
|
|
|
517
519
|
navMessagesFocused,
|
|
518
520
|
navWalletFocused,
|
|
519
521
|
navServicesFocused,
|
|
520
|
-
navProfileFocused
|
|
522
|
+
navProfileFocused,
|
|
523
|
+
navQrWallet
|
|
521
524
|
} = IOIcons;
|
|
522
525
|
|
|
523
526
|
export const IONavIcons = {
|
|
@@ -530,7 +533,8 @@ export const IONavIcons = {
|
|
|
530
533
|
navMessagesFocused,
|
|
531
534
|
navWalletFocused,
|
|
532
535
|
navServicesFocused,
|
|
533
|
-
navProfileFocused
|
|
536
|
+
navProfileFocused,
|
|
537
|
+
navQrWallet
|
|
534
538
|
} as const;
|
|
535
539
|
|
|
536
540
|
export type IONavIcons = keyof typeof IONavIcons;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Svg, Path } from "react-native-svg";
|
|
3
|
+
import { SVGIconProps } from "../types";
|
|
4
|
+
|
|
5
|
+
const IconNavQrWallet = ({ size, style, ...props }: SVGIconProps) => (
|
|
6
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" style={style} {...props}>
|
|
7
|
+
<Path
|
|
8
|
+
fill="currentColor"
|
|
9
|
+
fillRule="evenodd"
|
|
10
|
+
d="M14.666 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 2a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm.886 4.05A8 8 0 0 1 22.666 20a1 1 0 1 0 2 0 10 10 0 0 0-10.347-9.994c.6.531 1.038 1.24 1.233 2.043ZM2.667 18a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-2Zm0 2.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5Zm-2-7.25a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-2Zm4 .25a.25.25 0 0 0-.25-.25h-1.5a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1.5Zm5-2.25a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-2Zm0 2.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5Zm3 4.75a1 1 0 0 1 1 1v3a2 2 0 0 1-2 2h-3a1 1 0 1 1 0-2h2.75a.25.25 0 0 0 .25-.25V19a1 1 0 0 1 1-1Zm-3 1a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z"
|
|
11
|
+
clipRule="evenodd"
|
|
12
|
+
/>
|
|
13
|
+
</Svg>
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export default IconNavQrWallet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 25 24"><path fill="#2B2E38" fill-rule="evenodd" d="M14.666 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 2a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm.886 4.05A8 8 0 0 1 22.666 20a1 1 0 1 0 2 0 10 10 0 0 0-10.347-9.994c.6.531 1.038 1.24 1.233 2.043ZM2.667 18a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-2Zm0 2.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5Zm-2-7.25a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-2Zm4 .25a.25.25 0 0 0-.25-.25h-1.5a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1.5Zm5-2.25a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-2Zm0 2.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5Zm3 4.75a1 1 0 0 1 1 1v3a2 2 0 0 1-2 2h-3a1 1 0 1 1 0-2h2.75a.25.25 0 0 0 .25-.25V19a1 1 0 0 1 1-1Zm-3 1a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z" clip-rule="evenodd"/></svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ComponentProps, useCallback, useMemo } from "react";
|
|
2
|
-
import { Platform, View } from "react-native";
|
|
2
|
+
import { AccessibilityRole, Platform, View } from "react-native";
|
|
3
3
|
import {
|
|
4
4
|
IOListItemStyles,
|
|
5
5
|
IOListItemVisualParams,
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
useIOTheme
|
|
8
8
|
} from "../../core";
|
|
9
9
|
import { WithTestID } from "../../utils/types";
|
|
10
|
-
import { IOIconSizeScale, IOIcons, Icon } from "../icons";
|
|
11
|
-
import { H6, LabelSmall } from "../typography";
|
|
12
|
-
import { ButtonLink, IconButton } from "../buttons";
|
|
13
10
|
import { Badge } from "../badge";
|
|
11
|
+
import { ButtonLink, IconButton } from "../buttons";
|
|
14
12
|
import { LogoPaymentWithFallback } from "../common/LogoPaymentWithFallback";
|
|
13
|
+
import { IOIconSizeScale, IOIcons, Icon } from "../icons";
|
|
15
14
|
import { IOLogoPaymentType } from "../logos";
|
|
15
|
+
import { H6, LabelSmall } from "../typography";
|
|
16
16
|
|
|
17
17
|
type ButtonLinkActionProps = {
|
|
18
18
|
type: "buttonLink";
|
|
@@ -41,6 +41,7 @@ export type ListItemInfo = WithTestID<{
|
|
|
41
41
|
endElement?: EndElementProps;
|
|
42
42
|
// Accessibility
|
|
43
43
|
accessibilityLabel?: string;
|
|
44
|
+
accessibilityRole?: AccessibilityRole;
|
|
44
45
|
}> &
|
|
45
46
|
(
|
|
46
47
|
| {
|
|
@@ -63,6 +64,7 @@ export const ListItemInfo = ({
|
|
|
63
64
|
paymentLogoIcon,
|
|
64
65
|
endElement,
|
|
65
66
|
accessibilityLabel,
|
|
67
|
+
accessibilityRole,
|
|
66
68
|
testID
|
|
67
69
|
}: ListItemInfo) => {
|
|
68
70
|
const theme = useIOTheme();
|
|
@@ -136,6 +138,7 @@ export const ListItemInfo = ({
|
|
|
136
138
|
testID={testID}
|
|
137
139
|
accessible={endElement === undefined ? true : false}
|
|
138
140
|
accessibilityLabel={listItemAccessibilityLabel}
|
|
141
|
+
accessibilityRole={accessibilityRole}
|
|
139
142
|
>
|
|
140
143
|
<View style={IOListItemStyles.listItemInner}>
|
|
141
144
|
{icon && (
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as O from "fp-ts/lib/Option";
|
|
2
|
-
import { pipe } from "fp-ts/lib/function";
|
|
3
1
|
import React from "react";
|
|
4
2
|
import { ImageURISource, StyleSheet, View } from "react-native";
|
|
5
3
|
import Placeholder from "rn-placeholder";
|
|
@@ -14,8 +12,6 @@ import {
|
|
|
14
12
|
useIOExperimentalDesign,
|
|
15
13
|
useIOTheme
|
|
16
14
|
} from "../../core";
|
|
17
|
-
|
|
18
|
-
import { getAccessibleAmountText } from "../../utils/accessibility";
|
|
19
15
|
import { WithTestID } from "../../utils/types";
|
|
20
16
|
import { isImageUri } from "../../utils/url";
|
|
21
17
|
import { Avatar } from "../avatar/Avatar";
|
|
@@ -73,14 +69,20 @@ export type ListItemTransaction = WithTestID<
|
|
|
73
69
|
accessible?: boolean;
|
|
74
70
|
} & (
|
|
75
71
|
| {
|
|
76
|
-
|
|
72
|
+
transaction: {
|
|
73
|
+
amount: string;
|
|
74
|
+
amountAccessibilityLabel: string;
|
|
75
|
+
status: ListItemTransactionStatusWithoutBadge;
|
|
76
|
+
};
|
|
77
77
|
badgeText?: string;
|
|
78
|
-
transactionAmount: string;
|
|
79
78
|
}
|
|
80
79
|
| {
|
|
81
|
-
|
|
80
|
+
transaction: {
|
|
81
|
+
amount?: string;
|
|
82
|
+
amountAccessibilityLabel?: string;
|
|
83
|
+
status: ListItemTransactionStatusWithBadge;
|
|
84
|
+
};
|
|
82
85
|
badgeText: string;
|
|
83
|
-
transactionAmount?: string;
|
|
84
86
|
}
|
|
85
87
|
)
|
|
86
88
|
>;
|
|
@@ -119,20 +121,15 @@ export const ListItemTransaction = ({
|
|
|
119
121
|
subtitle,
|
|
120
122
|
testID,
|
|
121
123
|
title,
|
|
122
|
-
|
|
124
|
+
transaction: { amount, amountAccessibilityLabel, status = "success" },
|
|
123
125
|
badgeText,
|
|
124
|
-
transactionStatus = "success",
|
|
125
126
|
numberOfLines = 2,
|
|
126
127
|
accessible
|
|
127
128
|
}: ListItemTransaction) => {
|
|
128
129
|
const { isExperimental } = useIOExperimentalDesign();
|
|
129
130
|
const theme = useIOTheme();
|
|
130
131
|
|
|
131
|
-
const maybeBadgeText =
|
|
132
|
-
badgeText,
|
|
133
|
-
O.fromNullable,
|
|
134
|
-
O.getOrElse(() => "-")
|
|
135
|
-
);
|
|
132
|
+
const maybeBadgeText = badgeText ?? "-";
|
|
136
133
|
|
|
137
134
|
if (isLoading) {
|
|
138
135
|
return <SkeletonComponent />;
|
|
@@ -147,25 +144,25 @@ export const ListItemTransaction = ({
|
|
|
147
144
|
|
|
148
145
|
const ListItemTransactionContent = () => {
|
|
149
146
|
const TransactionAmountOrBadgeComponent = () => {
|
|
150
|
-
switch (
|
|
147
|
+
switch (status) {
|
|
151
148
|
case "success":
|
|
152
149
|
return (
|
|
153
150
|
<H6
|
|
154
|
-
accessibilityLabel={
|
|
151
|
+
accessibilityLabel={amountAccessibilityLabel}
|
|
155
152
|
color={hasChevronRight ? interactiveColor : amountColor}
|
|
156
153
|
numberOfLines={numberOfLines}
|
|
157
154
|
>
|
|
158
|
-
{
|
|
155
|
+
{amount || ""}
|
|
159
156
|
</H6>
|
|
160
157
|
);
|
|
161
158
|
case "refunded":
|
|
162
159
|
return (
|
|
163
160
|
<H6
|
|
164
|
-
accessibilityLabel={
|
|
161
|
+
accessibilityLabel={amountAccessibilityLabel}
|
|
165
162
|
color={hasChevronRight ? interactiveColor : successColor}
|
|
166
163
|
numberOfLines={numberOfLines}
|
|
167
164
|
>
|
|
168
|
-
{
|
|
165
|
+
{amount || ""}
|
|
169
166
|
</H6>
|
|
170
167
|
);
|
|
171
168
|
case "failure":
|
|
@@ -217,33 +214,30 @@ export const ListItemTransaction = ({
|
|
|
217
214
|
);
|
|
218
215
|
};
|
|
219
216
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
testID={testID}
|
|
240
|
-
accessibilityLabel={accessibilityLabel}
|
|
241
|
-
>
|
|
217
|
+
if (onPress) {
|
|
218
|
+
return (
|
|
219
|
+
<PressableListItemBase
|
|
220
|
+
onPress={onPress}
|
|
221
|
+
testID={testID}
|
|
222
|
+
accessibilityLabel={accessibilityLabel}
|
|
223
|
+
>
|
|
224
|
+
<ListItemTransactionContent />
|
|
225
|
+
</PressableListItemBase>
|
|
226
|
+
);
|
|
227
|
+
} else {
|
|
228
|
+
return (
|
|
229
|
+
<View
|
|
230
|
+
style={IOListItemStyles.listItem}
|
|
231
|
+
testID={testID}
|
|
232
|
+
accessible={accessible}
|
|
233
|
+
accessibilityLabel={accessibilityLabel}
|
|
234
|
+
>
|
|
235
|
+
<View style={IOListItemStyles.listItemInner}>
|
|
242
236
|
<ListItemTransactionContent />
|
|
243
|
-
</
|
|
244
|
-
|
|
245
|
-
)
|
|
246
|
-
|
|
237
|
+
</View>
|
|
238
|
+
</View>
|
|
239
|
+
);
|
|
240
|
+
}
|
|
247
241
|
};
|
|
248
242
|
|
|
249
243
|
const SkeletonComponent = () => (
|
|
@@ -187,11 +187,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemIDP Snapshot
|
|
|
187
187
|
/>
|
|
188
188
|
<Image
|
|
189
189
|
accessibilityIgnoresInvertColors={true}
|
|
190
|
-
source={
|
|
191
|
-
{
|
|
192
|
-
"uri": "undefined",
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
190
|
style={
|
|
196
191
|
{
|
|
197
192
|
"height": 30,
|
|
@@ -1884,11 +1879,6 @@ exports[`Test List Item Components ListItemIDP Snapshot 1`] = `
|
|
|
1884
1879
|
/>
|
|
1885
1880
|
<Image
|
|
1886
1881
|
accessibilityIgnoresInvertColors={true}
|
|
1887
|
-
source={
|
|
1888
|
-
{
|
|
1889
|
-
"uri": "undefined",
|
|
1890
|
-
}
|
|
1891
|
-
}
|
|
1892
1882
|
style={
|
|
1893
1883
|
{
|
|
1894
1884
|
"height": 30,
|