@pagopa/io-app-design-system 1.36.11 → 1.36.12
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/typography/BaseTypography.js +3 -2
- package/lib/commonjs/components/typography/BaseTypography.js.map +1 -1
- package/lib/commonjs/components/typography/Body.js +5 -3
- package/lib/commonjs/components/typography/Body.js.map +1 -1
- package/lib/commonjs/components/typography/BodyMonospace.js +4 -2
- package/lib/commonjs/components/typography/BodyMonospace.js.map +1 -1
- package/lib/commonjs/components/typography/ButtonText.js +5 -3
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/components/typography/Caption.js +5 -3
- package/lib/commonjs/components/typography/Caption.js.map +1 -1
- package/lib/commonjs/components/typography/Chip.js +5 -3
- package/lib/commonjs/components/typography/Chip.js.map +1 -1
- package/lib/commonjs/components/typography/Factory.js +4 -2
- package/lib/commonjs/components/typography/Factory.js.map +1 -1
- package/lib/commonjs/components/typography/H1.js +5 -3
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +5 -3
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +5 -3
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +5 -3
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H5.js +5 -3
- package/lib/commonjs/components/typography/H5.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +5 -3
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +5 -3
- package/lib/commonjs/components/typography/Hero.js.map +1 -1
- package/lib/commonjs/components/typography/Label.js +5 -3
- package/lib/commonjs/components/typography/Label.js.map +1 -1
- package/lib/commonjs/components/typography/LabelHeader.js +5 -3
- package/lib/commonjs/components/typography/LabelHeader.js.map +1 -1
- package/lib/commonjs/components/typography/LabelLink.js +5 -3
- package/lib/commonjs/components/typography/LabelLink.js.map +1 -1
- package/lib/commonjs/components/typography/LabelSmall.js +5 -3
- package/lib/commonjs/components/typography/LabelSmall.js.map +1 -1
- package/lib/commonjs/components/typography/LabelSmallAlt.js +5 -3
- package/lib/commonjs/components/typography/LabelSmallAlt.js.map +1 -1
- package/lib/module/components/typography/BaseTypography.js +3 -2
- package/lib/module/components/typography/BaseTypography.js.map +1 -1
- package/lib/module/components/typography/Body.js +4 -3
- package/lib/module/components/typography/Body.js.map +1 -1
- package/lib/module/components/typography/BodyMonospace.js +3 -2
- package/lib/module/components/typography/BodyMonospace.js.map +1 -1
- package/lib/module/components/typography/ButtonText.js +4 -3
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/components/typography/Caption.js +4 -3
- package/lib/module/components/typography/Caption.js.map +1 -1
- package/lib/module/components/typography/Chip.js +4 -3
- package/lib/module/components/typography/Chip.js.map +1 -1
- package/lib/module/components/typography/Factory.js +4 -2
- package/lib/module/components/typography/Factory.js.map +1 -1
- package/lib/module/components/typography/H1.js +4 -3
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +4 -3
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +4 -3
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +4 -3
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H5.js +4 -3
- package/lib/module/components/typography/H5.js.map +1 -1
- package/lib/module/components/typography/H6.js +4 -3
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +4 -3
- package/lib/module/components/typography/Hero.js.map +1 -1
- package/lib/module/components/typography/Label.js +4 -3
- package/lib/module/components/typography/Label.js.map +1 -1
- package/lib/module/components/typography/LabelHeader.js +4 -3
- package/lib/module/components/typography/LabelHeader.js.map +1 -1
- package/lib/module/components/typography/LabelLink.js +4 -3
- package/lib/module/components/typography/LabelLink.js.map +1 -1
- package/lib/module/components/typography/LabelSmall.js +4 -3
- package/lib/module/components/typography/LabelSmall.js.map +1 -1
- package/lib/module/components/typography/LabelSmallAlt.js +4 -3
- package/lib/module/components/typography/LabelSmallAlt.js.map +1 -1
- package/lib/typescript/components/typography/BaseTypography.d.ts +2 -2
- package/lib/typescript/components/typography/BaseTypography.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts +6 -4
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodyMonospace.d.ts +6 -6
- package/lib/typescript/components/typography/BodyMonospace.d.ts.map +1 -1
- package/lib/typescript/components/typography/ButtonText.d.ts +6 -4
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/components/typography/Caption.d.ts +6 -9
- package/lib/typescript/components/typography/Caption.d.ts.map +1 -1
- package/lib/typescript/components/typography/Chip.d.ts +6 -6
- package/lib/typescript/components/typography/Chip.d.ts.map +1 -1
- package/lib/typescript/components/typography/Factory.d.ts +2 -1
- package/lib/typescript/components/typography/Factory.d.ts.map +1 -1
- package/lib/typescript/components/typography/H1.d.ts +6 -6
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H2.d.ts +6 -6
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +6 -6
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H4.d.ts +6 -6
- package/lib/typescript/components/typography/H4.d.ts.map +1 -1
- package/lib/typescript/components/typography/H5.d.ts +6 -9
- package/lib/typescript/components/typography/H5.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts +6 -4
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/Hero.d.ts +6 -6
- package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
- package/lib/typescript/components/typography/Label.d.ts +3 -2
- package/lib/typescript/components/typography/Label.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelHeader.d.ts +6 -4
- package/lib/typescript/components/typography/LabelHeader.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelLink.d.ts +3 -2
- package/lib/typescript/components/typography/LabelLink.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelSmall.d.ts +3 -2
- package/lib/typescript/components/typography/LabelSmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts +6 -4
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/typography/BaseTypography.tsx +4 -4
- package/src/components/typography/Body.tsx +14 -9
- package/src/components/typography/BodyMonospace.tsx +15 -8
- package/src/components/typography/ButtonText.tsx +21 -14
- package/src/components/typography/Caption.tsx +17 -12
- package/src/components/typography/Chip.tsx +14 -9
- package/src/components/typography/Factory.tsx +6 -2
- package/src/components/typography/H1.tsx +17 -12
- package/src/components/typography/H2.tsx +17 -12
- package/src/components/typography/H3.tsx +17 -12
- package/src/components/typography/H4.tsx +17 -12
- package/src/components/typography/H5.tsx +19 -14
- package/src/components/typography/H6.tsx +17 -12
- package/src/components/typography/Hero.tsx +17 -12
- package/src/components/typography/Label.tsx +24 -15
- package/src/components/typography/LabelHeader.tsx +25 -18
- package/src/components/typography/LabelLink.tsx +23 -18
- package/src/components/typography/LabelSmall.tsx +24 -17
- package/src/components/typography/LabelSmallAlt.tsx +20 -13
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
1
3
|
import { IOTheme, useIOExperimentalDesign } from "../../core";
|
|
2
4
|
import { FontFamily, IOFontWeight } from "../../utils/fonts";
|
|
3
5
|
import { useTypographyFactory } from "./Factory";
|
|
@@ -20,19 +22,22 @@ const defaultWeight: AllowedWeight = "SemiBold";
|
|
|
20
22
|
/**
|
|
21
23
|
* `H5` typographic style
|
|
22
24
|
*/
|
|
23
|
-
export const H5 = (props
|
|
25
|
+
export const H5 = React.forwardRef<View, H5Props>((props, ref) => {
|
|
24
26
|
const { isExperimental } = useIOExperimentalDesign();
|
|
25
27
|
|
|
26
|
-
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
28
|
+
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
29
|
+
{
|
|
30
|
+
...props,
|
|
31
|
+
defaultWeight,
|
|
32
|
+
defaultColor,
|
|
33
|
+
font: isExperimental ? font : legacyFont,
|
|
34
|
+
fontStyle: {
|
|
35
|
+
fontSize: h5FontSize,
|
|
36
|
+
lineHeight: h5LineHeight,
|
|
37
|
+
textTransform: "uppercase",
|
|
38
|
+
letterSpacing: 0.5
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
ref
|
|
42
|
+
);
|
|
43
|
+
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
1
3
|
import { IOTheme, IOThemeLight, useIOExperimentalDesign } from "../../core";
|
|
2
4
|
import { FontFamily, IOFontWeight } from "../../utils/fonts";
|
|
3
5
|
import { useTypographyFactory } from "./Factory";
|
|
@@ -26,17 +28,20 @@ const legacyDefaultWeight: AllowedWeight = "SemiBold";
|
|
|
26
28
|
/**
|
|
27
29
|
* `H6` typographic style
|
|
28
30
|
*/
|
|
29
|
-
export const H6 = (props
|
|
31
|
+
export const H6 = React.forwardRef<View, H6Props>((props, ref) => {
|
|
30
32
|
const { isExperimental } = useIOExperimentalDesign();
|
|
31
33
|
|
|
32
|
-
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
34
|
+
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
35
|
+
{
|
|
36
|
+
...props,
|
|
37
|
+
defaultWeight: isExperimental ? h6DefaultWeight : legacyDefaultWeight,
|
|
38
|
+
defaultColor: h6DefaultColor,
|
|
39
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
40
|
+
fontStyle: {
|
|
41
|
+
fontSize: isExperimental ? h6FontSize : legacyFontSize,
|
|
42
|
+
lineHeight: isExperimental ? h6LineHeight : legacyLineHeight
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
ref
|
|
46
|
+
);
|
|
47
|
+
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
1
3
|
import { useIOExperimentalDesign, IOTheme } from "../../core";
|
|
2
4
|
import { FontFamily, IOFontWeight } from "../../utils/fonts";
|
|
3
5
|
import { useTypographyFactory } from "./Factory";
|
|
@@ -25,17 +27,20 @@ const legacyHeroLineHeight = 49;
|
|
|
25
27
|
/**
|
|
26
28
|
* `Hero` typographic style
|
|
27
29
|
*/
|
|
28
|
-
export const Hero = (props
|
|
30
|
+
export const Hero = React.forwardRef<View, HeroProps>((props, ref) => {
|
|
29
31
|
const { isExperimental } = useIOExperimentalDesign();
|
|
30
32
|
|
|
31
|
-
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
33
|
+
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
34
|
+
{
|
|
35
|
+
...props,
|
|
36
|
+
defaultWeight: isExperimental ? defaultWeight : legacyWeight,
|
|
37
|
+
defaultColor,
|
|
38
|
+
font: isExperimental ? font : legacyFont,
|
|
39
|
+
fontStyle: {
|
|
40
|
+
fontSize: isExperimental ? heroFontSize : legacyHeroFontSize,
|
|
41
|
+
lineHeight: isExperimental ? heroLineHeight : legacyHeroLineHeight
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
ref
|
|
45
|
+
);
|
|
46
|
+
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
1
3
|
import {
|
|
2
4
|
IOColors,
|
|
3
5
|
IOColorsStatusForeground,
|
|
@@ -28,19 +30,26 @@ const labelDefaultcolor = "black";
|
|
|
28
30
|
/**
|
|
29
31
|
* `Label` typographic style
|
|
30
32
|
*/
|
|
31
|
-
export const Label =
|
|
32
|
-
|
|
33
|
+
export const Label = React.forwardRef<View, LabelProps>(
|
|
34
|
+
({ fontSize, ...props }, ref) => {
|
|
35
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
defaultWeight: labelDefaultWeight,
|
|
41
|
+
defaultColor: labelDefaultcolor,
|
|
42
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
43
|
+
fontStyle: {
|
|
44
|
+
fontSize: fontSize
|
|
45
|
+
? fontSizeMapping[fontSize]
|
|
46
|
+
: fontSizeMapping.regular,
|
|
47
|
+
lineHeight: fontSize
|
|
48
|
+
? lineHeightMapping[fontSize]
|
|
49
|
+
: lineHeightMapping.regular
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
ref
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { View } from "react-native";
|
|
2
|
+
import React from "react";
|
|
1
3
|
import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
|
|
2
4
|
import { IOTheme, IOThemeLight, useIOExperimentalDesign } from "../../core";
|
|
3
5
|
import { useTypographyFactory } from "./Factory";
|
|
@@ -29,21 +31,26 @@ const legacyLabelHeaderLineHeight = 20;
|
|
|
29
31
|
/**
|
|
30
32
|
* `LabelHeader` typographic style
|
|
31
33
|
*/
|
|
32
|
-
export const LabelHeader =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
34
|
+
export const LabelHeader = React.forwardRef<View, LabelHeaderProps>(
|
|
35
|
+
(props, ref) => {
|
|
36
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
37
|
+
// console.log("isExperimental", isExperimental);
|
|
38
|
+
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
39
|
+
{
|
|
40
|
+
...props,
|
|
41
|
+
defaultWeight: isExperimental
|
|
42
|
+
? labelHeaderDefaultWeight
|
|
43
|
+
: legacyLabelHeaderWeight,
|
|
44
|
+
defaultColor: labelHeaderDefaultColor,
|
|
45
|
+
font: isExperimental ? labelHeaderFontName : legacyLabelHeaderFontName,
|
|
46
|
+
fontStyle: {
|
|
47
|
+
fontSize: labelHeaderFontSize,
|
|
48
|
+
lineHeight: isExperimental
|
|
49
|
+
? labelHeaderLineHeight
|
|
50
|
+
: legacyLabelHeaderLineHeight
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
ref
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
1
3
|
import { useIOExperimentalDesign, type IOColors } from "../../core";
|
|
2
4
|
import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
|
|
3
5
|
import { useTypographyFactory } from "./Factory";
|
|
@@ -29,23 +31,26 @@ export const linkDefaultWeight: AllowedWeight = "SemiBold";
|
|
|
29
31
|
/**
|
|
30
32
|
* `Link` typographic style
|
|
31
33
|
*/
|
|
32
|
-
export const LabelLink = (props
|
|
34
|
+
export const LabelLink = React.forwardRef<View, LinkProps>((props, ref) => {
|
|
33
35
|
const { isExperimental } = useIOExperimentalDesign();
|
|
34
36
|
|
|
35
|
-
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
37
|
+
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
38
|
+
{
|
|
39
|
+
accessibilityRole: props.onPress ? "link" : undefined,
|
|
40
|
+
...props,
|
|
41
|
+
defaultWeight: linkDefaultWeight,
|
|
42
|
+
defaultColor: isExperimental ? linkDefaultColor : linkLegacyDefaultColor,
|
|
43
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
44
|
+
fontStyle: {
|
|
45
|
+
fontSize: props.fontSize
|
|
46
|
+
? fontSizeMapping[props.fontSize]
|
|
47
|
+
: fontSizeMapping.regular,
|
|
48
|
+
lineHeight: props.fontSize
|
|
49
|
+
? lineHeightMapping[props.fontSize]
|
|
50
|
+
: lineHeightMapping.regular,
|
|
51
|
+
textDecorationLine: "underline"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
ref
|
|
55
|
+
);
|
|
56
|
+
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
1
3
|
import { IOColors, IOTheme, useIOExperimentalDesign } from "../../core";
|
|
2
4
|
import { FontFamily, IOFontWeight } from "../../utils/fonts";
|
|
3
5
|
import { useTypographyFactory } from "./Factory";
|
|
@@ -41,21 +43,26 @@ const labelDefaultcolor = "blue";
|
|
|
41
43
|
/**
|
|
42
44
|
* `LabelSmall` typographic style
|
|
43
45
|
*/
|
|
44
|
-
export const LabelSmall =
|
|
45
|
-
|
|
46
|
+
export const LabelSmall = React.forwardRef<View, LabelSmallProps>(
|
|
47
|
+
(props, ref) => {
|
|
48
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
46
49
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
50
|
+
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
51
|
+
{
|
|
52
|
+
...props,
|
|
53
|
+
defaultWeight: labelDefaultWeight,
|
|
54
|
+
defaultColor: labelDefaultcolor,
|
|
55
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
56
|
+
fontStyle: {
|
|
57
|
+
fontSize: props.fontSize
|
|
58
|
+
? fontSizeMapping[props.fontSize]
|
|
59
|
+
: fontSizeMapping.regular,
|
|
60
|
+
lineHeight: props.fontSize
|
|
61
|
+
? lineHeightMapping[props.fontSize]
|
|
62
|
+
: lineHeightMapping.regular
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
ref
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
1
3
|
import { useIOExperimentalDesign } from "../../core";
|
|
2
4
|
import type { IOColors, IOTheme } from "../../core/IOColors";
|
|
3
5
|
import { FontFamily, IOFontWeight } from "../../utils/fonts";
|
|
@@ -35,17 +37,22 @@ const legacyDefaultWeight: AllowedWeight = "SemiBold";
|
|
|
35
37
|
/**
|
|
36
38
|
* `LabelSmallAlt` typographic style. It's referenced as `LabelSmallReadex` in the design projects.
|
|
37
39
|
*/
|
|
38
|
-
export const LabelSmallAlt =
|
|
39
|
-
|
|
40
|
+
export const LabelSmallAlt = React.forwardRef<View, LabelSmallAltProps>(
|
|
41
|
+
(props, ref) => {
|
|
42
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
44
|
+
return useTypographyFactory<AllowedWeight, AllowedColors>(
|
|
45
|
+
{
|
|
46
|
+
...props,
|
|
47
|
+
defaultWeight: isExperimental ? defaultWeight : legacyDefaultWeight,
|
|
48
|
+
defaultColor,
|
|
49
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
50
|
+
fontStyle: {
|
|
51
|
+
fontSize: isExperimental ? labelFontSize : legacyLabelFontSize,
|
|
52
|
+
lineHeight: labelLineHeight
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
ref
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|