@pagopa/io-app-design-system 4.4.2 → 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/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 -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/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 -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/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 -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
|
@@ -1758,7 +1758,7 @@ exports[`Test List Item Components ListItemAction Snapshot 1`] = `
|
|
|
1758
1758
|
{},
|
|
1759
1759
|
{
|
|
1760
1760
|
"color": "#0B3EE3",
|
|
1761
|
-
"fontFamily": "
|
|
1761
|
+
"fontFamily": "Titillio",
|
|
1762
1762
|
"fontSize": 16,
|
|
1763
1763
|
"fontStyle": "normal",
|
|
1764
1764
|
"fontWeight": "600",
|
|
@@ -1850,7 +1850,7 @@ exports[`Test List Item Components ListItemIDP Snapshot 1`] = `
|
|
|
1850
1850
|
},
|
|
1851
1851
|
{
|
|
1852
1852
|
"color": "#555C70",
|
|
1853
|
-
"fontFamily": "
|
|
1853
|
+
"fontFamily": "Titillio",
|
|
1854
1854
|
"fontSize": 12,
|
|
1855
1855
|
"fontStyle": "normal",
|
|
1856
1856
|
"fontWeight": "600",
|
|
@@ -1919,7 +1919,7 @@ exports[`Test List Item Components ListItemInfo Snapshot 1`] = `
|
|
|
1919
1919
|
{},
|
|
1920
1920
|
{
|
|
1921
1921
|
"color": "#555C70",
|
|
1922
|
-
"fontFamily": "
|
|
1922
|
+
"fontFamily": "Titillio",
|
|
1923
1923
|
"fontSize": 14,
|
|
1924
1924
|
"fontStyle": "normal",
|
|
1925
1925
|
"fontWeight": "400",
|
|
@@ -1940,8 +1940,8 @@ exports[`Test List Item Components ListItemInfo Snapshot 1`] = `
|
|
|
1940
1940
|
{},
|
|
1941
1941
|
{
|
|
1942
1942
|
"color": "#0E0F13",
|
|
1943
|
-
"fontFamily": "
|
|
1944
|
-
"fontSize":
|
|
1943
|
+
"fontFamily": "Titillio",
|
|
1944
|
+
"fontSize": 16,
|
|
1945
1945
|
"fontStyle": "normal",
|
|
1946
1946
|
"fontWeight": "600",
|
|
1947
1947
|
"lineHeight": 24,
|
|
@@ -2045,7 +2045,7 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
|
|
|
2045
2045
|
{},
|
|
2046
2046
|
{
|
|
2047
2047
|
"color": "#555C70",
|
|
2048
|
-
"fontFamily": "
|
|
2048
|
+
"fontFamily": "Titillio",
|
|
2049
2049
|
"fontSize": 14,
|
|
2050
2050
|
"fontStyle": "normal",
|
|
2051
2051
|
"fontWeight": "400",
|
|
@@ -2066,8 +2066,8 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
|
|
|
2066
2066
|
{},
|
|
2067
2067
|
{
|
|
2068
2068
|
"color": "#0B3EE3",
|
|
2069
|
-
"fontFamily": "
|
|
2070
|
-
"fontSize":
|
|
2069
|
+
"fontFamily": "Titillio",
|
|
2070
|
+
"fontSize": 16,
|
|
2071
2071
|
"fontStyle": "normal",
|
|
2072
2072
|
"fontWeight": "600",
|
|
2073
2073
|
"lineHeight": 24,
|
|
@@ -2227,8 +2227,8 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `
|
|
|
2227
2227
|
{},
|
|
2228
2228
|
{
|
|
2229
2229
|
"color": "#0E0F13",
|
|
2230
|
-
"fontFamily": "
|
|
2231
|
-
"fontSize":
|
|
2230
|
+
"fontFamily": "Titillio",
|
|
2231
|
+
"fontSize": 16,
|
|
2232
2232
|
"fontStyle": "normal",
|
|
2233
2233
|
"fontWeight": "600",
|
|
2234
2234
|
"lineHeight": 24,
|
|
@@ -2452,8 +2452,8 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2452
2452
|
{},
|
|
2453
2453
|
{
|
|
2454
2454
|
"color": "#0E0F13",
|
|
2455
|
-
"fontFamily": "
|
|
2456
|
-
"fontSize":
|
|
2455
|
+
"fontFamily": "Titillio",
|
|
2456
|
+
"fontSize": 16,
|
|
2457
2457
|
"fontStyle": "normal",
|
|
2458
2458
|
"fontWeight": "600",
|
|
2459
2459
|
"lineHeight": 24,
|
|
@@ -2484,7 +2484,7 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2484
2484
|
"borderWidth": 0,
|
|
2485
2485
|
},
|
|
2486
2486
|
{
|
|
2487
|
-
"color": "#
|
|
2487
|
+
"color": "#0B3EE3",
|
|
2488
2488
|
},
|
|
2489
2489
|
{
|
|
2490
2490
|
"flex": 0,
|
|
@@ -2493,7 +2493,7 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
|
|
|
2493
2493
|
},
|
|
2494
2494
|
]
|
|
2495
2495
|
}
|
|
2496
|
-
tintColor="#
|
|
2496
|
+
tintColor="#0B3EE3"
|
|
2497
2497
|
vbHeight={24}
|
|
2498
2498
|
vbWidth={24}
|
|
2499
2499
|
width={24}
|
|
@@ -2615,8 +2615,8 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2615
2615
|
{},
|
|
2616
2616
|
{
|
|
2617
2617
|
"color": "#0E0F13",
|
|
2618
|
-
"fontFamily": "
|
|
2619
|
-
"fontSize":
|
|
2618
|
+
"fontFamily": "Titillio",
|
|
2619
|
+
"fontSize": 16,
|
|
2620
2620
|
"fontStyle": "normal",
|
|
2621
2621
|
"fontWeight": "600",
|
|
2622
2622
|
"lineHeight": 24,
|
|
@@ -2702,7 +2702,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2702
2702
|
{},
|
|
2703
2703
|
{
|
|
2704
2704
|
"color": "#5517E3",
|
|
2705
|
-
"fontFamily": "
|
|
2705
|
+
"fontFamily": "Titillio",
|
|
2706
2706
|
"fontSize": 14,
|
|
2707
2707
|
"fontStyle": "normal",
|
|
2708
2708
|
"fontWeight": "400",
|
|
@@ -2736,8 +2736,8 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2736
2736
|
{},
|
|
2737
2737
|
{
|
|
2738
2738
|
"color": "#0B3EE3",
|
|
2739
|
-
"fontFamily": "
|
|
2740
|
-
"fontSize":
|
|
2739
|
+
"fontFamily": "Titillio",
|
|
2740
|
+
"fontSize": 16,
|
|
2741
2741
|
"fontStyle": "normal",
|
|
2742
2742
|
"fontWeight": "600",
|
|
2743
2743
|
"lineHeight": 24,
|
|
@@ -2800,7 +2800,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2800
2800
|
"width": 24,
|
|
2801
2801
|
},
|
|
2802
2802
|
{
|
|
2803
|
-
"borderColor": "#
|
|
2803
|
+
"borderColor": "#636B82",
|
|
2804
2804
|
},
|
|
2805
2805
|
]
|
|
2806
2806
|
}
|
|
@@ -2819,7 +2819,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
|
|
|
2819
2819
|
"width": 24,
|
|
2820
2820
|
},
|
|
2821
2821
|
{
|
|
2822
|
-
"backgroundColor": "#
|
|
2822
|
+
"backgroundColor": "#0B3EE3",
|
|
2823
2823
|
},
|
|
2824
2824
|
{
|
|
2825
2825
|
"opacity": 1,
|
|
@@ -2988,8 +2988,8 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
2988
2988
|
{},
|
|
2989
2989
|
{
|
|
2990
2990
|
"color": "#0E0F13",
|
|
2991
|
-
"fontFamily": "
|
|
2992
|
-
"fontSize":
|
|
2991
|
+
"fontFamily": "Titillio",
|
|
2992
|
+
"fontSize": 16,
|
|
2993
2993
|
"fontStyle": "normal",
|
|
2994
2994
|
"fontWeight": "600",
|
|
2995
2995
|
"lineHeight": 24,
|
|
@@ -3021,8 +3021,8 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3021
3021
|
{},
|
|
3022
3022
|
{
|
|
3023
3023
|
"color": "#0B3EE3",
|
|
3024
|
-
"fontFamily": "
|
|
3025
|
-
"fontSize":
|
|
3024
|
+
"fontFamily": "Titillio",
|
|
3025
|
+
"fontSize": 16,
|
|
3026
3026
|
"fontStyle": "normal",
|
|
3027
3027
|
"fontWeight": "600",
|
|
3028
3028
|
"lineHeight": 24,
|
|
@@ -3085,7 +3085,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3085
3085
|
"width": 24,
|
|
3086
3086
|
},
|
|
3087
3087
|
{
|
|
3088
|
-
"borderColor": "#
|
|
3088
|
+
"borderColor": "#636B82",
|
|
3089
3089
|
},
|
|
3090
3090
|
]
|
|
3091
3091
|
}
|
|
@@ -3104,7 +3104,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
|
|
|
3104
3104
|
"width": 24,
|
|
3105
3105
|
},
|
|
3106
3106
|
{
|
|
3107
|
-
"backgroundColor": "#
|
|
3107
|
+
"backgroundColor": "#0B3EE3",
|
|
3108
3108
|
},
|
|
3109
3109
|
{
|
|
3110
3110
|
"opacity": 0,
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Image, ImageSourcePropType, StyleSheet } from "react-native";
|
|
3
|
+
import { IOListItemLogoMargin, useIONewTypeface, useIOTheme } from "../../core";
|
|
3
4
|
import { addCacheTimestampToUri } from "../../utils/image";
|
|
4
|
-
import {
|
|
5
|
-
IOListItemLogoMargin,
|
|
6
|
-
useIOExperimentalDesign,
|
|
7
|
-
useIOTheme
|
|
8
|
-
} from "../../core";
|
|
9
5
|
import { IOText } from "../typography";
|
|
10
6
|
import {
|
|
11
7
|
PressableModuleBase,
|
|
@@ -38,8 +34,7 @@ export const ModuleIDP = ({
|
|
|
38
34
|
accessibilityLabel
|
|
39
35
|
}: ModuleIDP) => {
|
|
40
36
|
const theme = useIOTheme();
|
|
41
|
-
const {
|
|
42
|
-
|
|
37
|
+
const { newTypefaceEnabled } = useIONewTypeface();
|
|
43
38
|
// eslint-disable-next-line no-console
|
|
44
39
|
const urlLogoIDP = localLogo ? localLogo : addCacheTimestampToUri(logo);
|
|
45
40
|
|
|
@@ -50,7 +45,7 @@ export const ModuleIDP = ({
|
|
|
50
45
|
withLooseSpacing={withLooseSpacing}
|
|
51
46
|
>
|
|
52
47
|
<IOText
|
|
53
|
-
font={
|
|
48
|
+
font={newTypefaceEnabled ? "Titillio" : "TitilliumSansPro"}
|
|
54
49
|
weight={"Semibold"}
|
|
55
50
|
size={12}
|
|
56
51
|
lineHeight={16}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import React, { memo, useCallback
|
|
1
|
+
import React, { memo, useCallback } from "react";
|
|
2
2
|
import { Pressable } from "react-native";
|
|
3
3
|
import Animated, {
|
|
4
4
|
interpolateColor,
|
|
5
5
|
useAnimatedStyle,
|
|
6
6
|
useReducedMotion
|
|
7
7
|
} from "react-native-reanimated";
|
|
8
|
-
import {
|
|
9
|
-
IOColors,
|
|
10
|
-
IONumberPadButtonStyles,
|
|
11
|
-
hexToRgba,
|
|
12
|
-
useIOExperimentalDesign
|
|
13
|
-
} from "../../core";
|
|
8
|
+
import { IOColors, IONumberPadButtonStyles } from "../../core";
|
|
14
9
|
import { useScaleAnimation } from "../../hooks";
|
|
15
10
|
import { H3 } from "../typography";
|
|
16
11
|
|
|
@@ -52,18 +47,6 @@ const colorMap: Record<NumberButtonVariantType, ColorMapVariant> = {
|
|
|
52
47
|
}
|
|
53
48
|
};
|
|
54
49
|
|
|
55
|
-
const legacyColorMap: Record<NumberButtonVariantType, ColorMapVariant> = {
|
|
56
|
-
light: {
|
|
57
|
-
background: IOColors["grey-100"],
|
|
58
|
-
pressed: IOColors["grey-200"],
|
|
59
|
-
foreground: "blue"
|
|
60
|
-
},
|
|
61
|
-
dark: {
|
|
62
|
-
background: hexToRgba(IOColors.black, 0.1),
|
|
63
|
-
pressed: hexToRgba(IOColors.white, 0.5),
|
|
64
|
-
foreground: "white"
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
50
|
/**
|
|
68
51
|
* Based on a `Pressable` element, it displays a number button with animations on press In and Out.
|
|
69
52
|
*
|
|
@@ -74,19 +57,13 @@ export const NumberButton = memo(
|
|
|
74
57
|
const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
75
58
|
useScaleAnimation("slight");
|
|
76
59
|
const reducedMotion = useReducedMotion();
|
|
77
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
78
|
-
|
|
79
|
-
const colors = useMemo(
|
|
80
|
-
() => (isExperimental ? colorMap[variant] : legacyColorMap[variant]),
|
|
81
|
-
[variant, isExperimental]
|
|
82
|
-
);
|
|
83
60
|
|
|
84
61
|
// Interpolate animation values from `isPressed` values
|
|
85
62
|
const pressedAnimationStyle = useAnimatedStyle(() => ({
|
|
86
63
|
backgroundColor: interpolateColor(
|
|
87
64
|
progress.value,
|
|
88
65
|
[0, 1],
|
|
89
|
-
[
|
|
66
|
+
[colorMap[variant].background, colorMap[variant].pressed]
|
|
90
67
|
)
|
|
91
68
|
}));
|
|
92
69
|
|
|
@@ -111,7 +88,7 @@ export const NumberButton = memo(
|
|
|
111
88
|
!reducedMotion && scaleAnimatedStyle
|
|
112
89
|
]}
|
|
113
90
|
>
|
|
114
|
-
<H3 color={
|
|
91
|
+
<H3 color={colorMap[variant].foreground}>{number}</H3>
|
|
115
92
|
</Animated.View>
|
|
116
93
|
</Pressable>
|
|
117
94
|
);
|
|
@@ -100,7 +100,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
100
100
|
{},
|
|
101
101
|
{
|
|
102
102
|
"color": "#FFFFFF",
|
|
103
|
-
"fontFamily": "
|
|
103
|
+
"fontFamily": "Titillio",
|
|
104
104
|
"fontSize": 22,
|
|
105
105
|
"fontStyle": "normal",
|
|
106
106
|
"fontWeight": "600",
|
|
@@ -181,7 +181,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
181
181
|
{},
|
|
182
182
|
{
|
|
183
183
|
"color": "#FFFFFF",
|
|
184
|
-
"fontFamily": "
|
|
184
|
+
"fontFamily": "Titillio",
|
|
185
185
|
"fontSize": 22,
|
|
186
186
|
"fontStyle": "normal",
|
|
187
187
|
"fontWeight": "600",
|
|
@@ -262,7 +262,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
262
262
|
{},
|
|
263
263
|
{
|
|
264
264
|
"color": "#FFFFFF",
|
|
265
|
-
"fontFamily": "
|
|
265
|
+
"fontFamily": "Titillio",
|
|
266
266
|
"fontSize": 22,
|
|
267
267
|
"fontStyle": "normal",
|
|
268
268
|
"fontWeight": "600",
|
|
@@ -359,7 +359,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
359
359
|
{},
|
|
360
360
|
{
|
|
361
361
|
"color": "#FFFFFF",
|
|
362
|
-
"fontFamily": "
|
|
362
|
+
"fontFamily": "Titillio",
|
|
363
363
|
"fontSize": 22,
|
|
364
364
|
"fontStyle": "normal",
|
|
365
365
|
"fontWeight": "600",
|
|
@@ -440,7 +440,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
440
440
|
{},
|
|
441
441
|
{
|
|
442
442
|
"color": "#FFFFFF",
|
|
443
|
-
"fontFamily": "
|
|
443
|
+
"fontFamily": "Titillio",
|
|
444
444
|
"fontSize": 22,
|
|
445
445
|
"fontStyle": "normal",
|
|
446
446
|
"fontWeight": "600",
|
|
@@ -521,7 +521,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
521
521
|
{},
|
|
522
522
|
{
|
|
523
523
|
"color": "#FFFFFF",
|
|
524
|
-
"fontFamily": "
|
|
524
|
+
"fontFamily": "Titillio",
|
|
525
525
|
"fontSize": 22,
|
|
526
526
|
"fontStyle": "normal",
|
|
527
527
|
"fontWeight": "600",
|
|
@@ -618,7 +618,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
618
618
|
{},
|
|
619
619
|
{
|
|
620
620
|
"color": "#FFFFFF",
|
|
621
|
-
"fontFamily": "
|
|
621
|
+
"fontFamily": "Titillio",
|
|
622
622
|
"fontSize": 22,
|
|
623
623
|
"fontStyle": "normal",
|
|
624
624
|
"fontWeight": "600",
|
|
@@ -699,7 +699,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
699
699
|
{},
|
|
700
700
|
{
|
|
701
701
|
"color": "#FFFFFF",
|
|
702
|
-
"fontFamily": "
|
|
702
|
+
"fontFamily": "Titillio",
|
|
703
703
|
"fontSize": 22,
|
|
704
704
|
"fontStyle": "normal",
|
|
705
705
|
"fontWeight": "600",
|
|
@@ -780,7 +780,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
780
780
|
{},
|
|
781
781
|
{
|
|
782
782
|
"color": "#FFFFFF",
|
|
783
|
-
"fontFamily": "
|
|
783
|
+
"fontFamily": "Titillio",
|
|
784
784
|
"fontSize": 22,
|
|
785
785
|
"fontStyle": "normal",
|
|
786
786
|
"fontWeight": "600",
|
|
@@ -1018,7 +1018,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
|
|
|
1018
1018
|
{},
|
|
1019
1019
|
{
|
|
1020
1020
|
"color": "#FFFFFF",
|
|
1021
|
-
"fontFamily": "
|
|
1021
|
+
"fontFamily": "Titillio",
|
|
1022
1022
|
"fontSize": 22,
|
|
1023
1023
|
"fontStyle": "normal",
|
|
1024
1024
|
"fontWeight": "600",
|
|
@@ -14,13 +14,9 @@ import Animated, {
|
|
|
14
14
|
withSpring,
|
|
15
15
|
withTiming
|
|
16
16
|
} from "react-native-reanimated";
|
|
17
|
-
import { useIOExperimentalDesign } from "../../core";
|
|
18
17
|
import { IOSpringValues } from "../../core/IOAnimations";
|
|
19
18
|
import { IOColors } from "../../core/IOColors";
|
|
20
|
-
import {
|
|
21
|
-
IOSelectionTickLegacyVisualParams,
|
|
22
|
-
IOSelectionTickVisualParams
|
|
23
|
-
} from "../../core/IOStyles";
|
|
19
|
+
import { IOSelectionTickVisualParams } from "../../core/IOStyles";
|
|
24
20
|
import { AnimatedTick } from "../common/AnimatedTick";
|
|
25
21
|
|
|
26
22
|
type Props = {
|
|
@@ -56,24 +52,8 @@ export const AnimatedRadio = ({
|
|
|
56
52
|
}: OwnProps) => {
|
|
57
53
|
const isChecked = checked ?? false;
|
|
58
54
|
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
IOColors[IOSelectionTickVisualParams.borderColorOffState];
|
|
62
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
63
|
-
const legacyBorderColorOffState =
|
|
64
|
-
IOColors[IOSelectionTickLegacyVisualParams.borderColorOffState];
|
|
65
|
-
const borderColorProp = isExperimental
|
|
66
|
-
? borderColorOffState
|
|
67
|
-
: legacyBorderColorOffState;
|
|
68
|
-
|
|
69
|
-
const backgroundColorOnState =
|
|
70
|
-
IOColors[IOSelectionTickVisualParams.bgColorOnState];
|
|
71
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
72
|
-
const legacyBackgroundColorOnState =
|
|
73
|
-
IOColors[IOSelectionTickLegacyVisualParams.bgColorOnState];
|
|
74
|
-
const backgroundColorProp = isExperimental
|
|
75
|
-
? backgroundColorOnState
|
|
76
|
-
: legacyBackgroundColorOnState;
|
|
55
|
+
const borderColor = IOColors[IOSelectionTickVisualParams.borderColorOffState];
|
|
56
|
+
const backgroundColor = IOColors[IOSelectionTickVisualParams.bgColorOnState];
|
|
77
57
|
|
|
78
58
|
const circleAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
79
59
|
const tickAnimationProgress = useSharedValue(checked ? 1 : 0);
|
|
@@ -121,21 +101,13 @@ export const AnimatedRadio = ({
|
|
|
121
101
|
style={radioButtonWrapperSizeStyle}
|
|
122
102
|
>
|
|
123
103
|
<View
|
|
124
|
-
style={[
|
|
125
|
-
styles.radioBorder,
|
|
126
|
-
radioButtonSizeStyle,
|
|
127
|
-
{
|
|
128
|
-
borderColor: borderColorProp
|
|
129
|
-
}
|
|
130
|
-
]}
|
|
104
|
+
style={[styles.radioBorder, radioButtonSizeStyle, { borderColor }]}
|
|
131
105
|
/>
|
|
132
106
|
<Animated.View
|
|
133
107
|
style={[
|
|
134
108
|
styles.radioCircle,
|
|
135
109
|
radioButtonSizeStyle,
|
|
136
|
-
{
|
|
137
|
-
backgroundColor: backgroundColorProp
|
|
138
|
-
},
|
|
110
|
+
{ backgroundColor },
|
|
139
111
|
animatedCheckboxSquare
|
|
140
112
|
]}
|
|
141
113
|
/>
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
IOColors,
|
|
34
34
|
IOSpacingScale,
|
|
35
35
|
IOVisualCostants,
|
|
36
|
-
|
|
36
|
+
useIONewTypeface,
|
|
37
37
|
useIOTheme
|
|
38
38
|
} from "../../core";
|
|
39
39
|
import { IOFontSize, makeFontStyleObject } from "../../utils/fonts";
|
|
@@ -116,10 +116,10 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
116
116
|
ref
|
|
117
117
|
) => {
|
|
118
118
|
const searchInputRef = useRef<TextInput>(null);
|
|
119
|
+
const { newTypefaceEnabled } = useIONewTypeface();
|
|
119
120
|
|
|
120
121
|
/* Component visual attributes */
|
|
121
122
|
const theme = useIOTheme();
|
|
122
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
123
123
|
const inputCaretColor = IOColors[theme["interactiveElem-default"]];
|
|
124
124
|
|
|
125
125
|
/* Widths used for the transition:
|
|
@@ -250,11 +250,18 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
250
250
|
accessibilityRole={"search"}
|
|
251
251
|
accessibilityLabel={accessibilityLabel}
|
|
252
252
|
style={[
|
|
253
|
+
{
|
|
254
|
+
...makeFontStyleObject(
|
|
255
|
+
inputFontSizePlaceholder,
|
|
256
|
+
newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
257
|
+
undefined,
|
|
258
|
+
"Regular"
|
|
259
|
+
)
|
|
260
|
+
},
|
|
253
261
|
styles.textInput,
|
|
254
262
|
Platform.OS === "ios"
|
|
255
263
|
? styles.textInputIOS
|
|
256
|
-
: styles.textInputAndroid
|
|
257
|
-
isExperimental ? styles.placeholder : styles.placeholderLegacy
|
|
264
|
+
: styles.textInputAndroid
|
|
258
265
|
]}
|
|
259
266
|
selectionColor={inputCaretColor}
|
|
260
267
|
cursorColor={inputCaretColor}
|
|
@@ -328,22 +335,6 @@ const styles = StyleSheet.create({
|
|
|
328
335
|
iconContainer: {
|
|
329
336
|
marginRight: iconMargin
|
|
330
337
|
},
|
|
331
|
-
placeholder: {
|
|
332
|
-
...makeFontStyleObject(
|
|
333
|
-
inputFontSizePlaceholder,
|
|
334
|
-
"Titillio",
|
|
335
|
-
undefined,
|
|
336
|
-
"Medium"
|
|
337
|
-
)
|
|
338
|
-
},
|
|
339
|
-
placeholderLegacy: {
|
|
340
|
-
...makeFontStyleObject(
|
|
341
|
-
inputFontSizePlaceholder,
|
|
342
|
-
"TitilliumSansPro",
|
|
343
|
-
undefined,
|
|
344
|
-
"Semibold"
|
|
345
|
-
)
|
|
346
|
-
},
|
|
347
338
|
cancelButton: {
|
|
348
339
|
position: "absolute",
|
|
349
340
|
right: 0,
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Dimensions, LayoutChangeEvent, View } from "react-native";
|
|
3
|
-
|
|
4
|
-
import { useMemo } from "react";
|
|
5
|
-
import {
|
|
6
|
-
IOColors,
|
|
7
|
-
IOSpacer,
|
|
8
|
-
IOStyles,
|
|
9
|
-
IOVisualCostants,
|
|
10
|
-
useIOExperimentalDesign
|
|
11
|
-
} from "../../core";
|
|
3
|
+
import { IOColors, IOSpacer, IOStyles, IOVisualCostants } from "../../core";
|
|
12
4
|
|
|
13
5
|
type StepperProps = {
|
|
14
6
|
steps: number;
|
|
@@ -20,17 +12,7 @@ const colorMap: Record<string, IOColors> = {
|
|
|
20
12
|
active: "blueIO-500"
|
|
21
13
|
};
|
|
22
14
|
|
|
23
|
-
const legacyColorMap: Record<string, IOColors> = {
|
|
24
|
-
active: "blue"
|
|
25
|
-
};
|
|
26
|
-
|
|
27
15
|
export const Stepper = ({ steps, currentStep }: StepperProps) => {
|
|
28
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
29
|
-
const colors = useMemo(
|
|
30
|
-
() => (isExperimental ? colorMap : legacyColorMap),
|
|
31
|
-
[isExperimental]
|
|
32
|
-
);
|
|
33
|
-
|
|
34
16
|
const [stepWidth, setStepWidth] = React.useState(
|
|
35
17
|
Dimensions.get("window").width / steps
|
|
36
18
|
);
|
|
@@ -50,7 +32,7 @@ export const Stepper = ({ steps, currentStep }: StepperProps) => {
|
|
|
50
32
|
style={{
|
|
51
33
|
borderRadius: 2,
|
|
52
34
|
borderBottomColor:
|
|
53
|
-
IOColors[i > currentStep - 1 ? "grey-200" :
|
|
35
|
+
IOColors[i > currentStep - 1 ? "grey-200" : colorMap.active],
|
|
54
36
|
borderBottomWidth: 2,
|
|
55
37
|
width: stepWidth - STEPPER_SPACE
|
|
56
38
|
}}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { useIOExperimentalDesign } from "../../core";
|
|
2
|
+
import { Switch, SwitchProps } from "react-native";
|
|
4
3
|
import { IOColors } from "../../core/IOColors";
|
|
5
4
|
import { IOSwitchVisualParams } from "../../core/IOStyles";
|
|
6
5
|
|
|
@@ -16,41 +15,24 @@ type OwnProps = Pick<
|
|
|
16
15
|
| "importantForAccessibility"
|
|
17
16
|
>;
|
|
18
17
|
|
|
19
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
20
|
-
const bgLegacyTrackColorAndroid =
|
|
21
|
-
Platform.OS === "android" ? IOColors["grey-300"] : IOColors.greyUltraLight;
|
|
22
|
-
|
|
23
18
|
export const NativeSwitch = ({
|
|
24
19
|
onValueChange,
|
|
25
20
|
value,
|
|
26
21
|
...accessibility
|
|
27
22
|
}: OwnProps) => {
|
|
28
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
29
23
|
const trackColor = {
|
|
30
24
|
false: IOColors[IOSwitchVisualParams.bgColorOffState],
|
|
31
25
|
true: IOColors[IOSwitchVisualParams.bgColorOnState]
|
|
32
26
|
};
|
|
33
27
|
|
|
34
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
35
|
-
const legacyTrackColor = {
|
|
36
|
-
false: bgLegacyTrackColorAndroid,
|
|
37
|
-
true: IOColors.blue
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const trackColorComponent = isExperimental ? trackColor : legacyTrackColor;
|
|
41
|
-
|
|
42
28
|
return (
|
|
43
29
|
<Switch
|
|
44
30
|
{...accessibility}
|
|
45
31
|
accessibilityRole="switch"
|
|
46
32
|
accessibilityState={{ checked: value, disabled: accessibility.disabled }}
|
|
47
|
-
trackColor={
|
|
33
|
+
trackColor={trackColor}
|
|
48
34
|
thumbColor={IOColors[IOSwitchVisualParams.bgCircle]}
|
|
49
|
-
ios_backgroundColor={
|
|
50
|
-
isExperimental
|
|
51
|
-
? IOColors[IOSwitchVisualParams.bgColorOffState]
|
|
52
|
-
: bgLegacyTrackColorAndroid
|
|
53
|
-
}
|
|
35
|
+
ios_backgroundColor={IOColors[IOSwitchVisualParams.bgColorOffState]}
|
|
54
36
|
onValueChange={onValueChange}
|
|
55
37
|
value={value}
|
|
56
38
|
/>
|