@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
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { forwardRef, useMemo } from "react";
|
|
3
|
+
import { Text } from "react-native";
|
|
4
|
+
import { IOColors, useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
5
|
+
import { useBoldTextEnabled } from "../../utils/accessibility";
|
|
6
|
+
import { makeFontStyleObject } from "../../utils/fonts";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* We exclude all of the following props when we define a new
|
|
10
|
+
* typographic style in which all of these visual attributes
|
|
11
|
+
* are already defined.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The specific properties needed to calculate the font style using {@link makeFontStyleObject} (these information
|
|
16
|
+
* cannot be included in the default StyleProp<TextStyle>
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Extend `TypographicStyleProps` with extra props for styles that
|
|
21
|
+
* can be used as links
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Decorate the function {@link makeFontStyleObject} with the additional color calculation.
|
|
26
|
+
* @param color A value key from {@link IOColors}, transformed here in {@link ColorValue}
|
|
27
|
+
* @param args the args of the function {@link makeFontStyleObject}
|
|
28
|
+
*/
|
|
29
|
+
const calculateTextStyle = function (color) {
|
|
30
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
31
|
+
args[_key - 1] = arguments[_key];
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
...makeFontStyleObject(...args),
|
|
35
|
+
color: IOColors[color]
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* `IOText` is the core Typography component used to render a text.
|
|
41
|
+
* It accepts all the default text style `StyleProp<TextStyle>` (excluding the ones already applied) in addition with {@link IOTextBaseProps}
|
|
42
|
+
* used to calculate at runtime the platform-dependent styles.
|
|
43
|
+
* @param props
|
|
44
|
+
* @constructor
|
|
45
|
+
*/
|
|
46
|
+
export const IOText = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
47
|
+
let {
|
|
48
|
+
color,
|
|
49
|
+
size,
|
|
50
|
+
font,
|
|
51
|
+
lineHeight,
|
|
52
|
+
weight,
|
|
53
|
+
fontStyle,
|
|
54
|
+
textStyle,
|
|
55
|
+
style,
|
|
56
|
+
children,
|
|
57
|
+
...props
|
|
58
|
+
} = _ref;
|
|
59
|
+
const theme = useIOTheme();
|
|
60
|
+
const boldEnabled = useBoldTextEnabled();
|
|
61
|
+
const {
|
|
62
|
+
isExperimental
|
|
63
|
+
} = useIOExperimentalDesign();
|
|
64
|
+
const computedStyleObj = useMemo(() => calculateTextStyle(color ?? theme["textBody-default"], size, font, lineHeight, weight, fontStyle, boldEnabled), [color, theme, size, font, lineHeight, weight, fontStyle, boldEnabled]);
|
|
65
|
+
|
|
66
|
+
/* In some cases, for example when we use color transitions with
|
|
67
|
+
`reanimated` we need to manage chromatic values as `ColorValue`
|
|
68
|
+
or `string` (not `IOColors`). So we keep a way to override
|
|
69
|
+
the the `color' attribute without giving the ability to
|
|
70
|
+
override all other all other typographic attributes
|
|
71
|
+
through the `style' prop. */
|
|
72
|
+
const fontStyleObj = style !== null && style !== void 0 && style.color ? [{
|
|
73
|
+
...computedStyleObj,
|
|
74
|
+
color: style === null || style === void 0 ? void 0 : style.color
|
|
75
|
+
}] : computedStyleObj;
|
|
76
|
+
|
|
77
|
+
/* Some typographic styles like `H5` have certain `TextStyle` properties
|
|
78
|
+
like `textTransform` or `letterSpacing` that we want to apply to the text.
|
|
79
|
+
We use the `textStyle` prop to pass these properties to the `IOText`
|
|
80
|
+
component and preserve the ability to define the `style` prop as well.
|
|
81
|
+
The `style` prop is the last one to be applied, so we can properly
|
|
82
|
+
override the `color` attribute.
|
|
83
|
+
*/
|
|
84
|
+
const styleObj = style ? [textStyle ?? {}, fontStyleObj ?? {}, style] : [textStyle ?? {}, fontStyleObj ?? {}];
|
|
85
|
+
|
|
86
|
+
/* Accessible typography based on the `fontScale` parameter */
|
|
87
|
+
const accessibleFontSizeProps = {
|
|
88
|
+
allowFontScaling: isExperimental,
|
|
89
|
+
maxFontSizeMultiplier: 1.25
|
|
90
|
+
};
|
|
91
|
+
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
92
|
+
ref: ref,
|
|
93
|
+
style: styleObj
|
|
94
|
+
}, props, accessibleFontSizeProps), children);
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=IOText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useMemo","Text","IOColors","useIOExperimentalDesign","useIOTheme","useBoldTextEnabled","makeFontStyleObject","calculateTextStyle","color","_len","arguments","length","args","Array","_key","IOText","_ref","ref","size","font","lineHeight","weight","fontStyle","textStyle","style","children","props","theme","boldEnabled","isExperimental","computedStyleObj","fontStyleObj","styleObj","accessibleFontSizeProps","allowFontScaling","maxFontSizeMultiplier","createElement","_extends"],"sourceRoot":"../../../../src","sources":["components/typography/IOText.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAoBC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAClE,SAGEC,IAAI,QAGC,cAAc;AACrB,SAASC,QAAQ,EAAEC,uBAAuB,EAAEC,UAAU,QAAQ,YAAY;AAC1E,SAASC,kBAAkB,QAAQ,2BAA2B;AAC9D,SAIEC,mBAAmB,QACd,mBAAmB;;AAE1B;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG,SAAAA,CACzBC,KAAe;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EACZC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;EAAA;EAAA,OACH;IACJ,GAAGR,mBAAmB,CAAC,GAAGM,IAAI,CAAC;IAC/BJ,KAAK,EAAEN,QAAQ,CAACM,KAAK;EACvB,CAAC;AAAA,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMO,MAAM,gBAAGhB,UAAU,CAC9B,CAAAiB,IAAA,EAaEC,GAAG,KACA;EAAA,IAbH;IACET,KAAK;IACLU,IAAI;IACJC,IAAI;IACJC,UAAU;IACVC,MAAM;IACNC,SAAS;IACTC,SAAS;IACTC,KAAK;IACLC,QAAQ;IACR,GAAGC;EACL,CAAC,GAAAV,IAAA;EAGD,MAAMW,KAAK,GAAGvB,UAAU,CAAC,CAAC;EAC1B,MAAMwB,WAAW,GAAGvB,kBAAkB,CAAC,CAAC;EAExC,MAAM;IAAEwB;EAAe,CAAC,GAAG1B,uBAAuB,CAAC,CAAC;EAEpD,MAAM2B,gBAAgB,GAAG9B,OAAO,CAC9B,MACEO,kBAAkB,CAChBC,KAAK,IAAImB,KAAK,CAAC,kBAAkB,CAAC,EAClCT,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,MAAM,EACNC,SAAS,EACTM,WACF,CAAC,EACH,CAACpB,KAAK,EAAEmB,KAAK,EAAET,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,MAAM,EAAEC,SAAS,EAAEM,WAAW,CACvE,CAAC;;EAED;AACJ;AACA;AACA;AACA;AACA;EACI,MAAMG,YAAY,GAAGP,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEhB,KAAK,GAC7B,CAAC;IAAE,GAAGsB,gBAAgB;IAAEtB,KAAK,EAAEgB,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEhB;EAAM,CAAC,CAAC,GAC9CsB,gBAAgB;;EAEpB;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,MAAME,QAAQ,GAAGR,KAAK,GAClB,CAACD,SAAS,IAAI,CAAC,CAAC,EAAEQ,YAAY,IAAI,CAAC,CAAC,EAAEP,KAAK,CAAC,GAC5C,CAACD,SAAS,IAAI,CAAC,CAAC,EAAEQ,YAAY,IAAI,CAAC,CAAC,CAAC;;EAEzC;EACA,MAAME,uBAAoD,GAAG;IAC3DC,gBAAgB,EAAEL,cAAc;IAChCM,qBAAqB,EAAE;EACzB,CAAC;EAED,oBACErC,KAAA,CAAAsC,aAAA,CAACnC,IAAI,EAAAoC,QAAA;IAACpB,GAAG,EAAEA,GAAI;IAACO,KAAK,EAAEQ;EAAS,GAAKN,KAAK,EAAMO,uBAAuB,GACpER,QACG,CAAC;AAEX,CACF,CAAC"}
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const font = "TitilliumSansPro";
|
|
6
|
-
const labelDefaultWeight = "Bold";
|
|
7
|
-
const labelDefaultcolor = "black";
|
|
8
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import { useIOTheme } from "../../core";
|
|
4
|
+
import { IOText } from "./IOText";
|
|
9
5
|
/**
|
|
10
|
-
* `
|
|
6
|
+
* `LabelSmall` typographic style
|
|
11
7
|
*/
|
|
12
|
-
export const Label = /*#__PURE__*/
|
|
8
|
+
export const Label = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
13
9
|
let {
|
|
14
|
-
|
|
10
|
+
weight: customWeight,
|
|
11
|
+
color: customColor,
|
|
12
|
+
asLink,
|
|
15
13
|
...props
|
|
16
14
|
} = _ref;
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return useTypographyFactory({
|
|
15
|
+
const theme = useIOTheme();
|
|
16
|
+
const defaultColor = asLink ? theme["interactiveElem-default"] : theme["textBody-tertiary"];
|
|
17
|
+
const LabelProps = {
|
|
21
18
|
...props,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
font: "TitilliumSansPro",
|
|
20
|
+
weight: customWeight ?? "Semibold",
|
|
21
|
+
size: 16,
|
|
22
|
+
lineHeight: 24,
|
|
23
|
+
color: customColor ?? defaultColor,
|
|
24
|
+
...(asLink ? {
|
|
25
|
+
accessibilityRole: "link",
|
|
26
|
+
textStyle: {
|
|
27
|
+
textDecorationLine: "underline"
|
|
28
|
+
}
|
|
29
|
+
} : {})
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/React.createElement(IOText, _extends({
|
|
32
|
+
ref: ref
|
|
33
|
+
}, LabelProps), props.children);
|
|
33
34
|
});
|
|
34
35
|
//# sourceMappingURL=Label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useIOTheme","IOText","Label","_ref","ref","weight","customWeight","color","customColor","asLink","props","theme","defaultColor","LabelProps","font","size","lineHeight","accessibilityRole","textStyle","textDecorationLine","createElement","_extends","children"],"sourceRoot":"../../../../src","sources":["components/typography/Label.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO;AAEvD,SAASC,UAAU,QAAQ,YAAY;AAEvC,SACEC,MAAM,QAID,UAAU;AAMjB;AACA;AACA;AACA,OAAO,MAAMC,KAAK,gBAAGH,UAAU,CAC7B,CAAAI,IAAA,EAEEC,GAAwB,KACrB;EAAA,IAFH;IAAEC,MAAM,EAAEC,YAAY;IAAEC,KAAK,EAAEC,WAAW;IAAEC,MAAM;IAAE,GAAGC;EAAM,CAAC,GAAAP,IAAA;EAG9D,MAAMQ,KAAK,GAAGX,UAAU,CAAC,CAAC;EAE1B,MAAMY,YAAY,GAAGH,MAAM,GACvBE,KAAK,CAAC,yBAAyB,CAAC,GAChCA,KAAK,CAAC,mBAAmB,CAAC;EAE9B,MAAME,UAAuB,GAAG;IAC9B,GAAGH,KAAK;IACRI,IAAI,EAAE,kBAAkB;IACxBT,MAAM,EAAEC,YAAY,IAAI,UAAU;IAClCS,IAAI,EAAE,EAAE;IACRC,UAAU,EAAE,EAAE;IACdT,KAAK,EAAEC,WAAW,IAAII,YAAY;IAClC,IAAIH,MAAM,GACN;MACEQ,iBAAiB,EAAE,MAAM;MACzBC,SAAS,EAAE;QAAEC,kBAAkB,EAAE;MAAY;IAC/C,CAAC,GACD,CAAC,CAAC;EACR,CAAC;EAED,oBACErB,KAAA,CAAAsB,aAAA,CAACnB,MAAM,EAAAoB,QAAA;IAACjB,GAAG,EAAEA;EAAI,GAAKS,UAAU,GAC7BH,KAAK,CAACY,QACD,CAAC;AAEb,CACF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import { useIOTheme } from "../../core";
|
|
4
|
+
import { IOText } from "./IOText";
|
|
5
|
+
/**
|
|
6
|
+
* `LabelMini` typographic style
|
|
7
|
+
*/
|
|
8
|
+
export const LabelMini = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
9
|
+
let {
|
|
10
|
+
weight: customWeight,
|
|
11
|
+
color: customColor,
|
|
12
|
+
asLink,
|
|
13
|
+
...props
|
|
14
|
+
} = _ref;
|
|
15
|
+
const theme = useIOTheme();
|
|
16
|
+
const defaultColor = asLink ? theme["interactiveElem-default"] : theme["textBody-tertiary"];
|
|
17
|
+
const LabelMiniProps = {
|
|
18
|
+
...props,
|
|
19
|
+
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
20
|
+
font: "TitilliumSansPro",
|
|
21
|
+
weight: customWeight ?? "Semibold",
|
|
22
|
+
size: 12,
|
|
23
|
+
lineHeight: 18,
|
|
24
|
+
color: customColor ?? defaultColor,
|
|
25
|
+
...(asLink ? {
|
|
26
|
+
accessibilityRole: "link",
|
|
27
|
+
textStyle: {
|
|
28
|
+
textDecorationLine: "underline"
|
|
29
|
+
}
|
|
30
|
+
} : {})
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/React.createElement(IOText, _extends({
|
|
33
|
+
ref: ref
|
|
34
|
+
}, LabelMiniProps), props.children);
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=LabelMini.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useIOTheme","IOText","LabelMini","_ref","ref","weight","customWeight","color","customColor","asLink","props","theme","defaultColor","LabelMiniProps","dynamicTypeRamp","font","size","lineHeight","accessibilityRole","textStyle","textDecorationLine","createElement","_extends","children"],"sourceRoot":"../../../../src","sources":["components/typography/LabelMini.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO;AAEvD,SAASC,UAAU,QAAQ,YAAY;AAEvC,SACEC,MAAM,QAID,UAAU;AAMjB;AACA;AACA;AACA,OAAO,MAAMC,SAAS,gBAAGH,UAAU,CACjC,CAAAI,IAAA,EAEEC,GAAwB,KACrB;EAAA,IAFH;IAAEC,MAAM,EAAEC,YAAY;IAAEC,KAAK,EAAEC,WAAW;IAAEC,MAAM;IAAE,GAAGC;EAAM,CAAC,GAAAP,IAAA;EAG9D,MAAMQ,KAAK,GAAGX,UAAU,CAAC,CAAC;EAE1B,MAAMY,YAAY,GAAGH,MAAM,GACvBE,KAAK,CAAC,yBAAyB,CAAC,GAChCA,KAAK,CAAC,mBAAmB,CAAC;EAE9B,MAAME,cAA2B,GAAG;IAClC,GAAGH,KAAK;IACRI,eAAe,EAAE,UAAU,CAAC;IAC5BC,IAAI,EAAE,kBAAkB;IACxBV,MAAM,EAAEC,YAAY,IAAI,UAAU;IAClCU,IAAI,EAAE,EAAE;IACRC,UAAU,EAAE,EAAE;IACdV,KAAK,EAAEC,WAAW,IAAII,YAAY;IAClC,IAAIH,MAAM,GACN;MACES,iBAAiB,EAAE,MAAM;MACzBC,SAAS,EAAE;QAAEC,kBAAkB,EAAE;MAAY;IAC/C,CAAC,GACD,CAAC,CAAC;EACR,CAAC;EAED,oBACEtB,KAAA,CAAAuB,aAAA,CAACpB,MAAM,EAAAqB,QAAA;IAAClB,GAAG,EAAEA;EAAI,GAAKS,cAAc,GACjCH,KAAK,CAACa,QACD,CAAC;AAEb,CACF,CAAC"}
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const fontSizeMapping = {
|
|
6
|
-
regular: 14,
|
|
7
|
-
small: 12
|
|
8
|
-
};
|
|
9
|
-
const lineHeightMapping = {
|
|
10
|
-
regular: 21,
|
|
11
|
-
small: 18
|
|
12
|
-
};
|
|
13
|
-
const labelDefaultWeight = "Bold";
|
|
14
|
-
const labelDefaultcolor = "blue";
|
|
15
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import { useIOTheme } from "../../core";
|
|
4
|
+
import { IOText } from "./IOText";
|
|
16
5
|
/**
|
|
17
6
|
* `LabelSmall` typographic style
|
|
18
7
|
*/
|
|
19
|
-
export const LabelSmall = /*#__PURE__*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
export const LabelSmall = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
9
|
+
let {
|
|
10
|
+
weight: customWeight,
|
|
11
|
+
color: customColor,
|
|
12
|
+
asLink,
|
|
13
|
+
...props
|
|
14
|
+
} = _ref;
|
|
15
|
+
const theme = useIOTheme();
|
|
16
|
+
const defaultColor = asLink ? theme["interactiveElem-default"] : theme["textBody-tertiary"];
|
|
17
|
+
const LabelSmallProps = {
|
|
24
18
|
...props,
|
|
25
|
-
allowFontScaling: isExperimental,
|
|
26
|
-
maxFontSizeMultiplier: IOVisualCostants.maxFontSizeMultiplier,
|
|
27
19
|
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
font: "TitilliumSansPro",
|
|
21
|
+
weight: customWeight ?? "Semibold",
|
|
22
|
+
size: 14,
|
|
23
|
+
lineHeight: 21,
|
|
24
|
+
color: customColor ?? defaultColor,
|
|
25
|
+
...(asLink ? {
|
|
26
|
+
accessibilityRole: "link",
|
|
27
|
+
textStyle: {
|
|
28
|
+
textDecorationLine: "underline"
|
|
29
|
+
}
|
|
30
|
+
} : {})
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/React.createElement(IOText, _extends({
|
|
33
|
+
ref: ref
|
|
34
|
+
}, LabelSmallProps), props.children);
|
|
36
35
|
});
|
|
37
36
|
//# sourceMappingURL=LabelSmall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useIOTheme","IOText","LabelSmall","_ref","ref","weight","customWeight","color","customColor","asLink","props","theme","defaultColor","LabelSmallProps","dynamicTypeRamp","font","size","lineHeight","accessibilityRole","textStyle","textDecorationLine","createElement","_extends","children"],"sourceRoot":"../../../../src","sources":["components/typography/LabelSmall.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO;AAEvD,SAASC,UAAU,QAAQ,YAAY;AAEvC,SACEC,MAAM,QAID,UAAU;AAMjB;AACA;AACA;AACA,OAAO,MAAMC,UAAU,gBAAGH,UAAU,CAClC,CAAAI,IAAA,EAEEC,GAAwB,KACrB;EAAA,IAFH;IAAEC,MAAM,EAAEC,YAAY;IAAEC,KAAK,EAAEC,WAAW;IAAEC,MAAM;IAAE,GAAGC;EAAM,CAAC,GAAAP,IAAA;EAG9D,MAAMQ,KAAK,GAAGX,UAAU,CAAC,CAAC;EAE1B,MAAMY,YAAY,GAAGH,MAAM,GACvBE,KAAK,CAAC,yBAAyB,CAAC,GAChCA,KAAK,CAAC,mBAAmB,CAAC;EAE9B,MAAME,eAA4B,GAAG;IACnC,GAAGH,KAAK;IACRI,eAAe,EAAE,UAAU,CAAC;IAC5BC,IAAI,EAAE,kBAAkB;IACxBV,MAAM,EAAEC,YAAY,IAAI,UAAU;IAClCU,IAAI,EAAE,EAAE;IACRC,UAAU,EAAE,EAAE;IACdV,KAAK,EAAEC,WAAW,IAAII,YAAY;IAClC,IAAIH,MAAM,GACN;MACES,iBAAiB,EAAE,MAAM;MACzBC,SAAS,EAAE;QAAEC,kBAAkB,EAAE;MAAY;IAC/C,CAAC,GACD,CAAC,CAAC;EACR,CAAC;EAED,oBACEtB,KAAA,CAAAuB,aAAA,CAACpB,MAAM,EAAAqB,QAAA;IAAClB,GAAG,EAAEA;EAAI,GAAKS,eAAe,GAClCH,KAAK,CAACa,QACD,CAAC;AAEb,CACF,CAAC"}
|
|
@@ -1,36 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import { useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
+
import { IOText } from "./IOText";
|
|
5
|
+
const fontSize = 14;
|
|
6
|
+
const lineHeight = 21;
|
|
6
7
|
const fontName = "ReadexPro";
|
|
7
|
-
const
|
|
8
|
-
const defaultWeight = "Regular";
|
|
8
|
+
const fontWeight = "Regular";
|
|
9
9
|
|
|
10
10
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
11
|
-
const
|
|
11
|
+
const legacyFontSize = 16;
|
|
12
12
|
const legacyFontName = "TitilliumSansPro";
|
|
13
|
-
const
|
|
13
|
+
const legacyFontWeight = "Semibold";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* `LabelSmallAlt` typographic style. It's referenced as `LabelSmallReadex` in the design projects.
|
|
17
17
|
*/
|
|
18
|
-
export const LabelSmallAlt = /*#__PURE__*/
|
|
18
|
+
export const LabelSmallAlt = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
19
|
+
let {
|
|
20
|
+
color: customColor,
|
|
21
|
+
...props
|
|
22
|
+
} = _ref;
|
|
23
|
+
const theme = useIOTheme();
|
|
19
24
|
const {
|
|
20
25
|
isExperimental
|
|
21
26
|
} = useIOExperimentalDesign();
|
|
22
|
-
|
|
27
|
+
const LabelSmallAltProps = {
|
|
23
28
|
...props,
|
|
24
|
-
allowFontScaling: isExperimental,
|
|
25
|
-
maxFontSizeMultiplier: IOVisualCostants.maxFontSizeMultiplier,
|
|
26
29
|
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
27
|
-
defaultWeight: isExperimental ? defaultWeight : legacyDefaultWeight,
|
|
28
|
-
defaultColor,
|
|
29
30
|
font: isExperimental ? fontName : legacyFontName,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
31
|
+
weight: isExperimental ? fontWeight : legacyFontWeight,
|
|
32
|
+
size: isExperimental ? fontSize : legacyFontSize,
|
|
33
|
+
lineHeight,
|
|
34
|
+
color: customColor ?? theme["textBody-tertiary"]
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/React.createElement(IOText, _extends({
|
|
37
|
+
ref: ref
|
|
38
|
+
}, LabelSmallAltProps), props.children);
|
|
35
39
|
});
|
|
36
40
|
//# sourceMappingURL=LabelSmallAlt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useIOExperimentalDesign","useIOTheme","IOText","fontSize","lineHeight","fontName","fontWeight","legacyFontSize","legacyFontName","legacyFontWeight","LabelSmallAlt","_ref","ref","color","customColor","props","theme","isExperimental","LabelSmallAltProps","dynamicTypeRamp","font","weight","size","createElement","_extends","children"],"sourceRoot":"../../../../src","sources":["components/typography/LabelSmallAlt.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO;AAEvD,SAASC,uBAAuB,EAAEC,UAAU,QAAQ,YAAY;AAEhE,SAASC,MAAM,QAA4C,UAAU;AAErE,MAAMC,QAAQ,GAAG,EAAE;AACnB,MAAMC,UAAU,GAAG,EAAE;AACrB,MAAMC,QAAsB,GAAG,WAAW;AAC1C,MAAMC,UAAwB,GAAG,SAAS;;AAE1C;AACA,MAAMC,cAAc,GAAG,EAAE;AACzB,MAAMC,cAA4B,GAAG,kBAAkB;AACvD,MAAMC,gBAA8B,GAAG,UAAU;;AAEjD;AACA;AACA;AACA,OAAO,MAAMC,aAAa,gBAAGX,UAAU,CACrC,CAAAY,IAAA,EAAmCC,GAAwB,KAAK;EAAA,IAA/D;IAAEC,KAAK,EAAEC,WAAW;IAAE,GAAGC;EAAM,CAAC,GAAAJ,IAAA;EAC/B,MAAMK,KAAK,GAAGf,UAAU,CAAC,CAAC;EAC1B,MAAM;IAAEgB;EAAe,CAAC,GAAGjB,uBAAuB,CAAC,CAAC;EAEpD,MAAMkB,kBAA+B,GAAG;IACtC,GAAGH,KAAK;IACRI,eAAe,EAAE,UAAU,CAAC;IAC5BC,IAAI,EAAEH,cAAc,GAAGZ,QAAQ,GAAGG,cAAc;IAChDa,MAAM,EAAEJ,cAAc,GAAGX,UAAU,GAAGG,gBAAgB;IACtDa,IAAI,EAAEL,cAAc,GAAGd,QAAQ,GAAGI,cAAc;IAChDH,UAAU;IACVS,KAAK,EAAEC,WAAW,IAAIE,KAAK,CAAC,mBAAmB;EACjD,CAAC;EAED,oBACElB,KAAA,CAAAyB,aAAA,CAACrB,MAAM,EAAAsB,QAAA;IAACZ,GAAG,EAAEA;EAAI,GAAKM,kBAAkB,GACrCH,KAAK,CAACU,QACD,CAAC;AAEb,CACF,CAAC"}
|