@pagopa/io-app-design-system 4.4.4 → 5.0.0-1
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/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
- package/lib/commonjs/components/accordion/index.js +0 -11
- package/lib/commonjs/components/accordion/index.js.map +1 -1
- package/lib/commonjs/components/badge/Badge.js +4 -4
- package/lib/commonjs/components/badge/Badge.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +1 -1
- package/lib/commonjs/components/banner/Banner.js +4 -4
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +3 -3
- package/lib/commonjs/components/buttons/ButtonLink.js +25 -32
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +18 -86
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +9 -53
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButton.js +6 -36
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonContained.js +5 -50
- package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonSolid.js +5 -36
- package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +29 -27
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +5 -15
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/commonjs/components/checkbox/AnimatedMessageCheckbox.js +2 -9
- package/lib/commonjs/components/checkbox/AnimatedMessageCheckbox.js.map +1 -1
- package/lib/commonjs/components/layout/FooterActions.js +1 -5
- package/lib/commonjs/components/layout/FooterActions.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderSecondLevel.js +3 -3
- package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/layout/ModalBSHeader.js +3 -15
- package/lib/commonjs/components/layout/ModalBSHeader.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -4
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +1 -4
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +27 -27
- package/lib/commonjs/components/modules/ModuleIDP.js +4 -5
- package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberButton.js +3 -18
- package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
- package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
- package/lib/commonjs/components/radio/AnimatedRadio.js +4 -14
- package/lib/commonjs/components/radio/AnimatedRadio.js.map +1 -1
- package/lib/commonjs/components/searchInput/SearchInput.js +6 -10
- package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
- package/lib/commonjs/components/stepper/Stepper.js +1 -10
- package/lib/commonjs/components/stepper/Stepper.js.map +1 -1
- package/lib/commonjs/components/switch/NativeSwitch.js +2 -15
- package/lib/commonjs/components/switch/NativeSwitch.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +6 -46
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/tag/Tag.js +4 -4
- package/lib/commonjs/components/tag/Tag.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +10 -20
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/components/typography/Body.js +4 -6
- package/lib/commonjs/components/typography/Body.js.map +1 -1
- package/lib/commonjs/components/typography/BodySmall.js +3 -3
- package/lib/commonjs/components/typography/BodySmall.js.map +1 -1
- package/lib/commonjs/components/typography/ButtonText.js +6 -5
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/components/typography/Caption.js +6 -12
- package/lib/commonjs/components/typography/Caption.js.map +1 -1
- package/lib/commonjs/components/typography/H1.js +6 -13
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +8 -17
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +4 -8
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +7 -14
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H5.js +5 -10
- package/lib/commonjs/components/typography/H5.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +7 -10
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +8 -17
- package/lib/commonjs/components/typography/Hero.js.map +1 -1
- package/lib/commonjs/components/typography/LabelMini.js +4 -6
- package/lib/commonjs/components/typography/LabelMini.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
- package/lib/commonjs/components/typography/markdown/MdH1.js +3 -3
- package/lib/commonjs/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH2.js +3 -3
- package/lib/commonjs/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH3.js +3 -3
- package/lib/commonjs/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/commonjs/core/IOColors.js +1 -8
- package/lib/commonjs/core/IOColors.js.map +1 -1
- package/lib/commonjs/core/IODSExperimentalContextProvider.js +4 -3
- package/lib/commonjs/core/IODSExperimentalContextProvider.js.map +1 -1
- package/lib/commonjs/core/IONewTypefaceContextProvider.js +33 -0
- package/lib/commonjs/core/IONewTypefaceContextProvider.js.map +1 -0
- package/lib/commonjs/core/IOStyles.js +1 -49
- package/lib/commonjs/core/IOStyles.js.map +1 -1
- package/lib/commonjs/core/IOThemeContextProvider.js +4 -15
- package/lib/commonjs/core/IOThemeContextProvider.js.map +1 -1
- package/lib/commonjs/core/index.js +11 -0
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
- package/lib/module/components/accordion/index.js +0 -1
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/badge/Badge.js +5 -5
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +1 -1
- package/lib/module/components/banner/Banner.js +5 -5
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +3 -3
- package/lib/module/components/buttons/ButtonLink.js +28 -35
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +19 -87
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +10 -54
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/IconButton.js +6 -37
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/IconButtonContained.js +6 -51
- package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
- package/lib/module/components/buttons/IconButtonSolid.js +6 -37
- package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +29 -27
- package/lib/module/components/checkbox/AnimatedCheckbox.js +6 -16
- package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/module/components/checkbox/AnimatedMessageCheckbox.js +3 -10
- package/lib/module/components/checkbox/AnimatedMessageCheckbox.js.map +1 -1
- package/lib/module/components/layout/FooterActions.js +2 -6
- package/lib/module/components/layout/FooterActions.js.map +1 -1
- package/lib/module/components/layout/HeaderSecondLevel.js +4 -4
- package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/layout/ModalBSHeader.js +5 -17
- package/lib/module/components/layout/ModalBSHeader.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +2 -5
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +2 -5
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +27 -27
- package/lib/module/components/modules/ModuleIDP.js +4 -5
- package/lib/module/components/modules/ModuleIDP.js.map +1 -1
- package/lib/module/components/numberpad/NumberButton.js +5 -20
- package/lib/module/components/numberpad/NumberButton.js.map +1 -1
- package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
- package/lib/module/components/radio/AnimatedRadio.js +5 -15
- package/lib/module/components/radio/AnimatedRadio.js.map +1 -1
- package/lib/module/components/searchInput/SearchInput.js +7 -11
- package/lib/module/components/searchInput/SearchInput.js.map +1 -1
- package/lib/module/components/stepper/Stepper.js +2 -11
- package/lib/module/components/stepper/Stepper.js.map +1 -1
- package/lib/module/components/switch/NativeSwitch.js +3 -16
- package/lib/module/components/switch/NativeSwitch.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +7 -47
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/tag/Tag.js +5 -5
- package/lib/module/components/tag/Tag.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +11 -21
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/components/typography/Body.js +5 -7
- package/lib/module/components/typography/Body.js.map +1 -1
- package/lib/module/components/typography/BodySmall.js +4 -4
- package/lib/module/components/typography/BodySmall.js.map +1 -1
- package/lib/module/components/typography/ButtonText.js +7 -6
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/components/typography/Caption.js +6 -12
- package/lib/module/components/typography/Caption.js.map +1 -1
- package/lib/module/components/typography/H1.js +6 -13
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +8 -17
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +4 -8
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +7 -14
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H5.js +6 -11
- package/lib/module/components/typography/H5.js.map +1 -1
- package/lib/module/components/typography/H6.js +7 -10
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +8 -17
- package/lib/module/components/typography/Hero.js.map +1 -1
- package/lib/module/components/typography/LabelMini.js +5 -7
- package/lib/module/components/typography/LabelMini.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
- package/lib/module/components/typography/markdown/MdH1.js +4 -4
- package/lib/module/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH2.js +4 -4
- package/lib/module/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH3.js +4 -4
- package/lib/module/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/module/core/IOColors.js +0 -6
- package/lib/module/core/IOColors.js.map +1 -1
- package/lib/module/core/IODSExperimentalContextProvider.js +2 -2
- package/lib/module/core/IODSExperimentalContextProvider.js.map +1 -1
- package/lib/module/core/IONewTypefaceContextProvider.js +22 -0
- package/lib/module/core/IONewTypefaceContextProvider.js.map +1 -0
- package/lib/module/core/IOStyles.js +0 -46
- package/lib/module/core/IOStyles.js.map +1 -1
- package/lib/module/core/IOThemeContextProvider.js +3 -12
- package/lib/module/core/IOThemeContextProvider.js.map +1 -1
- package/lib/module/core/index.js +1 -0
- package/lib/module/core/index.js.map +1 -1
- package/lib/typescript/components/accordion/index.d.ts +0 -1
- package/lib/typescript/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/checkbox/AnimatedMessageCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/layout/FooterActions.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
- package/lib/typescript/components/layout/ModalBSHeader.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleIDP.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
- package/lib/typescript/components/radio/AnimatedRadio.d.ts.map +1 -1
- package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
- package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/components/switch/NativeSwitch.d.ts.map +1 -1
- package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/components/typography/Caption.d.ts.map +1 -1
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H2.d.ts +0 -3
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H4.d.ts.map +1 -1
- package/lib/typescript/components/typography/H5.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
- package/lib/typescript/core/IOColors.d.ts +0 -1
- package/lib/typescript/core/IOColors.d.ts.map +1 -1
- package/lib/typescript/core/IODSExperimentalContextProvider.d.ts.map +1 -1
- package/lib/typescript/core/IONewTypefaceContextProvider.d.ts +16 -0
- package/lib/typescript/core/IONewTypefaceContextProvider.d.ts.map +1 -0
- package/lib/typescript/core/IOStyles.d.ts +2 -32
- package/lib/typescript/core/IOStyles.d.ts.map +1 -1
- package/lib/typescript/core/IOThemeContextProvider.d.ts +0 -4
- package/lib/typescript/core/IOThemeContextProvider.d.ts.map +1 -1
- package/lib/typescript/core/index.d.ts +1 -0
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/utils/fonts.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
- package/src/components/accordion/index.tsx +0 -1
- package/src/components/badge/Badge.tsx +3 -3
- package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +1 -1
- package/src/components/banner/Banner.tsx +3 -4
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +3 -3
- package/src/components/buttons/ButtonLink.tsx +38 -41
- package/src/components/buttons/ButtonOutline.tsx +31 -103
- package/src/components/buttons/ButtonSolid.tsx +11 -69
- package/src/components/buttons/IconButton.tsx +5 -49
- package/src/components/buttons/IconButtonContained.tsx +11 -58
- package/src/components/buttons/IconButtonSolid.tsx +9 -47
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +29 -27
- package/src/components/checkbox/AnimatedCheckbox.tsx +6 -34
- package/src/components/checkbox/AnimatedMessageCheckbox.tsx +3 -14
- package/src/components/layout/FooterActions.tsx +1 -4
- package/src/components/layout/HeaderSecondLevel.tsx +4 -3
- package/src/components/layout/ModalBSHeader.tsx +11 -29
- package/src/components/listitems/ListItemNavAlert.tsx +1 -4
- package/src/components/listitems/ListItemTransaction.tsx +1 -5
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +27 -27
- package/src/components/modules/ModuleIDP.tsx +3 -8
- package/src/components/numberpad/NumberButton.tsx +4 -27
- package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
- package/src/components/radio/AnimatedRadio.tsx +5 -33
- package/src/components/searchInput/SearchInput.tsx +11 -20
- package/src/components/stepper/Stepper.tsx +2 -20
- package/src/components/switch/NativeSwitch.tsx +3 -21
- package/src/components/tabs/TabItem.tsx +14 -61
- package/src/components/tag/Tag.tsx +3 -3
- package/src/components/textInput/TextInputBase.tsx +19 -34
- package/src/components/typography/Body.tsx +4 -11
- package/src/components/typography/BodySmall.tsx +3 -3
- package/src/components/typography/ButtonText.tsx +6 -6
- package/src/components/typography/Caption.tsx +6 -13
- package/src/components/typography/H1.tsx +6 -14
- package/src/components/typography/H2.tsx +8 -18
- package/src/components/typography/H3.tsx +4 -8
- package/src/components/typography/H4.tsx +7 -15
- package/src/components/typography/H5.tsx +6 -14
- package/src/components/typography/H6.tsx +7 -11
- package/src/components/typography/Hero.tsx +8 -18
- package/src/components/typography/LabelMini.tsx +4 -11
- package/src/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
- package/src/components/typography/markdown/MdH1.tsx +3 -3
- package/src/components/typography/markdown/MdH2.tsx +3 -3
- package/src/components/typography/markdown/MdH3.tsx +3 -3
- package/src/core/IOColors.ts +0 -7
- package/src/core/IODSExperimentalContextProvider.tsx +2 -2
- package/src/core/IONewTypefaceContextProvider.tsx +37 -0
- package/src/core/IOStyles.ts +0 -52
- package/src/core/IOThemeContextProvider.tsx +3 -16
- package/src/core/index.ts +1 -0
- package/lib/commonjs/components/accordion/RawAccordion.js +0 -93
- package/lib/commonjs/components/accordion/RawAccordion.js.map +0 -1
- package/lib/module/components/accordion/RawAccordion.js +0 -86
- package/lib/module/components/accordion/RawAccordion.js.map +0 -1
- package/lib/typescript/components/accordion/RawAccordion.d.ts +0 -17
- package/lib/typescript/components/accordion/RawAccordion.d.ts.map +0 -1
- package/src/components/accordion/RawAccordion.tsx +0 -116
|
@@ -15,8 +15,7 @@ import {
|
|
|
15
15
|
IOButtonStyles,
|
|
16
16
|
IOColors,
|
|
17
17
|
IOIconButtonStyles,
|
|
18
|
-
hexToRgba
|
|
19
|
-
useIOExperimentalDesign
|
|
18
|
+
hexToRgba
|
|
20
19
|
} from "../../core";
|
|
21
20
|
import { useScaleAnimation } from "../../hooks";
|
|
22
21
|
import { WithTestID } from "../../utils/types";
|
|
@@ -88,51 +87,6 @@ const mapColorStates: Record<
|
|
|
88
87
|
}
|
|
89
88
|
};
|
|
90
89
|
|
|
91
|
-
const mapLegacyColorStates: Record<
|
|
92
|
-
NonNullable<IconButtonContained["color"]>,
|
|
93
|
-
ColorStates
|
|
94
|
-
> = {
|
|
95
|
-
// Primary button
|
|
96
|
-
primary: {
|
|
97
|
-
background: {
|
|
98
|
-
default: hexToRgba(IOColors.blue, 0),
|
|
99
|
-
pressed: hexToRgba(IOColors.blue, 0.15),
|
|
100
|
-
disabled: "transparent"
|
|
101
|
-
},
|
|
102
|
-
icon: {
|
|
103
|
-
default: IOColors.blue,
|
|
104
|
-
pressed: IOColors.blue,
|
|
105
|
-
disabled: hexToRgba(IOColors.blue, 0.25)
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
// Neutral button
|
|
109
|
-
neutral: {
|
|
110
|
-
background: {
|
|
111
|
-
default: IOColors.white,
|
|
112
|
-
pressed: IOColors.greyUltraLight,
|
|
113
|
-
disabled: "transparent"
|
|
114
|
-
},
|
|
115
|
-
icon: {
|
|
116
|
-
default: IOColors.bluegrey,
|
|
117
|
-
pressed: IOColors.black,
|
|
118
|
-
disabled: IOColors.grey
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
// Contrast button
|
|
122
|
-
contrast: {
|
|
123
|
-
background: {
|
|
124
|
-
default: hexToRgba(IOColors.white, 0),
|
|
125
|
-
pressed: hexToRgba(IOColors.white, 0.2),
|
|
126
|
-
disabled: "transparent"
|
|
127
|
-
},
|
|
128
|
-
icon: {
|
|
129
|
-
default: IOColors.white,
|
|
130
|
-
pressed: IOColors.white,
|
|
131
|
-
disabled: hexToRgba(IOColors.white, 0.25)
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
|
|
136
90
|
const AnimatedIconClassComponent =
|
|
137
91
|
Animated.createAnimatedComponent(IconClassComponent);
|
|
138
92
|
|
|
@@ -145,22 +99,18 @@ export const IconButtonContained = ({
|
|
|
145
99
|
accessibilityHint,
|
|
146
100
|
testID
|
|
147
101
|
}: IconButtonContained) => {
|
|
148
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
149
|
-
|
|
150
102
|
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
151
103
|
useScaleAnimation("exaggerated");
|
|
152
104
|
const reducedMotion = useReducedMotion();
|
|
153
105
|
|
|
154
|
-
const colorMap = React.useMemo(
|
|
155
|
-
() => (isExperimental ? mapColorStates : mapLegacyColorStates),
|
|
156
|
-
[isExperimental]
|
|
157
|
-
);
|
|
158
|
-
|
|
159
106
|
const backgroundColorAnimationStyle = useAnimatedStyle(() => ({
|
|
160
107
|
backgroundColor: interpolateColor(
|
|
161
108
|
progress.value,
|
|
162
109
|
[0, 1],
|
|
163
|
-
[
|
|
110
|
+
[
|
|
111
|
+
mapColorStates[color].background.default,
|
|
112
|
+
mapColorStates[color].background.pressed
|
|
113
|
+
]
|
|
164
114
|
)
|
|
165
115
|
}));
|
|
166
116
|
|
|
@@ -169,7 +119,7 @@ export const IconButtonContained = ({
|
|
|
169
119
|
color: interpolateColor(
|
|
170
120
|
progress.value,
|
|
171
121
|
[0, 1],
|
|
172
|
-
[
|
|
122
|
+
[mapColorStates[color].icon.default, mapColorStates[color].icon.pressed]
|
|
173
123
|
)
|
|
174
124
|
}));
|
|
175
125
|
|
|
@@ -199,10 +149,13 @@ export const IconButtonContained = ({
|
|
|
199
149
|
<AnimatedIconClassComponent
|
|
200
150
|
name={icon}
|
|
201
151
|
animatedProps={iconColorAnimationStyle}
|
|
202
|
-
color={
|
|
152
|
+
color={mapColorStates[color]?.icon?.default}
|
|
203
153
|
/>
|
|
204
154
|
) : (
|
|
205
|
-
<AnimatedIcon
|
|
155
|
+
<AnimatedIcon
|
|
156
|
+
name={icon}
|
|
157
|
+
color={mapColorStates[color]?.icon?.disabled}
|
|
158
|
+
/>
|
|
206
159
|
)}
|
|
207
160
|
</Animated.View>
|
|
208
161
|
</Pressable>
|
|
@@ -5,11 +5,7 @@ import Animated, {
|
|
|
5
5
|
useAnimatedStyle,
|
|
6
6
|
useReducedMotion
|
|
7
7
|
} from "react-native-reanimated";
|
|
8
|
-
import {
|
|
9
|
-
IOButtonStyles,
|
|
10
|
-
IOIconButtonStyles,
|
|
11
|
-
useIOExperimentalDesign
|
|
12
|
-
} from "../../core";
|
|
8
|
+
import { IOButtonStyles, IOIconButtonStyles } from "../../core";
|
|
13
9
|
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
14
10
|
import { useScaleAnimation } from "../../hooks";
|
|
15
11
|
import { WithTestID } from "../../utils/types";
|
|
@@ -65,36 +61,6 @@ const mapColorStates: Record<
|
|
|
65
61
|
}
|
|
66
62
|
};
|
|
67
63
|
|
|
68
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
69
|
-
const mapLegacyColorStates: Record<
|
|
70
|
-
NonNullable<IconButtonSolid["color"]>,
|
|
71
|
-
ColorStates
|
|
72
|
-
> = {
|
|
73
|
-
// Primary button
|
|
74
|
-
primary: {
|
|
75
|
-
background: {
|
|
76
|
-
default: IOColors.blue,
|
|
77
|
-
pressed: IOColors["blue-600"],
|
|
78
|
-
disabled: IOColors["grey-100"]
|
|
79
|
-
},
|
|
80
|
-
icon: {
|
|
81
|
-
default: IOColors.white,
|
|
82
|
-
disabled: IOColors["grey-450"]
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
contrast: {
|
|
86
|
-
background: {
|
|
87
|
-
default: IOColors.white,
|
|
88
|
-
pressed: IOColors["blue-50"],
|
|
89
|
-
disabled: hexToRgba(IOColors.white, 0.25)
|
|
90
|
-
},
|
|
91
|
-
icon: {
|
|
92
|
-
default: IOColors.blue,
|
|
93
|
-
disabled: IOColors.blue
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
64
|
export const IconButtonSolid = ({
|
|
99
65
|
icon,
|
|
100
66
|
color = "primary",
|
|
@@ -104,22 +70,18 @@ export const IconButtonSolid = ({
|
|
|
104
70
|
accessibilityHint,
|
|
105
71
|
testID
|
|
106
72
|
}: IconButtonSolid) => {
|
|
107
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
108
|
-
|
|
109
73
|
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
110
74
|
useScaleAnimation("exaggerated");
|
|
111
75
|
const reducedMotion = useReducedMotion();
|
|
112
76
|
|
|
113
|
-
const colorMap = React.useMemo(
|
|
114
|
-
() => (isExperimental ? mapColorStates : mapLegacyColorStates),
|
|
115
|
-
[isExperimental]
|
|
116
|
-
);
|
|
117
|
-
|
|
118
77
|
const backgroundColorAnimationStyle = useAnimatedStyle(() => ({
|
|
119
78
|
backgroundColor: interpolateColor(
|
|
120
79
|
progress.value,
|
|
121
80
|
[0, 1],
|
|
122
|
-
[
|
|
81
|
+
[
|
|
82
|
+
mapColorStates[color].background.default,
|
|
83
|
+
mapColorStates[color].background.pressed
|
|
84
|
+
]
|
|
123
85
|
)
|
|
124
86
|
}));
|
|
125
87
|
|
|
@@ -145,10 +107,10 @@ export const IconButtonSolid = ({
|
|
|
145
107
|
!disabled && backgroundColorAnimationStyle,
|
|
146
108
|
disabled
|
|
147
109
|
? {
|
|
148
|
-
backgroundColor:
|
|
110
|
+
backgroundColor: mapColorStates[color]?.background?.disabled
|
|
149
111
|
}
|
|
150
112
|
: {
|
|
151
|
-
backgroundColor:
|
|
113
|
+
backgroundColor: mapColorStates[color]?.background?.default
|
|
152
114
|
}
|
|
153
115
|
]}
|
|
154
116
|
>
|
|
@@ -157,8 +119,8 @@ export const IconButtonSolid = ({
|
|
|
157
119
|
name={icon}
|
|
158
120
|
color={
|
|
159
121
|
!disabled
|
|
160
|
-
?
|
|
161
|
-
:
|
|
122
|
+
? mapColorStates[color]?.icon?.default
|
|
123
|
+
: mapColorStates[color]?.icon?.disabled
|
|
162
124
|
}
|
|
163
125
|
/>
|
|
164
126
|
</Animated.View>
|
|
@@ -164,13 +164,13 @@ exports[`Test Buttons Components - Experimental Enabled ButtonOutline Snapshot 1
|
|
|
164
164
|
"paddingHorizontal": 24,
|
|
165
165
|
"textAlignVertical": "center",
|
|
166
166
|
},
|
|
167
|
-
false,
|
|
168
167
|
{
|
|
169
|
-
"
|
|
168
|
+
"height": 48,
|
|
170
169
|
},
|
|
171
170
|
{
|
|
172
|
-
"
|
|
171
|
+
"borderWidth": 2,
|
|
173
172
|
},
|
|
173
|
+
false,
|
|
174
174
|
{
|
|
175
175
|
"columnGap": 8,
|
|
176
176
|
},
|
|
@@ -282,12 +282,12 @@ exports[`Test Buttons Components - Experimental Enabled ButtonSolid Snapshot 1`]
|
|
|
282
282
|
"textAlignVertical": "center",
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
|
-
"
|
|
285
|
+
"height": 48,
|
|
286
286
|
},
|
|
287
|
-
false,
|
|
288
287
|
{
|
|
289
|
-
"
|
|
288
|
+
"overflow": "hidden",
|
|
290
289
|
},
|
|
290
|
+
false,
|
|
291
291
|
{
|
|
292
292
|
"backgroundColor": "#0B3EE3",
|
|
293
293
|
},
|
|
@@ -833,7 +833,7 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
833
833
|
{},
|
|
834
834
|
{
|
|
835
835
|
"color": "#0E0F13",
|
|
836
|
-
"fontFamily": "
|
|
836
|
+
"fontFamily": "Titillio",
|
|
837
837
|
"fontSize": 16,
|
|
838
838
|
"fontStyle": "normal",
|
|
839
839
|
"fontWeight": "600",
|
|
@@ -900,27 +900,28 @@ exports[`Test Buttons Components ButtonOutline Snapshot 1`] = `
|
|
|
900
900
|
[
|
|
901
901
|
{
|
|
902
902
|
"alignItems": "center",
|
|
903
|
-
"
|
|
903
|
+
"borderCurve": "continuous",
|
|
904
|
+
"borderRadius": 8,
|
|
904
905
|
"elevation": 0,
|
|
905
906
|
"flexDirection": "row",
|
|
906
907
|
"justifyContent": "center",
|
|
907
|
-
"paddingHorizontal":
|
|
908
|
+
"paddingHorizontal": 24,
|
|
908
909
|
"textAlignVertical": "center",
|
|
909
910
|
},
|
|
910
|
-
false,
|
|
911
911
|
{
|
|
912
|
-
"
|
|
912
|
+
"height": 48,
|
|
913
913
|
},
|
|
914
914
|
{
|
|
915
|
-
"
|
|
915
|
+
"borderWidth": 2,
|
|
916
916
|
},
|
|
917
|
+
false,
|
|
917
918
|
{
|
|
918
919
|
"columnGap": 8,
|
|
919
920
|
},
|
|
920
921
|
false,
|
|
921
922
|
{
|
|
922
|
-
"backgroundColor": "rgba(
|
|
923
|
-
"borderColor": "#
|
|
923
|
+
"backgroundColor": "rgba(231,236,252,0)",
|
|
924
|
+
"borderColor": "#0B3EE3",
|
|
924
925
|
},
|
|
925
926
|
{
|
|
926
927
|
"transform": [
|
|
@@ -949,7 +950,7 @@ exports[`Test Buttons Components ButtonOutline Snapshot 1`] = `
|
|
|
949
950
|
{},
|
|
950
951
|
{
|
|
951
952
|
"color": "#0E0F13",
|
|
952
|
-
"fontFamily": "
|
|
953
|
+
"fontFamily": "Titillio",
|
|
953
954
|
"fontSize": 16,
|
|
954
955
|
"fontStyle": "normal",
|
|
955
956
|
"fontWeight": "600",
|
|
@@ -1016,22 +1017,23 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1016
1017
|
[
|
|
1017
1018
|
{
|
|
1018
1019
|
"alignItems": "center",
|
|
1019
|
-
"
|
|
1020
|
+
"borderCurve": "continuous",
|
|
1021
|
+
"borderRadius": 8,
|
|
1020
1022
|
"elevation": 0,
|
|
1021
1023
|
"flexDirection": "row",
|
|
1022
1024
|
"justifyContent": "center",
|
|
1023
|
-
"paddingHorizontal":
|
|
1025
|
+
"paddingHorizontal": 24,
|
|
1024
1026
|
"textAlignVertical": "center",
|
|
1025
1027
|
},
|
|
1026
1028
|
{
|
|
1027
|
-
"
|
|
1029
|
+
"height": 48,
|
|
1028
1030
|
},
|
|
1029
|
-
false,
|
|
1030
1031
|
{
|
|
1031
|
-
"
|
|
1032
|
+
"overflow": "hidden",
|
|
1032
1033
|
},
|
|
1034
|
+
false,
|
|
1033
1035
|
{
|
|
1034
|
-
"backgroundColor": "#
|
|
1036
|
+
"backgroundColor": "#0B3EE3",
|
|
1035
1037
|
},
|
|
1036
1038
|
{
|
|
1037
1039
|
"transform": [
|
|
@@ -1074,7 +1076,7 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1074
1076
|
{},
|
|
1075
1077
|
{
|
|
1076
1078
|
"color": "#FFFFFF",
|
|
1077
|
-
"fontFamily": "
|
|
1079
|
+
"fontFamily": "Titillio",
|
|
1078
1080
|
"fontSize": 16,
|
|
1079
1081
|
"fontStyle": "normal",
|
|
1080
1082
|
"fontWeight": "600",
|
|
@@ -1176,7 +1178,7 @@ exports[`Test Buttons Components IconButton Snapshot 1`] = `
|
|
|
1176
1178
|
"borderWidth": 0,
|
|
1177
1179
|
},
|
|
1178
1180
|
{
|
|
1179
|
-
"color": "#
|
|
1181
|
+
"color": "#0B3EE3",
|
|
1180
1182
|
},
|
|
1181
1183
|
{
|
|
1182
1184
|
"flex": 0,
|
|
@@ -1185,7 +1187,7 @@ exports[`Test Buttons Components IconButton Snapshot 1`] = `
|
|
|
1185
1187
|
},
|
|
1186
1188
|
]
|
|
1187
1189
|
}
|
|
1188
|
-
tintColor="#
|
|
1190
|
+
tintColor="#0B3EE3"
|
|
1189
1191
|
vbHeight={24}
|
|
1190
1192
|
vbWidth={24}
|
|
1191
1193
|
width={24}
|
|
@@ -1310,7 +1312,7 @@ exports[`Test Buttons Components IconButtonContained Snapshot 1`] = `
|
|
|
1310
1312
|
"borderWidth": 0,
|
|
1311
1313
|
},
|
|
1312
1314
|
{
|
|
1313
|
-
"color": "#
|
|
1315
|
+
"color": "#0B3EE3",
|
|
1314
1316
|
},
|
|
1315
1317
|
{
|
|
1316
1318
|
"flex": 0,
|
|
@@ -1319,7 +1321,7 @@ exports[`Test Buttons Components IconButtonContained Snapshot 1`] = `
|
|
|
1319
1321
|
},
|
|
1320
1322
|
]
|
|
1321
1323
|
}
|
|
1322
|
-
tintColor="#
|
|
1324
|
+
tintColor="#0B3EE3"
|
|
1323
1325
|
vbHeight={24}
|
|
1324
1326
|
vbWidth={24}
|
|
1325
1327
|
width={24}
|
|
@@ -1417,7 +1419,7 @@ exports[`Test Buttons Components IconButtonSolid Snapshot 1`] = `
|
|
|
1417
1419
|
"backgroundColor": undefined,
|
|
1418
1420
|
},
|
|
1419
1421
|
{
|
|
1420
|
-
"backgroundColor": "#
|
|
1422
|
+
"backgroundColor": "#0B3EE3",
|
|
1421
1423
|
},
|
|
1422
1424
|
]
|
|
1423
1425
|
}
|
|
@@ -14,14 +14,10 @@ import Animated, {
|
|
|
14
14
|
withSpring,
|
|
15
15
|
withTiming
|
|
16
16
|
} from "react-native-reanimated";
|
|
17
|
-
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
18
|
-
import { useIOExperimentalDesign } from "../../core";
|
|
19
17
|
import { IOSpringValues } from "../../core/IOAnimations";
|
|
20
18
|
import { IOColors } from "../../core/IOColors";
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
IOSelectionTickVisualParams
|
|
24
|
-
} from "../../core/IOStyles";
|
|
19
|
+
import { IOSelectionTickVisualParams } from "../../core/IOStyles";
|
|
20
|
+
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
25
21
|
import { AnimatedTick } from "../common/AnimatedTick";
|
|
26
22
|
|
|
27
23
|
type Props = {
|
|
@@ -62,24 +58,8 @@ export const AnimatedCheckbox = ({
|
|
|
62
58
|
const { dynamicFontScale } = useIOFontDynamicScale();
|
|
63
59
|
const isChecked = checked ?? false;
|
|
64
60
|
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
IOColors[IOSelectionTickVisualParams.borderColorOffState];
|
|
68
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
69
|
-
const legacyBorderColorOffState =
|
|
70
|
-
IOColors[IOSelectionTickLegacyVisualParams.borderColorOffState];
|
|
71
|
-
const borderColorProp = isExperimental
|
|
72
|
-
? borderColorOffState
|
|
73
|
-
: legacyBorderColorOffState;
|
|
74
|
-
|
|
75
|
-
const backgroundColorOnState =
|
|
76
|
-
IOColors[IOSelectionTickVisualParams.bgColorOnState];
|
|
77
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
78
|
-
const legacyBackgroundColorOnState =
|
|
79
|
-
IOColors[IOSelectionTickLegacyVisualParams.bgColorOnState];
|
|
80
|
-
const backgroundColorProp = isExperimental
|
|
81
|
-
? backgroundColorOnState
|
|
82
|
-
: legacyBackgroundColorOnState;
|
|
61
|
+
const borderColor = IOColors[IOSelectionTickVisualParams.borderColorOffState];
|
|
62
|
+
const backgroundColor = IOColors[IOSelectionTickVisualParams.bgColorOnState];
|
|
83
63
|
|
|
84
64
|
const squareAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
85
65
|
const tickAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
@@ -127,21 +107,13 @@ export const AnimatedCheckbox = ({
|
|
|
127
107
|
testID="AnimatedCheckboxInput"
|
|
128
108
|
>
|
|
129
109
|
<View
|
|
130
|
-
style={[
|
|
131
|
-
styles.checkboxBorder,
|
|
132
|
-
checkboxSizeStyle,
|
|
133
|
-
{
|
|
134
|
-
borderColor: borderColorProp
|
|
135
|
-
}
|
|
136
|
-
]}
|
|
110
|
+
style={[styles.checkboxBorder, checkboxSizeStyle, { borderColor }]}
|
|
137
111
|
/>
|
|
138
112
|
<Animated.View
|
|
139
113
|
style={[
|
|
140
114
|
styles.checkBoxSquare,
|
|
141
115
|
checkboxSizeStyle,
|
|
142
|
-
{
|
|
143
|
-
backgroundColor: backgroundColorProp
|
|
144
|
-
},
|
|
116
|
+
{ backgroundColor },
|
|
145
117
|
animatedCheckboxSquare
|
|
146
118
|
]}
|
|
147
119
|
/>
|
|
@@ -8,12 +8,10 @@ import Animated, {
|
|
|
8
8
|
withSpring,
|
|
9
9
|
withTiming
|
|
10
10
|
} from "react-native-reanimated";
|
|
11
|
-
import { useIOExperimentalDesign } from "../../core";
|
|
12
11
|
import { IOSpringValues } from "../../core/IOAnimations";
|
|
13
12
|
import { IOColors } from "../../core/IOColors";
|
|
14
13
|
import { IOSpacingScale } from "../../core/IOSpacing";
|
|
15
14
|
import {
|
|
16
|
-
IOSelectionTickLegacyVisualParams,
|
|
17
15
|
IOSelectionTickVisualParams,
|
|
18
16
|
IOVisualCostants
|
|
19
17
|
} from "../../core/IOStyles";
|
|
@@ -53,18 +51,11 @@ export const AnimatedMessageCheckbox = ({
|
|
|
53
51
|
onPress
|
|
54
52
|
}: AnimatedMessageCheckbox) => {
|
|
55
53
|
const isChecked = !!checked;
|
|
56
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
57
54
|
|
|
58
55
|
const shapeAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
59
56
|
const tickAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
63
|
-
const legacyBackgroundColorOnState =
|
|
64
|
-
IOColors[IOSelectionTickLegacyVisualParams.bgColorOnState];
|
|
65
|
-
const backgroundColorProp = isExperimental
|
|
66
|
-
? backgroundColorOnState
|
|
67
|
-
: legacyBackgroundColorOnState;
|
|
57
|
+
|
|
58
|
+
const backgroundColor = IOColors[IOSelectionTickVisualParams.bgColorOnState];
|
|
68
59
|
|
|
69
60
|
useEffect(() => {
|
|
70
61
|
// eslint-disable-next-line functional/immutable-data
|
|
@@ -100,9 +91,7 @@ export const AnimatedMessageCheckbox = ({
|
|
|
100
91
|
<Animated.View
|
|
101
92
|
style={[
|
|
102
93
|
styles.checkBoxShape,
|
|
103
|
-
{
|
|
104
|
-
backgroundColor: backgroundColorProp
|
|
105
|
-
},
|
|
94
|
+
{ backgroundColor },
|
|
106
95
|
animatedCheckboxShape
|
|
107
96
|
]}
|
|
108
97
|
/>
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
IOVisualCostants,
|
|
18
18
|
buttonSolidHeight,
|
|
19
19
|
hexToRgba,
|
|
20
|
-
useIOExperimentalDesign,
|
|
21
20
|
useIOTheme
|
|
22
21
|
} from "../../core";
|
|
23
22
|
import { WithTestID } from "../../utils/types";
|
|
@@ -128,7 +127,6 @@ export const FooterActions = ({
|
|
|
128
127
|
debugMode = false
|
|
129
128
|
}: FooterActionsProps) => {
|
|
130
129
|
const theme = useIOTheme();
|
|
131
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
132
130
|
|
|
133
131
|
const { bottomMargin, extraBottomMargin } = useBottomMargins(
|
|
134
132
|
!!actions?.secondary,
|
|
@@ -143,13 +141,12 @@ export const FooterActions = ({
|
|
|
143
141
|
(both light and dark themes) */
|
|
144
142
|
const HEADER_BG_COLOR: ColorValue = IOColors[theme["appBackground-primary"]];
|
|
145
143
|
const TRANSPARENT_BG_COLOR: ColorValue = "transparent";
|
|
146
|
-
const BUTTONSOLID_HEIGHT = isExperimental ? buttonSolidHeight : 40;
|
|
147
144
|
|
|
148
145
|
/* Safe background block. Cover everything until it reaches
|
|
149
146
|
the half of the primary action button. It avoids
|
|
150
147
|
glitchy behavior underneath. */
|
|
151
148
|
const safeBackgroundBlockHeight =
|
|
152
|
-
bottomMargin + actionBlockHeight -
|
|
149
|
+
bottomMargin + actionBlockHeight - buttonSolidHeight / 2;
|
|
153
150
|
|
|
154
151
|
const getActionBlockMeasurements = (event: LayoutChangeEvent) => {
|
|
155
152
|
const { height } = event.nativeEvent.layout;
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
alertEdgeToEdgeInsetTransitionConfig,
|
|
29
29
|
hexToRgba,
|
|
30
30
|
iconBtnSizeSmall,
|
|
31
|
-
|
|
31
|
+
useIONewTypeface,
|
|
32
32
|
useIOTheme,
|
|
33
33
|
useIOThemeContext
|
|
34
34
|
} from "../../core";
|
|
@@ -155,7 +155,8 @@ export const HeaderSecondLevel = ({
|
|
|
155
155
|
);
|
|
156
156
|
const titleRef = React.createRef<View>();
|
|
157
157
|
|
|
158
|
-
const {
|
|
158
|
+
const { newTypefaceEnabled } = useIONewTypeface();
|
|
159
|
+
|
|
159
160
|
const theme = useIOTheme();
|
|
160
161
|
const { themeType } = useIOThemeContext();
|
|
161
162
|
const insets = useSafeAreaInsets();
|
|
@@ -300,7 +301,7 @@ export const HeaderSecondLevel = ({
|
|
|
300
301
|
size={14}
|
|
301
302
|
numberOfLines={1}
|
|
302
303
|
accessible={false}
|
|
303
|
-
font={
|
|
304
|
+
font={newTypefaceEnabled ? "Titillio" : "TitilliumSansPro"}
|
|
304
305
|
weight={"Semibold"}
|
|
305
306
|
style={[
|
|
306
307
|
{ color: titleColor, textAlign: "center" },
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useLayoutEffect } from "react";
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
AccessibilityInfo,
|
|
5
5
|
StyleSheet,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
View,
|
|
7
|
+
findNodeHandle
|
|
8
8
|
} from "react-native";
|
|
9
|
-
import {
|
|
10
|
-
IOColors,
|
|
11
|
-
IOVisualCostants,
|
|
12
|
-
useIOExperimentalDesign,
|
|
13
|
-
IOStyles
|
|
14
|
-
} from "../../core";
|
|
15
|
-
import { H4 } from "../typography";
|
|
9
|
+
import { IOColors, IOStyles, IOVisualCostants } from "../../core";
|
|
16
10
|
import { IconButton } from "../buttons";
|
|
11
|
+
import { H4 } from "../typography";
|
|
17
12
|
|
|
18
13
|
const styles = StyleSheet.create({
|
|
19
14
|
container: {
|
|
@@ -45,7 +40,6 @@ export const ModalBSHeader = ({
|
|
|
45
40
|
onClose,
|
|
46
41
|
closeAccessibilityLabel
|
|
47
42
|
}: Props) => {
|
|
48
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
49
43
|
const headerRef = React.createRef<View>();
|
|
50
44
|
|
|
51
45
|
useLayoutEffect(() => {
|
|
@@ -69,24 +63,12 @@ export const ModalBSHeader = ({
|
|
|
69
63
|
<H4>{title}</H4>
|
|
70
64
|
</View>
|
|
71
65
|
)}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
accessibilityLabel={closeAccessibilityLabel}
|
|
79
|
-
/>
|
|
80
|
-
) : (
|
|
81
|
-
<View style={{ opacity: 0.5 }}>
|
|
82
|
-
<IconButton
|
|
83
|
-
color="neutral"
|
|
84
|
-
onPress={onClose}
|
|
85
|
-
icon="closeMedium"
|
|
86
|
-
accessibilityLabel={closeAccessibilityLabel}
|
|
87
|
-
/>
|
|
88
|
-
</View>
|
|
89
|
-
)}
|
|
66
|
+
<IconButton
|
|
67
|
+
color="neutral"
|
|
68
|
+
onPress={onClose}
|
|
69
|
+
icon="closeMedium"
|
|
70
|
+
accessibilityLabel={closeAccessibilityLabel}
|
|
71
|
+
/>
|
|
90
72
|
</View>
|
|
91
73
|
);
|
|
92
74
|
};
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
IOListItemStyles,
|
|
6
6
|
IOListItemVisualParams,
|
|
7
7
|
IOStyles,
|
|
8
|
-
useIOExperimentalDesign,
|
|
9
8
|
useIOTheme
|
|
10
9
|
} from "../../core";
|
|
11
10
|
import { useListItemAnimation } from "../../hooks";
|
|
@@ -38,7 +37,6 @@ export const ListItemNavAlert = ({
|
|
|
38
37
|
const { onPressIn, onPressOut, scaleAnimatedStyle, backgroundAnimatedStyle } =
|
|
39
38
|
useListItemAnimation();
|
|
40
39
|
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
41
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
42
40
|
|
|
43
41
|
const componentValueToAccessibility = typeof value === "string" ? value : "";
|
|
44
42
|
const componentDescriptionToAccessibility =
|
|
@@ -71,7 +69,7 @@ export const ListItemNavAlert = ({
|
|
|
71
69
|
</>
|
|
72
70
|
);
|
|
73
71
|
|
|
74
|
-
const iconColor =
|
|
72
|
+
const iconColor = theme["interactiveElem-default"];
|
|
75
73
|
|
|
76
74
|
return (
|
|
77
75
|
<Pressable
|
|
@@ -111,7 +109,6 @@ export const ListItemNavAlert = ({
|
|
|
111
109
|
/>
|
|
112
110
|
)}
|
|
113
111
|
<View style={IOStyles.flex}>{listItemNavAlertContent}</View>
|
|
114
|
-
|
|
115
112
|
<Icon
|
|
116
113
|
allowFontScaling
|
|
117
114
|
name="chevronRightListItem"
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
IOListItemVisualParams,
|
|
10
10
|
IOStyles,
|
|
11
11
|
IOVisualCostants,
|
|
12
|
-
useIOExperimentalDesign,
|
|
13
12
|
useIOTheme
|
|
14
13
|
} from "../../core";
|
|
15
14
|
|
|
@@ -114,16 +113,13 @@ export const ListItemTransaction = ({
|
|
|
114
113
|
numberOfLines = 2,
|
|
115
114
|
accessible
|
|
116
115
|
}: ListItemTransaction) => {
|
|
117
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
118
116
|
const theme = useIOTheme();
|
|
119
117
|
|
|
120
118
|
if (isLoading) {
|
|
121
119
|
return <SkeletonComponent />;
|
|
122
120
|
}
|
|
123
121
|
|
|
124
|
-
const interactiveColor: IOColors =
|
|
125
|
-
? theme["interactiveElem-default"]
|
|
126
|
-
: "blue";
|
|
122
|
+
const interactiveColor: IOColors = theme["interactiveElem-default"];
|
|
127
123
|
|
|
128
124
|
const amountColorDefault: IOColors = theme["textBody-default"];
|
|
129
125
|
const amountColorRefund: IOColors = theme.successText;
|