@pagopa/io-app-design-system 4.4.1 → 5.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/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/ListItemNav.js +18 -9
- package/lib/commonjs/components/listitems/ListItemNav.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 +2 -4
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +31 -35
- 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 -7
- 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/ListItemNav.js +19 -10
- package/lib/module/components/listitems/ListItemNav.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 +3 -5
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +31 -35
- 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 -8
- 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/ListItemNav.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/ListItemNav.tsx +44 -31
- package/src/components/listitems/ListItemNavAlert.tsx +1 -4
- package/src/components/listitems/ListItemTransaction.tsx +2 -6
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +31 -35
- 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 -8
- 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>
|
|
@@ -159,13 +159,13 @@ exports[`Test Buttons Components - Experimental Enabled ButtonOutline Snapshot 1
|
|
|
159
159
|
"paddingHorizontal": 24,
|
|
160
160
|
"textAlignVertical": "center",
|
|
161
161
|
},
|
|
162
|
-
false,
|
|
163
162
|
{
|
|
164
|
-
"
|
|
163
|
+
"height": 48,
|
|
165
164
|
},
|
|
166
165
|
{
|
|
167
|
-
"
|
|
166
|
+
"borderWidth": 2,
|
|
168
167
|
},
|
|
168
|
+
false,
|
|
169
169
|
{
|
|
170
170
|
"columnGap": 8,
|
|
171
171
|
},
|
|
@@ -277,12 +277,12 @@ exports[`Test Buttons Components - Experimental Enabled ButtonSolid Snapshot 1`]
|
|
|
277
277
|
"textAlignVertical": "center",
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
|
-
"
|
|
280
|
+
"height": 48,
|
|
281
281
|
},
|
|
282
|
-
false,
|
|
283
282
|
{
|
|
284
|
-
"
|
|
283
|
+
"overflow": "hidden",
|
|
285
284
|
},
|
|
285
|
+
false,
|
|
286
286
|
{
|
|
287
287
|
"backgroundColor": "#0B3EE3",
|
|
288
288
|
},
|
|
@@ -829,7 +829,7 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
829
829
|
{},
|
|
830
830
|
{
|
|
831
831
|
"color": "#0E0F13",
|
|
832
|
-
"fontFamily": "
|
|
832
|
+
"fontFamily": "Titillio",
|
|
833
833
|
"fontSize": 16,
|
|
834
834
|
"fontStyle": "normal",
|
|
835
835
|
"fontWeight": "600",
|
|
@@ -891,27 +891,28 @@ exports[`Test Buttons Components ButtonOutline Snapshot 1`] = `
|
|
|
891
891
|
[
|
|
892
892
|
{
|
|
893
893
|
"alignItems": "center",
|
|
894
|
-
"
|
|
894
|
+
"borderCurve": "continuous",
|
|
895
|
+
"borderRadius": 8,
|
|
895
896
|
"elevation": 0,
|
|
896
897
|
"flexDirection": "row",
|
|
897
898
|
"justifyContent": "center",
|
|
898
|
-
"paddingHorizontal":
|
|
899
|
+
"paddingHorizontal": 24,
|
|
899
900
|
"textAlignVertical": "center",
|
|
900
901
|
},
|
|
901
|
-
false,
|
|
902
902
|
{
|
|
903
|
-
"
|
|
903
|
+
"height": 48,
|
|
904
904
|
},
|
|
905
905
|
{
|
|
906
|
-
"
|
|
906
|
+
"borderWidth": 2,
|
|
907
907
|
},
|
|
908
|
+
false,
|
|
908
909
|
{
|
|
909
910
|
"columnGap": 8,
|
|
910
911
|
},
|
|
911
912
|
false,
|
|
912
913
|
{
|
|
913
|
-
"backgroundColor": "rgba(
|
|
914
|
-
"borderColor": "#
|
|
914
|
+
"backgroundColor": "rgba(231,236,252,0)",
|
|
915
|
+
"borderColor": "#0B3EE3",
|
|
915
916
|
},
|
|
916
917
|
{
|
|
917
918
|
"transform": [
|
|
@@ -940,7 +941,7 @@ exports[`Test Buttons Components ButtonOutline Snapshot 1`] = `
|
|
|
940
941
|
{},
|
|
941
942
|
{
|
|
942
943
|
"color": "#0E0F13",
|
|
943
|
-
"fontFamily": "
|
|
944
|
+
"fontFamily": "Titillio",
|
|
944
945
|
"fontSize": 16,
|
|
945
946
|
"fontStyle": "normal",
|
|
946
947
|
"fontWeight": "600",
|
|
@@ -1007,22 +1008,23 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1007
1008
|
[
|
|
1008
1009
|
{
|
|
1009
1010
|
"alignItems": "center",
|
|
1010
|
-
"
|
|
1011
|
+
"borderCurve": "continuous",
|
|
1012
|
+
"borderRadius": 8,
|
|
1011
1013
|
"elevation": 0,
|
|
1012
1014
|
"flexDirection": "row",
|
|
1013
1015
|
"justifyContent": "center",
|
|
1014
|
-
"paddingHorizontal":
|
|
1016
|
+
"paddingHorizontal": 24,
|
|
1015
1017
|
"textAlignVertical": "center",
|
|
1016
1018
|
},
|
|
1017
1019
|
{
|
|
1018
|
-
"
|
|
1020
|
+
"height": 48,
|
|
1019
1021
|
},
|
|
1020
|
-
false,
|
|
1021
1022
|
{
|
|
1022
|
-
"
|
|
1023
|
+
"overflow": "hidden",
|
|
1023
1024
|
},
|
|
1025
|
+
false,
|
|
1024
1026
|
{
|
|
1025
|
-
"backgroundColor": "#
|
|
1027
|
+
"backgroundColor": "#0B3EE3",
|
|
1026
1028
|
},
|
|
1027
1029
|
{
|
|
1028
1030
|
"transform": [
|
|
@@ -1066,7 +1068,7 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1066
1068
|
{},
|
|
1067
1069
|
{
|
|
1068
1070
|
"color": "#FFFFFF",
|
|
1069
|
-
"fontFamily": "
|
|
1071
|
+
"fontFamily": "Titillio",
|
|
1070
1072
|
"fontSize": 16,
|
|
1071
1073
|
"fontStyle": "normal",
|
|
1072
1074
|
"fontWeight": "600",
|
|
@@ -1168,7 +1170,7 @@ exports[`Test Buttons Components IconButton Snapshot 1`] = `
|
|
|
1168
1170
|
"borderWidth": 0,
|
|
1169
1171
|
},
|
|
1170
1172
|
{
|
|
1171
|
-
"color": "#
|
|
1173
|
+
"color": "#0B3EE3",
|
|
1172
1174
|
},
|
|
1173
1175
|
{
|
|
1174
1176
|
"flex": 0,
|
|
@@ -1177,7 +1179,7 @@ exports[`Test Buttons Components IconButton Snapshot 1`] = `
|
|
|
1177
1179
|
},
|
|
1178
1180
|
]
|
|
1179
1181
|
}
|
|
1180
|
-
tintColor="#
|
|
1182
|
+
tintColor="#0B3EE3"
|
|
1181
1183
|
vbHeight={24}
|
|
1182
1184
|
vbWidth={24}
|
|
1183
1185
|
width={24}
|
|
@@ -1302,7 +1304,7 @@ exports[`Test Buttons Components IconButtonContained Snapshot 1`] = `
|
|
|
1302
1304
|
"borderWidth": 0,
|
|
1303
1305
|
},
|
|
1304
1306
|
{
|
|
1305
|
-
"color": "#
|
|
1307
|
+
"color": "#0B3EE3",
|
|
1306
1308
|
},
|
|
1307
1309
|
{
|
|
1308
1310
|
"flex": 0,
|
|
@@ -1311,7 +1313,7 @@ exports[`Test Buttons Components IconButtonContained Snapshot 1`] = `
|
|
|
1311
1313
|
},
|
|
1312
1314
|
]
|
|
1313
1315
|
}
|
|
1314
|
-
tintColor="#
|
|
1316
|
+
tintColor="#0B3EE3"
|
|
1315
1317
|
vbHeight={24}
|
|
1316
1318
|
vbWidth={24}
|
|
1317
1319
|
width={24}
|
|
@@ -1409,7 +1411,7 @@ exports[`Test Buttons Components IconButtonSolid Snapshot 1`] = `
|
|
|
1409
1411
|
"backgroundColor": undefined,
|
|
1410
1412
|
},
|
|
1411
1413
|
{
|
|
1412
|
-
"backgroundColor": "#
|
|
1414
|
+
"backgroundColor": "#0B3EE3",
|
|
1413
1415
|
},
|
|
1414
1416
|
]
|
|
1415
1417
|
}
|
|
@@ -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
|
};
|