@pagopa/io-app-design-system 1.28.0 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/checkbox/CheckboxLabel.js +3 -1
- package/lib/commonjs/components/checkbox/CheckboxLabel.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderFirstLevel.js +6 -6
- package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderSecondLevel.js +8 -4
- package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js +2 -2
- package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +13 -6
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +13 -3
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +13 -7
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js +14 -14
- package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +68 -8
- package/lib/commonjs/components/radio/RadioButtonLabel.js +3 -1
- package/lib/commonjs/components/radio/RadioButtonLabel.js.map +1 -1
- package/lib/commonjs/components/switch/SwitchLabel.js +2 -1
- package/lib/commonjs/components/switch/SwitchLabel.js.map +1 -1
- package/lib/module/components/checkbox/CheckboxLabel.js +3 -1
- package/lib/module/components/checkbox/CheckboxLabel.js.map +1 -1
- package/lib/module/components/layout/HeaderFirstLevel.js +8 -8
- package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/module/components/layout/HeaderSecondLevel.js +8 -4
- package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemCheckbox.js +2 -2
- package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +15 -8
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +14 -4
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js +14 -8
- package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/module/components/listitems/ListItemSwitch.js +16 -16
- package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +68 -8
- package/lib/module/components/radio/RadioButtonLabel.js +3 -1
- package/lib/module/components/radio/RadioButtonLabel.js.map +1 -1
- package/lib/module/components/switch/SwitchLabel.js +3 -2
- package/lib/module/components/switch/SwitchLabel.js.map +1 -1
- package/lib/typescript/components/checkbox/CheckboxLabel.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNav.d.ts +4 -5
- package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadio.d.ts +6 -0
- package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts +1 -1
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
- package/lib/typescript/components/radio/RadioButtonLabel.d.ts.map +1 -1
- package/lib/typescript/components/switch/SwitchLabel.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/checkbox/CheckboxLabel.tsx +4 -1
- package/src/components/layout/HeaderFirstLevel.tsx +11 -9
- package/src/components/layout/HeaderSecondLevel.tsx +10 -4
- package/src/components/listitems/ListItemCheckbox.tsx +2 -2
- package/src/components/listitems/ListItemNav.tsx +27 -10
- package/src/components/listitems/ListItemRadio.tsx +17 -6
- package/src/components/listitems/ListItemRadioWithAmount.tsx +10 -6
- package/src/components/listitems/ListItemSwitch.tsx +19 -15
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +68 -8
- package/src/components/radio/RadioButtonLabel.tsx +4 -1
- package/src/components/switch/SwitchLabel.tsx +3 -2
|
@@ -970,7 +970,13 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
970
970
|
]
|
|
971
971
|
}
|
|
972
972
|
>
|
|
973
|
-
<View
|
|
973
|
+
<View
|
|
974
|
+
style={
|
|
975
|
+
{
|
|
976
|
+
"flexShrink": 1,
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
>
|
|
974
980
|
<Text
|
|
975
981
|
allowFontScaling={false}
|
|
976
982
|
color="black"
|
|
@@ -983,6 +989,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
983
989
|
"lineHeight": 21,
|
|
984
990
|
}
|
|
985
991
|
}
|
|
992
|
+
numberOfLines={1}
|
|
986
993
|
style={
|
|
987
994
|
[
|
|
988
995
|
{
|
|
@@ -1000,6 +1007,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
1000
1007
|
weight="Regular"
|
|
1001
1008
|
>
|
|
1002
1009
|
label
|
|
1010
|
+
con nome molto molto lungo
|
|
1003
1011
|
</Text>
|
|
1004
1012
|
<View
|
|
1005
1013
|
style={
|
|
@@ -1114,6 +1122,13 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
1114
1122
|
}
|
|
1115
1123
|
}
|
|
1116
1124
|
>
|
|
1125
|
+
<View
|
|
1126
|
+
style={
|
|
1127
|
+
{
|
|
1128
|
+
"width": 8,
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
/>
|
|
1117
1132
|
<Text
|
|
1118
1133
|
allowFontScaling={false}
|
|
1119
1134
|
color="blueIO-500"
|
|
@@ -1354,7 +1369,13 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
1354
1369
|
]
|
|
1355
1370
|
}
|
|
1356
1371
|
>
|
|
1357
|
-
<View
|
|
1372
|
+
<View
|
|
1373
|
+
style={
|
|
1374
|
+
{
|
|
1375
|
+
"flexShrink": 1,
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
>
|
|
1358
1379
|
<Text
|
|
1359
1380
|
allowFontScaling={false}
|
|
1360
1381
|
color="black"
|
|
@@ -1367,6 +1388,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
1367
1388
|
"lineHeight": 21,
|
|
1368
1389
|
}
|
|
1369
1390
|
}
|
|
1391
|
+
numberOfLines={1}
|
|
1370
1392
|
style={
|
|
1371
1393
|
[
|
|
1372
1394
|
{
|
|
@@ -1384,6 +1406,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
1384
1406
|
weight="Regular"
|
|
1385
1407
|
>
|
|
1386
1408
|
label
|
|
1409
|
+
con nome molto molto lungo
|
|
1387
1410
|
</Text>
|
|
1388
1411
|
</View>
|
|
1389
1412
|
<View
|
|
@@ -1394,6 +1417,13 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
|
|
|
1394
1417
|
}
|
|
1395
1418
|
}
|
|
1396
1419
|
>
|
|
1420
|
+
<View
|
|
1421
|
+
style={
|
|
1422
|
+
{
|
|
1423
|
+
"width": 8,
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
/>
|
|
1397
1427
|
<Text
|
|
1398
1428
|
allowFontScaling={false}
|
|
1399
1429
|
color="blueIO-500"
|
|
@@ -2702,7 +2732,13 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2702
2732
|
]
|
|
2703
2733
|
}
|
|
2704
2734
|
>
|
|
2705
|
-
<View
|
|
2735
|
+
<View
|
|
2736
|
+
style={
|
|
2737
|
+
{
|
|
2738
|
+
"flexShrink": 1,
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
>
|
|
2706
2742
|
<Text
|
|
2707
2743
|
allowFontScaling={false}
|
|
2708
2744
|
color="black"
|
|
@@ -2715,6 +2751,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2715
2751
|
"lineHeight": 21,
|
|
2716
2752
|
}
|
|
2717
2753
|
}
|
|
2754
|
+
numberOfLines={1}
|
|
2718
2755
|
style={
|
|
2719
2756
|
[
|
|
2720
2757
|
{
|
|
@@ -2732,6 +2769,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2732
2769
|
weight="SemiBold"
|
|
2733
2770
|
>
|
|
2734
2771
|
label
|
|
2772
|
+
con nome molto molto lungo
|
|
2735
2773
|
</Text>
|
|
2736
2774
|
<View
|
|
2737
2775
|
style={
|
|
@@ -2846,9 +2884,16 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2846
2884
|
}
|
|
2847
2885
|
}
|
|
2848
2886
|
>
|
|
2887
|
+
<View
|
|
2888
|
+
style={
|
|
2889
|
+
{
|
|
2890
|
+
"width": 8,
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
/>
|
|
2849
2894
|
<Text
|
|
2850
2895
|
allowFontScaling={false}
|
|
2851
|
-
color="
|
|
2896
|
+
color="blueIO-500"
|
|
2852
2897
|
defaultColor="black"
|
|
2853
2898
|
defaultWeight="SemiBold"
|
|
2854
2899
|
font="TitilliumWeb"
|
|
@@ -2865,7 +2910,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2865
2910
|
"lineHeight": 25,
|
|
2866
2911
|
},
|
|
2867
2912
|
{
|
|
2868
|
-
"color": "#
|
|
2913
|
+
"color": "#0B3EE3",
|
|
2869
2914
|
"fontFamily": "Titillium Web",
|
|
2870
2915
|
"fontStyle": "normal",
|
|
2871
2916
|
"fontWeight": "600",
|
|
@@ -3086,7 +3131,13 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3086
3131
|
]
|
|
3087
3132
|
}
|
|
3088
3133
|
>
|
|
3089
|
-
<View
|
|
3134
|
+
<View
|
|
3135
|
+
style={
|
|
3136
|
+
{
|
|
3137
|
+
"flexShrink": 1,
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
>
|
|
3090
3141
|
<Text
|
|
3091
3142
|
allowFontScaling={false}
|
|
3092
3143
|
color="black"
|
|
@@ -3099,6 +3150,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3099
3150
|
"lineHeight": 21,
|
|
3100
3151
|
}
|
|
3101
3152
|
}
|
|
3153
|
+
numberOfLines={1}
|
|
3102
3154
|
style={
|
|
3103
3155
|
[
|
|
3104
3156
|
{
|
|
@@ -3116,6 +3168,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3116
3168
|
weight="SemiBold"
|
|
3117
3169
|
>
|
|
3118
3170
|
label
|
|
3171
|
+
con nome molto molto lungo
|
|
3119
3172
|
</Text>
|
|
3120
3173
|
</View>
|
|
3121
3174
|
<View
|
|
@@ -3126,9 +3179,16 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3126
3179
|
}
|
|
3127
3180
|
}
|
|
3128
3181
|
>
|
|
3182
|
+
<View
|
|
3183
|
+
style={
|
|
3184
|
+
{
|
|
3185
|
+
"width": 8,
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
/>
|
|
3129
3189
|
<Text
|
|
3130
3190
|
allowFontScaling={false}
|
|
3131
|
-
color="
|
|
3191
|
+
color="blueIO-500"
|
|
3132
3192
|
defaultColor="black"
|
|
3133
3193
|
defaultWeight="SemiBold"
|
|
3134
3194
|
font="TitilliumWeb"
|
|
@@ -3145,7 +3205,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3145
3205
|
"lineHeight": 25,
|
|
3146
3206
|
},
|
|
3147
3207
|
{
|
|
3148
|
-
"color": "#
|
|
3208
|
+
"color": "#0B3EE3",
|
|
3149
3209
|
"fontFamily": "Titillium Web",
|
|
3150
3210
|
"fontStyle": "normal",
|
|
3151
3211
|
"fontWeight": "600",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { Pressable, View } from "react-native";
|
|
4
|
+
import { useIOTheme } from "../../core";
|
|
4
5
|
import { IOStyles } from "../../core/IOStyles";
|
|
5
6
|
import { triggerHaptic } from "../../functions/haptic-feedback/hapticFeedback";
|
|
6
7
|
import { HSpacer } from "../spacer/Spacer";
|
|
@@ -34,6 +35,8 @@ export const RadioButtonLabel = ({
|
|
|
34
35
|
disabled,
|
|
35
36
|
onValueChange
|
|
36
37
|
}: OwnProps) => {
|
|
38
|
+
const theme = useIOTheme();
|
|
39
|
+
|
|
37
40
|
const [toggleValue, setToggleValue] = useState(checked ?? false);
|
|
38
41
|
|
|
39
42
|
const toggleRadioButton = () => {
|
|
@@ -64,7 +67,7 @@ export const RadioButtonLabel = ({
|
|
|
64
67
|
<AnimatedRadio checked={checked ?? toggleValue} />
|
|
65
68
|
</View>
|
|
66
69
|
<HSpacer size={8} />
|
|
67
|
-
<H6 style={{ flexShrink: 1 }} color={"
|
|
70
|
+
<H6 style={{ flexShrink: 1 }} color={theme["textBody-default"]}>
|
|
68
71
|
{label}
|
|
69
72
|
</H6>
|
|
70
73
|
</View>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { Pressable, StyleSheet, Text, View } from "react-native";
|
|
4
|
-
import { IOColors, useIOExperimentalDesign } from "../../core";
|
|
4
|
+
import { IOColors, useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
5
5
|
import { IOStyles } from "../../core/IOStyles";
|
|
6
6
|
import { triggerHaptic } from "../../functions/haptic-feedback/hapticFeedback";
|
|
7
7
|
import { makeFontStyleObject } from "../../utils/fonts";
|
|
@@ -48,10 +48,11 @@ export const SwitchLabel = ({
|
|
|
48
48
|
onValueChange
|
|
49
49
|
}: OwnProps) => {
|
|
50
50
|
const [toggleValue, setToggleValue] = useState(checked ?? false);
|
|
51
|
+
const theme = useIOTheme();
|
|
51
52
|
|
|
52
53
|
const { isExperimental } = useIOExperimentalDesign();
|
|
53
54
|
const switchLabelText = (
|
|
54
|
-
<H6 style={{ flexShrink: 1 }} color={"
|
|
55
|
+
<H6 style={{ flexShrink: 1 }} color={theme["textBody-default"]}>
|
|
55
56
|
{label}
|
|
56
57
|
</H6>
|
|
57
58
|
);
|