@pagopa/io-app-design-system 1.3.1 → 1.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 +1 -0
- package/lib/commonjs/components/accordion/AccordionItem.js +137 -0
- package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -0
- package/lib/commonjs/components/accordion/index.js +4 -4
- package/lib/commonjs/components/accordion/index.js.map +1 -1
- package/lib/commonjs/components/common/LogoPaymentWithFallback.js +49 -0
- package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +47 -29
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/pictograms/svg/PictogramFocusOn.js +6 -6
- package/lib/commonjs/components/pictograms/svg/PictogramFocusOn.js.map +1 -1
- package/lib/commonjs/components/{accordion/IOAccordion.js → textInput/TextInput.js} +5 -27
- package/lib/commonjs/components/textInput/TextInput.js.map +1 -0
- package/lib/commonjs/components/textInput/TextInputBase.js +233 -0
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -0
- package/lib/commonjs/components/textInput/TextInputPassword.js +36 -0
- package/lib/commonjs/components/textInput/TextInputPassword.js.map +1 -0
- package/lib/commonjs/components/textInput/TextInputValidation.js +57 -0
- package/lib/commonjs/components/textInput/TextInputValidation.js.map +1 -0
- package/lib/commonjs/components/textInput/index.js +39 -0
- package/lib/commonjs/components/textInput/index.js.map +1 -0
- package/lib/commonjs/core/IOAnimations.js +5 -0
- package/lib/commonjs/core/IOAnimations.js.map +1 -1
- package/lib/commonjs/core/IOShapes.js +3 -1
- package/lib/commonjs/core/IOShapes.js.map +1 -1
- package/lib/commonjs/utils/accessibility.js +19 -0
- package/lib/commonjs/utils/accessibility.js.map +1 -0
- package/lib/commonjs/utils/object.js +16 -0
- package/lib/commonjs/utils/object.js.map +1 -0
- package/lib/commonjs/utils/textInput/index.js +24 -0
- package/lib/commonjs/utils/textInput/index.js.map +1 -0
- package/lib/commonjs/utils/url.js +14 -0
- package/lib/commonjs/utils/url.js.map +1 -0
- package/lib/module/components/accordion/AccordionItem.js +126 -0
- package/lib/module/components/accordion/AccordionItem.js.map +1 -0
- package/lib/module/components/accordion/index.js +1 -1
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/common/LogoPaymentWithFallback.js +40 -0
- package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +48 -30
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/pictograms/svg/PictogramFocusOn.js +7 -7
- package/lib/module/components/pictograms/svg/PictogramFocusOn.js.map +1 -1
- package/lib/module/components/textInput/TextInput.js +4 -0
- package/lib/module/components/textInput/TextInput.js.map +1 -0
- package/lib/module/components/textInput/TextInputBase.js +225 -0
- package/lib/module/components/textInput/TextInputBase.js.map +1 -0
- package/lib/module/components/textInput/TextInputPassword.js +27 -0
- package/lib/module/components/textInput/TextInputPassword.js.map +1 -0
- package/lib/module/components/textInput/TextInputValidation.js +47 -0
- package/lib/module/components/textInput/TextInputValidation.js.map +1 -0
- package/lib/module/components/textInput/index.js +4 -0
- package/lib/module/components/textInput/index.js.map +1 -0
- package/lib/module/core/IOAnimations.js +5 -0
- package/lib/module/core/IOAnimations.js.map +1 -1
- package/lib/module/core/IOShapes.js +1 -0
- package/lib/module/core/IOShapes.js.map +1 -1
- package/lib/module/utils/accessibility.js +10 -0
- package/lib/module/utils/accessibility.js.map +1 -0
- package/lib/module/utils/object.js +7 -0
- package/lib/module/utils/object.js.map +1 -0
- package/lib/module/utils/textInput/index.js +17 -0
- package/lib/module/utils/textInput/index.js.map +1 -0
- package/lib/module/utils/url.js +7 -0
- package/lib/module/utils/url.js.map +1 -0
- package/lib/typescript/components/accordion/AccordionItem.d.ts +14 -0
- package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -0
- package/lib/typescript/components/accordion/index.d.ts +1 -1
- package/lib/typescript/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts +27 -0
- package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts +13 -5
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInput.d.ts +6 -0
- package/lib/typescript/components/textInput/TextInput.d.ts.map +1 -0
- package/lib/typescript/components/textInput/TextInputBase.d.ts +28 -0
- package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -0
- package/lib/typescript/components/textInput/TextInputPassword.d.ts +6 -0
- package/lib/typescript/components/textInput/TextInputPassword.d.ts.map +1 -0
- package/lib/typescript/components/textInput/TextInputValidation.d.ts +9 -0
- package/lib/typescript/components/textInput/TextInputValidation.d.ts.map +1 -0
- package/lib/typescript/components/textInput/index.d.ts +4 -0
- package/lib/typescript/components/textInput/index.d.ts.map +1 -0
- package/lib/typescript/core/IOAnimations.d.ts +5 -0
- package/lib/typescript/core/IOAnimations.d.ts.map +1 -1
- package/lib/typescript/core/IOShapes.d.ts +1 -0
- package/lib/typescript/core/IOShapes.d.ts.map +1 -1
- package/lib/typescript/utils/accessibility.d.ts +6 -0
- package/lib/typescript/utils/accessibility.d.ts.map +1 -0
- package/lib/typescript/utils/object.d.ts +5 -0
- package/lib/typescript/utils/object.d.ts.map +1 -0
- package/lib/typescript/utils/textInput/index.d.ts +9 -0
- package/lib/typescript/utils/textInput/index.d.ts.map +1 -0
- package/lib/typescript/utils/types.d.ts +1 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/lib/typescript/utils/url.d.ts +8 -0
- package/lib/typescript/utils/url.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/accordion/AccordionItem.tsx +165 -0
- package/src/components/accordion/index.tsx +1 -1
- package/src/components/common/LogoPaymentWithFallback.tsx +60 -0
- package/src/components/index.tsx +1 -0
- package/src/components/listitems/ListItemTransaction.tsx +86 -39
- package/src/components/pictograms/svg/PictogramFocusOn.tsx +9 -9
- package/src/components/textInput/TextInput.tsx +15 -0
- package/src/components/textInput/TextInputBase.tsx +327 -0
- package/src/components/textInput/TextInputPassword.tsx +36 -0
- package/src/components/textInput/TextInputValidation.tsx +71 -0
- package/src/components/textInput/index.tsx +3 -0
- package/src/core/IOAnimations.ts +5 -0
- package/src/core/IOShapes.ts +1 -0
- package/src/utils/accessibility.ts +17 -0
- package/src/utils/object.ts +12 -0
- package/src/utils/textInput/index.ts +29 -0
- package/src/utils/types.ts +2 -0
- package/src/utils/url.ts +9 -0
- package/lib/commonjs/components/accordion/IOAccordion.js.map +0 -1
- package/lib/module/components/accordion/IOAccordion.js +0 -26
- package/lib/module/components/accordion/IOAccordion.js.map +0 -1
- package/lib/typescript/components/accordion/IOAccordion.d.ts +0 -13
- package/lib/typescript/components/accordion/IOAccordion.d.ts.map +0 -1
- package/src/components/accordion/IOAccordion.tsx +0 -35
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInputValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInputValidation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,wBAAwB,GAAG,IAAI,CAClC,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAC1C,cAAc,GAAG,QAAQ,GAAG,oBAAoB,GAAG,YAAY,CAChE,GAAG;IACF,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAAW,wBAAwB,sBAsDlE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/index.tsx"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOAnimations.d.ts","sourceRoot":"","sources":["../../../src/core/IOAnimations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"IOAnimations.d.ts","sourceRoot":"","sources":["../../../src/core/IOAnimations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;CAkB1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;CAazB,CAAC"}
|
|
@@ -6,5 +6,6 @@ export declare const IOTagRadius: IORadiusScale;
|
|
|
6
6
|
export declare const IOBottomSheetHeaderRadius: IORadiusScale;
|
|
7
7
|
export declare const IOListItemIDPRadius: IORadiusScale;
|
|
8
8
|
export declare const IOBadgeRadius: IORadiusScale;
|
|
9
|
+
export declare const IOAccordionRadius: IORadiusScale;
|
|
9
10
|
export {};
|
|
10
11
|
//# sourceMappingURL=IOShapes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOShapes.d.ts","sourceRoot":"","sources":["../../../src/core/IOShapes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,yBAA0B,CAAC;AACrD,KAAK,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAOpD,eAAO,MAAM,aAAa,EAAE,aAA+B,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAE,aAA+B,CAAC;AAC7D,eAAO,MAAM,WAAW,EAAE,aAAiB,CAAC;AAC5C,eAAO,MAAM,yBAAyB,EAAE,aAAkB,CAAC;AAC3D,eAAO,MAAM,mBAAmB,EAAE,aAA+B,CAAC;AAClE,eAAO,MAAM,aAAa,EAAE,aAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"IOShapes.d.ts","sourceRoot":"","sources":["../../../src/core/IOShapes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,yBAA0B,CAAC;AACrD,KAAK,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAOpD,eAAO,MAAM,aAAa,EAAE,aAA+B,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAE,aAA+B,CAAC;AAC7D,eAAO,MAAM,WAAW,EAAE,aAAiB,CAAC;AAC5C,eAAO,MAAM,yBAAyB,EAAE,aAAkB,CAAC;AAC3D,eAAO,MAAM,mBAAmB,EAAE,aAA+B,CAAC;AAClE,eAAO,MAAM,aAAa,EAAE,aAAkB,CAAC;AAC/C,eAAO,MAAM,iBAAiB,EAAE,aAA+B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
//# sourceMappingURL=accessibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/utils/accessibility.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,YAAa,MAAM,uBAQpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,wBAAwB;;YAE7B,MAAM,0BAKT,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { TextInputBase } from "../../components/textInput/TextInputBase";
|
|
3
|
+
import { InputType } from "../types";
|
|
4
|
+
type InputProps = Pick<React.ComponentProps<typeof TextInputBase>, "textInputProps"> & {
|
|
5
|
+
valueFormat?: (value: string) => string;
|
|
6
|
+
};
|
|
7
|
+
export declare const getInputPropsByType: (type: InputType) => InputProps | undefined;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/textInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,KAAK,UAAU,GAAG,IAAI,CACpB,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAC1C,gBAAgB,CACjB,GAAG;IACF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,mBAAmB,SACxB,SAAS,KACd,UAAU,GAAG,SAef,CAAC"}
|
|
@@ -25,5 +25,6 @@ type Without<T, U> = {
|
|
|
25
25
|
* Ensure that the types T and U are mutually exclusive
|
|
26
26
|
*/
|
|
27
27
|
export type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
|
28
|
+
export type InputType = "credit-card" | "default";
|
|
28
29
|
export {};
|
|
29
30
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAGvC,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,KAAK,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAExD;;GAEG;AACH,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,MAAM,GACxC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GACzC,CAAC,GAAG,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAGvC,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,KAAK,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAExD;;GAEG;AACH,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,MAAM,GACxC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GACzC,CAAC,GAAG,CAAC,CAAC;AAEV,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ImageURISource } from "react-native";
|
|
2
|
+
/**
|
|
3
|
+
* type guard to check if a value is an ImageURISource
|
|
4
|
+
* @argument value the value to check, can be anything
|
|
5
|
+
* @returns boolean
|
|
6
|
+
*/
|
|
7
|
+
export declare const isImageUri: (value: unknown) => value is ImageURISource;
|
|
8
|
+
//# sourceMappingURL=url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/utils/url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,UAAU,UAAW,OAAO,4BACsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Text,
|
|
4
|
+
View,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
TouchableWithoutFeedback,
|
|
7
|
+
LayoutChangeEvent
|
|
8
|
+
} from "react-native";
|
|
9
|
+
import Animated, {
|
|
10
|
+
useAnimatedStyle,
|
|
11
|
+
withSpring
|
|
12
|
+
} from "react-native-reanimated";
|
|
13
|
+
import LinearGradient from "react-native-linear-gradient";
|
|
14
|
+
import { IOAccordionRadius, type IOSpacingScale } from "../../core";
|
|
15
|
+
import { makeFontStyleObject } from "../../utils/fonts";
|
|
16
|
+
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
17
|
+
import { H6 } from "../typography";
|
|
18
|
+
import { IOSpringValues } from "../../core/IOAnimations";
|
|
19
|
+
import { Icon } from "../icons/Icon";
|
|
20
|
+
|
|
21
|
+
export type AccordionItem = {
|
|
22
|
+
id: number;
|
|
23
|
+
title: string;
|
|
24
|
+
body: string | React.ReactNode;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type AccordionBody = {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
expanded: boolean;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const accordionBodySpacing: IOSpacingScale = 16;
|
|
33
|
+
const accordionIconMargin: IOSpacingScale = 8;
|
|
34
|
+
const accordionBorder: IOColors = "grey-200";
|
|
35
|
+
const accordionBackground: IOColors = "white";
|
|
36
|
+
|
|
37
|
+
/* The code below is a re-adaptation of Dima Portenko's code:
|
|
38
|
+
https://github.com/dimaportenko/reanimated-collapsable-card-tutorial
|
|
39
|
+
*/
|
|
40
|
+
export const AccordionBody = ({ children, expanded }: AccordionBody) => {
|
|
41
|
+
const [height, setHeight] = useState(0);
|
|
42
|
+
|
|
43
|
+
const onLayout = (event: LayoutChangeEvent) => {
|
|
44
|
+
const { height: onLayoutHeight } = event.nativeEvent.layout;
|
|
45
|
+
|
|
46
|
+
if (onLayoutHeight > 0 && height !== onLayoutHeight) {
|
|
47
|
+
setHeight(onLayoutHeight);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const animatedHeightStyle = useAnimatedStyle(
|
|
52
|
+
() => ({
|
|
53
|
+
height: expanded
|
|
54
|
+
? withSpring(height, IOSpringValues.accordion)
|
|
55
|
+
: withSpring(0, IOSpringValues.accordion)
|
|
56
|
+
}),
|
|
57
|
+
[expanded]
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Animated.View
|
|
62
|
+
style={[animatedHeightStyle, styles.accordionCollapsableContainer]}
|
|
63
|
+
>
|
|
64
|
+
<View style={styles.accordionBodyContainer} onLayout={onLayout}>
|
|
65
|
+
{children}
|
|
66
|
+
</View>
|
|
67
|
+
</Animated.View>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const AccordionItem = ({ title, body }: AccordionItem) => {
|
|
72
|
+
const [expanded, setExpanded] = useState(false);
|
|
73
|
+
|
|
74
|
+
const onItemPress = () => {
|
|
75
|
+
setExpanded(!expanded);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const animatedChevron = useAnimatedStyle(
|
|
79
|
+
() => ({
|
|
80
|
+
transform: [
|
|
81
|
+
{
|
|
82
|
+
rotate: expanded
|
|
83
|
+
? withSpring(`180deg`, IOSpringValues.accordion)
|
|
84
|
+
: withSpring(`0deg`, IOSpringValues.accordion)
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}),
|
|
88
|
+
[expanded]
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<View style={styles.accordionWrapper}>
|
|
93
|
+
<TouchableWithoutFeedback
|
|
94
|
+
accessible={true}
|
|
95
|
+
accessibilityRole="button"
|
|
96
|
+
accessibilityState={{ expanded }}
|
|
97
|
+
onPress={onItemPress}
|
|
98
|
+
>
|
|
99
|
+
<View style={styles.textContainer}>
|
|
100
|
+
<View style={{ flexShrink: 1, marginRight: accordionIconMargin }}>
|
|
101
|
+
<H6 color="black">{title}</H6>
|
|
102
|
+
</View>
|
|
103
|
+
<Animated.View style={animatedChevron}>
|
|
104
|
+
<Icon name="chevronBottom" color="blueIO-500" />
|
|
105
|
+
</Animated.View>
|
|
106
|
+
</View>
|
|
107
|
+
</TouchableWithoutFeedback>
|
|
108
|
+
|
|
109
|
+
<AccordionBody expanded={expanded}>
|
|
110
|
+
{typeof body === "string" ? (
|
|
111
|
+
<Text style={styles.accordionBodyText}>{body}</Text>
|
|
112
|
+
) : (
|
|
113
|
+
body
|
|
114
|
+
)}
|
|
115
|
+
</AccordionBody>
|
|
116
|
+
{/* This gradient adds a smooth end to the content. If it is missing,
|
|
117
|
+
the content will be cut sharply during the height transition. */}
|
|
118
|
+
<LinearGradient
|
|
119
|
+
style={{
|
|
120
|
+
height: accordionBodySpacing,
|
|
121
|
+
position: "absolute",
|
|
122
|
+
// Place at the bottom
|
|
123
|
+
bottom: 0,
|
|
124
|
+
// Avoid gradient overlaps with border radius
|
|
125
|
+
left: accordionBodySpacing,
|
|
126
|
+
right: accordionBodySpacing
|
|
127
|
+
}}
|
|
128
|
+
colors={[
|
|
129
|
+
hexToRgba(IOColors[accordionBackground], 0),
|
|
130
|
+
IOColors[accordionBackground]
|
|
131
|
+
]}
|
|
132
|
+
/>
|
|
133
|
+
</View>
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const styles = StyleSheet.create({
|
|
138
|
+
accordionWrapper: {
|
|
139
|
+
borderColor: IOColors[accordionBorder],
|
|
140
|
+
borderWidth: 1,
|
|
141
|
+
borderRadius: IOAccordionRadius,
|
|
142
|
+
backgroundColor: IOColors[accordionBackground]
|
|
143
|
+
},
|
|
144
|
+
accordionCollapsableContainer: {
|
|
145
|
+
overflow: "hidden"
|
|
146
|
+
},
|
|
147
|
+
accordionBodyContainer: {
|
|
148
|
+
position: "absolute",
|
|
149
|
+
padding: accordionBodySpacing,
|
|
150
|
+
paddingTop: 0
|
|
151
|
+
},
|
|
152
|
+
accordionBodyText: {
|
|
153
|
+
fontSize: 14,
|
|
154
|
+
lineHeight: 21,
|
|
155
|
+
color: IOColors["grey-700"],
|
|
156
|
+
...makeFontStyleObject("Regular", undefined, "TitilliumWeb")
|
|
157
|
+
},
|
|
158
|
+
textContainer: {
|
|
159
|
+
padding: accordionBodySpacing,
|
|
160
|
+
flexGrow: 1,
|
|
161
|
+
flexDirection: "row",
|
|
162
|
+
alignItems: "center",
|
|
163
|
+
justifyContent: "space-between"
|
|
164
|
+
}
|
|
165
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./RawAccordion";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./AccordionItem";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as O from "fp-ts/lib/Option";
|
|
2
|
+
import { pipe } from "fp-ts/lib/function";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { findFirstCaseInsensitive } from "../../utils/object";
|
|
5
|
+
import { IOColors } from "../../core";
|
|
6
|
+
import { IOIconSizeScale, Icon } from "../icons";
|
|
7
|
+
import {
|
|
8
|
+
IOLogoPaymentExtType,
|
|
9
|
+
IOLogoPaymentType,
|
|
10
|
+
IOPaymentExtLogos,
|
|
11
|
+
IOPaymentLogos,
|
|
12
|
+
LogoPayment,
|
|
13
|
+
LogoPaymentExt
|
|
14
|
+
} from "../logos";
|
|
15
|
+
|
|
16
|
+
export type LogoPaymentWithFallback = {
|
|
17
|
+
brand?: string;
|
|
18
|
+
fallbackIconColor?: IOColors;
|
|
19
|
+
size?: IOIconSizeScale;
|
|
20
|
+
isExtended?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type LogoPaymentExtOrDefaultIconProps = {
|
|
23
|
+
cardIcon?: IOLogoPaymentExtType;
|
|
24
|
+
fallbackIconColor?: IOColors;
|
|
25
|
+
size?: IOIconSizeScale;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* This component renders either
|
|
29
|
+
* - a LogoPayment/LogoPaymentExt component
|
|
30
|
+
* - a default credit card icon
|
|
31
|
+
* @param cardIcon: IOLogoPaymentType icon
|
|
32
|
+
* @param size: the size of the icon (standard is 24/48)
|
|
33
|
+
* @param fallbackIconColor: default icon color (standard is grey-700)
|
|
34
|
+
* @param isExtended: if true, renders a LogoPaymentExt component
|
|
35
|
+
* @returns a LogoPayment/LogopaymentExt component if the cardIcon is supported, a default credit card icon otherwise
|
|
36
|
+
*/
|
|
37
|
+
export const LogoPaymentWithFallback = ({
|
|
38
|
+
brand,
|
|
39
|
+
fallbackIconColor = "grey-700",
|
|
40
|
+
isExtended = false,
|
|
41
|
+
size = isExtended ? 48 : 24
|
|
42
|
+
}: LogoPaymentWithFallback) => {
|
|
43
|
+
const logos = isExtended ? IOPaymentExtLogos : IOPaymentLogos;
|
|
44
|
+
|
|
45
|
+
return pipe(
|
|
46
|
+
brand,
|
|
47
|
+
O.fromNullable,
|
|
48
|
+
O.chain(findFirstCaseInsensitive(logos)),
|
|
49
|
+
O.map(([brand]) => brand),
|
|
50
|
+
O.fold(
|
|
51
|
+
() => <Icon name="creditCard" size={size} color={fallbackIconColor} />,
|
|
52
|
+
brand =>
|
|
53
|
+
isExtended ? (
|
|
54
|
+
<LogoPaymentExt name={brand as IOLogoPaymentExtType} size={size} />
|
|
55
|
+
) : (
|
|
56
|
+
<LogoPayment name={brand as IOLogoPaymentType} size={size} />
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
};
|
package/src/components/index.tsx
CHANGED
|
@@ -3,19 +3,25 @@ import { pipe } from "fp-ts/lib/function";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { ImageURISource, StyleSheet, View } from "react-native";
|
|
5
5
|
import Placeholder from "rn-placeholder";
|
|
6
|
+
|
|
6
7
|
import {
|
|
7
8
|
IOColors,
|
|
9
|
+
IOListItemLogoMargin,
|
|
8
10
|
IOListItemStyles,
|
|
9
11
|
IOListItemVisualParams,
|
|
10
12
|
IOStyles,
|
|
11
13
|
IOVisualCostants,
|
|
12
14
|
useIOTheme
|
|
13
15
|
} from "../../core";
|
|
16
|
+
|
|
17
|
+
import { LogoPaymentWithFallback } from "../common/LogoPaymentWithFallback";
|
|
18
|
+
import { isImageUri } from "../../utils/url";
|
|
14
19
|
import { WithTestID } from "../../utils/types";
|
|
20
|
+
import { getAccessibleAmountText } from "../../utils/accessibility";
|
|
15
21
|
import { Avatar } from "../avatar/Avatar";
|
|
16
22
|
import { Badge } from "../badge/Badge";
|
|
17
|
-
import { Icon } from "../icons";
|
|
18
|
-
import { IOLogoPaymentType
|
|
23
|
+
import { IOIconSizeScale, Icon } from "../icons";
|
|
24
|
+
import { IOLogoPaymentType } from "../logos";
|
|
19
25
|
import { VSpacer } from "../spacer";
|
|
20
26
|
import { H6, LabelSmall } from "../typography";
|
|
21
27
|
import {
|
|
@@ -23,103 +29,144 @@ import {
|
|
|
23
29
|
PressableListItemBase
|
|
24
30
|
} from "./PressableListItemsBase";
|
|
25
31
|
|
|
26
|
-
type
|
|
32
|
+
export type ListItemTransactionStatus =
|
|
33
|
+
| "success"
|
|
34
|
+
| "failure"
|
|
35
|
+
| "pending"
|
|
36
|
+
| "cancelled"
|
|
37
|
+
| "refunded"
|
|
38
|
+
| "reversal";
|
|
39
|
+
|
|
40
|
+
type PaymentLogoIcon = IOLogoPaymentType | ImageURISource | React.ReactNode;
|
|
41
|
+
|
|
27
42
|
export type ListItemTransaction = WithTestID<
|
|
28
43
|
PressableBaseProps & {
|
|
29
44
|
hasChevronRight?: boolean;
|
|
30
45
|
isLoading?: boolean;
|
|
31
|
-
|
|
46
|
+
/**
|
|
47
|
+
* A logo that will be displayed on the left of the list item.
|
|
48
|
+
*
|
|
49
|
+
* Must be a {@link IOLogoPaymentType} or an {@link ImageURISource} or an {@link Icon}.
|
|
50
|
+
*/
|
|
51
|
+
paymentLogoIcon?: PaymentLogoIcon;
|
|
32
52
|
subtitle: string;
|
|
33
53
|
title: string;
|
|
34
54
|
} & (
|
|
35
55
|
| {
|
|
36
|
-
transactionStatus: "success";
|
|
56
|
+
transactionStatus: "success" | "refunded";
|
|
57
|
+
badgeText?: string;
|
|
37
58
|
transactionAmount: string;
|
|
38
59
|
}
|
|
39
60
|
| {
|
|
40
|
-
transactionStatus: "failure" | "pending";
|
|
61
|
+
transactionStatus: "failure" | "pending" | "cancelled" | "reversal";
|
|
62
|
+
badgeText: string;
|
|
41
63
|
transactionAmount?: string;
|
|
42
64
|
}
|
|
43
65
|
)
|
|
44
66
|
>;
|
|
45
67
|
|
|
46
68
|
type LeftComponentProps = {
|
|
47
|
-
|
|
69
|
+
logoIcon: PaymentLogoIcon;
|
|
48
70
|
};
|
|
49
71
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
const CARD_LOGO_SIZE: IOIconSizeScale = 24;
|
|
73
|
+
const MUNICIPALITY_LOGO_SIZE = 44;
|
|
74
|
+
// this is the <Avatar/>'s "small" size,
|
|
75
|
+
// since it is bigger than the card logos, we use
|
|
76
|
+
// it as a base size for homogeneous sizing via container size.
|
|
54
77
|
|
|
55
|
-
const LeftComponent = ({
|
|
56
|
-
if (
|
|
57
|
-
return <Avatar
|
|
58
|
-
} else {
|
|
59
|
-
return (
|
|
60
|
-
<View
|
|
61
|
-
style={{
|
|
62
|
-
width: IOVisualCostants.avatarSizeSmall,
|
|
63
|
-
height: IOVisualCostants.avatarSizeSmall,
|
|
64
|
-
alignItems: "center",
|
|
65
|
-
justifyContent: "center"
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
68
|
-
<LogoPayment name={logoNameOrUrl} />
|
|
69
|
-
</View>
|
|
70
|
-
);
|
|
78
|
+
const LeftComponent = ({ logoIcon }: LeftComponentProps) => {
|
|
79
|
+
if (isImageUri(logoIcon)) {
|
|
80
|
+
return <Avatar logoUri={[logoIcon]} size="small" shape="circle" />;
|
|
71
81
|
}
|
|
82
|
+
if (React.isValidElement(logoIcon)) {
|
|
83
|
+
return <>{logoIcon}</>;
|
|
84
|
+
}
|
|
85
|
+
return (
|
|
86
|
+
<LogoPaymentWithFallback
|
|
87
|
+
brand={logoIcon as IOLogoPaymentType}
|
|
88
|
+
size={CARD_LOGO_SIZE}
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
72
91
|
};
|
|
73
92
|
|
|
74
93
|
export const ListItemTransaction = ({
|
|
75
94
|
accessibilityLabel,
|
|
76
95
|
hasChevronRight = false,
|
|
77
96
|
isLoading = false,
|
|
78
|
-
|
|
97
|
+
paymentLogoIcon,
|
|
79
98
|
onPress,
|
|
80
99
|
subtitle,
|
|
81
100
|
testID,
|
|
82
101
|
title,
|
|
83
102
|
transactionAmount,
|
|
103
|
+
badgeText,
|
|
84
104
|
transactionStatus = "success"
|
|
85
105
|
}: ListItemTransaction) => {
|
|
86
106
|
const theme = useIOTheme();
|
|
87
107
|
|
|
108
|
+
const maybeBadgeText = pipe(
|
|
109
|
+
badgeText,
|
|
110
|
+
O.fromNullable,
|
|
111
|
+
O.getOrElse(() => "-")
|
|
112
|
+
);
|
|
113
|
+
|
|
88
114
|
if (isLoading) {
|
|
89
115
|
return <SkeletonComponent />;
|
|
90
116
|
}
|
|
91
117
|
|
|
92
|
-
const designSystemBlue: IOColors = "
|
|
118
|
+
const designSystemBlue: IOColors = "blueIO-500";
|
|
93
119
|
const ListItemTransactionContent = () => {
|
|
94
120
|
const TransactionAmountOrBadgeComponent = () => {
|
|
95
121
|
switch (transactionStatus) {
|
|
96
122
|
case "success":
|
|
97
123
|
return (
|
|
98
|
-
<H6
|
|
99
|
-
{transactionAmount
|
|
124
|
+
<H6
|
|
125
|
+
accessibilityLabel={getAccessibleAmountText(transactionAmount)}
|
|
126
|
+
color={hasChevronRight ? designSystemBlue : "black"}
|
|
127
|
+
>
|
|
128
|
+
{transactionAmount || ""}
|
|
129
|
+
</H6>
|
|
130
|
+
);
|
|
131
|
+
case "refunded":
|
|
132
|
+
return (
|
|
133
|
+
<H6
|
|
134
|
+
accessibilityLabel={getAccessibleAmountText(transactionAmount)}
|
|
135
|
+
color={hasChevronRight ? designSystemBlue : "success-700"}
|
|
136
|
+
>
|
|
137
|
+
{transactionAmount || ""}
|
|
100
138
|
</H6>
|
|
101
139
|
);
|
|
102
|
-
|
|
103
140
|
case "failure":
|
|
104
|
-
|
|
141
|
+
case "cancelled":
|
|
142
|
+
return <Badge variant="error" text={maybeBadgeText} />;
|
|
143
|
+
case "reversal":
|
|
144
|
+
return <Badge variant="lightBlue" text={maybeBadgeText} />;
|
|
105
145
|
case "pending":
|
|
106
|
-
return <Badge variant="info" text={
|
|
146
|
+
return <Badge variant="info" text={maybeBadgeText} />;
|
|
107
147
|
}
|
|
108
148
|
};
|
|
109
149
|
|
|
110
150
|
return (
|
|
111
151
|
<>
|
|
112
|
-
{
|
|
113
|
-
<View
|
|
114
|
-
|
|
152
|
+
{paymentLogoIcon && (
|
|
153
|
+
<View
|
|
154
|
+
style={{
|
|
155
|
+
marginRight: IOListItemLogoMargin,
|
|
156
|
+
width: MUNICIPALITY_LOGO_SIZE,
|
|
157
|
+
alignItems: "center"
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<LeftComponent logoIcon={paymentLogoIcon} />
|
|
115
161
|
</View>
|
|
116
162
|
)}
|
|
117
163
|
<View style={IOStyles.flex}>
|
|
118
|
-
<
|
|
164
|
+
<LabelSmall numberOfLines={2} color={theme["textBody-default"]}>
|
|
165
|
+
{title}
|
|
166
|
+
</LabelSmall>
|
|
119
167
|
<LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
120
168
|
{subtitle}
|
|
121
169
|
</LabelSmall>
|
|
122
|
-
<VSpacer size={4} />
|
|
123
170
|
</View>
|
|
124
171
|
<View style={Styles.rightSection}>
|
|
125
172
|
<TransactionAmountOrBadgeComponent />
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Svg, Path, G, Defs } from "react-native-svg";
|
|
2
|
+
import { Svg, Path, G, Defs, ClipPath } from "react-native-svg";
|
|
3
3
|
import { SVGPictogramProps } from "../Pictogram";
|
|
4
4
|
|
|
5
5
|
const PictogramFocusOn = ({ size, color, ...props }: SVGPictogramProps) => (
|
|
6
6
|
<Svg fill="none" width={size} height={size} viewBox="0 0 80 80" {...props}>
|
|
7
|
-
<G
|
|
7
|
+
<G clipPath="url(#a)">
|
|
8
8
|
<Path
|
|
9
9
|
fill="#AAEEEF"
|
|
10
|
-
|
|
10
|
+
fillRule="evenodd"
|
|
11
11
|
d="M37.0385 36.6024c2.6444-3.4677 4.2148-7.7986 4.2148-12.4963 0-11.3918-9.2348-20.62667-20.6266-20.62667C9.23488 3.47943 0 12.7143 0 24.1061s9.23488 20.6267 20.6267 20.6267c4.4277 0 8.5295-1.3951 11.89-3.7697l-1.5767-.6757-.7113-1.4226V37.798l1.6004-.8891 5.2094-.3065Z"
|
|
12
|
-
|
|
12
|
+
clipRule="evenodd"
|
|
13
13
|
/>
|
|
14
14
|
<Path
|
|
15
15
|
fill="#00C5CA"
|
|
16
16
|
d="M20.5295 29.5c-.3443 0-.6293-.2724-.651-.6222l-.1207-1.9419c-.0817-1.313.7858-2.4577 1.9653-2.995.1316-.0599.2599-.1217.3849-.1853.7403-.3871 1.3506-.825 1.8308-1.3139.4801-.4889.8303-1.0389 1.0504-1.65.2401-.6111.3601-1.263.3601-1.9556 0-.7741-.1801-1.487-.5402-2.1389-.3601-.6518-.8904-1.1815-1.5906-1.5889-.6803-.4074-1.4906-.6111-2.431-.6111-.7203 0-1.4105.1426-2.0708.4278-.6403.2648-1.2305.6824-1.7707 1.2528-.3548.389-.6724.8538-.9527 1.3945-.2058.3968-.7123.5401-1.0638.2693-.244-.188-.3347-.5216-.2013-.802.3663-.7697.8154-1.4338 1.3475-1.9924.6402-.6722 1.3605-1.1815 2.1608-1.5278.8203-.3463 1.6907-.5194 2.611-.5194 1.2005 0 2.2609.2648 3.1813.7944.9404.5093 1.6706 1.2019 2.1909 2.0778.5202.8759.7803 1.8537.7803 2.9334 0 1.0388-.2401 2.0064-.7203 2.9027-.4602.876-1.1105 1.65-1.9508 2.3223-.4332.336-.9062.6314-1.4191.8862-.8979.4461-1.5879 1.2888-1.6416 2.3045l-.0873 1.6503c-.0186.3524-.3048.6284-.6514.6284Zm-1.1826 4.125c0-.4278.1101-.7741.3302-1.0389.2201-.2648.5202-.3972.9003-.3972.4002 0 .7003.1222.9004.3667.2201.2444.3301.6009.3301 1.0694 0 .387-.11.713-.3301.9778-.2201.2648-.5202.3972-.9004.3972-.4001 0-.7103-.1222-.9303-.3667-.2001-.2444-.3002-.5805-.3002-1.0083Z"
|
|
17
17
|
/>
|
|
18
|
-
<G fill="#0B3EE3"
|
|
18
|
+
<G fill="#0B3EE3" clipPath="url(#b)">
|
|
19
19
|
<Path d="M57.8921 36.9438c.0571.1885.4071.7038.5898.7809 2.0276 2.5853 9.2849 6.7823 22.9454 4.3214v-1.6532c-9.4293 2.1222-15.7294.5002-19.2706-1.5552-2.2284-1.2935-3.3109-3.7543-4.2552-6.1516-1.3778-3.4978-3.5629-7.8791-5.8681-8.0139-.5196-.0371-1.5274.1142-2.1613 1.459-1.1106 2.3441-.6024 7.4292.8109 10.2245-3.7688-.2599-14.2127-.8937-18.4212-.2713-2.581.3798-2.6324 1.8559-2.5867 2.2984.3112 3.0265 6.2584 4.6512 11.015 4.6826-.4796.9907-.9308 2.4925-.2455 3.903.9878 2.0301 3.9743 3.0751 8.8765 3.1036h.0342c1.3591 0 2.5754-.4483 3.4376-1.262 1.0535-.9993 1.1934-2.2356.3826-3.392-.8908-1.2705-2.4554-2.0014-4.1342-1.9615-1.3105.0314-2.6124.3398-3.8715.9108l.5567 1.2249c1.0907-.4968 2.2184-.7623 3.3462-.7909 1.2648-.0342 2.3669.4883 2.9979 1.3876.4282.6082.3654 1.0993-.2056 1.6418-.6082.5739-1.4989.8908-2.5097.8908h-.0285c-5.4076-.0314-7.1549-1.2905-7.6688-2.3413-.768-1.5732.7566-3.5889.7737-3.6089.1599-.2085.1827-.4911.06-.7252-.1228-.2313-.3712-.3712-.6339-.3569-6.8779.3911-10.718-2.2328-10.8436-3.4406-.0457-.4482.7166-.7223 1.4446-.8308 4.9194-.7252 19.3377.3683 19.4833.3797.294.0286.5367-.1285.6566-.3769.12-.2512.0771-.5482-.1113-.7509-1.6246-1.7588-2.4611-7.7176-1.399-9.9617.336-.7117.7084-.6971.8601-.6912l.005.0002c1.8672.1085 4.5967 6.4556 5.9386 10.9268Z" />
|
|
20
20
|
<Path d="M48.1249 55.006c-.7652 0-1.5875-.0343-2.4697-.0999-2.1556-.1656-3.5146-.8623-4.0457-2.0758-.8993-2.0614 1.0593-4.6197 1.2848-4.9052l1.0536.8366c-.474.5996-1.5989 2.4041-1.1078 3.5319.394.8965 1.8015 1.1849 2.9122 1.2705 3.98.3055 6.6381-.1028 7.9229-1.2049.5425-.4654.8337-1.0621.8908-1.8216l1.3419.0999c-.0828 1.1164-.5396 2.0387-1.3562 2.741-1.2677 1.0907-3.3833 1.6275-6.4325 1.6275h.0057Z" />
|
|
21
21
|
<Path d="M80.8936 54.09c-11.9529 4.5537-21.8188.2965-26.3249-1.6009l-.8894 1.0673c10.6723 5.5142 21.2853 4.1505 27.2143 2.1345V54.09Z" />
|
|
22
22
|
</G>
|
|
23
23
|
</G>
|
|
24
24
|
<Defs>
|
|
25
|
-
<
|
|
25
|
+
<ClipPath id="a">
|
|
26
26
|
<Path fill="#fff" d="M0 0h80v80H0z" />
|
|
27
|
-
</
|
|
28
|
-
<
|
|
27
|
+
</ClipPath>
|
|
28
|
+
<ClipPath id="b">
|
|
29
29
|
<Path
|
|
30
30
|
fill="#fff"
|
|
31
31
|
d="M0 0h52v44.6667H0z"
|
|
32
32
|
transform="translate(29.6666 24.6667)"
|
|
33
33
|
/>
|
|
34
|
-
</
|
|
34
|
+
</ClipPath>
|
|
35
35
|
</Defs>
|
|
36
36
|
</Svg>
|
|
37
37
|
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { TextInputBase } from "./TextInputBase";
|
|
3
|
+
|
|
4
|
+
type TextInputProps = Omit<
|
|
5
|
+
React.ComponentProps<typeof TextInputBase>,
|
|
6
|
+
| "rightElement"
|
|
7
|
+
| "status"
|
|
8
|
+
| "bottomMessageColor"
|
|
9
|
+
| "isPassword"
|
|
10
|
+
| "errorMessage"
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
export const TextInput = (props: TextInputProps) => (
|
|
14
|
+
<TextInputBase {...props} />
|
|
15
|
+
);
|