@pagopa/io-app-design-system 1.18.0 → 1.19.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/lib/commonjs/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +110 -0
- package/lib/commonjs/components/Advice/__test__/advice.test.js +9 -0
- package/lib/commonjs/components/Advice/__test__/advice.test.js.map +1 -1
- package/lib/commonjs/components/accordion/AccordionItem.js +25 -9
- package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/avatar/__test__/__snapshots__/avatar.test.tsx.snap +37 -0
- package/lib/commonjs/components/avatar/__test__/avatar.test.js +13 -0
- package/lib/commonjs/components/avatar/__test__/avatar.test.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +46 -0
- package/lib/commonjs/components/badge/__test__/badge.test.js +10 -0
- package/lib/commonjs/components/badge/__test__/badge.test.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +315 -0
- package/lib/commonjs/components/banner/__test__/banner.test.js +15 -0
- package/lib/commonjs/components/banner/__test__/banner.test.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +862 -0
- package/lib/commonjs/components/buttons/__test__/button.test.js +57 -0
- package/lib/commonjs/components/buttons/__test__/button.test.js.map +1 -1
- package/lib/commonjs/components/endOfPage/EndOfPage.js +36 -0
- package/lib/commonjs/components/endOfPage/EndOfPage.js.map +1 -0
- package/lib/commonjs/components/endOfPage/index.js +17 -0
- package/lib/commonjs/components/endOfPage/index.js.map +1 -0
- package/lib/commonjs/components/icons/Icon.js +15 -3
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/svg/IconSystemLocationiOS.js +34 -0
- package/lib/commonjs/components/icons/svg/IconSystemLocationiOS.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconSystemNotificationsInstructions.js +1 -0
- package/lib/commonjs/components/icons/svg/IconSystemNotificationsInstructions.js.map +1 -1
- package/lib/commonjs/components/icons/svg/IconSystemPhotosiOS.js +105 -0
- package/lib/commonjs/components/icons/svg/IconSystemPhotosiOS.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconSystemPrivacyiOS.js +34 -0
- package/lib/commonjs/components/icons/svg/IconSystemPrivacyiOS.js.map +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconSystemLocationiOS.svg +7 -0
- package/lib/commonjs/components/icons/svg/originals/IconSystemNotificationsInstructions.svg +22 -0
- package/lib/commonjs/components/icons/svg/originals/IconSystemPhotosiOS.svg +99 -0
- package/lib/commonjs/components/icons/svg/originals/IconSystemPrivacyiOS.svg +14 -0
- package/lib/commonjs/components/image/Image.js +47 -0
- package/lib/commonjs/components/image/Image.js.map +1 -0
- package/lib/commonjs/components/image/index.js +17 -0
- package/lib/commonjs/components/image/index.js.map +1 -0
- package/lib/commonjs/components/index.js +22 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderSecondLevel.js +9 -3
- package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemHeader.js +4 -3
- package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +4 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +1729 -0
- package/lib/commonjs/components/listitems/__test__/listitem.test.js +83 -3
- package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/commonjs/components/radio/RadioGroup.js +25 -21
- package/lib/commonjs/components/radio/RadioGroup.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +13 -6
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/typography/LabelHeader.js +6 -4
- package/lib/commonjs/components/typography/LabelHeader.js.map +1 -1
- package/lib/commonjs/core/IODSExperimentalContextProvider.js +9 -9
- package/lib/commonjs/core/IODSExperimentalContextProvider.js.map +1 -1
- package/lib/commonjs/utils/testing.js +15 -0
- package/lib/commonjs/utils/testing.js.map +1 -0
- package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +110 -0
- package/lib/module/components/Advice/__test__/advice.test.js +9 -0
- package/lib/module/components/Advice/__test__/advice.test.js.map +1 -1
- package/lib/module/components/accordion/AccordionItem.js +27 -11
- package/lib/module/components/accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/avatar/__test__/__snapshots__/avatar.test.tsx.snap +37 -0
- package/lib/module/components/avatar/__test__/avatar.test.js +13 -0
- package/lib/module/components/avatar/__test__/avatar.test.js.map +1 -1
- package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +46 -0
- package/lib/module/components/badge/__test__/badge.test.js +10 -0
- package/lib/module/components/badge/__test__/badge.test.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +315 -0
- package/lib/module/components/banner/__test__/banner.test.js +15 -0
- package/lib/module/components/banner/__test__/banner.test.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +862 -0
- package/lib/module/components/buttons/__test__/button.test.js +57 -0
- package/lib/module/components/buttons/__test__/button.test.js.map +1 -1
- package/lib/module/components/endOfPage/EndOfPage.js +28 -0
- package/lib/module/components/endOfPage/EndOfPage.js.map +1 -0
- package/lib/module/components/endOfPage/index.js +2 -0
- package/lib/module/components/endOfPage/index.js.map +1 -0
- package/lib/module/components/icons/Icon.js +15 -3
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/svg/IconSystemLocationiOS.js +26 -0
- package/lib/module/components/icons/svg/IconSystemLocationiOS.js.map +1 -0
- package/lib/module/components/icons/svg/IconSystemNotificationsInstructions.js +2 -1
- package/lib/module/components/icons/svg/IconSystemNotificationsInstructions.js.map +1 -1
- package/lib/module/components/icons/svg/IconSystemPhotosiOS.js +97 -0
- package/lib/module/components/icons/svg/IconSystemPhotosiOS.js.map +1 -0
- package/lib/module/components/icons/svg/IconSystemPrivacyiOS.js +26 -0
- package/lib/module/components/icons/svg/IconSystemPrivacyiOS.js.map +1 -0
- package/lib/module/components/icons/svg/originals/IconSystemLocationiOS.svg +7 -0
- package/lib/module/components/icons/svg/originals/IconSystemNotificationsInstructions.svg +22 -0
- package/lib/module/components/icons/svg/originals/IconSystemPhotosiOS.svg +99 -0
- package/lib/module/components/icons/svg/originals/IconSystemPrivacyiOS.svg +14 -0
- package/lib/module/components/image/Image.js +39 -0
- package/lib/module/components/image/Image.js.map +1 -0
- package/lib/module/components/image/index.js +2 -0
- package/lib/module/components/image/index.js.map +1 -0
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/HeaderSecondLevel.js +9 -3
- package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemHeader.js +4 -3
- package/lib/module/components/listitems/ListItemHeader.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js +4 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +1729 -0
- package/lib/module/components/listitems/__test__/listitem.test.js +83 -3
- package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/module/components/radio/RadioGroup.js +25 -21
- package/lib/module/components/radio/RadioGroup.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +13 -6
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/typography/LabelHeader.js +6 -4
- package/lib/module/components/typography/LabelHeader.js.map +1 -1
- package/lib/module/core/IODSExperimentalContextProvider.js +3 -3
- package/lib/module/core/IODSExperimentalContextProvider.js.map +1 -1
- package/lib/module/utils/testing.js +7 -0
- package/lib/module/utils/testing.js.map +1 -0
- package/lib/typescript/components/accordion/AccordionItem.d.ts +3 -1
- package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -1
- package/lib/typescript/components/endOfPage/EndOfPage.d.ts +23 -0
- package/lib/typescript/components/endOfPage/EndOfPage.d.ts.map +1 -0
- package/lib/typescript/components/endOfPage/index.d.ts +2 -0
- package/lib/typescript/components/endOfPage/index.d.ts.map +1 -0
- package/lib/typescript/components/icons/Icon.d.ts +6 -0
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconSystemLocationiOS.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconSystemLocationiOS.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconSystemNotificationsInstructions.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconSystemPhotosiOS.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconSystemPhotosiOS.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconSystemPrivacyiOS.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconSystemPrivacyiOS.d.ts.map +1 -0
- package/lib/typescript/components/image/Image.d.ts +17 -0
- package/lib/typescript/components/image/Image.d.ts.map +1 -0
- package/lib/typescript/components/image/index.d.ts +2 -0
- package/lib/typescript/components/image/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +2 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderSecondLevel.d.ts +10 -4
- package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemHeader.d.ts +2 -2
- package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts +1 -0
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -1
- package/lib/typescript/components/radio/RadioGroup.d.ts +22 -9
- package/lib/typescript/components/radio/RadioGroup.d.ts.map +1 -1
- package/lib/typescript/components/tabs/TabItem.d.ts +2 -1
- package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelHeader.d.ts +1 -1
- package/lib/typescript/components/typography/LabelHeader.d.ts.map +1 -1
- package/lib/typescript/core/IODSExperimentalContextProvider.d.ts +5 -1
- package/lib/typescript/core/IODSExperimentalContextProvider.d.ts.map +1 -1
- package/lib/typescript/utils/testing.d.ts +4 -0
- package/lib/typescript/utils/testing.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +110 -0
- package/src/components/Advice/__test__/advice.test.tsx +10 -0
- package/src/components/accordion/AccordionItem.tsx +33 -13
- package/src/components/avatar/__test__/__snapshots__/avatar.test.tsx.snap +37 -0
- package/src/components/avatar/__test__/avatar.test.tsx +10 -0
- package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +46 -0
- package/src/components/badge/__test__/badge.test.tsx +10 -0
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +315 -0
- package/src/components/banner/__test__/banner.test.tsx +18 -0
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +862 -0
- package/src/components/buttons/__test__/button.test.tsx +77 -1
- package/src/components/endOfPage/EndOfPage.tsx +55 -0
- package/src/components/endOfPage/index.tsx +1 -0
- package/src/components/icons/Icon.tsx +15 -3
- package/src/components/icons/svg/IconSystemLocationiOS.tsx +15 -0
- package/src/components/icons/svg/IconSystemNotificationsInstructions.tsx +2 -1
- package/src/components/icons/svg/IconSystemPhotosiOS.tsx +114 -0
- package/src/components/icons/svg/IconSystemPrivacyiOS.tsx +15 -0
- package/src/components/icons/svg/originals/IconSystemLocationiOS.svg +7 -0
- package/src/components/icons/svg/originals/IconSystemNotificationsInstructions.svg +22 -0
- package/src/components/icons/svg/originals/IconSystemPhotosiOS.svg +99 -0
- package/src/components/icons/svg/originals/IconSystemPrivacyiOS.svg +14 -0
- package/src/components/image/Image.tsx +49 -0
- package/src/components/image/index.tsx +1 -0
- package/src/components/index.tsx +2 -0
- package/src/components/layout/HeaderSecondLevel.tsx +28 -10
- package/src/components/listitems/ListItemHeader.tsx +6 -3
- package/src/components/listitems/ListItemRadioWithAmount.tsx +5 -1
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +1729 -0
- package/src/components/listitems/__test__/listitem.test.tsx +104 -3
- package/src/components/radio/RadioGroup.tsx +61 -11
- package/src/components/tabs/TabItem.tsx +22 -6
- package/src/components/typography/LabelHeader.tsx +11 -6
- package/src/core/IODSExperimentalContextProvider.tsx +3 -3
- package/src/utils/testing.tsx +14 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ComponentProps } from "react";
|
|
2
2
|
import { WithTestID } from "../../utils/types";
|
|
3
|
-
import { IOIcons, Icon } from "../icons";
|
|
4
|
-
import { ButtonLink, IconButton } from "../buttons";
|
|
5
3
|
import { Badge } from "../badge";
|
|
4
|
+
import { ButtonLink, IconButton } from "../buttons";
|
|
5
|
+
import { IOIcons, Icon } from "../icons";
|
|
6
6
|
type ButtonLinkActionProps = {
|
|
7
7
|
type: "buttonLink";
|
|
8
8
|
componentProps: ComponentProps<typeof ButtonLink>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/listitems/ListItemHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAwB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItemHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/listitems/ListItemHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAwB,MAAM,OAAO,CAAC;AASpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGzC,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;CACnD,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;CACnD,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;CAC9C,CAAC;AAEF,KAAK,SAAS,GACV;IACE,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;CAClD,GACD;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;IAAC,SAAS,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE5C,KAAK,eAAe,GAChB,qBAAqB,GACrB,qBAAqB,GACrB,UAAU,CAAC;AAEf,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC,GACA,SAAS,CAAC;AAIZ,eAAO,MAAM,cAAc,2EAOxB,cAAc,sBAsFhB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemRadioWithAmount.d.ts","sourceRoot":"","sources":["../../../../src/components/listitems/ListItemRadioWithAmount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,MAAM,CAAC;CAC/B,GAAG,CACA;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,GACD;IACE,WAAW,EAAE,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CACJ,CAAC;AACF,eAAO,MAAM,uBAAuB,UAC3B,4BAA4B,
|
|
1
|
+
{"version":3,"file":"ListItemRadioWithAmount.d.ts","sourceRoot":"","sources":["../../../../src/components/listitems/ListItemRadioWithAmount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,MAAM,MAAM,4BAA4B,GAAG;IACzC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,MAAM,CAAC;CAC/B,GAAG,CACA;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,GACD;IACE,WAAW,EAAE,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CACJ,CAAC;AACF,eAAO,MAAM,uBAAuB,UAC3B,4BAA4B,sBAuCpC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ComponentProps } from "react";
|
|
2
|
-
import { ListItemRadio } from "../listitems
|
|
2
|
+
import { ListItemRadio } from "../listitems";
|
|
3
3
|
export type RadioItem<T> = {
|
|
4
4
|
id: T;
|
|
5
5
|
value: string;
|
|
@@ -8,16 +8,29 @@ export type RadioItem<T> = {
|
|
|
8
8
|
startImage?: ComponentProps<typeof ListItemRadio>["startImage"];
|
|
9
9
|
loadingProps?: ComponentProps<typeof ListItemRadio>["loadingProps"];
|
|
10
10
|
};
|
|
11
|
-
type
|
|
12
|
-
|
|
11
|
+
export type RadioItemWithAmount<T> = {
|
|
12
|
+
id: T;
|
|
13
|
+
label: string;
|
|
14
|
+
formattedAmountString: string;
|
|
15
|
+
} & ({
|
|
16
|
+
isSuggested?: false;
|
|
17
|
+
} | {
|
|
18
|
+
isSuggested: true;
|
|
19
|
+
suggestReason: string;
|
|
20
|
+
});
|
|
21
|
+
type CommonProps<T> = {
|
|
13
22
|
selectedItem?: T;
|
|
14
23
|
onPress: (selected: T) => void;
|
|
15
24
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
type RadioListItemProps<T> = {
|
|
26
|
+
type: "radioListItem";
|
|
27
|
+
items: ReadonlyArray<RadioItem<T>>;
|
|
28
|
+
} & CommonProps<T>;
|
|
29
|
+
type RadioListItemWithAmountProps<T> = {
|
|
30
|
+
type: "radioListItemWithAmount";
|
|
31
|
+
items: ReadonlyArray<RadioItemWithAmount<T>>;
|
|
32
|
+
} & CommonProps<T>;
|
|
33
|
+
type Props<T> = RadioListItemProps<T> | RadioListItemWithAmountProps<T>;
|
|
34
|
+
export declare const RadioGroup: <T>(props: Props<T>) => React.JSX.Element;
|
|
22
35
|
export {};
|
|
23
36
|
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,aAAa,EAA2B,MAAM,cAAc,CAAC;AAEtE,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,EAAE,EAAE,CAAC,CAAC;IACN,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,YAAY,CAAC,CAAC;IAChE,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,cAAc,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,EAAE,EAAE,CAAC,CAAC;IACN,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,MAAM,CAAC;CAC/B,GAAG,CACA;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,GACD;IACE,WAAW,EAAE,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CACJ,CAAC;AACF,KAAK,WAAW,CAAC,CAAC,IAAI;IACpB,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,KAAK,kBAAkB,CAAC,CAAC,IAAI;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CACpC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAEnB,KAAK,4BAA4B,CAAC,CAAC,IAAI;IACrC,IAAI,EAAE,yBAAyB,CAAC;IAChC,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9C,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAEnB,KAAK,KAAK,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,4BAA4B,CAAC,CAAC,CAAC,CAAC;AA+CxE,eAAO,MAAM,UAAU,2CAKtB,CAAC"}
|
|
@@ -13,7 +13,8 @@ export type TabItem = WithTestID<{
|
|
|
13
13
|
accessibilityLabel: string;
|
|
14
14
|
accessibilityHint?: string;
|
|
15
15
|
onPress?: (event: GestureResponderEvent) => void;
|
|
16
|
+
disabled?: boolean;
|
|
16
17
|
}>;
|
|
17
|
-
declare const TabItem: ({ label, color, selected, fullWidth, accessibilityLabel, accessibilityHint, testID, onPress, icon, iconSelected }: TabItem) => React.JSX.Element;
|
|
18
|
+
declare const TabItem: ({ label, color, selected, fullWidth, accessibilityLabel, accessibilityHint, testID, onPress, disabled, icon, iconSelected }: TabItem) => React.JSX.Element;
|
|
18
19
|
export { TabItem };
|
|
19
20
|
//# sourceMappingURL=TabItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabItem.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/TabItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAyB,MAAM,cAAc,CAAC;AAU5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAQ,MAAM,UAAU,CAAC;AAMzC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"TabItem.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/TabItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAyB,MAAM,cAAc,CAAC;AAU5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAQ,MAAM,UAAU,CAAC;AAMzC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AA0CH,QAAA,MAAM,OAAO,gIAYV,OAAO,sBA4FT,CAAC;AAkBF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { IOFontWeight } from "../../utils/fonts";
|
|
|
3
3
|
import { IOTheme } from "../../core";
|
|
4
4
|
import { ExternalTypographyProps, TypographyProps } from "./common";
|
|
5
5
|
type AllowedColors = IOTheme["textBody-default"] | "grey-650" | "grey-850" | "white" | "black";
|
|
6
|
-
type AllowedWeight = Extract<IOFontWeight, "Regular">;
|
|
6
|
+
type AllowedWeight = Extract<IOFontWeight, "Regular" | "SemiBold">;
|
|
7
7
|
type LabelHeaderProps = ExternalTypographyProps<TypographyProps<AllowedWeight, AllowedColors>>;
|
|
8
8
|
export declare const labelHeaderFontSize = 14;
|
|
9
9
|
export declare const labelHeaderLineHeight = 18;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/LabelHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAyC,MAAM,YAAY,CAAC;AAE5E,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEpE,KAAK,aAAa,GACd,OAAO,CAAC,kBAAkB,CAAC,GAC3B,UAAU,GACV,UAAU,GACV,OAAO,GACP,OAAO,CAAC;AACZ,KAAK,aAAa,GAAG,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"LabelHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/LabelHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAyC,MAAM,YAAY,CAAC;AAE5E,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEpE,KAAK,aAAa,GACd,OAAO,CAAC,kBAAkB,CAAC,GAC3B,UAAU,GACV,UAAU,GACV,OAAO,GACP,OAAO,CAAC;AACZ,KAAK,aAAa,GAAG,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;AAEnE,KAAK,gBAAgB,GAAG,uBAAuB,CAC7C,eAAe,CAAC,aAAa,EAAE,aAAa,CAAC,CAC9C,CAAC;AAEF,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,uBAAuB,EAAE,aACJ,CAAC;AAQnC;;GAEG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,gCAiBlD,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
type IOExperimentalContextType = {
|
|
3
3
|
isExperimental: boolean;
|
|
4
4
|
setExperimental: (isExperimental: boolean) => void;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Experimental Context for new UI Representations
|
|
8
|
+
*/
|
|
9
|
+
export declare const IOExperimentalDesignContext: React.Context<IOExperimentalContextType>;
|
|
6
10
|
export declare const useIOExperimentalDesign: () => IOExperimentalContextType;
|
|
7
11
|
type IOExperimentalContextProviderProps = {
|
|
8
12
|
isExperimentaEnabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IODSExperimentalContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IODSExperimentalContextProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IODSExperimentalContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IODSExperimentalContextProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,2BAA2B,0CAIpC,CAAC;AAEL,eAAO,MAAM,uBAAuB,iCACW,CAAC;AAEhD,KAAK,kCAAkC,GAAG;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,+BAA+B,uCAGzC,MAAM,iBAAiB,CAAC,kCAAkC,CAAC,sBAY7D,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TestRenderer from "react-test-renderer";
|
|
3
|
+
export declare const TestRendererWithExperimentalEnabledContextProvider: (ui: React.ReactElement, options?: TestRenderer.TestRendererOptions) => TestRenderer.ReactTestRenderer;
|
|
4
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/utils/testing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAG/C,eAAO,MAAM,kDAAkD,OACzD,MAAM,YAAY,YACZ,aAAa,mBAAmB,mCAOzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,115 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`Test Advice Components - Experimental Enabled Advice Snapshot 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
{
|
|
7
|
+
"flexDirection": "row",
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
>
|
|
11
|
+
<View
|
|
12
|
+
style={
|
|
13
|
+
{
|
|
14
|
+
"marginTop": 4,
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
>
|
|
18
|
+
<RNSVGSvgView
|
|
19
|
+
accessibilityElementsHidden={true}
|
|
20
|
+
accessibilityLabel=""
|
|
21
|
+
accessible={false}
|
|
22
|
+
align="xMidYMid"
|
|
23
|
+
bbHeight={20}
|
|
24
|
+
bbWidth={20}
|
|
25
|
+
color={4278219750}
|
|
26
|
+
focusable={false}
|
|
27
|
+
height={20}
|
|
28
|
+
importantForAccessibility="no-hide-descendants"
|
|
29
|
+
meetOrSlice={0}
|
|
30
|
+
minX={0}
|
|
31
|
+
minY={0}
|
|
32
|
+
style={
|
|
33
|
+
[
|
|
34
|
+
{
|
|
35
|
+
"backgroundColor": "transparent",
|
|
36
|
+
"borderWidth": 0,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"color": "#0073E6",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"flex": 0,
|
|
43
|
+
"height": 20,
|
|
44
|
+
"width": 20,
|
|
45
|
+
},
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
tintColor={4278219750}
|
|
49
|
+
vbHeight={24}
|
|
50
|
+
vbWidth={24}
|
|
51
|
+
width={20}
|
|
52
|
+
>
|
|
53
|
+
<RNSVGGroup>
|
|
54
|
+
<RNSVGPath
|
|
55
|
+
clipRule={0}
|
|
56
|
+
d="M0 12C0 5.3726 5.3726 0 12 0s12 5.3726 12 12-5.3726 12-12 12S0 18.6274 0 12Zm2 0C2 6.47717 6.47717 2 12 2c5.5228 0 10 4.47717 10 10 0 5.5228-4.4772 10-10 10-5.52283 0-10-4.4772-10-10Zm10.0281 7.5c.8439 0 1.5281-.6842 1.5281-1.5281s-.6842-1.5281-1.5281-1.5281c-.844 0-1.5281.6842-1.5281 1.5281S11.1841 19.5 12.0281 19.5Zm0-15.05618h.0005c.5678 0 1.0281.46029 1.0281 1.02808v8.0046c0 .5678-.4603 1.028-1.0281 1.028h-.0005c-.5678 0-1.0281-.4602-1.0281-1.028V5.4719c0-.56779.4603-1.02808 1.0281-1.02808Z"
|
|
57
|
+
fill={
|
|
58
|
+
[
|
|
59
|
+
2,
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
fillRule={0}
|
|
63
|
+
propList={
|
|
64
|
+
[
|
|
65
|
+
"fill",
|
|
66
|
+
"fillRule",
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
/>
|
|
70
|
+
</RNSVGGroup>
|
|
71
|
+
</RNSVGSvgView>
|
|
72
|
+
</View>
|
|
73
|
+
<View
|
|
74
|
+
style={
|
|
75
|
+
{
|
|
76
|
+
"width": 8,
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/>
|
|
80
|
+
<Text
|
|
81
|
+
allowFontScaling={false}
|
|
82
|
+
color="bluegrey"
|
|
83
|
+
defaultColor="bluegrey"
|
|
84
|
+
defaultWeight="Regular"
|
|
85
|
+
font="TitilliumWeb"
|
|
86
|
+
fontStyle={
|
|
87
|
+
{
|
|
88
|
+
"fontSize": 16,
|
|
89
|
+
"lineHeight": 24,
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
style={
|
|
93
|
+
[
|
|
94
|
+
{
|
|
95
|
+
"fontSize": 16,
|
|
96
|
+
"lineHeight": 24,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"color": "#475A6D",
|
|
100
|
+
"fontFamily": "Titillium Web",
|
|
101
|
+
"fontStyle": "normal",
|
|
102
|
+
"fontWeight": "400",
|
|
103
|
+
},
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
weight="Regular"
|
|
107
|
+
>
|
|
108
|
+
Text
|
|
109
|
+
</Text>
|
|
110
|
+
</View>
|
|
111
|
+
`;
|
|
112
|
+
|
|
3
113
|
exports[`Test Advice Components Advice Snapshot 1`] = `
|
|
4
114
|
<View
|
|
5
115
|
style={
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import * as TestRenderer from "react-test-renderer";
|
|
3
|
+
import { TestRendererWithExperimentalEnabledContextProvider } from "../../../utils/testing";
|
|
3
4
|
import { Advice } from "../Advice";
|
|
4
5
|
|
|
5
6
|
describe("Test Advice Components", () => {
|
|
@@ -10,3 +11,12 @@ describe("Test Advice Components", () => {
|
|
|
10
11
|
expect(advice).toMatchSnapshot();
|
|
11
12
|
});
|
|
12
13
|
});
|
|
14
|
+
|
|
15
|
+
describe("Test Advice Components - Experimental Enabled", () => {
|
|
16
|
+
it("Advice Snapshot", () => {
|
|
17
|
+
const advice = TestRendererWithExperimentalEnabledContextProvider(
|
|
18
|
+
<Advice text={"Text"}></Advice>
|
|
19
|
+
).toJSON();
|
|
20
|
+
expect(advice).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
View,
|
|
3
|
+
LayoutChangeEvent,
|
|
5
4
|
StyleSheet,
|
|
5
|
+
Text,
|
|
6
6
|
TouchableWithoutFeedback,
|
|
7
|
-
|
|
7
|
+
View
|
|
8
8
|
} from "react-native";
|
|
9
|
+
import LinearGradient from "react-native-linear-gradient";
|
|
9
10
|
import Animated, {
|
|
10
11
|
useAnimatedStyle,
|
|
11
12
|
withSpring
|
|
12
13
|
} from "react-native-reanimated";
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import { makeFontStyleObject } from "../../utils/fonts";
|
|
14
|
+
import { IOAccordionRadius, IOStyles, type IOSpacingScale } from "../../core";
|
|
15
|
+
import { IOSpringValues } from "../../core/IOAnimations";
|
|
16
16
|
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
17
|
+
import { makeFontStyleObject } from "../../utils/fonts";
|
|
18
|
+
import { IOIconSizeScale, IOIcons, Icon } from "../icons/Icon";
|
|
17
19
|
import { H6 } from "../typography";
|
|
18
|
-
import { IOSpringValues } from "../../core/IOAnimations";
|
|
19
|
-
import { Icon } from "../icons/Icon";
|
|
20
20
|
|
|
21
21
|
export type AccordionItem = {
|
|
22
22
|
id: number;
|
|
23
23
|
title: string;
|
|
24
24
|
body: string | React.ReactNode;
|
|
25
|
+
icon?: IOIcons;
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
type AccordionBody = {
|
|
@@ -30,10 +31,14 @@ type AccordionBody = {
|
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
const accordionBodySpacing: IOSpacingScale = 16;
|
|
33
|
-
const accordionIconMargin: IOSpacingScale =
|
|
34
|
+
const accordionIconMargin: IOSpacingScale = 12;
|
|
35
|
+
const accordionChevronMargin: IOSpacingScale = 8;
|
|
34
36
|
const accordionBorder: IOColors = "grey-200";
|
|
35
37
|
const accordionBackground: IOColors = "white";
|
|
36
38
|
|
|
39
|
+
// Icon size
|
|
40
|
+
const iconSize: IOIconSizeScale = 24;
|
|
41
|
+
|
|
37
42
|
/* The code below is a re-adaptation of Dima Portenko's code:
|
|
38
43
|
https://github.com/dimaportenko/reanimated-collapsable-card-tutorial
|
|
39
44
|
*/
|
|
@@ -68,7 +73,7 @@ export const AccordionBody = ({ children, expanded }: AccordionBody) => {
|
|
|
68
73
|
);
|
|
69
74
|
};
|
|
70
75
|
|
|
71
|
-
export const AccordionItem = ({ title, body }: AccordionItem) => {
|
|
76
|
+
export const AccordionItem = ({ title, body, icon }: AccordionItem) => {
|
|
72
77
|
const [expanded, setExpanded] = useState(false);
|
|
73
78
|
|
|
74
79
|
const onItemPress = () => {
|
|
@@ -97,8 +102,24 @@ export const AccordionItem = ({ title, body }: AccordionItem) => {
|
|
|
97
102
|
onPress={onItemPress}
|
|
98
103
|
>
|
|
99
104
|
<View style={styles.textContainer}>
|
|
100
|
-
<View
|
|
101
|
-
|
|
105
|
+
<View
|
|
106
|
+
style={[
|
|
107
|
+
IOStyles.row,
|
|
108
|
+
IOStyles.alignCenter,
|
|
109
|
+
{
|
|
110
|
+
flexShrink: 1,
|
|
111
|
+
marginRight: accordionChevronMargin
|
|
112
|
+
}
|
|
113
|
+
]}
|
|
114
|
+
>
|
|
115
|
+
{icon && (
|
|
116
|
+
<View style={{ marginRight: accordionIconMargin }}>
|
|
117
|
+
<Icon name={icon} size={iconSize} color="black" />
|
|
118
|
+
</View>
|
|
119
|
+
)}
|
|
120
|
+
<View style={{ flexShrink: 1 }}>
|
|
121
|
+
<H6 color="black">{title}</H6>
|
|
122
|
+
</View>
|
|
102
123
|
</View>
|
|
103
124
|
<Animated.View style={animatedChevron}>
|
|
104
125
|
<Icon name="chevronBottom" color="blueIO-500" />
|
|
@@ -157,7 +178,6 @@ const styles = StyleSheet.create({
|
|
|
157
178
|
},
|
|
158
179
|
textContainer: {
|
|
159
180
|
padding: accordionBodySpacing,
|
|
160
|
-
flexGrow: 1,
|
|
161
181
|
flexDirection: "row",
|
|
162
182
|
alignItems: "center",
|
|
163
183
|
justifyContent: "space-between"
|
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`Test Avatar Components - Experimental Enabled Avatar Snapshot 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
[
|
|
7
|
+
{
|
|
8
|
+
"borderColor": "rgba(14,15,19,0.1)",
|
|
9
|
+
"borderWidth": 1,
|
|
10
|
+
"overflow": "hidden",
|
|
11
|
+
"resizeMode": "contain",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"backgroundColor": "#FFFFFF",
|
|
15
|
+
"borderRadius": 22,
|
|
16
|
+
"height": 44,
|
|
17
|
+
"padding": 6,
|
|
18
|
+
"width": 44,
|
|
19
|
+
},
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
>
|
|
23
|
+
<Image
|
|
24
|
+
onError={[Function]}
|
|
25
|
+
source={
|
|
26
|
+
{
|
|
27
|
+
"uri": "",
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
style={
|
|
31
|
+
{
|
|
32
|
+
"height": "100%",
|
|
33
|
+
"width": "100%",
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/>
|
|
37
|
+
</View>
|
|
38
|
+
`;
|
|
39
|
+
|
|
3
40
|
exports[`Test Avatar Components Avatar Snapshot 1`] = `
|
|
4
41
|
<View
|
|
5
42
|
style={
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import * as TestRenderer from "react-test-renderer";
|
|
3
|
+
import { TestRendererWithExperimentalEnabledContextProvider } from "../../../utils/testing";
|
|
3
4
|
import { Avatar } from "../Avatar";
|
|
4
5
|
|
|
5
6
|
describe("Test Avatar Components", () => {
|
|
@@ -10,3 +11,12 @@ describe("Test Avatar Components", () => {
|
|
|
10
11
|
expect(avatar).toMatchSnapshot();
|
|
11
12
|
});
|
|
12
13
|
});
|
|
14
|
+
|
|
15
|
+
describe("Test Avatar Components - Experimental Enabled", () => {
|
|
16
|
+
it("Avatar Snapshot", () => {
|
|
17
|
+
const avatar = TestRendererWithExperimentalEnabledContextProvider(
|
|
18
|
+
<Avatar shape={"circle"} size={"small"} logoUri={{ uri: "" }}></Avatar>
|
|
19
|
+
).toJSON();
|
|
20
|
+
expect(avatar).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`Test Badge Components - Experimental Enabled Badge Snapshot 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
[
|
|
7
|
+
{
|
|
8
|
+
"alignItems": "center",
|
|
9
|
+
"borderRadius": 24,
|
|
10
|
+
"flexDirection": "row",
|
|
11
|
+
"justifyContent": "center",
|
|
12
|
+
"paddingHorizontal": 8,
|
|
13
|
+
"paddingVertical": 4,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"backgroundColor": "#F4F5F8",
|
|
17
|
+
},
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
>
|
|
21
|
+
<Text
|
|
22
|
+
ellipsizeMode="tail"
|
|
23
|
+
numberOfLines={1}
|
|
24
|
+
style={
|
|
25
|
+
[
|
|
26
|
+
{
|
|
27
|
+
"alignSelf": "center",
|
|
28
|
+
"flexShrink": 1,
|
|
29
|
+
"fontSize": 12,
|
|
30
|
+
"lineHeight": 16,
|
|
31
|
+
"textTransform": "uppercase",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"fontFamily": "Readex Pro",
|
|
35
|
+
"fontStyle": "normal",
|
|
36
|
+
"fontWeight": "400",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"color": "#555C70",
|
|
40
|
+
},
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
>
|
|
44
|
+
text
|
|
45
|
+
</Text>
|
|
46
|
+
</View>
|
|
47
|
+
`;
|
|
48
|
+
|
|
3
49
|
exports[`Test Badge Components Badge Snapshot 1`] = `
|
|
4
50
|
<View
|
|
5
51
|
style={
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import * as TestRenderer from "react-test-renderer";
|
|
3
|
+
import { TestRendererWithExperimentalEnabledContextProvider } from "../../../utils/testing";
|
|
3
4
|
import { Badge } from "../Badge";
|
|
4
5
|
|
|
5
6
|
describe("Test Badge Components", () => {
|
|
@@ -10,3 +11,12 @@ describe("Test Badge Components", () => {
|
|
|
10
11
|
expect(badge).toMatchSnapshot();
|
|
11
12
|
});
|
|
12
13
|
});
|
|
14
|
+
|
|
15
|
+
describe("Test Badge Components - Experimental Enabled", () => {
|
|
16
|
+
it("Badge Snapshot", () => {
|
|
17
|
+
const badge = TestRendererWithExperimentalEnabledContextProvider(
|
|
18
|
+
<Badge text={"text"} variant={"default"}></Badge>
|
|
19
|
+
).toJSON();
|
|
20
|
+
expect(badge).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
});
|