@pagopa/io-app-design-system 1.7.1 → 1.8.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/alert/Alert.js +9 -1
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/badge/Badge.js +11 -2
- package/lib/commonjs/components/badge/Badge.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +5 -3
- package/lib/commonjs/components/banner/Banner.js +0 -1
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +5 -5
- package/lib/commonjs/components/buttons/ButtonExtendedOutline.js +1 -1
- package/lib/commonjs/components/buttons/ButtonExtendedOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js +3 -2
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +8 -48
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +5 -7
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonSolid.js +54 -29
- package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +23 -21
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +14 -2
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/commonjs/components/checkbox/AnimatedMessageCheckbox.js +11 -3
- package/lib/commonjs/components/checkbox/AnimatedMessageCheckbox.js.map +1 -1
- package/lib/commonjs/components/checkbox/CheckboxLabel.js +31 -8
- package/lib/commonjs/components/checkbox/CheckboxLabel.js.map +1 -1
- package/lib/commonjs/components/icons/Icon.js +27 -15
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/IconContained.js +59 -0
- package/lib/commonjs/components/icons/IconContained.js.map +1 -0
- package/lib/commonjs/components/icons/index.js +11 -0
- package/lib/commonjs/components/icons/index.js.map +1 -1
- package/lib/commonjs/components/icons/svg/IconChange.js +31 -0
- package/lib/commonjs/components/icons/svg/IconChange.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconDialpad.js +29 -0
- package/lib/commonjs/components/icons/svg/IconDialpad.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconKey.js +31 -0
- package/lib/commonjs/components/icons/svg/IconKey.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconNotification.js +31 -0
- package/lib/commonjs/components/icons/svg/IconNotification.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconOption.js +31 -0
- package/lib/commonjs/components/icons/svg/IconOption.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconTransactions.js +1 -1
- package/lib/commonjs/components/icons/svg/IconTransactions.js.map +1 -1
- package/lib/commonjs/components/icons/svg/IconTransactionsBoxed.js +31 -0
- package/lib/commonjs/components/icons/svg/IconTransactionsBoxed.js.map +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconChange.svg +3 -0
- package/lib/commonjs/components/icons/svg/originals/IconDialpad.svg +5 -0
- package/lib/commonjs/components/icons/svg/originals/IconKey.svg +7 -0
- package/lib/commonjs/components/icons/svg/originals/IconNotification.svg +7 -0
- package/lib/commonjs/components/icons/svg/originals/IconOption.svg +7 -0
- package/lib/commonjs/components/icons/svg/originals/IconTransactions.svg +8 -0
- package/lib/commonjs/components/icons/svg/originals/IconTransactionsBoxed.svg +8 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAction.js +38 -8
- package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js +31 -7
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +40 -10
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +30 -7
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +32 -7
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +75 -108
- package/lib/commonjs/components/listitems/__test__/listitem.test.js +2 -2
- package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/commonjs/components/listitems/index.js +4 -4
- package/lib/commonjs/components/listitems/index.js.map +1 -1
- package/lib/commonjs/components/{listitems/ListItemIDP.js → modules/ModuleIDP.js} +19 -12
- package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -0
- package/lib/commonjs/components/modules/index.js +17 -0
- package/lib/commonjs/components/modules/index.js.map +1 -0
- package/lib/commonjs/components/pictograms/Pictogram.js +13 -1
- package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
- package/lib/commonjs/components/pictograms/svg/PictogramBleedCie.js +47 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedCie.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedFeature.js +50 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedFeature.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedSecurity.js +44 -0
- package/lib/commonjs/components/pictograms/svg/PictogramBleedSecurity.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramCie.js +47 -0
- package/lib/commonjs/components/pictograms/svg/PictogramCie.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramFeature.js +50 -0
- package/lib/commonjs/components/pictograms/svg/PictogramFeature.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramSecurity.js +47 -0
- package/lib/commonjs/components/pictograms/svg/PictogramSecurity.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedCie.svg +30 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedFeature.svg +34 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedSecurity.svg +26 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramCie.svg +30 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramFeature.svg +34 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramSecurity.svg +30 -0
- package/lib/commonjs/components/radio/AnimatedRadio.js +14 -2
- package/lib/commonjs/components/radio/AnimatedRadio.js.map +1 -1
- package/lib/commonjs/components/switch/NativeSwitch.js +19 -5
- package/lib/commonjs/components/switch/NativeSwitch.js.map +1 -1
- package/lib/commonjs/components/switch/SwitchLabel.js +31 -8
- package/lib/commonjs/components/switch/SwitchLabel.js.map +1 -1
- package/lib/commonjs/components/tag/Tag.js +16 -8
- package/lib/commonjs/components/tag/Tag.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +11 -2
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/components/typography/Body.js +1 -4
- package/lib/commonjs/components/typography/Body.js.map +1 -1
- package/lib/commonjs/components/typography/BodyMonospace.js +28 -0
- package/lib/commonjs/components/typography/BodyMonospace.js.map +1 -0
- package/lib/commonjs/components/typography/ButtonText.js +39 -0
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -0
- package/lib/commonjs/components/typography/Caption.js +37 -0
- package/lib/commonjs/components/typography/Caption.js.map +1 -0
- package/lib/commonjs/components/typography/Chip.js +34 -0
- package/lib/commonjs/components/typography/Chip.js.map +1 -0
- package/lib/commonjs/components/typography/H1.js +18 -15
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +18 -15
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +24 -18
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +18 -14
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H5.js +19 -33
- package/lib/commonjs/components/typography/H5.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +15 -13
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +38 -0
- package/lib/commonjs/components/typography/Hero.js.map +1 -0
- package/lib/commonjs/components/typography/Label.js +13 -10
- package/lib/commonjs/components/typography/Label.js.map +1 -1
- package/lib/commonjs/components/typography/LabelHeader.js +19 -16
- package/lib/commonjs/components/typography/LabelHeader.js.map +1 -1
- package/lib/commonjs/components/typography/{Link.js → LabelLink.js} +9 -14
- package/lib/commonjs/components/typography/LabelLink.js.map +1 -0
- package/lib/commonjs/components/typography/LabelSmall.js +18 -22
- package/lib/commonjs/components/typography/LabelSmall.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +195 -379
- package/lib/commonjs/components/typography/__test__/typography.test.js +10 -42
- package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/commonjs/components/typography/common.js +18 -1
- package/lib/commonjs/components/typography/common.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +45 -12
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/core/IOShapes.js +3 -3
- package/lib/commonjs/core/IOShapes.js.map +1 -1
- package/lib/commonjs/core/IOSpacing.js +8 -8
- package/lib/commonjs/core/IOSpacing.js.map +1 -1
- package/lib/commonjs/core/IOStyles.js +2 -8
- package/lib/commonjs/core/IOStyles.js.map +1 -1
- package/lib/commonjs/stories/Link.stories.js +1 -1
- package/lib/commonjs/stories/Link.stories.js.map +1 -1
- package/lib/commonjs/stories/Monospace.stories.js +1 -1
- package/lib/commonjs/stories/Monospace.stories.js.map +1 -1
- package/lib/commonjs/utils/fonts.js +8 -6
- package/lib/commonjs/utils/fonts.js.map +1 -1
- package/lib/module/components/alert/Alert.js +9 -1
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/badge/Badge.js +12 -3
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +5 -3
- package/lib/module/components/banner/Banner.js +0 -1
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +5 -5
- package/lib/module/components/buttons/ButtonExtendedOutline.js +2 -2
- package/lib/module/components/buttons/ButtonExtendedOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonLink.js +3 -2
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +8 -48
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +5 -7
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/IconButtonSolid.js +55 -30
- package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +23 -21
- package/lib/module/components/checkbox/AnimatedCheckbox.js +15 -3
- package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/module/components/checkbox/AnimatedMessageCheckbox.js +13 -5
- package/lib/module/components/checkbox/AnimatedMessageCheckbox.js.map +1 -1
- package/lib/module/components/checkbox/CheckboxLabel.js +32 -9
- package/lib/module/components/checkbox/CheckboxLabel.js.map +1 -1
- package/lib/module/components/icons/Icon.js +27 -15
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/IconContained.js +51 -0
- package/lib/module/components/icons/IconContained.js.map +1 -0
- package/lib/module/components/icons/index.js +1 -0
- package/lib/module/components/icons/index.js.map +1 -1
- package/lib/module/components/icons/svg/IconChange.js +23 -0
- package/lib/module/components/icons/svg/IconChange.js.map +1 -0
- package/lib/module/components/icons/svg/IconDialpad.js +21 -0
- package/lib/module/components/icons/svg/IconDialpad.js.map +1 -0
- package/lib/module/components/icons/svg/IconKey.js +23 -0
- package/lib/module/components/icons/svg/IconKey.js.map +1 -0
- package/lib/module/components/icons/svg/IconNotification.js +23 -0
- package/lib/module/components/icons/svg/IconNotification.js.map +1 -0
- package/lib/module/components/icons/svg/IconOption.js +23 -0
- package/lib/module/components/icons/svg/IconOption.js.map +1 -0
- package/lib/module/components/icons/svg/IconTransactions.js +1 -1
- package/lib/module/components/icons/svg/IconTransactions.js.map +1 -1
- package/lib/module/components/icons/svg/IconTransactionsBoxed.js +23 -0
- package/lib/module/components/icons/svg/IconTransactionsBoxed.js.map +1 -0
- package/lib/module/components/icons/svg/originals/IconChange.svg +3 -0
- package/lib/module/components/icons/svg/originals/IconDialpad.svg +5 -0
- package/lib/module/components/icons/svg/originals/IconKey.svg +7 -0
- package/lib/module/components/icons/svg/originals/IconNotification.svg +7 -0
- package/lib/module/components/icons/svg/originals/IconOption.svg +7 -0
- package/lib/module/components/icons/svg/originals/IconTransactions.svg +8 -0
- package/lib/module/components/icons/svg/originals/IconTransactionsBoxed.svg +8 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/listitems/ListItemAction.js +40 -10
- package/lib/module/components/listitems/ListItemAction.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfo.js +34 -10
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +43 -13
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +34 -10
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +35 -10
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemSwitch.js +2 -2
- package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +75 -108
- package/lib/module/components/listitems/__test__/listitem.test.js +1 -1
- package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/module/components/listitems/index.js +1 -1
- package/lib/module/components/listitems/index.js.map +1 -1
- package/lib/module/components/{listitems/ListItemIDP.js → modules/ModuleIDP.js} +18 -11
- package/lib/module/components/modules/ModuleIDP.js.map +1 -0
- package/lib/module/components/modules/index.js +2 -0
- package/lib/module/components/modules/index.js.map +1 -0
- package/lib/module/components/pictograms/Pictogram.js +13 -1
- package/lib/module/components/pictograms/Pictogram.js.map +1 -1
- package/lib/module/components/pictograms/svg/PictogramBleedCie.js +39 -0
- package/lib/module/components/pictograms/svg/PictogramBleedCie.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramBleedFeature.js +42 -0
- package/lib/module/components/pictograms/svg/PictogramBleedFeature.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramBleedSecurity.js +36 -0
- package/lib/module/components/pictograms/svg/PictogramBleedSecurity.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramCie.js +39 -0
- package/lib/module/components/pictograms/svg/PictogramCie.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramFeature.js +42 -0
- package/lib/module/components/pictograms/svg/PictogramFeature.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramSecurity.js +39 -0
- package/lib/module/components/pictograms/svg/PictogramSecurity.js.map +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedCie.svg +30 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedFeature.svg +34 -0
- package/lib/module/components/pictograms/svg/originals/PictogramBleedSecurity.svg +26 -0
- package/lib/module/components/pictograms/svg/originals/PictogramCie.svg +30 -0
- package/lib/module/components/pictograms/svg/originals/PictogramFeature.svg +34 -0
- package/lib/module/components/pictograms/svg/originals/PictogramSecurity.svg +30 -0
- package/lib/module/components/radio/AnimatedRadio.js +15 -3
- package/lib/module/components/radio/AnimatedRadio.js.map +1 -1
- package/lib/module/components/switch/NativeSwitch.js +20 -6
- package/lib/module/components/switch/NativeSwitch.js.map +1 -1
- package/lib/module/components/switch/SwitchLabel.js +32 -9
- package/lib/module/components/switch/SwitchLabel.js.map +1 -1
- package/lib/module/components/tag/Tag.js +12 -4
- package/lib/module/components/tag/Tag.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +12 -3
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/components/typography/Body.js +1 -4
- package/lib/module/components/typography/Body.js.map +1 -1
- package/lib/module/components/typography/BodyMonospace.js +21 -0
- package/lib/module/components/typography/BodyMonospace.js.map +1 -0
- package/lib/module/components/typography/ButtonText.js +31 -0
- package/lib/module/components/typography/ButtonText.js.map +1 -0
- package/lib/module/components/typography/Caption.js +29 -0
- package/lib/module/components/typography/Caption.js.map +1 -0
- package/lib/module/components/typography/Chip.js +27 -0
- package/lib/module/components/typography/Chip.js.map +1 -0
- package/lib/module/components/typography/H1.js +17 -12
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +17 -12
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +24 -18
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +17 -13
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H5.js +17 -31
- package/lib/module/components/typography/H5.js.map +1 -1
- package/lib/module/components/typography/H6.js +15 -11
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +29 -0
- package/lib/module/components/typography/Hero.js.map +1 -0
- package/lib/module/components/typography/Label.js +13 -10
- package/lib/module/components/typography/Label.js.map +1 -1
- package/lib/module/components/typography/LabelHeader.js +20 -17
- package/lib/module/components/typography/LabelHeader.js.map +1 -1
- package/lib/module/components/typography/{Link.js → LabelLink.js} +6 -11
- package/lib/module/components/typography/LabelLink.js.map +1 -0
- package/lib/module/components/typography/LabelSmall.js +18 -22
- package/lib/module/components/typography/LabelSmall.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +195 -379
- package/lib/module/components/typography/__test__/typography.test.js +10 -42
- package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/module/components/typography/common.js +15 -0
- package/lib/module/components/typography/common.js.map +1 -1
- package/lib/module/components/typography/index.js +6 -3
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/core/IOShapes.js +1 -1
- package/lib/module/core/IOShapes.js.map +1 -1
- package/lib/module/core/IOSpacing.js +4 -4
- package/lib/module/core/IOSpacing.js.map +1 -1
- package/lib/module/core/IOStyles.js +2 -8
- package/lib/module/core/IOStyles.js.map +1 -1
- package/lib/module/stories/Link.stories.js +2 -2
- package/lib/module/stories/Link.stories.js.map +1 -1
- package/lib/module/stories/Monospace.stories.js +2 -2
- package/lib/module/stories/Monospace.stories.js.map +1 -1
- package/lib/module/utils/fonts.js +8 -6
- package/lib/module/utils/fonts.js.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/badge/Badge.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 +2 -3
- 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/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/checkbox/CheckboxLabel.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +7 -1
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/IconContained.d.ts +10 -0
- package/lib/typescript/components/icons/IconContained.d.ts.map +1 -0
- package/lib/typescript/components/icons/index.d.ts +1 -0
- package/lib/typescript/components/icons/index.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconChange.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconChange.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconDialpad.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconDialpad.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconKey.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconKey.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconNotification.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconNotification.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconOption.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconOption.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconTransactionsBoxed.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconTransactionsBoxed.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemAction.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfoCopy.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/ListItemSwitch.d.ts +1 -1
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
- package/lib/typescript/components/listitems/index.d.ts +1 -1
- package/lib/typescript/components/listitems/index.d.ts.map +1 -1
- package/lib/typescript/components/{listitems/ListItemIDP.d.ts → modules/ModuleIDP.d.ts} +4 -4
- package/lib/typescript/components/modules/ModuleIDP.d.ts.map +1 -0
- package/lib/typescript/components/modules/index.d.ts +2 -0
- package/lib/typescript/components/modules/index.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/Pictogram.d.ts +4 -1
- package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramBleedCie.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedCie.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedFeature.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedFeature.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedSecurity.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramBleedSecurity.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramCie.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramCie.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramFeature.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramFeature.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramSecurity.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramSecurity.d.ts.map +1 -0
- package/lib/typescript/components/radio/AnimatedRadio.d.ts.map +1 -1
- package/lib/typescript/components/switch/NativeSwitch.d.ts.map +1 -1
- package/lib/typescript/components/switch/SwitchLabel.d.ts.map +1 -1
- package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts +4 -7
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodyMonospace.d.ts +13 -0
- package/lib/typescript/components/typography/BodyMonospace.d.ts.map +1 -0
- package/lib/typescript/components/typography/ButtonText.d.ts +14 -0
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -0
- package/lib/typescript/components/typography/Caption.d.ts +14 -0
- package/lib/typescript/components/typography/Caption.d.ts.map +1 -0
- package/lib/typescript/components/typography/Chip.d.ts +13 -0
- package/lib/typescript/components/typography/Chip.d.ts.map +1 -0
- package/lib/typescript/components/typography/H1.d.ts +9 -15
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H2.d.ts +9 -15
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +7 -10
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H4.d.ts +8 -11
- package/lib/typescript/components/typography/H4.d.ts.map +1 -1
- package/lib/typescript/components/typography/H5.d.ts +9 -24
- package/lib/typescript/components/typography/H5.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts +7 -12
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/Hero.d.ts +15 -0
- package/lib/typescript/components/typography/Hero.d.ts.map +1 -0
- package/lib/typescript/components/typography/Label.d.ts +8 -9
- package/lib/typescript/components/typography/Label.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelHeader.d.ts +4 -7
- package/lib/typescript/components/typography/LabelHeader.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelLink.d.ts +18 -0
- package/lib/typescript/components/typography/LabelLink.d.ts.map +1 -0
- package/lib/typescript/components/typography/LabelSmall.d.ts +4 -7
- package/lib/typescript/components/typography/LabelSmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/common.d.ts +6 -0
- package/lib/typescript/components/typography/common.d.ts.map +1 -1
- package/lib/typescript/components/typography/index.d.ts +6 -3
- package/lib/typescript/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/core/IOShapes.d.ts +1 -1
- package/lib/typescript/core/IOShapes.d.ts.map +1 -1
- package/lib/typescript/core/IOSpacing.d.ts +5 -5
- package/lib/typescript/core/IOSpacing.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +1 -6
- package/lib/typescript/core/IOStyles.d.ts.map +1 -1
- package/lib/typescript/stories/H1.stories.d.ts +2 -2
- package/lib/typescript/stories/H2.stories.d.ts +2 -2
- package/lib/typescript/stories/H3.stories.d.ts +2 -2
- package/lib/typescript/stories/H4.stories.d.ts +2 -2
- package/lib/typescript/stories/H5.stories.d.ts +2 -10
- package/lib/typescript/stories/H5.stories.d.ts.map +1 -1
- package/lib/typescript/stories/H6.stories.d.ts +2 -2
- package/lib/typescript/stories/Label.stories.d.ts +4 -2
- package/lib/typescript/stories/Label.stories.d.ts.map +1 -1
- package/lib/typescript/stories/LabelSmall.stories.d.ts +2 -2
- package/lib/typescript/stories/Link.stories.d.ts +3 -3
- package/lib/typescript/stories/Link.stories.d.ts.map +1 -1
- package/lib/typescript/stories/Monospace.stories.d.ts +2 -2
- package/lib/typescript/stories/Monospace.stories.d.ts.map +1 -1
- package/lib/typescript/utils/fonts.d.ts +3 -3
- package/lib/typescript/utils/fonts.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/alert/Alert.tsx +7 -1
- package/src/components/badge/Badge.tsx +30 -19
- package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +5 -3
- package/src/components/banner/Banner.tsx +1 -3
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +5 -5
- package/src/components/buttons/ButtonExtendedOutline.tsx +2 -2
- package/src/components/buttons/ButtonLink.tsx +3 -2
- package/src/components/buttons/ButtonOutline.tsx +6 -53
- package/src/components/buttons/ButtonSolid.tsx +8 -17
- package/src/components/buttons/IconButtonSolid.tsx +43 -13
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +23 -21
- package/src/components/checkbox/AnimatedCheckbox.tsx +26 -5
- package/src/components/checkbox/AnimatedMessageCheckbox.tsx +20 -10
- package/src/components/checkbox/CheckboxLabel.tsx +33 -6
- package/src/components/icons/Icon.tsx +27 -15
- package/src/components/icons/IconContained.tsx +76 -0
- package/src/components/icons/index.tsx +1 -0
- package/src/components/icons/svg/IconChange.tsx +16 -0
- package/src/components/icons/svg/IconDialpad.tsx +14 -0
- package/src/components/icons/svg/IconKey.tsx +16 -0
- package/src/components/icons/svg/IconNotification.tsx +16 -0
- package/src/components/icons/svg/IconOption.tsx +16 -0
- package/src/components/icons/svg/IconTransactions.tsx +1 -1
- package/src/components/icons/svg/IconTransactionsBoxed.tsx +16 -0
- package/src/components/icons/svg/originals/IconChange.svg +3 -0
- package/src/components/icons/svg/originals/IconDialpad.svg +5 -0
- package/src/components/icons/svg/originals/IconKey.svg +7 -0
- package/src/components/icons/svg/originals/IconNotification.svg +7 -0
- package/src/components/icons/svg/originals/IconOption.svg +7 -0
- package/src/components/icons/svg/originals/IconTransactions.svg +8 -0
- package/src/components/icons/svg/originals/IconTransactionsBoxed.svg +8 -0
- package/src/components/index.tsx +1 -0
- package/src/components/listitems/ListItemAction.tsx +53 -11
- package/src/components/listitems/ListItemInfo.tsx +55 -11
- package/src/components/listitems/ListItemInfoCopy.tsx +67 -18
- package/src/components/listitems/ListItemNav.tsx +60 -12
- package/src/components/listitems/ListItemNavAlert.tsx +50 -9
- package/src/components/listitems/ListItemSwitch.tsx +4 -4
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +75 -108
- package/src/components/listitems/__test__/listitem.test.tsx +1 -1
- package/src/components/listitems/index.tsx +1 -1
- package/src/components/{listitems/ListItemIDP.tsx → modules/ModuleIDP.tsx} +29 -16
- package/src/components/modules/index.tsx +1 -0
- package/src/components/pictograms/Pictogram.tsx +14 -2
- package/src/components/pictograms/svg/PictogramBleedCie.tsx +38 -0
- package/src/components/pictograms/svg/PictogramBleedFeature.tsx +46 -0
- package/src/components/pictograms/svg/PictogramBleedSecurity.tsx +38 -0
- package/src/components/pictograms/svg/PictogramCie.tsx +38 -0
- package/src/components/pictograms/svg/PictogramFeature.tsx +42 -0
- package/src/components/pictograms/svg/PictogramSecurity.tsx +38 -0
- package/src/components/pictograms/svg/originals/PictogramBleedCie.svg +30 -0
- package/src/components/pictograms/svg/originals/PictogramBleedFeature.svg +34 -0
- package/src/components/pictograms/svg/originals/PictogramBleedSecurity.svg +26 -0
- package/src/components/pictograms/svg/originals/PictogramCie.svg +30 -0
- package/src/components/pictograms/svg/originals/PictogramFeature.svg +34 -0
- package/src/components/pictograms/svg/originals/PictogramSecurity.svg +30 -0
- package/src/components/radio/AnimatedRadio.tsx +26 -5
- package/src/components/switch/NativeSwitch.tsx +35 -13
- package/src/components/switch/SwitchLabel.tsx +33 -6
- package/src/components/tag/Tag.tsx +39 -24
- package/src/components/textInput/TextInputBase.tsx +20 -3
- package/src/components/typography/Body.tsx +3 -7
- package/src/components/typography/BodyMonospace.tsx +29 -0
- package/src/components/typography/ButtonText.tsx +45 -0
- package/src/components/typography/Caption.tsx +37 -0
- package/src/components/typography/Chip.tsx +33 -0
- package/src/components/typography/H1.tsx +20 -29
- package/src/components/typography/H2.tsx +20 -29
- package/src/components/typography/H3.tsx +21 -20
- package/src/components/typography/H4.tsx +19 -20
- package/src/components/typography/H5.tsx +22 -54
- package/src/components/typography/H6.tsx +17 -15
- package/src/components/typography/Hero.tsx +34 -0
- package/src/components/typography/Label.tsx +23 -21
- package/src/components/typography/LabelHeader.tsx +12 -12
- package/src/components/typography/{Link.tsx → LabelLink.tsx} +15 -12
- package/src/components/typography/LabelSmall.tsx +13 -14
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +195 -379
- package/src/components/typography/__test__/typography.test.tsx +12 -50
- package/src/components/typography/common.tsx +16 -0
- package/src/components/typography/index.tsx +6 -3
- package/src/core/IOShapes.ts +1 -1
- package/src/core/IOSpacing.ts +6 -6
- package/src/core/IOStyles.ts +3 -8
- package/src/stories/Link.stories.ts +5 -5
- package/src/stories/Monospace.stories.ts +5 -5
- package/src/utils/fonts.ts +8 -6
- package/lib/commonjs/components/listitems/ListItemIDP.js.map +0 -1
- package/lib/commonjs/components/typography/CTA.js +0 -34
- package/lib/commonjs/components/typography/CTA.js.map +0 -1
- package/lib/commonjs/components/typography/Link.js.map +0 -1
- package/lib/commonjs/components/typography/Monospace.js +0 -30
- package/lib/commonjs/components/typography/Monospace.js.map +0 -1
- package/lib/module/components/listitems/ListItemIDP.js.map +0 -1
- package/lib/module/components/typography/CTA.js +0 -27
- package/lib/module/components/typography/CTA.js.map +0 -1
- package/lib/module/components/typography/Link.js.map +0 -1
- package/lib/module/components/typography/Monospace.js +0 -23
- package/lib/module/components/typography/Monospace.js.map +0 -1
- package/lib/typescript/components/listitems/ListItemIDP.d.ts.map +0 -1
- package/lib/typescript/components/typography/CTA.d.ts +0 -16
- package/lib/typescript/components/typography/CTA.d.ts.map +0 -1
- package/lib/typescript/components/typography/Link.d.ts +0 -22
- package/lib/typescript/components/typography/Link.d.ts.map +0 -1
- package/lib/typescript/components/typography/Monospace.d.ts +0 -16
- package/lib/typescript/components/typography/Monospace.d.ts.map +0 -1
- package/src/components/typography/CTA.tsx +0 -35
- package/src/components/typography/Monospace.tsx +0 -34
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import type { StoryObj } from "@storybook/react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: (props: Omit<import("react-native").TextProps & import("react").RefAttributes<import("react-native").Text>, "style"> & import("../components").TypographyProps<"Regular" | "SemiBold" | "Bold", "grey-50" | "grey-100" | "grey-300" | "grey-450" | "grey-650" | "grey-850" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-450" | "blueIO-200" | "blueIO-150" | "blueIO-100" | "blueIO-50" | "hanPurple-850" | "hanPurple-500" | "hanPurple-250" | "hanPurple-100" | "hanPurple-50" | "turquoise-850" | "turquoise-500" | "turquoise-450" | "turquoise-150" | "turquoise-100" | "turquoise-50" | "error-850" | "error-600" | "error-500" | "error-400" | "error-100" | "warning-850" | "warning-700" | "warning-500" | "warning-400" | "warning-100" | "success-850" | "success-700" | "success-500" | "success-400" | "success-100" | "info-850" | "info-700" | "info-500" | "info-400" | "info-100" | "cobalt" | "blueItalia-850" | "blueItalia-600" | "blueItalia-500" | "blueItalia-100" | "blueItalia-50" | "blue-600" | "blue-50" | "greyUltraLight" | "greyLight" | "bluegreyLight" | "grey" | "milderGray" | "noCieButton" | "blueUltraLight" | "aqua" | "aquaUltraLight" | "antiqueFuchsia" | "yellow" | "orange" | "green" | "greenLight" | ("white" | "grey-200" | "grey-700" | "bluegrey" | "bluegreyDark" | "blue" | "red")> & {
|
|
6
6
|
style?: import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">> | import("react-native").RecursiveArray<import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">>>;
|
|
7
7
|
} & {
|
|
8
8
|
fontSize?: ("small" | "regular") | undefined;
|
|
9
|
-
}
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
10
10
|
parameters: {
|
|
11
11
|
layout: string;
|
|
12
12
|
actions: {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import type { StoryObj } from "@storybook/react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: (props: Omit<import("react-native").TextProps & import("react").RefAttributes<import("react-native").Text>, "style"> & import("../components").TypographyProps<"SemiBold", "white" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-450" | "grey-650" | "grey-700" | "grey-850" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-450" | "blueIO-200" | "blueIO-150" | "blueIO-100" | "blueIO-50" | "hanPurple-850" | "hanPurple-500" | "hanPurple-250" | "hanPurple-100" | "hanPurple-50" | "turquoise-850" | "turquoise-500" | "turquoise-450" | "turquoise-150" | "turquoise-100" | "turquoise-50" | "error-850" | "error-600" | "error-500" | "error-400" | "error-100" | "warning-850" | "warning-700" | "warning-500" | "warning-400" | "warning-100" | "success-850" | "success-700" | "success-500" | "success-400" | "success-100" | "info-850" | "info-700" | "info-500" | "info-400" | "info-100" | "cobalt" | "blueItalia-850" | "blueItalia-600" | "blueItalia-500" | "blueItalia-100" | "blueItalia-50" | "blue-600" | "blue-50" | "greyUltraLight" | "greyLight" | "bluegreyLight" | "grey" | "milderGray" | "bluegrey" | "bluegreyDark" | "noCieButton" | "blue" | "blueUltraLight" | "aqua" | "aquaUltraLight" | "antiqueFuchsia" | "yellow" | "orange" | "red" | "green" | "greenLight"> & {
|
|
6
6
|
style?: import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">> | import("react-native").RecursiveArray<import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">>>;
|
|
7
7
|
} & {
|
|
8
|
-
fontSize?: ("
|
|
9
|
-
}
|
|
8
|
+
fontSize?: import("../components").FontSize | undefined;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
10
10
|
parameters: {
|
|
11
11
|
layout: string;
|
|
12
12
|
actions: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Link.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Link.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;CAUwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import type { StoryObj } from "@storybook/react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: (props: Omit<import("react-native").TextProps & import("react").RefAttributes<import("react-native").Text>, "style"> & import("../components").TypographyProps<"Medium", "bluegrey" | "bluegreyDark"> & {
|
|
6
6
|
style?: import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">> | import("react-native").RecursiveArray<import("react-native").Falsy | Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily"> | import("react-native").RegisteredStyle<Omit<import("react-native").TextStyle, "color" | "fontStyle" | "fontWeight" | "fontSize" | "fontFamily">>>;
|
|
7
|
-
}
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
8
8
|
parameters: {
|
|
9
9
|
layout: string;
|
|
10
10
|
actions: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Monospace.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Monospace.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Monospace.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Monospace.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;CAU4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* README file included in this repository.
|
|
5
5
|
*/
|
|
6
6
|
export type IOFontFamily = keyof typeof fonts;
|
|
7
|
-
declare const weights: readonly ["Light", "Regular", "SemiBold", "Bold"];
|
|
7
|
+
declare const weights: readonly ["Light", "Regular", "Medium", "SemiBold", "Bold"];
|
|
8
8
|
export type IOFontWeight = (typeof weights)[number];
|
|
9
|
-
declare const weightValues: readonly ["300", "400", "600", "700"];
|
|
9
|
+
declare const weightValues: readonly ["300", "400", "500", "600", "700"];
|
|
10
10
|
export type FontWeightValue = (typeof weightValues)[number];
|
|
11
11
|
/**
|
|
12
12
|
* Choose the font name based on the platform
|
|
@@ -14,7 +14,7 @@ export type FontWeightValue = (typeof weightValues)[number];
|
|
|
14
14
|
declare const fonts: {
|
|
15
15
|
TitilliumWeb: string | undefined;
|
|
16
16
|
ReadexPro: string | undefined;
|
|
17
|
-
|
|
17
|
+
DMMono: string | undefined;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Mapping between the nominal description of the weight (also the postfix used on Android) and the numeric value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,KAAK,CAAC;AAE9C,QAAA,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,KAAK,CAAC;AAE9C,QAAA,MAAM,OAAO,6DAA8D,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,QAAA,MAAM,YAAY,8CAA+C,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;;GAEG;AACH,QAAA,MAAM,KAAK;;;;CAgBV,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,eAAe,CAM7D,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,KAAK,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,eAAe,CAMhE,CAAC;AAEF,oBAAY,SAAS;IACnB,QAAQ,WAAW;IACnB,QAAQ,WAAW;CACpB;AAED,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,WACP,YAAY,aACX,OAAO,KAChB,MAMC,CAAC;AAEL;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,YACtB,YAAY,GAAG,SAAS,aACtB,OAAO,GAAG,SAAS,SACvB,UAAU,GAAG,SAAS,KAC3B,eAgBC,CAAC"}
|
package/package.json
CHANGED
|
@@ -29,6 +29,7 @@ import { IOIconSizeScale, IOIcons, Icon } from "../icons";
|
|
|
29
29
|
import { HSpacer, VSpacer } from "../spacer";
|
|
30
30
|
import { H4 } from "../typography/H4";
|
|
31
31
|
import { Label } from "../typography/Label";
|
|
32
|
+
import { useIOExperimentalDesign } from "../../core";
|
|
32
33
|
|
|
33
34
|
const iconSize: IOIconSizeScale = 24;
|
|
34
35
|
|
|
@@ -50,6 +51,10 @@ const styles = StyleSheet.create({
|
|
|
50
51
|
label: {
|
|
51
52
|
fontSize: 16,
|
|
52
53
|
...makeFontStyleObject("Regular", false, "ReadexPro")
|
|
54
|
+
},
|
|
55
|
+
labelLegacy: {
|
|
56
|
+
fontSize: 16,
|
|
57
|
+
...makeFontStyleObject("Bold", false, "TitilliumWeb")
|
|
53
58
|
}
|
|
54
59
|
});
|
|
55
60
|
|
|
@@ -121,6 +126,7 @@ export const Alert = ({
|
|
|
121
126
|
testID
|
|
122
127
|
}: AlertType): JSX.Element => {
|
|
123
128
|
const isPressed: Animated.SharedValue<number> = useSharedValue(0);
|
|
129
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
124
130
|
|
|
125
131
|
// Scaling transformation applied when the button is pressed
|
|
126
132
|
const animationScaleValue = IOScaleValues?.magnifiedButton?.pressedState;
|
|
@@ -181,7 +187,7 @@ export const Alert = ({
|
|
|
181
187
|
<VSpacer size={8} />
|
|
182
188
|
<Text
|
|
183
189
|
style={[
|
|
184
|
-
styles.label,
|
|
190
|
+
isExperimental ? styles.label : styles.labelLegacy,
|
|
185
191
|
{ color: IOColors[mapVariantStates[variant].foreground] }
|
|
186
192
|
]}
|
|
187
193
|
numberOfLines={1}
|
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
IOBadgeHSpacing,
|
|
5
5
|
IOBadgeRadius,
|
|
6
6
|
IOBadgeVSpacing,
|
|
7
|
-
IOColors
|
|
7
|
+
IOColors,
|
|
8
|
+
useIOExperimentalDesign
|
|
8
9
|
} from "../../core";
|
|
9
10
|
import { makeFontStyleObject } from "../../utils/fonts";
|
|
10
11
|
import { WithTestID } from "../../utils/types";
|
|
@@ -91,31 +92,41 @@ const styles = StyleSheet.create({
|
|
|
91
92
|
lineHeight: 16,
|
|
92
93
|
alignSelf: "center",
|
|
93
94
|
textTransform: "uppercase",
|
|
94
|
-
flexShrink: 1
|
|
95
|
+
flexShrink: 1
|
|
96
|
+
},
|
|
97
|
+
labelFont: {
|
|
95
98
|
...makeFontStyleObject("Regular", false, "ReadexPro")
|
|
99
|
+
},
|
|
100
|
+
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
101
|
+
legacyLabelFont: {
|
|
102
|
+
...makeFontStyleObject("SemiBold", false, "TitilliumWeb")
|
|
96
103
|
}
|
|
97
104
|
});
|
|
98
105
|
|
|
99
106
|
/**
|
|
100
107
|
* Official badge component
|
|
101
108
|
*/
|
|
102
|
-
export const Badge = ({ text, variant, testID }: Badge) =>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{ backgroundColor: IOColors[mapVariants[variant].background] }
|
|
108
|
-
]}
|
|
109
|
-
>
|
|
110
|
-
<Text
|
|
111
|
-
numberOfLines={1}
|
|
112
|
-
ellipsizeMode="tail"
|
|
109
|
+
export const Badge = ({ text, variant, testID }: Badge) => {
|
|
110
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
111
|
+
return (
|
|
112
|
+
<View
|
|
113
|
+
testID={testID}
|
|
113
114
|
style={[
|
|
114
|
-
styles.
|
|
115
|
-
{
|
|
115
|
+
styles.badge,
|
|
116
|
+
{ backgroundColor: IOColors[mapVariants[variant].background] }
|
|
116
117
|
]}
|
|
117
118
|
>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
<Text
|
|
120
|
+
numberOfLines={1}
|
|
121
|
+
ellipsizeMode="tail"
|
|
122
|
+
style={[
|
|
123
|
+
styles.label,
|
|
124
|
+
isExperimental ? styles.labelFont : styles.legacyLabelFont,
|
|
125
|
+
{ color: IOColors[mapVariants[variant].foreground] }
|
|
126
|
+
]}
|
|
127
|
+
>
|
|
128
|
+
{text}
|
|
129
|
+
</Text>
|
|
130
|
+
</View>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
@@ -26,13 +26,15 @@ exports[`Test Badge Components Badge Snapshot 1`] = `
|
|
|
26
26
|
{
|
|
27
27
|
"alignSelf": "center",
|
|
28
28
|
"flexShrink": 1,
|
|
29
|
-
"fontFamily": "Readex Pro",
|
|
30
29
|
"fontSize": 12,
|
|
31
|
-
"fontStyle": "normal",
|
|
32
|
-
"fontWeight": "400",
|
|
33
30
|
"lineHeight": 16,
|
|
34
31
|
"textTransform": "uppercase",
|
|
35
32
|
},
|
|
33
|
+
{
|
|
34
|
+
"fontFamily": "Titillium Web",
|
|
35
|
+
"fontStyle": "normal",
|
|
36
|
+
"fontWeight": "600",
|
|
37
|
+
},
|
|
36
38
|
{
|
|
37
39
|
"color": "#555C70",
|
|
38
40
|
},
|
|
@@ -202,9 +202,7 @@ export const Banner = ({
|
|
|
202
202
|
<>
|
|
203
203
|
{/* Once we get 'gap' property, we can get rid of
|
|
204
204
|
these <VSpacer> components */}
|
|
205
|
-
<H6
|
|
206
|
-
{title}
|
|
207
|
-
</H6>
|
|
205
|
+
<H6 color={colorTitle}>{title}</H6>
|
|
208
206
|
<VSpacer size={4} />
|
|
209
207
|
</>
|
|
210
208
|
)}
|
|
@@ -72,23 +72,23 @@ exports[`Test Banner Components Banner Snapshot 1`] = `
|
|
|
72
72
|
<Text
|
|
73
73
|
color="blueIO-850"
|
|
74
74
|
defaultColor="black"
|
|
75
|
-
defaultWeight="
|
|
76
|
-
font="
|
|
75
|
+
defaultWeight="SemiBold"
|
|
76
|
+
font="TitilliumWeb"
|
|
77
77
|
fontStyle={
|
|
78
78
|
{
|
|
79
79
|
"fontSize": 16,
|
|
80
|
-
"lineHeight":
|
|
80
|
+
"lineHeight": 24,
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
style={
|
|
84
84
|
[
|
|
85
85
|
{
|
|
86
86
|
"fontSize": 16,
|
|
87
|
-
"lineHeight":
|
|
87
|
+
"lineHeight": 24,
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
"color": "#031344",
|
|
91
|
-
"fontFamily": "
|
|
91
|
+
"fontFamily": "Titillium Web",
|
|
92
92
|
"fontStyle": "normal",
|
|
93
93
|
"fontWeight": "600",
|
|
94
94
|
},
|
|
@@ -14,7 +14,7 @@ import Animated, {
|
|
|
14
14
|
withSpring
|
|
15
15
|
} from "react-native-reanimated";
|
|
16
16
|
import { IOIcons, Icon } from "../icons";
|
|
17
|
-
import {
|
|
17
|
+
import { H6, LabelSmall } from "../typography";
|
|
18
18
|
import { IOScaleValues, IOSpringValues, IOColors, IOStyles } from "../../core";
|
|
19
19
|
|
|
20
20
|
type Props = {
|
|
@@ -88,7 +88,7 @@ export const ButtonExtendedOutline = ({
|
|
|
88
88
|
>
|
|
89
89
|
<Animated.View style={[styles.button, animatedStyle]}>
|
|
90
90
|
<View style={IOStyles.flex}>
|
|
91
|
-
<
|
|
91
|
+
<H6>{label}</H6>
|
|
92
92
|
{description && (
|
|
93
93
|
<LabelSmall weight="Regular" color={"bluegreyDark"}>
|
|
94
94
|
{description}
|
|
@@ -21,6 +21,7 @@ import { makeFontStyleObject } from "../../utils/fonts";
|
|
|
21
21
|
import { WithTestID } from "../../utils/types";
|
|
22
22
|
import { AnimatedIcon, IOIcons, IconClassComponent } from "../icons/Icon";
|
|
23
23
|
import { HSpacer } from "../spacer/Spacer";
|
|
24
|
+
import { buttonTextFontSize } from "../typography";
|
|
24
25
|
|
|
25
26
|
type ColorButtonLink = "primary";
|
|
26
27
|
export type ButtonLink = WithTestID<{
|
|
@@ -74,8 +75,8 @@ const mapLegacyColorStates: Record<
|
|
|
74
75
|
const DISABLED_OPACITY = 0.5;
|
|
75
76
|
const IOButtonStylesLocal = StyleSheet.create({
|
|
76
77
|
label: {
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
...makeFontStyleObject("Regular", false, "ReadexPro"),
|
|
79
|
+
fontSize: buttonTextFontSize
|
|
79
80
|
}
|
|
80
81
|
});
|
|
81
82
|
|
|
@@ -21,19 +21,14 @@ import {
|
|
|
21
21
|
} from "../../core/";
|
|
22
22
|
import { makeFontStyleObject } from "../../utils/fonts";
|
|
23
23
|
import { WithTestID } from "../../utils/types";
|
|
24
|
-
import {
|
|
25
|
-
AnimatedIcon,
|
|
26
|
-
IOIconSizeScale,
|
|
27
|
-
IOIcons,
|
|
28
|
-
IconClassComponent
|
|
29
|
-
} from "../icons";
|
|
24
|
+
import { AnimatedIcon, IOIcons, IconClassComponent } from "../icons";
|
|
30
25
|
import { HSpacer } from "../spacer/Spacer";
|
|
26
|
+
import { buttonTextFontSize } from "../typography";
|
|
31
27
|
|
|
32
|
-
type ColorButtonOutline = "primary" | "
|
|
28
|
+
type ColorButtonOutline = "primary" | "contrast" | "danger";
|
|
33
29
|
export type ButtonOutline = WithTestID<{
|
|
34
30
|
color?: ColorButtonOutline;
|
|
35
31
|
label: string;
|
|
36
|
-
small?: boolean;
|
|
37
32
|
fullWidth?: boolean;
|
|
38
33
|
disabled?: boolean;
|
|
39
34
|
// Icons
|
|
@@ -85,24 +80,6 @@ const mapColorStates: Record<
|
|
|
85
80
|
disabled: IOColors["grey-700"]
|
|
86
81
|
}
|
|
87
82
|
},
|
|
88
|
-
// Neutral button
|
|
89
|
-
neutral: {
|
|
90
|
-
border: {
|
|
91
|
-
default: IOColors.grey,
|
|
92
|
-
pressed: IOColors.bluegrey,
|
|
93
|
-
disabled: IOColors.bluegreyLight
|
|
94
|
-
},
|
|
95
|
-
background: {
|
|
96
|
-
default: IOColors.white,
|
|
97
|
-
pressed: IOColors.greyUltraLight,
|
|
98
|
-
disabled: "transparent"
|
|
99
|
-
},
|
|
100
|
-
label: {
|
|
101
|
-
default: IOColors.bluegrey,
|
|
102
|
-
pressed: IOColors.bluegreyDark,
|
|
103
|
-
disabled: IOColors.grey
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
83
|
// Contrast button
|
|
107
84
|
contrast: {
|
|
108
85
|
border: {
|
|
@@ -164,24 +141,6 @@ const mapLegacyColorStates: Record<
|
|
|
164
141
|
disabled: IOColors.grey
|
|
165
142
|
}
|
|
166
143
|
},
|
|
167
|
-
// Neutral button
|
|
168
|
-
neutral: {
|
|
169
|
-
border: {
|
|
170
|
-
default: IOColors.grey,
|
|
171
|
-
pressed: IOColors.bluegrey,
|
|
172
|
-
disabled: IOColors.bluegreyLight
|
|
173
|
-
},
|
|
174
|
-
background: {
|
|
175
|
-
default: IOColors.white,
|
|
176
|
-
pressed: IOColors.greyUltraLight,
|
|
177
|
-
disabled: "transparent"
|
|
178
|
-
},
|
|
179
|
-
label: {
|
|
180
|
-
default: IOColors.bluegrey,
|
|
181
|
-
pressed: IOColors.bluegreyDark,
|
|
182
|
-
disabled: IOColors.grey
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
144
|
// Contrast button
|
|
186
145
|
contrast: {
|
|
187
146
|
border: {
|
|
@@ -237,7 +196,8 @@ const DISABLED_OPACITY = 0.5;
|
|
|
237
196
|
const IOButtonStylesLocal = StyleSheet.create({
|
|
238
197
|
// eslint-disable-next-line react-native/no-unused-styles
|
|
239
198
|
label: {
|
|
240
|
-
...makeFontStyleObject("Regular", false, "ReadexPro")
|
|
199
|
+
...makeFontStyleObject("Regular", false, "ReadexPro"),
|
|
200
|
+
fontSize: buttonTextFontSize
|
|
241
201
|
},
|
|
242
202
|
// eslint-disable-next-line react-native/no-unused-styles
|
|
243
203
|
buttonWithBorder: {
|
|
@@ -248,7 +208,6 @@ const IOButtonStylesLocal = StyleSheet.create({
|
|
|
248
208
|
export const ButtonOutline = ({
|
|
249
209
|
color = "primary",
|
|
250
210
|
label,
|
|
251
|
-
small = false,
|
|
252
211
|
fullWidth = false,
|
|
253
212
|
disabled = false,
|
|
254
213
|
icon,
|
|
@@ -349,9 +308,6 @@ export const ButtonOutline = ({
|
|
|
349
308
|
isPressed.value = 0;
|
|
350
309
|
}, [isPressed]);
|
|
351
310
|
|
|
352
|
-
// Icon size
|
|
353
|
-
const iconSize: IOIconSizeScale = small ? 16 : 20;
|
|
354
|
-
|
|
355
311
|
return (
|
|
356
312
|
<Pressable
|
|
357
313
|
accessibilityLabel={accessibilityLabel}
|
|
@@ -369,8 +325,8 @@ export const ButtonOutline = ({
|
|
|
369
325
|
style={[
|
|
370
326
|
buttonStyles.button,
|
|
371
327
|
buttonStylesLocal.buttonWithBorder,
|
|
328
|
+
buttonStyles.buttonSizeDefault,
|
|
372
329
|
iconPosition === "end" && { flexDirection: "row-reverse" },
|
|
373
|
-
small ? buttonStyles.buttonSizeSmall : buttonStyles.buttonSizeDefault,
|
|
374
330
|
disabled
|
|
375
331
|
? {
|
|
376
332
|
backgroundColor: colorMap[color]?.background?.disabled,
|
|
@@ -393,13 +349,11 @@ export const ButtonOutline = ({
|
|
|
393
349
|
name={icon}
|
|
394
350
|
animatedProps={pressedColorIconAnimationStyle}
|
|
395
351
|
color={colorMap[color]?.label?.default}
|
|
396
|
-
size={iconSize}
|
|
397
352
|
/>
|
|
398
353
|
) : (
|
|
399
354
|
<AnimatedIcon
|
|
400
355
|
name={icon}
|
|
401
356
|
color={colorMap[color]?.label?.disabled}
|
|
402
|
-
size={iconSize}
|
|
403
357
|
/>
|
|
404
358
|
)}
|
|
405
359
|
<HSpacer size={8} />
|
|
@@ -409,7 +363,6 @@ export const ButtonOutline = ({
|
|
|
409
363
|
style={[
|
|
410
364
|
buttonStylesLocal.label,
|
|
411
365
|
buttonStyles.label,
|
|
412
|
-
small ? buttonStyles.labelSizeSmall : buttonStyles.labelSizeDefault,
|
|
413
366
|
disabled
|
|
414
367
|
? { color: colorMap[color]?.label?.disabled }
|
|
415
368
|
: { color: colorMap[color]?.label?.default },
|
|
@@ -12,7 +12,7 @@ import Animated, {
|
|
|
12
12
|
import { IOIcons, Icon } from "../icons";
|
|
13
13
|
import { WithTestID } from "../../utils/types";
|
|
14
14
|
import { HSpacer } from "../spacer/Spacer";
|
|
15
|
-
import {
|
|
15
|
+
import { ButtonText, ButtonTextAllowedColors } from "../typography/ButtonText";
|
|
16
16
|
import {
|
|
17
17
|
IOButtonLegacyStyles,
|
|
18
18
|
IOButtonStyles,
|
|
@@ -28,8 +28,8 @@ type ColorStates = {
|
|
|
28
28
|
default: string;
|
|
29
29
|
pressed: string;
|
|
30
30
|
label: {
|
|
31
|
-
default:
|
|
32
|
-
disabled:
|
|
31
|
+
default: ButtonTextAllowedColors;
|
|
32
|
+
disabled: ButtonTextAllowedColors;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -142,7 +142,7 @@ const mapLegacyColorStates: Record<
|
|
|
142
142
|
default: IOColors.white,
|
|
143
143
|
pressed: IOColors["blue-50"],
|
|
144
144
|
label: {
|
|
145
|
-
default: "
|
|
145
|
+
default: "blueIO-500",
|
|
146
146
|
disabled: "white"
|
|
147
147
|
}
|
|
148
148
|
}
|
|
@@ -239,9 +239,7 @@ export const ButtonSolid = React.memo(
|
|
|
239
239
|
style={[
|
|
240
240
|
buttonStyles.button,
|
|
241
241
|
iconPosition === "end" && { flexDirection: "row-reverse" },
|
|
242
|
-
|
|
243
|
-
? buttonStyles.buttonSizeSmall
|
|
244
|
-
: buttonStyles.buttonSizeDefault,
|
|
242
|
+
buttonStyles.buttonSizeDefault,
|
|
245
243
|
disabled
|
|
246
244
|
? isExperimental
|
|
247
245
|
? styles.backgroundDisabled
|
|
@@ -262,16 +260,9 @@ export const ButtonSolid = React.memo(
|
|
|
262
260
|
<HSpacer size={8} />
|
|
263
261
|
</>
|
|
264
262
|
)}
|
|
265
|
-
<
|
|
266
|
-
font={isExperimental ? "ReadexPro" : undefined}
|
|
267
|
-
weight={isExperimental ? "Regular" : "Bold"}
|
|
263
|
+
<ButtonText
|
|
268
264
|
color={foregroundColor}
|
|
269
|
-
style={
|
|
270
|
-
buttonStyles.label,
|
|
271
|
-
small
|
|
272
|
-
? buttonStyles.labelSizeSmall
|
|
273
|
-
: buttonStyles.labelSizeDefault
|
|
274
|
-
]}
|
|
265
|
+
style={IOButtonStyles.label}
|
|
275
266
|
numberOfLines={1}
|
|
276
267
|
ellipsizeMode="tail"
|
|
277
268
|
/* A11y-related props:
|
|
@@ -280,7 +271,7 @@ export const ButtonSolid = React.memo(
|
|
|
280
271
|
maxFontSizeMultiplier={1.3} */
|
|
281
272
|
>
|
|
282
273
|
{label}
|
|
283
|
-
</
|
|
274
|
+
</ButtonText>
|
|
284
275
|
</Animated.View>
|
|
285
276
|
</Pressable>
|
|
286
277
|
);
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
IOButtonStyles,
|
|
15
15
|
IOIconButtonStyles,
|
|
16
16
|
IOScaleValues,
|
|
17
|
-
IOSpringValues
|
|
17
|
+
IOSpringValues,
|
|
18
|
+
useIOExperimentalDesign
|
|
18
19
|
} from "../../core";
|
|
19
20
|
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
20
21
|
import { WithTestID } from "../../utils/types";
|
|
@@ -70,6 +71,36 @@ const mapColorStates: Record<
|
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
73
|
|
|
74
|
+
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
75
|
+
const mapLegacyColorStates: Record<
|
|
76
|
+
NonNullable<IconButtonSolid["color"]>,
|
|
77
|
+
ColorStates
|
|
78
|
+
> = {
|
|
79
|
+
// Primary button
|
|
80
|
+
primary: {
|
|
81
|
+
background: {
|
|
82
|
+
default: IOColors.blue,
|
|
83
|
+
pressed: IOColors["blue-600"],
|
|
84
|
+
disabled: IOColors["grey-100"]
|
|
85
|
+
},
|
|
86
|
+
icon: {
|
|
87
|
+
default: IOColors.white,
|
|
88
|
+
disabled: IOColors["grey-450"]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
contrast: {
|
|
92
|
+
background: {
|
|
93
|
+
default: IOColors.white,
|
|
94
|
+
pressed: IOColors["blue-50"],
|
|
95
|
+
disabled: hexToRgba(IOColors.white, 0.25)
|
|
96
|
+
},
|
|
97
|
+
icon: {
|
|
98
|
+
default: IOColors.blue,
|
|
99
|
+
disabled: IOColors.blue
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
73
104
|
export const IconButtonSolid = ({
|
|
74
105
|
icon,
|
|
75
106
|
color = "primary",
|
|
@@ -80,7 +111,7 @@ export const IconButtonSolid = ({
|
|
|
80
111
|
testID
|
|
81
112
|
}: IconButtonSolid) => {
|
|
82
113
|
const isPressed = useSharedValue(0);
|
|
83
|
-
|
|
114
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
84
115
|
// Scaling transformation applied when the button is pressed
|
|
85
116
|
const animationScaleValue = IOScaleValues?.exaggeratedButton?.pressedState;
|
|
86
117
|
|
|
@@ -89,15 +120,16 @@ export const IconButtonSolid = ({
|
|
|
89
120
|
withSpring(isPressed.value, IOSpringValues.button)
|
|
90
121
|
);
|
|
91
122
|
|
|
123
|
+
const colorMap = React.useMemo(
|
|
124
|
+
() => (isExperimental ? mapColorStates : mapLegacyColorStates),
|
|
125
|
+
[isExperimental]
|
|
126
|
+
);
|
|
92
127
|
// Interpolate animation values from `isPressed` values
|
|
93
128
|
const pressedAnimationStyle = useAnimatedStyle(() => {
|
|
94
129
|
const backgroundColor = interpolateColor(
|
|
95
130
|
progressPressed.value,
|
|
96
131
|
[0, 1],
|
|
97
|
-
[
|
|
98
|
-
mapColorStates[color].background.default,
|
|
99
|
-
mapColorStates[color].background.pressed
|
|
100
|
-
]
|
|
132
|
+
[colorMap[color].background.default, colorMap[color].background.pressed]
|
|
101
133
|
);
|
|
102
134
|
|
|
103
135
|
// Scale down button slightly when pressed
|
|
@@ -123,7 +155,7 @@ export const IconButtonSolid = ({
|
|
|
123
155
|
isPressed.value = 0;
|
|
124
156
|
}, [isPressed]);
|
|
125
157
|
|
|
126
|
-
|
|
158
|
+
return (
|
|
127
159
|
<Pressable
|
|
128
160
|
accessibilityLabel={accessibilityLabel}
|
|
129
161
|
accessibilityHint={accessibilityHint}
|
|
@@ -143,10 +175,10 @@ export const IconButtonSolid = ({
|
|
|
143
175
|
!disabled && pressedAnimationStyle,
|
|
144
176
|
disabled
|
|
145
177
|
? {
|
|
146
|
-
backgroundColor:
|
|
178
|
+
backgroundColor: colorMap[color]?.background?.disabled
|
|
147
179
|
}
|
|
148
180
|
: {
|
|
149
|
-
backgroundColor:
|
|
181
|
+
backgroundColor: colorMap[color]?.background?.default
|
|
150
182
|
}
|
|
151
183
|
]}
|
|
152
184
|
>
|
|
@@ -154,15 +186,13 @@ export const IconButtonSolid = ({
|
|
|
154
186
|
name={icon}
|
|
155
187
|
color={
|
|
156
188
|
!disabled
|
|
157
|
-
?
|
|
158
|
-
:
|
|
189
|
+
? colorMap[color]?.icon?.default
|
|
190
|
+
: colorMap[color]?.icon?.disabled
|
|
159
191
|
}
|
|
160
192
|
/>
|
|
161
193
|
</Animated.View>
|
|
162
194
|
</Pressable>
|
|
163
195
|
);
|
|
164
|
-
|
|
165
|
-
return <NewButton />;
|
|
166
196
|
};
|
|
167
197
|
|
|
168
198
|
export default IconButtonSolid;
|