@pagopa/io-app-design-system 5.3.9 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- 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 +1 -2
- 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 +3 -395
- 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 +3 -12
- 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/listitems/ListItemNav.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.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 +36 -86
- 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 +2 -17
- package/lib/commonjs/core/IOStyles.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 +2 -3
- 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 +3 -395
- 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 +3 -12
- 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/listitems/ListItemNav.js +2 -2
- package/lib/module/components/listitems/ListItemNav.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 +36 -86
- 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 +1 -16
- package/lib/module/core/IOStyles.js.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/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/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 -14
- package/lib/typescript/core/IOStyles.d.ts.map +1 -1
- package/package.json +1 -1
- 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 +3 -6
- package/src/components/buttons/IconButtonContained.tsx +3 -6
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -395
- 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 +3 -12
- 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/listitems/ListItemNav.tsx +1 -1
- 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 +36 -86
- package/src/components/typography/IOText.tsx +3 -0
- package/src/core/IOStyles.ts +1 -18
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
3
|
import { ViewStyle } from "react-native";
|
|
4
4
|
import Animated from "react-native-reanimated";
|
|
5
5
|
import { WithTestID } from "../../utils/types";
|
|
6
|
-
import {
|
|
6
|
+
import { IOButtonBlockSpecificProps, IOButtonLinkSpecificProps } from "../buttons";
|
|
7
|
+
type IOButtonBlockProps = Omit<IOButtonBlockSpecificProps, "variant" | "fullWidth">;
|
|
8
|
+
type IOButtonLinkProps = Omit<IOButtonLinkSpecificProps, "variant">;
|
|
7
9
|
type FooterSingleButton = {
|
|
8
10
|
type: "SingleButton";
|
|
9
|
-
primary:
|
|
11
|
+
primary: IOButtonBlockProps;
|
|
10
12
|
secondary?: never;
|
|
11
13
|
tertiary?: never;
|
|
12
14
|
};
|
|
13
15
|
type FooterTwoButtons = {
|
|
14
16
|
type: "TwoButtons";
|
|
15
|
-
primary:
|
|
16
|
-
secondary:
|
|
17
|
+
primary: IOButtonBlockProps;
|
|
18
|
+
secondary: IOButtonLinkProps;
|
|
17
19
|
tertiary?: never;
|
|
18
20
|
};
|
|
19
21
|
type FooterThreeButtons = {
|
|
20
22
|
type: "ThreeButtons";
|
|
21
|
-
primary:
|
|
22
|
-
secondary:
|
|
23
|
-
tertiary:
|
|
23
|
+
primary: IOButtonBlockProps;
|
|
24
|
+
secondary: IOButtonBlockProps;
|
|
25
|
+
tertiary: IOButtonLinkProps;
|
|
24
26
|
};
|
|
25
27
|
export type FooterActionsMeasurements = {
|
|
26
28
|
actionBlockHeight: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FooterActions.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/FooterActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"FooterActions.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/FooterActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAY,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAC9D,OAAO,EAOL,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAU/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAEL,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAIpB,KAAK,kBAAkB,GAAG,IAAI,CAC5B,0BAA0B,EAC1B,SAAS,GAAG,WAAW,CACxB,CAAC;AACF,KAAK,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAEpE,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IAEtC,iBAAiB,EAAE,MAAM,CAAC;IAS1B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,KAAK,aAAa,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAEhF,KAAK,oBAAoB,GAAG;IAE1B,SAAS,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAE7C,UAAU,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;CAC/C,CAAC;AAEF,KAAK,kBAAkB,GAAG,UAAU,CAClC,iBAAiB,CAAC;IAChB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC9D,cAAc,CAAC,EAAE,oBAAoB,CAAC;IAEtC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAIhB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CACH,CAAC;AAgCF,eAAO,MAAM,aAAa,GAAI,uGAS3B,kBAAkB,sBAqFpB,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
3
|
import { WithTestID } from "../../utils/types";
|
|
4
|
-
import {
|
|
4
|
+
import { IOButtonBlockSpecificProps } from "../buttons";
|
|
5
|
+
type IOButtonBlockProps = Omit<IOButtonBlockSpecificProps, "variant" | "fullWidth">;
|
|
5
6
|
export type FooterActionsInlineMeasurements = {
|
|
6
7
|
safeBottomAreaHeight: number;
|
|
7
8
|
};
|
|
8
9
|
type FooterActionsInline = WithTestID<PropsWithChildren<{
|
|
9
|
-
startAction:
|
|
10
|
-
endAction:
|
|
10
|
+
startAction: IOButtonBlockProps;
|
|
11
|
+
endAction: IOButtonBlockProps;
|
|
11
12
|
onMeasure?: (measurements: FooterActionsInlineMeasurements) => void;
|
|
12
13
|
excludeSafeAreaMargins?: boolean;
|
|
13
14
|
fixed?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FooterActionsInline.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/FooterActionsInline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"FooterActionsInline.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/FooterActionsInline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAW1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAY,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAGlE,KAAK,kBAAkB,GAAG,IAAI,CAC5B,0BAA0B,EAC1B,SAAS,GAAG,WAAW,CACxB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAS5C,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,KAAK,mBAAmB,GAAG,UAAU,CACnC,iBAAiB,CAAC;IAChB,WAAW,EAAE,kBAAkB,CAAC;IAChC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,+BAA+B,KAAK,IAAI,CAAC;IAEpE,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC,CACH,CAAC;AAuBF,eAAO,MAAM,mBAAmB,GAAI,8EAOjC,mBAAmB,sBAsErB,CAAC"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import
|
|
3
|
+
import { AnimatedStyle } from "react-native-reanimated";
|
|
4
4
|
import { IOSpacer } from "../../core";
|
|
5
5
|
import { WithTestID } from "../../utils/types";
|
|
6
|
-
import {
|
|
6
|
+
import { IOButtonProps } from "../buttons";
|
|
7
|
+
type PrimaryActionProps = Extract<IOButtonProps, {
|
|
8
|
+
variant?: "solid" | "outline";
|
|
9
|
+
}>;
|
|
10
|
+
type SecondaryActionProps = Extract<IOButtonProps, {
|
|
11
|
+
variant?: "link";
|
|
12
|
+
}>;
|
|
7
13
|
export type GradientBottomActions = WithTestID<{
|
|
8
|
-
transitionAnimStyle:
|
|
14
|
+
transitionAnimStyle: AnimatedStyle<StyleProp<ViewStyle>>;
|
|
9
15
|
dimensions: GradientBottomActionsDimensions;
|
|
10
|
-
primaryActionProps?:
|
|
11
|
-
secondaryActionProps?:
|
|
16
|
+
primaryActionProps?: PrimaryActionProps;
|
|
17
|
+
secondaryActionProps?: SecondaryActionProps;
|
|
12
18
|
debugMode?: boolean;
|
|
13
19
|
}>;
|
|
14
20
|
type GradientBottomActionsDimensions = {
|
|
@@ -22,6 +28,6 @@ type GradientBottomActionsDimensions = {
|
|
|
22
28
|
* @deprecated This component has been included in the new `IOScrollView` after a proper refactor. It will be removed in a future release.
|
|
23
29
|
* @see IOScrollView
|
|
24
30
|
*/
|
|
25
|
-
export declare const GradientBottomActions: ({ primaryActionProps
|
|
31
|
+
export declare const GradientBottomActions: ({ primaryActionProps, secondaryActionProps, dimensions, transitionAnimStyle, debugMode, testID }: GradientBottomActions) => React.JSX.Element;
|
|
26
32
|
export default GradientBottomActions;
|
|
27
33
|
//# sourceMappingURL=GradientBottomActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GradientBottomActions.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/GradientBottomActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAU,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9E,
|
|
1
|
+
{"version":3,"file":"GradientBottomActions.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/GradientBottomActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAU,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9E,OAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAY,QAAQ,EAA+B,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAGrD,KAAK,kBAAkB,GAAG,OAAO,CAC/B,aAAa,EACb;IAAE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,CAClC,CAAC;AACF,KAAK,oBAAoB,GAAG,OAAO,CAAC,aAAa,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEzE,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC;IAC7C,mBAAmB,EAAE,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,UAAU,EAAE,+BAA+B,CAAC;IAE5C,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAE5C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,KAAK,+BAA+B,GAAG;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,QAAQ,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAkCF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,kGAOnC,qBAAqB,sBA+DvB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GradientScrollView.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/GradientScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAEL,cAAc,EAGf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GradientScrollView.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/GradientScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAEL,cAAc,EAGf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IAIpB,kBAAkB,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;IAChE,oBAAoB,CAAC,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;CACtE,CAAC,CAAC;AAGH,eAAO,MAAM,gBAAgB,EAAE,cAAmB,CAAC;AAUnD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,6IAQhC,kBAAkB,sBAqHpB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { ColorValue } from "react-native";
|
|
2
3
|
import { WithTestID } from "../../utils/types";
|
|
3
|
-
import { IOColors } from "../../core";
|
|
4
4
|
export type LoadingSpinner = WithTestID<{
|
|
5
|
-
color?:
|
|
5
|
+
color?: ColorValue;
|
|
6
6
|
size?: IOLoadingSpinnerSizeScale;
|
|
7
7
|
durationMs?: number;
|
|
8
8
|
accessibilityLabel?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../../src/components/loadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../../src/components/loadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAA0B,UAAU,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC;IACtC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAQrD,eAAO,MAAM,cAAc,GAAI,yFAO5B,cAAc,KAAG,KAAK,CAAC,YA0FzB,CAAC"}
|
|
@@ -22,5 +22,16 @@ type NumberButtonProps = {
|
|
|
22
22
|
* @returns {JSX.Element} The rendered `NumberButton`
|
|
23
23
|
*/
|
|
24
24
|
export declare const NumberButton: React.MemoExoticComponent<({ number, variant, onPress }: NumberButtonProps) => React.JSX.Element>;
|
|
25
|
+
export declare const numberButtonStyles: {
|
|
26
|
+
circularButton: {
|
|
27
|
+
alignItems: "center";
|
|
28
|
+
justifyContent: "center";
|
|
29
|
+
borderRadius: number;
|
|
30
|
+
};
|
|
31
|
+
buttonSize: {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
25
36
|
export {};
|
|
26
37
|
//# sourceMappingURL=NumberButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberButton.d.ts","sourceRoot":"","sources":["../../../../src/components/numberpad/NumberButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NumberButton.d.ts","sourceRoot":"","sources":["../../../../src/components/numberpad/NumberButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAY1D,KAAK,uBAAuB,GAAG,SAAS,GAAG,SAAS,CAAC;AAErD,KAAK,iBAAiB,GAAG;IACvB;;OAEG;IACH,OAAO,EAAE,uBAAuB,CAAC;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAUF;;;;GAIG;AACH,eAAO,MAAM,YAAY,2DACQ,iBAAiB,uBAyEjD,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;CAU7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberPad.d.ts","sourceRoot":"","sources":["../../../../src/components/numberpad/NumberPad.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAwB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NumberPad.d.ts","sourceRoot":"","sources":["../../../../src/components/numberpad/NumberPad.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAwB,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAY,MAAM,mBAAmB,CAAC;AAKlE,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,KAAK,kBAAkB,GACnB;IACE;;OAEG;IACH,aAAa,EAAE,mBAAmB,CAAC;IACnC;;;OAGG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B;;OAEG;IACH,2BAA2B,EAAE,MAAM,CAAC;CACrC,GACD;IACE,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,gBAAgB,CAAC,EAAE,KAAK,CAAC;IACzB,2BAA2B,CAAC,EAAE,KAAK,CAAC;CACrC,CAAC;AAEN,KAAK,cAAc,GAAG;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IACzD;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,GAAG,kBAAkB,CAAC;AAWvB;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,mIAQvB,cAAc,KAAG,GAAG,CAAC,OA8EvB,CAAC"}
|
|
@@ -51,5 +51,6 @@ export type TypographicStyleAsLinkProps = {
|
|
|
51
51
|
* @constructor
|
|
52
52
|
*/
|
|
53
53
|
export declare const IOText: React.ForwardRefExoticComponent<IOTextBaseProps & IOTextExcludedProps & React.RefAttributes<View>>;
|
|
54
|
+
export declare const AnimatedIOText: React.FunctionComponent<import("react-native-reanimated").AnimateProps<IOTextBaseProps & IOTextExcludedProps & React.RefAttributes<View>>>;
|
|
54
55
|
export {};
|
|
55
56
|
//# sourceMappingURL=IOText.d.ts.map
|
|
@@ -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,EACL,iBAAiB,EAEjB,qBAAqB,EACrB,IAAI,EACJ,SAAS,EACT,IAAI,EACL,MAAM,cAAc,CAAC;
|
|
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,EACL,iBAAiB,EAEjB,qBAAqB,EACrB,IAAI,EACJ,SAAS,EACT,IAAI,EACL,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAc,MAAM,YAAY,CAAC;AAElD,OAAO,EACL,YAAY,EACZ,YAAY,EAGb,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,MAAM,CAAC;IACd,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;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC,iBAAiB,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;CACnE,GACD;IAAE,KAAK,CAAC,EAAE,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAezC;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,oGAoElB,CAAC;AAEF,eAAO,MAAM,cAAc,4IAA2C,CAAC"}
|
|
@@ -66,7 +66,6 @@ export declare const IOStyles: {
|
|
|
66
66
|
};
|
|
67
67
|
export declare const buttonSolidHeight: number;
|
|
68
68
|
export declare const iconBtnSizeSmall: number;
|
|
69
|
-
export declare const numberPadBtnSize: number;
|
|
70
69
|
export declare const IOButtonStyles: {
|
|
71
70
|
button: {
|
|
72
71
|
flexDirection: "row";
|
|
@@ -127,19 +126,6 @@ export declare const IOIconButtonStyles: {
|
|
|
127
126
|
borderRadius: number;
|
|
128
127
|
};
|
|
129
128
|
};
|
|
130
|
-
export declare const IONumberPadButtonStyles: {
|
|
131
|
-
button: {
|
|
132
|
-
alignItems: "center";
|
|
133
|
-
justifyContent: "center";
|
|
134
|
-
};
|
|
135
|
-
circularShape: {
|
|
136
|
-
borderRadius: number;
|
|
137
|
-
};
|
|
138
|
-
buttonSize: {
|
|
139
|
-
width: number;
|
|
140
|
-
height: number;
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
129
|
/**
|
|
144
130
|
* LIST ITEM STYLES
|
|
145
131
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOStyles.d.ts","sourceRoot":"","sources":["../../../src/core/IOStyles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EACL,WAAW,EAGX,QAAQ,EACR,cAAc,EACf,MAAM,aAAa,CAAC;AAErB;;GAEG;AAEH,UAAU,gBAAgB;IACxB,gBAAgB,EAAE,WAAW,CAAC;IAE9B,YAAY,EAAE,MAAM,CAAC;IAErB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,EAAE,gBAW9B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDnB,CAAC;AAcH,eAAO,MAAM,iBAAiB,EAAE,MAAuB,CAAC;AAGxD,eAAO,MAAM,gBAAgB,EAAE,MAAW,CAAC;AAE3C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"IOStyles.d.ts","sourceRoot":"","sources":["../../../src/core/IOStyles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EACL,WAAW,EAGX,QAAQ,EACR,cAAc,EACf,MAAM,aAAa,CAAC;AAErB;;GAEG;AAEH,UAAU,gBAAgB;IACxB,gBAAgB,EAAE,WAAW,CAAC;IAE9B,YAAY,EAAE,MAAM,CAAC;IAErB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,EAAE,gBAW9B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDnB,CAAC;AAcH,eAAO,MAAM,iBAAiB,EAAE,MAAuB,CAAC;AAGxD,eAAO,MAAM,gBAAgB,EAAE,MAAW,CAAC;AAE3C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDzB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;CAsB7B,CAAC;AAEH;;GAEG;AAEH,UAAU,sBAAsB;IAC9B,eAAe,EAAE,cAAc,CAAC;IAChC,iBAAiB,EAAE,WAAW,CAAC;IAC/B,UAAU,EAAE,cAAc,CAAC;IAC3B,YAAY,EAAE,cAAc,CAAC;IAC7B,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,eAAe,CAAC;CAC9B;AAED,eAAO,MAAM,sBAAsB,EAAE,sBAOpC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAW3B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;CAYzB,CAAC;AAEH;;GAEG;AAEH,UAAU,2BAA2B;IACnC,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,2BAA2B,EAAE,2BAGzC,CAAC;AAEF,UAAU,+BAA+B;IACvC,eAAe,EAAE,cAAc,CAAC;IAChC,iBAAiB,EAAE,WAAW,CAAC;IAC/B,UAAU,EAAE,cAAc,CAAC;IAC3B,YAAY,EAAE,QAAQ,CAAC;IACvB,QAAQ,EAAE,eAAe,CAAC;IAC1B,iBAAiB,EAAE,QAAQ,CAAC;CAC7B;AAED,eAAO,MAAM,+BAA+B,EAAE,+BAQ3C,CAAC;AAEJ,eAAO,MAAM,yBAAyB;;;;;;;;;;;CAWpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -24,9 +24,9 @@ import { useScaleAnimation } from "../../hooks";
|
|
|
24
24
|
import { WithTestID } from "../../utils/types";
|
|
25
25
|
import {
|
|
26
26
|
AnimatedIcon,
|
|
27
|
+
AnimatedIconWithColorTransition,
|
|
27
28
|
IOIconSizeScale,
|
|
28
|
-
IOIcons
|
|
29
|
-
IconClassComponent
|
|
29
|
+
IOIcons
|
|
30
30
|
} from "../icons";
|
|
31
31
|
import {
|
|
32
32
|
IOText,
|
|
@@ -64,6 +64,9 @@ type ColorStates = {
|
|
|
64
64
|
const DISABLED_OPACITY = 0.5;
|
|
65
65
|
const ICON_MARGIN = 8;
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated Use `Button` with variant `link` instead
|
|
69
|
+
*/
|
|
67
70
|
export const ButtonLink = forwardRef<View, ButtonLinkProps>(
|
|
68
71
|
(
|
|
69
72
|
{
|
|
@@ -142,9 +145,6 @@ export const ButtonLink = forwardRef<View, ButtonLinkProps>(
|
|
|
142
145
|
return { color: iconColor };
|
|
143
146
|
});
|
|
144
147
|
|
|
145
|
-
const AnimatedIconClassComponent =
|
|
146
|
-
Animated.createAnimatedComponent(IconClassComponent);
|
|
147
|
-
|
|
148
148
|
// Icon size
|
|
149
149
|
const iconSize: IOIconSizeScale = 24;
|
|
150
150
|
const iconMargin: IOSpacingScale = 8;
|
|
@@ -180,7 +180,7 @@ export const ButtonLink = forwardRef<View, ButtonLinkProps>(
|
|
|
180
180
|
>
|
|
181
181
|
{icon &&
|
|
182
182
|
(!disabled ? (
|
|
183
|
-
<
|
|
183
|
+
<AnimatedIconWithColorTransition
|
|
184
184
|
allowFontScaling
|
|
185
185
|
name={icon}
|
|
186
186
|
animatedProps={pressedColorIconAnimationStyle}
|
|
@@ -22,9 +22,9 @@ import { useScaleAnimation } from "../../hooks";
|
|
|
22
22
|
import { WithTestID } from "../../utils/types";
|
|
23
23
|
import {
|
|
24
24
|
AnimatedIcon,
|
|
25
|
+
AnimatedIconWithColorTransition,
|
|
25
26
|
IOIconSizeScale,
|
|
26
|
-
IOIcons
|
|
27
|
-
IconClassComponent
|
|
27
|
+
IOIcons
|
|
28
28
|
} from "../icons";
|
|
29
29
|
import { IOText, buttonTextFontSize } from "../typography";
|
|
30
30
|
|
|
@@ -46,12 +46,12 @@ export type ButtonOutline = WithTestID<
|
|
|
46
46
|
>;
|
|
47
47
|
|
|
48
48
|
type ColorStates = {
|
|
49
|
-
|
|
49
|
+
background: {
|
|
50
50
|
default: string;
|
|
51
51
|
pressed: string;
|
|
52
52
|
disabled: string;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
foreground: {
|
|
55
55
|
default: string;
|
|
56
56
|
pressed: string;
|
|
57
57
|
disabled: string;
|
|
@@ -70,6 +70,9 @@ const IOButtonStylesLocal = StyleSheet.create({
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated Use `Button` with variant `outline` instead
|
|
75
|
+
*/
|
|
73
76
|
export const ButtonOutline = forwardRef<View, ButtonOutline>(
|
|
74
77
|
(
|
|
75
78
|
{
|
|
@@ -100,28 +103,28 @@ export const ButtonOutline = forwardRef<View, ButtonOutline>(
|
|
|
100
103
|
> = {
|
|
101
104
|
// Primary button
|
|
102
105
|
primary: {
|
|
103
|
-
foreground: {
|
|
104
|
-
default: IOColors[theme["interactiveElem-default"]],
|
|
105
|
-
pressed: IOColors[theme["interactiveElem-pressed"]],
|
|
106
|
-
disabled: IOColors[theme["interactiveOutline-disabled"]]
|
|
107
|
-
},
|
|
108
106
|
background: {
|
|
109
107
|
default: hexToRgba(IOColors[theme["interactiveElem-pressed"]], 0),
|
|
110
108
|
pressed: hexToRgba(IOColors[theme["interactiveElem-pressed"]], 0.1),
|
|
111
109
|
disabled: "transparent"
|
|
110
|
+
},
|
|
111
|
+
foreground: {
|
|
112
|
+
default: IOColors[theme["interactiveElem-default"]],
|
|
113
|
+
pressed: IOColors[theme["interactiveElem-pressed"]],
|
|
114
|
+
disabled: IOColors[theme["interactiveOutline-disabled"]]
|
|
112
115
|
}
|
|
113
116
|
},
|
|
114
117
|
// Contrast button
|
|
115
118
|
contrast: {
|
|
116
|
-
foreground: {
|
|
117
|
-
default: IOColors.white,
|
|
118
|
-
pressed: IOColors.white,
|
|
119
|
-
disabled: IOColors["blueIO-200"]
|
|
120
|
-
},
|
|
121
119
|
background: {
|
|
122
120
|
default: hexToRgba(IOColors["blueIO-600"], 0),
|
|
123
121
|
pressed: hexToRgba(IOColors["blueIO-600"], 0.5),
|
|
124
122
|
disabled: "transparent"
|
|
123
|
+
},
|
|
124
|
+
foreground: {
|
|
125
|
+
default: IOColors.white,
|
|
126
|
+
pressed: IOColors.white,
|
|
127
|
+
disabled: IOColors["blueIO-200"]
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
};
|
|
@@ -176,27 +179,24 @@ export const ButtonOutline = forwardRef<View, ButtonOutline>(
|
|
|
176
179
|
)
|
|
177
180
|
}));
|
|
178
181
|
|
|
179
|
-
const AnimatedIconClassComponent =
|
|
180
|
-
Animated.createAnimatedComponent(IconClassComponent);
|
|
181
|
-
|
|
182
182
|
return (
|
|
183
183
|
<Pressable
|
|
184
184
|
ref={ref}
|
|
185
|
+
accessible={true}
|
|
185
186
|
accessibilityLabel={accessibilityLabel || label}
|
|
186
187
|
accessibilityHint={accessibilityHint}
|
|
187
188
|
accessibilityRole={"button"}
|
|
188
189
|
accessibilityState={{ disabled: disabled || false }}
|
|
189
|
-
testID={testID}
|
|
190
190
|
onPress={onPress}
|
|
191
191
|
onPressIn={onPressIn}
|
|
192
192
|
onPressOut={onPressOut}
|
|
193
|
-
accessible={true}
|
|
194
193
|
disabled={disabled}
|
|
195
194
|
style={
|
|
196
195
|
fullWidth
|
|
197
196
|
? { flexShrink: 0, alignSelf: "stretch" }
|
|
198
197
|
: { flexShrink: 1, alignSelf: "auto" }
|
|
199
198
|
}
|
|
199
|
+
testID={testID}
|
|
200
200
|
>
|
|
201
201
|
<Animated.View
|
|
202
202
|
style={[
|
|
@@ -224,7 +224,7 @@ export const ButtonOutline = forwardRef<View, ButtonOutline>(
|
|
|
224
224
|
>
|
|
225
225
|
{icon &&
|
|
226
226
|
(!disabled ? (
|
|
227
|
-
<
|
|
227
|
+
<AnimatedIconWithColorTransition
|
|
228
228
|
allowFontScaling
|
|
229
229
|
name={icon}
|
|
230
230
|
animatedProps={pressedColorIconAnimationStyle}
|
|
@@ -249,7 +249,7 @@ export const ButtonOutline = forwardRef<View, ButtonOutline>(
|
|
|
249
249
|
numberOfLines={1}
|
|
250
250
|
ellipsizeMode="tail"
|
|
251
251
|
style={[
|
|
252
|
-
|
|
252
|
+
{ alignSelf: "center" },
|
|
253
253
|
disabled
|
|
254
254
|
? { color: mapColorStates[color]?.foreground?.disabled }
|
|
255
255
|
: { ...pressedColorLabelAnimationStyle }
|
|
@@ -78,6 +78,9 @@ export type ButtonSolidProps = WithTestID<
|
|
|
78
78
|
>
|
|
79
79
|
>;
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated Use `Button` with variant `solid` instead
|
|
83
|
+
*/
|
|
81
84
|
export const ButtonSolid = forwardRef<View, ButtonSolidProps>(
|
|
82
85
|
(
|
|
83
86
|
{
|
|
@@ -235,7 +238,7 @@ export const ButtonSolid = forwardRef<View, ButtonSolidProps>(
|
|
|
235
238
|
}
|
|
236
239
|
exiting={exitTransitionInnerContent}
|
|
237
240
|
>
|
|
238
|
-
<LoadingSpinner color={foregroundColor} />
|
|
241
|
+
<LoadingSpinner color={IOColors[foregroundColor]} />
|
|
239
242
|
</Animated.View>
|
|
240
243
|
)}
|
|
241
244
|
|