@pagopa/io-app-design-system 5.6.3 → 5.6.4
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/IOButton/IOButton.js +2 -5
- package/lib/commonjs/components/buttons/IOButton/IOButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +0 -3
- package/lib/commonjs/components/claimsSelector/ClaimsSelector.js +35 -13
- package/lib/commonjs/components/claimsSelector/ClaimsSelector.js.map +1 -1
- package/lib/commonjs/components/claimsSelector/__test__/ClaimsSelector.test.js +16 -3
- package/lib/commonjs/components/claimsSelector/__test__/ClaimsSelector.test.js.map +1 -1
- package/lib/commonjs/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +295 -0
- package/lib/commonjs/components/searchInput/SearchInput.js +8 -5
- package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
- package/lib/module/components/buttons/IOButton/IOButton.js +2 -5
- package/lib/module/components/buttons/IOButton/IOButton.js.map +1 -1
- package/lib/module/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +0 -3
- package/lib/module/components/claimsSelector/ClaimsSelector.js +36 -14
- package/lib/module/components/claimsSelector/ClaimsSelector.js.map +1 -1
- package/lib/module/components/claimsSelector/__test__/ClaimsSelector.test.js +16 -3
- package/lib/module/components/claimsSelector/__test__/ClaimsSelector.test.js.map +1 -1
- package/lib/module/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +295 -0
- package/lib/module/components/searchInput/SearchInput.js +9 -6
- package/lib/module/components/searchInput/SearchInput.js.map +1 -1
- package/lib/typescript/components/buttons/IOButton/IOButton.d.ts.map +1 -1
- package/lib/typescript/components/claimsSelector/ClaimsSelector.d.ts +2 -1
- package/lib/typescript/components/claimsSelector/ClaimsSelector.d.ts.map +1 -1
- package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/buttons/IOButton/IOButton.tsx +6 -7
- package/src/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +0 -3
- package/src/components/claimsSelector/ClaimsSelector.tsx +49 -22
- package/src/components/claimsSelector/__test__/ClaimsSelector.test.tsx +21 -3
- package/src/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +295 -0
- package/src/components/searchInput/SearchInput.tsx +13 -5
|
@@ -523,6 +523,300 @@ exports[`ClaimsSelector ClaimsSelector Snapshot (controlled) 1`] = `
|
|
|
523
523
|
</View>
|
|
524
524
|
`;
|
|
525
525
|
|
|
526
|
+
exports[`ClaimsSelector ClaimsSelector Snapshot (custom component) 1`] = `
|
|
527
|
+
<View
|
|
528
|
+
style={
|
|
529
|
+
[
|
|
530
|
+
{
|
|
531
|
+
"borderCurve": "continuous",
|
|
532
|
+
"borderRadius": 8,
|
|
533
|
+
"borderWidth": 1,
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"backgroundColor": "#F4F5F8",
|
|
537
|
+
"borderColor": "#E8EBF1",
|
|
538
|
+
},
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
>
|
|
542
|
+
<RNGestureHandlerButton
|
|
543
|
+
collapsable={false}
|
|
544
|
+
delayLongPress={600}
|
|
545
|
+
enabled={true}
|
|
546
|
+
exclusive={true}
|
|
547
|
+
handlerTag={4}
|
|
548
|
+
handlerType="NativeViewGestureHandler"
|
|
549
|
+
innerRef={null}
|
|
550
|
+
onGestureHandlerEvent={[Function]}
|
|
551
|
+
onGestureHandlerStateChange={[Function]}
|
|
552
|
+
rippleColor="transparent"
|
|
553
|
+
style={
|
|
554
|
+
[
|
|
555
|
+
undefined,
|
|
556
|
+
{
|
|
557
|
+
"cursor": undefined,
|
|
558
|
+
},
|
|
559
|
+
]
|
|
560
|
+
}
|
|
561
|
+
touchSoundDisabled={false}
|
|
562
|
+
>
|
|
563
|
+
<View
|
|
564
|
+
accessibilityLabel="Patente di guida"
|
|
565
|
+
accessibilityRole="button"
|
|
566
|
+
accessibilityState={
|
|
567
|
+
{
|
|
568
|
+
"expanded": false,
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
accessible={true}
|
|
572
|
+
collapsable={false}
|
|
573
|
+
style={{}}
|
|
574
|
+
>
|
|
575
|
+
<View
|
|
576
|
+
style={
|
|
577
|
+
{
|
|
578
|
+
"alignItems": "center",
|
|
579
|
+
"flexDirection": "row",
|
|
580
|
+
"justifyContent": "space-between",
|
|
581
|
+
"padding": 16,
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
>
|
|
585
|
+
<Text
|
|
586
|
+
allowFontScaling={true}
|
|
587
|
+
dynamicTypeRamp="headline"
|
|
588
|
+
maxFontSizeMultiplier={1.5}
|
|
589
|
+
style={
|
|
590
|
+
[
|
|
591
|
+
{},
|
|
592
|
+
{
|
|
593
|
+
"color": "#0E0F13",
|
|
594
|
+
"fontFamily": "Titillio",
|
|
595
|
+
"fontSize": 16,
|
|
596
|
+
"fontStyle": "normal",
|
|
597
|
+
"fontWeight": "600",
|
|
598
|
+
"lineHeight": 24,
|
|
599
|
+
},
|
|
600
|
+
]
|
|
601
|
+
}
|
|
602
|
+
>
|
|
603
|
+
Patente di guida
|
|
604
|
+
</Text>
|
|
605
|
+
<View
|
|
606
|
+
style={
|
|
607
|
+
{
|
|
608
|
+
"transform": [
|
|
609
|
+
{
|
|
610
|
+
"rotate": "0deg",
|
|
611
|
+
},
|
|
612
|
+
],
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
>
|
|
616
|
+
<RNSVGSvgView
|
|
617
|
+
accessibilityElementsHidden={true}
|
|
618
|
+
accessibilityLabel=""
|
|
619
|
+
accessible={false}
|
|
620
|
+
align="xMidYMid"
|
|
621
|
+
bbHeight={24}
|
|
622
|
+
bbWidth={24}
|
|
623
|
+
color="#0B3EE3"
|
|
624
|
+
focusable={false}
|
|
625
|
+
height={24}
|
|
626
|
+
importantForAccessibility="no-hide-descendants"
|
|
627
|
+
meetOrSlice={0}
|
|
628
|
+
minX={0}
|
|
629
|
+
minY={0}
|
|
630
|
+
style={
|
|
631
|
+
[
|
|
632
|
+
{
|
|
633
|
+
"backgroundColor": "transparent",
|
|
634
|
+
"borderWidth": 0,
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"flex": 0,
|
|
638
|
+
"height": 24,
|
|
639
|
+
"width": 24,
|
|
640
|
+
},
|
|
641
|
+
]
|
|
642
|
+
}
|
|
643
|
+
vbHeight={24}
|
|
644
|
+
vbWidth={24}
|
|
645
|
+
width={24}
|
|
646
|
+
>
|
|
647
|
+
<RNSVGGroup
|
|
648
|
+
fill={
|
|
649
|
+
{
|
|
650
|
+
"payload": 4278190080,
|
|
651
|
+
"type": 0,
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
>
|
|
655
|
+
<RNSVGPath
|
|
656
|
+
clipRule={0}
|
|
657
|
+
d="M18.7071 8.29289c.3905.39053.3905 1.02369 0 1.41422l-6 5.99999c-.3905.3905-1.0237.3905-1.4142 0L5.29289 9.70711c-.39052-.39053-.39052-1.02369 0-1.41422.39053-.39052 1.02369-.39052 1.41422 0L12 13.5858l5.2929-5.29291c.3905-.39052 1.0237-.39052 1.4142 0Z"
|
|
658
|
+
fill={
|
|
659
|
+
{
|
|
660
|
+
"type": 2,
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
fillRule={0}
|
|
664
|
+
propList={
|
|
665
|
+
[
|
|
666
|
+
"fill",
|
|
667
|
+
"fillRule",
|
|
668
|
+
]
|
|
669
|
+
}
|
|
670
|
+
/>
|
|
671
|
+
</RNSVGGroup>
|
|
672
|
+
</RNSVGSvgView>
|
|
673
|
+
</View>
|
|
674
|
+
</View>
|
|
675
|
+
</View>
|
|
676
|
+
</RNGestureHandlerButton>
|
|
677
|
+
<View
|
|
678
|
+
style={
|
|
679
|
+
[
|
|
680
|
+
{
|
|
681
|
+
"height": 0,
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"overflow": "hidden",
|
|
685
|
+
},
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
>
|
|
689
|
+
<View
|
|
690
|
+
onLayout={[Function]}
|
|
691
|
+
style={
|
|
692
|
+
[
|
|
693
|
+
{
|
|
694
|
+
"padding": 16,
|
|
695
|
+
"paddingTop": 0,
|
|
696
|
+
"position": "absolute",
|
|
697
|
+
"width": "100%",
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"width": "100%",
|
|
701
|
+
},
|
|
702
|
+
]
|
|
703
|
+
}
|
|
704
|
+
>
|
|
705
|
+
<View
|
|
706
|
+
accessibilityLabel="Nome e cognome; "
|
|
707
|
+
accessibilityRole="image"
|
|
708
|
+
accessible={true}
|
|
709
|
+
style={
|
|
710
|
+
{
|
|
711
|
+
"marginHorizontal": -24,
|
|
712
|
+
"paddingHorizontal": 24,
|
|
713
|
+
"paddingVertical": 12,
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
>
|
|
717
|
+
<View
|
|
718
|
+
style={
|
|
719
|
+
[
|
|
720
|
+
{
|
|
721
|
+
"alignItems": "center",
|
|
722
|
+
"flexDirection": "row",
|
|
723
|
+
"justifyContent": "space-between",
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"columnGap": 12,
|
|
727
|
+
},
|
|
728
|
+
]
|
|
729
|
+
}
|
|
730
|
+
>
|
|
731
|
+
<View
|
|
732
|
+
style={
|
|
733
|
+
{
|
|
734
|
+
"flex": 1,
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
>
|
|
738
|
+
<View
|
|
739
|
+
accessible={true}
|
|
740
|
+
style={
|
|
741
|
+
{
|
|
742
|
+
"flexDirection": "column-reverse",
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
>
|
|
746
|
+
<Text
|
|
747
|
+
allowFontScaling={true}
|
|
748
|
+
dynamicTypeRamp="footnote"
|
|
749
|
+
maxFontSizeMultiplier={1.5}
|
|
750
|
+
style={
|
|
751
|
+
[
|
|
752
|
+
{},
|
|
753
|
+
{
|
|
754
|
+
"color": "#555C70",
|
|
755
|
+
"fontFamily": "Titillio",
|
|
756
|
+
"fontSize": 14,
|
|
757
|
+
"fontStyle": "normal",
|
|
758
|
+
"fontWeight": "400",
|
|
759
|
+
"lineHeight": 21,
|
|
760
|
+
},
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
>
|
|
764
|
+
Nome e cognome
|
|
765
|
+
</Text>
|
|
766
|
+
<Image
|
|
767
|
+
accessibilityIgnoresInvertColors={true}
|
|
768
|
+
resizeMode="contain"
|
|
769
|
+
source={
|
|
770
|
+
{
|
|
771
|
+
"uri": "data:image/png;base64,iVBORw0KGgoAAAANSUh",
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
style={
|
|
775
|
+
{
|
|
776
|
+
"aspectRatio": 0.75,
|
|
777
|
+
"width": 160,
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
/>
|
|
781
|
+
</View>
|
|
782
|
+
</View>
|
|
783
|
+
</View>
|
|
784
|
+
</View>
|
|
785
|
+
</View>
|
|
786
|
+
</View>
|
|
787
|
+
<BVLinearGradient
|
|
788
|
+
colors={
|
|
789
|
+
[
|
|
790
|
+
16053752,
|
|
791
|
+
4294243832,
|
|
792
|
+
]
|
|
793
|
+
}
|
|
794
|
+
endPoint={
|
|
795
|
+
{
|
|
796
|
+
"x": 0.5,
|
|
797
|
+
"y": 1,
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
locations={null}
|
|
801
|
+
startPoint={
|
|
802
|
+
{
|
|
803
|
+
"x": 0.5,
|
|
804
|
+
"y": 0,
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
style={
|
|
808
|
+
{
|
|
809
|
+
"bottom": 0,
|
|
810
|
+
"height": 16,
|
|
811
|
+
"left": 16,
|
|
812
|
+
"position": "absolute",
|
|
813
|
+
"right": 16,
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
/>
|
|
817
|
+
</View>
|
|
818
|
+
`;
|
|
819
|
+
|
|
526
820
|
exports[`ClaimsSelector ClaimsSelector Snapshot (uncontrolled) 1`] = `
|
|
527
821
|
<View
|
|
528
822
|
style={
|
|
@@ -1158,6 +1452,7 @@ exports[`ClaimsSelector ClaimsSelector Snapshot (unselectable items) 1`] = `
|
|
|
1158
1452
|
>
|
|
1159
1453
|
<View
|
|
1160
1454
|
accessibilityLabel="Nome e cognome; Mario Rossi"
|
|
1455
|
+
accessibilityRole="text"
|
|
1161
1456
|
accessible={true}
|
|
1162
1457
|
style={
|
|
1163
1458
|
{
|
|
@@ -36,7 +36,11 @@ import {
|
|
|
36
36
|
useIONewTypeface,
|
|
37
37
|
useIOTheme
|
|
38
38
|
} from "../../core";
|
|
39
|
-
import {
|
|
39
|
+
import {
|
|
40
|
+
IOFontSize,
|
|
41
|
+
IOMaxFontSizeMultiplier,
|
|
42
|
+
makeFontStyleObject
|
|
43
|
+
} from "../../utils/fonts";
|
|
40
44
|
import { Icon, IOIconSizeScale } from "../icons";
|
|
41
45
|
import {
|
|
42
46
|
buttonTextFontSize,
|
|
@@ -46,6 +50,7 @@ import {
|
|
|
46
50
|
|
|
47
51
|
/* Component visual attributes */
|
|
48
52
|
const inputPaddingHorizontal: IOSpacingScale = 12;
|
|
53
|
+
const inputPaddingVertical: IOSpacingScale = 8;
|
|
49
54
|
const inputPaddingClearButton: IOSpacingScale = 8;
|
|
50
55
|
const inputRadius: number = 8;
|
|
51
56
|
const iconMargin: IOSpacingScale = 8;
|
|
@@ -54,8 +59,6 @@ const iconCloseSize: IOIconSizeScale = 24;
|
|
|
54
59
|
const inputFontSizePlaceholder: IOFontSize = 14;
|
|
55
60
|
const cancelButtonMargin: IOSpacingScale = 16;
|
|
56
61
|
const inputTransitionDuration: number = 250;
|
|
57
|
-
const inputHeightIOS: number = 36;
|
|
58
|
-
const inputHeightAndroid: number = 42;
|
|
59
62
|
|
|
60
63
|
type SearchInputPressableProps = {
|
|
61
64
|
onPress: (event: GestureResponderEvent) => void;
|
|
@@ -260,6 +263,7 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
260
263
|
returnKeyType="search"
|
|
261
264
|
accessibilityRole={"search"}
|
|
262
265
|
accessibilityLabel={accessibilityLabel}
|
|
266
|
+
numberOfLines={1}
|
|
263
267
|
style={[
|
|
264
268
|
{
|
|
265
269
|
color: IOColors[theme["textBody-default"]],
|
|
@@ -284,7 +288,9 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
284
288
|
onChangeText={handleChangeText}
|
|
285
289
|
value={value}
|
|
286
290
|
autoFocus={autoFocus}
|
|
291
|
+
maxFontSizeMultiplier={IOMaxFontSizeMultiplier}
|
|
287
292
|
/>
|
|
293
|
+
|
|
288
294
|
<AnimatedPressable
|
|
289
295
|
style={[styles.clearButton, clearButtonAnimatedStyle]}
|
|
290
296
|
onPress={handleClear}
|
|
@@ -358,10 +364,11 @@ const styles = StyleSheet.create({
|
|
|
358
364
|
flexGrow: 1
|
|
359
365
|
},
|
|
360
366
|
textInputIOS: {
|
|
361
|
-
|
|
367
|
+
paddingVertical: inputPaddingVertical
|
|
362
368
|
},
|
|
363
369
|
textInputAndroid: {
|
|
364
|
-
|
|
370
|
+
textAlignVertical: "center",
|
|
371
|
+
overflow: "hidden"
|
|
365
372
|
},
|
|
366
373
|
iconContainer: {
|
|
367
374
|
marginRight: iconMargin
|
|
@@ -372,6 +379,7 @@ const styles = StyleSheet.create({
|
|
|
372
379
|
paddingLeft: cancelButtonMargin
|
|
373
380
|
},
|
|
374
381
|
clearButton: {
|
|
382
|
+
transformOrigin: "center",
|
|
375
383
|
marginLeft: iconMargin
|
|
376
384
|
}
|
|
377
385
|
});
|