@pagopa/io-app-design-system 5.3.9 → 5.4.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/README.md +3 -2
- package/lib/commonjs/components/accordion/AccordionItem.js +4 -2
- package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/alert/Alert.js +5 -11
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/alert/AlertEdgeToEdge.js +3 -2
- package/lib/commonjs/components/alert/AlertEdgeToEdge.js.map +1 -1
- package/lib/commonjs/components/alert/AlertEdgeToEdgeWrapper.js +3 -2
- package/lib/commonjs/components/alert/AlertEdgeToEdgeWrapper.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js +5 -2
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +20 -15
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +4 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/IOButton/IOButton.js +230 -0
- package/lib/commonjs/components/buttons/IOButton/IOButton.js.map +1 -0
- package/lib/commonjs/components/buttons/IOButton/__test__/IOButton.test.js +43 -0
- package/lib/commonjs/components/buttons/IOButton/__test__/IOButton.test.js.map +1 -0
- package/lib/commonjs/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
- package/lib/commonjs/components/buttons/IOButton/index.js +17 -0
- package/lib/commonjs/components/buttons/IOButton/index.js.map +1 -0
- package/lib/commonjs/components/buttons/IOButton/styles.js +166 -0
- package/lib/commonjs/components/buttons/IOButton/styles.js.map +1 -0
- package/lib/commonjs/components/buttons/IconButton.js +2 -3
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonContained.js +1 -2
- package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -402
- package/lib/commonjs/components/buttons/__test__/button.test.js +0 -24
- package/lib/commonjs/components/buttons/__test__/button.test.js.map +1 -1
- package/lib/commonjs/components/buttons/index.js +11 -0
- package/lib/commonjs/components/buttons/index.js.map +1 -1
- package/lib/commonjs/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +13 -30
- package/lib/commonjs/components/icons/Icon.js +11 -9
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/layout/FooterActions.js +10 -9
- package/lib/commonjs/components/layout/FooterActions.js.map +1 -1
- package/lib/commonjs/components/layout/FooterActionsInline.js +8 -8
- package/lib/commonjs/components/layout/FooterActionsInline.js.map +1 -1
- package/lib/commonjs/components/layout/GradientBottomActions.js +8 -8
- package/lib/commonjs/components/layout/GradientBottomActions.js.map +1 -1
- package/lib/commonjs/components/layout/GradientScrollView.js.map +1 -1
- package/lib/commonjs/components/layout/ModalBSHeader.js +3 -1
- package/lib/commonjs/components/layout/ModalBSHeader.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAmount.js +3 -1
- package/lib/commonjs/components/listitems/ListItemAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js +3 -2
- package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemHeader.js +4 -2
- package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js +3 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +3 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +3 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +10 -2
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
- package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js +6 -6
- package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberButton.js +15 -2
- package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberPad.js +9 -6
- package/lib/commonjs/components/numberpad/NumberPad.js.map +1 -1
- package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +42 -96
- package/lib/commonjs/components/otpInput/OTPInput.js +3 -3
- package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -1
- package/lib/commonjs/components/radio/RadioButtonLabel.js +3 -3
- package/lib/commonjs/components/radio/RadioButtonLabel.js.map +1 -1
- package/lib/commonjs/components/stepper/Stepper.js +5 -2
- package/lib/commonjs/components/stepper/Stepper.js.map +1 -1
- package/lib/commonjs/components/typography/IOText.js +4 -1
- package/lib/commonjs/components/typography/IOText.js.map +1 -1
- package/lib/commonjs/core/IOStyles.js +3 -53
- package/lib/commonjs/core/IOStyles.js.map +1 -1
- package/lib/module/components/accordion/AccordionItem.js +5 -3
- package/lib/module/components/accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/alert/Alert.js +6 -12
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/alert/AlertEdgeToEdge.js +3 -2
- package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
- package/lib/module/components/alert/AlertEdgeToEdgeWrapper.js +3 -2
- package/lib/module/components/alert/AlertEdgeToEdgeWrapper.js.map +1 -1
- package/lib/module/components/buttons/ButtonLink.js +6 -3
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +21 -16
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +4 -1
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/IOButton/IOButton.js +223 -0
- package/lib/module/components/buttons/IOButton/IOButton.js.map +1 -0
- package/lib/module/components/buttons/IOButton/__test__/IOButton.test.js +40 -0
- package/lib/module/components/buttons/IOButton/__test__/IOButton.test.js.map +1 -0
- package/lib/module/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
- package/lib/module/components/buttons/IOButton/index.js +4 -0
- package/lib/module/components/buttons/IOButton/index.js.map +1 -0
- package/lib/module/components/buttons/IOButton/styles.js +160 -0
- package/lib/module/components/buttons/IOButton/styles.js.map +1 -0
- package/lib/module/components/buttons/IconButton.js +4 -5
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/IconButtonContained.js +2 -3
- package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -402
- package/lib/module/components/buttons/__test__/button.test.js +0 -24
- package/lib/module/components/buttons/__test__/button.test.js.map +1 -1
- package/lib/module/components/buttons/index.js +1 -0
- package/lib/module/components/buttons/index.js.map +1 -1
- package/lib/module/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +13 -30
- package/lib/module/components/icons/Icon.js +10 -7
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/layout/FooterActions.js +11 -10
- package/lib/module/components/layout/FooterActions.js.map +1 -1
- package/lib/module/components/layout/FooterActionsInline.js +9 -9
- package/lib/module/components/layout/FooterActionsInline.js.map +1 -1
- package/lib/module/components/layout/GradientBottomActions.js +9 -9
- package/lib/module/components/layout/GradientBottomActions.js.map +1 -1
- package/lib/module/components/layout/GradientScrollView.js.map +1 -1
- package/lib/module/components/layout/ModalBSHeader.js +4 -2
- package/lib/module/components/layout/ModalBSHeader.js.map +1 -1
- package/lib/module/components/listitems/ListItemAmount.js +4 -2
- package/lib/module/components/listitems/ListItemAmount.js.map +1 -1
- package/lib/module/components/listitems/ListItemCheckbox.js +4 -3
- package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/module/components/listitems/ListItemHeader.js +5 -3
- package/lib/module/components/listitems/ListItemHeader.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfo.js +4 -2
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +4 -2
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +2 -2
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +4 -2
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +11 -3
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
- package/lib/module/components/loadingSpinner/LoadingSpinner.js +6 -6
- package/lib/module/components/loadingSpinner/LoadingSpinner.js.map +1 -1
- package/lib/module/components/numberpad/NumberButton.js +16 -3
- package/lib/module/components/numberpad/NumberButton.js.map +1 -1
- package/lib/module/components/numberpad/NumberPad.js +10 -7
- package/lib/module/components/numberpad/NumberPad.js.map +1 -1
- package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +42 -96
- package/lib/module/components/otpInput/OTPInput.js +3 -3
- package/lib/module/components/otpInput/OTPInput.js.map +1 -1
- package/lib/module/components/radio/RadioButtonLabel.js +3 -3
- package/lib/module/components/radio/RadioButtonLabel.js.map +1 -1
- package/lib/module/components/stepper/Stepper.js +6 -3
- package/lib/module/components/stepper/Stepper.js.map +1 -1
- package/lib/module/components/typography/IOText.js +2 -0
- package/lib/module/components/typography/IOText.js.map +1 -1
- package/lib/module/core/IOStyles.js +3 -53
- package/lib/module/core/IOStyles.js.map +1 -1
- package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/alert/AlertEdgeToEdge.d.ts.map +1 -1
- package/lib/typescript/components/alert/AlertEdgeToEdgeWrapper.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts +3 -0
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts +3 -0
- package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +3 -0
- package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IOButton/IOButton.d.ts +57 -0
- package/lib/typescript/components/buttons/IOButton/IOButton.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IOButton/__test__/IOButton.test.d.ts +2 -0
- package/lib/typescript/components/buttons/IOButton/__test__/IOButton.test.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IOButton/index.d.ts +2 -0
- package/lib/typescript/components/buttons/IOButton/index.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IOButton/styles.d.ts +35 -0
- package/lib/typescript/components/buttons/IOButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
- package/lib/typescript/components/buttons/index.d.ts +1 -0
- package/lib/typescript/components/buttons/index.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +1 -4
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/types.d.ts +3 -2
- package/lib/typescript/components/icons/types.d.ts.map +1 -1
- package/lib/typescript/components/layout/FooterActions.d.ts +10 -8
- package/lib/typescript/components/layout/FooterActions.d.ts.map +1 -1
- package/lib/typescript/components/layout/FooterActionsInline.d.ts +5 -4
- package/lib/typescript/components/layout/FooterActionsInline.d.ts.map +1 -1
- package/lib/typescript/components/layout/GradientBottomActions.d.ts +12 -6
- package/lib/typescript/components/layout/GradientBottomActions.d.ts.map +1 -1
- package/lib/typescript/components/layout/GradientScrollView.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemAmount.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
- package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts +2 -2
- package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberButton.d.ts +11 -0
- package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberPad.d.ts.map +1 -1
- package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -1
- package/lib/typescript/components/radio/RadioButtonLabel.d.ts.map +1 -1
- package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/components/typography/IOText.d.ts +1 -0
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +0 -47
- package/lib/typescript/core/IOStyles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/accordion/AccordionItem.tsx +7 -14
- package/src/components/alert/Alert.tsx +7 -21
- package/src/components/alert/AlertEdgeToEdge.tsx +1 -2
- package/src/components/alert/AlertEdgeToEdgeWrapper.tsx +1 -2
- package/src/components/buttons/ButtonLink.tsx +6 -6
- package/src/components/buttons/ButtonOutline.tsx +21 -21
- package/src/components/buttons/ButtonSolid.tsx +4 -1
- package/src/components/buttons/IOButton/IOButton.tsx +363 -0
- package/src/components/buttons/IOButton/__test__/IOButton.test.tsx +46 -0
- package/src/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
- package/src/components/buttons/IOButton/index.tsx +1 -0
- package/src/components/buttons/IOButton/styles.tsx +228 -0
- package/src/components/buttons/IconButton.tsx +4 -9
- package/src/components/buttons/IconButtonContained.tsx +3 -6
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -402
- package/src/components/buttons/__test__/button.test.tsx +1 -33
- package/src/components/buttons/index.tsx +1 -0
- package/src/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +13 -30
- package/src/components/icons/Icon.tsx +12 -3
- package/src/components/icons/types.ts +3 -2
- package/src/components/layout/FooterActions.tsx +26 -14
- package/src/components/layout/FooterActionsInline.tsx +19 -12
- package/src/components/layout/GradientBottomActions.tsx +17 -18
- package/src/components/layout/GradientScrollView.tsx +2 -1
- package/src/components/layout/ModalBSHeader.tsx +2 -2
- package/src/components/listitems/ListItemAmount.tsx +1 -2
- package/src/components/listitems/ListItemCheckbox.tsx +8 -11
- package/src/components/listitems/ListItemHeader.tsx +2 -3
- package/src/components/listitems/ListItemInfo.tsx +1 -2
- package/src/components/listitems/ListItemInfoCopy.tsx +1 -2
- package/src/components/listitems/ListItemNav.tsx +1 -1
- package/src/components/listitems/ListItemNavAlert.tsx +1 -2
- package/src/components/listitems/ListItemRadio.tsx +7 -7
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
- package/src/components/loadingSpinner/LoadingSpinner.tsx +8 -8
- package/src/components/numberpad/NumberButton.tsx +18 -11
- package/src/components/numberpad/NumberPad.tsx +8 -10
- package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +42 -96
- package/src/components/otpInput/OTPInput.tsx +1 -2
- package/src/components/radio/RadioButtonLabel.tsx +7 -10
- package/src/components/stepper/Stepper.tsx +7 -12
- package/src/components/typography/IOText.tsx +3 -0
- package/src/core/IOStyles.ts +3 -55
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { StyleProp } from "react-native";
|
|
1
|
+
import { ColorValue, StyleProp } from "react-native";
|
|
2
2
|
|
|
3
3
|
export type SVGIconProps = {
|
|
4
4
|
size: number | "100%";
|
|
5
|
-
style
|
|
5
|
+
style?: StyleProp<any>;
|
|
6
|
+
color: ColorValue;
|
|
6
7
|
accessible: boolean;
|
|
7
8
|
accessibilityElementsHidden: boolean;
|
|
8
9
|
accessibilityLabel: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Fragment, PropsWithChildren, useState } from "react";
|
|
3
3
|
import {
|
|
4
4
|
ColorValue,
|
|
5
5
|
LayoutChangeEvent,
|
|
@@ -20,29 +20,39 @@ import {
|
|
|
20
20
|
useIOTheme
|
|
21
21
|
} from "../../core";
|
|
22
22
|
import { WithTestID } from "../../utils/types";
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
IOButton,
|
|
25
|
+
IOButtonBlockSpecificProps,
|
|
26
|
+
IOButtonLinkSpecificProps
|
|
27
|
+
} from "../buttons";
|
|
24
28
|
import { VSpacer } from "../spacer";
|
|
25
29
|
import { useBottomMargins } from "./hooks/useBottomMargins";
|
|
26
30
|
|
|
31
|
+
type IOButtonBlockProps = Omit<
|
|
32
|
+
IOButtonBlockSpecificProps,
|
|
33
|
+
"variant" | "fullWidth"
|
|
34
|
+
>;
|
|
35
|
+
type IOButtonLinkProps = Omit<IOButtonLinkSpecificProps, "variant">;
|
|
36
|
+
|
|
27
37
|
type FooterSingleButton = {
|
|
28
38
|
type: "SingleButton";
|
|
29
|
-
primary:
|
|
39
|
+
primary: IOButtonBlockProps;
|
|
30
40
|
secondary?: never;
|
|
31
41
|
tertiary?: never;
|
|
32
42
|
};
|
|
33
43
|
|
|
34
44
|
type FooterTwoButtons = {
|
|
35
45
|
type: "TwoButtons";
|
|
36
|
-
primary:
|
|
37
|
-
secondary:
|
|
46
|
+
primary: IOButtonBlockProps;
|
|
47
|
+
secondary: IOButtonLinkProps;
|
|
38
48
|
tertiary?: never;
|
|
39
49
|
};
|
|
40
50
|
|
|
41
51
|
type FooterThreeButtons = {
|
|
42
52
|
type: "ThreeButtons";
|
|
43
|
-
primary:
|
|
44
|
-
secondary:
|
|
45
|
-
tertiary:
|
|
53
|
+
primary: IOButtonBlockProps;
|
|
54
|
+
secondary: IOButtonBlockProps;
|
|
55
|
+
tertiary: IOButtonLinkProps;
|
|
46
56
|
};
|
|
47
57
|
|
|
48
58
|
export type FooterActionsMeasurements = {
|
|
@@ -86,9 +96,9 @@ type FooterActionsProps = WithTestID<
|
|
|
86
96
|
}>
|
|
87
97
|
>;
|
|
88
98
|
|
|
89
|
-
/* Margin between
|
|
99
|
+
/* Margin between `solid` and `variant` variant */
|
|
90
100
|
const spaceBetweenActions: IOSpacer = 16;
|
|
91
|
-
/* Margin between
|
|
101
|
+
/* Margin between `solid` and `link` variant */
|
|
92
102
|
const spaceBetweenActionAndLink: IOSpacer = 16;
|
|
93
103
|
|
|
94
104
|
const styles = StyleSheet.create({
|
|
@@ -227,11 +237,13 @@ const renderActions = (
|
|
|
227
237
|
} = actions;
|
|
228
238
|
return (
|
|
229
239
|
<Fragment>
|
|
230
|
-
{primaryAction &&
|
|
240
|
+
{primaryAction && (
|
|
241
|
+
<IOButton variant="solid" fullWidth {...primaryAction} />
|
|
242
|
+
)}
|
|
231
243
|
{type === "TwoButtons" && secondaryAction && (
|
|
232
244
|
<View style={{ alignSelf: "center", marginBottom: extraBottomMargin }}>
|
|
233
245
|
<VSpacer size={spaceBetweenActionAndLink} />
|
|
234
|
-
<
|
|
246
|
+
<IOButton variant="link" {...secondaryAction} />
|
|
235
247
|
</View>
|
|
236
248
|
)}
|
|
237
249
|
{type === "ThreeButtons" && (
|
|
@@ -239,7 +251,7 @@ const renderActions = (
|
|
|
239
251
|
{secondaryAction && (
|
|
240
252
|
<>
|
|
241
253
|
<VSpacer size={spaceBetweenActions} />
|
|
242
|
-
<
|
|
254
|
+
<IOButton variant="outline" fullWidth {...secondaryAction} />
|
|
243
255
|
</>
|
|
244
256
|
)}
|
|
245
257
|
{tertiaryAction && (
|
|
@@ -247,7 +259,7 @@ const renderActions = (
|
|
|
247
259
|
style={{ alignSelf: "center", marginBottom: extraBottomMargin }}
|
|
248
260
|
>
|
|
249
261
|
<VSpacer size={spaceBetweenActionAndLink} />
|
|
250
|
-
<
|
|
262
|
+
<IOButton variant="link" {...tertiaryAction} />
|
|
251
263
|
</View>
|
|
252
264
|
)}
|
|
253
265
|
</>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
3
|
import { ColorValue, LayoutChangeEvent, StyleSheet, View } from "react-native";
|
|
4
4
|
import {
|
|
5
5
|
IOColors,
|
|
@@ -11,10 +11,14 @@ import {
|
|
|
11
11
|
useIOThemeContext
|
|
12
12
|
} from "../../core";
|
|
13
13
|
import { WithTestID } from "../../utils/types";
|
|
14
|
-
import {
|
|
15
|
-
import { HSpacer } from "../spacer";
|
|
14
|
+
import { IOButton, IOButtonBlockSpecificProps } from "../buttons";
|
|
16
15
|
import { useBottomMargins } from "./hooks/useBottomMargins";
|
|
17
16
|
|
|
17
|
+
type IOButtonBlockProps = Omit<
|
|
18
|
+
IOButtonBlockSpecificProps,
|
|
19
|
+
"variant" | "fullWidth"
|
|
20
|
+
>;
|
|
21
|
+
|
|
18
22
|
export type FooterActionsInlineMeasurements = {
|
|
19
23
|
/* Height of the safe bottom area. It includes:
|
|
20
24
|
- Margin between screen content
|
|
@@ -29,8 +33,8 @@ export type FooterActionsInlineMeasurements = {
|
|
|
29
33
|
|
|
30
34
|
type FooterActionsInline = WithTestID<
|
|
31
35
|
PropsWithChildren<{
|
|
32
|
-
startAction:
|
|
33
|
-
endAction:
|
|
36
|
+
startAction: IOButtonBlockProps;
|
|
37
|
+
endAction: IOButtonBlockProps;
|
|
34
38
|
onMeasure?: (measurements: FooterActionsInlineMeasurements) => void;
|
|
35
39
|
/* Don't include safe area insets */
|
|
36
40
|
excludeSafeAreaMargins?: boolean;
|
|
@@ -39,9 +43,6 @@ type FooterActionsInline = WithTestID<
|
|
|
39
43
|
}>
|
|
40
44
|
>;
|
|
41
45
|
|
|
42
|
-
/* Margin between ButtonSolid and ButtonOutline */
|
|
43
|
-
const spaceBetweenActions: IOSpacer = 16;
|
|
44
|
-
|
|
45
46
|
const styles = StyleSheet.create({
|
|
46
47
|
buttonContainer: {
|
|
47
48
|
paddingHorizontal: IOVisualCostants.appMarginDefault,
|
|
@@ -76,6 +77,8 @@ export const FooterActionsInline = ({
|
|
|
76
77
|
|
|
77
78
|
const { bottomMargin } = useBottomMargins(false, excludeSafeAreaMargins);
|
|
78
79
|
|
|
80
|
+
/* Margin between `solid` and `outline` variant */
|
|
81
|
+
const spaceBetweenActions: IOSpacer = 16;
|
|
79
82
|
/* Top padding applied above the actions */
|
|
80
83
|
const topSpacingValue: IOSpacingScale = 16;
|
|
81
84
|
const topSpacing = fixed ? topSpacingValue : 0;
|
|
@@ -122,13 +125,17 @@ export const FooterActionsInline = ({
|
|
|
122
125
|
onLayout={getActionBlockMeasurements}
|
|
123
126
|
pointerEvents="box-none"
|
|
124
127
|
>
|
|
125
|
-
<View
|
|
128
|
+
<View
|
|
129
|
+
style={{
|
|
130
|
+
flexDirection: "row",
|
|
131
|
+
gap: spaceBetweenActions
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
126
134
|
<View style={styles.buttonWrapper}>
|
|
127
|
-
<
|
|
135
|
+
<IOButton variant="outline" fullWidth {...startAction} />
|
|
128
136
|
</View>
|
|
129
|
-
<HSpacer size={spaceBetweenActions} />
|
|
130
137
|
<View style={styles.buttonWrapper}>
|
|
131
|
-
<
|
|
138
|
+
<IOButton variant="solid" fullWidth {...endAction} />
|
|
132
139
|
</View>
|
|
133
140
|
</View>
|
|
134
141
|
</View>
|
|
@@ -2,23 +2,24 @@ import * as React from "react";
|
|
|
2
2
|
import { Easing, StyleProp, StyleSheet, View, ViewStyle } from "react-native";
|
|
3
3
|
import { easeGradient } from "react-native-easing-gradient";
|
|
4
4
|
import LinearGradient from "react-native-linear-gradient";
|
|
5
|
-
import Animated from "react-native-reanimated";
|
|
5
|
+
import Animated, { AnimatedStyle } from "react-native-reanimated";
|
|
6
6
|
import { IOColors, IOSpacer, IOVisualCostants, hexToRgba } from "../../core";
|
|
7
7
|
import { WithTestID } from "../../utils/types";
|
|
8
|
-
import {
|
|
9
|
-
ButtonLink,
|
|
10
|
-
ButtonLinkProps,
|
|
11
|
-
ButtonSolid,
|
|
12
|
-
ButtonSolidProps
|
|
13
|
-
} from "../buttons";
|
|
8
|
+
import { IOButton, IOButtonProps } from "../buttons";
|
|
14
9
|
import { VSpacer } from "../spacer";
|
|
15
10
|
|
|
11
|
+
type PrimaryActionProps = Extract<
|
|
12
|
+
IOButtonProps,
|
|
13
|
+
{ variant?: "solid" | "outline" }
|
|
14
|
+
>;
|
|
15
|
+
type SecondaryActionProps = Extract<IOButtonProps, { variant?: "link" }>;
|
|
16
|
+
|
|
16
17
|
export type GradientBottomActions = WithTestID<{
|
|
17
|
-
transitionAnimStyle:
|
|
18
|
+
transitionAnimStyle: AnimatedStyle<StyleProp<ViewStyle>>;
|
|
18
19
|
dimensions: GradientBottomActionsDimensions;
|
|
19
|
-
//
|
|
20
|
-
primaryActionProps?:
|
|
21
|
-
secondaryActionProps?:
|
|
20
|
+
// Button actions
|
|
21
|
+
primaryActionProps?: PrimaryActionProps;
|
|
22
|
+
secondaryActionProps?: SecondaryActionProps;
|
|
22
23
|
// Debug mode
|
|
23
24
|
debugMode?: boolean;
|
|
24
25
|
}>;
|
|
@@ -68,8 +69,8 @@ const styles = StyleSheet.create({
|
|
|
68
69
|
* @see IOScrollView
|
|
69
70
|
*/
|
|
70
71
|
export const GradientBottomActions = ({
|
|
71
|
-
primaryActionProps
|
|
72
|
-
secondaryActionProps
|
|
72
|
+
primaryActionProps,
|
|
73
|
+
secondaryActionProps,
|
|
73
74
|
dimensions,
|
|
74
75
|
transitionAnimStyle,
|
|
75
76
|
debugMode,
|
|
@@ -122,11 +123,9 @@ export const GradientBottomActions = ({
|
|
|
122
123
|
]}
|
|
123
124
|
/>
|
|
124
125
|
<View style={styles.buttonContainer} pointerEvents="box-none">
|
|
125
|
-
{
|
|
126
|
-
<ButtonSolid fullWidth {...primaryAction}></ButtonSolid>
|
|
127
|
-
)}
|
|
126
|
+
{primaryActionProps && <IOButton {...primaryActionProps} fullWidth />}
|
|
128
127
|
|
|
129
|
-
{
|
|
128
|
+
{secondaryActionProps && (
|
|
130
129
|
<View
|
|
131
130
|
style={{
|
|
132
131
|
alignSelf: "center",
|
|
@@ -134,7 +133,7 @@ export const GradientBottomActions = ({
|
|
|
134
133
|
}}
|
|
135
134
|
>
|
|
136
135
|
<VSpacer size={dimensions.spaceBetweenActions} />
|
|
137
|
-
|
|
136
|
+
<IOButton {...secondaryActionProps} />
|
|
138
137
|
</View>
|
|
139
138
|
)}
|
|
140
139
|
</View>
|
|
@@ -21,7 +21,8 @@ export type GradientScrollView = WithTestID<{
|
|
|
21
21
|
children: React.ReactNode;
|
|
22
22
|
excludeSafeAreaMargins?: boolean;
|
|
23
23
|
debugMode?: boolean;
|
|
24
|
-
// Accepted components:
|
|
24
|
+
// Accepted components: `solid` variant for the primaryAction,
|
|
25
|
+
// `link` variant for the secondaryAction.
|
|
25
26
|
// Don't use any components other than this, please.
|
|
26
27
|
primaryActionProps: GradientBottomActions["primaryActionProps"];
|
|
27
28
|
secondaryActionProps?: GradientBottomActions["secondaryActionProps"];
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
View,
|
|
7
7
|
findNodeHandle
|
|
8
8
|
} from "react-native";
|
|
9
|
-
import { IOColors,
|
|
9
|
+
import { IOColors, IOVisualCostants } from "../../core";
|
|
10
10
|
import { IconButton } from "../buttons";
|
|
11
11
|
import { H4 } from "../typography";
|
|
12
12
|
|
|
@@ -56,7 +56,7 @@ export const ModalBSHeader = ({
|
|
|
56
56
|
title
|
|
57
57
|
) : (
|
|
58
58
|
<View
|
|
59
|
-
style={
|
|
59
|
+
style={{ flex: 1 }}
|
|
60
60
|
accessible={true}
|
|
61
61
|
accessibilityRole={"header"}
|
|
62
62
|
accessibilityLabel={typeof title === "string" ? title : undefined}
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
IOListItemStyles,
|
|
5
5
|
IOListItemVisualParams,
|
|
6
6
|
IOSpacingScale,
|
|
7
|
-
IOStyles,
|
|
8
7
|
useIOTheme
|
|
9
8
|
} from "../../core";
|
|
10
9
|
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
@@ -81,7 +80,7 @@ export const ListItemAmount = ({
|
|
|
81
80
|
size={IOListItemVisualParams.iconSize}
|
|
82
81
|
/>
|
|
83
82
|
)}
|
|
84
|
-
<View style={
|
|
83
|
+
<View style={{ flex: 1 }}>{itemInfoTextComponent}</View>
|
|
85
84
|
<H3
|
|
86
85
|
{...valueElementProps}
|
|
87
86
|
color={theme["textBody-default"]}
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
IOSelectionListItemStyles,
|
|
8
8
|
IOSelectionListItemVisualParams,
|
|
9
9
|
IOSelectionTickVisualParams,
|
|
10
|
-
IOStyles,
|
|
11
10
|
useIOTheme
|
|
12
11
|
} from "../../core";
|
|
13
12
|
import { useListItemAnimation } from "../../hooks";
|
|
@@ -104,16 +103,14 @@ export const ListItemCheckbox = ({
|
|
|
104
103
|
<Animated.View style={scaleAnimatedStyle}>
|
|
105
104
|
<View style={IOSelectionListItemStyles.listItemInner}>
|
|
106
105
|
<View
|
|
107
|
-
style={
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
]}
|
|
106
|
+
style={{
|
|
107
|
+
flexDirection: "row",
|
|
108
|
+
flexShrink: 1,
|
|
109
|
+
columnGap:
|
|
110
|
+
IOSelectionListItemVisualParams.iconMargin *
|
|
111
|
+
dynamicFontScale *
|
|
112
|
+
spacingScaleMultiplier
|
|
113
|
+
}}
|
|
117
114
|
>
|
|
118
115
|
{icon && !hugeFontEnabled && (
|
|
119
116
|
<Icon
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
IOListItemVisualParams,
|
|
6
6
|
IOSelectionListItemVisualParams,
|
|
7
7
|
IOSpacingScale,
|
|
8
|
-
IOStyles,
|
|
9
8
|
IOVisualCostants,
|
|
10
9
|
useIOTheme
|
|
11
10
|
} from "../../core";
|
|
@@ -14,8 +13,8 @@ import { WithTestID } from "../../utils/types";
|
|
|
14
13
|
import { Badge } from "../badge";
|
|
15
14
|
import { ButtonLink, IconButton } from "../buttons";
|
|
16
15
|
import { IOIcons, Icon } from "../icons";
|
|
17
|
-
import { BodySmall, H6 } from "../typography";
|
|
18
16
|
import { VSpacer } from "../spacer";
|
|
17
|
+
import { BodySmall, H6 } from "../typography";
|
|
19
18
|
|
|
20
19
|
type ButtonLinkActionProps = {
|
|
21
20
|
type: "buttonLink";
|
|
@@ -121,7 +120,7 @@ export const ListItemHeader = ({
|
|
|
121
120
|
/>
|
|
122
121
|
</View>
|
|
123
122
|
)}
|
|
124
|
-
<View style={
|
|
123
|
+
<View style={{ flex: 1 }}>{itemInfoTextComponent}</View>
|
|
125
124
|
{endElement && (
|
|
126
125
|
<View style={{ marginLeft: IOListItemVisualParams.actionMargin }}>
|
|
127
126
|
{listItemAction()}
|
|
@@ -4,7 +4,6 @@ import Animated from "react-native-reanimated";
|
|
|
4
4
|
import {
|
|
5
5
|
IOListItemStyles,
|
|
6
6
|
IOListItemVisualParams,
|
|
7
|
-
IOStyles,
|
|
8
7
|
useIOTheme
|
|
9
8
|
} from "../../core";
|
|
10
9
|
import { useListItemAnimation } from "../../hooks";
|
|
@@ -175,7 +174,7 @@ export const ListItemInfo = ({
|
|
|
175
174
|
size={PAYMENT_LOGO_SIZE}
|
|
176
175
|
/>
|
|
177
176
|
)}
|
|
178
|
-
<View style={
|
|
177
|
+
<View style={{ flex: 1 }}>{itemInfoTextComponent}</View>
|
|
179
178
|
{endElement && <View>{listItemInfoAction()}</View>}
|
|
180
179
|
</>
|
|
181
180
|
);
|
|
@@ -4,7 +4,6 @@ import Animated from "react-native-reanimated";
|
|
|
4
4
|
import {
|
|
5
5
|
IOListItemStyles,
|
|
6
6
|
IOListItemVisualParams,
|
|
7
|
-
IOStyles,
|
|
8
7
|
useIOTheme
|
|
9
8
|
} from "../../core";
|
|
10
9
|
import { useListItemAnimation } from "../../hooks";
|
|
@@ -110,7 +109,7 @@ export const ListItemInfoCopy = ({
|
|
|
110
109
|
size={IOListItemVisualParams.iconSize}
|
|
111
110
|
/>
|
|
112
111
|
)}
|
|
113
|
-
<View style={
|
|
112
|
+
<View style={{ flex: 1 }}>{listItemInfoCopyContent}</View>
|
|
114
113
|
<Icon
|
|
115
114
|
allowFontScaling
|
|
116
115
|
name="copy"
|
|
@@ -229,7 +229,7 @@ export const ListItemNav = ({
|
|
|
229
229
|
<View style={{ flexGrow: 1, flexShrink: 1 }}>
|
|
230
230
|
{listItemNavContent}
|
|
231
231
|
</View>
|
|
232
|
-
{loading && <LoadingSpinner color={interactiveColor} />}
|
|
232
|
+
{loading && <LoadingSpinner color={IOColors[interactiveColor]} />}
|
|
233
233
|
{!loading && !hideChevron && (
|
|
234
234
|
<Icon
|
|
235
235
|
allowFontScaling
|
|
@@ -4,7 +4,6 @@ import Animated from "react-native-reanimated";
|
|
|
4
4
|
import {
|
|
5
5
|
IOListItemStyles,
|
|
6
6
|
IOListItemVisualParams,
|
|
7
|
-
IOStyles,
|
|
8
7
|
useIOTheme
|
|
9
8
|
} from "../../core";
|
|
10
9
|
import { useListItemAnimation } from "../../hooks";
|
|
@@ -108,7 +107,7 @@ export const ListItemNavAlert = ({
|
|
|
108
107
|
size={IOListItemVisualParams.iconSize}
|
|
109
108
|
/>
|
|
110
109
|
)}
|
|
111
|
-
<View style={
|
|
110
|
+
<View style={{ flex: 1 }}>{listItemNavAlertContent}</View>
|
|
112
111
|
<Icon
|
|
113
112
|
allowFontScaling
|
|
114
113
|
name="chevronRightListItem"
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
IOSelectionListItemStyles,
|
|
8
8
|
IOSelectionListItemVisualParams,
|
|
9
9
|
IOSelectionTickVisualParams,
|
|
10
|
-
IOStyles,
|
|
11
10
|
useIOTheme
|
|
12
11
|
} from "../../core";
|
|
13
12
|
import { useListItemAnimation } from "../../hooks";
|
|
@@ -133,13 +132,14 @@ export const ListItemRadio = ({
|
|
|
133
132
|
>
|
|
134
133
|
<View style={IOSelectionListItemStyles.listItemInner}>
|
|
135
134
|
<View
|
|
136
|
-
style={
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
style={{
|
|
136
|
+
flex: 1,
|
|
137
|
+
flexDirection: "row",
|
|
138
|
+
justifyContent: "space-between",
|
|
139
|
+
alignItems: "center"
|
|
140
|
+
}}
|
|
141
141
|
>
|
|
142
|
-
<View style={
|
|
142
|
+
<View style={{ flexDirection: "row", alignItems: "center" }}>
|
|
143
143
|
{loadingProps?.skeletonIcon && <SkeletonIcon />}
|
|
144
144
|
<IOSkeleton shape="rectangle" width={180} height={16} radius={8} />
|
|
145
145
|
</View>
|