@pagopa/io-app-design-system 5.0.0-0 → 5.0.0-2
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/alert/Alert.js +3 -8
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/badge/Badge.js +26 -71
- package/lib/commonjs/components/badge/Badge.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +4 -4
- package/lib/commonjs/components/banner/Banner.js +6 -11
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -4
- package/lib/commonjs/components/banner/__test__/banner.test.js +0 -2
- package/lib/commonjs/components/banner/__test__/banner.test.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js +8 -3
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +12 -2
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +18 -10
- package/lib/commonjs/components/icons/Icon.js +5 -1
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/svg/IconTheme.js +28 -0
- package/lib/commonjs/components/icons/svg/IconTheme.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconTypeface.js +29 -0
- package/lib/commonjs/components/icons/svg/IconTypeface.js.map +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconTheme.svg +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconTypeface.svg +1 -0
- package/lib/commonjs/components/modules/ModulePaymentNotice.js +1 -1
- package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/commonjs/components/typography/ButtonText.js +8 -4
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/core/IOSpacing.js +2 -6
- package/lib/commonjs/core/IOSpacing.js.map +1 -1
- package/lib/module/components/alert/Alert.js +3 -8
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/badge/Badge.js +28 -72
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +4 -4
- package/lib/module/components/banner/Banner.js +7 -12
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -4
- package/lib/module/components/banner/__test__/banner.test.js +0 -2
- package/lib/module/components/banner/__test__/banner.test.js.map +1 -1
- package/lib/module/components/buttons/ButtonLink.js +9 -4
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +13 -3
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +18 -10
- package/lib/module/components/icons/Icon.js +5 -1
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/svg/IconTheme.js +20 -0
- package/lib/module/components/icons/svg/IconTheme.js.map +1 -0
- package/lib/module/components/icons/svg/IconTypeface.js +21 -0
- package/lib/module/components/icons/svg/IconTypeface.js.map +1 -0
- package/lib/module/components/icons/svg/originals/IconTheme.svg +1 -0
- package/lib/module/components/icons/svg/originals/IconTypeface.svg +1 -0
- package/lib/module/components/modules/ModulePaymentNotice.js +1 -1
- package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/module/components/typography/ButtonText.js +5 -2
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/core/IOSpacing.js +0 -2
- package/lib/module/core/IOSpacing.js.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts +0 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/badge/Badge.d.ts +1 -1
- package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts +1 -2
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts +6 -2
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +2 -0
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconTheme.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconTheme.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconTypeface.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconTypeface.d.ts.map +1 -0
- package/lib/typescript/components/typography/ButtonText.d.ts +1 -0
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/core/IOSpacing.d.ts +0 -2
- package/lib/typescript/core/IOSpacing.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/alert/Alert.tsx +4 -8
- package/src/components/badge/Badge.tsx +27 -83
- package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +4 -4
- package/src/components/banner/Banner.tsx +6 -17
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -4
- package/src/components/banner/__test__/banner.test.tsx +0 -2
- package/src/components/buttons/ButtonLink.tsx +21 -6
- package/src/components/buttons/ButtonSolid.tsx +18 -3
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +18 -10
- package/src/components/icons/Icon.tsx +5 -1
- package/src/components/icons/svg/IconTheme.tsx +16 -0
- package/src/components/icons/svg/IconTypeface.tsx +18 -0
- package/src/components/icons/svg/originals/IconTheme.svg +1 -0
- package/src/components/icons/svg/originals/IconTypeface.svg +1 -0
- package/src/components/modules/ModulePaymentNotice.tsx +1 -1
- package/src/components/typography/ButtonText.tsx +6 -3
- package/src/core/IOSpacing.ts +0 -2
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Platform, StyleSheet, View } from "react-native";
|
|
3
|
-
import { hexToRgba, IOBadgeHSpacing, IOBadgeRadius, IOBadgeVSpacing, IOColors, useIONewTypeface,
|
|
3
|
+
import { hexToRgba, IOBadgeHSpacing, IOBadgeRadius, IOBadgeVSpacing, IOColors, useIONewTypeface, useIOThemeContext } from "../../core";
|
|
4
4
|
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
5
5
|
import { IOText } from "../typography";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
NOTE FOR REFACTORING in the `io-app`:
|
|
9
|
+
|
|
10
|
+
- default (legacy) -> removed
|
|
11
|
+
- blue -> Deleted -> replaced with `default`
|
|
12
|
+
- info -> removed -> highlight?
|
|
13
|
+
- purple -> cgn
|
|
14
|
+
- turquoise -> highlight
|
|
15
|
+
- contrast -> removed
|
|
16
|
+
- lightBlue -> default
|
|
17
|
+
*/
|
|
18
|
+
|
|
6
19
|
const styles = StyleSheet.create({
|
|
7
20
|
badge: {
|
|
8
21
|
flexDirection: "row",
|
|
@@ -32,7 +45,6 @@ export const Badge = ({
|
|
|
32
45
|
variant,
|
|
33
46
|
testID
|
|
34
47
|
}) => {
|
|
35
|
-
const theme = useIOTheme();
|
|
36
48
|
const {
|
|
37
49
|
dynamicFontScale
|
|
38
50
|
} = useIOFontDynamicScale();
|
|
@@ -45,12 +57,8 @@ export const Badge = ({
|
|
|
45
57
|
const bgOpacityDarkMode = 0.2;
|
|
46
58
|
const mapVariantsLightMode = {
|
|
47
59
|
default: {
|
|
48
|
-
foreground: "
|
|
49
|
-
background: IOColors["
|
|
50
|
-
},
|
|
51
|
-
info: {
|
|
52
|
-
foreground: "info-850",
|
|
53
|
-
background: IOColors["info-100"]
|
|
60
|
+
foreground: "blueIO-850",
|
|
61
|
+
background: IOColors["blueIO-50"]
|
|
54
62
|
},
|
|
55
63
|
warning: {
|
|
56
64
|
foreground: "warning-850",
|
|
@@ -64,35 +72,19 @@ export const Badge = ({
|
|
|
64
72
|
foreground: "error-850",
|
|
65
73
|
background: IOColors["error-100"]
|
|
66
74
|
},
|
|
67
|
-
|
|
75
|
+
cgn: {
|
|
68
76
|
foreground: "hanPurple-500",
|
|
69
77
|
background: IOColors["hanPurple-100"]
|
|
70
78
|
},
|
|
71
|
-
|
|
72
|
-
foreground: "blueIO-850",
|
|
73
|
-
background: IOColors["blueIO-50"]
|
|
74
|
-
},
|
|
75
|
-
blue: {
|
|
76
|
-
foreground: "white",
|
|
77
|
-
background: IOColors[theme["interactiveElem-default"]]
|
|
78
|
-
},
|
|
79
|
-
turquoise: {
|
|
79
|
+
highlight: {
|
|
80
80
|
foreground: "turquoise-850",
|
|
81
81
|
background: IOColors["turquoise-50"]
|
|
82
|
-
},
|
|
83
|
-
contrast: {
|
|
84
|
-
foreground: "grey-700",
|
|
85
|
-
background: IOColors.white
|
|
86
82
|
}
|
|
87
83
|
};
|
|
88
84
|
const mapVariantsDarkMode = {
|
|
89
85
|
default: {
|
|
90
|
-
foreground: "
|
|
91
|
-
background: hexToRgba(IOColors["
|
|
92
|
-
},
|
|
93
|
-
info: {
|
|
94
|
-
foreground: "info-400",
|
|
95
|
-
background: hexToRgba(IOColors["info-400"], bgOpacityDarkMode)
|
|
86
|
+
foreground: "blueIO-200",
|
|
87
|
+
background: hexToRgba(IOColors["blueIO-200"], bgOpacityDarkMode)
|
|
96
88
|
},
|
|
97
89
|
warning: {
|
|
98
90
|
foreground: "warning-400",
|
|
@@ -106,33 +98,18 @@ export const Badge = ({
|
|
|
106
98
|
foreground: "error-400",
|
|
107
99
|
background: hexToRgba(IOColors["error-400"], bgOpacityDarkMode)
|
|
108
100
|
},
|
|
109
|
-
|
|
101
|
+
cgn: {
|
|
110
102
|
foreground: "hanPurple-250",
|
|
111
103
|
background: hexToRgba(IOColors["hanPurple-250"], bgOpacityDarkMode)
|
|
112
104
|
},
|
|
113
|
-
|
|
114
|
-
foreground: "blueIO-200",
|
|
115
|
-
background: hexToRgba(IOColors["blueIO-600"], bgOpacityDarkMode)
|
|
116
|
-
},
|
|
117
|
-
blue: {
|
|
118
|
-
foreground: "white",
|
|
119
|
-
background: IOColors[theme["interactiveElem-default"]]
|
|
120
|
-
},
|
|
121
|
-
turquoise: {
|
|
105
|
+
highlight: {
|
|
122
106
|
foreground: "turquoise-300",
|
|
123
107
|
background: hexToRgba(IOColors["turquoise-300"], bgOpacityDarkMode)
|
|
124
|
-
},
|
|
125
|
-
contrast: {
|
|
126
|
-
foreground: "grey-700",
|
|
127
|
-
background: IOColors.white
|
|
128
108
|
}
|
|
129
109
|
};
|
|
130
110
|
const mapOutlineVariantsLightMode = {
|
|
131
111
|
default: {
|
|
132
|
-
foreground: "
|
|
133
|
-
},
|
|
134
|
-
info: {
|
|
135
|
-
foreground: "info-850"
|
|
112
|
+
foreground: "blueIO-850"
|
|
136
113
|
},
|
|
137
114
|
warning: {
|
|
138
115
|
foreground: "warning-850"
|
|
@@ -143,28 +120,16 @@ export const Badge = ({
|
|
|
143
120
|
error: {
|
|
144
121
|
foreground: "error-850"
|
|
145
122
|
},
|
|
146
|
-
|
|
123
|
+
cgn: {
|
|
147
124
|
foreground: "hanPurple-500"
|
|
148
125
|
},
|
|
149
|
-
|
|
150
|
-
foreground: "blueIO-850"
|
|
151
|
-
},
|
|
152
|
-
blue: {
|
|
153
|
-
foreground: theme["interactiveElem-default"]
|
|
154
|
-
},
|
|
155
|
-
turquoise: {
|
|
126
|
+
highlight: {
|
|
156
127
|
foreground: "turquoise-850"
|
|
157
|
-
},
|
|
158
|
-
contrast: {
|
|
159
|
-
foreground: "grey-850"
|
|
160
128
|
}
|
|
161
129
|
};
|
|
162
130
|
const mapOutlineVariantsDarkMode = {
|
|
163
131
|
default: {
|
|
164
|
-
foreground: "
|
|
165
|
-
},
|
|
166
|
-
info: {
|
|
167
|
-
foreground: "info-400"
|
|
132
|
+
foreground: "blueIO-200"
|
|
168
133
|
},
|
|
169
134
|
warning: {
|
|
170
135
|
foreground: "warning-400"
|
|
@@ -175,20 +140,11 @@ export const Badge = ({
|
|
|
175
140
|
error: {
|
|
176
141
|
foreground: "error-400"
|
|
177
142
|
},
|
|
178
|
-
|
|
143
|
+
cgn: {
|
|
179
144
|
foreground: "hanPurple-250"
|
|
180
145
|
},
|
|
181
|
-
|
|
182
|
-
foreground: "blueIO-150"
|
|
183
|
-
},
|
|
184
|
-
blue: {
|
|
185
|
-
foreground: theme["interactiveElem-default"]
|
|
186
|
-
},
|
|
187
|
-
turquoise: {
|
|
146
|
+
highlight: {
|
|
188
147
|
foreground: "turquoise-300"
|
|
189
|
-
},
|
|
190
|
-
contrast: {
|
|
191
|
-
foreground: "grey-100"
|
|
192
148
|
}
|
|
193
149
|
};
|
|
194
150
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","StyleSheet","View","hexToRgba","IOBadgeHSpacing","IOBadgeRadius","IOBadgeVSpacing","IOColors","useIONewTypeface","
|
|
1
|
+
{"version":3,"names":["React","Platform","StyleSheet","View","hexToRgba","IOBadgeHSpacing","IOBadgeRadius","IOBadgeVSpacing","IOColors","useIONewTypeface","useIOThemeContext","useIOFontDynamicScale","IOText","styles","create","badge","flexDirection","alignItems","justifyContent","borderCurve","select","android","textAlignVertical","badgeStaticStyle","borderRadius","paddingHorizontal","paddingVertical","Badge","text","outline","allowFontScaling","variant","testID","dynamicFontScale","themeType","newTypefaceEnabled","bgOpacityDarkMode","mapVariantsLightMode","default","foreground","background","warning","success","error","cgn","highlight","mapVariantsDarkMode","mapOutlineVariantsLightMode","mapOutlineVariantsDarkMode","variantMap","dynamicStyle","createElement","accessible","style","borderWidth","borderColor","backgroundColor","undefined","font","weight","size","lineHeight","color","numberOfLines","ellipsizeMode","alignSelf","textTransform","letterSpacing","flexShrink"],"sourceRoot":"../../../../src","sources":["components/badge/Badge.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAE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,CAACU,gBAAgB,EACzDM,OAAO,GACH;MACEyB,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE/C,QAAQ,CAAC+B,UAAU;IAClC,CAAC,GACD;MACEiB,eAAe,EAAEhB,UAAU,IAAIiB;IACjC,CAAC;EACL,gBAEFzD,KAAA,CAAAmD,aAAA,CAACvC,MAAM;IACLkB,gBAAgB,EAAEA,gBAAiB;IACnC4B,IAAI,EAAEvB,kBAAkB,GAAG,UAAU,GAAG,kBAAmB;IAC3DwB,MAAM,EAAE,UAAW;IACnBC,IAAI,EAAE,EAAG;IACTC,UAAU,EAAE,EAAG;IACfC,KAAK,EAAEvB,UAAW;IAClBwB,aAAa,EAAE,CAAE;IACjBC,aAAa,EAAC,MAAM;IACpBX,KAAK,EAAE;MACLY,SAAS,EAAE,QAAQ;MACnBC,aAAa,EAAE,WAAW;MAC1BC,aAAa,EAAE,GAAG;MAClBC,UAAU,EAAE;IACd;EAAE,GAEDxC,IACK,CACJ,CAAC;AAEX,CAAC"}
|
|
@@ -17,7 +17,7 @@ exports[`Test Badge Components - Experimental Enabled Badge Snapshot 1`] = `
|
|
|
17
17
|
"paddingVertical": 4,
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
|
-
"backgroundColor": "#
|
|
20
|
+
"backgroundColor": "#E7ECFC",
|
|
21
21
|
},
|
|
22
22
|
]
|
|
23
23
|
}
|
|
@@ -31,7 +31,7 @@ exports[`Test Badge Components - Experimental Enabled Badge Snapshot 1`] = `
|
|
|
31
31
|
[
|
|
32
32
|
{},
|
|
33
33
|
{
|
|
34
|
-
"color": "#
|
|
34
|
+
"color": "#031344",
|
|
35
35
|
"fontFamily": "Titillio",
|
|
36
36
|
"fontSize": 12,
|
|
37
37
|
"fontStyle": "normal",
|
|
@@ -69,7 +69,7 @@ exports[`Test Badge Components Badge Snapshot 1`] = `
|
|
|
69
69
|
"paddingVertical": 4,
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
"backgroundColor": "#
|
|
72
|
+
"backgroundColor": "#E7ECFC",
|
|
73
73
|
},
|
|
74
74
|
]
|
|
75
75
|
}
|
|
@@ -83,7 +83,7 @@ exports[`Test Badge Components Badge Snapshot 1`] = `
|
|
|
83
83
|
[
|
|
84
84
|
{},
|
|
85
85
|
{
|
|
86
|
-
"color": "#
|
|
86
|
+
"color": "#031344",
|
|
87
87
|
"fontFamily": "Titillio",
|
|
88
88
|
"fontSize": 12,
|
|
89
89
|
"fontStyle": "normal",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
3
3
|
import Animated from "react-native-reanimated";
|
|
4
|
-
import { IOBannerBigSpacing, IOBannerRadius,
|
|
4
|
+
import { IOBannerBigSpacing, IOBannerRadius, IOStyles, useIONewTypeface, useIOTheme, useIOThemeContext } from "../../core";
|
|
5
5
|
import { hexToRgba, IOColors } from "../../core/IOColors";
|
|
6
6
|
import { useScaleAnimation } from "../../hooks";
|
|
7
7
|
import { IconButton } from "../buttons";
|
|
@@ -10,23 +10,21 @@ import { VSpacer } from "../spacer";
|
|
|
10
10
|
import { BodySmall, buttonTextFontSize, H6, IOText } from "../typography";
|
|
11
11
|
|
|
12
12
|
/* Styles */
|
|
13
|
-
const
|
|
14
|
-
const sizePictogramSmall = 64;
|
|
13
|
+
const sizePictogram = 80;
|
|
15
14
|
const closeButtonDistanceFromEdge = 6;
|
|
16
15
|
const closeButtonOpacity = 0.6;
|
|
17
|
-
const
|
|
18
|
-
const sizeSmallHPadding = IOBannerSmallHSpacing;
|
|
19
|
-
const sizeSmallVPadding = IOBannerSmallVSpacing;
|
|
16
|
+
const bannerPadding = IOBannerBigSpacing;
|
|
20
17
|
const styles = StyleSheet.create({
|
|
21
18
|
container: {
|
|
22
19
|
flexDirection: "row",
|
|
23
20
|
alignItems: "flex-start",
|
|
24
21
|
alignContent: "center",
|
|
22
|
+
padding: bannerPadding,
|
|
25
23
|
borderRadius: IOBannerRadius,
|
|
26
24
|
borderCurve: "continuous"
|
|
27
25
|
},
|
|
28
26
|
bleedPictogram: {
|
|
29
|
-
marginRight: -
|
|
27
|
+
marginRight: -bannerPadding
|
|
30
28
|
},
|
|
31
29
|
closeIconButton: {
|
|
32
30
|
position: "absolute",
|
|
@@ -60,7 +58,6 @@ const mapBackgroundColorDarkMode = {
|
|
|
60
58
|
};
|
|
61
59
|
export const Banner = ({
|
|
62
60
|
viewRef,
|
|
63
|
-
size,
|
|
64
61
|
color,
|
|
65
62
|
pictogramName,
|
|
66
63
|
title,
|
|
@@ -91,9 +88,7 @@ export const Banner = ({
|
|
|
91
88
|
const colorCloseButton = themeType === "dark" ? "contrast" : "neutral";
|
|
92
89
|
const colorMainButton = themeType === "dark" ? "blueIO-200" : theme["interactiveElem-default"];
|
|
93
90
|
const dynamicContainerStyles = {
|
|
94
|
-
backgroundColor: themeType === "dark" ? hexToRgba(IOColors[mapBackgroundColorDarkMode[color]], 0.1) : IOColors[mapBackgroundColorLightMode[color]]
|
|
95
|
-
paddingVertical: size === "big" ? sizeBigPadding : sizeSmallVPadding,
|
|
96
|
-
paddingHorizontal: size === "big" ? sizeBigPadding : sizeSmallHPadding
|
|
91
|
+
backgroundColor: themeType === "dark" ? hexToRgba(IOColors[mapBackgroundColorDarkMode[color]], 0.1) : IOColors[mapBackgroundColorLightMode[color]]
|
|
97
92
|
};
|
|
98
93
|
|
|
99
94
|
/* Generates a complete fallbackAccessibilityLabel by concatenating the title, content, and action
|
|
@@ -145,7 +140,7 @@ export const Banner = ({
|
|
|
145
140
|
style: [styles.bleedPictogram, IOStyles.selfCenter]
|
|
146
141
|
}, /*#__PURE__*/React.createElement(PictogramBleed, {
|
|
147
142
|
name: pictogramName,
|
|
148
|
-
size:
|
|
143
|
+
size: sizePictogram
|
|
149
144
|
})), onClose && labelClose && /*#__PURE__*/React.createElement(View, {
|
|
150
145
|
style: styles.closeIconButton
|
|
151
146
|
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Pressable","StyleSheet","View","Animated","IOBannerBigSpacing","IOBannerRadius","
|
|
1
|
+
{"version":3,"names":["React","Pressable","StyleSheet","View","Animated","IOBannerBigSpacing","IOBannerRadius","IOStyles","useIONewTypeface","useIOTheme","useIOThemeContext","hexToRgba","IOColors","useScaleAnimation","IconButton","PictogramBleed","VSpacer","BodySmall","buttonTextFontSize","H6","IOText","sizePictogram","closeButtonDistanceFromEdge","closeButtonOpacity","bannerPadding","styles","create","container","flexDirection","alignItems","alignContent","padding","borderRadius","borderCurve","bleedPictogram","marginRight","closeIconButton","position","right","top","opacity","bannerBackgroundColours","mapBackgroundColorLightMode","neutral","turquoise","mapBackgroundColorDarkMode","Banner","viewRef","color","pictogramName","title","content","action","labelClose","onPress","onClose","accessibilityHint","accessibilityLabel","testID","newTypefaceEnabled","onPressIn","onPressOut","scaleAnimatedStyle","themeType","theme","colorTitle","colorCloseButton","colorMainButton","dynamicContainerStyles","backgroundColor","fallbackAccessibilityLabel","filter","Boolean","join","renderMainBlock","createElement","Fragment","style","flex","selfCenter","accessible","accessibilityRole","undefined","size","weight","pointerEvents","importantForAccessibility","accessibilityElementsHidden","font","numberOfLines","ellipsizeMode","name","icon","PressableButton","ref","StaticComponent"],"sourceRoot":"../../../../src","sources":["components/banner/Banner.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAGEC,SAAS,EACTC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SACEC,kBAAkB,EAClBC,cAAc,EACdC,QAAQ,EACRC,gBAAgB,EAChBC,UAAU,EACVC,iBAAiB,QACZ,YAAY;AACnB,SAASC,SAAS,EAAEC,QAAQ,QAAQ,qBAAqB;AACzD,SAASC,iBAAiB,QAAQ,aAAa;AAE/C,SAASC,UAAU,QAAQ,YAAY;AACvC,SAGEC,cAAc,QACT,eAAe;AACtB,SAASC,OAAO,QAA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eAAe,CAAC,CACb,CACP;EAED,OAAOtB,MAAM,gBAAGpD,KAAA,CAAA2E,aAAA,CAACkB,eAAe,MAAE,CAAC,gBAAG7F,KAAA,CAAA2E,aAAA,CAACoB,eAAe,MAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -41,11 +41,10 @@ exports[`Test Banner Components - Experimental Enabled Banner Snapshot 1`] = `
|
|
|
41
41
|
"borderCurve": "continuous",
|
|
42
42
|
"borderRadius": 8,
|
|
43
43
|
"flexDirection": "row",
|
|
44
|
+
"padding": 16,
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
"backgroundColor": "#F4F5F8",
|
|
47
|
-
"paddingHorizontal": 16,
|
|
48
|
-
"paddingVertical": 16,
|
|
49
48
|
},
|
|
50
49
|
{
|
|
51
50
|
"transform": [
|
|
@@ -320,11 +319,10 @@ exports[`Test Banner Components Banner Snapshot 1`] = `
|
|
|
320
319
|
"borderCurve": "continuous",
|
|
321
320
|
"borderRadius": 8,
|
|
322
321
|
"flexDirection": "row",
|
|
322
|
+
"padding": 16,
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
"backgroundColor": "#F4F5F8",
|
|
326
|
-
"paddingHorizontal": 16,
|
|
327
|
-
"paddingVertical": 16,
|
|
328
326
|
},
|
|
329
327
|
{
|
|
330
328
|
"transform": [
|
|
@@ -10,7 +10,6 @@ describe("Test Banner Components", () => {
|
|
|
10
10
|
it("Banner Snapshot", () => {
|
|
11
11
|
const advice = TestRenderer.create( /*#__PURE__*/React.createElement(Banner, {
|
|
12
12
|
color: "neutral",
|
|
13
|
-
size: "big",
|
|
14
13
|
title: "Banner title",
|
|
15
14
|
pictogramName: "charity",
|
|
16
15
|
action: "Action text",
|
|
@@ -24,7 +23,6 @@ describe("Test Banner Components - Experimental Enabled", () => {
|
|
|
24
23
|
it("Banner Snapshot", () => {
|
|
25
24
|
const advice = TestRendererWithExperimentalEnabledContextProvider( /*#__PURE__*/React.createElement(Banner, {
|
|
26
25
|
color: "neutral",
|
|
27
|
-
size: "big",
|
|
28
26
|
title: "Banner title",
|
|
29
27
|
pictogramName: "charity",
|
|
30
28
|
action: "Action text",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Alert","TestRenderer","TestRendererWithExperimentalEnabledContextProvider","Banner","onLinkPress","alert","describe","it","advice","create","createElement","color","
|
|
1
|
+
{"version":3,"names":["React","Alert","TestRenderer","TestRendererWithExperimentalEnabledContextProvider","Banner","onLinkPress","alert","describe","it","advice","create","createElement","color","title","pictogramName","action","onPress","accessibilityLabel","toJSON","expect","toMatchSnapshot"],"sourceRoot":"../../../../../src","sources":["components/banner/__test__/banner.test.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,QAAQ,cAAc;AACpC,OAAO,KAAKC,YAAY,MAAM,qBAAqB;AACnD,SAASC,kDAAkD,QAAQ,wBAAwB;AAC3F,SAASC,MAAM,QAAQ,WAAW;AAElC,MAAMC,WAAW,GAAGA,CAAA,KAAM;EACxBJ,KAAK,CAACK,KAAK,CAAC,OAAO,EAAE,kBAAkB,CAAC;AAC1C,CAAC;AAEDC,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,iBAAiB,EAAE,MAAM;IAC1B,MAAMC,MAAM,GAAGP,YAAY,CAACQ,MAAM,eAChCV,KAAA,CAAAW,aAAA,CAACP,MAAM;MACLQ,KAAK,EAAC,SAAS;MACfC,KAAK,EAAC,cAAc;MACpBC,aAAa,EAAC,SAAS;MACvBC,MAAM,EAAC,aAAa;MACpBC,OAAO,EAAEX,WAAY;MACrBY,kBAAkB,EAAC;IAAa,CACjC,CACH,CAAC,CAACC,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,GAAGN,kDAAkD,eAC/DH,KAAA,CAAAW,aAAA,CAACP,MAAM;MACLQ,KAAK,EAAC,SAAS;MACfC,KAAK,EAAC,cAAc;MACpBC,aAAa,EAAC,SAAS;MACvBC,MAAM,EAAC,aAAa;MACpBC,OAAO,EAAEX,WAAY;MACrBY,kBAAkB,EAAC;IAAa,CACjC,CACH,CAAC,CAACC,MAAM,CAAC,CAAC;IACVC,MAAM,CAACV,MAAM,CAAC,CAACW,eAAe,CAAC,CAAC;EAClC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import Animated, { interpolateColor, useAnimatedProps, useAnimatedStyle, useRedu
|
|
|
4
4
|
import { IOButtonStyles, IOColors, hexToRgba, useIONewTypeface } from "../../core";
|
|
5
5
|
import { useScaleAnimation } from "../../hooks";
|
|
6
6
|
import { AnimatedIcon, IconClassComponent } from "../icons";
|
|
7
|
-
import { IOText, buttonTextFontSize } from "../typography";
|
|
7
|
+
import { IOText, buttonTextFontSize, buttonTextLineHeight } from "../typography";
|
|
8
8
|
const mapColorStates = {
|
|
9
9
|
// Primary button
|
|
10
10
|
primary: {
|
|
@@ -33,6 +33,8 @@ export const ButtonLink = /*#__PURE__*/forwardRef(({
|
|
|
33
33
|
onPress,
|
|
34
34
|
accessibilityLabel,
|
|
35
35
|
accessibilityHint,
|
|
36
|
+
numberOfLines = 1,
|
|
37
|
+
textAlign = "auto",
|
|
36
38
|
testID
|
|
37
39
|
}, ref) => {
|
|
38
40
|
var _mapColorStates$color, _mapColorStates$color2, _mapColorStates$color3;
|
|
@@ -121,12 +123,15 @@ export const ButtonLink = /*#__PURE__*/forwardRef(({
|
|
|
121
123
|
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
122
124
|
weight: "Semibold",
|
|
123
125
|
size: buttonTextFontSize,
|
|
124
|
-
|
|
126
|
+
lineHeight: buttonTextLineHeight,
|
|
127
|
+
style: [disabled ? {
|
|
125
128
|
color: (_mapColorStates$color3 = mapColorStates[color]) === null || _mapColorStates$color3 === void 0 || (_mapColorStates$color3 = _mapColorStates$color3.label) === null || _mapColorStates$color3 === void 0 ? void 0 : _mapColorStates$color3.disabled
|
|
126
129
|
} : {
|
|
127
130
|
...pressedColorLabelAnimationStyle
|
|
128
|
-
},
|
|
129
|
-
|
|
131
|
+
}, {
|
|
132
|
+
textAlign
|
|
133
|
+
}],
|
|
134
|
+
numberOfLines: numberOfLines,
|
|
130
135
|
ellipsizeMode: "tail"
|
|
131
136
|
}, label)));
|
|
132
137
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","Pressable","Animated","interpolateColor","useAnimatedProps","useAnimatedStyle","useReducedMotion","IOButtonStyles","IOColors","hexToRgba","useIONewTypeface","useScaleAnimation","AnimatedIcon","IconClassComponent","IOText","buttonTextFontSize","mapColorStates","primary","label","default","pressed","disabled","contrast","white","DISABLED_OPACITY","ICON_MARGIN","ButtonLink","color","icon","iconPosition","onPress","accessibilityLabel","accessibilityHint","testID","ref","_mapColorStates$color","_mapColorStates$color2","_mapColorStates$color3","newTypefaceEnabled","progress","onPressIn","onPressOut","scaleAnimatedStyle","reducedMotion","AnimatedIOText","createAnimatedComponent","pressedColorLabelAnimationStyle","labelColor","value","pressedColorIconAnimationStyle","iconColor","AnimatedIconClassComponent","iconSize","iconMargin","createElement","accessibilityRole","accessibilityState","onTouchEnd","accessible","hitSlop","top","right","bottom","left","style","dimensionsDefault","View","buttonLink","flexDirection","columnGap","opacity","allowFontScaling","name","animatedProps","size","accessibilityElementsHidden","importantForAccessibility","font","weight","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","Pressable","Animated","interpolateColor","useAnimatedProps","useAnimatedStyle","useReducedMotion","IOButtonStyles","IOColors","hexToRgba","useIONewTypeface","useScaleAnimation","AnimatedIcon","IconClassComponent","IOText","buttonTextFontSize","buttonTextLineHeight","mapColorStates","primary","label","default","pressed","disabled","contrast","white","DISABLED_OPACITY","ICON_MARGIN","ButtonLink","color","icon","iconPosition","onPress","accessibilityLabel","accessibilityHint","numberOfLines","textAlign","testID","ref","_mapColorStates$color","_mapColorStates$color2","_mapColorStates$color3","newTypefaceEnabled","progress","onPressIn","onPressOut","scaleAnimatedStyle","reducedMotion","AnimatedIOText","createAnimatedComponent","pressedColorLabelAnimationStyle","labelColor","value","pressedColorIconAnimationStyle","iconColor","AnimatedIconClassComponent","iconSize","iconMargin","createElement","accessibilityRole","accessibilityState","onTouchEnd","accessible","hitSlop","top","right","bottom","left","style","dimensionsDefault","View","buttonLink","flexDirection","columnGap","opacity","allowFontScaling","name","animatedProps","size","accessibilityElementsHidden","importantForAccessibility","font","weight","lineHeight","ellipsizeMode"],"sourceRoot":"../../../../src","sources":["components/buttons/ButtonLink.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAEEC,SAAS,QAGJ,cAAc;AACrB,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAChC,SACEC,cAAc,EACdC,QAAQ,EAERC,SAAS,EACTC,gBAAgB,QACX,YAAY;AACnB,SAASC,iBAAiB,QAAQ,aAAa;AAE/C,SACEC,YAAY,EAGZC,kBAAkB,QACb,UAAU;AACjB,SACEC,MAAM,EACNC,kBAAkB,EAClBC,oBAAoB,QACf,eAAe;AA4BtB,MAAMC,cAGL,GAAG;EACF;EACAC,OAAO,EAAE;IACPC,KAAK,EAAE;MACLC,OAAO,EAAEZ,QAAQ,CAAC,YAAY,CAAC;MAC/Ba,OAAO,EAAEb,QAAQ,CAAC,YAAY,CAAC;MAC/Bc,QAAQ,EAAEd,QAAQ,CAAC,UAAU;IAC/B;EACF,CAAC;EACDe,QAAQ,EAAE;IACRJ,KAAK,EAAE;MACLC,OAAO,EAAEZ,QAAQ,CAACgB,KAAK;MACvBH,OAAO,EAAEZ,SAAS,C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AArBA,sBAAA,CAAuBrB,KAAK,cAAAqB,sBAAA,uBAA5BA,sBAAA,CAA8BlB;IAAS,CAAC,GACjD;MAAE,GAAG2B;IAAgC,CAAC,EAC1C;MAAEd;IAAU,CAAC,CACb;IACFD,aAAa,EAAEA,aAAc;IAC7BiD,aAAa,EAAC;EAAM,GAEnBhE,KACa,CACH,CACN,CAAC;AAEhB,CACF,CAAC;AAED,eAAeQ,UAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback } from "react";
|
|
1
|
+
import React, { useCallback, useEffect, useRef } from "react";
|
|
2
2
|
import { Pressable, StyleSheet } from "react-native";
|
|
3
3
|
import ReactNativeHapticFeedback from "react-native-haptic-feedback";
|
|
4
4
|
import Animated, { interpolateColor, useAnimatedStyle, useReducedMotion } from "react-native-reanimated";
|
|
@@ -70,6 +70,16 @@ export const ButtonSolid = /*#__PURE__*/React.forwardRef(({
|
|
|
70
70
|
} = useScaleAnimation();
|
|
71
71
|
const reducedMotion = useReducedMotion();
|
|
72
72
|
|
|
73
|
+
/* Prevent the component from triggering the `isEntering' transition
|
|
74
|
+
on the on the first render. Solution from this discussion:
|
|
75
|
+
https://github.com/software-mansion/react-native-reanimated/discussions/2513
|
|
76
|
+
*/
|
|
77
|
+
const isMounted = useRef(false);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
// eslint-disable-next-line functional/immutable-data
|
|
80
|
+
isMounted.current = true;
|
|
81
|
+
}, []);
|
|
82
|
+
|
|
73
83
|
// Interpolate animation values from `isPressed` values
|
|
74
84
|
const pressedAnimationStyle = useAnimatedStyle(() => {
|
|
75
85
|
// Link color states to the pressed states
|
|
@@ -121,7 +131,7 @@ export const ButtonSolid = /*#__PURE__*/React.forwardRef(({
|
|
|
121
131
|
!disabled && !reducedMotion && scaleAnimatedStyle, !disabled && pressedAnimationStyle]
|
|
122
132
|
}, loading && /*#__PURE__*/React.createElement(Animated.View, {
|
|
123
133
|
style: IOButtonStyles.buttonInner,
|
|
124
|
-
entering: enterTransitionInnerContentSmall,
|
|
134
|
+
entering: isMounted.current ? enterTransitionInnerContentSmall : undefined,
|
|
125
135
|
exiting: exitTransitionInnerContent
|
|
126
136
|
}, /*#__PURE__*/React.createElement(LoadingSpinner, {
|
|
127
137
|
color: foregroundColor
|
|
@@ -134,7 +144,7 @@ export const ButtonSolid = /*#__PURE__*/React.forwardRef(({
|
|
|
134
144
|
iconPosition === "end" && {
|
|
135
145
|
flexDirection: "row-reverse"
|
|
136
146
|
}],
|
|
137
|
-
entering: enterTransitionInnerContent
|
|
147
|
+
entering: isMounted.current ? enterTransitionInnerContent : undefined
|
|
138
148
|
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
139
149
|
allowFontScaling: true,
|
|
140
150
|
name: icon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","Pressable","StyleSheet","ReactNativeHapticFeedback","Animated","interpolateColor","useAnimatedStyle","useReducedMotion","IOButtonStyles","IOColors","enterTransitionInnerContent","enterTransitionInnerContentSmall","exitTransitionInnerContent","useScaleAnimation","Icon","LoadingSpinner","ButtonText","colorPrimaryButtonDisabled","ICON_MARGIN","DISABLED_OPACITY","iconSize","styles","create","backgroundDisabled","backgroundColor","opacity","mapColorStates","primary","default","pressed","label","disabled","danger","contrast","white","ButtonSolid","forwardRef","color","fullWidth","loading","icon","iconPosition","onPress","accessibilityLabel","accessibilityHint","testID","ref","_mapColorStates$color","_mapColorStates$color2","_mapColorStates$color3","progress","onPressIn","onPressOut","scaleAnimatedStyle","reducedMotion","pressedAnimationStyle","value","handleOnPress","event","trigger","foregroundColor","createElement","accessible","accessibilityState","busy","accessibilityRole","style","dimensionsDefault","View","button","buttonSizeDefault","overflow","paddingHorizontal","buttonInner","entering","exiting","columnGap","flexDirection","allowFontScaling","name","size","numberOfLines","ellipsizeMode","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/buttons/ButtonSolid.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAoBC,WAAW,QAAQ,OAAO;
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useRef","Pressable","StyleSheet","ReactNativeHapticFeedback","Animated","interpolateColor","useAnimatedStyle","useReducedMotion","IOButtonStyles","IOColors","enterTransitionInnerContent","enterTransitionInnerContentSmall","exitTransitionInnerContent","useScaleAnimation","Icon","LoadingSpinner","ButtonText","colorPrimaryButtonDisabled","ICON_MARGIN","DISABLED_OPACITY","iconSize","styles","create","backgroundDisabled","backgroundColor","opacity","mapColorStates","primary","default","pressed","label","disabled","danger","contrast","white","ButtonSolid","forwardRef","color","fullWidth","loading","icon","iconPosition","onPress","accessibilityLabel","accessibilityHint","testID","ref","_mapColorStates$color","_mapColorStates$color2","_mapColorStates$color3","progress","onPressIn","onPressOut","scaleAnimatedStyle","reducedMotion","isMounted","current","pressedAnimationStyle","value","handleOnPress","event","trigger","foregroundColor","createElement","accessible","accessibilityState","busy","accessibilityRole","style","dimensionsDefault","View","button","buttonSizeDefault","overflow","paddingHorizontal","buttonInner","entering","undefined","exiting","columnGap","flexDirection","allowFontScaling","name","size","numberOfLines","ellipsizeMode","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/buttons/ButtonSolid.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAoBC,WAAW,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC7E,SAEEC,SAAS,EACTC,UAAU,QAEL,cAAc;AACrB,OAAOC,yBAAyB,MAAM,8BAA8B;AACpE,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAChC,SACEC,cAAc,EACdC,QAAQ,EACRC,2BAA2B,EAC3BC,gCAAgC,EAChCC,0BAA0B,QACrB,YAAY;AACnB,SAASC,iBAAiB,QAAQ,aAAa;AAE/C,SAAmCC,IAAI,QAAQ,UAAU;AACzD,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,U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ACNrB,SAAS,CAACC,OAAO,GAAG7C,gCAAgC,GAAGkE,SACxD;IACDC,OAAO,EAAElE;EAA2B,gBAEpCf,KAAA,CAAAkE,aAAA,CAAChD,cAAc;IAACsB,KAAK,EAAEyB;EAAgB,CAAE,CAC5B,CAChB,EAEA,CAACvB,OAAO,iBACP1C,KAAA,CAAAkE,aAAA,CAAC3D,QAAQ,CAACkE,IAAI;IACZF,KAAK,EAAE,CACL5D,cAAc,CAACmE,WAAW,EAC1B;MAAEI,SAAS,EAAE7D;IAAY,CAAC;IAC1B;AAChB;IACgBuB,YAAY,KAAK,KAAK,IAAI;MAAEuC,aAAa,EAAE;IAAc,CAAC,CAC1D;IACFJ,QAAQ,EACNrB,SAAS,CAACC,OAAO,GAAG9C,2BAA2B,GAAGmE;EACnD,GAEArC,IAAI,iBACH3C,KAAA,CAAAkE,aAAA,CAACjD,IAAI;IACHmE,gBAAgB;IAChBC,IAAI,EAAE1C,IAAK;IACX2C,IAAI,EAAE/D,QAAS;IACfiB,KAAK,EAAEyB;EAAgB,CACxB,CACF,eACDjE,KAAA,CAAAkE,aAAA,CAAC/C,UAAU;IACTqB,KAAK,EAAEyB,eAAgB;IACvBM,KAAK,EAAE5D,cAAc,CAACsB,KAAM;IAC5BsD,aAAa,EAAE,CAAE;IACjBC,aAAa,EAAC,MAAM;IACpBrB,UAAU,EAAE,KAAM;IAClBsB,2BAA2B;IAC3BC,yBAAyB,EAAC;EAAqB,GAE9CzD,KACS,CACC,CAEJ,CACN,CAAC;AAEhB,CACF,CAAC;AAED,eAAeK,WAAW"}
|
|
@@ -93,11 +93,16 @@ exports[`Test Buttons Components - Experimental Enabled ButtonLink Snapshot 1`]
|
|
|
93
93
|
"fontSize": 16,
|
|
94
94
|
"fontStyle": "normal",
|
|
95
95
|
"fontWeight": "600",
|
|
96
|
-
"lineHeight":
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"color": undefined,
|
|
96
|
+
"lineHeight": 20,
|
|
100
97
|
},
|
|
98
|
+
[
|
|
99
|
+
{
|
|
100
|
+
"color": undefined,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"textAlign": "auto",
|
|
104
|
+
},
|
|
105
|
+
],
|
|
101
106
|
]
|
|
102
107
|
}
|
|
103
108
|
>
|
|
@@ -300,7 +305,6 @@ exports[`Test Buttons Components - Experimental Enabled ButtonSolid Snapshot 1`]
|
|
|
300
305
|
}
|
|
301
306
|
>
|
|
302
307
|
<View
|
|
303
|
-
entering={[Function]}
|
|
304
308
|
style={
|
|
305
309
|
[
|
|
306
310
|
{
|
|
@@ -833,11 +837,16 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
833
837
|
"fontSize": 16,
|
|
834
838
|
"fontStyle": "normal",
|
|
835
839
|
"fontWeight": "600",
|
|
836
|
-
"lineHeight":
|
|
837
|
-
},
|
|
838
|
-
{
|
|
839
|
-
"color": undefined,
|
|
840
|
+
"lineHeight": 20,
|
|
840
841
|
},
|
|
842
|
+
[
|
|
843
|
+
{
|
|
844
|
+
"color": undefined,
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"textAlign": "auto",
|
|
848
|
+
},
|
|
849
|
+
],
|
|
841
850
|
]
|
|
842
851
|
}
|
|
843
852
|
>
|
|
@@ -1040,7 +1049,6 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1040
1049
|
}
|
|
1041
1050
|
>
|
|
1042
1051
|
<View
|
|
1043
|
-
entering={[Function]}
|
|
1044
1052
|
style={
|
|
1045
1053
|
[
|
|
1046
1054
|
{
|