@contentful/f36-typography 4.0.1-next-v4-10916.2480 → 4.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [4.1.1](https://github.com/contentful/forma-36/compare/@contentful/f36-typography@4.1.0...@contentful/f36-typography@4.1.1) (2022-01-31)
7
+
8
+ **Note:** Version bump only for package @contentful/f36-typography
9
+
10
+
11
+
12
+
13
+
14
+ # [4.1.0](https://github.com/contentful/forma-36/compare/@contentful/f36-typography@4.0.1...@contentful/f36-typography@4.1.0) (2022-01-31)
15
+
16
+
17
+ ### Features
18
+
19
+ * implement props list redesign [BAU-535] ([#1756](https://github.com/contentful/forma-36/issues/1756)) ([21c57e7](https://github.com/contentful/forma-36/commit/21c57e72008b75990d03af4e7500edc1c7f3d26d))
20
+
21
+
22
+
23
+
24
+
25
+ ## [4.0.1](https://github.com/contentful/forma-36/compare/@contentful/f36-typography@4.0.0...@contentful/f36-typography@4.0.1) (2022-01-11)
26
+
27
+ **Note:** Version bump only for package @contentful/f36-typography
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # @contentful/f36-typography
2
2
 
3
- This package is part of the pre-release. This means it is unsupported and subject to breaking changes without warning.
3
+ This package contains:
4
4
 
5
- Please use official, supported version of the library [forma-36](https://github.com/contentful/forma-36/tree/master/packages/forma-36-react-components), [NPM](https://www.npmjs.com/package/@contentful/forma-36-react-components).
5
+ - [DisplayText](./src/DisplayText)
6
+ - [Heading](./src/Heading)
7
+ - [Paragraph](./src/Paragraph)
8
+ - [SectionHeading](./src/SectionHeading)
9
+ - [Subheading](./src/Subheading)
10
+ - [Text](./src/Text)
package/dist/main.js CHANGED
@@ -10,50 +10,51 @@ function $parcel$interopDefault(a) {
10
10
  return a && a.__esModule ? a.default : a;
11
11
  }
12
12
 
13
- $parcel$export(module.exports, "Heading", () => $edf6509e8a752df1$export$a8a3e93435678ff9);
14
- $parcel$export(module.exports, "Subheading", () => $831292c032eb183f$export$5404b1d39162d870);
13
+ $parcel$export(module.exports, "Heading", () => $aed473276ff40f9d$export$a8a3e93435678ff9);
14
+ $parcel$export(module.exports, "Subheading", () => $c0b2d07258fbc250$export$5404b1d39162d870);
15
15
  $parcel$export(module.exports, "Typography", () => $d22050ec5fdf0a29$export$1c6175f3aa4394b7);
16
- $parcel$export(module.exports, "DisplayText", () => $2918aeb7dafaacc0$export$60374ee25b7d5e87);
17
- $parcel$export(module.exports, "SectionHeading", () => $6b033735b9eed406$export$72d7ca7a5d1d4807);
18
- $parcel$export(module.exports, "Paragraph", () => $4236a7ca048922f6$export$358a232cca1ab2ac);
19
- $parcel$export(module.exports, "Text", () => $dd9fe96501c8d4c8$export$5f1af8db9871e1d6);
16
+ $parcel$export(module.exports, "DisplayText", () => $59b96b1e38e96d26$export$60374ee25b7d5e87);
17
+ $parcel$export(module.exports, "SectionHeading", () => $3b7c6104984db66e$export$72d7ca7a5d1d4807);
18
+ $parcel$export(module.exports, "Paragraph", () => $4f59377d0a2c685b$export$358a232cca1ab2ac);
19
+ $parcel$export(module.exports, "Text", () => $614d2e96c3b19fc3$export$5f1af8db9871e1d6);
20
20
 
21
21
 
22
22
 
23
23
 
24
24
 
25
25
 
26
- const $dd9fe96501c8d4c8$var$TEXT_DEFAULT_TAG = 'span';
27
- function $dd9fe96501c8d4c8$var$truncatedStyle() {
26
+ const $614d2e96c3b19fc3$var$TEXT_DEFAULT_TAG = 'span';
27
+ function $614d2e96c3b19fc3$var$truncatedStyle() {
28
28
  return(/*#__PURE__*/ $5fdCT$emotion.css({
29
29
  name: "8uhtka",
30
30
  styles: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"
31
31
  }));
32
32
  }
33
- function $dd9fe96501c8d4c8$var$_Text({ fontSize: fontSize = 'fontSizeM' , fontStack: fontStack = 'fontStackPrimary' , fontWeight: fontWeight = 'fontWeightNormal' , fontColor: fontColor = 'gray800' , lineHeight: lineHeight = 'lineHeightM' , children: children , isTruncated: isTruncated , as: as , className: className , margin: margin = 'none' , ...otherProps }, ref) {
34
- const Element = as || $dd9fe96501c8d4c8$var$TEXT_DEFAULT_TAG;
35
- return(/*#__PURE__*/ $parcel$interopDefault($5fdCT$react).createElement($5fdCT$contentfulf36core.Box, {
33
+ function $614d2e96c3b19fc3$var$_Text({ fontSize: fontSize = 'fontSizeM' , fontStack: fontStack = 'fontStackPrimary' , fontWeight: fontWeight = 'fontWeightNormal' , fontColor: fontColor = 'gray800' , lineHeight: lineHeight = 'lineHeightM' , children: children , isTruncated: isTruncated , as: as , className: className , margin: margin = 'none' , ...otherProps }, ref) {
34
+ const Element = as || $614d2e96c3b19fc3$var$TEXT_DEFAULT_TAG;
35
+ return(/*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).createElement($5fdCT$contentfulf36core.Box, {
36
36
  ...otherProps,
37
37
  as: Element,
38
38
  className: $5fdCT$emotion.cx(/*#__PURE__*/ $5fdCT$emotion.css({
39
39
  padding: 0,
40
- fontFamily: $parcel$interopDefault($5fdCT$contentfulf36tokens)[fontStack],
41
- fontWeight: $parcel$interopDefault($5fdCT$contentfulf36tokens)[fontWeight],
42
- color: $parcel$interopDefault($5fdCT$contentfulf36tokens)[fontColor],
43
- fontSize: $parcel$interopDefault($5fdCT$contentfulf36tokens)[fontSize],
44
- lineHeight: $parcel$interopDefault($5fdCT$contentfulf36tokens)[lineHeight]
45
- }), isTruncated ? $dd9fe96501c8d4c8$var$truncatedStyle() : null, className),
40
+ fontFamily: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[fontStack],
41
+ fontWeight: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[fontWeight],
42
+ color: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[fontColor],
43
+ fontSize: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[fontSize],
44
+ lineHeight: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[lineHeight]
45
+ }), isTruncated ? $614d2e96c3b19fc3$var$truncatedStyle() : null, className),
46
46
  margin: margin,
47
47
  ref: ref
48
48
  }, children));
49
49
  }
50
- const $dd9fe96501c8d4c8$export$5f1af8db9871e1d6 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($dd9fe96501c8d4c8$var$_Text);
50
+ const $614d2e96c3b19fc3$export$5f1af8db9871e1d6 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($614d2e96c3b19fc3$var$_Text);
51
51
 
52
52
 
53
- const $edf6509e8a752df1$var$HEADING_DEFAULT_TAG = 'h1';
54
- function $edf6509e8a752df1$var$_Heading({ children: children , testId: testId = 'cf-ui-heading' , ...otherProps }, ref) {
55
- return(/*#__PURE__*/ $parcel$interopDefault($5fdCT$react).createElement($dd9fe96501c8d4c8$export$5f1af8db9871e1d6, {
56
- as: $edf6509e8a752df1$var$HEADING_DEFAULT_TAG,
53
+
54
+ const $aed473276ff40f9d$var$HEADING_DEFAULT_TAG = 'h1';
55
+ function $aed473276ff40f9d$var$_Heading({ children: children , testId: testId = 'cf-ui-heading' , ...otherProps }, ref) {
56
+ return(/*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).createElement($614d2e96c3b19fc3$export$5f1af8db9871e1d6, {
57
+ as: $aed473276ff40f9d$var$HEADING_DEFAULT_TAG,
57
58
  testId: testId,
58
59
  marginBottom: "spacingM",
59
60
  fontWeight: "fontWeightDemiBold",
@@ -64,15 +65,16 @@ function $edf6509e8a752df1$var$_Heading({ children: children , testId: testId =
64
65
  ref: ref
65
66
  }, children));
66
67
  }
67
- const $edf6509e8a752df1$export$a8a3e93435678ff9 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($edf6509e8a752df1$var$_Heading);
68
+ const $aed473276ff40f9d$export$a8a3e93435678ff9 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($aed473276ff40f9d$var$_Heading);
69
+
68
70
 
69
71
 
70
72
 
71
73
 
72
- const $831292c032eb183f$var$SUBHEADING_DEFAULT_TAG = 'h2';
73
- function $831292c032eb183f$var$_Subheading({ children: children , testId: testId = 'cf-ui-subheading' , ...otherProps }, ref) {
74
- return(/*#__PURE__*/ $parcel$interopDefault($5fdCT$react).createElement($dd9fe96501c8d4c8$export$5f1af8db9871e1d6, {
75
- as: $831292c032eb183f$var$SUBHEADING_DEFAULT_TAG,
74
+ const $c0b2d07258fbc250$var$SUBHEADING_DEFAULT_TAG = 'h3';
75
+ function $c0b2d07258fbc250$var$_Subheading({ children: children , testId: testId = 'cf-ui-subheading' , ...otherProps }, ref) {
76
+ return(/*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).createElement($614d2e96c3b19fc3$export$5f1af8db9871e1d6, {
77
+ as: $c0b2d07258fbc250$var$SUBHEADING_DEFAULT_TAG,
76
78
  testId: testId,
77
79
  marginBottom: "spacingM",
78
80
  fontSize: "fontSizeL",
@@ -83,7 +85,8 @@ function $831292c032eb183f$var$_Subheading({ children: children , testId: testId
83
85
  ref: ref
84
86
  }, children));
85
87
  }
86
- const $831292c032eb183f$export$5404b1d39162d870 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($831292c032eb183f$var$_Subheading);
88
+ const $c0b2d07258fbc250$export$5404b1d39162d870 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($c0b2d07258fbc250$var$_Subheading);
89
+
87
90
 
88
91
 
89
92
 
@@ -91,25 +94,22 @@ function $d22050ec5fdf0a29$export$1c6175f3aa4394b7(props) {
91
94
  $5fdCT$react.useEffect(()=>{
92
95
  console.warn('Forma 36: Typography component is deprecated. You can safely remove it from your components.');
93
96
  }, []);
94
- return(/*#__PURE__*/ $parcel$interopDefault($5fdCT$react).createElement($parcel$interopDefault($5fdCT$react).Fragment, null, props.children));
97
+ return(/*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).createElement(($parcel$interopDefault($5fdCT$react)).Fragment, null, props.children));
95
98
  }
96
99
 
97
100
 
98
101
 
99
102
 
100
- const $2918aeb7dafaacc0$var$DISPLAY_TEXT_DEFAULT_TAG = 'h1';
101
- function $2918aeb7dafaacc0$var$_DisplayText({ children: children , size: size = 'default' , testId: testId = 'cf-ui-display-text' , as: as , ...otherProps }, ref) {
103
+ const $59b96b1e38e96d26$var$DISPLAY_TEXT_DEFAULT_TAG = 'h2';
104
+ function $59b96b1e38e96d26$var$_DisplayText({ children: children , size: size = 'default' , testId: testId = 'cf-ui-display-text' , ...otherProps }, ref) {
102
105
  let fontSize = 'fontSize2Xl';
103
106
  let lineHeight = 'lineHeight2Xl';
104
- if (size === 'huge') {
105
- fontSize = 'fontSize4Xl';
106
- lineHeight = 'lineHeight4Xl';
107
- } else if (size === 'large') {
107
+ if (size === 'large') {
108
108
  fontSize = 'fontSize3Xl';
109
109
  lineHeight = 'lineHeight3Xl';
110
110
  }
111
- return(/*#__PURE__*/ $parcel$interopDefault($5fdCT$react).createElement($dd9fe96501c8d4c8$export$5f1af8db9871e1d6, {
112
- as: $2918aeb7dafaacc0$var$DISPLAY_TEXT_DEFAULT_TAG,
111
+ return(/*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).createElement($614d2e96c3b19fc3$export$5f1af8db9871e1d6, {
112
+ as: $59b96b1e38e96d26$var$DISPLAY_TEXT_DEFAULT_TAG,
113
113
  testId: testId,
114
114
  marginBottom: size === 'default' ? 'spacingL' : 'spacingXl',
115
115
  fontSize: fontSize,
@@ -120,7 +120,7 @@ function $2918aeb7dafaacc0$var$_DisplayText({ children: children , size: size =
120
120
  ref: ref
121
121
  }, children));
122
122
  }
123
- const $2918aeb7dafaacc0$export$60374ee25b7d5e87 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($2918aeb7dafaacc0$var$_DisplayText);
123
+ const $59b96b1e38e96d26$export$60374ee25b7d5e87 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($59b96b1e38e96d26$var$_DisplayText);
124
124
 
125
125
 
126
126
 
@@ -128,10 +128,11 @@ const $2918aeb7dafaacc0$export$60374ee25b7d5e87 = /*#__PURE__*/ $parcel$interopD
128
128
 
129
129
 
130
130
 
131
- const $6b033735b9eed406$var$SECTION_HEADING_DEFAULT_TAG = 'h3';
132
- function $6b033735b9eed406$var$_SectionHeading({ children: children , className: className , testId: testId = 'cf-ui-section-heading' , ...otherProps }, ref) {
133
- return(/*#__PURE__*/ $parcel$interopDefault($5fdCT$react).createElement($dd9fe96501c8d4c8$export$5f1af8db9871e1d6, {
134
- as: $6b033735b9eed406$var$SECTION_HEADING_DEFAULT_TAG,
131
+
132
+ const $3b7c6104984db66e$var$SECTION_HEADING_DEFAULT_TAG = 'h2';
133
+ function $3b7c6104984db66e$var$_SectionHeading({ children: children , className: className , testId: testId = 'cf-ui-section-heading' , ...otherProps }, ref) {
134
+ return(/*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).createElement($614d2e96c3b19fc3$export$5f1af8db9871e1d6, {
135
+ as: $3b7c6104984db66e$var$SECTION_HEADING_DEFAULT_TAG,
135
136
  testId: testId,
136
137
  marginBottom: "spacingL",
137
138
  fontWeight: "fontWeightDemiBold",
@@ -139,20 +140,21 @@ function $6b033735b9eed406$var$_SectionHeading({ children: children , className:
139
140
  fontSize: "fontSizeS",
140
141
  lineHeight: "lineHeightS",
141
142
  className: $5fdCT$emotion.cx(/*#__PURE__*/ $5fdCT$emotion.css({
142
- letterSpacing: $parcel$interopDefault($5fdCT$contentfulf36tokens).letterSpacingWide,
143
+ letterSpacing: ($parcel$interopDefault($5fdCT$contentfulf36tokens)).letterSpacingWide,
143
144
  textTransform: 'uppercase'
144
145
  }), className),
145
146
  ...otherProps,
146
147
  ref: ref
147
148
  }, children));
148
149
  }
149
- const $6b033735b9eed406$export$72d7ca7a5d1d4807 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($6b033735b9eed406$var$_SectionHeading);
150
+ const $3b7c6104984db66e$export$72d7ca7a5d1d4807 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($3b7c6104984db66e$var$_SectionHeading);
151
+
150
152
 
151
153
 
152
154
 
153
155
 
154
- const $4236a7ca048922f6$export$358a232cca1ab2ac = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef(({ children: children , testId: testId = 'cf-ui-paragraph' , ...otherProps }, ref)=>{
155
- return(/*#__PURE__*/ $parcel$interopDefault($5fdCT$react).createElement($dd9fe96501c8d4c8$export$5f1af8db9871e1d6, {
156
+ const $4f59377d0a2c685b$export$358a232cca1ab2ac = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef(({ children: children , testId: testId = 'cf-ui-paragraph' , ...otherProps }, ref)=>{
157
+ return(/*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).createElement($614d2e96c3b19fc3$export$5f1af8db9871e1d6, {
156
158
  as: "p",
157
159
  testId: testId,
158
160
  marginBottom: "spacingM",
@@ -161,7 +163,8 @@ const $4236a7ca048922f6$export$358a232cca1ab2ac = /*#__PURE__*/ $parcel$interopD
161
163
  ref: ref
162
164
  }, children));
163
165
  });
164
- $4236a7ca048922f6$export$358a232cca1ab2ac.displayName = 'Paragraph';
166
+ $4f59377d0a2c685b$export$358a232cca1ab2ac.displayName = 'Paragraph';
167
+
165
168
 
166
169
 
167
170
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AE2BA,KAAA,CAAM+C,sCAAgB,GAAG,CAAzB;SAESC,oCAAT,GAA0B,CAA1B;IACE,MAAA,CAAA,EAAO,AAAP,SAAO,AAAP,EAAO,CAAA,kBAAP,CAAA,CAAA;QAAO,IAAA,EAAA,CAAA;QAAA,MAAA,EAAA,CAAA;IAAA,CAAA;AAKR,CAAA;SAMQC,2BAAK,CACZ,CADF,WAEIP,QAAQ,GAAG,CADb,w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AACkB,UAAU,EACtC,CADH,WACKV,QAAF,WAAYM,MAAM,GAAG,CAArB,sBAA2CC,UAAH,CAAxC,CAAD,EAA0DC,GAA1D,GAAkE,CAAjE;IACC,MAAA,kEACG,yCAAD;QACE,EAAA,EAAG,CADL;QAEE,MAAA,EAAQF,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;WAKMC,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHR,QAAD;AAGL,CAdsB;AAiBzBZ,yCAAS,CAACiE,WAAV,GAAwB,CAAxB;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading.tsx","packages/components/typography/src/Text.tsx","packages/components/typography/src/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText.tsx","packages/components/typography/src/SectionHeading.tsx","packages/components/typography/src/Paragraph.tsx"],"sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n","import React from 'react';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n} from '@contentful/f36-core';\nimport { Text } from './Text';\n\nconst HEADING_DEFAULT_TAG = 'h1';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n children?: React.ReactNode;\n isTruncated?: boolean;\n}\n\nexport type HeadingProps<\n E extends React.ElementType = typeof HEADING_DEFAULT_TAG\n> = PolymorphicProps<HeadingInternalProps, E>;\n\nfunction _Heading<E extends React.ElementType = typeof HEADING_DEFAULT_TAG>(\n { children, testId = 'cf-ui-heading', ...otherProps }: HeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeXl\"\n lineHeight=\"lineHeightXl\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const Heading: PolymorphicComponent<\n HeadingInternalProps,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\n","import React from 'react';\nimport tokens, {\n FontSizeTokens,\n LineHeightTokens,\n FontWeightTokens,\n FontStackTokens,\n ColorTokens,\n} from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n Box,\n} from '@contentful/f36-core';\n\nexport interface TextInternalProps extends CommonProps, MarginProps {\n children?: React.ReactNode;\n fontSize?: FontSizeTokens;\n lineHeight?: LineHeightTokens;\n fontStack?: FontStackTokens;\n fontWeight?: FontWeightTokens;\n fontColor?: ColorTokens;\n isTruncated?: boolean;\n}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n });\n}\n\nexport type TextProps<\n E extends React.ElementType = typeof TEXT_DEFAULT_TAG\n> = PolymorphicProps<TextInternalProps, E>;\n\nfunction _Text<E extends React.ElementType = typeof TEXT_DEFAULT_TAG>(\n {\n fontSize = 'fontSizeM',\n fontStack = 'fontStackPrimary',\n fontWeight = 'fontWeightNormal',\n fontColor = 'gray800',\n lineHeight = 'lineHeightM',\n children,\n isTruncated,\n as,\n className,\n margin = 'none',\n ...otherProps\n }: TextProps<E>,\n ref: React.Ref<any>,\n) {\n const Element: React.ElementType = as || TEXT_DEFAULT_TAG;\n\n return (\n <Box\n {...otherProps}\n as={Element}\n className={cx(\n css({\n padding: 0,\n fontFamily: tokens[fontStack],\n fontWeight: tokens[fontWeight],\n color: tokens[fontColor],\n fontSize: tokens[fontSize],\n lineHeight: tokens[lineHeight],\n }),\n isTruncated ? truncatedStyle() : null,\n className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\nexport const Text: PolymorphicComponent<\n TextInternalProps,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","import React from 'react';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from './Heading';\nimport { Text } from './Text';\n\nconst SUBHEADING_DEFAULT_TAG = 'h2';\n\nexport interface SubheadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type SubheadingProps<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n> = PolymorphicProps<SubheadingInternalProps, E>;\n\nfunction _Subheading<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n>(\n { children, testId = 'cf-ui-subheading', ...otherProps }: SubheadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SUBHEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontSize=\"fontSizeL\"\n lineHeight=\"lineHeightL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const Subheading: PolymorphicComponent<\n SubheadingInternalProps,\n typeof SUBHEADING_DEFAULT_TAG\n> = React.forwardRef(_Subheading);\n","import React, { useEffect } from 'react';\n\nexport interface TypographyProps {\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nexport function Typography(props: TypographyProps) {\n useEffect(() => {\n console.warn(\n 'Forma 36: Typography component is deprecated. You can safely remove it from your components.',\n );\n }, []);\n return <>{props.children}</>;\n}\n","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n} from '@contentful/f36-core';\nimport { Text } from './Text';\nimport type { HeadingElement } from './Heading';\n\nconst DISPLAY_TEXT_DEFAULT_TAG = 'h1';\n\nexport interface DisplayTextInternalProps extends CommonProps, MarginProps {\n size?: 'default' | 'large' | 'huge';\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type DisplayTextProps<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n> = PolymorphicProps<DisplayTextInternalProps, E>;\n\nfunction _DisplayText<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n>(\n {\n children,\n size = 'default',\n testId = 'cf-ui-display-text',\n as,\n ...otherProps\n }: DisplayTextProps<E>,\n ref: React.Ref<any>,\n) {\n let fontSize: FontSizeTokens = 'fontSize2Xl';\n let lineHeight: LineHeightTokens = 'lineHeight2Xl';\n\n if (size === 'huge') {\n fontSize = 'fontSize4Xl';\n lineHeight = 'lineHeight4Xl';\n } else if (size === 'large') {\n fontSize = 'fontSize3Xl';\n lineHeight = 'lineHeight3Xl';\n }\n\n return (\n <Text\n as={DISPLAY_TEXT_DEFAULT_TAG}\n testId={testId}\n marginBottom={size === 'default' ? 'spacingL' : 'spacingXl'}\n fontSize={fontSize}\n lineHeight={lineHeight}\n fontColor=\"gray900\"\n fontWeight=\"fontWeightDemiBold\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const DisplayText: PolymorphicComponent<\n DisplayTextInternalProps,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from './Heading';\nimport { Text } from './Text';\n\nconst SECTION_HEADING_DEFAULT_TAG = 'h3';\n\nexport interface SectionHeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type SectionHeadingProps<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n> = PolymorphicProps<SectionHeadingInternalProps, E>;\n\nfunction _SectionHeading<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n>(\n {\n children,\n className,\n testId = 'cf-ui-section-heading',\n ...otherProps\n }: SectionHeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SECTION_HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeS\"\n lineHeight=\"lineHeightS\"\n className={cx(\n css({\n letterSpacing: tokens.letterSpacingWide,\n textTransform: 'uppercase',\n }),\n className,\n )}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const SectionHeading: PolymorphicComponent<\n SectionHeadingInternalProps,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","import React from 'react';\nimport {\n PropsWithHTMLElement,\n CommonProps,\n MarginProps,\n} from '@contentful/f36-core';\nimport { Text } from './Text';\n\nexport type ParagraphInternalProps = CommonProps &\n MarginProps & {\n children: React.ReactNode;\n isTruncated?: boolean;\n };\n\nexport type ParagraphProps = PropsWithHTMLElement<ParagraphInternalProps, 'p'>;\n\nexport const Paragraph = React.forwardRef<HTMLParagraphElement, ParagraphProps>(\n ({ children, testId = 'cf-ui-paragraph', ...otherProps }, ref) => {\n return (\n <Text\n as=\"p\"\n testId={testId}\n marginBottom=\"spacingM\"\n lineHeight=\"lineHeightM\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n },\n);\n\nParagraph.displayName = 'Paragraph';\n"],"names":["Heading","HeadingProps","HeadingElement","Subheading","SubheadingProps","Typography","TypographyProps","DisplayText","DisplayTextProps","SectionHeading","SectionHeadingProps","Paragraph","ParagraphProps","Text","TextProps","React","CommonProps","MarginProps","PolymorphicComponent","PolymorphicProps","HEADING_DEFAULT_TAG","HeadingInternalProps","as","children","ReactNode","isTruncated","ElementType","E","_Heading","testId","otherProps","ref","Ref","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","_Text","className","margin","Element","padding","fontFamily","color","SUBHEADING_DEFAULT_TAG","SubheadingInternalProps","_Subheading","useEffect","props","console","warn","DISPLAY_TEXT_DEFAULT_TAG","DisplayTextInternalProps","size","_DisplayText","SECTION_HEADING_DEFAULT_TAG","SectionHeadingInternalProps","_SectionHeading","letterSpacing","letterSpacingWide","textTransform","PropsWithHTMLElement","ParagraphInternalProps","HTMLParagraphElement","displayName"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AI4BA,KAAA,CAAMgD,sCAAgB,GAAG,CAAzB;SAESC,oCAAT,GAA0B,CAA1B;IACE,MAAA,CAAA,EAAO,AAAP,SAAO,AAAP,EAAO,CAAA,kBAAP,CAAA,CAAA;QAAO,IAAA,EAAA,CAAA;QAAA,MAAA,EAAA,CAAA;IAAA,CAAA;AAKR,CAAA;SAMQC,2BAAK,CACZ,CADF,WAEIP,QAAQ,GAAG,CADb,wBAEEE,SAAS,GAAG,CAFd,gCAGEC,UAAU,GAAG,CAHf,+BAIEC,SAAS,GAAG,CAJd,uBAKEH,UAAU,GAAG,CALf,yBAMEpB,QANF,gBAOEE,WAPF,OAQEH,EARF,cASE4B,SATF,WAUEC,MAAM,GAAG,CAVX,WAWKrB,UAAH,CACU,CAbd,EAcEC,GAdF,EAeE,CAdA;IAeA,KAAA,CAAMqB,OAAO,GAAsB9B,EAAE,IAAIy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AGL,CAAA;AAEM,KAAA,CAAMjB,yCAAW,iBAGpBQ,sCAAK,CAACmB,UAAN,CAAiBiC,kCAAjB;;;;;;;;;AElDJ,KAAA,CAAMC,iDAA2B,GAAG,CAApC;SAWSE,qCAAe,CAGtB,CAHF,WAII9C,QADF,cAEE2B,SAFF,WAGErB,MAAM,GAAG,CAHX,4BAIKC,UAAH,CACoB,CARxB,EASEC,GATF,EAUE,CAPA;IAQA,MAAA,oEACG,yCAAD;QACE,EAAA,EAAIoC,iDAAD;QACH,MAAA,EAAQtC,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;QAKE,SAAA,EAAU,CALZ;QAME,QAAA,EAAS,CANX;QAOE,UAAA,EAAW,CAPb;QAQE,SAAA,EAAW,iBAAA,CAAA,EACT,AADS,SACT,AADS,EACT,CAAA,kBAAA,CAAI,CAVV;YAWQyC,aAAa,EAAEpC,oDAAM,CAACqC,iBADpB;YAEFC,aAAa,EAAE,CAAfA;QAFE,CAAJ,GAIAtB,SALS;WAOPpB,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHR,QAAD;AAGL,CAAA;AAEM,KAAA,CAAMf,yCAAc,iBAGvBM,sCAAK,CAACmB,UAAN,CAAiBoC,qCAAjB;;;;;;AE7CG,KAAA,CAAM3D,yCAAS,iBAAGI,sCAAK,CAACmB,UAAU,EAGtC,CAHH,WAGKV,QAAF,WAAYM,MAAM,GAAG,CAArB,sBAA2CC,UAAH,CAAxC,CAAD,EAA0DC,GAA1D,GAAkE,CAAjE;IACD,MAAA,oEACG,yCAAD;QACE,EAAA,EAAG,CADL;QAEE,MAAA,EAAQF,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;WAKMC,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHR,QAAD;AAGL,CAhBwB;AAkBzBb,yCAAS,CAACkE,WAAV,GAAwB,CAAxB;;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading/index.ts","packages/components/typography/src/Heading/Heading.tsx","packages/components/typography/src/Text/index.ts","packages/components/typography/src/Text/Text.tsx","packages/components/typography/src/Subheading/index.ts","packages/components/typography/src/Subheading/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText/index.ts","packages/components/typography/src/DisplayText/DisplayText.tsx","packages/components/typography/src/SectionHeading/index.ts","packages/components/typography/src/SectionHeading/SectionHeading.tsx","packages/components/typography/src/Paragraph/index.ts","packages/components/typography/src/Paragraph/Paragraph.tsx"],"sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n","export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\n","import React from 'react';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nconst HEADING_DEFAULT_TAG = 'h1';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n children?: React.ReactNode;\n isTruncated?: boolean;\n}\n\nexport type HeadingProps<\n E extends React.ElementType = typeof HEADING_DEFAULT_TAG\n> = PolymorphicProps<HeadingInternalProps, E>;\n\nfunction _Heading<E extends React.ElementType = typeof HEADING_DEFAULT_TAG>(\n { children, testId = 'cf-ui-heading', ...otherProps }: HeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeXl\"\n lineHeight=\"lineHeightXl\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const Heading: PolymorphicComponent<\n ExpandProps<HeadingInternalProps>,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\n","export { Text } from './Text';\nexport type { TextProps } from './Text';\n","import React from 'react';\nimport tokens, {\n FontSizeTokens,\n LineHeightTokens,\n FontWeightTokens,\n FontStackTokens,\n ColorTokens,\n} from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n Box,\n ExpandProps,\n} from '@contentful/f36-core';\n\nexport interface TextInternalProps extends CommonProps, MarginProps {\n children?: React.ReactNode;\n fontSize?: FontSizeTokens;\n lineHeight?: LineHeightTokens;\n fontStack?: FontStackTokens;\n fontWeight?: FontWeightTokens;\n fontColor?: ColorTokens;\n isTruncated?: boolean;\n}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n });\n}\n\nexport type TextProps<\n E extends React.ElementType = typeof TEXT_DEFAULT_TAG\n> = PolymorphicProps<TextInternalProps, E>;\n\nfunction _Text<E extends React.ElementType = typeof TEXT_DEFAULT_TAG>(\n {\n fontSize = 'fontSizeM',\n fontStack = 'fontStackPrimary',\n fontWeight = 'fontWeightNormal',\n fontColor = 'gray800',\n lineHeight = 'lineHeightM',\n children,\n isTruncated,\n as,\n className,\n margin = 'none',\n ...otherProps\n }: TextProps<E>,\n ref: React.Ref<any>,\n) {\n const Element: React.ElementType = as || TEXT_DEFAULT_TAG;\n\n return (\n <Box\n {...otherProps}\n as={Element}\n className={cx(\n css({\n padding: 0,\n fontFamily: tokens[fontStack],\n fontWeight: tokens[fontWeight],\n color: tokens[fontColor],\n fontSize: tokens[fontSize],\n lineHeight: tokens[lineHeight],\n }),\n isTruncated ? truncatedStyle() : null,\n className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\nexport const Text: PolymorphicComponent<\n ExpandProps<TextInternalProps>,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","export { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\n","import React from 'react';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SUBHEADING_DEFAULT_TAG = 'h3';\n\nexport interface SubheadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type SubheadingProps<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n> = PolymorphicProps<SubheadingInternalProps, E>;\n\nfunction _Subheading<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n>(\n { children, testId = 'cf-ui-subheading', ...otherProps }: SubheadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SUBHEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontSize=\"fontSizeL\"\n lineHeight=\"lineHeightL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const Subheading: PolymorphicComponent<\n ExpandProps<SubheadingInternalProps>,\n typeof SUBHEADING_DEFAULT_TAG\n> = React.forwardRef(_Subheading);\n","import React, { useEffect } from 'react';\n\nexport interface TypographyProps {\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nexport function Typography(props: TypographyProps) {\n useEffect(() => {\n console.warn(\n 'Forma 36: Typography component is deprecated. You can safely remove it from your components.',\n );\n }, []);\n return <>{props.children}</>;\n}\n","export { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\n","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\nimport type { HeadingElement } from '../Heading';\n\nconst DISPLAY_TEXT_DEFAULT_TAG = 'h2';\n\nexport interface DisplayTextInternalProps extends CommonProps, MarginProps {\n size?: 'default' | 'large';\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type DisplayTextProps<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n> = PolymorphicProps<DisplayTextInternalProps, E>;\n\nfunction _DisplayText<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n>(\n {\n children,\n size = 'default',\n testId = 'cf-ui-display-text',\n ...otherProps\n }: DisplayTextProps<E>,\n ref: React.Ref<any>,\n) {\n let fontSize: FontSizeTokens = 'fontSize2Xl';\n let lineHeight: LineHeightTokens = 'lineHeight2Xl';\n\n if (size === 'large') {\n fontSize = 'fontSize3Xl';\n lineHeight = 'lineHeight3Xl';\n }\n\n return (\n <Text\n as={DISPLAY_TEXT_DEFAULT_TAG}\n testId={testId}\n marginBottom={size === 'default' ? 'spacingL' : 'spacingXl'}\n fontSize={fontSize}\n lineHeight={lineHeight}\n fontColor=\"gray900\"\n fontWeight=\"fontWeightDemiBold\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const DisplayText: PolymorphicComponent<\n ExpandProps<DisplayTextInternalProps>,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","export { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SECTION_HEADING_DEFAULT_TAG = 'h2';\n\nexport interface SectionHeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type SectionHeadingProps<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n> = PolymorphicProps<SectionHeadingInternalProps, E>;\n\nfunction _SectionHeading<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n>(\n {\n children,\n className,\n testId = 'cf-ui-section-heading',\n ...otherProps\n }: SectionHeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SECTION_HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeS\"\n lineHeight=\"lineHeightS\"\n className={cx(\n css({\n letterSpacing: tokens.letterSpacingWide,\n textTransform: 'uppercase',\n }),\n className,\n )}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const SectionHeading: PolymorphicComponent<\n ExpandProps<SectionHeadingInternalProps>,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","export { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\n","import React from 'react';\nimport {\n PropsWithHTMLElement,\n CommonProps,\n MarginProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nexport type ParagraphInternalProps = CommonProps &\n MarginProps & {\n children: React.ReactNode;\n isTruncated?: boolean;\n };\n\nexport type ParagraphProps = PropsWithHTMLElement<ParagraphInternalProps, 'p'>;\n\nexport const Paragraph = React.forwardRef<\n HTMLParagraphElement,\n ExpandProps<ParagraphProps>\n>(({ children, testId = 'cf-ui-paragraph', ...otherProps }, ref) => {\n return (\n <Text\n as=\"p\"\n testId={testId}\n marginBottom=\"spacingM\"\n lineHeight=\"lineHeightM\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n});\n\nParagraph.displayName = 'Paragraph';\n"],"names":["Heading","HeadingProps","HeadingElement","Subheading","SubheadingProps","Typography","TypographyProps","DisplayText","DisplayTextProps","SectionHeading","SectionHeadingProps","Paragraph","ParagraphProps","Text","TextProps","React","CommonProps","MarginProps","PolymorphicComponent","PolymorphicProps","ExpandProps","HEADING_DEFAULT_TAG","HeadingInternalProps","as","children","ReactNode","isTruncated","ElementType","E","_Heading","testId","otherProps","ref","Ref","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","_Text","className","margin","Element","padding","fontFamily","color","SUBHEADING_DEFAULT_TAG","SubheadingInternalProps","_Subheading","useEffect","props","console","warn","DISPLAY_TEXT_DEFAULT_TAG","DisplayTextInternalProps","size","_DisplayText","SECTION_HEADING_DEFAULT_TAG","SectionHeadingInternalProps","_SectionHeading","letterSpacing","letterSpacingWide","textTransform","PropsWithHTMLElement","ParagraphInternalProps","HTMLParagraphElement","displayName"],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -9,15 +9,15 @@ import {Box as $4MbOE$Box} from "@contentful/f36-core";
9
9
 
10
10
 
11
11
 
12
- const $6ed778543c9a7861$var$TEXT_DEFAULT_TAG = 'span';
13
- function $6ed778543c9a7861$var$truncatedStyle() {
12
+ const $0274f3e162e60812$var$TEXT_DEFAULT_TAG = 'span';
13
+ function $0274f3e162e60812$var$truncatedStyle() {
14
14
  return(/*#__PURE__*/ $4MbOE$css({
15
15
  name: "8uhtka",
16
16
  styles: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"
17
17
  }));
18
18
  }
19
- function $6ed778543c9a7861$var$_Text({ fontSize: fontSize = 'fontSizeM' , fontStack: fontStack = 'fontStackPrimary' , fontWeight: fontWeight = 'fontWeightNormal' , fontColor: fontColor = 'gray800' , lineHeight: lineHeight = 'lineHeightM' , children: children , isTruncated: isTruncated , as: as , className: className , margin: margin = 'none' , ...otherProps }, ref) {
20
- const Element = as || $6ed778543c9a7861$var$TEXT_DEFAULT_TAG;
19
+ function $0274f3e162e60812$var$_Text({ fontSize: fontSize = 'fontSizeM' , fontStack: fontStack = 'fontStackPrimary' , fontWeight: fontWeight = 'fontWeightNormal' , fontColor: fontColor = 'gray800' , lineHeight: lineHeight = 'lineHeightM' , children: children , isTruncated: isTruncated , as: as , className: className , margin: margin = 'none' , ...otherProps }, ref) {
20
+ const Element = as || $0274f3e162e60812$var$TEXT_DEFAULT_TAG;
21
21
  return(/*#__PURE__*/ $4MbOE$react.createElement($4MbOE$Box, {
22
22
  ...otherProps,
23
23
  as: Element,
@@ -28,18 +28,19 @@ function $6ed778543c9a7861$var$_Text({ fontSize: fontSize = 'fontSizeM' , fontSt
28
28
  color: $4MbOE$contentfulf36tokens[fontColor],
29
29
  fontSize: $4MbOE$contentfulf36tokens[fontSize],
30
30
  lineHeight: $4MbOE$contentfulf36tokens[lineHeight]
31
- }), isTruncated ? $6ed778543c9a7861$var$truncatedStyle() : null, className),
31
+ }), isTruncated ? $0274f3e162e60812$var$truncatedStyle() : null, className),
32
32
  margin: margin,
33
33
  ref: ref
34
34
  }, children));
35
35
  }
36
- const $6ed778543c9a7861$export$5f1af8db9871e1d6 = /*#__PURE__*/ $4MbOE$react.forwardRef($6ed778543c9a7861$var$_Text);
36
+ const $0274f3e162e60812$export$5f1af8db9871e1d6 = /*#__PURE__*/ $4MbOE$react.forwardRef($0274f3e162e60812$var$_Text);
37
37
 
38
38
 
39
- const $2757f13134d7f609$var$HEADING_DEFAULT_TAG = 'h1';
40
- function $2757f13134d7f609$var$_Heading({ children: children , testId: testId = 'cf-ui-heading' , ...otherProps }, ref) {
41
- return(/*#__PURE__*/ $4MbOE$react.createElement($6ed778543c9a7861$export$5f1af8db9871e1d6, {
42
- as: $2757f13134d7f609$var$HEADING_DEFAULT_TAG,
39
+
40
+ const $d9b0347e4d91b20c$var$HEADING_DEFAULT_TAG = 'h1';
41
+ function $d9b0347e4d91b20c$var$_Heading({ children: children , testId: testId = 'cf-ui-heading' , ...otherProps }, ref) {
42
+ return(/*#__PURE__*/ $4MbOE$react.createElement($0274f3e162e60812$export$5f1af8db9871e1d6, {
43
+ as: $d9b0347e4d91b20c$var$HEADING_DEFAULT_TAG,
43
44
  testId: testId,
44
45
  marginBottom: "spacingM",
45
46
  fontWeight: "fontWeightDemiBold",
@@ -50,15 +51,16 @@ function $2757f13134d7f609$var$_Heading({ children: children , testId: testId =
50
51
  ref: ref
51
52
  }, children));
52
53
  }
53
- const $2757f13134d7f609$export$a8a3e93435678ff9 = /*#__PURE__*/ $4MbOE$react.forwardRef($2757f13134d7f609$var$_Heading);
54
+ const $d9b0347e4d91b20c$export$a8a3e93435678ff9 = /*#__PURE__*/ $4MbOE$react.forwardRef($d9b0347e4d91b20c$var$_Heading);
55
+
54
56
 
55
57
 
56
58
 
57
59
 
58
- const $7d17967797388737$var$SUBHEADING_DEFAULT_TAG = 'h2';
59
- function $7d17967797388737$var$_Subheading({ children: children , testId: testId = 'cf-ui-subheading' , ...otherProps }, ref) {
60
- return(/*#__PURE__*/ $4MbOE$react.createElement($6ed778543c9a7861$export$5f1af8db9871e1d6, {
61
- as: $7d17967797388737$var$SUBHEADING_DEFAULT_TAG,
60
+ const $b9992727336642f5$var$SUBHEADING_DEFAULT_TAG = 'h3';
61
+ function $b9992727336642f5$var$_Subheading({ children: children , testId: testId = 'cf-ui-subheading' , ...otherProps }, ref) {
62
+ return(/*#__PURE__*/ $4MbOE$react.createElement($0274f3e162e60812$export$5f1af8db9871e1d6, {
63
+ as: $b9992727336642f5$var$SUBHEADING_DEFAULT_TAG,
62
64
  testId: testId,
63
65
  marginBottom: "spacingM",
64
66
  fontSize: "fontSizeL",
@@ -69,7 +71,8 @@ function $7d17967797388737$var$_Subheading({ children: children , testId: testId
69
71
  ref: ref
70
72
  }, children));
71
73
  }
72
- const $7d17967797388737$export$5404b1d39162d870 = /*#__PURE__*/ $4MbOE$react.forwardRef($7d17967797388737$var$_Subheading);
74
+ const $b9992727336642f5$export$5404b1d39162d870 = /*#__PURE__*/ $4MbOE$react.forwardRef($b9992727336642f5$var$_Subheading);
75
+
73
76
 
74
77
 
75
78
 
@@ -83,19 +86,16 @@ function $3e422817efdc58c6$export$1c6175f3aa4394b7(props) {
83
86
 
84
87
 
85
88
 
86
- const $222901889a3a3efa$var$DISPLAY_TEXT_DEFAULT_TAG = 'h1';
87
- function $222901889a3a3efa$var$_DisplayText({ children: children , size: size = 'default' , testId: testId = 'cf-ui-display-text' , as: as , ...otherProps }, ref) {
89
+ const $4a7279c3586ec1fe$var$DISPLAY_TEXT_DEFAULT_TAG = 'h2';
90
+ function $4a7279c3586ec1fe$var$_DisplayText({ children: children , size: size = 'default' , testId: testId = 'cf-ui-display-text' , ...otherProps }, ref) {
88
91
  let fontSize = 'fontSize2Xl';
89
92
  let lineHeight = 'lineHeight2Xl';
90
- if (size === 'huge') {
91
- fontSize = 'fontSize4Xl';
92
- lineHeight = 'lineHeight4Xl';
93
- } else if (size === 'large') {
93
+ if (size === 'large') {
94
94
  fontSize = 'fontSize3Xl';
95
95
  lineHeight = 'lineHeight3Xl';
96
96
  }
97
- return(/*#__PURE__*/ $4MbOE$react.createElement($6ed778543c9a7861$export$5f1af8db9871e1d6, {
98
- as: $222901889a3a3efa$var$DISPLAY_TEXT_DEFAULT_TAG,
97
+ return(/*#__PURE__*/ $4MbOE$react.createElement($0274f3e162e60812$export$5f1af8db9871e1d6, {
98
+ as: $4a7279c3586ec1fe$var$DISPLAY_TEXT_DEFAULT_TAG,
99
99
  testId: testId,
100
100
  marginBottom: size === 'default' ? 'spacingL' : 'spacingXl',
101
101
  fontSize: fontSize,
@@ -106,7 +106,7 @@ function $222901889a3a3efa$var$_DisplayText({ children: children , size: size =
106
106
  ref: ref
107
107
  }, children));
108
108
  }
109
- const $222901889a3a3efa$export$60374ee25b7d5e87 = /*#__PURE__*/ $4MbOE$react.forwardRef($222901889a3a3efa$var$_DisplayText);
109
+ const $4a7279c3586ec1fe$export$60374ee25b7d5e87 = /*#__PURE__*/ $4MbOE$react.forwardRef($4a7279c3586ec1fe$var$_DisplayText);
110
110
 
111
111
 
112
112
 
@@ -114,10 +114,11 @@ const $222901889a3a3efa$export$60374ee25b7d5e87 = /*#__PURE__*/ $4MbOE$react.for
114
114
 
115
115
 
116
116
 
117
- const $7382fd5d78575daf$var$SECTION_HEADING_DEFAULT_TAG = 'h3';
118
- function $7382fd5d78575daf$var$_SectionHeading({ children: children , className: className , testId: testId = 'cf-ui-section-heading' , ...otherProps }, ref) {
119
- return(/*#__PURE__*/ $4MbOE$react.createElement($6ed778543c9a7861$export$5f1af8db9871e1d6, {
120
- as: $7382fd5d78575daf$var$SECTION_HEADING_DEFAULT_TAG,
117
+
118
+ const $8b8cd8bdbd04e543$var$SECTION_HEADING_DEFAULT_TAG = 'h2';
119
+ function $8b8cd8bdbd04e543$var$_SectionHeading({ children: children , className: className , testId: testId = 'cf-ui-section-heading' , ...otherProps }, ref) {
120
+ return(/*#__PURE__*/ $4MbOE$react.createElement($0274f3e162e60812$export$5f1af8db9871e1d6, {
121
+ as: $8b8cd8bdbd04e543$var$SECTION_HEADING_DEFAULT_TAG,
121
122
  testId: testId,
122
123
  marginBottom: "spacingL",
123
124
  fontWeight: "fontWeightDemiBold",
@@ -132,13 +133,14 @@ function $7382fd5d78575daf$var$_SectionHeading({ children: children , className:
132
133
  ref: ref
133
134
  }, children));
134
135
  }
135
- const $7382fd5d78575daf$export$72d7ca7a5d1d4807 = /*#__PURE__*/ $4MbOE$react.forwardRef($7382fd5d78575daf$var$_SectionHeading);
136
+ const $8b8cd8bdbd04e543$export$72d7ca7a5d1d4807 = /*#__PURE__*/ $4MbOE$react.forwardRef($8b8cd8bdbd04e543$var$_SectionHeading);
137
+
136
138
 
137
139
 
138
140
 
139
141
 
140
- const $8c581f9822f07d46$export$358a232cca1ab2ac = /*#__PURE__*/ $4MbOE$react.forwardRef(({ children: children , testId: testId = 'cf-ui-paragraph' , ...otherProps }, ref)=>{
141
- return(/*#__PURE__*/ $4MbOE$react.createElement($6ed778543c9a7861$export$5f1af8db9871e1d6, {
142
+ const $36c73afb8a108506$export$358a232cca1ab2ac = /*#__PURE__*/ $4MbOE$react.forwardRef(({ children: children , testId: testId = 'cf-ui-paragraph' , ...otherProps }, ref)=>{
143
+ return(/*#__PURE__*/ $4MbOE$react.createElement($0274f3e162e60812$export$5f1af8db9871e1d6, {
142
144
  as: "p",
143
145
  testId: testId,
144
146
  marginBottom: "spacingM",
@@ -147,11 +149,12 @@ const $8c581f9822f07d46$export$358a232cca1ab2ac = /*#__PURE__*/ $4MbOE$react.for
147
149
  ref: ref
148
150
  }, children));
149
151
  });
150
- $8c581f9822f07d46$export$358a232cca1ab2ac.displayName = 'Paragraph';
152
+ $36c73afb8a108506$export$358a232cca1ab2ac.displayName = 'Paragraph';
153
+
151
154
 
152
155
 
153
156
 
154
157
 
155
158
 
156
- export {$2757f13134d7f609$export$a8a3e93435678ff9 as Heading, $7d17967797388737$export$5404b1d39162d870 as Subheading, $3e422817efdc58c6$export$1c6175f3aa4394b7 as Typography, $222901889a3a3efa$export$60374ee25b7d5e87 as DisplayText, $7382fd5d78575daf$export$72d7ca7a5d1d4807 as SectionHeading, $8c581f9822f07d46$export$358a232cca1ab2ac as Paragraph, $6ed778543c9a7861$export$5f1af8db9871e1d6 as Text};
159
+ export {$d9b0347e4d91b20c$export$a8a3e93435678ff9 as Heading, $b9992727336642f5$export$5404b1d39162d870 as Subheading, $3e422817efdc58c6$export$1c6175f3aa4394b7 as Typography, $4a7279c3586ec1fe$export$60374ee25b7d5e87 as DisplayText, $8b8cd8bdbd04e543$export$72d7ca7a5d1d4807 as SectionHeading, $36c73afb8a108506$export$358a232cca1ab2ac as Paragraph, $0274f3e162e60812$export$5f1af8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EACT,AADS,SACT,AADS,EACT,CAAA,UAAA,CAAI,CAVV;YAWQyC,aAAa,EAAEpC,0BAAM,CAACqC,iBADpB;YAEFC,aAAa,EAAE,CAAfA;QAFE,CAAJ,GAIAtB,SALS;WAOPpB,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHR,QAAD;AAGL,CAAA;AAEM,KAAA,CAAMd,yCAAc,iBAGvBM,YAAK,CAACkB,UAAN,CAAiBoC,qCAAjB;;;;;AC7CG,KAAA,CAAM1D,yCAAS,iBAAGI,YAAK,CAACkB,UAAU,EACtC,CADH,WACKV,QAAF,WAAYM,MAAM,GAAG,CAArB,sBAA2CC,UAAH,CAAxC,CAAD,EAA0DC,GAA1D,GAAkE,CAAjE;IACC,MAAA,0CACG,yCAAD;QACE,EAAA,EAAG,CADL;QAEE,MAAA,EAAQF,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;WAKMC,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHR,QAAD;AAGL,CAdsB;AAiBzBZ,yCAAS,CAACiE,WAAV,GAAwB,CAAxB;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading.tsx","packages/components/typography/src/Text.tsx","packages/components/typography/src/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText.tsx","packages/components/typography/src/SectionHeading.tsx","packages/components/typography/src/Paragraph.tsx"],"sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n","import React from 'react';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n} from '@contentful/f36-core';\nimport { Text } from './Text';\n\nconst HEADING_DEFAULT_TAG = 'h1';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n children?: React.ReactNode;\n isTruncated?: boolean;\n}\n\nexport type HeadingProps<\n E extends React.ElementType = typeof HEADING_DEFAULT_TAG\n> = PolymorphicProps<HeadingInternalProps, E>;\n\nfunction _Heading<E extends React.ElementType = typeof HEADING_DEFAULT_TAG>(\n { children, testId = 'cf-ui-heading', ...otherProps }: HeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeXl\"\n lineHeight=\"lineHeightXl\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const Heading: PolymorphicComponent<\n HeadingInternalProps,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\n","import React from 'react';\nimport tokens, {\n FontSizeTokens,\n LineHeightTokens,\n FontWeightTokens,\n FontStackTokens,\n ColorTokens,\n} from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n Box,\n} from '@contentful/f36-core';\n\nexport interface TextInternalProps extends CommonProps, MarginProps {\n children?: React.ReactNode;\n fontSize?: FontSizeTokens;\n lineHeight?: LineHeightTokens;\n fontStack?: FontStackTokens;\n fontWeight?: FontWeightTokens;\n fontColor?: ColorTokens;\n isTruncated?: boolean;\n}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n });\n}\n\nexport type TextProps<\n E extends React.ElementType = typeof TEXT_DEFAULT_TAG\n> = PolymorphicProps<TextInternalProps, E>;\n\nfunction _Text<E extends React.ElementType = typeof TEXT_DEFAULT_TAG>(\n {\n fontSize = 'fontSizeM',\n fontStack = 'fontStackPrimary',\n fontWeight = 'fontWeightNormal',\n fontColor = 'gray800',\n lineHeight = 'lineHeightM',\n children,\n isTruncated,\n as,\n className,\n margin = 'none',\n ...otherProps\n }: TextProps<E>,\n ref: React.Ref<any>,\n) {\n const Element: React.ElementType = as || TEXT_DEFAULT_TAG;\n\n return (\n <Box\n {...otherProps}\n as={Element}\n className={cx(\n css({\n padding: 0,\n fontFamily: tokens[fontStack],\n fontWeight: tokens[fontWeight],\n color: tokens[fontColor],\n fontSize: tokens[fontSize],\n lineHeight: tokens[lineHeight],\n }),\n isTruncated ? truncatedStyle() : null,\n className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\nexport const Text: PolymorphicComponent<\n TextInternalProps,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","import React from 'react';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from './Heading';\nimport { Text } from './Text';\n\nconst SUBHEADING_DEFAULT_TAG = 'h2';\n\nexport interface SubheadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type SubheadingProps<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n> = PolymorphicProps<SubheadingInternalProps, E>;\n\nfunction _Subheading<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n>(\n { children, testId = 'cf-ui-subheading', ...otherProps }: SubheadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SUBHEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontSize=\"fontSizeL\"\n lineHeight=\"lineHeightL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const Subheading: PolymorphicComponent<\n SubheadingInternalProps,\n typeof SUBHEADING_DEFAULT_TAG\n> = React.forwardRef(_Subheading);\n","import React, { useEffect } from 'react';\n\nexport interface TypographyProps {\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nexport function Typography(props: TypographyProps) {\n useEffect(() => {\n console.warn(\n 'Forma 36: Typography component is deprecated. You can safely remove it from your components.',\n );\n }, []);\n return <>{props.children}</>;\n}\n","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n} from '@contentful/f36-core';\nimport { Text } from './Text';\nimport type { HeadingElement } from './Heading';\n\nconst DISPLAY_TEXT_DEFAULT_TAG = 'h1';\n\nexport interface DisplayTextInternalProps extends CommonProps, MarginProps {\n size?: 'default' | 'large' | 'huge';\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type DisplayTextProps<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n> = PolymorphicProps<DisplayTextInternalProps, E>;\n\nfunction _DisplayText<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n>(\n {\n children,\n size = 'default',\n testId = 'cf-ui-display-text',\n as,\n ...otherProps\n }: DisplayTextProps<E>,\n ref: React.Ref<any>,\n) {\n let fontSize: FontSizeTokens = 'fontSize2Xl';\n let lineHeight: LineHeightTokens = 'lineHeight2Xl';\n\n if (size === 'huge') {\n fontSize = 'fontSize4Xl';\n lineHeight = 'lineHeight4Xl';\n } else if (size === 'large') {\n fontSize = 'fontSize3Xl';\n lineHeight = 'lineHeight3Xl';\n }\n\n return (\n <Text\n as={DISPLAY_TEXT_DEFAULT_TAG}\n testId={testId}\n marginBottom={size === 'default' ? 'spacingL' : 'spacingXl'}\n fontSize={fontSize}\n lineHeight={lineHeight}\n fontColor=\"gray900\"\n fontWeight=\"fontWeightDemiBold\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const DisplayText: PolymorphicComponent<\n DisplayTextInternalProps,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from './Heading';\nimport { Text } from './Text';\n\nconst SECTION_HEADING_DEFAULT_TAG = 'h3';\n\nexport interface SectionHeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type SectionHeadingProps<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n> = PolymorphicProps<SectionHeadingInternalProps, E>;\n\nfunction _SectionHeading<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n>(\n {\n children,\n className,\n testId = 'cf-ui-section-heading',\n ...otherProps\n }: SectionHeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SECTION_HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeS\"\n lineHeight=\"lineHeightS\"\n className={cx(\n css({\n letterSpacing: tokens.letterSpacingWide,\n textTransform: 'uppercase',\n }),\n className,\n )}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const SectionHeading: PolymorphicComponent<\n SectionHeadingInternalProps,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","import React from 'react';\nimport {\n PropsWithHTMLElement,\n CommonProps,\n MarginProps,\n} from '@contentful/f36-core';\nimport { Text } from './Text';\n\nexport type ParagraphInternalProps = CommonProps &\n MarginProps & {\n children: React.ReactNode;\n isTruncated?: boolean;\n };\n\nexport type ParagraphProps = PropsWithHTMLElement<ParagraphInternalProps, 'p'>;\n\nexport const Paragraph = React.forwardRef<HTMLParagraphElement, ParagraphProps>(\n ({ children, testId = 'cf-ui-paragraph', ...otherProps }, ref) => {\n return (\n <Text\n as=\"p\"\n testId={testId}\n marginBottom=\"spacingM\"\n lineHeight=\"lineHeightM\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n },\n);\n\nParagraph.displayName = 'Paragraph';\n"],"names":["Heading","HeadingProps","HeadingElement","Subheading","SubheadingProps","Typography","TypographyProps","DisplayText","DisplayTextProps","SectionHeading","SectionHeadingProps","Paragraph","ParagraphProps","Text","TextProps","React","CommonProps","MarginProps","PolymorphicComponent","PolymorphicProps","HEADING_DEFAULT_TAG","HeadingInternalProps","as","children","ReactNode","isTruncated","ElementType","E","_Heading","testId","otherProps","ref","Ref","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","_Text","className","margin","Element","padding","fontFamily","color","SUBHEADING_DEFAULT_TAG","SubheadingInternalProps","_Subheading","useEffect","props","console","warn","DISPLAY_TEXT_DEFAULT_TAG","DisplayTextInternalProps","size","_DisplayText","SECTION_HEADING_DEFAULT_TAG","SectionHeadingInternalProps","_SectionHeading","letterSpacing","letterSpacingWide","textTransform","PropsWithHTMLElement","ParagraphInternalProps","HTMLParagraphElement","displayName"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;AI4BA,KAAA,CAAMgD,sCAAgB,GAAG,CAAzB;SAESC,oCAAT,GAA0B,CAA1B;IACE,MAAA,CAAA,EAAO,AAAP,SAAO,AAAP,EAAO,CAAA,UAAP,CAAA,CAAA;QAAO,IAAA,EAAA,CAAA;QAAA,MAAA,EAAA,CAAA;IAAA,CAAA;AAKR,CAAA;SAMQC,2BAAK,CAC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,GAA1D,GAAkE,CAAjE;IACD,MAAA,0CACG,yCAAD;QACE,EAAA,EAAG,CADL;QAEE,MAAA,EAAQF,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;WAKMC,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHR,QAAD;AAGL,CAhBwB;AAkBzBb,yCAAS,CAACkE,WAAV,GAAwB,CAAxB;;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading/index.ts","packages/components/typography/src/Heading/Heading.tsx","packages/components/typography/src/Text/index.ts","packages/components/typography/src/Text/Text.tsx","packages/components/typography/src/Subheading/index.ts","packages/components/typography/src/Subheading/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText/index.ts","packages/components/typography/src/DisplayText/DisplayText.tsx","packages/components/typography/src/SectionHeading/index.ts","packages/components/typography/src/SectionHeading/SectionHeading.tsx","packages/components/typography/src/Paragraph/index.ts","packages/components/typography/src/Paragraph/Paragraph.tsx"],"sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n","export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\n","import React from 'react';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nconst HEADING_DEFAULT_TAG = 'h1';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n children?: React.ReactNode;\n isTruncated?: boolean;\n}\n\nexport type HeadingProps<\n E extends React.ElementType = typeof HEADING_DEFAULT_TAG\n> = PolymorphicProps<HeadingInternalProps, E>;\n\nfunction _Heading<E extends React.ElementType = typeof HEADING_DEFAULT_TAG>(\n { children, testId = 'cf-ui-heading', ...otherProps }: HeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeXl\"\n lineHeight=\"lineHeightXl\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const Heading: PolymorphicComponent<\n ExpandProps<HeadingInternalProps>,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\n","export { Text } from './Text';\nexport type { TextProps } from './Text';\n","import React from 'react';\nimport tokens, {\n FontSizeTokens,\n LineHeightTokens,\n FontWeightTokens,\n FontStackTokens,\n ColorTokens,\n} from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n Box,\n ExpandProps,\n} from '@contentful/f36-core';\n\nexport interface TextInternalProps extends CommonProps, MarginProps {\n children?: React.ReactNode;\n fontSize?: FontSizeTokens;\n lineHeight?: LineHeightTokens;\n fontStack?: FontStackTokens;\n fontWeight?: FontWeightTokens;\n fontColor?: ColorTokens;\n isTruncated?: boolean;\n}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n });\n}\n\nexport type TextProps<\n E extends React.ElementType = typeof TEXT_DEFAULT_TAG\n> = PolymorphicProps<TextInternalProps, E>;\n\nfunction _Text<E extends React.ElementType = typeof TEXT_DEFAULT_TAG>(\n {\n fontSize = 'fontSizeM',\n fontStack = 'fontStackPrimary',\n fontWeight = 'fontWeightNormal',\n fontColor = 'gray800',\n lineHeight = 'lineHeightM',\n children,\n isTruncated,\n as,\n className,\n margin = 'none',\n ...otherProps\n }: TextProps<E>,\n ref: React.Ref<any>,\n) {\n const Element: React.ElementType = as || TEXT_DEFAULT_TAG;\n\n return (\n <Box\n {...otherProps}\n as={Element}\n className={cx(\n css({\n padding: 0,\n fontFamily: tokens[fontStack],\n fontWeight: tokens[fontWeight],\n color: tokens[fontColor],\n fontSize: tokens[fontSize],\n lineHeight: tokens[lineHeight],\n }),\n isTruncated ? truncatedStyle() : null,\n className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\nexport const Text: PolymorphicComponent<\n ExpandProps<TextInternalProps>,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","export { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\n","import React from 'react';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SUBHEADING_DEFAULT_TAG = 'h3';\n\nexport interface SubheadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type SubheadingProps<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n> = PolymorphicProps<SubheadingInternalProps, E>;\n\nfunction _Subheading<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n>(\n { children, testId = 'cf-ui-subheading', ...otherProps }: SubheadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SUBHEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontSize=\"fontSizeL\"\n lineHeight=\"lineHeightL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const Subheading: PolymorphicComponent<\n ExpandProps<SubheadingInternalProps>,\n typeof SUBHEADING_DEFAULT_TAG\n> = React.forwardRef(_Subheading);\n","import React, { useEffect } from 'react';\n\nexport interface TypographyProps {\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nexport function Typography(props: TypographyProps) {\n useEffect(() => {\n console.warn(\n 'Forma 36: Typography component is deprecated. You can safely remove it from your components.',\n );\n }, []);\n return <>{props.children}</>;\n}\n","export { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\n","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\nimport type { HeadingElement } from '../Heading';\n\nconst DISPLAY_TEXT_DEFAULT_TAG = 'h2';\n\nexport interface DisplayTextInternalProps extends CommonProps, MarginProps {\n size?: 'default' | 'large';\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type DisplayTextProps<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n> = PolymorphicProps<DisplayTextInternalProps, E>;\n\nfunction _DisplayText<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n>(\n {\n children,\n size = 'default',\n testId = 'cf-ui-display-text',\n ...otherProps\n }: DisplayTextProps<E>,\n ref: React.Ref<any>,\n) {\n let fontSize: FontSizeTokens = 'fontSize2Xl';\n let lineHeight: LineHeightTokens = 'lineHeight2Xl';\n\n if (size === 'large') {\n fontSize = 'fontSize3Xl';\n lineHeight = 'lineHeight3Xl';\n }\n\n return (\n <Text\n as={DISPLAY_TEXT_DEFAULT_TAG}\n testId={testId}\n marginBottom={size === 'default' ? 'spacingL' : 'spacingXl'}\n fontSize={fontSize}\n lineHeight={lineHeight}\n fontColor=\"gray900\"\n fontWeight=\"fontWeightDemiBold\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const DisplayText: PolymorphicComponent<\n ExpandProps<DisplayTextInternalProps>,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","export { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SECTION_HEADING_DEFAULT_TAG = 'h2';\n\nexport interface SectionHeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n}\n\nexport type SectionHeadingProps<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n> = PolymorphicProps<SectionHeadingInternalProps, E>;\n\nfunction _SectionHeading<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n>(\n {\n children,\n className,\n testId = 'cf-ui-section-heading',\n ...otherProps\n }: SectionHeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SECTION_HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeS\"\n lineHeight=\"lineHeightS\"\n className={cx(\n css({\n letterSpacing: tokens.letterSpacingWide,\n textTransform: 'uppercase',\n }),\n className,\n )}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\nexport const SectionHeading: PolymorphicComponent<\n ExpandProps<SectionHeadingInternalProps>,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","export { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\n","import React from 'react';\nimport {\n PropsWithHTMLElement,\n CommonProps,\n MarginProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nexport type ParagraphInternalProps = CommonProps &\n MarginProps & {\n children: React.ReactNode;\n isTruncated?: boolean;\n };\n\nexport type ParagraphProps = PropsWithHTMLElement<ParagraphInternalProps, 'p'>;\n\nexport const Paragraph = React.forwardRef<\n HTMLParagraphElement,\n ExpandProps<ParagraphProps>\n>(({ children, testId = 'cf-ui-paragraph', ...otherProps }, ref) => {\n return (\n <Text\n as=\"p\"\n testId={testId}\n marginBottom=\"spacingM\"\n lineHeight=\"lineHeightM\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n});\n\nParagraph.displayName = 'Paragraph';\n"],"names":["Heading","HeadingProps","HeadingElement","Subheading","SubheadingProps","Typography","TypographyProps","DisplayText","DisplayTextProps","SectionHeading","SectionHeadingProps","Paragraph","ParagraphProps","Text","TextProps","React","CommonProps","MarginProps","PolymorphicComponent","PolymorphicProps","ExpandProps","HEADING_DEFAULT_TAG","HeadingInternalProps","as","children","ReactNode","isTruncated","ElementType","E","_Heading","testId","otherProps","ref","Ref","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","_Text","className","margin","Element","padding","fontFamily","color","SUBHEADING_DEFAULT_TAG","SubheadingInternalProps","_Subheading","useEffect","props","console","warn","DISPLAY_TEXT_DEFAULT_TAG","DisplayTextInternalProps","size","_DisplayText","SECTION_HEADING_DEFAULT_TAG","SectionHeadingInternalProps","_SectionHeading","letterSpacing","letterSpacingWide","textTransform","PropsWithHTMLElement","ParagraphInternalProps","HTMLParagraphElement","displayName"],"version":3,"file":"module.js.map"}