@pagopa/io-app-design-system 1.42.0 → 2.0.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +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 +92 -557
- 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 +92 -557
- 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 +19 -23
- 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 +92 -557
- 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 +94 -50
- 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
|
@@ -1,58 +1,51 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
+
import { useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontWeight } from "../../utils/fonts";
|
|
3
5
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "
|
|
9
|
-
import { FontFamily, IOFontWeight } from "../../utils/fonts";
|
|
10
|
-
import { useTypographyFactory } from "./Factory";
|
|
11
|
-
import {
|
|
12
|
-
ExternalTypographyProps,
|
|
13
|
-
FontSize,
|
|
14
|
-
TypographyProps,
|
|
15
|
-
fontSizeMapping,
|
|
16
|
-
lineHeightMapping
|
|
17
|
-
} from "./common";
|
|
18
|
-
|
|
19
|
-
type PartialAllowedColors = Extract<IOColors, "black" | "white" | "grey-700">;
|
|
20
|
-
type AllowedColors = PartialAllowedColors | IOColorsStatusForeground;
|
|
21
|
-
type AllowedWeight = Extract<IOFontWeight, "Bold" | "Regular" | "Semibold">;
|
|
22
|
-
type LabelProps = ExternalTypographyProps<
|
|
23
|
-
TypographyProps<AllowedWeight, AllowedColors>
|
|
24
|
-
> & { fontSize?: FontSize };
|
|
6
|
+
IOText,
|
|
7
|
+
IOTextProps,
|
|
8
|
+
TypographicStyleAsLinkProps,
|
|
9
|
+
TypographicStyleProps
|
|
10
|
+
} from "./IOText";
|
|
25
11
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
type LabelProps = TypographicStyleProps & {
|
|
13
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
|
|
14
|
+
} & TypographicStyleAsLinkProps;
|
|
29
15
|
|
|
30
16
|
/**
|
|
31
|
-
* `
|
|
17
|
+
* `LabelSmall` typographic style
|
|
32
18
|
*/
|
|
33
|
-
export const Label =
|
|
34
|
-
(
|
|
35
|
-
|
|
19
|
+
export const Label = forwardRef<View, LabelProps>(
|
|
20
|
+
(
|
|
21
|
+
{ weight: customWeight, color: customColor, asLink, ...props },
|
|
22
|
+
ref?: ForwardedRef<View>
|
|
23
|
+
) => {
|
|
24
|
+
const theme = useIOTheme();
|
|
25
|
+
|
|
26
|
+
const defaultColor = asLink
|
|
27
|
+
? theme["interactiveElem-default"]
|
|
28
|
+
: theme["textBody-tertiary"];
|
|
29
|
+
|
|
30
|
+
const LabelProps: IOTextProps = {
|
|
31
|
+
...props,
|
|
32
|
+
font: "TitilliumSansPro",
|
|
33
|
+
weight: customWeight ?? "Semibold",
|
|
34
|
+
size: 16,
|
|
35
|
+
lineHeight: 24,
|
|
36
|
+
color: customColor ?? defaultColor,
|
|
37
|
+
...(asLink
|
|
38
|
+
? {
|
|
39
|
+
accessibilityRole: "link",
|
|
40
|
+
textStyle: { textDecorationLine: "underline" }
|
|
41
|
+
}
|
|
42
|
+
: {})
|
|
43
|
+
};
|
|
36
44
|
|
|
37
|
-
return
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
maxFontSizeMultiplier: IOVisualCostants.maxFontSizeMultiplier,
|
|
42
|
-
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
43
|
-
defaultWeight: labelDefaultWeight,
|
|
44
|
-
defaultColor: labelDefaultcolor,
|
|
45
|
-
font,
|
|
46
|
-
fontStyle: {
|
|
47
|
-
fontSize: fontSize
|
|
48
|
-
? fontSizeMapping[fontSize]
|
|
49
|
-
: fontSizeMapping.regular,
|
|
50
|
-
lineHeight: fontSize
|
|
51
|
-
? lineHeightMapping[fontSize]
|
|
52
|
-
: lineHeightMapping.regular
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
ref
|
|
45
|
+
return (
|
|
46
|
+
<IOText ref={ref} {...LabelProps}>
|
|
47
|
+
{props.children}
|
|
48
|
+
</IOText>
|
|
56
49
|
);
|
|
57
50
|
}
|
|
58
51
|
);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontWeight } from "../../utils/fonts";
|
|
5
|
+
import {
|
|
6
|
+
IOText,
|
|
7
|
+
IOTextProps,
|
|
8
|
+
TypographicStyleAsLinkProps,
|
|
9
|
+
TypographicStyleProps
|
|
10
|
+
} from "./IOText";
|
|
11
|
+
|
|
12
|
+
type LabelMiniProps = TypographicStyleProps & {
|
|
13
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
|
|
14
|
+
} & TypographicStyleAsLinkProps;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* `LabelMini` typographic style
|
|
18
|
+
*/
|
|
19
|
+
export const LabelMini = forwardRef<View, LabelMiniProps>(
|
|
20
|
+
(
|
|
21
|
+
{ weight: customWeight, color: customColor, asLink, ...props },
|
|
22
|
+
ref?: ForwardedRef<View>
|
|
23
|
+
) => {
|
|
24
|
+
const theme = useIOTheme();
|
|
25
|
+
|
|
26
|
+
const defaultColor = asLink
|
|
27
|
+
? theme["interactiveElem-default"]
|
|
28
|
+
: theme["textBody-tertiary"];
|
|
29
|
+
|
|
30
|
+
const LabelMiniProps: IOTextProps = {
|
|
31
|
+
...props,
|
|
32
|
+
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
33
|
+
font: "TitilliumSansPro",
|
|
34
|
+
weight: customWeight ?? "Semibold",
|
|
35
|
+
size: 12,
|
|
36
|
+
lineHeight: 18,
|
|
37
|
+
color: customColor ?? defaultColor,
|
|
38
|
+
...(asLink
|
|
39
|
+
? {
|
|
40
|
+
accessibilityRole: "link",
|
|
41
|
+
textStyle: { textDecorationLine: "underline" }
|
|
42
|
+
}
|
|
43
|
+
: {})
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<IOText ref={ref} {...LabelMiniProps}>
|
|
48
|
+
{props.children}
|
|
49
|
+
</IOText>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
@@ -1,74 +1,52 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
+
import { useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontWeight } from "../../utils/fonts";
|
|
3
5
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "
|
|
9
|
-
import { FontFamily, IOFontWeight } from "../../utils/fonts";
|
|
10
|
-
import { useTypographyFactory } from "./Factory";
|
|
11
|
-
import { ExternalTypographyProps, TypographyProps } from "./common";
|
|
6
|
+
IOText,
|
|
7
|
+
IOTextProps,
|
|
8
|
+
TypographicStyleAsLinkProps,
|
|
9
|
+
TypographicStyleProps
|
|
10
|
+
} from "./IOText";
|
|
12
11
|
|
|
13
|
-
type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
| "bluegrey"
|
|
17
|
-
| "red"
|
|
18
|
-
| "white"
|
|
19
|
-
| "bluegreyDark"
|
|
20
|
-
| "grey-700"
|
|
21
|
-
| "grey-200"
|
|
22
|
-
>;
|
|
23
|
-
type AllowedColors = PartialAllowedColors | IOTheme["textBody-tertiary"];
|
|
24
|
-
type AllowedWeight = Extract<IOFontWeight, "Bold" | "Regular" | "Semibold">;
|
|
25
|
-
|
|
26
|
-
type FontSize = "regular" | "small";
|
|
27
|
-
type AllowedFontSize = { fontSize?: FontSize };
|
|
28
|
-
|
|
29
|
-
type LabelSmallProps = ExternalTypographyProps<
|
|
30
|
-
TypographyProps<AllowedWeight, AllowedColors>
|
|
31
|
-
> &
|
|
32
|
-
AllowedFontSize;
|
|
33
|
-
|
|
34
|
-
const font: FontFamily = "TitilliumSansPro";
|
|
35
|
-
const fontSizeMapping: Record<FontSize, number> = {
|
|
36
|
-
regular: 14,
|
|
37
|
-
small: 12
|
|
38
|
-
};
|
|
39
|
-
const lineHeightMapping: Record<FontSize, number> = {
|
|
40
|
-
regular: 21,
|
|
41
|
-
small: 18
|
|
42
|
-
};
|
|
43
|
-
const labelDefaultWeight = "Bold";
|
|
44
|
-
const labelDefaultcolor = "blue";
|
|
12
|
+
type LabelSmallProps = TypographicStyleProps & {
|
|
13
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
|
|
14
|
+
} & TypographicStyleAsLinkProps;
|
|
45
15
|
|
|
46
16
|
/**
|
|
47
17
|
* `LabelSmall` typographic style
|
|
48
18
|
*/
|
|
49
|
-
export const LabelSmall =
|
|
50
|
-
(
|
|
51
|
-
|
|
19
|
+
export const LabelSmall = forwardRef<View, LabelSmallProps>(
|
|
20
|
+
(
|
|
21
|
+
{ weight: customWeight, color: customColor, asLink, ...props },
|
|
22
|
+
ref?: ForwardedRef<View>
|
|
23
|
+
) => {
|
|
24
|
+
const theme = useIOTheme();
|
|
25
|
+
|
|
26
|
+
const defaultColor = asLink
|
|
27
|
+
? theme["interactiveElem-default"]
|
|
28
|
+
: theme["textBody-tertiary"];
|
|
29
|
+
|
|
30
|
+
const LabelSmallProps: IOTextProps = {
|
|
31
|
+
...props,
|
|
32
|
+
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
33
|
+
font: "TitilliumSansPro",
|
|
34
|
+
weight: customWeight ?? "Semibold",
|
|
35
|
+
size: 14,
|
|
36
|
+
lineHeight: 21,
|
|
37
|
+
color: customColor ?? defaultColor,
|
|
38
|
+
...(asLink
|
|
39
|
+
? {
|
|
40
|
+
accessibilityRole: "link",
|
|
41
|
+
textStyle: { textDecorationLine: "underline" }
|
|
42
|
+
}
|
|
43
|
+
: {})
|
|
44
|
+
};
|
|
52
45
|
|
|
53
|
-
return
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
maxFontSizeMultiplier: IOVisualCostants.maxFontSizeMultiplier,
|
|
58
|
-
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
59
|
-
defaultWeight: labelDefaultWeight,
|
|
60
|
-
defaultColor: labelDefaultcolor,
|
|
61
|
-
font,
|
|
62
|
-
fontStyle: {
|
|
63
|
-
fontSize: props.fontSize
|
|
64
|
-
? fontSizeMapping[props.fontSize]
|
|
65
|
-
: fontSizeMapping.regular,
|
|
66
|
-
lineHeight: props.fontSize
|
|
67
|
-
? lineHeightMapping[props.fontSize]
|
|
68
|
-
: lineHeightMapping.regular
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
ref
|
|
46
|
+
return (
|
|
47
|
+
<IOText ref={ref} {...LabelSmallProps}>
|
|
48
|
+
{props.children}
|
|
49
|
+
</IOText>
|
|
72
50
|
);
|
|
73
51
|
}
|
|
74
52
|
);
|
|
@@ -1,61 +1,41 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { useTypographyFactory } from "./Factory";
|
|
7
|
-
import { ExternalTypographyProps, TypographyProps } from "./common";
|
|
3
|
+
import { useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
|
|
5
|
+
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
| "red"
|
|
14
|
-
| "white"
|
|
15
|
-
| "bluegreyDark"
|
|
16
|
-
| "grey-700"
|
|
17
|
-
| "grey-200"
|
|
18
|
-
>;
|
|
19
|
-
type AllowedColors = PartialAllowedColors | IOTheme["textBody-tertiary"];
|
|
20
|
-
type AllowedWeight = Extract<IOFontWeight, "Bold" | "Regular" | "Semibold">;
|
|
21
|
-
|
|
22
|
-
type LabelSmallAltProps = ExternalTypographyProps<
|
|
23
|
-
TypographyProps<AllowedWeight, AllowedColors>
|
|
24
|
-
>;
|
|
25
|
-
|
|
26
|
-
const labelFontSize = 14;
|
|
27
|
-
const labelLineHeight = 21;
|
|
28
|
-
const fontName: FontFamily = "ReadexPro";
|
|
29
|
-
const defaultColor: AllowedColors = "black";
|
|
30
|
-
const defaultWeight: AllowedWeight = "Regular";
|
|
7
|
+
const fontSize = 14;
|
|
8
|
+
const lineHeight = 21;
|
|
9
|
+
const fontName: IOFontFamily = "ReadexPro";
|
|
10
|
+
const fontWeight: IOFontWeight = "Regular";
|
|
31
11
|
|
|
32
12
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
33
|
-
const
|
|
34
|
-
const legacyFontName:
|
|
35
|
-
const
|
|
13
|
+
const legacyFontSize = 16;
|
|
14
|
+
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
15
|
+
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
36
16
|
|
|
37
17
|
/**
|
|
38
18
|
* `LabelSmallAlt` typographic style. It's referenced as `LabelSmallReadex` in the design projects.
|
|
39
19
|
*/
|
|
40
|
-
export const LabelSmallAlt =
|
|
41
|
-
(props, ref) => {
|
|
20
|
+
export const LabelSmallAlt = forwardRef<View, TypographicStyleProps>(
|
|
21
|
+
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
22
|
+
const theme = useIOTheme();
|
|
42
23
|
const { isExperimental } = useIOExperimentalDesign();
|
|
43
24
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
ref
|
|
25
|
+
const LabelSmallAltProps: IOTextProps = {
|
|
26
|
+
...props,
|
|
27
|
+
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
28
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
29
|
+
weight: isExperimental ? fontWeight : legacyFontWeight,
|
|
30
|
+
size: isExperimental ? fontSize : legacyFontSize,
|
|
31
|
+
lineHeight,
|
|
32
|
+
color: customColor ?? theme["textBody-tertiary"]
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<IOText ref={ref} {...LabelSmallAltProps}>
|
|
37
|
+
{props.children}
|
|
38
|
+
</IOText>
|
|
59
39
|
);
|
|
60
40
|
}
|
|
61
41
|
);
|