@pagopa/io-app-design-system 4.4.3 → 4.4.5
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/buttons/ButtonLink.js +8 -3
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +18 -8
- package/lib/commonjs/components/numberpad/NumberButton.js +9 -2
- package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
- package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +40 -20
- package/lib/commonjs/components/typography/ButtonText.js +5 -3
- package/lib/commonjs/components/typography/ButtonText.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/__test__/__snapshots__/button.test.tsx.snap +18 -8
- package/lib/module/components/numberpad/NumberButton.js +10 -3
- package/lib/module/components/numberpad/NumberButton.js.map +1 -1
- package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +40 -20
- package/lib/module/components/typography/ButtonText.js +2 -1
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts +5 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
- package/lib/typescript/components/typography/ButtonText.d.ts +1 -0
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/buttons/ButtonLink.tsx +21 -6
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +18 -8
- package/src/components/numberpad/NumberButton.tsx +13 -2
- package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +40 -20
- package/src/components/typography/ButtonText.tsx +2 -1
|
@@ -60,6 +60,8 @@ const ButtonLink = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
60
60
|
onPress,
|
|
61
61
|
accessibilityLabel,
|
|
62
62
|
accessibilityHint,
|
|
63
|
+
numberOfLines = 1,
|
|
64
|
+
textAlign = "auto",
|
|
63
65
|
testID
|
|
64
66
|
}, ref) => {
|
|
65
67
|
var _colorMap$color, _colorMap$color2, _colorMap$color3;
|
|
@@ -136,12 +138,15 @@ const ButtonLink = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
136
138
|
font: isExperimental ? "Titillio" : "TitilliumSansPro",
|
|
137
139
|
weight: "Semibold",
|
|
138
140
|
size: _typography.buttonTextFontSize,
|
|
139
|
-
|
|
141
|
+
lineHeight: _typography.buttonTextLineHeight,
|
|
142
|
+
style: [disabled ? {
|
|
140
143
|
color: (_colorMap$color3 = colorMap[color]) === null || _colorMap$color3 === void 0 || (_colorMap$color3 = _colorMap$color3.label) === null || _colorMap$color3 === void 0 ? void 0 : _colorMap$color3.disabled
|
|
141
144
|
} : {
|
|
142
145
|
...pressedColorAnimationStyle
|
|
143
|
-
},
|
|
144
|
-
|
|
146
|
+
}, {
|
|
147
|
+
textAlign
|
|
148
|
+
}],
|
|
149
|
+
numberOfLines: numberOfLines,
|
|
145
150
|
ellipsizeMode: "tail"
|
|
146
151
|
}, label)));
|
|
147
152
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","_hooks","_icons","_typography","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","mapColorStates","primary","label","IOColors","pressed","disabled","contrast","white","hexToRgba","mapLegacyColorStates","blue","DISABLED_OPACITY","ICON_MARGIN","ButtonLink","forwardRef","color","icon","iconPosition","onPress","accessibilityLabel","accessibilityHint","testID","ref","_colorMap$color","_colorMap$color2","_colorMap$color3","isExperimental","useIOExperimentalDesign","progress","onPressIn","onPressOut","scaleAnimatedStyle","useScaleAnimation","reducedMotion","useReducedMotion","colorMap","useMemo","AnimatedIOText","Animated","createAnimatedComponent","IOText","pressedColorAnimationStyle","useAnimatedStyle","interpolateColor","value","AnimatedIconClassComponent","IconClassComponent","iconSize","iconMargin","createElement","Pressable","accessibilityRole","accessibilityState","onTouchEnd","accessible","hitSlop","top","right","bottom","left","style","IOButtonStyles","dimensionsDefault","View","buttonLink","flexDirection","columnGap","opacity","allowFontScaling","name","animatedProps","size","AnimatedIcon","accessibilityElementsHidden","importantForAccessibility","font","weight","buttonTextFontSize","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","_hooks","_icons","_typography","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","mapColorStates","primary","label","IOColors","pressed","disabled","contrast","white","hexToRgba","mapLegacyColorStates","blue","DISABLED_OPACITY","ICON_MARGIN","ButtonLink","forwardRef","color","icon","iconPosition","onPress","accessibilityLabel","accessibilityHint","numberOfLines","textAlign","testID","ref","_colorMap$color","_colorMap$color2","_colorMap$color3","isExperimental","useIOExperimentalDesign","progress","onPressIn","onPressOut","scaleAnimatedStyle","useScaleAnimation","reducedMotion","useReducedMotion","colorMap","useMemo","AnimatedIOText","Animated","createAnimatedComponent","IOText","pressedColorAnimationStyle","useAnimatedStyle","interpolateColor","value","AnimatedIconClassComponent","IconClassComponent","iconSize","iconMargin","createElement","Pressable","accessibilityRole","accessibilityState","onTouchEnd","accessible","hitSlop","top","right","bottom","left","style","IOButtonStyles","dimensionsDefault","View","buttonLink","flexDirection","columnGap","opacity","allowFontScaling","name","animatedProps","size","AnimatedIcon","accessibilityElementsHidden","importantForAccessibility","font","weight","buttonTextFontSize","lineHeight","buttonTextLineHeight","ell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[`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
|
>
|
|
@@ -832,11 +837,16 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
832
837
|
"fontSize": 16,
|
|
833
838
|
"fontStyle": "normal",
|
|
834
839
|
"fontWeight": "600",
|
|
835
|
-
"lineHeight":
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
"color": undefined,
|
|
840
|
+
"lineHeight": 20,
|
|
839
841
|
},
|
|
842
|
+
[
|
|
843
|
+
{
|
|
844
|
+
"color": undefined,
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"textAlign": "auto",
|
|
848
|
+
},
|
|
849
|
+
],
|
|
840
850
|
]
|
|
841
851
|
}
|
|
842
852
|
>
|
|
@@ -73,8 +73,15 @@ const NumberButton = /*#__PURE__*/(0, _react.memo)(({
|
|
|
73
73
|
onPress: handleOnPress
|
|
74
74
|
}, /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
|
|
75
75
|
style: [_core.IONumberPadButtonStyles.button, _core.IONumberPadButtonStyles.circularShape, _core.IONumberPadButtonStyles.buttonSize, pressedAnimationStyle, !reducedMotion && scaleAnimatedStyle]
|
|
76
|
-
}, /*#__PURE__*/_react.default.createElement(_typography.
|
|
77
|
-
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_typography.IOText, {
|
|
77
|
+
size: 22,
|
|
78
|
+
font: isExperimental ? "Titillio" : "TitilliumSansPro",
|
|
79
|
+
weight: "Semibold",
|
|
80
|
+
color: colors.foreground,
|
|
81
|
+
style: {
|
|
82
|
+
// Additional prop for Android
|
|
83
|
+
textAlignVertical: "center"
|
|
84
|
+
}
|
|
78
85
|
}, number)));
|
|
79
86
|
});
|
|
80
87
|
exports.NumberButton = NumberButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","_hooks","_typography","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","colorMap","light","background","IOColors","pressed","foreground","dark","legacyColorMap","hexToRgba","black","white","NumberButton","memo","number","variant","onPress","progress","onPressIn","onPressOut","scaleAnimatedStyle","useScaleAnimation","reducedMotion","useReducedMotion","isExperimental","useIOExperimentalDesign","colors","useMemo","pressedAnimationStyle","useAnimatedStyle","backgroundColor","interpolateColor","value","handleOnPress","useCallback","createElement","Pressable","accessible","accessibilityRole","View","style","IONumberPadButtonStyles","button","circularShape","buttonSize","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_core","_hooks","_typography","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","colorMap","light","background","IOColors","pressed","foreground","dark","legacyColorMap","hexToRgba","black","white","NumberButton","memo","number","variant","onPress","progress","onPressIn","onPressOut","scaleAnimatedStyle","useScaleAnimation","reducedMotion","useReducedMotion","isExperimental","useIOExperimentalDesign","colors","useMemo","pressedAnimationStyle","useAnimatedStyle","backgroundColor","interpolateColor","value","handleOnPress","useCallback","createElement","Pressable","accessible","accessibilityRole","View","style","IONumberPadButtonStyles","button","circularShape","buttonSize","IOText","size","font","weight","color","textAlignVertical","exports"],"sourceRoot":"../../../../src","sources":["components/numberpad/NumberButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AAMA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAAuC,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAA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EvB,MAAM,CAACpB,UAAW;IACzBkC,KAAK,EAAE;MACL;MACAU,iBAAiB,EAAE;IACrB;EAAE,GAEDpC,MACK,CACK,CACN,CAAC;AAEhB,CACF,CAAC;AAACqC,OAAA,CAAAvC,YAAA,GAAAA,YAAA"}
|
|
@@ -93,7 +93,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
93
93
|
>
|
|
94
94
|
<Text
|
|
95
95
|
allowFontScaling={true}
|
|
96
|
-
dynamicTypeRamp="title2"
|
|
97
96
|
maxFontSizeMultiplier={1.5}
|
|
98
97
|
style={
|
|
99
98
|
[
|
|
@@ -104,7 +103,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
104
103
|
"fontSize": 22,
|
|
105
104
|
"fontStyle": "normal",
|
|
106
105
|
"fontWeight": "600",
|
|
107
|
-
"lineHeight":
|
|
106
|
+
"lineHeight": undefined,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"textAlignVertical": "center",
|
|
108
110
|
},
|
|
109
111
|
]
|
|
110
112
|
}
|
|
@@ -174,7 +176,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
174
176
|
>
|
|
175
177
|
<Text
|
|
176
178
|
allowFontScaling={true}
|
|
177
|
-
dynamicTypeRamp="title2"
|
|
178
179
|
maxFontSizeMultiplier={1.5}
|
|
179
180
|
style={
|
|
180
181
|
[
|
|
@@ -185,7 +186,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
185
186
|
"fontSize": 22,
|
|
186
187
|
"fontStyle": "normal",
|
|
187
188
|
"fontWeight": "600",
|
|
188
|
-
"lineHeight":
|
|
189
|
+
"lineHeight": undefined,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"textAlignVertical": "center",
|
|
189
193
|
},
|
|
190
194
|
]
|
|
191
195
|
}
|
|
@@ -255,7 +259,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
255
259
|
>
|
|
256
260
|
<Text
|
|
257
261
|
allowFontScaling={true}
|
|
258
|
-
dynamicTypeRamp="title2"
|
|
259
262
|
maxFontSizeMultiplier={1.5}
|
|
260
263
|
style={
|
|
261
264
|
[
|
|
@@ -266,7 +269,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
266
269
|
"fontSize": 22,
|
|
267
270
|
"fontStyle": "normal",
|
|
268
271
|
"fontWeight": "600",
|
|
269
|
-
"lineHeight":
|
|
272
|
+
"lineHeight": undefined,
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"textAlignVertical": "center",
|
|
270
276
|
},
|
|
271
277
|
]
|
|
272
278
|
}
|
|
@@ -352,7 +358,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
352
358
|
>
|
|
353
359
|
<Text
|
|
354
360
|
allowFontScaling={true}
|
|
355
|
-
dynamicTypeRamp="title2"
|
|
356
361
|
maxFontSizeMultiplier={1.5}
|
|
357
362
|
style={
|
|
358
363
|
[
|
|
@@ -363,7 +368,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
363
368
|
"fontSize": 22,
|
|
364
369
|
"fontStyle": "normal",
|
|
365
370
|
"fontWeight": "600",
|
|
366
|
-
"lineHeight":
|
|
371
|
+
"lineHeight": undefined,
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"textAlignVertical": "center",
|
|
367
375
|
},
|
|
368
376
|
]
|
|
369
377
|
}
|
|
@@ -433,7 +441,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
433
441
|
>
|
|
434
442
|
<Text
|
|
435
443
|
allowFontScaling={true}
|
|
436
|
-
dynamicTypeRamp="title2"
|
|
437
444
|
maxFontSizeMultiplier={1.5}
|
|
438
445
|
style={
|
|
439
446
|
[
|
|
@@ -444,7 +451,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
444
451
|
"fontSize": 22,
|
|
445
452
|
"fontStyle": "normal",
|
|
446
453
|
"fontWeight": "600",
|
|
447
|
-
"lineHeight":
|
|
454
|
+
"lineHeight": undefined,
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"textAlignVertical": "center",
|
|
448
458
|
},
|
|
449
459
|
]
|
|
450
460
|
}
|
|
@@ -514,7 +524,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
514
524
|
>
|
|
515
525
|
<Text
|
|
516
526
|
allowFontScaling={true}
|
|
517
|
-
dynamicTypeRamp="title2"
|
|
518
527
|
maxFontSizeMultiplier={1.5}
|
|
519
528
|
style={
|
|
520
529
|
[
|
|
@@ -525,7 +534,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
525
534
|
"fontSize": 22,
|
|
526
535
|
"fontStyle": "normal",
|
|
527
536
|
"fontWeight": "600",
|
|
528
|
-
"lineHeight":
|
|
537
|
+
"lineHeight": undefined,
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"textAlignVertical": "center",
|
|
529
541
|
},
|
|
530
542
|
]
|
|
531
543
|
}
|
|
@@ -611,7 +623,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
611
623
|
>
|
|
612
624
|
<Text
|
|
613
625
|
allowFontScaling={true}
|
|
614
|
-
dynamicTypeRamp="title2"
|
|
615
626
|
maxFontSizeMultiplier={1.5}
|
|
616
627
|
style={
|
|
617
628
|
[
|
|
@@ -622,7 +633,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
622
633
|
"fontSize": 22,
|
|
623
634
|
"fontStyle": "normal",
|
|
624
635
|
"fontWeight": "600",
|
|
625
|
-
"lineHeight":
|
|
636
|
+
"lineHeight": undefined,
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"textAlignVertical": "center",
|
|
626
640
|
},
|
|
627
641
|
]
|
|
628
642
|
}
|
|
@@ -692,7 +706,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
692
706
|
>
|
|
693
707
|
<Text
|
|
694
708
|
allowFontScaling={true}
|
|
695
|
-
dynamicTypeRamp="title2"
|
|
696
709
|
maxFontSizeMultiplier={1.5}
|
|
697
710
|
style={
|
|
698
711
|
[
|
|
@@ -703,7 +716,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
703
716
|
"fontSize": 22,
|
|
704
717
|
"fontStyle": "normal",
|
|
705
718
|
"fontWeight": "600",
|
|
706
|
-
"lineHeight":
|
|
719
|
+
"lineHeight": undefined,
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"textAlignVertical": "center",
|
|
707
723
|
},
|
|
708
724
|
]
|
|
709
725
|
}
|
|
@@ -773,7 +789,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
773
789
|
>
|
|
774
790
|
<Text
|
|
775
791
|
allowFontScaling={true}
|
|
776
|
-
dynamicTypeRamp="title2"
|
|
777
792
|
maxFontSizeMultiplier={1.5}
|
|
778
793
|
style={
|
|
779
794
|
[
|
|
@@ -784,7 +799,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
784
799
|
"fontSize": 22,
|
|
785
800
|
"fontStyle": "normal",
|
|
786
801
|
"fontWeight": "600",
|
|
787
|
-
"lineHeight":
|
|
802
|
+
"lineHeight": undefined,
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"textAlignVertical": "center",
|
|
788
806
|
},
|
|
789
807
|
]
|
|
790
808
|
}
|
|
@@ -1011,7 +1029,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
1011
1029
|
>
|
|
1012
1030
|
<Text
|
|
1013
1031
|
allowFontScaling={true}
|
|
1014
|
-
dynamicTypeRamp="title2"
|
|
1015
1032
|
maxFontSizeMultiplier={1.5}
|
|
1016
1033
|
style={
|
|
1017
1034
|
[
|
|
@@ -1022,7 +1039,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
1022
1039
|
"fontSize": 22,
|
|
1023
1040
|
"fontStyle": "normal",
|
|
1024
1041
|
"fontWeight": "600",
|
|
1025
|
-
"lineHeight":
|
|
1042
|
+
"lineHeight": undefined,
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"textAlignVertical": "center",
|
|
1026
1046
|
},
|
|
1027
1047
|
]
|
|
1028
1048
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.buttonTextFontSize = exports.ButtonText = void 0;
|
|
6
|
+
exports.buttonTextLineHeight = exports.buttonTextFontSize = exports.ButtonText = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("../../core");
|
|
9
9
|
var _IOText = require("./IOText");
|
|
@@ -11,9 +11,11 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
13
|
const buttonTextFontSize = 16;
|
|
14
|
+
exports.buttonTextFontSize = buttonTextFontSize;
|
|
15
|
+
const buttonTextLineHeight = 20;
|
|
14
16
|
/* Needed to render `ButtonOutline` and`ButtonLink` because they use
|
|
15
17
|
`AnimatedText` for color transition through Reanimated */
|
|
16
|
-
exports.
|
|
18
|
+
exports.buttonTextLineHeight = buttonTextLineHeight;
|
|
17
19
|
const defaultColor = "white";
|
|
18
20
|
const fontName = "Titillio";
|
|
19
21
|
|
|
@@ -35,7 +37,7 @@ const ButtonText = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
35
37
|
font: isExperimental ? fontName : legacyFontName,
|
|
36
38
|
weight: "Semibold",
|
|
37
39
|
size: buttonTextFontSize,
|
|
38
|
-
lineHeight:
|
|
40
|
+
lineHeight: buttonTextLineHeight,
|
|
39
41
|
color: customColor ?? defaultColor
|
|
40
42
|
};
|
|
41
43
|
return /*#__PURE__*/_react.default.createElement(_IOText.IOText, _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_core","_IOText","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","buttonTextFontSize","exports","defaultColor","fontName","legacyFontName","ButtonText","forwardRef","color","customColor","props","ref","isExperimental","useIOExperimentalDesign","ButtonTextProps","font","weight","size","lineHeight","createElement","IOText","children"],"sourceRoot":"../../../../src","sources":["components/typography/ButtonText.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAGA,IAAAE,OAAA,GAAAF,OAAA;AAAsE,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAA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CAAAT,GAAA,IAAAa,MAAA,CAAAb,GAAA,gBAAAS,MAAA,YAAAH,QAAA,CAAAQ,KAAA,OAAAH,SAAA;AAE/D,MAAMI,kBAA8B,GAAG,EAAE;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_core","_IOText","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","buttonTextFontSize","exports","buttonTextLineHeight","defaultColor","fontName","legacyFontName","ButtonText","forwardRef","color","customColor","props","ref","isExperimental","useIOExperimentalDesign","ButtonTextProps","font","weight","size","lineHeight","createElement","IOText","children"],"sourceRoot":"../../../../src","sources":["components/typography/ButtonText.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAGA,IAAAE,OAAA,GAAAF,OAAA;AAAsE,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,M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AEvD;AACA;AACA;AACO,MAAMC,UAAU,gBAAG,IAAAC,iBAAU,EAClC,CAAC;EAAEC,KAAK,EAAEC,WAAW;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAwB,KAAK;EAC9D,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,6BAAuB,EAAC,CAAC;EAEpD,MAAMC,eAA4B,GAAG;IACnC,GAAGJ,KAAK;IACRK,IAAI,EAAEH,cAAc,GAAGR,QAAQ,GAAGC,cAAc;IAChDW,MAAM,EAAE,UAAU;IAClBC,IAAI,EAAEjB,kBAAkB;IACxBkB,UAAU,EAAEhB,oBAAoB;IAChCM,KAAK,EAAEC,WAAW,IAAIN;EACxB,CAAC;EAED,oBACEvC,MAAA,CAAAY,OAAA,CAAA2C,aAAA,CAACnD,OAAA,CAAAoD,MAAM,EAAA7B,QAAA;IAACoB,GAAG,EAAEA;EAAI,GAAKG,eAAe,GAClCJ,KAAK,CAACW,QACD,CAAC;AAEb,CACF,CAAC;AAACpB,OAAA,CAAAK,UAAA,GAAAA,UAAA"}
|
|
@@ -4,7 +4,7 @@ import Animated, { interpolateColor, useAnimatedStyle, useReducedMotion } from "
|
|
|
4
4
|
import { IOButtonStyles, IOColors, hexToRgba, useIOExperimentalDesign } 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: {
|
|
@@ -52,6 +52,8 @@ export const ButtonLink = /*#__PURE__*/forwardRef(({
|
|
|
52
52
|
onPress,
|
|
53
53
|
accessibilityLabel,
|
|
54
54
|
accessibilityHint,
|
|
55
|
+
numberOfLines = 1,
|
|
56
|
+
textAlign = "auto",
|
|
55
57
|
testID
|
|
56
58
|
}, ref) => {
|
|
57
59
|
var _colorMap$color, _colorMap$color2, _colorMap$color3;
|
|
@@ -128,12 +130,15 @@ export const ButtonLink = /*#__PURE__*/forwardRef(({
|
|
|
128
130
|
font: isExperimental ? "Titillio" : "TitilliumSansPro",
|
|
129
131
|
weight: "Semibold",
|
|
130
132
|
size: buttonTextFontSize,
|
|
131
|
-
|
|
133
|
+
lineHeight: buttonTextLineHeight,
|
|
134
|
+
style: [disabled ? {
|
|
132
135
|
color: (_colorMap$color3 = colorMap[color]) === null || _colorMap$color3 === void 0 || (_colorMap$color3 = _colorMap$color3.label) === null || _colorMap$color3 === void 0 ? void 0 : _colorMap$color3.disabled
|
|
133
136
|
} : {
|
|
134
137
|
...pressedColorAnimationStyle
|
|
135
|
-
},
|
|
136
|
-
|
|
138
|
+
}, {
|
|
139
|
+
textAlign
|
|
140
|
+
}],
|
|
141
|
+
numberOfLines: numberOfLines,
|
|
137
142
|
ellipsizeMode: "tail"
|
|
138
143
|
}, label)));
|
|
139
144
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useMemo","Pressable","Animated","interpolateColor","useAnimatedStyle","useReducedMotion","IOButtonStyles","IOColors","hexToRgba","useIOExperimentalDesign","useScaleAnimation","AnimatedIcon","IconClassComponent","IOText","buttonTextFontSize","mapColorStates","primary","label","default","pressed","disabled","contrast","white","mapLegacyColorStates","blue","DISABLED_OPACITY","ICON_MARGIN","ButtonLink","color","icon","iconPosition","onPress","accessibilityLabel","accessibilityHint","testID","ref","_colorMap$color","_colorMap$color2","_colorMap$color3","isExperimental","progress","onPressIn","onPressOut","scaleAnimatedStyle","reducedMotion","colorMap","AnimatedIOText","createAnimatedComponent","pressedColorAnimationStyle","value","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","useMemo","Pressable","Animated","interpolateColor","useAnimatedStyle","useReducedMotion","IOButtonStyles","IOColors","hexToRgba","useIOExperimentalDesign","useScaleAnimation","AnimatedIcon","IconClassComponent","IOText","buttonTextFontSize","buttonTextLineHeight","mapColorStates","primary","label","default","pressed","disabled","contrast","white","mapLegacyColorStates","blue","DISABLED_OPACITY","ICON_MARGIN","ButtonLink","color","icon","iconPosition","onPress","accessibilityLabel","accessibilityHint","numberOfLines","textAlign","testID","ref","_colorMap$color","_colorMap$color2","_colorMap$color3","isExperimental","progress","onPressIn","onPressOut","scaleAnimatedStyle","reducedMotion","colorMap","AnimatedIOText","createAnimatedComponent","pressedColorAnimationStyle","value","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,EAAEC,OAAO,QAAQ,OAAO;AAClD,SAEEC,SAAS,QAGJ,cAAc;AACrB,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAChC,SACEC,cAAc,EACdC,QAAQ,EAERC,SAAS,EACTC,uBAAuB,QAClB,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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A,CAACP,cAAc;IACbW,UAAU,EAAE,KAAM;IAClBiB,2BAA2B;IAC3BC,yBAAyB,EAAC,qBAAqB;IAC/CC,IAAI,EAAErC,cAAc,GAAG,UAAU,GAAG,kBAAmB;IACvDsC,MAAM,EAAE,UAAW;IACnBJ,IAAI,EAAE9D,kBAAmB;IACzBmE,UAAU,EAAElE,oBAAqB;IACjCmD,KAAK,EAAE,CACL7C,QAAQ,GACJ;MAAEQ,KAAK,GAAAY,gBAAA,GAAEO,QAAQ,CAACnB,KAAK,CAAC,cAAAY,gBAAA,gBAAAA,gBAAA,GAAfA,gBAAA,CAAiBvB,KAAK,cAAAuB,gBAAA,uBAAtBA,gBAAA,CAAwBpB;IAAS,CAAC,GAC3C;MAAE,GAAG8B;IAA2B,CAAC,EACrC;MAAEf;IAAU,CAAC,CACb;IACFD,aAAa,EAAEA,aAAc;IAC7B+C,aAAa,EAAC;EAAM,GAEnBhE,KACa,CACH,CACN,CAAC;AAEhB,CACF,CAAC;AAED,eAAeU,UAAU"}
|
|
@@ -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
|
>
|
|
@@ -832,11 +837,16 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
832
837
|
"fontSize": 16,
|
|
833
838
|
"fontStyle": "normal",
|
|
834
839
|
"fontWeight": "600",
|
|
835
|
-
"lineHeight":
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
"color": undefined,
|
|
840
|
+
"lineHeight": 20,
|
|
839
841
|
},
|
|
842
|
+
[
|
|
843
|
+
{
|
|
844
|
+
"color": undefined,
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"textAlign": "auto",
|
|
848
|
+
},
|
|
849
|
+
],
|
|
840
850
|
]
|
|
841
851
|
}
|
|
842
852
|
>
|
|
@@ -3,7 +3,7 @@ import { Pressable } from "react-native";
|
|
|
3
3
|
import Animated, { interpolateColor, useAnimatedStyle, useReducedMotion } from "react-native-reanimated";
|
|
4
4
|
import { IOColors, IONumberPadButtonStyles, hexToRgba, useIOExperimentalDesign } from "../../core";
|
|
5
5
|
import { useScaleAnimation } from "../../hooks";
|
|
6
|
-
import {
|
|
6
|
+
import { IOText } from "../typography";
|
|
7
7
|
const colorMap = {
|
|
8
8
|
light: {
|
|
9
9
|
background: IOColors["grey-50"],
|
|
@@ -65,8 +65,15 @@ export const NumberButton = /*#__PURE__*/memo(({
|
|
|
65
65
|
onPress: handleOnPress
|
|
66
66
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
67
67
|
style: [IONumberPadButtonStyles.button, IONumberPadButtonStyles.circularShape, IONumberPadButtonStyles.buttonSize, pressedAnimationStyle, !reducedMotion && scaleAnimatedStyle]
|
|
68
|
-
}, /*#__PURE__*/React.createElement(
|
|
69
|
-
|
|
68
|
+
}, /*#__PURE__*/React.createElement(IOText, {
|
|
69
|
+
size: 22,
|
|
70
|
+
font: isExperimental ? "Titillio" : "TitilliumSansPro",
|
|
71
|
+
weight: "Semibold",
|
|
72
|
+
color: colors.foreground,
|
|
73
|
+
style: {
|
|
74
|
+
// Additional prop for Android
|
|
75
|
+
textAlignVertical: "center"
|
|
76
|
+
}
|
|
70
77
|
}, number)));
|
|
71
78
|
});
|
|
72
79
|
//# sourceMappingURL=NumberButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useCallback","useMemo","Pressable","Animated","interpolateColor","useAnimatedStyle","useReducedMotion","IOColors","IONumberPadButtonStyles","hexToRgba","useIOExperimentalDesign","useScaleAnimation","
|
|
1
|
+
{"version":3,"names":["React","memo","useCallback","useMemo","Pressable","Animated","interpolateColor","useAnimatedStyle","useReducedMotion","IOColors","IONumberPadButtonStyles","hexToRgba","useIOExperimentalDesign","useScaleAnimation","IOText","colorMap","light","background","pressed","foreground","dark","legacyColorMap","black","white","NumberButton","number","variant","onPress","progress","onPressIn","onPressOut","scaleAnimatedStyle","reducedMotion","isExperimental","colors","pressedAnimationStyle","backgroundColor","value","handleOnPress","createElement","accessible","accessibilityRole","View","style","button","circularShape","buttonSize","size","font","weight","color","textAlignVertical"],"sourceRoot":"../../../../src","sources":["components/numberpad/NumberButton.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACzD,SAASC,SAAS,QAAQ,cAAc;AACxC,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAChC,SACEC,QAAQ,EACRC,uBAAuB,EACvBC,SAAS,EACTC,uBAAuB,QAClB,YAAY;AACnB,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,MAAM,QAAQ,eAAe;AA2BtC,MAAMC,QAA0D,GAAG;EACjEC,KAAK,EAAE;IACLC,UAAU,EAAER,QAAQ,CAAC,SAAS,CAAC;IAC/BS,OAAO,EAAET,QAAQ,CAAC,UAAU,CAAC;IAC7BU,UAAU,EAAE;EACd,CAAC;EACDC,IAAI,EAAE;IACJH,UAAU,EAAER,QAAQ,CAAC,YAAY,CAAC;IAClCS,OAAO,EAAET,QAAQ,CAAC,YAAY,CAAC;IAC/BU,UAAU,EAAE;EACd;AACF,CAAC;AAED,MAAME,cAAgE,GAAG;EACvEL,KAAK,EAAE;IACLC,UAAU,EAAER,QAAQ,CAAC,UAAU,CAAC;IAChCS,O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C,QAAQ;IAC1BZ,SAAS,EAAEA,SAAU;IACrBC,UAAU,EAAEA,UAAW;IACvBH,OAAO,EAAEW;EAAc,gBAEvBtC,KAAA,CAAAuC,aAAA,CAAClC,QAAQ,CAACqC,IAAI;IACZC,KAAK,EAAE,CACLjC,uBAAuB,CAACkC,MAAM,EAC9BlC,uBAAuB,CAACmC,aAAa,EACrCnC,uBAAuB,CAACoC,UAAU,EAClCX,qBAAqB,EACrB,CAACH,aAAa,IAAID,kBAAkB;EACpC,gBAEF/B,KAAA,CAAAuC,aAAA,CAACzB,MAAM;IACLiC,IAAI,EAAE,EAAG;IACTC,IAAI,EAAEf,cAAc,GAAG,UAAU,GAAG,kBAAmB;IACvDgB,MAAM,EAAC,UAAU;IACjBC,KAAK,EAAEhB,MAAM,CAACf,UAAW;IACzBwB,KAAK,EAAE;MACL;MACAQ,iBAAiB,EAAE;IACrB;EAAE,GAED1B,MACK,CACK,CACN,CAAC;AAEhB,CACF,CAAC"}
|
|
@@ -93,7 +93,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
93
93
|
>
|
|
94
94
|
<Text
|
|
95
95
|
allowFontScaling={true}
|
|
96
|
-
dynamicTypeRamp="title2"
|
|
97
96
|
maxFontSizeMultiplier={1.5}
|
|
98
97
|
style={
|
|
99
98
|
[
|
|
@@ -104,7 +103,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
104
103
|
"fontSize": 22,
|
|
105
104
|
"fontStyle": "normal",
|
|
106
105
|
"fontWeight": "600",
|
|
107
|
-
"lineHeight":
|
|
106
|
+
"lineHeight": undefined,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"textAlignVertical": "center",
|
|
108
110
|
},
|
|
109
111
|
]
|
|
110
112
|
}
|
|
@@ -174,7 +176,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
174
176
|
>
|
|
175
177
|
<Text
|
|
176
178
|
allowFontScaling={true}
|
|
177
|
-
dynamicTypeRamp="title2"
|
|
178
179
|
maxFontSizeMultiplier={1.5}
|
|
179
180
|
style={
|
|
180
181
|
[
|
|
@@ -185,7 +186,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
185
186
|
"fontSize": 22,
|
|
186
187
|
"fontStyle": "normal",
|
|
187
188
|
"fontWeight": "600",
|
|
188
|
-
"lineHeight":
|
|
189
|
+
"lineHeight": undefined,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"textAlignVertical": "center",
|
|
189
193
|
},
|
|
190
194
|
]
|
|
191
195
|
}
|
|
@@ -255,7 +259,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
255
259
|
>
|
|
256
260
|
<Text
|
|
257
261
|
allowFontScaling={true}
|
|
258
|
-
dynamicTypeRamp="title2"
|
|
259
262
|
maxFontSizeMultiplier={1.5}
|
|
260
263
|
style={
|
|
261
264
|
[
|
|
@@ -266,7 +269,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
266
269
|
"fontSize": 22,
|
|
267
270
|
"fontStyle": "normal",
|
|
268
271
|
"fontWeight": "600",
|
|
269
|
-
"lineHeight":
|
|
272
|
+
"lineHeight": undefined,
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"textAlignVertical": "center",
|
|
270
276
|
},
|
|
271
277
|
]
|
|
272
278
|
}
|
|
@@ -352,7 +358,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
352
358
|
>
|
|
353
359
|
<Text
|
|
354
360
|
allowFontScaling={true}
|
|
355
|
-
dynamicTypeRamp="title2"
|
|
356
361
|
maxFontSizeMultiplier={1.5}
|
|
357
362
|
style={
|
|
358
363
|
[
|
|
@@ -363,7 +368,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
363
368
|
"fontSize": 22,
|
|
364
369
|
"fontStyle": "normal",
|
|
365
370
|
"fontWeight": "600",
|
|
366
|
-
"lineHeight":
|
|
371
|
+
"lineHeight": undefined,
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"textAlignVertical": "center",
|
|
367
375
|
},
|
|
368
376
|
]
|
|
369
377
|
}
|
|
@@ -433,7 +441,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
433
441
|
>
|
|
434
442
|
<Text
|
|
435
443
|
allowFontScaling={true}
|
|
436
|
-
dynamicTypeRamp="title2"
|
|
437
444
|
maxFontSizeMultiplier={1.5}
|
|
438
445
|
style={
|
|
439
446
|
[
|
|
@@ -444,7 +451,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
444
451
|
"fontSize": 22,
|
|
445
452
|
"fontStyle": "normal",
|
|
446
453
|
"fontWeight": "600",
|
|
447
|
-
"lineHeight":
|
|
454
|
+
"lineHeight": undefined,
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"textAlignVertical": "center",
|
|
448
458
|
},
|
|
449
459
|
]
|
|
450
460
|
}
|
|
@@ -514,7 +524,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
514
524
|
>
|
|
515
525
|
<Text
|
|
516
526
|
allowFontScaling={true}
|
|
517
|
-
dynamicTypeRamp="title2"
|
|
518
527
|
maxFontSizeMultiplier={1.5}
|
|
519
528
|
style={
|
|
520
529
|
[
|
|
@@ -525,7 +534,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
525
534
|
"fontSize": 22,
|
|
526
535
|
"fontStyle": "normal",
|
|
527
536
|
"fontWeight": "600",
|
|
528
|
-
"lineHeight":
|
|
537
|
+
"lineHeight": undefined,
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"textAlignVertical": "center",
|
|
529
541
|
},
|
|
530
542
|
]
|
|
531
543
|
}
|
|
@@ -611,7 +623,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
611
623
|
>
|
|
612
624
|
<Text
|
|
613
625
|
allowFontScaling={true}
|
|
614
|
-
dynamicTypeRamp="title2"
|
|
615
626
|
maxFontSizeMultiplier={1.5}
|
|
616
627
|
style={
|
|
617
628
|
[
|
|
@@ -622,7 +633,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
622
633
|
"fontSize": 22,
|
|
623
634
|
"fontStyle": "normal",
|
|
624
635
|
"fontWeight": "600",
|
|
625
|
-
"lineHeight":
|
|
636
|
+
"lineHeight": undefined,
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"textAlignVertical": "center",
|
|
626
640
|
},
|
|
627
641
|
]
|
|
628
642
|
}
|
|
@@ -692,7 +706,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
692
706
|
>
|
|
693
707
|
<Text
|
|
694
708
|
allowFontScaling={true}
|
|
695
|
-
dynamicTypeRamp="title2"
|
|
696
709
|
maxFontSizeMultiplier={1.5}
|
|
697
710
|
style={
|
|
698
711
|
[
|
|
@@ -703,7 +716,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
703
716
|
"fontSize": 22,
|
|
704
717
|
"fontStyle": "normal",
|
|
705
718
|
"fontWeight": "600",
|
|
706
|
-
"lineHeight":
|
|
719
|
+
"lineHeight": undefined,
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"textAlignVertical": "center",
|
|
707
723
|
},
|
|
708
724
|
]
|
|
709
725
|
}
|
|
@@ -773,7 +789,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
773
789
|
>
|
|
774
790
|
<Text
|
|
775
791
|
allowFontScaling={true}
|
|
776
|
-
dynamicTypeRamp="title2"
|
|
777
792
|
maxFontSizeMultiplier={1.5}
|
|
778
793
|
style={
|
|
779
794
|
[
|
|
@@ -784,7 +799,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
784
799
|
"fontSize": 22,
|
|
785
800
|
"fontStyle": "normal",
|
|
786
801
|
"fontWeight": "600",
|
|
787
|
-
"lineHeight":
|
|
802
|
+
"lineHeight": undefined,
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"textAlignVertical": "center",
|
|
788
806
|
},
|
|
789
807
|
]
|
|
790
808
|
}
|
|
@@ -1011,7 +1029,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
1011
1029
|
>
|
|
1012
1030
|
<Text
|
|
1013
1031
|
allowFontScaling={true}
|
|
1014
|
-
dynamicTypeRamp="title2"
|
|
1015
1032
|
maxFontSizeMultiplier={1.5}
|
|
1016
1033
|
style={
|
|
1017
1034
|
[
|
|
@@ -1022,7 +1039,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
1022
1039
|
"fontSize": 22,
|
|
1023
1040
|
"fontStyle": "normal",
|
|
1024
1041
|
"fontWeight": "600",
|
|
1025
|
-
"lineHeight":
|
|
1042
|
+
"lineHeight": undefined,
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"textAlignVertical": "center",
|
|
1026
1046
|
},
|
|
1027
1047
|
]
|
|
1028
1048
|
}
|
|
@@ -3,6 +3,7 @@ import React, { forwardRef } from "react";
|
|
|
3
3
|
import { useIOExperimentalDesign } from "../../core";
|
|
4
4
|
import { IOText } from "./IOText";
|
|
5
5
|
export const buttonTextFontSize = 16;
|
|
6
|
+
export const buttonTextLineHeight = 20;
|
|
6
7
|
/* Needed to render `ButtonOutline` and`ButtonLink` because they use
|
|
7
8
|
`AnimatedText` for color transition through Reanimated */
|
|
8
9
|
const defaultColor = "white";
|
|
@@ -26,7 +27,7 @@ export const ButtonText = /*#__PURE__*/forwardRef(({
|
|
|
26
27
|
font: isExperimental ? fontName : legacyFontName,
|
|
27
28
|
weight: "Semibold",
|
|
28
29
|
size: buttonTextFontSize,
|
|
29
|
-
lineHeight:
|
|
30
|
+
lineHeight: buttonTextLineHeight,
|
|
30
31
|
color: customColor ?? defaultColor
|
|
31
32
|
};
|
|
32
33
|
return /*#__PURE__*/React.createElement(IOText, _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useIOExperimentalDesign","IOText","buttonTextFontSize","defaultColor","fontName","legacyFontName","ButtonText","color","customColor","props","ref","isExperimental","ButtonTextProps","font","weight","size","lineHeight","createElement","_extends","children"],"sourceRoot":"../../../../src","sources":["components/typography/ButtonText.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO;AAEvD,SAASC,uBAAuB,QAAQ,YAAY;AAGpD,SAASC,MAAM,QAA4C,UAAU;AAErE,OAAO,MAAMC,kBAA8B,GAAG,EAAE;AAChD;AACA;AACA,MAAMC,YAAsB,GAAG,OAAO;AACtC,MAAMC,QAAsB,GAAG,UAAU;;AAEzC;AACA,MAAMC,cAA4B,GAAG,kBAAkB;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,UAAU,
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useIOExperimentalDesign","IOText","buttonTextFontSize","buttonTextLineHeight","defaultColor","fontName","legacyFontName","ButtonText","color","customColor","props","ref","isExperimental","ButtonTextProps","font","weight","size","lineHeight","createElement","_extends","children"],"sourceRoot":"../../../../src","sources":["components/typography/ButtonText.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO;AAEvD,SAASC,uBAAuB,QAAQ,YAAY;AAGpD,SAASC,MAAM,QAA4C,UAAU;AAErE,OAAO,MAAMC,kBAA8B,GAAG,EAAE;AAChD,OAAO,MAAMC,oBAAoB,GAAG,EAAE;AACtC;AACA;AACA,MAAMC,YAAsB,GAAG,OAAO;AACtC,MAAMC,QAAsB,GAAG,UAAU;;AAEzC;AACA,MAAMC,cAA4B,GAAG,kBAAkB;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,UAAU,gBAAGR,UAAU,CAClC,CAAC;EAAES,KAAK,EAAEC,WAAW;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAwB,KAAK;EAC9D,MAAM;IAAEC;EAAe,CAAC,GAAGZ,uBAAuB,CAAC,CAAC;EAEpD,MAAMa,eAA4B,GAAG;IACnC,GAAGH,KAAK;IACRI,IAAI,EAAEF,cAAc,GAAGP,QAAQ,GAAGC,cAAc;IAChDS,MAAM,EAAE,UAAU;IAClBC,IAAI,EAAEd,kBAAkB;IACxBe,UAAU,EAAEd,oBAAoB;IAChCK,KAAK,EAAEC,WAAW,IAAIL;EACxB,CAAC;EAED,oBACEN,KAAA,CAAAoB,aAAA,CAACjB,MAAM,EAAAkB,QAAA;IAACR,GAAG,EAAEA;EAAI,GAAKE,eAAe,GAClCH,KAAK,CAACU,QACD,CAAC;AAEb,CACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { GestureResponderEvent, View } from "react-native";
|
|
2
|
+
import { GestureResponderEvent, View, TextStyle } from "react-native";
|
|
3
3
|
import { WithTestID } from "../../utils/types";
|
|
4
4
|
import { IOIcons } from "../icons";
|
|
5
5
|
export type ColorButtonLink = "primary" | "contrast";
|
|
@@ -11,6 +11,8 @@ export type ButtonLinkProps = WithTestID<{
|
|
|
11
11
|
iconPosition?: "start" | "end";
|
|
12
12
|
accessibilityLabel?: string;
|
|
13
13
|
accessibilityHint?: string;
|
|
14
|
+
numberOfLines?: number;
|
|
15
|
+
textAlign?: TextStyle["textAlign"];
|
|
14
16
|
onPress: (event: GestureResponderEvent) => void;
|
|
15
17
|
}>;
|
|
16
18
|
export declare const ButtonLink: React.ForwardRefExoticComponent<{
|
|
@@ -21,6 +23,8 @@ export declare const ButtonLink: React.ForwardRefExoticComponent<{
|
|
|
21
23
|
iconPosition?: "end" | "start" | undefined;
|
|
22
24
|
accessibilityLabel?: string | undefined;
|
|
23
25
|
accessibilityHint?: string | undefined;
|
|
26
|
+
numberOfLines?: number | undefined;
|
|
27
|
+
textAlign?: TextStyle["textAlign"];
|
|
24
28
|
onPress: (event: GestureResponderEvent) => void;
|
|
25
29
|
} & import("../../utils/types").TestID & React.RefAttributes<View>>;
|
|
26
30
|
export default ButtonLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonLink.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/ButtonLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"ButtonLink.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/ButtonLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EACL,qBAAqB,EAErB,IAAI,EACJ,SAAS,EACV,MAAM,cAAc,CAAC;AActB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAGL,OAAO,EAER,MAAM,UAAU,CAAC;AAOlB,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC;IACvC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAE/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAEnC,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC,CAAC;AAwDH,eAAO,MAAM,UAAU;;WApEd,MAAM;;;;;;;gBASD,SAAS,CAAC,WAAW,CAAC;aAEzB,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI;mEA0KhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberButton.d.ts","sourceRoot":"","sources":["../../../../src/components/numberpad/NumberButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAgB1D,KAAK,uBAAuB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhD,KAAK,iBAAiB,GAAG;IACvB;;OAEG;IACH,OAAO,EAAE,uBAAuB,CAAC;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAiCF;;;;GAIG;AACH,eAAO,MAAM,YAAY,2DACQ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"NumberButton.d.ts","sourceRoot":"","sources":["../../../../src/components/numberpad/NumberButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAgB1D,KAAK,uBAAuB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhD,KAAK,iBAAiB,GAAG;IACvB;;OAEG;IACH,OAAO,EAAE,uBAAuB,CAAC;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAiCF;;;;GAIG;AACH,eAAO,MAAM,YAAY,2DACQ,iBAAiB,uBAyDjD,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { View } from "react-native";
|
|
|
3
3
|
import { IOFontSize } from "../../utils/fonts";
|
|
4
4
|
import { IOTextProps } from "./IOText";
|
|
5
5
|
export declare const buttonTextFontSize: IOFontSize;
|
|
6
|
+
export declare const buttonTextLineHeight = 20;
|
|
6
7
|
/**
|
|
7
8
|
* `ButtonText` typographic style
|
|
8
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/ButtonText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAgB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAEtE,eAAO,MAAM,kBAAkB,EAAE,UAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/ButtonText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAgB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAEtE,eAAO,MAAM,kBAAkB,EAAE,UAAe,CAAC;AACjD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AASvC;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;8BAmBtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef, useMemo } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
GestureResponderEvent,
|
|
4
|
+
Pressable,
|
|
5
|
+
View,
|
|
6
|
+
TextStyle
|
|
7
|
+
} from "react-native";
|
|
3
8
|
import Animated, {
|
|
4
9
|
interpolateColor,
|
|
5
10
|
useAnimatedStyle,
|
|
@@ -20,7 +25,11 @@ import {
|
|
|
20
25
|
IOIcons,
|
|
21
26
|
IconClassComponent
|
|
22
27
|
} from "../icons";
|
|
23
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
IOText,
|
|
30
|
+
buttonTextFontSize,
|
|
31
|
+
buttonTextLineHeight
|
|
32
|
+
} from "../typography";
|
|
24
33
|
|
|
25
34
|
export type ColorButtonLink = "primary" | "contrast";
|
|
26
35
|
|
|
@@ -34,6 +43,8 @@ export type ButtonLinkProps = WithTestID<{
|
|
|
34
43
|
// Accessibility
|
|
35
44
|
accessibilityLabel?: string;
|
|
36
45
|
accessibilityHint?: string;
|
|
46
|
+
numberOfLines?: number;
|
|
47
|
+
textAlign?: TextStyle["textAlign"];
|
|
37
48
|
// Events
|
|
38
49
|
onPress: (event: GestureResponderEvent) => void;
|
|
39
50
|
}>;
|
|
@@ -103,6 +114,8 @@ export const ButtonLink = forwardRef<View, ButtonLinkProps>(
|
|
|
103
114
|
onPress,
|
|
104
115
|
accessibilityLabel,
|
|
105
116
|
accessibilityHint,
|
|
117
|
+
numberOfLines = 1,
|
|
118
|
+
textAlign = "auto",
|
|
106
119
|
testID
|
|
107
120
|
},
|
|
108
121
|
ref
|
|
@@ -187,12 +200,14 @@ export const ButtonLink = forwardRef<View, ButtonLinkProps>(
|
|
|
187
200
|
font={isExperimental ? "Titillio" : "TitilliumSansPro"}
|
|
188
201
|
weight={"Semibold"}
|
|
189
202
|
size={buttonTextFontSize}
|
|
190
|
-
|
|
203
|
+
lineHeight={buttonTextLineHeight}
|
|
204
|
+
style={[
|
|
191
205
|
disabled
|
|
192
206
|
? { color: colorMap[color]?.label?.disabled }
|
|
193
|
-
: { ...pressedColorAnimationStyle }
|
|
194
|
-
|
|
195
|
-
|
|
207
|
+
: { ...pressedColorAnimationStyle },
|
|
208
|
+
{ textAlign }
|
|
209
|
+
]}
|
|
210
|
+
numberOfLines={numberOfLines}
|
|
196
211
|
ellipsizeMode="tail"
|
|
197
212
|
>
|
|
198
213
|
{label}
|
|
@@ -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
|
>
|
|
@@ -832,11 +837,16 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
832
837
|
"fontSize": 16,
|
|
833
838
|
"fontStyle": "normal",
|
|
834
839
|
"fontWeight": "600",
|
|
835
|
-
"lineHeight":
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
"color": undefined,
|
|
840
|
+
"lineHeight": 20,
|
|
839
841
|
},
|
|
842
|
+
[
|
|
843
|
+
{
|
|
844
|
+
"color": undefined,
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"textAlign": "auto",
|
|
848
|
+
},
|
|
849
|
+
],
|
|
840
850
|
]
|
|
841
851
|
}
|
|
842
852
|
>
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
useIOExperimentalDesign
|
|
13
13
|
} from "../../core";
|
|
14
14
|
import { useScaleAnimation } from "../../hooks";
|
|
15
|
-
import {
|
|
15
|
+
import { IOText } from "../typography";
|
|
16
16
|
|
|
17
17
|
type NumberButtonVariantType = "light" | "dark";
|
|
18
18
|
|
|
@@ -111,7 +111,18 @@ export const NumberButton = memo(
|
|
|
111
111
|
!reducedMotion && scaleAnimatedStyle
|
|
112
112
|
]}
|
|
113
113
|
>
|
|
114
|
-
<
|
|
114
|
+
<IOText
|
|
115
|
+
size={22}
|
|
116
|
+
font={isExperimental ? "Titillio" : "TitilliumSansPro"}
|
|
117
|
+
weight="Semibold"
|
|
118
|
+
color={colors.foreground}
|
|
119
|
+
style={{
|
|
120
|
+
// Additional prop for Android
|
|
121
|
+
textAlignVertical: "center"
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
{number}
|
|
125
|
+
</IOText>
|
|
115
126
|
</Animated.View>
|
|
116
127
|
</Pressable>
|
|
117
128
|
);
|
|
@@ -93,7 +93,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
93
93
|
>
|
|
94
94
|
<Text
|
|
95
95
|
allowFontScaling={true}
|
|
96
|
-
dynamicTypeRamp="title2"
|
|
97
96
|
maxFontSizeMultiplier={1.5}
|
|
98
97
|
style={
|
|
99
98
|
[
|
|
@@ -104,7 +103,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
104
103
|
"fontSize": 22,
|
|
105
104
|
"fontStyle": "normal",
|
|
106
105
|
"fontWeight": "600",
|
|
107
|
-
"lineHeight":
|
|
106
|
+
"lineHeight": undefined,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"textAlignVertical": "center",
|
|
108
110
|
},
|
|
109
111
|
]
|
|
110
112
|
}
|
|
@@ -174,7 +176,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
174
176
|
>
|
|
175
177
|
<Text
|
|
176
178
|
allowFontScaling={true}
|
|
177
|
-
dynamicTypeRamp="title2"
|
|
178
179
|
maxFontSizeMultiplier={1.5}
|
|
179
180
|
style={
|
|
180
181
|
[
|
|
@@ -185,7 +186,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
185
186
|
"fontSize": 22,
|
|
186
187
|
"fontStyle": "normal",
|
|
187
188
|
"fontWeight": "600",
|
|
188
|
-
"lineHeight":
|
|
189
|
+
"lineHeight": undefined,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"textAlignVertical": "center",
|
|
189
193
|
},
|
|
190
194
|
]
|
|
191
195
|
}
|
|
@@ -255,7 +259,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
255
259
|
>
|
|
256
260
|
<Text
|
|
257
261
|
allowFontScaling={true}
|
|
258
|
-
dynamicTypeRamp="title2"
|
|
259
262
|
maxFontSizeMultiplier={1.5}
|
|
260
263
|
style={
|
|
261
264
|
[
|
|
@@ -266,7 +269,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
266
269
|
"fontSize": 22,
|
|
267
270
|
"fontStyle": "normal",
|
|
268
271
|
"fontWeight": "600",
|
|
269
|
-
"lineHeight":
|
|
272
|
+
"lineHeight": undefined,
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"textAlignVertical": "center",
|
|
270
276
|
},
|
|
271
277
|
]
|
|
272
278
|
}
|
|
@@ -352,7 +358,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
352
358
|
>
|
|
353
359
|
<Text
|
|
354
360
|
allowFontScaling={true}
|
|
355
|
-
dynamicTypeRamp="title2"
|
|
356
361
|
maxFontSizeMultiplier={1.5}
|
|
357
362
|
style={
|
|
358
363
|
[
|
|
@@ -363,7 +368,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
363
368
|
"fontSize": 22,
|
|
364
369
|
"fontStyle": "normal",
|
|
365
370
|
"fontWeight": "600",
|
|
366
|
-
"lineHeight":
|
|
371
|
+
"lineHeight": undefined,
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"textAlignVertical": "center",
|
|
367
375
|
},
|
|
368
376
|
]
|
|
369
377
|
}
|
|
@@ -433,7 +441,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
433
441
|
>
|
|
434
442
|
<Text
|
|
435
443
|
allowFontScaling={true}
|
|
436
|
-
dynamicTypeRamp="title2"
|
|
437
444
|
maxFontSizeMultiplier={1.5}
|
|
438
445
|
style={
|
|
439
446
|
[
|
|
@@ -444,7 +451,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
444
451
|
"fontSize": 22,
|
|
445
452
|
"fontStyle": "normal",
|
|
446
453
|
"fontWeight": "600",
|
|
447
|
-
"lineHeight":
|
|
454
|
+
"lineHeight": undefined,
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"textAlignVertical": "center",
|
|
448
458
|
},
|
|
449
459
|
]
|
|
450
460
|
}
|
|
@@ -514,7 +524,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
514
524
|
>
|
|
515
525
|
<Text
|
|
516
526
|
allowFontScaling={true}
|
|
517
|
-
dynamicTypeRamp="title2"
|
|
518
527
|
maxFontSizeMultiplier={1.5}
|
|
519
528
|
style={
|
|
520
529
|
[
|
|
@@ -525,7 +534,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
525
534
|
"fontSize": 22,
|
|
526
535
|
"fontStyle": "normal",
|
|
527
536
|
"fontWeight": "600",
|
|
528
|
-
"lineHeight":
|
|
537
|
+
"lineHeight": undefined,
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"textAlignVertical": "center",
|
|
529
541
|
},
|
|
530
542
|
]
|
|
531
543
|
}
|
|
@@ -611,7 +623,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
611
623
|
>
|
|
612
624
|
<Text
|
|
613
625
|
allowFontScaling={true}
|
|
614
|
-
dynamicTypeRamp="title2"
|
|
615
626
|
maxFontSizeMultiplier={1.5}
|
|
616
627
|
style={
|
|
617
628
|
[
|
|
@@ -622,7 +633,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
622
633
|
"fontSize": 22,
|
|
623
634
|
"fontStyle": "normal",
|
|
624
635
|
"fontWeight": "600",
|
|
625
|
-
"lineHeight":
|
|
636
|
+
"lineHeight": undefined,
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"textAlignVertical": "center",
|
|
626
640
|
},
|
|
627
641
|
]
|
|
628
642
|
}
|
|
@@ -692,7 +706,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
692
706
|
>
|
|
693
707
|
<Text
|
|
694
708
|
allowFontScaling={true}
|
|
695
|
-
dynamicTypeRamp="title2"
|
|
696
709
|
maxFontSizeMultiplier={1.5}
|
|
697
710
|
style={
|
|
698
711
|
[
|
|
@@ -703,7 +716,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
703
716
|
"fontSize": 22,
|
|
704
717
|
"fontStyle": "normal",
|
|
705
718
|
"fontWeight": "600",
|
|
706
|
-
"lineHeight":
|
|
719
|
+
"lineHeight": undefined,
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"textAlignVertical": "center",
|
|
707
723
|
},
|
|
708
724
|
]
|
|
709
725
|
}
|
|
@@ -773,7 +789,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
773
789
|
>
|
|
774
790
|
<Text
|
|
775
791
|
allowFontScaling={true}
|
|
776
|
-
dynamicTypeRamp="title2"
|
|
777
792
|
maxFontSizeMultiplier={1.5}
|
|
778
793
|
style={
|
|
779
794
|
[
|
|
@@ -784,7 +799,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
784
799
|
"fontSize": 22,
|
|
785
800
|
"fontStyle": "normal",
|
|
786
801
|
"fontWeight": "600",
|
|
787
|
-
"lineHeight":
|
|
802
|
+
"lineHeight": undefined,
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"textAlignVertical": "center",
|
|
788
806
|
},
|
|
789
807
|
]
|
|
790
808
|
}
|
|
@@ -1011,7 +1029,6 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
1011
1029
|
>
|
|
1012
1030
|
<Text
|
|
1013
1031
|
allowFontScaling={true}
|
|
1014
|
-
dynamicTypeRamp="title2"
|
|
1015
1032
|
maxFontSizeMultiplier={1.5}
|
|
1016
1033
|
style={
|
|
1017
1034
|
[
|
|
@@ -1022,7 +1039,10 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
1022
1039
|
"fontSize": 22,
|
|
1023
1040
|
"fontStyle": "normal",
|
|
1024
1041
|
"fontWeight": "600",
|
|
1025
|
-
"lineHeight":
|
|
1042
|
+
"lineHeight": undefined,
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"textAlignVertical": "center",
|
|
1026
1046
|
},
|
|
1027
1047
|
]
|
|
1028
1048
|
}
|
|
@@ -6,6 +6,7 @@ import { IOFontFamily, IOFontSize } from "../../utils/fonts";
|
|
|
6
6
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
7
7
|
|
|
8
8
|
export const buttonTextFontSize: IOFontSize = 16;
|
|
9
|
+
export const buttonTextLineHeight = 20;
|
|
9
10
|
/* Needed to render `ButtonOutline` and`ButtonLink` because they use
|
|
10
11
|
`AnimatedText` for color transition through Reanimated */
|
|
11
12
|
const defaultColor: IOColors = "white";
|
|
@@ -26,7 +27,7 @@ export const ButtonText = forwardRef<View, TypographicStyleProps>(
|
|
|
26
27
|
font: isExperimental ? fontName : legacyFontName,
|
|
27
28
|
weight: "Semibold",
|
|
28
29
|
size: buttonTextFontSize,
|
|
29
|
-
lineHeight:
|
|
30
|
+
lineHeight: buttonTextLineHeight,
|
|
30
31
|
color: customColor ?? defaultColor
|
|
31
32
|
};
|
|
32
33
|
|