@pagopa/io-app-design-system 1.42.0 → 2.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 +8 -32
- package/lib/commonjs/components/accordion/AccordionItem.js +1 -10
- package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/alert/Alert.js +3 -16
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/badge/Badge.js +13 -21
- package/lib/commonjs/components/badge/Badge.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +16 -16
- package/lib/commonjs/components/badge/__test__/badge.test.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +14 -38
- package/lib/commonjs/components/buttons/ButtonLink.js +10 -24
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +14 -24
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +45 -60
- package/lib/commonjs/components/featureInfo/FeatureInfo.js +6 -7
- package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderSecondLevel.js +10 -15
- package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAction.js +12 -50
- package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemAmount.js +2 -5
- package/lib/commonjs/components/listitems/ListItemAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js +2 -2
- package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +83 -347
- package/lib/commonjs/components/modules/ModuleIDP.js +13 -20
- package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
- package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +30 -150
- package/lib/commonjs/components/searchInput/SearchInput.js +2 -4
- package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
- package/lib/commonjs/components/switch/SwitchLabel.js +7 -29
- package/lib/commonjs/components/switch/SwitchLabel.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +3 -2
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/tag/Tag.js +14 -18
- package/lib/commonjs/components/tag/Tag.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +4 -6
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/components/typography/BaseTypography.js +5 -1
- package/lib/commonjs/components/typography/BaseTypography.js.map +1 -1
- package/lib/commonjs/components/typography/Body.js +34 -26
- package/lib/commonjs/components/typography/Body.js.map +1 -1
- package/lib/commonjs/components/typography/BodyMonospace.js +26 -24
- package/lib/commonjs/components/typography/BodyMonospace.js.map +1 -1
- package/lib/commonjs/components/typography/ButtonText.js +25 -19
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/components/typography/Caption.js +29 -19
- package/lib/commonjs/components/typography/Caption.js.map +1 -1
- package/lib/commonjs/components/typography/Chip.js +24 -21
- package/lib/commonjs/components/typography/Chip.js.map +1 -1
- package/lib/commonjs/components/typography/Factory.js +1 -0
- package/lib/commonjs/components/typography/Factory.js.map +1 -1
- package/lib/commonjs/components/typography/H1.js +27 -20
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +27 -20
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +27 -19
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +27 -21
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H5.js +26 -22
- package/lib/commonjs/components/typography/H5.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +25 -20
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +25 -17
- package/lib/commonjs/components/typography/Hero.js.map +1 -1
- package/lib/commonjs/components/typography/IOText.js +104 -0
- package/lib/commonjs/components/typography/IOText.js.map +1 -0
- package/lib/commonjs/components/typography/Label.js +28 -26
- package/lib/commonjs/components/typography/Label.js.map +1 -1
- package/lib/commonjs/components/typography/LabelMini.js +45 -0
- package/lib/commonjs/components/typography/LabelMini.js.map +1 -0
- package/lib/commonjs/components/typography/LabelSmall.js +30 -30
- package/lib/commonjs/components/typography/LabelSmall.js.map +1 -1
- package/lib/commonjs/components/typography/LabelSmallAlt.js +25 -20
- package/lib/commonjs/components/typography/LabelSmallAlt.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +86 -551
- package/lib/commonjs/components/typography/__test__/typography.test.js +6 -25
- package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +15 -37
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH1.js +27 -16
- package/lib/commonjs/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH2.js +28 -18
- package/lib/commonjs/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH3.js +26 -16
- package/lib/commonjs/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/commonjs/core/IOColors.js +19 -2
- package/lib/commonjs/core/IOColors.js.map +1 -1
- package/lib/commonjs/core/IOStyles.js +0 -1
- package/lib/commonjs/core/IOStyles.js.map +1 -1
- package/lib/commonjs/utils/accessibility.js +24 -1
- package/lib/commonjs/utils/accessibility.js.map +1 -1
- package/lib/commonjs/utils/fonts.js +72 -40
- package/lib/commonjs/utils/fonts.js.map +1 -1
- package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +8 -32
- package/lib/module/components/accordion/AccordionItem.js +3 -12
- package/lib/module/components/accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/alert/Alert.js +5 -18
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/badge/Badge.js +15 -23
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +16 -16
- package/lib/module/components/badge/__test__/badge.test.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +14 -38
- package/lib/module/components/buttons/ButtonLink.js +12 -26
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +15 -25
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +45 -60
- package/lib/module/components/featureInfo/FeatureInfo.js +7 -8
- package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/module/components/layout/HeaderSecondLevel.js +10 -15
- package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemAction.js +16 -54
- package/lib/module/components/listitems/ListItemAction.js.map +1 -1
- package/lib/module/components/listitems/ListItemAmount.js +2 -5
- package/lib/module/components/listitems/ListItemAmount.js.map +1 -1
- package/lib/module/components/listitems/ListItemSwitch.js +3 -3
- package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +83 -347
- package/lib/module/components/modules/ModuleIDP.js +15 -22
- package/lib/module/components/modules/ModuleIDP.js.map +1 -1
- package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +30 -150
- package/lib/module/components/searchInput/SearchInput.js +2 -4
- package/lib/module/components/searchInput/SearchInput.js.map +1 -1
- package/lib/module/components/switch/SwitchLabel.js +9 -31
- package/lib/module/components/switch/SwitchLabel.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +3 -2
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/tag/Tag.js +16 -20
- package/lib/module/components/tag/Tag.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +4 -6
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/components/typography/BaseTypography.js +5 -1
- package/lib/module/components/typography/BaseTypography.js.map +1 -1
- package/lib/module/components/typography/Body.js +31 -22
- package/lib/module/components/typography/Body.js.map +1 -1
- package/lib/module/components/typography/BodyMonospace.js +25 -23
- package/lib/module/components/typography/BodyMonospace.js.map +1 -1
- package/lib/module/components/typography/ButtonText.js +24 -19
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/components/typography/Caption.js +28 -19
- package/lib/module/components/typography/Caption.js.map +1 -1
- package/lib/module/components/typography/Chip.js +23 -21
- package/lib/module/components/typography/Chip.js.map +1 -1
- package/lib/module/components/typography/Factory.js +1 -0
- package/lib/module/components/typography/Factory.js.map +1 -1
- package/lib/module/components/typography/H1.js +26 -20
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +26 -20
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +26 -19
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +26 -21
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H5.js +24 -21
- package/lib/module/components/typography/H5.js.map +1 -1
- package/lib/module/components/typography/H6.js +24 -21
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +24 -17
- package/lib/module/components/typography/Hero.js.map +1 -1
- package/lib/module/components/typography/IOText.js +96 -0
- package/lib/module/components/typography/IOText.js.map +1 -0
- package/lib/module/components/typography/Label.js +27 -26
- package/lib/module/components/typography/Label.js.map +1 -1
- package/lib/module/components/typography/LabelMini.js +36 -0
- package/lib/module/components/typography/LabelMini.js.map +1 -0
- package/lib/module/components/typography/LabelSmall.js +29 -30
- package/lib/module/components/typography/LabelSmall.js.map +1 -1
- package/lib/module/components/typography/LabelSmallAlt.js +24 -20
- package/lib/module/components/typography/LabelSmallAlt.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +86 -551
- package/lib/module/components/typography/__test__/typography.test.js +6 -25
- package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/module/components/typography/index.js +2 -4
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH1.js +25 -15
- package/lib/module/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH2.js +26 -17
- package/lib/module/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH3.js +24 -15
- package/lib/module/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/module/core/IOColors.js +17 -1
- package/lib/module/core/IOColors.js.map +1 -1
- package/lib/module/core/IOStyles.js +0 -1
- package/lib/module/core/IOStyles.js.map +1 -1
- package/lib/module/utils/accessibility.js +22 -0
- package/lib/module/utils/accessibility.js.map +1 -1
- package/lib/module/utils/fonts.js +70 -36
- package/lib/module/utils/fonts.js.map +1 -1
- package/lib/typescript/components/accordion/AccordionItem.d.ts.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/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts +6 -5
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemAction.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemAmount.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleIDP.d.ts.map +1 -1
- package/lib/typescript/components/switch/SwitchLabel.d.ts.map +1 -1
- package/lib/typescript/components/tabs/TabItem.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/BaseTypography.d.ts +3 -2
- package/lib/typescript/components/typography/BaseTypography.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts +5 -10
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodyMonospace.d.ts +7 -7
- package/lib/typescript/components/typography/BodyMonospace.d.ts.map +1 -1
- package/lib/typescript/components/typography/ButtonText.d.ts +9 -10
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/components/typography/Caption.d.ts +9 -5
- package/lib/typescript/components/typography/Caption.d.ts.map +1 -1
- package/lib/typescript/components/typography/Chip.d.ts +7 -7
- package/lib/typescript/components/typography/Chip.d.ts.map +1 -1
- package/lib/typescript/components/typography/Factory.d.ts +1 -0
- package/lib/typescript/components/typography/Factory.d.ts.map +1 -1
- package/lib/typescript/components/typography/H1.d.ts +9 -8
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H2.d.ts +9 -8
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +9 -8
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H4.d.ts +9 -8
- package/lib/typescript/components/typography/H4.d.ts.map +1 -1
- package/lib/typescript/components/typography/H5.d.ts +9 -5
- package/lib/typescript/components/typography/H5.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts +9 -10
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/Hero.d.ts +9 -8
- package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
- package/lib/typescript/components/typography/IOText.d.ts +54 -0
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -0
- package/lib/typescript/components/typography/Label.d.ts +6 -10
- package/lib/typescript/components/typography/Label.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts +13 -0
- package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -0
- package/lib/typescript/components/typography/LabelSmall.d.ts +5 -11
- package/lib/typescript/components/typography/LabelSmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts +7 -10
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts.map +1 -1
- package/lib/typescript/components/typography/index.d.ts +2 -4
- package/lib/typescript/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH1.d.ts +9 -9
- package/lib/typescript/components/typography/markdown/MdH1.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH2.d.ts +9 -9
- package/lib/typescript/components/typography/markdown/MdH2.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH3.d.ts +9 -9
- package/lib/typescript/components/typography/markdown/MdH3.d.ts.map +1 -1
- package/lib/typescript/core/IOColors.d.ts +3 -20
- package/lib/typescript/core/IOColors.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +0 -3
- package/lib/typescript/core/IOStyles.d.ts.map +1 -1
- package/lib/typescript/utils/accessibility.d.ts +5 -0
- package/lib/typescript/utils/accessibility.d.ts.map +1 -1
- package/lib/typescript/utils/fonts.d.ts +17 -25
- package/lib/typescript/utils/fonts.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +8 -32
- package/src/components/accordion/AccordionItem.tsx +2 -14
- package/src/components/alert/Alert.tsx +5 -18
- package/src/components/badge/Badge.tsx +15 -28
- package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +16 -16
- package/src/components/badge/__test__/badge.test.tsx +2 -2
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +14 -38
- package/src/components/buttons/ButtonLink.tsx +12 -35
- package/src/components/buttons/ButtonOutline.tsx +14 -25
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +45 -60
- package/src/components/featureInfo/FeatureInfo.tsx +13 -13
- package/src/components/layout/HeaderSecondLevel.tsx +9 -18
- package/src/components/listitems/ListItemAction.tsx +13 -75
- package/src/components/listitems/ListItemAmount.tsx +2 -5
- package/src/components/listitems/ListItemSwitch.tsx +3 -3
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +83 -347
- package/src/components/modules/ModuleIDP.tsx +15 -32
- package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +30 -150
- package/src/components/searchInput/SearchInput.tsx +14 -6
- package/src/components/switch/SwitchLabel.tsx +6 -32
- package/src/components/tabs/TabItem.tsx +4 -2
- package/src/components/tag/Tag.tsx +22 -24
- package/src/components/textInput/TextInputBase.tsx +21 -8
- package/src/components/typography/BaseTypography.tsx +13 -4
- package/src/components/typography/Body.tsx +43 -38
- package/src/components/typography/BodyMonospace.tsx +24 -37
- package/src/components/typography/ButtonText.tsx +25 -35
- package/src/components/typography/Caption.tsx +31 -33
- package/src/components/typography/Chip.tsx +25 -37
- package/src/components/typography/Factory.tsx +1 -0
- package/src/components/typography/H1.tsx +31 -36
- package/src/components/typography/H2.tsx +31 -36
- package/src/components/typography/H3.tsx +30 -35
- package/src/components/typography/H4.tsx +31 -36
- package/src/components/typography/H5.tsx +26 -32
- package/src/components/typography/H6.tsx +30 -41
- package/src/components/typography/Hero.tsx +30 -33
- package/src/components/typography/IOText.tsx +157 -0
- package/src/components/typography/Label.tsx +41 -48
- package/src/components/typography/LabelMini.tsx +52 -0
- package/src/components/typography/LabelSmall.tsx +41 -63
- package/src/components/typography/LabelSmallAlt.tsx +28 -48
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +86 -551
- package/src/components/typography/__test__/typography.test.tsx +7 -31
- package/src/components/typography/index.tsx +2 -4
- package/src/components/typography/markdown/MdH1.tsx +26 -28
- package/src/components/typography/markdown/MdH2.tsx +27 -30
- package/src/components/typography/markdown/MdH3.tsx +25 -28
- package/src/core/IOColors.ts +31 -21
- package/src/core/IOStyles.ts +1 -5
- package/src/utils/accessibility.ts +31 -0
- package/src/utils/fonts.ts +93 -51
- package/lib/commonjs/components/typography/LabelHeader.js +0 -44
- package/lib/commonjs/components/typography/LabelHeader.js.map +0 -1
- package/lib/commonjs/components/typography/LabelLink.js +0 -44
- package/lib/commonjs/components/typography/LabelLink.js.map +0 -1
- package/lib/commonjs/components/typography/markdown/MdH4.js +0 -30
- package/lib/commonjs/components/typography/markdown/MdH4.js.map +0 -1
- package/lib/commonjs/components/typography/markdown/MdH5.js +0 -28
- package/lib/commonjs/components/typography/markdown/MdH5.js.map +0 -1
- package/lib/commonjs/components/typography/markdown/MdH6.js +0 -29
- package/lib/commonjs/components/typography/markdown/MdH6.js.map +0 -1
- package/lib/module/components/typography/LabelHeader.js +0 -33
- package/lib/module/components/typography/LabelHeader.js.map +0 -1
- package/lib/module/components/typography/LabelLink.js +0 -33
- package/lib/module/components/typography/LabelLink.js.map +0 -1
- package/lib/module/components/typography/markdown/MdH4.js +0 -23
- package/lib/module/components/typography/markdown/MdH4.js.map +0 -1
- package/lib/module/components/typography/markdown/MdH5.js +0 -21
- package/lib/module/components/typography/markdown/MdH5.js.map +0 -1
- package/lib/module/components/typography/markdown/MdH6.js +0 -22
- package/lib/module/components/typography/markdown/MdH6.js.map +0 -1
- package/lib/typescript/components/typography/LabelHeader.d.ts +0 -18
- package/lib/typescript/components/typography/LabelHeader.d.ts.map +0 -1
- package/lib/typescript/components/typography/LabelLink.d.ts +0 -20
- package/lib/typescript/components/typography/LabelLink.d.ts.map +0 -1
- package/lib/typescript/components/typography/markdown/MdH4.d.ts +0 -13
- package/lib/typescript/components/typography/markdown/MdH4.d.ts.map +0 -1
- package/lib/typescript/components/typography/markdown/MdH5.d.ts +0 -13
- package/lib/typescript/components/typography/markdown/MdH5.d.ts.map +0 -1
- package/lib/typescript/components/typography/markdown/MdH6.d.ts +0 -13
- package/lib/typescript/components/typography/markdown/MdH6.d.ts.map +0 -1
- package/src/components/typography/LabelHeader.tsx +0 -56
- package/src/components/typography/LabelLink.tsx +0 -61
- package/src/components/typography/markdown/MdH4.tsx +0 -34
- package/src/components/typography/markdown/MdH5.tsx +0 -32
- package/src/components/typography/markdown/MdH6.tsx +0 -33
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getAccessibleAmountText = void 0;
|
|
6
|
+
exports.useBoldTextEnabled = exports.getAccessibleAmountText = void 0;
|
|
7
7
|
var _function = require("fp-ts/lib/function");
|
|
8
8
|
var O = _interopRequireWildcard(require("fp-ts/lib/Option"));
|
|
9
9
|
var _i18nJs = _interopRequireDefault(require("i18n-js"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _reactNative = require("react-native");
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -15,5 +17,26 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
15
17
|
* with the correct minus symbol pronunciation.
|
|
16
18
|
*/
|
|
17
19
|
const getAccessibleAmountText = amount => (0, _function.pipe)(amount, O.fromNullable, O.map(amount => amount.replace("-", _i18nJs.default.t("global.accessibility.minusSymbol"))), O.getOrElseW(() => undefined));
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Query whether a bold text is currently enabled. The result is true
|
|
23
|
+
* when bold text is enabled and false otherwise.
|
|
24
|
+
*/
|
|
18
25
|
exports.getAccessibleAmountText = getAccessibleAmountText;
|
|
26
|
+
const useBoldTextEnabled = () => {
|
|
27
|
+
const [boldTextEnabled, setBoldTextEnabled] = (0, _react.useState)(false);
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
const boldTextChangedSubscription = _reactNative.AccessibilityInfo.addEventListener("boldTextChanged", isBoldTextEnabled => {
|
|
30
|
+
setBoldTextEnabled(isBoldTextEnabled);
|
|
31
|
+
});
|
|
32
|
+
_reactNative.AccessibilityInfo.isBoldTextEnabled().then(isBoldTextEnabled => {
|
|
33
|
+
setBoldTextEnabled(isBoldTextEnabled);
|
|
34
|
+
}).catch(_ => false);
|
|
35
|
+
return () => {
|
|
36
|
+
boldTextChangedSubscription.remove();
|
|
37
|
+
};
|
|
38
|
+
}, []);
|
|
39
|
+
return boldTextEnabled;
|
|
40
|
+
};
|
|
41
|
+
exports.useBoldTextEnabled = useBoldTextEnabled;
|
|
19
42
|
//# sourceMappingURL=accessibility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_function","require","O","_interopRequireWildcard","_i18nJs","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getAccessibleAmountText","amount","pipe","fromNullable","map","replace","I18n","t","getOrElseW","undefined","exports"],"sourceRoot":"../../../src","sources":["utils/accessibility.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;
|
|
1
|
+
{"version":3,"names":["_function","require","O","_interopRequireWildcard","_i18nJs","_interopRequireDefault","_react","_reactNative","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getAccessibleAmountText","amount","pipe","fromNullable","map","replace","I18n","t","getOrElseW","undefined","exports","useBoldTextEnabled","boldTextEnabled","setBoldTextEnabled","useState","useEffect","boldTextChangedSubscription","AccessibilityInfo","addEventListener","isBoldTextEnabled","then","catch","_","remove"],"sourceRoot":"../../../src","sources":["utils/accessibility.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAAiD,SAAAI,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAK,GAAA,EA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AAA,GAAAA,uBAAA;AAIO,MAAMW,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAE7D,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,2BAA2B,GAAGC,8BAAiB,CAACC,gBAAgB,CACpE,iBAAiB,EACjBC,iBAAiB,IAAI;MACnBN,kBAAkB,CAACM,iBAAiB,CAAC;IACvC,CACF,CAAC;IAEDF,8BAAiB,CAACE,iBAAiB,CAAC,CAAC,CAClCC,IAAI,CAACD,iBAAiB,IAAI;MACzBN,kBAAkB,CAACM,iBAAiB,CAAC;IACvC,CAAC,CAAC,CACDE,KAAK,CAACC,CAAC,IAAI,KAAK,CAAC;IAEpB,OAAO,MAAM;MACXN,2BAA2B,CAACO,MAAM,CAAC,CAAC;IACtC,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOX,eAAe;AACxB,CAAC;AAACF,OAAA,CAAAC,kBAAA,GAAAA,kBAAA"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.makeFontStyleObject = exports.makeFontFamilyName = exports.
|
|
6
|
+
exports.makeFontStyleObject = exports.makeFontFamilyName = exports.fontWeights = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
/**
|
|
9
9
|
* Utility functions to manage font properties to style mapping for both iOS and Android
|
|
@@ -18,19 +18,32 @@ const fonts = {
|
|
|
18
18
|
TitilliumSansPro: _reactNative.Platform.select({
|
|
19
19
|
android: "TitilliumSansPro",
|
|
20
20
|
web: "TitilliumSansPro",
|
|
21
|
-
ios: "Titillium Sans Pro"
|
|
21
|
+
ios: "Titillium Sans Pro",
|
|
22
|
+
default: "TitilliumSansPro"
|
|
22
23
|
}),
|
|
23
24
|
ReadexPro: _reactNative.Platform.select({
|
|
24
25
|
android: "ReadexPro",
|
|
25
26
|
web: "ReadexPro",
|
|
26
|
-
ios: "Readex Pro"
|
|
27
|
+
ios: "Readex Pro",
|
|
28
|
+
default: "ReadexPro"
|
|
27
29
|
}),
|
|
28
30
|
DMMono: _reactNative.Platform.select({
|
|
29
31
|
android: "DMMono",
|
|
30
32
|
web: "DMMono",
|
|
31
|
-
ios: "DM Mono"
|
|
33
|
+
ios: "DM Mono",
|
|
34
|
+
default: "DMMono"
|
|
32
35
|
})
|
|
33
36
|
};
|
|
37
|
+
/*
|
|
38
|
+
* Font Sizes
|
|
39
|
+
*/
|
|
40
|
+
const fontSizes = [12, 14, 16, 20, 22, 26, 28, 32];
|
|
41
|
+
const fontSizesLegacy = [18, 28, 31, 35];
|
|
42
|
+
const allFontSizes = [...new Set([...fontSizes, ...fontSizesLegacy])];
|
|
43
|
+
/*
|
|
44
|
+
* Font Weights
|
|
45
|
+
*/
|
|
46
|
+
|
|
34
47
|
const weights = ["Light", "Regular", "Medium", "Semibold", "Bold"];
|
|
35
48
|
const weightValues = ["300", "400", "500", "600", "700"];
|
|
36
49
|
/**
|
|
@@ -45,68 +58,87 @@ const fontWeights = {
|
|
|
45
58
|
Bold: "700"
|
|
46
59
|
};
|
|
47
60
|
exports.fontWeights = fontWeights;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Bold: "700"
|
|
61
|
+
/* Function that, given a certain weight, returns the next
|
|
62
|
+
available `FontWeight` value.
|
|
63
|
+
For example, if I set it to `Regular`, the function
|
|
64
|
+
should return `Medium`, and so on. If I set it to the last `FontWeight`
|
|
65
|
+
value, the function will return the same value.
|
|
66
|
+
*/
|
|
67
|
+
const getBolderFontWeight = weight => {
|
|
68
|
+
const currentWeight = weights.indexOf(weight);
|
|
69
|
+
return currentWeight === weights.length - 1 ? weight : weights[currentWeight + 1];
|
|
58
70
|
};
|
|
59
|
-
|
|
60
|
-
let FontStyle = /*#__PURE__*/function (FontStyle) {
|
|
61
|
-
FontStyle["normal"] = "normal";
|
|
62
|
-
FontStyle["italic"] = "italic";
|
|
63
|
-
return FontStyle;
|
|
64
|
-
}({});
|
|
65
|
-
exports.FontStyle = FontStyle;
|
|
71
|
+
|
|
66
72
|
/**
|
|
67
73
|
* Get the correct `fontFamily` name on both Android and iOS.
|
|
68
74
|
* @param font
|
|
69
75
|
* @param weight
|
|
70
76
|
* @param isItalic
|
|
71
77
|
*/
|
|
72
|
-
const makeFontFamilyName = function (font
|
|
73
|
-
let
|
|
78
|
+
const makeFontFamilyName = function (font) {
|
|
79
|
+
let weight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultWeight;
|
|
80
|
+
let fontStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "normal";
|
|
74
81
|
return _reactNative.Platform.select({
|
|
75
82
|
web: fonts[font],
|
|
76
|
-
android: `${fonts[font]}-${weight || "Regular"}${
|
|
83
|
+
android: `${fonts[font]}-${weight || "Regular"}${fontStyle === "italic" ? "Italic" : ""}`,
|
|
77
84
|
ios: fonts[font],
|
|
78
|
-
default:
|
|
85
|
+
default: fonts[font]
|
|
79
86
|
});
|
|
80
87
|
};
|
|
81
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Default `IOText` typography style
|
|
91
|
+
*/
|
|
92
|
+
exports.makeFontFamilyName = makeFontFamilyName;
|
|
93
|
+
const defaultFont = "TitilliumSansPro";
|
|
94
|
+
const defaultWeight = "Regular";
|
|
95
|
+
const defaultFontSize = 16;
|
|
96
|
+
|
|
82
97
|
/**
|
|
83
98
|
* Return a {@link FontStyleObject} with the fields filled based on the platform (iOS or Android).
|
|
84
|
-
* @param
|
|
85
|
-
* @param isItalic
|
|
99
|
+
* @param size
|
|
86
100
|
* @param font
|
|
101
|
+
* @param weight
|
|
102
|
+
* @param fontStyle
|
|
87
103
|
*/
|
|
88
|
-
|
|
104
|
+
|
|
89
105
|
const makeFontStyleObject = function () {
|
|
90
|
-
let
|
|
91
|
-
let
|
|
92
|
-
let
|
|
106
|
+
let size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultFontSize;
|
|
107
|
+
let font = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultFont;
|
|
108
|
+
let lineHeight = arguments.length > 2 ? arguments[2] : undefined;
|
|
109
|
+
let weight = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : defaultWeight;
|
|
110
|
+
let fontStyle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "normal";
|
|
111
|
+
let boldEnabled = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
112
|
+
/* If bold text is currently enabled, we select the next
|
|
113
|
+
available `IOFontWeight` value */
|
|
114
|
+
const dynamicWeight = boldEnabled ? getBolderFontWeight(weight) : weight;
|
|
93
115
|
return _reactNative.Platform.select({
|
|
94
116
|
web: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
117
|
+
fontSize: size,
|
|
118
|
+
fontFamily: makeFontFamilyName(font, dynamicWeight, fontStyle),
|
|
119
|
+
fontWeight: fontWeights[dynamicWeight],
|
|
120
|
+
lineHeight,
|
|
121
|
+
fontStyle
|
|
98
122
|
},
|
|
123
|
+
// On Android other type attributes, like `fontWeight` or `fontStyle`
|
|
124
|
+
// are directly managed through the `fontFamily` name, so we dont' need to
|
|
125
|
+
// include them in the object.
|
|
99
126
|
android: {
|
|
100
|
-
|
|
101
|
-
fontFamily: makeFontFamilyName(font,
|
|
127
|
+
fontSize: size,
|
|
128
|
+
fontFamily: makeFontFamilyName(font, dynamicWeight, fontStyle),
|
|
129
|
+
lineHeight,
|
|
130
|
+
includeFontPadding: false
|
|
102
131
|
},
|
|
103
132
|
ios: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
133
|
+
fontSize: size,
|
|
134
|
+
fontFamily: makeFontFamilyName(font, dynamicWeight, fontStyle),
|
|
135
|
+
fontWeight: fontWeights[dynamicWeight],
|
|
136
|
+
lineHeight,
|
|
137
|
+
fontStyle
|
|
107
138
|
},
|
|
108
139
|
default: {
|
|
109
|
-
|
|
140
|
+
fontSize: size,
|
|
141
|
+
fontFamily: makeFontFamilyName(font, dynamicWeight, fontStyle)
|
|
110
142
|
}
|
|
111
143
|
});
|
|
112
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","fonts","TitilliumSansPro","Platform","select","android","web","ios","ReadexPro","DMMono","weights","weightValues","fontWeights","Light","Regular","Medium","Semibold","Bold","exports","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","fonts","TitilliumSansPro","Platform","select","android","web","ios","default","ReadexPro","DMMono","fontSizes","fontSizesLegacy","allFontSizes","Set","weights","weightValues","fontWeights","Light","Regular","Medium","Semibold","Bold","exports","getBolderFontWeight","weight","currentWeight","indexOf","length","makeFontFamilyName","font","arguments","undefined","defaultWeight","fontStyle","defaultFont","defaultFontSize","makeFontStyleObject","size","lineHeight","boldEnabled","dynamicWeight","fontSize","fontFamily","fontWeight","includeFontPadding"],"sourceRoot":"../../../src","sources":["utils/fonts.ts"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AANA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA,MAAMC,KAA6B,GAAG;EACpCC,gBAAgB,EAAEC,qBAAQ,CAACC,MAAM,CAAC;IAChCC,OAAO,EAAE,kBAAkB;IAC3BC,GAAG,EAAE,kBAAkB;IACvBC,GAAG,EAAE,oBAAoB;IACzBC,OAAO,EAAE;EACX,CAAC,CAAC;EACFC,SAAS,EAAEN,qBAAQ,CAACC,MAAM,CAAC;IACzBC,OAAO,EAAE,WAAW;IACpBC,GAAG,EAAE,WAAW;IAChBC,GAAG,EAAE,YAAY;IACjBC,OAAO,EAAE;EACX,CAAC,CAAC;EACFE,MAAM,EAAEP,qBAAQ,CAACC,MAAM,CAAC;IACtBC,OAAO,EAAE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AoB,GAAAT,SAAA,CAAAH,MAAA,QAAAG,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAG,KAAK;EAE5B;AACF;EACE,MAAMU,aAAa,GAAGD,WAAW,GAAGhB,mBAAmB,CAACC,MAAM,CAAC,GAAGA,MAAM;EAExE,OAAOtB,qBAAQ,CAACC,MAAM,CAAC;IACrBE,GAAG,EAAE;MACHoC,QAAQ,EAAEJ,IAAI;MACdK,UAAU,EAAEd,kBAAkB,CAACC,IAAI,EAAEW,aAAa,EAAEP,SAAS,CAAC;MAC9DU,UAAU,EAAE3B,WAAW,CAACwB,aAAa,CAAC;MACtCF,UAAU;MACVL;IACF,CAAC;IACD;IACA;IACA;IACA7B,OAAO,EAAE;MACPqC,QAAQ,EAAEJ,IAAI;MACdK,UAAU,EAAEd,kBAAkB,CAACC,IAAI,EAAEW,aAAa,EAAEP,SAAS,CAAC;MAC9DK,UAAU;MACVM,kBAAkB,EAAE;IACtB,CAAC;IACDtC,GAAG,EAAE;MACHmC,QAAQ,EAAEJ,IAAI;MACdK,UAAU,EAAEd,kBAAkB,CAACC,IAAI,EAAEW,aAAa,EAAEP,SAAS,CAAC;MAC9DU,UAAU,EAAE3B,WAAW,CAACwB,aAAa,CAAC;MACtCF,UAAU;MACVL;IACF,CAAC;IACD1B,OAAO,EAAE;MACPkC,QAAQ,EAAEJ,IAAI;MACdK,UAAU,EAAEd,kBAAkB,CAACC,IAAI,EAAEW,aAAa,EAAEP,SAAS;IAC/D;EACF,CAAC,CAAC;AACJ,CAAC;AAACX,OAAA,CAAAc,mBAAA,GAAAA,mBAAA"}
|
|
@@ -85,33 +85,21 @@ exports[`Test Advice Components - Experimental Enabled Advice Snapshot 1`] = `
|
|
|
85
85
|
/>
|
|
86
86
|
<Text
|
|
87
87
|
allowFontScaling={true}
|
|
88
|
-
color="bluegrey"
|
|
89
|
-
defaultColor="bluegrey"
|
|
90
|
-
defaultWeight="Regular"
|
|
91
88
|
dynamicTypeRamp="body"
|
|
92
|
-
font="TitilliumSansPro"
|
|
93
|
-
fontStyle={
|
|
94
|
-
{
|
|
95
|
-
"fontSize": 16,
|
|
96
|
-
"lineHeight": 24,
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
89
|
maxFontSizeMultiplier={1.25}
|
|
100
90
|
style={
|
|
101
91
|
[
|
|
92
|
+
{},
|
|
102
93
|
{
|
|
103
|
-
"
|
|
104
|
-
"lineHeight": 24,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"color": "#475A6D",
|
|
94
|
+
"color": "#555C70",
|
|
108
95
|
"fontFamily": "Titillium Sans Pro",
|
|
96
|
+
"fontSize": 16,
|
|
109
97
|
"fontStyle": "normal",
|
|
110
98
|
"fontWeight": "400",
|
|
99
|
+
"lineHeight": 24,
|
|
111
100
|
},
|
|
112
101
|
]
|
|
113
102
|
}
|
|
114
|
-
weight="Regular"
|
|
115
103
|
>
|
|
116
104
|
Text
|
|
117
105
|
</Text>
|
|
@@ -203,33 +191,21 @@ exports[`Test Advice Components Advice Snapshot 1`] = `
|
|
|
203
191
|
/>
|
|
204
192
|
<Text
|
|
205
193
|
allowFontScaling={false}
|
|
206
|
-
color="bluegrey"
|
|
207
|
-
defaultColor="bluegrey"
|
|
208
|
-
defaultWeight="Regular"
|
|
209
194
|
dynamicTypeRamp="body"
|
|
210
|
-
font="TitilliumSansPro"
|
|
211
|
-
fontStyle={
|
|
212
|
-
{
|
|
213
|
-
"fontSize": 16,
|
|
214
|
-
"lineHeight": 24,
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
195
|
maxFontSizeMultiplier={1.25}
|
|
218
196
|
style={
|
|
219
197
|
[
|
|
198
|
+
{},
|
|
220
199
|
{
|
|
221
|
-
"
|
|
222
|
-
"lineHeight": 24,
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"color": "#475A6D",
|
|
200
|
+
"color": "#555C70",
|
|
226
201
|
"fontFamily": "Titillium Sans Pro",
|
|
202
|
+
"fontSize": 16,
|
|
227
203
|
"fontStyle": "normal",
|
|
228
204
|
"fontWeight": "400",
|
|
205
|
+
"lineHeight": 24,
|
|
229
206
|
},
|
|
230
207
|
]
|
|
231
208
|
}
|
|
232
|
-
weight="Regular"
|
|
233
209
|
>
|
|
234
210
|
Text
|
|
235
211
|
</Text>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { StyleSheet,
|
|
2
|
+
import { StyleSheet, TouchableWithoutFeedback, View } from "react-native";
|
|
3
3
|
import LinearGradient from "react-native-linear-gradient";
|
|
4
4
|
import Animated, { useAnimatedStyle, withSpring } from "react-native-reanimated";
|
|
5
5
|
import { IOAccordionRadius, IOStyles, useIOTheme } from "../../core";
|
|
6
6
|
import { IOSpringValues } from "../../core/IOAnimations";
|
|
7
7
|
import { IOColors, hexToRgba } from "../../core/IOColors";
|
|
8
|
-
import { makeFontStyleObject } from "../../utils/fonts";
|
|
9
8
|
import { Icon } from "../icons/Icon";
|
|
10
|
-
import { H6 } from "../typography";
|
|
9
|
+
import { Body, H6 } from "../typography";
|
|
11
10
|
const accordionBodySpacing = 16;
|
|
12
11
|
const accordionIconMargin = 12;
|
|
13
12
|
const accordionChevronMargin = 8;
|
|
@@ -107,9 +106,7 @@ export const AccordionItem = _ref2 => {
|
|
|
107
106
|
color: theme["interactiveElem-default"]
|
|
108
107
|
})))), /*#__PURE__*/React.createElement(AccordionBody, {
|
|
109
108
|
expanded: expanded
|
|
110
|
-
}, typeof body === "string" ? /*#__PURE__*/React.createElement(
|
|
111
|
-
style: styles.accordionBodyText
|
|
112
|
-
}, body) : body), /*#__PURE__*/React.createElement(LinearGradient, {
|
|
109
|
+
}, typeof body === "string" ? /*#__PURE__*/React.createElement(Body, null, body) : body), /*#__PURE__*/React.createElement(LinearGradient, {
|
|
113
110
|
style: {
|
|
114
111
|
height: accordionBodySpacing,
|
|
115
112
|
position: "absolute",
|
|
@@ -136,12 +133,6 @@ const styles = StyleSheet.create({
|
|
|
136
133
|
padding: accordionBodySpacing,
|
|
137
134
|
paddingTop: 0
|
|
138
135
|
},
|
|
139
|
-
accordionBodyText: {
|
|
140
|
-
fontSize: 14,
|
|
141
|
-
lineHeight: 21,
|
|
142
|
-
color: IOColors["grey-700"],
|
|
143
|
-
...makeFontStyleObject("Regular", undefined, "TitilliumSansPro")
|
|
144
|
-
},
|
|
145
136
|
textContainer: {
|
|
146
137
|
padding: accordionBodySpacing,
|
|
147
138
|
flexDirection: "row",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","useState","StyleSheet","TouchableWithoutFeedback","View","LinearGradient","Animated","useAnimatedStyle","withSpring","IOAccordionRadius","IOStyles","useIOTheme","IOSpringValues","IOColors","hexToRgba","Icon","Body","H6","accordionBodySpacing","accordionIconMargin","accordionChevronMargin","iconSize","AccordionBody","_ref","children","expanded","height","setHeight","onLayout","event","onLayoutHeight","nativeEvent","layout","animatedHeightStyle","accordion","createElement","style","styles","accordionCollapsableContainer","accordionBodyContainer","AccordionItem","_ref2","title","accessibilityLabel","body","icon","theme","setExpanded","accordionBackground","accordionBorder","accordionIconColor","onItemPress","animatedChevron","transform","rotate","accordionWrapper","backgroundColor","borderColor","accessible","accessibilityRole","accessibilityState","onPress","textContainer","row","alignCenter","flexShrink","marginRight","name","size","color","accessibilityElementsHidden","importantForAccessibility","position","bottom","left","right","colors","create","borderWidth","borderRadius","borderCurve","overflow","padding","paddingTop","flexDirection","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["components/accordion/AccordionItem.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAEEC,UAAU,EACVC,wBAAwB,EACxBC,IAAI,QACC,cAAc;AACrB,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,UAAU,QACL,yBAAyB;AAChC,SACEC,iBAAiB,EACjBC,QAAQ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C,GAAGA,IACrC,CAAC,eAGhB5C,KAAA,CAAAmC,aAAA,CAAC9B,cAAc;IACb+B,KAAK,EAAE;MACLV,MAAM,EAAER,oBAAoB;MAC5BsD,QAAQ,EAAE,UAAU;MACpB;MACAC,MAAM,EAAE,CAAC;MACT;MACAC,IAAI,EAAExD,oBAAoB;MAC1ByD,KAAK,EAAEzD;IACT,CAAE;IACF0D,MAAM,EAAE,CACN9D,SAAS,CAACD,QAAQ,CAACmC,mBAAmB,CAAC,EAAE,CAAC,CAAC,EAC3CnC,QAAQ,CAACmC,mBAAmB,CAAC;EAC7B,CACH,CACG,CAAC;AAEX,CAAC;AAED,MAAMX,MAAM,GAAGnC,UAAU,CAAC2E,MAAM,CAAC;EAC/BtB,gBAAgB,EAAE;IAChBuB,WAAW,EAAE,CAAC;IACdC,YAAY,EAAEtE,iBAAiB;IAC/BuE,WAAW,EAAE;EACf,CAAC;EACD1C,6BAA6B,EAAE;IAC7B2C,QAAQ,EAAE;EACZ,CAAC;EACD1C,sBAAsB,EAAE;IACtBiC,QAAQ,EAAE,UAAU;IACpBU,OAAO,EAAEhE,oBAAoB;IAC7BiE,UAAU,EAAE;EACd,CAAC;EACDrB,aAAa,EAAE;IACboB,OAAO,EAAEhE,oBAAoB;IAC7BkE,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
|
-
import { PixelRatio, Pressable, StyleSheet,
|
|
2
|
+
import { PixelRatio, Pressable, StyleSheet, View } from "react-native";
|
|
3
3
|
import Animated, { Extrapolate, interpolate, useAnimatedStyle, useDerivedValue, useSharedValue, withSpring } from "react-native-reanimated";
|
|
4
|
-
import { IOVisualCostants
|
|
4
|
+
import { IOVisualCostants } from "../../core";
|
|
5
5
|
import { IOScaleValues, IOSpringValues } from "../../core/IOAnimations";
|
|
6
6
|
import { IOColors } from "../../core/IOColors";
|
|
7
7
|
import { IOAlertRadius } from "../../core/IOShapes";
|
|
8
8
|
import { IOAlertSpacing } from "../../core/IOSpacing";
|
|
9
|
-
import { makeFontStyleObject } from "../../utils/fonts";
|
|
10
9
|
import { Icon } from "../icons";
|
|
11
10
|
import { VSpacer } from "../spacer";
|
|
11
|
+
import { ButtonText } from "../typography";
|
|
12
12
|
import { H4 } from "../typography/H4";
|
|
13
13
|
import { Label } from "../typography/Label";
|
|
14
14
|
const iconSize = 24;
|
|
@@ -26,14 +26,6 @@ const styles = StyleSheet.create({
|
|
|
26
26
|
},
|
|
27
27
|
spacingFullWidth: {
|
|
28
28
|
padding: spacingFullWidth
|
|
29
|
-
},
|
|
30
|
-
label: {
|
|
31
|
-
fontSize: 16,
|
|
32
|
-
...makeFontStyleObject("Regular", false, "ReadexPro")
|
|
33
|
-
},
|
|
34
|
-
labelLegacy: {
|
|
35
|
-
fontSize: 16,
|
|
36
|
-
...makeFontStyleObject("Bold", false, "TitilliumSansPro")
|
|
37
29
|
}
|
|
38
30
|
});
|
|
39
31
|
// COMPONENT CONFIGURATION
|
|
@@ -73,9 +65,6 @@ export const Alert = /*#__PURE__*/React.forwardRef((_ref, viewRef) => {
|
|
|
73
65
|
testID
|
|
74
66
|
} = _ref;
|
|
75
67
|
const isPressed = useSharedValue(0);
|
|
76
|
-
const {
|
|
77
|
-
isExperimental
|
|
78
|
-
} = useIOExperimentalDesign();
|
|
79
68
|
|
|
80
69
|
// Scaling transformation applied when the button is pressed
|
|
81
70
|
const animationScaleValue = IOScaleValues === null || IOScaleValues === void 0 || (_IOScaleValues$magnif = IOScaleValues.magnifiedButton) === null || _IOScaleValues$magnif === void 0 ? void 0 : _IOScaleValues$magnif.pressedState;
|
|
@@ -126,10 +115,8 @@ export const Alert = /*#__PURE__*/React.forwardRef((_ref, viewRef) => {
|
|
|
126
115
|
accessibilityRole: "text"
|
|
127
116
|
}, content), action && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VSpacer, {
|
|
128
117
|
size: 8
|
|
129
|
-
}), /*#__PURE__*/React.createElement(
|
|
130
|
-
|
|
131
|
-
color: IOColors[mapVariantStates[variant].foreground]
|
|
132
|
-
}],
|
|
118
|
+
}), /*#__PURE__*/React.createElement(ButtonText, {
|
|
119
|
+
color: mapVariantStates[variant].foreground,
|
|
133
120
|
numberOfLines: 1,
|
|
134
121
|
ellipsizeMode: "tail"
|
|
135
122
|
}, action))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","PixelRatio","Pressable","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","useCallback","PixelRatio","Pressable","StyleSheet","View","Animated","Extrapolate","interpolate","useAnimatedStyle","useDerivedValue","useSharedValue","withSpring","IOVisualCostants","IOScaleValues","IOSpringValues","IOColors","IOAlertRadius","IOAlertSpacing","Icon","VSpacer","ButtonText","H4","Label","iconSize","spacingDefault","spacingFullWidth","styles","create","container","flexDirection","alignItems","alignContent","padding","borderRadius","borderCurve","mapVariantStates","error","icon","background","foreground","warning","info","success","Alert","forwardRef","_ref","viewRef","_IOScaleValues$magnif","variant","title","content","action","onPress","fullWidth","accessibilityHint","testID","isPressed","animationScaleValue","magnifiedButton","pressedState","progressPressed","value","button","pressedAnimationStyle","scale","CLAMP","transform","onPressIn","onPressOut","renderMainBlock","createElement","Fragment","style","marginRight","iconMargin","name","size","color","marginTop","getFontScale","marginBottom","flex","weight","accessibilityRole","numberOfLines","ellipsizeMode","StaticComponent","ref","backgroundColor","accessible","PressableButton","onTouchEnd"],"sourceRoot":"../../../../src","sources":["components/alert/Alert.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAEEC,UAAU,EACVC,SAAS,EACTC,UAAU,EACVC,IAAI,QACC,cAAc;AACrB,OAAOC,QAAQ,IACbC,WAAW,EACXC,WAAW,EACXC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,EACdC,UAAU,Q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AIU,qBAAqB;EACnC,GAEDM,eAAe,CAAC,CACJ,CACN,CACZ;EAED,OAAOlB,MAAM,gBAAGpD,KAAA,CAAAuE,aAAA,CAACoB,eAAe,MAAE,CAAC,gBAAG3F,KAAA,CAAAuE,aAAA,CAACgB,eAAe,MAAE,CAAC;AAC3D,CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Platform, StyleSheet,
|
|
3
|
-
import { IOBadgeHSpacing, IOBadgeRadius, IOBadgeVSpacing, IOColors,
|
|
4
|
-
import {
|
|
2
|
+
import { Platform, StyleSheet, View } from "react-native";
|
|
3
|
+
import { IOBadgeHSpacing, IOBadgeRadius, IOBadgeVSpacing, IOColors, useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
+
import { IOText } from "../typography";
|
|
5
5
|
const styles = StyleSheet.create({
|
|
6
6
|
badge: {
|
|
7
7
|
flexDirection: "row",
|
|
@@ -16,20 +16,6 @@ const styles = StyleSheet.create({
|
|
|
16
16
|
borderRadius: IOBadgeRadius,
|
|
17
17
|
paddingHorizontal: IOBadgeHSpacing,
|
|
18
18
|
paddingVertical: IOBadgeVSpacing
|
|
19
|
-
},
|
|
20
|
-
label: {
|
|
21
|
-
fontSize: 12,
|
|
22
|
-
lineHeight: 16,
|
|
23
|
-
alignSelf: "center",
|
|
24
|
-
textTransform: "uppercase",
|
|
25
|
-
flexShrink: 1
|
|
26
|
-
},
|
|
27
|
-
labelFont: {
|
|
28
|
-
...makeFontStyleObject("Regular", false, "ReadexPro")
|
|
29
|
-
},
|
|
30
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
31
|
-
legacyLabelFont: {
|
|
32
|
-
...makeFontStyleObject("Semibold", false, "TitilliumSansPro")
|
|
33
19
|
}
|
|
34
20
|
});
|
|
35
21
|
|
|
@@ -133,14 +119,20 @@ export const Badge = _ref => {
|
|
|
133
119
|
} : {
|
|
134
120
|
backgroundColor: background ? IOColors[background] : undefined
|
|
135
121
|
}]
|
|
136
|
-
}, /*#__PURE__*/React.createElement(
|
|
122
|
+
}, /*#__PURE__*/React.createElement(IOText, {
|
|
123
|
+
font: isExperimental ? "ReadexPro" : "TitilliumSansPro",
|
|
124
|
+
weight: isExperimental ? "Regular" : "Semibold",
|
|
125
|
+
size: 12,
|
|
126
|
+
lineHeight: 16,
|
|
127
|
+
color: foreground,
|
|
137
128
|
numberOfLines: 1,
|
|
138
129
|
ellipsizeMode: "tail",
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
130
|
+
style: {
|
|
131
|
+
alignSelf: "center",
|
|
132
|
+
textTransform: "uppercase",
|
|
133
|
+
letterSpacing: 0.5,
|
|
134
|
+
flexShrink: 1
|
|
135
|
+
}
|
|
144
136
|
}, text));
|
|
145
137
|
};
|
|
146
138
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","Platform","StyleSheet","View","IOBadgeHSpacing","IOBadgeRadius","IOBadgeVSpacing","IOColors","useIOExperimentalDesign","useIOTheme","IOText","styles","create","badge","flexDirection","alignItems","justifyContent","select","android","textAlignVertical","borderCurve","borderRadius","paddingHorizontal","paddingVertical","Badge","_ref","text","outline","variant","testID","isExperimental","theme","mapVariants","default","foreground","background","info","warning","success","error","purple","lightBlue","blue","turquoise","contrast","mapOutlineVariants","createElement","style","borderWidth","borderColor","backgroundColor","undefined","font","weight","size","lineHeight","color","numberOfLines","ellipsizeMode","alignSelf","textTransform","letterSpacing","flexShrink"],"sourceRoot":"../../../../src","sources":["components/badge/Badge.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzD,SACEC,eAAe,EACfC,aAAa,EACbC,eAAe,EACfC,QAAQ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