@pagopa/io-app-design-system 5.12.1 → 6.0.0-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/banner/__test__/__snapshots__/banner.test.tsx.snap +68 -2
- package/lib/commonjs/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +285 -9
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +700 -33
- package/lib/commonjs/components/claimsSelector/ClaimsSelector.js +41 -23
- package/lib/commonjs/components/claimsSelector/ClaimsSelector.js.map +1 -1
- package/lib/commonjs/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +554 -188
- package/lib/commonjs/components/headers/HeaderFirstLevel.js +1 -1
- package/lib/commonjs/components/headers/HeaderFirstLevel.js.map +1 -1
- package/lib/commonjs/components/headers/HeaderSecondLevel.js +3 -2
- package/lib/commonjs/components/headers/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +925 -41
- package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js +14 -18
- package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js.map +1 -1
- package/lib/commonjs/components/modules/__test__/__snapshots__/ModuleNavigationAlt.test.tsx.snap +304 -8
- package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +430 -32
- package/lib/commonjs/components/templates/Dismissable.js +6 -1
- package/lib/commonjs/components/templates/Dismissable.js.map +1 -1
- package/lib/commonjs/components/templates/ForceScrollDownView.js +5 -4
- package/lib/commonjs/components/templates/ForceScrollDownView.js.map +1 -1
- package/lib/commonjs/hooks/useAccordionAnimation.js +9 -1
- package/lib/commonjs/hooks/useAccordionAnimation.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +68 -2
- package/lib/module/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +285 -9
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +700 -33
- package/lib/module/components/claimsSelector/ClaimsSelector.js +42 -24
- package/lib/module/components/claimsSelector/ClaimsSelector.js.map +1 -1
- package/lib/module/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +554 -188
- package/lib/module/components/headers/HeaderFirstLevel.js +2 -2
- package/lib/module/components/headers/HeaderFirstLevel.js.map +1 -1
- package/lib/module/components/headers/HeaderSecondLevel.js +4 -3
- package/lib/module/components/headers/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/layout/FooterActions.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +925 -41
- package/lib/module/components/loadingSpinner/LoadingSpinner.js +15 -19
- package/lib/module/components/loadingSpinner/LoadingSpinner.js.map +1 -1
- package/lib/module/components/modules/__test__/__snapshots__/ModuleNavigationAlt.test.tsx.snap +304 -8
- package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +430 -32
- package/lib/module/components/templates/Dismissable.js +7 -2
- package/lib/module/components/templates/Dismissable.js.map +1 -1
- package/lib/module/components/templates/ForceScrollDownView.js +6 -5
- package/lib/module/components/templates/ForceScrollDownView.js.map +1 -1
- package/lib/module/hooks/useAccordionAnimation.js +10 -2
- package/lib/module/hooks/useAccordionAnimation.js.map +1 -1
- package/lib/typescript/components/claimsSelector/ClaimsSelector.d.ts +7 -1
- package/lib/typescript/components/claimsSelector/ClaimsSelector.d.ts.map +1 -1
- package/lib/typescript/components/headers/HeaderSecondLevel.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +5 -1
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/layout/FooterActions.d.ts +3 -3
- package/lib/typescript/components/layout/FooterActions.d.ts.map +1 -1
- package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/lib/typescript/components/templates/Dismissable.d.ts.map +1 -1
- package/lib/typescript/components/templates/ForceScrollDownView.d.ts +1 -1
- package/lib/typescript/components/templates/ForceScrollDownView.d.ts.map +1 -1
- package/lib/typescript/components/typography/IOText.d.ts +1 -1
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/hooks/useAccordionAnimation.d.ts +4 -0
- package/lib/typescript/hooks/useAccordionAnimation.d.ts.map +1 -1
- package/package.json +7 -5
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +68 -2
- package/src/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +285 -9
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +700 -33
- package/src/components/claimsSelector/ClaimsSelector.tsx +56 -37
- package/src/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +554 -188
- package/src/components/headers/HeaderFirstLevel.tsx +2 -2
- package/src/components/headers/HeaderSecondLevel.tsx +4 -4
- package/src/components/layout/FooterActions.tsx +3 -3
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +925 -41
- package/src/components/loadingSpinner/LoadingSpinner.tsx +20 -24
- package/src/components/modules/__test__/__snapshots__/ModuleNavigationAlt.test.tsx.snap +304 -8
- package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +430 -32
- package/src/components/templates/Dismissable.tsx +5 -2
- package/src/components/templates/ForceScrollDownView.tsx +7 -8
- package/src/hooks/useAccordionAnimation.tsx +13 -1
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import Animated, {
|
|
9
9
|
AnimatedRef,
|
|
10
10
|
useAnimatedStyle,
|
|
11
|
-
|
|
11
|
+
useScrollOffset,
|
|
12
12
|
useSharedValue,
|
|
13
13
|
withTiming
|
|
14
14
|
} from "react-native-reanimated";
|
|
@@ -85,7 +85,7 @@ export const HeaderFirstLevel = ({
|
|
|
85
85
|
}, []);
|
|
86
86
|
|
|
87
87
|
/* We show the divider only when the header is scrolled down */
|
|
88
|
-
const offset =
|
|
88
|
+
const offset = useScrollOffset(
|
|
89
89
|
(animatedRef as AnimatedRef<Animated.ScrollView>) ||
|
|
90
90
|
(animatedFlatListRef as AnimatedRef<Animated.FlatList<any>>)
|
|
91
91
|
);
|
|
@@ -13,15 +13,15 @@ import Animated, {
|
|
|
13
13
|
SharedValue,
|
|
14
14
|
interpolate,
|
|
15
15
|
interpolateColor,
|
|
16
|
-
runOnJS,
|
|
17
16
|
useAnimatedReaction,
|
|
18
17
|
useAnimatedStyle,
|
|
19
18
|
useDerivedValue,
|
|
20
|
-
|
|
19
|
+
useScrollOffset,
|
|
21
20
|
useSharedValue,
|
|
22
21
|
withSpring,
|
|
23
22
|
withTiming
|
|
24
23
|
} from "react-native-reanimated";
|
|
24
|
+
import { scheduleOnRN } from "react-native-worklets";
|
|
25
25
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
26
26
|
import { useIONewTypeface, useIOTheme } from "../../context";
|
|
27
27
|
import {
|
|
@@ -157,7 +157,7 @@ export const HeaderSecondLevel = ({
|
|
|
157
157
|
thirdAction,
|
|
158
158
|
ignoreAccessibilityCheck = false
|
|
159
159
|
}: HeaderSecondLevel) => {
|
|
160
|
-
const scrollOffset =
|
|
160
|
+
const scrollOffset = useScrollOffset(
|
|
161
161
|
(animatedRef as AnimatedRef<Animated.ScrollView>) ||
|
|
162
162
|
(animatedRef as AnimatedRef<Animated.FlatList<any>>)
|
|
163
163
|
);
|
|
@@ -289,7 +289,7 @@ export const HeaderSecondLevel = ({
|
|
|
289
289
|
(currentOffset ?? 0) > offsetToCompare && !ignoreAccessibilityCheck
|
|
290
290
|
? "yes"
|
|
291
291
|
: "no-hide-descendants";
|
|
292
|
-
|
|
292
|
+
scheduleOnRN(setImportantForAccessibility, newValue);
|
|
293
293
|
}
|
|
294
294
|
},
|
|
295
295
|
[scrollValues, enableDiscreteTransition]
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
View,
|
|
9
9
|
ViewStyle
|
|
10
10
|
} from "react-native";
|
|
11
|
-
import Animated from "react-native-reanimated";
|
|
11
|
+
import Animated, { AnimatedStyle } from "react-native-reanimated";
|
|
12
12
|
import { useIOTheme } from "../../context";
|
|
13
13
|
import {
|
|
14
14
|
IOColors,
|
|
@@ -72,9 +72,9 @@ type FooterActions = FooterSingleButton | FooterTwoButtons | FooterThreeButtons;
|
|
|
72
72
|
|
|
73
73
|
type FooterAnimatedStyles = {
|
|
74
74
|
/* Apply object returned by `useAnimatedStyle` to the main block */
|
|
75
|
-
mainBlock?:
|
|
75
|
+
mainBlock?: AnimatedStyle<ViewStyle>;
|
|
76
76
|
/* Apply object returned by `useAnimatedStyle` to the background */
|
|
77
|
-
background?:
|
|
77
|
+
background?: AnimatedStyle<ViewStyle>;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
type FooterActionsProps = WithTestID<
|