@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,18 +1,22 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import Animated, { useAnimatedStyle, withSpring } from "react-native-reanimated";
|
|
2
|
+
import { StyleSheet, Text, TouchableWithoutFeedback, View } from "react-native";
|
|
4
3
|
import LinearGradient from "react-native-linear-gradient";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
8
|
-
import { H6 } from "../typography";
|
|
4
|
+
import Animated, { useAnimatedStyle, withSpring } from "react-native-reanimated";
|
|
5
|
+
import { IOAccordionRadius, IOStyles } from "../../core";
|
|
9
6
|
import { IOSpringValues } from "../../core/IOAnimations";
|
|
7
|
+
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
8
|
+
import { makeFontStyleObject } from "../../utils/fonts";
|
|
10
9
|
import { Icon } from "../icons/Icon";
|
|
10
|
+
import { H6 } from "../typography";
|
|
11
11
|
const accordionBodySpacing = 16;
|
|
12
|
-
const accordionIconMargin =
|
|
12
|
+
const accordionIconMargin = 12;
|
|
13
|
+
const accordionChevronMargin = 8;
|
|
13
14
|
const accordionBorder = "grey-200";
|
|
14
15
|
const accordionBackground = "white";
|
|
15
16
|
|
|
17
|
+
// Icon size
|
|
18
|
+
const iconSize = 24;
|
|
19
|
+
|
|
16
20
|
/* The code below is a re-adaptation of Dima Portenko's code:
|
|
17
21
|
https://github.com/dimaportenko/reanimated-collapsable-card-tutorial
|
|
18
22
|
*/
|
|
@@ -43,7 +47,8 @@ export const AccordionBody = _ref => {
|
|
|
43
47
|
export const AccordionItem = _ref2 => {
|
|
44
48
|
let {
|
|
45
49
|
title,
|
|
46
|
-
body
|
|
50
|
+
body,
|
|
51
|
+
icon
|
|
47
52
|
} = _ref2;
|
|
48
53
|
const [expanded, setExpanded] = useState(false);
|
|
49
54
|
const onItemPress = () => {
|
|
@@ -66,13 +71,25 @@ export const AccordionItem = _ref2 => {
|
|
|
66
71
|
}, /*#__PURE__*/React.createElement(View, {
|
|
67
72
|
style: styles.textContainer
|
|
68
73
|
}, /*#__PURE__*/React.createElement(View, {
|
|
69
|
-
style: {
|
|
74
|
+
style: [IOStyles.row, IOStyles.alignCenter, {
|
|
70
75
|
flexShrink: 1,
|
|
76
|
+
marginRight: accordionChevronMargin
|
|
77
|
+
}]
|
|
78
|
+
}, icon && /*#__PURE__*/React.createElement(View, {
|
|
79
|
+
style: {
|
|
71
80
|
marginRight: accordionIconMargin
|
|
72
81
|
}
|
|
82
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
83
|
+
name: icon,
|
|
84
|
+
size: iconSize,
|
|
85
|
+
color: "black"
|
|
86
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
87
|
+
style: {
|
|
88
|
+
flexShrink: 1
|
|
89
|
+
}
|
|
73
90
|
}, /*#__PURE__*/React.createElement(H6, {
|
|
74
91
|
color: "black"
|
|
75
|
-
}, title)), /*#__PURE__*/React.createElement(Animated.View, {
|
|
92
|
+
}, title))), /*#__PURE__*/React.createElement(Animated.View, {
|
|
76
93
|
style: animatedChevron
|
|
77
94
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
78
95
|
name: "chevronBottom",
|
|
@@ -117,7 +134,6 @@ const styles = StyleSheet.create({
|
|
|
117
134
|
},
|
|
118
135
|
textContainer: {
|
|
119
136
|
padding: accordionBodySpacing,
|
|
120
|
-
flexGrow: 1,
|
|
121
137
|
flexDirection: "row",
|
|
122
138
|
alignItems: "center",
|
|
123
139
|
justifyContent: "space-between"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Text","
|
|
1
|
+
{"version":3,"names":["React","useState","StyleSheet","Text","TouchableWithoutFeedback","View","LinearGradient","Animated","useAnimatedStyle","withSpring","IOAccordionRadius","IOStyles","IOSpringValues","IOColors","hexToRgba","makeFontStyleObject","Icon","H6","accordionBodySpacing","accordionIconMargin","accordionChevronMargin","accordionBorder","accordionBackground","iconSize","AccordionBody","_ref","children","expanded","height","setHeight","onLayout","event","onLayoutHeight","nativeEvent","layout","animatedHeightStyle","accordion","createElement","style","styles","accordionCollapsableContainer","accordionBodyContainer","AccordionItem","_ref2","title","body","icon","setExpanded","onItemPress","animatedChevron","transform","rotate","accordionWrapper","accessible","accessibilityRole","accessibilityState","onPress","textContainer","row","alignCenter","flexShrink","marginRight","name","size","color","accordionBodyText","position","bottom","left","right","colors","create","borderColor","borderWidth","borderRadius","backgroundColor","overflow","padding","paddingTop","fontSize","lineHeight","undefined","flexDirection","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["components/accordion/AccordionItem.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAEEC,UAAU,EACVC,IAAI,EACJC,wBAAwB,EACxBC,IAAI,QACC,cAAc;AACrB,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,UAAU,QACL,yBAAyB;AAChC,SAASC,iBAAiB,EAAEC,QAAQ,QAA6B,YAAY;AAC7E,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,QAAQ,EAAEC,SAAS,QAAQ,qBAAqB;AACzD,SAASC,mBAAmB,QAAQ,mBAAmB;AACvD,SAAmCC,IAAI,QAAQ,eAAe;AAC9D,SAASC,EAAE,QAAQ,eAAe;AAclC,MAAMC,oBAAoC,GAAG,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AQ,CAACS,mBAAmB;EAC/C,CAAC;EACDkB,6BAA6B,EAAE;IAC7BoC,QAAQ,EAAE;EACZ,CAAC;EACDnC,sBAAsB,EAAE;IACtByB,QAAQ,EAAE,UAAU;IACpBW,OAAO,EAAE3D,oBAAoB;IAC7B4D,UAAU,EAAE;EACd,CAAC;EACDb,iBAAiB,EAAE;IACjBc,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdhB,KAAK,EAAEnD,QAAQ,CAAC,UAAU,CAAC;IAC3B,GAAGE,mBAAmB,CAAC,SAAS,EAAEkE,SAAS,EAAE,cAAc;EAC7D,CAAC;EACDxB,aAAa,EAAE;IACboB,OAAO,EAAE3D,oBAAoB;IAC7BgE,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC"}
|
|
@@ -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
|
describe("Test Avatar Components", () => {
|
|
5
6
|
it("Avatar Snapshot", () => {
|
|
@@ -13,4 +14,16 @@ describe("Test Avatar Components", () => {
|
|
|
13
14
|
expect(avatar).toMatchSnapshot();
|
|
14
15
|
});
|
|
15
16
|
});
|
|
17
|
+
describe("Test Avatar Components - Experimental Enabled", () => {
|
|
18
|
+
it("Avatar Snapshot", () => {
|
|
19
|
+
const avatar = TestRendererWithExperimentalEnabledContextProvider( /*#__PURE__*/React.createElement(Avatar, {
|
|
20
|
+
shape: "circle",
|
|
21
|
+
size: "small",
|
|
22
|
+
logoUri: {
|
|
23
|
+
uri: ""
|
|
24
|
+
}
|
|
25
|
+
})).toJSON();
|
|
26
|
+
expect(avatar).toMatchSnapshot();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
16
29
|
//# sourceMappingURL=avatar.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TestRenderer","Avatar","describe","it","avatar","create","createElement","shape","size","logoUri","uri","toJSON","expect","toMatchSnapshot"],"sourceRoot":"../../../../../src","sources":["components/avatar/__test__/avatar.test.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,YAAY,MAAM,qBAAqB;AACnD,SAASC,MAAM,QAAQ,WAAW;AAElCC,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,iBAAiB,EAAE,MAAM;IAC1B,MAAMC,MAAM,
|
|
1
|
+
{"version":3,"names":["React","TestRenderer","TestRendererWithExperimentalEnabledContextProvider","Avatar","describe","it","avatar","create","createElement","shape","size","logoUri","uri","toJSON","expect","toMatchSnapshot"],"sourceRoot":"../../../../../src","sources":["components/avatar/__test__/avatar.test.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,YAAY,MAAM,qBAAqB;AACnD,SAASC,kDAAkD,QAAQ,wBAAwB;AAC3F,SAASC,MAAM,QAAQ,WAAW;AAElCC,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,iBAAiB,EAAE,MAAM;IAC1B,MAAMC,MAAM,GAAGL,YAAY,CAACM,MAAM,eAChCP,KAAA,CAAAQ,aAAA,CAACL,MAAM;MAACM,KAAK,EAAE,QAAS;MAACC,IAAI,EAAE,OAAQ;MAACC,OAAO,EAAE;QAAEC,GAAG,EAAE;MAAG;IAAE,CAAS,CACxE,CAAC,CAACC,MAAM,CAAC,CAAC;IACVC,MAAM,CAACR,MAAM,CAAC,CAACS,eAAe,CAAC,CAAC;EAClC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFX,QAAQ,CAAC,+CAA+C,EAAE,MAAM;EAC9DC,EAAE,CAAC,iBAAiB,EAAE,MAAM;IAC1B,MAAMC,MAAM,GAAGJ,kDAAkD,eAC/DF,KAAA,CAAAQ,aAAA,CAACL,MAAM;MAACM,KAAK,EAAE,QAAS;MAACC,IAAI,EAAE,OAAQ;MAACC,OAAO,EAAE;QAAEC,GAAG,EAAE;MAAG;IAAE,CAAS,CACxE,CAAC,CAACC,MAAM,CAAC,CAAC;IACVC,MAAM,CAACR,MAAM,CAAC,CAACS,eAAe,CAAC,CAAC;EAClC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -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
|
describe("Test Badge Components", () => {
|
|
5
6
|
it("Badge Snapshot", () => {
|
|
@@ -10,4 +11,13 @@ describe("Test Badge Components", () => {
|
|
|
10
11
|
expect(badge).toMatchSnapshot();
|
|
11
12
|
});
|
|
12
13
|
});
|
|
14
|
+
describe("Test Badge Components - Experimental Enabled", () => {
|
|
15
|
+
it("Badge Snapshot", () => {
|
|
16
|
+
const badge = TestRendererWithExperimentalEnabledContextProvider( /*#__PURE__*/React.createElement(Badge, {
|
|
17
|
+
text: "text",
|
|
18
|
+
variant: "default"
|
|
19
|
+
})).toJSON();
|
|
20
|
+
expect(badge).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
13
23
|
//# sourceMappingURL=badge.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TestRenderer","Badge","describe","it","badge","create","createElement","text","variant","toJSON","expect","toMatchSnapshot"],"sourceRoot":"../../../../../src","sources":["components/badge/__test__/badge.test.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,YAAY,MAAM,qBAAqB;AACnD,SAASC,KAAK,QAAQ,UAAU;AAEhCC,QAAQ,CAAC,uBAAuB,EAAE,MAAM;EACtCC,EAAE,CAAC,gBAAgB,EAAE,MAAM;IACzB,MAAMC,KAAK,
|
|
1
|
+
{"version":3,"names":["React","TestRenderer","TestRendererWithExperimentalEnabledContextProvider","Badge","describe","it","badge","create","createElement","text","variant","toJSON","expect","toMatchSnapshot"],"sourceRoot":"../../../../../src","sources":["components/badge/__test__/badge.test.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,YAAY,MAAM,qBAAqB;AACnD,SAASC,kDAAkD,QAAQ,wBAAwB;AAC3F,SAASC,KAAK,QAAQ,UAAU;AAEhCC,QAAQ,CAAC,uBAAuB,EAAE,MAAM;EACtCC,EAAE,CAAC,gBAAgB,EAAE,MAAM;IACzB,MAAMC,KAAK,GAAGL,YAAY,CAACM,MAAM,eAC/BP,KAAA,CAAAQ,aAAA,CAACL,KAAK;MAACM,IAAI,EAAE,MAAO;MAACC,OAAO,EAAE;IAAU,CAAQ,CAClD,CAAC,CAACC,MAAM,CAAC,CAAC;IACVC,MAAM,CAACN,KAAK,CAAC,CAACO,eAAe,CAAC,CAAC;EACjC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFT,QAAQ,CAAC,8CAA8C,EAAE,MAAM;EAC7DC,EAAE,CAAC,gBAAgB,EAAE,MAAM;IACzB,MAAMC,KAAK,GAAGJ,kDAAkD,eAC9DF,KAAA,CAAAQ,aAAA,CAACL,KAAK;MAACM,IAAI,EAAE,MAAO;MAACC,OAAO,EAAE;IAAU,CAAQ,CAClD,CAAC,CAACC,MAAM,CAAC,CAAC;IACVC,MAAM,CAACN,KAAK,CAAC,CAACO,eAAe,CAAC,CAAC;EACjC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,320 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`Test Banner Components - Experimental Enabled Banner Snapshot 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
accessibilityState={
|
|
6
|
+
{
|
|
7
|
+
"busy": undefined,
|
|
8
|
+
"checked": undefined,
|
|
9
|
+
"disabled": undefined,
|
|
10
|
+
"expanded": undefined,
|
|
11
|
+
"selected": undefined,
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
accessibilityValue={
|
|
15
|
+
{
|
|
16
|
+
"max": undefined,
|
|
17
|
+
"min": undefined,
|
|
18
|
+
"now": undefined,
|
|
19
|
+
"text": undefined,
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
accessible={false}
|
|
23
|
+
collapsable={false}
|
|
24
|
+
focusable={true}
|
|
25
|
+
onBlur={[Function]}
|
|
26
|
+
onClick={[Function]}
|
|
27
|
+
onFocus={[Function]}
|
|
28
|
+
onResponderGrant={[Function]}
|
|
29
|
+
onResponderMove={[Function]}
|
|
30
|
+
onResponderRelease={[Function]}
|
|
31
|
+
onResponderTerminate={[Function]}
|
|
32
|
+
onResponderTerminationRequest={[Function]}
|
|
33
|
+
onStartShouldSetResponder={[Function]}
|
|
34
|
+
>
|
|
35
|
+
<View
|
|
36
|
+
style={
|
|
37
|
+
[
|
|
38
|
+
{
|
|
39
|
+
"alignContent": "center",
|
|
40
|
+
"alignItems": "flex-start",
|
|
41
|
+
"borderRadius": 8,
|
|
42
|
+
"flexDirection": "row",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"backgroundColor": "#F4F5F8",
|
|
46
|
+
"paddingHorizontal": 16,
|
|
47
|
+
"paddingVertical": 16,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"transform": [
|
|
51
|
+
{
|
|
52
|
+
"scale": undefined,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
>
|
|
59
|
+
<View
|
|
60
|
+
accessibilityRole="button"
|
|
61
|
+
accessible={true}
|
|
62
|
+
style={
|
|
63
|
+
[
|
|
64
|
+
{
|
|
65
|
+
"flex": 1,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"alignSelf": "center",
|
|
69
|
+
},
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
>
|
|
73
|
+
<Text
|
|
74
|
+
allowFontScaling={false}
|
|
75
|
+
color="blueIO-850"
|
|
76
|
+
defaultColor="black"
|
|
77
|
+
defaultWeight="Regular"
|
|
78
|
+
font="ReadexPro"
|
|
79
|
+
fontStyle={
|
|
80
|
+
{
|
|
81
|
+
"fontSize": 16,
|
|
82
|
+
"lineHeight": 24,
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
style={
|
|
86
|
+
[
|
|
87
|
+
{
|
|
88
|
+
"fontSize": 16,
|
|
89
|
+
"lineHeight": 24,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"color": "#031344",
|
|
93
|
+
"fontFamily": "Readex Pro",
|
|
94
|
+
"fontStyle": "normal",
|
|
95
|
+
"fontWeight": "400",
|
|
96
|
+
},
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
weight="Regular"
|
|
100
|
+
>
|
|
101
|
+
Banner title
|
|
102
|
+
</Text>
|
|
103
|
+
<View
|
|
104
|
+
style={
|
|
105
|
+
{
|
|
106
|
+
"height": 4,
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/>
|
|
110
|
+
<View
|
|
111
|
+
pointerEvents="none"
|
|
112
|
+
>
|
|
113
|
+
<View
|
|
114
|
+
style={
|
|
115
|
+
{
|
|
116
|
+
"height": 4,
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/>
|
|
120
|
+
<View
|
|
121
|
+
accessibilityRole="button"
|
|
122
|
+
accessibilityState={
|
|
123
|
+
{
|
|
124
|
+
"busy": undefined,
|
|
125
|
+
"checked": undefined,
|
|
126
|
+
"disabled": false,
|
|
127
|
+
"expanded": undefined,
|
|
128
|
+
"selected": undefined,
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
accessibilityValue={
|
|
132
|
+
{
|
|
133
|
+
"max": undefined,
|
|
134
|
+
"min": undefined,
|
|
135
|
+
"now": undefined,
|
|
136
|
+
"text": undefined,
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
accessible={true}
|
|
140
|
+
collapsable={false}
|
|
141
|
+
focusable={true}
|
|
142
|
+
hitSlop={
|
|
143
|
+
{
|
|
144
|
+
"bottom": 14,
|
|
145
|
+
"left": 24,
|
|
146
|
+
"right": 24,
|
|
147
|
+
"top": 14,
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
onBlur={[Function]}
|
|
151
|
+
onClick={[Function]}
|
|
152
|
+
onFocus={[Function]}
|
|
153
|
+
onResponderGrant={[Function]}
|
|
154
|
+
onResponderMove={[Function]}
|
|
155
|
+
onResponderRelease={[Function]}
|
|
156
|
+
onResponderTerminate={[Function]}
|
|
157
|
+
onResponderTerminationRequest={[Function]}
|
|
158
|
+
onStartShouldSetResponder={[Function]}
|
|
159
|
+
onTouchEnd={[Function]}
|
|
160
|
+
style={
|
|
161
|
+
{
|
|
162
|
+
"alignSelf": "flex-start",
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
>
|
|
166
|
+
<View
|
|
167
|
+
style={
|
|
168
|
+
[
|
|
169
|
+
{
|
|
170
|
+
"alignItems": "center",
|
|
171
|
+
"elevation": 0,
|
|
172
|
+
"flexDirection": "row",
|
|
173
|
+
"justifyContent": "center",
|
|
174
|
+
"textAlignVertical": "center",
|
|
175
|
+
},
|
|
176
|
+
false,
|
|
177
|
+
{},
|
|
178
|
+
{
|
|
179
|
+
"transform": [
|
|
180
|
+
{
|
|
181
|
+
"scale": undefined,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
>
|
|
188
|
+
<Text
|
|
189
|
+
allowFontScaling={true}
|
|
190
|
+
ellipsizeMode="tail"
|
|
191
|
+
maxFontSizeMultiplier={1.3}
|
|
192
|
+
numberOfLines={1}
|
|
193
|
+
style={
|
|
194
|
+
[
|
|
195
|
+
{
|
|
196
|
+
"fontFamily": "Readex Pro",
|
|
197
|
+
"fontSize": 16,
|
|
198
|
+
"fontStyle": "normal",
|
|
199
|
+
"fontWeight": "400",
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"color": "#0B3EE3",
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"color": undefined,
|
|
206
|
+
},
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
>
|
|
210
|
+
Action text
|
|
211
|
+
</Text>
|
|
212
|
+
</View>
|
|
213
|
+
</View>
|
|
214
|
+
</View>
|
|
215
|
+
</View>
|
|
216
|
+
<View
|
|
217
|
+
style={
|
|
218
|
+
[
|
|
219
|
+
{
|
|
220
|
+
"marginRight": -16,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"alignSelf": "center",
|
|
224
|
+
},
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
>
|
|
228
|
+
<RNSVGSvgView
|
|
229
|
+
align="xMidYMid"
|
|
230
|
+
bbHeight={80}
|
|
231
|
+
bbWidth={80}
|
|
232
|
+
color={4278240714}
|
|
233
|
+
focusable={false}
|
|
234
|
+
height={80}
|
|
235
|
+
meetOrSlice={0}
|
|
236
|
+
minX={0}
|
|
237
|
+
minY={0}
|
|
238
|
+
style={
|
|
239
|
+
[
|
|
240
|
+
{
|
|
241
|
+
"backgroundColor": "transparent",
|
|
242
|
+
"borderWidth": 0,
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"flex": 0,
|
|
246
|
+
"height": 80,
|
|
247
|
+
"width": 80,
|
|
248
|
+
},
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
tintColor={4278240714}
|
|
252
|
+
vbHeight={240}
|
|
253
|
+
vbWidth={240}
|
|
254
|
+
width={80}
|
|
255
|
+
>
|
|
256
|
+
<RNSVGGroup>
|
|
257
|
+
<RNSVGPath
|
|
258
|
+
d="M133.46 173.8c-2.88 0-5.61-1.57-7.03-4.28-1.01-1.92-1.2-4.11-.53-6.18.66-2.04 2.07-3.69 3.98-4.64 6.87-3.44 17.93-6.91 24.11-8.73-2.58-2.4-4.34-6.01-4.32-9.54 0-2.68 1.14-9.19 11.43-11.65 16.11-3.86 78.12 18.71 80.75 19.67l-1.37 3.76c-.16-.06-16.14-5.89-33.81-11.18-29.21-8.75-40.4-9.37-44.64-8.36-5.38 1.29-8.35 4.05-8.36 7.77-.01 3.88 3.08 7.55 5.86 8.23.88.22 1.51 1.01 1.52 1.92 0 .91-.6 1.71-1.48 1.95-.18.05-18.53 5.04-27.9 9.73-.94.47-1.64 1.28-1.96 2.29-.33 1.03-.24 2.13.27 3.09.96 1.83 3.13 2.61 5.04 1.82 9.17-3.8 21.12-8.32 26.15-8.25l-.06 4h-.08c-3.38 0-12.29 2.89-24.47 7.94-1.01.42-2.05.62-3.08.62l-.02.02Z"
|
|
259
|
+
fill={4278927075}
|
|
260
|
+
propList={
|
|
261
|
+
[
|
|
262
|
+
"fill",
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
/>
|
|
266
|
+
<RNSVGPath
|
|
267
|
+
d="M137.37 190.23c-3.78 0-7.45-2.01-9.39-5.54-2.16-3.92-1.62-8.82 1.33-12.19l1.47-1.68 3.01 2.63-1.47 1.68c-1.84 2.11-2.18 5.17-.83 7.63 1.76 3.21 5.81 4.41 9.02 2.67 12.01-6.5 20.08-9.56 23.94-9.11l-.47 3.97c-2.88-.34-10.93 2.9-21.57 8.66-1.6.87-3.33 1.28-5.04 1.28Z"
|
|
268
|
+
fill={4278927075}
|
|
269
|
+
propList={
|
|
270
|
+
[
|
|
271
|
+
"fill",
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
/>
|
|
275
|
+
<RNSVGPath
|
|
276
|
+
d="M240.29 213.7c-39.81-19.17-81.44-13.87-92.88-10.51-2.82.83-5.84.2-8.1-1.68-2.34-1.95-3.52-5.04-3.07-8.05l.77-5.2 3.96.59-.77 5.2c-.25 1.64.4 3.33 1.67 4.39 1.23 1.03 2.88 1.37 4.41.92 11.83-3.48 54.81-8.97 95.75 10.74l-1.73 3.6h-.01ZM169.508 150.199l-.698 3.939 10.348 1.834.698-3.939-10.348-1.834Z"
|
|
277
|
+
fill={4278927075}
|
|
278
|
+
propList={
|
|
279
|
+
[
|
|
280
|
+
"fill",
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
/>
|
|
284
|
+
<RNSVGPath
|
|
285
|
+
d="M191.07 170.8c-10.44-5.97-15.77-22.75-15.99-23.46l3.82-1.19c.05.16 5.09 15.99 14.16 21.18l-1.99 3.47ZM163.258 156.644l-3.982.38 2.844 29.854 3.982-.379-2.844-29.855Z"
|
|
286
|
+
fill={4278927075}
|
|
287
|
+
propList={
|
|
288
|
+
[
|
|
289
|
+
"fill",
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
/>
|
|
293
|
+
<RNSVGPath
|
|
294
|
+
d="M133.75 39.82c-4.15-4.68-9.41-8.27-15.31-10.44-5.9-2.18-12.26-2.88-18.5099-2.03-3.78.51-7.45 1.58-10.89 3.15-4.49 2.05-7.86 5.81-10.65 9.88l-3.1 4.53c-3.74-2.62-7.92-4.57-12.35-5.72-4.86-1.26-9.92-1.56-14.89-.88-4.97.68-9.77 2.33-14.1 4.86-4.33 2.52-8.13 5.87-11.16 9.85-3.04 3.98-5.25 8.52-6.53 13.35-1.28 4.83-1.59 9.87-.91 14.81.68 4.95 2.34 9.71 4.87 14.02 2.53 4.31 5.9 8.08 9.89 11.09L103.6 145.21l26.72-45.64 10.54-20.04c1.85-4.42 3.76-12.92 1.34-23.34-1.41-6.07-4.32-11.7-8.47-16.38l.02.01Z"
|
|
295
|
+
fill={4289392367}
|
|
296
|
+
propList={
|
|
297
|
+
[
|
|
298
|
+
"fill",
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
/>
|
|
302
|
+
<RNSVGPath
|
|
303
|
+
d="M25.2295 81.79c-.79 0-1.45-.62-1.5-1.42-1.37-25.26 18.17-33.75 28.7-34.71.83-.08 1.55.53 1.63 1.36.08.83-.53 1.55-1.35 1.63-1.12.11-27.54 2.92-25.98 31.56.04.83-.59 1.53-1.42 1.58h-.08Z"
|
|
304
|
+
fill={4278240714}
|
|
305
|
+
propList={
|
|
306
|
+
[
|
|
307
|
+
"fill",
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
/>
|
|
311
|
+
</RNSVGGroup>
|
|
312
|
+
</RNSVGSvgView>
|
|
313
|
+
</View>
|
|
314
|
+
</View>
|
|
315
|
+
</View>
|
|
316
|
+
`;
|
|
317
|
+
|
|
3
318
|
exports[`Test Banner Components Banner Snapshot 1`] = `
|
|
4
319
|
<View
|
|
5
320
|
accessibilityState={
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Alert } from "react-native";
|
|
3
3
|
import * as TestRenderer from "react-test-renderer";
|
|
4
|
+
import { TestRendererWithExperimentalEnabledContextProvider } from "../../../utils/testing";
|
|
4
5
|
import { Banner } from "../Banner";
|
|
5
6
|
const viewRef = /*#__PURE__*/React.createRef();
|
|
6
7
|
const onLinkPress = () => {
|
|
@@ -20,4 +21,18 @@ describe("Test Banner Components", () => {
|
|
|
20
21
|
expect(advice).toMatchSnapshot();
|
|
21
22
|
});
|
|
22
23
|
});
|
|
24
|
+
describe("Test Banner Components - Experimental Enabled", () => {
|
|
25
|
+
it("Banner Snapshot", () => {
|
|
26
|
+
const advice = TestRendererWithExperimentalEnabledContextProvider( /*#__PURE__*/React.createElement(Banner, {
|
|
27
|
+
viewRef: viewRef,
|
|
28
|
+
color: "neutral",
|
|
29
|
+
size: "big",
|
|
30
|
+
title: "Banner title",
|
|
31
|
+
pictogramName: "charity",
|
|
32
|
+
action: "Action text",
|
|
33
|
+
onPress: onLinkPress
|
|
34
|
+
})).toJSON();
|
|
35
|
+
expect(advice).toMatchSnapshot();
|
|
36
|
+
});
|
|
37
|
+
});
|
|
23
38
|
//# sourceMappingURL=banner.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Alert","TestRenderer","Banner","viewRef","createRef","onLinkPress","alert","describe","it","advice","create","createElement","color","size","title","pictogramName","action","onPress","toJSON","expect","toMatchSnapshot"],"sourceRoot":"../../../../../src","sources":["components/banner/__test__/banner.test.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,QAAc,cAAc;AAC1C,OAAO,KAAKC,YAAY,MAAM,qBAAqB;AACnD,SAASC,MAAM,QAAQ,WAAW;AAElC,MAAMC,OAAO,
|
|
1
|
+
{"version":3,"names":["React","Alert","TestRenderer","TestRendererWithExperimentalEnabledContextProvider","Banner","viewRef","createRef","onLinkPress","alert","describe","it","advice","create","createElement","color","size","title","pictogramName","action","onPress","toJSON","expect","toMatchSnapshot"],"sourceRoot":"../../../../../src","sources":["components/banner/__test__/banner.test.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,QAAc,cAAc;AAC1C,OAAO,KAAKC,YAAY,MAAM,qBAAqB;AACnD,SAASC,kDAAkD,QAAQ,wBAAwB;AAC3F,SAASC,MAAM,QAAQ,WAAW;AAElC,MAAMC,OAAO,gBAAGL,KAAK,CAACM,SAAS,CAAO,CAAC;AACvC,MAAMC,WAAW,GAAGA,CAAA,KAAM;EACxBN,KAAK,CAACO,KAAK,CAAC,OAAO,EAAE,kBAAkB,CAAC;AAC1C,CAAC;AAEDC,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,iBAAiB,EAAE,MAAM;IAC1B,MAAMC,MAAM,GAAGT,YAAY,CAACU,MAAM,eAChCZ,KAAA,CAAAa,aAAA,CAACT,MAAM;MACLC,OAAO,EAAEA,OAAQ;MACjBS,KAAK,EAAC,SAAS;MACfC,IAAI,EAAC,KAAK;MACVC,KAAK,EAAC,cAAc;MACpBC,aAAa,EAAC,SAAS;MACvBC,MAAM,EAAC,aAAa;MACpBC,OAAO,EAAEZ;IAAY,CACtB,CACH,CAAC,CAACa,MAAM,CAAC,CAAC;IACVC,MAAM,CAACV,MAAM,CAAC,CAACW,eAAe,CAAC,CAAC;EAClC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFb,QAAQ,CAAC,+CAA+C,EAAE,MAAM;EAC9DC,EAAE,CAAC,iBAAiB,EAAE,MAAM;IAC1B,MAAMC,MAAM,GAAGR,kDAAkD,eAC/DH,KAAA,CAAAa,aAAA,CAACT,MAAM;MACLC,OAAO,EAAEA,OAAQ;MACjBS,KAAK,EAAC,SAAS;MACfC,IAAI,EAAC,KAAK;MACVC,KAAK,EAAC,cAAc;MACpBC,aAAa,EAAC,SAAS;MACvBC,MAAM,EAAC,aAAa;MAC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