@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
|
@@ -4,40 +4,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.h5LineHeight = exports.h5FontSize = exports.H5 = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("../../core");
|
|
9
|
-
var
|
|
10
|
-
function
|
|
9
|
+
var _IOText = require("./IOText");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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); }
|
|
13
|
+
const defaultColor = "textHeading-default";
|
|
11
14
|
const h5FontSize = 14;
|
|
12
15
|
exports.h5FontSize = h5FontSize;
|
|
13
16
|
const h5LineHeight = 16;
|
|
14
|
-
exports.h5LineHeight = h5LineHeight;
|
|
15
|
-
const font = "TitilliumSansPro";
|
|
16
|
-
const defaultColor = "black";
|
|
17
|
-
const defaultWeight = "Semibold";
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* `H5` typographic style
|
|
21
20
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
exports.h5LineHeight = h5LineHeight;
|
|
22
|
+
const H5 = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
23
|
+
let {
|
|
24
|
+
color: customColor,
|
|
25
|
+
...props
|
|
26
|
+
} = _ref;
|
|
27
|
+
const theme = (0, _core.useIOTheme)();
|
|
28
|
+
const H5Props = {
|
|
27
29
|
...props,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
lineHeight: h5LineHeight,
|
|
30
|
+
dynamicTypeRamp: "subheadline",
|
|
31
|
+
// iOS only
|
|
32
|
+
font: "TitilliumSansPro",
|
|
33
|
+
weight: "Semibold",
|
|
34
|
+
size: h5FontSize,
|
|
35
|
+
lineHeight: h5LineHeight,
|
|
36
|
+
color: customColor ?? theme[defaultColor],
|
|
37
|
+
textStyle: {
|
|
37
38
|
textTransform: "uppercase",
|
|
38
39
|
letterSpacing: 0.5
|
|
39
40
|
}
|
|
40
|
-
}
|
|
41
|
+
};
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_IOText.IOText, _extends({
|
|
43
|
+
ref: ref
|
|
44
|
+
}, H5Props), props.children);
|
|
41
45
|
});
|
|
42
46
|
exports.H5 = H5;
|
|
43
47
|
//# sourceMappingURL=H5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_core","_IOText","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","defaultColor","h5FontSize","exports","h5LineHeight","H5","forwardRef","_ref","ref","color","customColor","props","theme","useIOTheme","H5Props","dynamicTypeRamp","font","weight","size","lineHeight","textStyle","textTransform","letterSpacing","createElement","IOText","children"],"sourceRoot":"../../../../src","sources":["components/typography/H5.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAAsE,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,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAA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EC,KAAK,EAAEC,WAAW;IAAE,GAAGC;EAAM,CAAC,GAAAJ,IAAA;EAC/B,MAAMK,KAAK,GAAG,IAAAC,gBAAU,EAAC,CAAC;EAE1B,MAAMC,OAAoB,GAAG;IAC3B,GAAGH,KAAK;IACRI,eAAe,EAAE,aAAa;IAAE;IAChCC,IAAI,EAAE,kBAAkB;IACxBC,MAAM,EAAE,UAAU;IAClBC,IAAI,EAAEhB,UAAU;IAChBiB,UAAU,EAAEf,YAAY;IACxBK,KAAK,EAAEC,WAAW,IAAIE,KAAK,CAACX,YAAY,CAAC;IACzCmB,SAAS,EAAE;MACTC,aAAa,EAAE,WAAW;MAC1BC,aAAa,EAAE;IACjB;EACF,CAAC;EAED,oBACEzD,MAAA,CAAAY,OAAA,CAAA8C,aAAA,CAACtD,OAAA,CAAAuD,MAAM,EAAAhC,QAAA;IAACgB,GAAG,EAAEA;EAAI,GAAKM,OAAO,GAC1BH,KAAK,CAACc,QACD,CAAC;AAEb,CACF,CAAC;AAACtB,OAAA,CAAAE,EAAA,GAAAA,EAAA"}
|
|
@@ -4,46 +4,51 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.h6LineHeight = exports.h6FontSize = exports.H6 = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("../../core");
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
var _IOText = require("./IOText");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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); }
|
|
13
|
+
const defaultColor = "textHeading-default";
|
|
13
14
|
const h6FontSize = 16;
|
|
14
15
|
exports.h6FontSize = h6FontSize;
|
|
15
16
|
const h6LineHeight = 24;
|
|
16
17
|
exports.h6LineHeight = h6LineHeight;
|
|
17
|
-
const h6DefaultColor = _core.IOThemeLight["textBody-default"];
|
|
18
|
-
const h6DefaultWeight = "Regular";
|
|
19
18
|
const fontName = "ReadexPro";
|
|
19
|
+
const fontWeight = "Regular";
|
|
20
20
|
|
|
21
21
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
22
22
|
const legacyFontSize = 18;
|
|
23
23
|
const legacyLineHeight = 25;
|
|
24
24
|
const legacyFontName = "TitilliumSansPro";
|
|
25
|
-
const
|
|
25
|
+
const legacyFontWeight = "Semibold";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* `H6` typographic style
|
|
29
29
|
*/
|
|
30
|
-
const H6 = /*#__PURE__*/_react.
|
|
30
|
+
const H6 = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
31
|
+
let {
|
|
32
|
+
color: customColor,
|
|
33
|
+
...props
|
|
34
|
+
} = _ref;
|
|
35
|
+
const theme = (0, _core.useIOTheme)();
|
|
31
36
|
const {
|
|
32
37
|
isExperimental
|
|
33
38
|
} = (0, _core.useIOExperimentalDesign)();
|
|
34
|
-
|
|
39
|
+
const H6Props = {
|
|
35
40
|
...props,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
dynamicTypeRamp: "headline" /* iOS only */,
|
|
39
|
-
defaultWeight: isExperimental ? h6DefaultWeight : legacyDefaultWeight,
|
|
40
|
-
defaultColor: h6DefaultColor,
|
|
41
|
+
dynamicTypeRamp: "headline",
|
|
42
|
+
// iOS only
|
|
41
43
|
font: isExperimental ? fontName : legacyFontName,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
44
|
+
size: isExperimental ? h6FontSize : legacyFontSize,
|
|
45
|
+
lineHeight: isExperimental ? h6LineHeight : legacyLineHeight,
|
|
46
|
+
weight: isExperimental ? fontWeight : legacyFontWeight,
|
|
47
|
+
color: customColor ?? theme[defaultColor]
|
|
48
|
+
};
|
|
49
|
+
return /*#__PURE__*/_react.default.createElement(_IOText.IOText, _extends({
|
|
50
|
+
ref: ref
|
|
51
|
+
}, H6Props), props.children);
|
|
47
52
|
});
|
|
48
53
|
exports.H6 = H6;
|
|
49
54
|
//# sourceMappingURL=H6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_core","_IOText","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","defaultColor","h6FontSize","exports","h6LineHeight","fontName","fontWeight","legacyFontSize","legacyLineHeight","legacyFontName","legacyFontWeight","H6","forwardRef","_ref","ref","color","customColor","props","theme","useIOTheme","isExperimental","useIOExperimentalDesign","H6Props","dynamicTypeRamp","font","size","lineHeight","weight","createElement","IOText","children"],"sourceRoot":"../../../../src","sources":["components/typography/H6.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAAsE,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,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CA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AAMC,OAAoB,GAAG;IAC3B,GAAGL,KAAK;IACRM,eAAe,EAAE,UAAU;IAAE;IAC7BC,IAAI,EAAEJ,cAAc,GAAGf,QAAQ,GAAGI,cAAc;IAChDgB,IAAI,EAAEL,cAAc,GAAGlB,UAAU,GAAGK,cAAc;IAClDmB,UAAU,EAAEN,cAAc,GAAGhB,YAAY,GAAGI,gBAAgB;IAC5DmB,MAAM,EAAEP,cAAc,GAAGd,UAAU,GAAGI,gBAAgB;IACtDK,KAAK,EAAEC,WAAW,IAAIE,KAAK,CAACjB,YAAY;EAC1C,CAAC;EAED,oBACEpC,MAAA,CAAAY,OAAA,CAAAmD,aAAA,CAAC3D,OAAA,CAAA4D,MAAM,EAAArC,QAAA;IAACsB,GAAG,EAAEA;EAAI,GAAKQ,OAAO,GAC1BL,KAAK,CAACa,QACD,CAAC;AAEb,CACF,CAAC;AAAC3B,OAAA,CAAAQ,EAAA,GAAAA,EAAA"}
|
|
@@ -4,41 +4,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.heroLineHeight = exports.heroFontSize = exports.Hero = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("../../core");
|
|
9
|
-
var
|
|
10
|
-
function
|
|
9
|
+
var _IOText = require("./IOText");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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); }
|
|
13
|
+
const defaultColor = "textHeading-default";
|
|
11
14
|
const heroFontSize = 32;
|
|
12
15
|
exports.heroFontSize = heroFontSize;
|
|
13
16
|
const heroLineHeight = 48;
|
|
14
17
|
exports.heroLineHeight = heroLineHeight;
|
|
15
18
|
const fontName = "ReadexPro";
|
|
16
|
-
const
|
|
17
|
-
const defaultWeight = "Regular";
|
|
19
|
+
const fontWeight = "Regular";
|
|
18
20
|
|
|
19
21
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
20
|
-
const legacyFont = "TitilliumSansPro";
|
|
21
|
-
const legacyWeight = "Semibold";
|
|
22
22
|
const legacyHeroFontSize = 35;
|
|
23
23
|
const legacyHeroLineHeight = 49;
|
|
24
|
+
const legacyFontName = "TitilliumSansPro";
|
|
25
|
+
const legacyFontWeight = "Semibold";
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* `Hero` typographic style
|
|
27
29
|
*/
|
|
28
|
-
const Hero = /*#__PURE__*/_react.
|
|
30
|
+
const Hero = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
31
|
+
let {
|
|
32
|
+
color: customColor,
|
|
33
|
+
...props
|
|
34
|
+
} = _ref;
|
|
35
|
+
const theme = (0, _core.useIOTheme)();
|
|
29
36
|
const {
|
|
30
37
|
isExperimental
|
|
31
38
|
} = (0, _core.useIOExperimentalDesign)();
|
|
32
|
-
|
|
39
|
+
const HeroProps = {
|
|
33
40
|
...props,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
42
|
+
weight: isExperimental ? fontWeight : legacyFontWeight,
|
|
43
|
+
size: isExperimental ? heroFontSize : legacyHeroFontSize,
|
|
44
|
+
lineHeight: isExperimental ? heroLineHeight : legacyHeroLineHeight,
|
|
45
|
+
color: customColor ?? theme[defaultColor]
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_IOText.IOText, _extends({
|
|
48
|
+
ref: ref
|
|
49
|
+
}, HeroProps), props.children);
|
|
42
50
|
});
|
|
43
51
|
exports.Hero = Hero;
|
|
44
52
|
//# sourceMappingURL=Hero.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_core","_IOText","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","defaultColor","heroFontSize","exports","heroLineHeight","fontName","fontWeight","legacyHeroFontSize","legacyHeroLineHeight","legacyFontName","legacyFontWeight","Hero","forwardRef","_ref","ref","color","customColor","props","theme","useIOTheme","isExperimental","useIOExperimentalDesign","HeroProps","font","weight","size","lineHeight","createElement","IOText","children"],"sourceRoot":"../../../../src","sources":["components/typography/Hero.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GA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AAGhB,cAAc,GAAGI,oBAAoB;IAClEO,KAAK,EAAEC,WAAW,IAAIE,KAAK,CAACjB,YAAY;EAC1C,CAAC;EAED,oBACEpC,MAAA,CAAAY,OAAA,CAAAkD,aAAA,CAAC1D,OAAA,CAAA2D,MAAM,EAAApC,QAAA;IAACsB,GAAG,EAAEA;EAAI,GAAKQ,SAAS,GAC5BL,KAAK,CAACY,QACD,CAAC;AAEb,CACF,CAAC;AAAC1B,OAAA,CAAAQ,IAAA,GAAAA,IAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.IOText = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _core = require("../../core");
|
|
10
|
+
var _accessibility = require("../../utils/accessibility");
|
|
11
|
+
var _fonts = require("../../utils/fonts");
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
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); }
|
|
15
|
+
/**
|
|
16
|
+
* We exclude all of the following props when we define a new
|
|
17
|
+
* typographic style in which all of these visual attributes
|
|
18
|
+
* are already defined.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The specific properties needed to calculate the font style using {@link makeFontStyleObject} (these information
|
|
23
|
+
* cannot be included in the default StyleProp<TextStyle>
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Extend `TypographicStyleProps` with extra props for styles that
|
|
28
|
+
* can be used as links
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Decorate the function {@link makeFontStyleObject} with the additional color calculation.
|
|
33
|
+
* @param color A value key from {@link IOColors}, transformed here in {@link ColorValue}
|
|
34
|
+
* @param args the args of the function {@link makeFontStyleObject}
|
|
35
|
+
*/
|
|
36
|
+
const calculateTextStyle = function (color) {
|
|
37
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
38
|
+
args[_key - 1] = arguments[_key];
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
...(0, _fonts.makeFontStyleObject)(...args),
|
|
42
|
+
color: _core.IOColors[color]
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* `IOText` is the core Typography component used to render a text.
|
|
48
|
+
* It accepts all the default text style `StyleProp<TextStyle>` (excluding the ones already applied) in addition with {@link IOTextBaseProps}
|
|
49
|
+
* used to calculate at runtime the platform-dependent styles.
|
|
50
|
+
* @param props
|
|
51
|
+
* @constructor
|
|
52
|
+
*/
|
|
53
|
+
const IOText = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
54
|
+
let {
|
|
55
|
+
color,
|
|
56
|
+
size,
|
|
57
|
+
font,
|
|
58
|
+
lineHeight,
|
|
59
|
+
weight,
|
|
60
|
+
fontStyle,
|
|
61
|
+
textStyle,
|
|
62
|
+
style,
|
|
63
|
+
children,
|
|
64
|
+
...props
|
|
65
|
+
} = _ref;
|
|
66
|
+
const theme = (0, _core.useIOTheme)();
|
|
67
|
+
const boldEnabled = (0, _accessibility.useBoldTextEnabled)();
|
|
68
|
+
const {
|
|
69
|
+
isExperimental
|
|
70
|
+
} = (0, _core.useIOExperimentalDesign)();
|
|
71
|
+
const computedStyleObj = (0, _react.useMemo)(() => calculateTextStyle(color ?? theme["textBody-default"], size, font, lineHeight, weight, fontStyle, boldEnabled), [color, theme, size, font, lineHeight, weight, fontStyle, boldEnabled]);
|
|
72
|
+
|
|
73
|
+
/* In some cases, for example when we use color transitions with
|
|
74
|
+
`reanimated` we need to manage chromatic values as `ColorValue`
|
|
75
|
+
or `string` (not `IOColors`). So we keep a way to override
|
|
76
|
+
the the `color' attribute without giving the ability to
|
|
77
|
+
override all other all other typographic attributes
|
|
78
|
+
through the `style' prop. */
|
|
79
|
+
const fontStyleObj = style !== null && style !== void 0 && style.color ? [{
|
|
80
|
+
...computedStyleObj,
|
|
81
|
+
color: style === null || style === void 0 ? void 0 : style.color
|
|
82
|
+
}] : computedStyleObj;
|
|
83
|
+
|
|
84
|
+
/* Some typographic styles like `H5` have certain `TextStyle` properties
|
|
85
|
+
like `textTransform` or `letterSpacing` that we want to apply to the text.
|
|
86
|
+
We use the `textStyle` prop to pass these properties to the `IOText`
|
|
87
|
+
component and preserve the ability to define the `style` prop as well.
|
|
88
|
+
The `style` prop is the last one to be applied, so we can properly
|
|
89
|
+
override the `color` attribute.
|
|
90
|
+
*/
|
|
91
|
+
const styleObj = style ? [textStyle ?? {}, fontStyleObj ?? {}, style] : [textStyle ?? {}, fontStyleObj ?? {}];
|
|
92
|
+
|
|
93
|
+
/* Accessible typography based on the `fontScale` parameter */
|
|
94
|
+
const accessibleFontSizeProps = {
|
|
95
|
+
allowFontScaling: isExperimental,
|
|
96
|
+
maxFontSizeMultiplier: 1.25
|
|
97
|
+
};
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Text, _extends({
|
|
99
|
+
ref: ref,
|
|
100
|
+
style: styleObj
|
|
101
|
+
}, props, accessibleFontSizeProps), children);
|
|
102
|
+
});
|
|
103
|
+
exports.IOText = IOText;
|
|
104
|
+
//# sourceMappingURL=IOText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_core","_accessibility","_fonts","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","calculateTextStyle","color","_len","args","Array","_key","makeFontStyleObject","IOColors","IOText","forwardRef","_ref","ref","size","font","lineHeight","weight","fontStyle","textStyle","style","children","props","theme","useIOTheme","boldEnabled","useBoldTextEnabled","isExperimental","useIOExperimentalDesign","computedStyleObj","useMemo","fontStyleObj","styleObj","accessibleFontSizeProps","allowFontScaling","maxFontSizeMultiplier","createElement","Text","exports"],"sourceRoot":"../../../../src","sources":["components/typography/IOText.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAK2B,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CA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,EACJC,UAAU,EACVC,MAAM,EACNC,SAAS,EACTO,WACF,CAAC,EACH,CAACtB,KAAK,EAAEoB,KAAK,EAAET,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,MAAM,EAAEC,SAAS,EAAEO,WAAW,CACvE,CAAC;;EAED;AACJ;AACA;AACA;AACA;AACA;EACI,MAAMM,YAAY,GAAGX,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEjB,KAAK,GAC7B,CAAC;IAAE,GAAG0B,gBAAgB;IAAE1B,KAAK,EAAEiB,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEjB;EAAM,CAAC,CAAC,GAC9C0B,gBAAgB;;EAEpB;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,MAAMG,QAAQ,GAAGZ,KAAK,GAClB,CAACD,SAAS,IAAI,CAAC,CAAC,EAAEY,YAAY,IAAI,CAAC,CAAC,EAAEX,KAAK,CAAC,GAC5C,CAACD,SAAS,IAAI,CAAC,CAAC,EAAEY,YAAY,IAAI,CAAC,CAAC,CAAC;;EAEzC;EACA,MAAME,uBAAoD,GAAG;IAC3DC,gBAAgB,EAAEP,cAAc;IAChCQ,qBAAqB,EAAE;EACzB,CAAC;EAED,oBACEvE,MAAA,CAAAc,OAAA,CAAA0D,aAAA,CAACrE,YAAA,CAAAsE,IAAI,EAAA5C,QAAA;IAACoB,GAAG,EAAEA,GAAI;IAACO,KAAK,EAAEY;EAAS,GAAKV,KAAK,EAAMW,uBAAuB,GACpEZ,QACG,CAAC;AAEX,CACF,CAAC;AAACiB,OAAA,CAAA5B,MAAA,GAAAA,MAAA"}
|
|
@@ -4,39 +4,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Label = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("../../core");
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
const labelDefaultWeight = "Bold";
|
|
14
|
-
const labelDefaultcolor = "black";
|
|
15
|
-
|
|
9
|
+
var _IOText = require("./IOText");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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); }
|
|
16
13
|
/**
|
|
17
|
-
* `
|
|
14
|
+
* `LabelSmall` typographic style
|
|
18
15
|
*/
|
|
19
|
-
const Label = /*#__PURE__*/_react.
|
|
16
|
+
const Label = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
20
17
|
let {
|
|
21
|
-
|
|
18
|
+
weight: customWeight,
|
|
19
|
+
color: customColor,
|
|
20
|
+
asLink,
|
|
22
21
|
...props
|
|
23
22
|
} = _ref;
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return (0, _Factory.useTypographyFactory)({
|
|
23
|
+
const theme = (0, _core.useIOTheme)();
|
|
24
|
+
const defaultColor = asLink ? theme["interactiveElem-default"] : theme["textBody-tertiary"];
|
|
25
|
+
const LabelProps = {
|
|
28
26
|
...props,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
font: "TitilliumSansPro",
|
|
28
|
+
weight: customWeight ?? "Bold",
|
|
29
|
+
size: 16,
|
|
30
|
+
lineHeight: 24,
|
|
31
|
+
color: customColor ?? defaultColor,
|
|
32
|
+
...(asLink ? {
|
|
33
|
+
accessibilityRole: "link",
|
|
34
|
+
textStyle: {
|
|
35
|
+
textDecorationLine: "underline"
|
|
36
|
+
}
|
|
37
|
+
} : {})
|
|
38
|
+
};
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_IOText.IOText, _extends({
|
|
40
|
+
ref: ref
|
|
41
|
+
}, LabelProps), props.children);
|
|
40
42
|
});
|
|
41
43
|
exports.Label = Label;
|
|
42
44
|
//# sourceMappingURL=Label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_core","_IOText","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","Label","forwardRef","_ref","ref","weight","customWeight","color","customColor","asLink","props","theme","useIOTheme","defaultColor","LabelProps","font","size","lineHeight","accessibilityRole","textStyle","textDecorationLine","createElement","IOText","children","exports"],"sourceRoot":"../../../../src","sources":["components/typography/Label.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC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AK,CAACa,QACD,CAAC;AAEb,CACF,CAAC;AAACC,OAAA,CAAAvB,KAAA,GAAAA,KAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LabelMini = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _core = require("../../core");
|
|
9
|
+
var _IOText = require("./IOText");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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); }
|
|
13
|
+
/**
|
|
14
|
+
* `LabelMini` typographic style
|
|
15
|
+
*/
|
|
16
|
+
const LabelMini = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
weight: customWeight,
|
|
19
|
+
color: customColor,
|
|
20
|
+
asLink,
|
|
21
|
+
...props
|
|
22
|
+
} = _ref;
|
|
23
|
+
const theme = (0, _core.useIOTheme)();
|
|
24
|
+
const defaultColor = asLink ? theme["interactiveElem-default"] : theme["textBody-tertiary"];
|
|
25
|
+
const LabelMiniProps = {
|
|
26
|
+
...props,
|
|
27
|
+
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
28
|
+
font: "TitilliumSansPro",
|
|
29
|
+
weight: customWeight ?? "Bold",
|
|
30
|
+
size: 12,
|
|
31
|
+
lineHeight: 18,
|
|
32
|
+
color: customColor ?? defaultColor,
|
|
33
|
+
...(asLink ? {
|
|
34
|
+
accessibilityRole: "link",
|
|
35
|
+
textStyle: {
|
|
36
|
+
textDecorationLine: "underline"
|
|
37
|
+
}
|
|
38
|
+
} : {})
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_IOText.IOText, _extends({
|
|
41
|
+
ref: ref
|
|
42
|
+
}, LabelMiniProps), props.children);
|
|
43
|
+
});
|
|
44
|
+
exports.LabelMini = LabelMini;
|
|
45
|
+
//# sourceMappingURL=LabelMini.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_core","_IOText","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","LabelMini","forwardRef","_ref","ref","weight","customWeight","color","customColor","asLink","props","theme","useIOTheme","defaultColor","LabelMiniProps","dynamicTypeRamp","font","size","lineHeight","accessibilityRole","textStyle","textDecorationLine","createElement","IOText","children","exports"],"sourceRoot":"../../../../src","sources":["components/typography/LabelMini.tsx"],"mappings":";;;;;;AAAA,IAAAA,M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G,EAAEA;EAAI,GAAKU,cAAc,GACjCJ,KAAK,CAACc,QACD,CAAC;AAEb,CACF,CAAC;AAACC,OAAA,CAAAxB,SAAA,GAAAA,SAAA"}
|
|
@@ -4,42 +4,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.LabelSmall = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("../../core");
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
regular: 14,
|
|
14
|
-
small: 12
|
|
15
|
-
};
|
|
16
|
-
const lineHeightMapping = {
|
|
17
|
-
regular: 21,
|
|
18
|
-
small: 18
|
|
19
|
-
};
|
|
20
|
-
const labelDefaultWeight = "Bold";
|
|
21
|
-
const labelDefaultcolor = "blue";
|
|
22
|
-
|
|
9
|
+
var _IOText = require("./IOText");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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); }
|
|
23
13
|
/**
|
|
24
14
|
* `LabelSmall` typographic style
|
|
25
15
|
*/
|
|
26
|
-
const LabelSmall = /*#__PURE__*/_react.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
const LabelSmall = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
weight: customWeight,
|
|
19
|
+
color: customColor,
|
|
20
|
+
asLink,
|
|
21
|
+
...props
|
|
22
|
+
} = _ref;
|
|
23
|
+
const theme = (0, _core.useIOTheme)();
|
|
24
|
+
const defaultColor = asLink ? theme["interactiveElem-default"] : theme["textBody-tertiary"];
|
|
25
|
+
const LabelSmallProps = {
|
|
31
26
|
...props,
|
|
32
|
-
allowFontScaling: isExperimental,
|
|
33
|
-
maxFontSizeMultiplier: _core.IOVisualCostants.maxFontSizeMultiplier,
|
|
34
27
|
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
font: "TitilliumSansPro",
|
|
29
|
+
weight: customWeight ?? "Bold",
|
|
30
|
+
size: 14,
|
|
31
|
+
lineHeight: 21,
|
|
32
|
+
color: customColor ?? defaultColor,
|
|
33
|
+
...(asLink ? {
|
|
34
|
+
accessibilityRole: "link",
|
|
35
|
+
textStyle: {
|
|
36
|
+
textDecorationLine: "underline"
|
|
37
|
+
}
|
|
38
|
+
} : {})
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_IOText.IOText, _extends({
|
|
41
|
+
ref: ref
|
|
42
|
+
}, LabelSmallProps), props.children);
|
|
43
43
|
});
|
|
44
44
|
exports.LabelSmall = LabelSmall;
|
|
45
45
|
//# sourceMappingURL=LabelSmall.js.map
|