@pagopa/io-app-design-system 5.1.2 → 5.1.3
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/banner/Banner.js +3 -5
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js +2 -1
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/featureInfo/FeatureInfo.js +6 -1
- package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +12 -3
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +12 -3
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +12 -2
- package/lib/commonjs/components/modules/ModuleAttachment.js +13 -2
- package/lib/commonjs/components/modules/ModuleAttachment.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCheckout.js +11 -2
- package/lib/commonjs/components/modules/ModuleCheckout.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCredential.js +11 -2
- package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleNavigation.js +11 -2
- package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/commonjs/components/modules/ModulePaymentNotice.js +12 -2
- package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleStatic.js +7 -2
- package/lib/commonjs/components/modules/ModuleStatic.js.map +1 -1
- package/lib/commonjs/components/typography/Body.js +2 -1
- package/lib/commonjs/components/typography/Body.js.map +1 -1
- package/lib/commonjs/components/typography/BodySmall.js +2 -1
- package/lib/commonjs/components/typography/BodySmall.js.map +1 -1
- package/lib/commonjs/components/typography/IOText.js.map +1 -1
- package/lib/commonjs/components/typography/LabelMini.js +2 -1
- package/lib/commonjs/components/typography/LabelMini.js.map +1 -1
- package/lib/module/components/banner/Banner.js +3 -5
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/buttons/ButtonLink.js +2 -1
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/featureInfo/FeatureInfo.js +6 -1
- package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +12 -3
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +12 -3
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +12 -2
- package/lib/module/components/modules/ModuleAttachment.js +13 -2
- package/lib/module/components/modules/ModuleAttachment.js.map +1 -1
- package/lib/module/components/modules/ModuleCheckout.js +11 -2
- package/lib/module/components/modules/ModuleCheckout.js.map +1 -1
- package/lib/module/components/modules/ModuleCredential.js +11 -2
- package/lib/module/components/modules/ModuleCredential.js.map +1 -1
- package/lib/module/components/modules/ModuleNavigation.js +11 -2
- package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/module/components/modules/ModulePaymentNotice.js +12 -2
- package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/module/components/modules/ModuleStatic.js +7 -2
- package/lib/module/components/modules/ModuleStatic.js.map +1 -1
- package/lib/module/components/typography/Body.js +2 -1
- package/lib/module/components/typography/Body.js.map +1 -1
- package/lib/module/components/typography/BodySmall.js +2 -1
- package/lib/module/components/typography/BodySmall.js.map +1 -1
- package/lib/module/components/typography/IOText.js.map +1 -1
- package/lib/module/components/typography/LabelMini.js +2 -1
- package/lib/module/components/typography/LabelMini.js.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts +3 -3
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts +3 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts +2 -1
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadio.d.ts +2 -0
- package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts +2 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleAttachment.d.ts +3 -1
- package/lib/typescript/components/modules/ModuleAttachment.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleCheckout.d.ts +1 -0
- package/lib/typescript/components/modules/ModuleCheckout.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleCredential.d.ts +1 -0
- package/lib/typescript/components/modules/ModuleCredential.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleNavigation.d.ts +1 -0
- package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModulePaymentNotice.d.ts +2 -1
- package/lib/typescript/components/modules/ModulePaymentNotice.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleStatic.d.ts +3 -3
- package/lib/typescript/components/modules/ModuleStatic.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/IOText.d.ts +2 -1
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/banner/Banner.tsx +4 -6
- package/src/components/buttons/ButtonLink.tsx +4 -1
- package/src/components/featureInfo/FeatureInfo.tsx +7 -1
- package/src/components/listitems/ListItemRadio.tsx +14 -3
- package/src/components/listitems/ListItemTransaction.tsx +16 -3
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +12 -2
- package/src/components/modules/ModuleAttachment.tsx +14 -2
- package/src/components/modules/ModuleCheckout.tsx +12 -2
- package/src/components/modules/ModuleCredential.tsx +10 -2
- package/src/components/modules/ModuleNavigation.tsx +12 -2
- package/src/components/modules/ModulePaymentNotice.tsx +13 -2
- package/src/components/modules/ModuleStatic.tsx +13 -6
- package/src/components/typography/Body.tsx +8 -2
- package/src/components/typography/BodySmall.tsx +8 -2
- package/src/components/typography/IOText.tsx +2 -0
- package/src/components/typography/LabelMini.tsx +8 -2
|
@@ -23,6 +23,7 @@ export type ModulePaymentNoticeProps = WithTestID<
|
|
|
23
23
|
{
|
|
24
24
|
isLoading?: boolean;
|
|
25
25
|
accessibilityLabel?: string;
|
|
26
|
+
loadingAccessibilityLabel?: string;
|
|
26
27
|
title?: string;
|
|
27
28
|
subtitle: string;
|
|
28
29
|
onPress: (event: GestureResponderEvent) => void;
|
|
@@ -140,10 +141,15 @@ export const ModulePaymentNotice = ({
|
|
|
140
141
|
testID,
|
|
141
142
|
accessibilityLabel,
|
|
142
143
|
onPress,
|
|
144
|
+
loadingAccessibilityLabel,
|
|
143
145
|
...rest
|
|
144
146
|
}: ModulePaymentNoticeProps) => {
|
|
145
147
|
if (isLoading) {
|
|
146
|
-
return
|
|
148
|
+
return (
|
|
149
|
+
<ModulePaymentNoticeSkeleton
|
|
150
|
+
loadingAccessibilityLabel={loadingAccessibilityLabel}
|
|
151
|
+
/>
|
|
152
|
+
);
|
|
147
153
|
}
|
|
148
154
|
|
|
149
155
|
return (
|
|
@@ -157,8 +163,13 @@ export const ModulePaymentNotice = ({
|
|
|
157
163
|
);
|
|
158
164
|
};
|
|
159
165
|
|
|
160
|
-
const ModulePaymentNoticeSkeleton = (
|
|
166
|
+
const ModulePaymentNoticeSkeleton = ({
|
|
167
|
+
loadingAccessibilityLabel
|
|
168
|
+
}: Pick<ModulePaymentNoticeProps, "loadingAccessibilityLabel">) => (
|
|
161
169
|
<ModuleStatic
|
|
170
|
+
accessible={true}
|
|
171
|
+
accessibilityLabel={loadingAccessibilityLabel}
|
|
172
|
+
accessibilityState={{ busy: true }}
|
|
162
173
|
startBlock={
|
|
163
174
|
<VStack space={4}>
|
|
164
175
|
<Placeholder.Box animate="fade" radius={8} width={120} height={12} />
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PressableProps, View } from "react-native";
|
|
2
|
+
import { PressableProps, View, ViewProps } from "react-native";
|
|
3
3
|
import { IOColors, IOModuleStyles, useIOTheme } from "../../core";
|
|
4
4
|
import { HStack } from "../stack";
|
|
5
5
|
|
|
6
|
-
type ModuleStaticProps =
|
|
7
|
-
|
|
8
|
-
|
|
|
6
|
+
type ModuleStaticProps = Pick<
|
|
7
|
+
ViewProps,
|
|
8
|
+
"accessible" | "accessibilityLabel" | "accessibilityState"
|
|
9
|
+
> &
|
|
10
|
+
(ModuleStaticSingleBlockProps | ModuleStaticMultipleBlockProps);
|
|
9
11
|
|
|
10
12
|
type ModuleStaticMultipleBlockProps = {
|
|
11
13
|
startBlock: React.ReactNode;
|
|
@@ -27,7 +29,10 @@ export const ModuleStatic = ({
|
|
|
27
29
|
disabled = false,
|
|
28
30
|
startBlock,
|
|
29
31
|
endBlock,
|
|
30
|
-
children
|
|
32
|
+
children,
|
|
33
|
+
accessible = false,
|
|
34
|
+
accessibilityLabel,
|
|
35
|
+
accessibilityState
|
|
31
36
|
}: ModuleStaticProps) => {
|
|
32
37
|
const theme = useIOTheme();
|
|
33
38
|
|
|
@@ -40,7 +45,9 @@ export const ModuleStatic = ({
|
|
|
40
45
|
opacity: disabled ? DISABLED_OPACITY : 1
|
|
41
46
|
}
|
|
42
47
|
]}
|
|
43
|
-
accessible={
|
|
48
|
+
accessible={accessible}
|
|
49
|
+
accessibilityLabel={accessibilityLabel}
|
|
50
|
+
accessibilityState={accessibilityState}
|
|
44
51
|
>
|
|
45
52
|
{startBlock && (
|
|
46
53
|
<HStack space={8} style={{ alignItems: "center" }}>
|
|
@@ -24,7 +24,13 @@ const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
|
24
24
|
*/
|
|
25
25
|
export const Body = forwardRef<View, BodyStyleProps>(
|
|
26
26
|
(
|
|
27
|
-
{
|
|
27
|
+
{
|
|
28
|
+
weight: customWeight,
|
|
29
|
+
color: customColor,
|
|
30
|
+
asLink,
|
|
31
|
+
accessibilityRole = "link",
|
|
32
|
+
...props
|
|
33
|
+
},
|
|
28
34
|
ref?: ForwardedRef<View>
|
|
29
35
|
) => {
|
|
30
36
|
const theme = useIOTheme();
|
|
@@ -44,7 +50,7 @@ export const Body = forwardRef<View, BodyStyleProps>(
|
|
|
44
50
|
color: customColor ?? defaultColor,
|
|
45
51
|
...(asLink
|
|
46
52
|
? {
|
|
47
|
-
accessibilityRole
|
|
53
|
+
accessibilityRole,
|
|
48
54
|
textStyle: { textDecorationLine: "underline" }
|
|
49
55
|
}
|
|
50
56
|
: {})
|
|
@@ -21,7 +21,13 @@ const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
|
21
21
|
*/
|
|
22
22
|
export const BodySmall = forwardRef<View, BodySmallProps>(
|
|
23
23
|
(
|
|
24
|
-
{
|
|
24
|
+
{
|
|
25
|
+
weight: customWeight,
|
|
26
|
+
color: customColor,
|
|
27
|
+
asLink,
|
|
28
|
+
accessibilityRole = "link",
|
|
29
|
+
...props
|
|
30
|
+
},
|
|
25
31
|
ref?: ForwardedRef<View>
|
|
26
32
|
) => {
|
|
27
33
|
const theme = useIOTheme();
|
|
@@ -41,7 +47,7 @@ export const BodySmall = forwardRef<View, BodySmallProps>(
|
|
|
41
47
|
color: customColor ?? defaultColor,
|
|
42
48
|
...(asLink
|
|
43
49
|
? {
|
|
44
|
-
accessibilityRole
|
|
50
|
+
accessibilityRole,
|
|
45
51
|
textStyle: { textDecorationLine: "underline" }
|
|
46
52
|
}
|
|
47
53
|
: {})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ComponentProps, forwardRef, useMemo } from "react";
|
|
2
2
|
import {
|
|
3
|
+
AccessibilityRole,
|
|
3
4
|
ColorValue,
|
|
4
5
|
GestureResponderEvent,
|
|
5
6
|
Text,
|
|
@@ -60,6 +61,7 @@ export type TypographicStyleAsLinkProps =
|
|
|
60
61
|
color?: never;
|
|
61
62
|
asLink: true;
|
|
62
63
|
onPress: (event: GestureResponderEvent) => void;
|
|
64
|
+
accessibilityRole?: Extract<AccessibilityRole, "button" | "link">;
|
|
63
65
|
}
|
|
64
66
|
| { color?: IOColors; asLink?: false };
|
|
65
67
|
|
|
@@ -21,7 +21,13 @@ const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
|
21
21
|
*/
|
|
22
22
|
export const LabelMini = forwardRef<View, LabelMiniProps>(
|
|
23
23
|
(
|
|
24
|
-
{
|
|
24
|
+
{
|
|
25
|
+
weight: customWeight,
|
|
26
|
+
color: customColor,
|
|
27
|
+
asLink,
|
|
28
|
+
accessibilityRole = "link",
|
|
29
|
+
...props
|
|
30
|
+
},
|
|
25
31
|
ref?: ForwardedRef<View>
|
|
26
32
|
) => {
|
|
27
33
|
const theme = useIOTheme();
|
|
@@ -41,7 +47,7 @@ export const LabelMini = forwardRef<View, LabelMiniProps>(
|
|
|
41
47
|
color: customColor ?? defaultColor,
|
|
42
48
|
...(asLink
|
|
43
49
|
? {
|
|
44
|
-
accessibilityRole
|
|
50
|
+
accessibilityRole,
|
|
45
51
|
textStyle: { textDecorationLine: "underline" }
|
|
46
52
|
}
|
|
47
53
|
: {})
|