@fluentui/react-text 9.0.0-alpha.9 → 9.0.0-beta.4

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.
Files changed (283) hide show
  1. package/CHANGELOG.json +744 -1
  2. package/CHANGELOG.md +254 -2
  3. package/dist/react-text.d.ts +61 -49
  4. package/lib/Body.js.map +1 -1
  5. package/lib/Caption.js.map +1 -1
  6. package/lib/Display.js.map +1 -1
  7. package/lib/Headline.js.map +1 -1
  8. package/lib/LargeTitle.js.map +1 -1
  9. package/lib/Subheadline.js.map +1 -1
  10. package/lib/Text.js.map +1 -1
  11. package/lib/Title1.js.map +1 -1
  12. package/lib/Title2.js.map +1 -1
  13. package/lib/Title3.js.map +1 -1
  14. package/lib/components/Body/Body.d.ts +4 -1
  15. package/lib/components/Body/Body.js +10 -8
  16. package/lib/components/Body/Body.js.map +1 -1
  17. package/lib/components/Body/index.js.map +1 -1
  18. package/lib/components/Caption/Caption.d.ts +4 -1
  19. package/lib/components/Caption/Caption.js +10 -8
  20. package/lib/components/Caption/Caption.js.map +1 -1
  21. package/lib/components/Caption/index.js.map +1 -1
  22. package/lib/components/Display/Display.d.ts +4 -1
  23. package/lib/components/Display/Display.js +10 -8
  24. package/lib/components/Display/Display.js.map +1 -1
  25. package/lib/components/Display/index.js.map +1 -1
  26. package/lib/components/Headline/Headline.d.ts +4 -1
  27. package/lib/components/Headline/Headline.js +10 -8
  28. package/lib/components/Headline/Headline.js.map +1 -1
  29. package/lib/components/Headline/index.js.map +1 -1
  30. package/lib/components/LargeTitle/LargeTitle.d.ts +4 -1
  31. package/lib/components/LargeTitle/LargeTitle.js +10 -8
  32. package/lib/components/LargeTitle/LargeTitle.js.map +1 -1
  33. package/lib/components/LargeTitle/index.js.map +1 -1
  34. package/lib/components/Subheadline/Subheadline.d.ts +4 -1
  35. package/lib/components/Subheadline/Subheadline.js +10 -8
  36. package/lib/components/Subheadline/Subheadline.js.map +1 -1
  37. package/lib/components/Subheadline/index.js.map +1 -1
  38. package/lib/components/Text/Text.d.ts +2 -2
  39. package/lib/components/Text/Text.js +3 -3
  40. package/lib/components/Text/Text.js.map +1 -1
  41. package/lib/components/Text/Text.types.d.ts +20 -29
  42. package/lib/components/Text/Text.types.js.map +1 -1
  43. package/lib/components/Text/index.js.map +1 -1
  44. package/lib/components/Text/renderText.js +7 -8
  45. package/lib/components/Text/renderText.js.map +1 -1
  46. package/lib/components/Text/useText.d.ts +1 -2
  47. package/lib/components/Text/useText.js +37 -8
  48. package/lib/components/Text/useText.js.map +1 -1
  49. package/lib/components/Text/useTextStyles.d.ts +1 -0
  50. package/lib/components/Text/useTextStyles.js +32 -31
  51. package/lib/components/Text/useTextStyles.js.map +1 -1
  52. package/lib/components/Title1/Title1.d.ts +4 -1
  53. package/lib/components/Title1/Title1.js +10 -8
  54. package/lib/components/Title1/Title1.js.map +1 -1
  55. package/lib/components/Title1/index.js.map +1 -1
  56. package/lib/components/Title2/Title2.d.ts +4 -1
  57. package/lib/components/Title2/Title2.js +10 -8
  58. package/lib/components/Title2/Title2.js.map +1 -1
  59. package/lib/components/Title2/index.js.map +1 -1
  60. package/lib/components/Title3/Title3.d.ts +4 -1
  61. package/lib/components/Title3/Title3.js +10 -8
  62. package/lib/components/Title3/Title3.js.map +1 -1
  63. package/lib/components/Title3/index.js.map +1 -1
  64. package/lib/components/wrapper.d.ts +3 -3
  65. package/lib/components/wrapper.js +9 -6
  66. package/lib/components/wrapper.js.map +1 -1
  67. package/lib/index.js.map +1 -1
  68. package/lib/typographyStyles/index.js.map +1 -1
  69. package/lib/typographyStyles/typographyStyles.js +54 -72
  70. package/lib/typographyStyles/typographyStyles.js.map +1 -1
  71. package/lib-commonjs/Body.js +1 -1
  72. package/lib-commonjs/Body.js.map +1 -1
  73. package/lib-commonjs/Caption.js +1 -1
  74. package/lib-commonjs/Caption.js.map +1 -1
  75. package/lib-commonjs/Display.js +1 -1
  76. package/lib-commonjs/Display.js.map +1 -1
  77. package/lib-commonjs/Headline.js +1 -1
  78. package/lib-commonjs/Headline.js.map +1 -1
  79. package/lib-commonjs/LargeTitle.js +1 -1
  80. package/lib-commonjs/LargeTitle.js.map +1 -1
  81. package/lib-commonjs/Subheadline.js +1 -1
  82. package/lib-commonjs/Subheadline.js.map +1 -1
  83. package/lib-commonjs/Text.js +1 -1
  84. package/lib-commonjs/Text.js.map +1 -1
  85. package/lib-commonjs/Title1.js +1 -1
  86. package/lib-commonjs/Title1.js.map +1 -1
  87. package/lib-commonjs/Title2.js +1 -1
  88. package/lib-commonjs/Title2.js.map +1 -1
  89. package/lib-commonjs/Title3.js +1 -1
  90. package/lib-commonjs/Title3.js.map +1 -1
  91. package/lib-commonjs/components/Body/Body.d.ts +4 -1
  92. package/lib-commonjs/components/Body/Body.js +9 -7
  93. package/lib-commonjs/components/Body/Body.js.map +1 -1
  94. package/lib-commonjs/components/Body/index.js +1 -1
  95. package/lib-commonjs/components/Body/index.js.map +1 -1
  96. package/lib-commonjs/components/Caption/Caption.d.ts +4 -1
  97. package/lib-commonjs/components/Caption/Caption.js +9 -7
  98. package/lib-commonjs/components/Caption/Caption.js.map +1 -1
  99. package/lib-commonjs/components/Caption/index.js +1 -1
  100. package/lib-commonjs/components/Caption/index.js.map +1 -1
  101. package/lib-commonjs/components/Display/Display.d.ts +4 -1
  102. package/lib-commonjs/components/Display/Display.js +9 -7
  103. package/lib-commonjs/components/Display/Display.js.map +1 -1
  104. package/lib-commonjs/components/Display/index.js +1 -1
  105. package/lib-commonjs/components/Display/index.js.map +1 -1
  106. package/lib-commonjs/components/Headline/Headline.d.ts +4 -1
  107. package/lib-commonjs/components/Headline/Headline.js +9 -7
  108. package/lib-commonjs/components/Headline/Headline.js.map +1 -1
  109. package/lib-commonjs/components/Headline/index.js +1 -1
  110. package/lib-commonjs/components/Headline/index.js.map +1 -1
  111. package/lib-commonjs/components/LargeTitle/LargeTitle.d.ts +4 -1
  112. package/lib-commonjs/components/LargeTitle/LargeTitle.js +9 -7
  113. package/lib-commonjs/components/LargeTitle/LargeTitle.js.map +1 -1
  114. package/lib-commonjs/components/LargeTitle/index.js +1 -1
  115. package/lib-commonjs/components/LargeTitle/index.js.map +1 -1
  116. package/lib-commonjs/components/Subheadline/Subheadline.d.ts +4 -1
  117. package/lib-commonjs/components/Subheadline/Subheadline.js +9 -7
  118. package/lib-commonjs/components/Subheadline/Subheadline.js.map +1 -1
  119. package/lib-commonjs/components/Subheadline/index.js +1 -1
  120. package/lib-commonjs/components/Subheadline/index.js.map +1 -1
  121. package/lib-commonjs/components/Text/Text.d.ts +2 -2
  122. package/lib-commonjs/components/Text/Text.js +7 -7
  123. package/lib-commonjs/components/Text/Text.js.map +1 -1
  124. package/lib-commonjs/components/Text/Text.types.d.ts +20 -29
  125. package/lib-commonjs/components/Text/Text.types.js.map +1 -1
  126. package/lib-commonjs/components/Text/index.js +1 -1
  127. package/lib-commonjs/components/Text/index.js.map +1 -1
  128. package/lib-commonjs/components/Text/renderText.js +8 -10
  129. package/lib-commonjs/components/Text/renderText.js.map +1 -1
  130. package/lib-commonjs/components/Text/useText.d.ts +1 -2
  131. package/lib-commonjs/components/Text/useText.js +38 -9
  132. package/lib-commonjs/components/Text/useText.js.map +1 -1
  133. package/lib-commonjs/components/Text/useTextStyles.d.ts +1 -0
  134. package/lib-commonjs/components/Text/useTextStyles.js +35 -34
  135. package/lib-commonjs/components/Text/useTextStyles.js.map +1 -1
  136. package/lib-commonjs/components/Title1/Title1.d.ts +4 -1
  137. package/lib-commonjs/components/Title1/Title1.js +9 -7
  138. package/lib-commonjs/components/Title1/Title1.js.map +1 -1
  139. package/lib-commonjs/components/Title1/index.js +1 -1
  140. package/lib-commonjs/components/Title1/index.js.map +1 -1
  141. package/lib-commonjs/components/Title2/Title2.d.ts +4 -1
  142. package/lib-commonjs/components/Title2/Title2.js +9 -7
  143. package/lib-commonjs/components/Title2/Title2.js.map +1 -1
  144. package/lib-commonjs/components/Title2/index.js +1 -1
  145. package/lib-commonjs/components/Title2/index.js.map +1 -1
  146. package/lib-commonjs/components/Title3/Title3.d.ts +4 -1
  147. package/lib-commonjs/components/Title3/Title3.js +9 -7
  148. package/lib-commonjs/components/Title3/Title3.js.map +1 -1
  149. package/lib-commonjs/components/Title3/index.js +1 -1
  150. package/lib-commonjs/components/Title3/index.js.map +1 -1
  151. package/lib-commonjs/components/wrapper.d.ts +3 -3
  152. package/lib-commonjs/components/wrapper.js +12 -9
  153. package/lib-commonjs/components/wrapper.js.map +1 -1
  154. package/lib-commonjs/index.js +1 -1
  155. package/lib-commonjs/index.js.map +1 -1
  156. package/lib-commonjs/typographyStyles/index.js +1 -1
  157. package/lib-commonjs/typographyStyles/index.js.map +1 -1
  158. package/lib-commonjs/typographyStyles/typographyStyles.js +54 -72
  159. package/lib-commonjs/typographyStyles/typographyStyles.js.map +1 -1
  160. package/package.json +11 -10
  161. package/lib/common/isConformant.d.ts +0 -4
  162. package/lib/common/isConformant.js +0 -9
  163. package/lib/common/isConformant.js.map +0 -1
  164. package/lib-amd/Body.d.ts +0 -1
  165. package/lib-amd/Body.js +0 -6
  166. package/lib-amd/Body.js.map +0 -1
  167. package/lib-amd/Caption.d.ts +0 -1
  168. package/lib-amd/Caption.js +0 -6
  169. package/lib-amd/Caption.js.map +0 -1
  170. package/lib-amd/Display.d.ts +0 -1
  171. package/lib-amd/Display.js +0 -6
  172. package/lib-amd/Display.js.map +0 -1
  173. package/lib-amd/Headline.d.ts +0 -1
  174. package/lib-amd/Headline.js +0 -6
  175. package/lib-amd/Headline.js.map +0 -1
  176. package/lib-amd/LargeTitle.d.ts +0 -1
  177. package/lib-amd/LargeTitle.js +0 -6
  178. package/lib-amd/LargeTitle.js.map +0 -1
  179. package/lib-amd/Subheadline.d.ts +0 -1
  180. package/lib-amd/Subheadline.js +0 -6
  181. package/lib-amd/Subheadline.js.map +0 -1
  182. package/lib-amd/Text.d.ts +0 -1
  183. package/lib-amd/Text.js +0 -6
  184. package/lib-amd/Text.js.map +0 -1
  185. package/lib-amd/Title1.d.ts +0 -1
  186. package/lib-amd/Title1.js +0 -6
  187. package/lib-amd/Title1.js.map +0 -1
  188. package/lib-amd/Title2.d.ts +0 -1
  189. package/lib-amd/Title2.js +0 -6
  190. package/lib-amd/Title2.js.map +0 -1
  191. package/lib-amd/Title3.d.ts +0 -1
  192. package/lib-amd/Title3.js +0 -6
  193. package/lib-amd/Title3.js.map +0 -1
  194. package/lib-amd/common/isConformant.d.ts +0 -4
  195. package/lib-amd/common/isConformant.js +0 -14
  196. package/lib-amd/common/isConformant.js.map +0 -1
  197. package/lib-amd/components/Body/Body.d.ts +0 -4
  198. package/lib-amd/components/Body/Body.js +0 -16
  199. package/lib-amd/components/Body/Body.js.map +0 -1
  200. package/lib-amd/components/Body/index.d.ts +0 -1
  201. package/lib-amd/components/Body/index.js +0 -6
  202. package/lib-amd/components/Body/index.js.map +0 -1
  203. package/lib-amd/components/Caption/Caption.d.ts +0 -4
  204. package/lib-amd/components/Caption/Caption.js +0 -16
  205. package/lib-amd/components/Caption/Caption.js.map +0 -1
  206. package/lib-amd/components/Caption/index.d.ts +0 -1
  207. package/lib-amd/components/Caption/index.js +0 -6
  208. package/lib-amd/components/Caption/index.js.map +0 -1
  209. package/lib-amd/components/Display/Display.d.ts +0 -4
  210. package/lib-amd/components/Display/Display.js +0 -16
  211. package/lib-amd/components/Display/Display.js.map +0 -1
  212. package/lib-amd/components/Display/index.d.ts +0 -1
  213. package/lib-amd/components/Display/index.js +0 -6
  214. package/lib-amd/components/Display/index.js.map +0 -1
  215. package/lib-amd/components/Headline/Headline.d.ts +0 -4
  216. package/lib-amd/components/Headline/Headline.js +0 -16
  217. package/lib-amd/components/Headline/Headline.js.map +0 -1
  218. package/lib-amd/components/Headline/index.d.ts +0 -1
  219. package/lib-amd/components/Headline/index.js +0 -6
  220. package/lib-amd/components/Headline/index.js.map +0 -1
  221. package/lib-amd/components/LargeTitle/LargeTitle.d.ts +0 -4
  222. package/lib-amd/components/LargeTitle/LargeTitle.js +0 -16
  223. package/lib-amd/components/LargeTitle/LargeTitle.js.map +0 -1
  224. package/lib-amd/components/LargeTitle/index.d.ts +0 -1
  225. package/lib-amd/components/LargeTitle/index.js +0 -6
  226. package/lib-amd/components/LargeTitle/index.js.map +0 -1
  227. package/lib-amd/components/Subheadline/Subheadline.d.ts +0 -4
  228. package/lib-amd/components/Subheadline/Subheadline.js +0 -16
  229. package/lib-amd/components/Subheadline/Subheadline.js.map +0 -1
  230. package/lib-amd/components/Subheadline/index.d.ts +0 -1
  231. package/lib-amd/components/Subheadline/index.js +0 -6
  232. package/lib-amd/components/Subheadline/index.js.map +0 -1
  233. package/lib-amd/components/Text/Text.d.ts +0 -6
  234. package/lib-amd/components/Text/Text.js +0 -15
  235. package/lib-amd/components/Text/Text.js.map +0 -1
  236. package/lib-amd/components/Text/Text.types.d.ts +0 -86
  237. package/lib-amd/components/Text/Text.types.js +0 -5
  238. package/lib-amd/components/Text/Text.types.js.map +0 -1
  239. package/lib-amd/components/Text/index.d.ts +0 -5
  240. package/lib-amd/components/Text/index.js +0 -10
  241. package/lib-amd/components/Text/index.js.map +0 -1
  242. package/lib-amd/components/Text/renderText.d.ts +0 -5
  243. package/lib-amd/components/Text/renderText.js +0 -14
  244. package/lib-amd/components/Text/renderText.js.map +0 -1
  245. package/lib-amd/components/Text/useText.d.ts +0 -13
  246. package/lib-amd/components/Text/useText.js +0 -25
  247. package/lib-amd/components/Text/useText.js.map +0 -1
  248. package/lib-amd/components/Text/useTextStyles.d.ts +0 -5
  249. package/lib-amd/components/Text/useTextStyles.js +0 -110
  250. package/lib-amd/components/Text/useTextStyles.js.map +0 -1
  251. package/lib-amd/components/Title1/Title1.d.ts +0 -4
  252. package/lib-amd/components/Title1/Title1.js +0 -16
  253. package/lib-amd/components/Title1/Title1.js.map +0 -1
  254. package/lib-amd/components/Title1/index.d.ts +0 -1
  255. package/lib-amd/components/Title1/index.js +0 -6
  256. package/lib-amd/components/Title1/index.js.map +0 -1
  257. package/lib-amd/components/Title2/Title2.d.ts +0 -4
  258. package/lib-amd/components/Title2/Title2.js +0 -16
  259. package/lib-amd/components/Title2/Title2.js.map +0 -1
  260. package/lib-amd/components/Title2/index.d.ts +0 -1
  261. package/lib-amd/components/Title2/index.js +0 -6
  262. package/lib-amd/components/Title2/index.js.map +0 -1
  263. package/lib-amd/components/Title3/Title3.d.ts +0 -4
  264. package/lib-amd/components/Title3/Title3.js +0 -16
  265. package/lib-amd/components/Title3/Title3.js.map +0 -1
  266. package/lib-amd/components/Title3/index.d.ts +0 -1
  267. package/lib-amd/components/Title3/index.js +0 -6
  268. package/lib-amd/components/Title3/index.js.map +0 -1
  269. package/lib-amd/components/wrapper.d.ts +0 -8
  270. package/lib-amd/components/wrapper.js +0 -19
  271. package/lib-amd/components/wrapper.js.map +0 -1
  272. package/lib-amd/index.d.ts +0 -10
  273. package/lib-amd/index.js +0 -15
  274. package/lib-amd/index.js.map +0 -1
  275. package/lib-amd/typographyStyles/index.d.ts +0 -2
  276. package/lib-amd/typographyStyles/index.js +0 -7
  277. package/lib-amd/typographyStyles/index.js.map +0 -1
  278. package/lib-amd/typographyStyles/typographyStyles.d.ts +0 -14
  279. package/lib-amd/typographyStyles/typographyStyles.js +0 -72
  280. package/lib-amd/typographyStyles/typographyStyles.js.map +0 -1
  281. package/lib-commonjs/common/isConformant.d.ts +0 -4
  282. package/lib-commonjs/common/isConformant.js +0 -19
  283. package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -1,27 +1,29 @@
1
1
  import { __styles } from '@fluentui/react-make-styles';
2
2
  import { typographyStyles } from '../../typographyStyles/index';
3
3
  import { createWrapper } from '../wrapper';
4
+ export const captionClassName = 'fui-Caption';
4
5
  /**
5
6
  * Styles for the root slot
6
7
  */
7
8
 
8
- var useStyles = /*#__PURE__*/__styles({
9
+ const useStyles = /*#__PURE__*/__styles({
9
10
  "root": {
10
- "Bahqtrf": "f1kx028l",
11
- "Be2twd7": "ft25vac",
12
- "Bg96gwp": "f6u047o",
13
- "Bhrd7zp": "f1du0uop"
11
+ "Bahqtrf": "fk6fouc",
12
+ "Be2twd7": "fy9rknc",
13
+ "Bg96gwp": "fwrc4pm",
14
+ "Bhrd7zp": "figsok6"
14
15
  }
15
16
  }, {
16
- "d": [".f1kx028l{font-family:var(--global-type-fontFamilies-base);}", ".ft25vac{font-size:var(--global-type-fontSizes-base-200);}", ".f6u047o{line-height:var(--global-type-lineHeights-base-200);}", ".f1du0uop{font-weight:var(--global-type-fontWeights-regular);}"]
17
+ "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}"]
17
18
  });
18
19
  /**
19
20
  * Text wrapper component for the Caption typography variant
20
21
  */
21
22
 
22
23
 
23
- export var Caption = /*#__PURE__*/createWrapper({
24
- useStyles: useStyles,
24
+ export const Caption = /*#__PURE__*/createWrapper({
25
+ useStyles,
26
+ className: captionClassName,
25
27
  displayName: 'Caption'
26
28
  });
27
29
  //# sourceMappingURL=Caption.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Caption/Caption.tsx"],"names":[],"mappings":"AAAA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAA8B,YAA9B;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,OAAO,gBAAG,aAAa,CAAC;AAAE,EAAA,SAAS,EAAA,SAAX;AAAa,EAAA,WAAW,EAAE;AAA1B,CAAD,CAA7B","sourcesContent":["import { makeStyles } from '@fluentui/react-make-styles';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper } from '../wrapper';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.caption,\n});\n\n/**\n * Text wrapper component for the Caption typography variant\n */\nexport const Caption = createWrapper({ useStyles, displayName: 'Caption' });\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Caption/Caption.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA,OAAO,MAAM,gBAAgB,GAAG,aAAzB;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,OAAO,gBAAwC,aAAa,CAAC;AACxE,EAAA,SADwE;AAExE,EAAA,SAAS,EAAE,gBAF6D;AAGxE,EAAA,WAAW,EAAE;AAH2D,CAAD,CAAlE","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Caption/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC","sourcesContent":["export * from './Caption';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Caption/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -1,4 +1,7 @@
1
+ import type { FunctionComponent } from 'react';
2
+ import { TextWrapperProps } from '../wrapper';
3
+ export declare const displayClassName = "fui-Display";
1
4
  /**
2
5
  * Text wrapper component for the Display typography variant
3
6
  */
4
- export declare const Display: import("react").ForwardRefExoticComponent<import("../wrapper").Props & import("react").RefAttributes<HTMLElement>>;
7
+ export declare const Display: FunctionComponent<TextWrapperProps>;
@@ -1,27 +1,29 @@
1
1
  import { __styles } from '@fluentui/react-make-styles';
2
2
  import { typographyStyles } from '../../typographyStyles/index';
3
3
  import { createWrapper } from '../wrapper';
4
+ export const displayClassName = 'fui-Display';
4
5
  /**
5
6
  * Styles for the root slot
6
7
  */
7
8
 
8
- var useStyles = /*#__PURE__*/__styles({
9
+ const useStyles = /*#__PURE__*/__styles({
9
10
  "root": {
10
- "Bahqtrf": "f1kx028l",
11
- "Be2twd7": "f9gixcf",
12
- "Bg96gwp": "f123viq0",
13
- "Bhrd7zp": "fss2gpl"
11
+ "Bahqtrf": "fk6fouc",
12
+ "Be2twd7": "fpyltcb",
13
+ "Bg96gwp": "f1ivgwrt",
14
+ "Bhrd7zp": "fl43uef"
14
15
  }
15
16
  }, {
16
- "d": [".f1kx028l{font-family:var(--global-type-fontFamilies-base);}", ".f9gixcf{font-size:var(--global-type-fontSizes-hero-1000);}", ".f123viq0{line-height:var(--global-type-lineHeights-hero-1000);}", ".fss2gpl{font-weight:var(--global-type-fontWeights-semibold);}"]
17
+ "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fpyltcb{font-size:var(--fontSizeHero1000);}", ".f1ivgwrt{line-height:var(--lineHeightHero1000);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}"]
17
18
  });
18
19
  /**
19
20
  * Text wrapper component for the Display typography variant
20
21
  */
21
22
 
22
23
 
23
- export var Display = /*#__PURE__*/createWrapper({
24
- useStyles: useStyles,
24
+ export const Display = /*#__PURE__*/createWrapper({
25
+ useStyles,
26
+ className: displayClassName,
25
27
  displayName: 'Display'
26
28
  });
27
29
  //# sourceMappingURL=Display.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Display/Display.tsx"],"names":[],"mappings":"AAAA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAA8B,YAA9B;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,OAAO,gBAAG,aAAa,CAAC;AAAE,EAAA,SAAS,EAAA,SAAX;AAAa,EAAA,WAAW,EAAE;AAA1B,CAAD,CAA7B","sourcesContent":["import { makeStyles } from '@fluentui/react-make-styles';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper } from '../wrapper';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.display,\n});\n\n/**\n * Text wrapper component for the Display typography variant\n */\nexport const Display = createWrapper({ useStyles, displayName: 'Display' });\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Display/Display.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA,OAAO,MAAM,gBAAgB,GAAG,aAAzB;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,OAAO,gBAAwC,aAAa,CAAC;AACxE,EAAA,SADwE;AAExE,EAAA,SAAS,EAAE,gBAF6D;AAGxE,EAAA,WAAW,EAAE;AAH2D,CAAD,CAAlE","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Display/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC","sourcesContent":["export * from './Display';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Display/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -1,4 +1,7 @@
1
+ import type { FunctionComponent } from 'react';
2
+ import { TextWrapperProps } from '../wrapper';
3
+ export declare const headlineClassName = "fui-Headline";
1
4
  /**
2
5
  * Text wrapper component for the Headline typography variant
3
6
  */
4
- export declare const Headline: import("react").ForwardRefExoticComponent<import("../wrapper").Props & import("react").RefAttributes<HTMLElement>>;
7
+ export declare const Headline: FunctionComponent<TextWrapperProps>;
@@ -1,27 +1,29 @@
1
1
  import { __styles } from '@fluentui/react-make-styles';
2
2
  import { typographyStyles } from '../../typographyStyles/index';
3
3
  import { createWrapper } from '../wrapper';
4
+ export const headlineClassName = 'fui-Headline';
4
5
  /**
5
6
  * Styles for the root slot
6
7
  */
7
8
 
8
- var useStyles = /*#__PURE__*/__styles({
9
+ const useStyles = /*#__PURE__*/__styles({
9
10
  "root": {
10
- "Bahqtrf": "f1kx028l",
11
- "Be2twd7": "fyhtp3d",
12
- "Bg96gwp": "f5biviy",
13
- "Bhrd7zp": "fss2gpl"
11
+ "Bahqtrf": "fk6fouc",
12
+ "Be2twd7": "f1pp30po",
13
+ "Bg96gwp": "f106mvju",
14
+ "Bhrd7zp": "fl43uef"
14
15
  }
15
16
  }, {
16
- "d": [".f1kx028l{font-family:var(--global-type-fontFamilies-base);}", ".fyhtp3d{font-size:var(--global-type-fontSizes-base-500);}", ".f5biviy{line-height:var(--global-type-lineHeights-base-500);}", ".fss2gpl{font-weight:var(--global-type-fontWeights-semibold);}"]
17
+ "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}"]
17
18
  });
18
19
  /**
19
20
  * Text wrapper component for the Headline typography variant
20
21
  */
21
22
 
22
23
 
23
- export var Headline = /*#__PURE__*/createWrapper({
24
- useStyles: useStyles,
24
+ export const Headline = /*#__PURE__*/createWrapper({
25
+ useStyles,
26
+ className: headlineClassName,
25
27
  displayName: 'Headline'
26
28
  });
27
29
  //# sourceMappingURL=Headline.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Headline/Headline.tsx"],"names":[],"mappings":"AAAA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAA8B,YAA9B;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,QAAQ,gBAAG,aAAa,CAAC;AAAE,EAAA,SAAS,EAAA,SAAX;AAAa,EAAA,WAAW,EAAE;AAA1B,CAAD,CAA9B","sourcesContent":["import { makeStyles } from '@fluentui/react-make-styles';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper } from '../wrapper';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.headline,\n});\n\n/**\n * Text wrapper component for the Headline typography variant\n */\nexport const Headline = createWrapper({ useStyles, displayName: 'Headline' });\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Headline/Headline.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,QAAQ,gBAAwC,aAAa,CAAC;AACzE,EAAA,SADyE;AAEzE,EAAA,SAAS,EAAE,iBAF8D;AAGzE,EAAA,WAAW,EAAE;AAH4D,CAAD,CAAnE","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Headline/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC","sourcesContent":["export * from './Headline';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Headline/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,4 +1,7 @@
1
+ import type { FunctionComponent } from 'react';
2
+ import { TextWrapperProps } from '../wrapper';
3
+ export declare const largeTitleClassName = "fui-LargeTitle";
1
4
  /**
2
5
  * Text wrapper component for the Large Title typography variant
3
6
  */
4
- export declare const LargeTitle: import("react").ForwardRefExoticComponent<import("../wrapper").Props & import("react").RefAttributes<HTMLElement>>;
7
+ export declare const LargeTitle: FunctionComponent<TextWrapperProps>;
@@ -1,27 +1,29 @@
1
1
  import { __styles } from '@fluentui/react-make-styles';
2
2
  import { typographyStyles } from '../../typographyStyles/index';
3
3
  import { createWrapper } from '../wrapper';
4
+ export const largeTitleClassName = 'fui-LargeTitle';
4
5
  /**
5
6
  * Styles for the root slot
6
7
  */
7
8
 
8
- var useStyles = /*#__PURE__*/__styles({
9
+ const useStyles = /*#__PURE__*/__styles({
9
10
  "root": {
10
- "Bahqtrf": "f1kx028l",
11
- "Be2twd7": "fsnqw2a",
12
- "Bg96gwp": "f1iavbok",
13
- "Bhrd7zp": "fss2gpl"
11
+ "Bahqtrf": "fk6fouc",
12
+ "Be2twd7": "f15afnhw",
13
+ "Bg96gwp": "fr3w3wp",
14
+ "Bhrd7zp": "fl43uef"
14
15
  }
15
16
  }, {
16
- "d": [".f1kx028l{font-family:var(--global-type-fontFamilies-base);}", ".fsnqw2a{font-size:var(--global-type-fontSizes-hero-900);}", ".f1iavbok{line-height:var(--global-type-lineHeights-hero-900);}", ".fss2gpl{font-weight:var(--global-type-fontWeights-semibold);}"]
17
+ "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".f15afnhw{font-size:var(--fontSizeHero900);}", ".fr3w3wp{line-height:var(--lineHeightHero900);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}"]
17
18
  });
18
19
  /**
19
20
  * Text wrapper component for the Large Title typography variant
20
21
  */
21
22
 
22
23
 
23
- export var LargeTitle = /*#__PURE__*/createWrapper({
24
- useStyles: useStyles,
24
+ export const LargeTitle = /*#__PURE__*/createWrapper({
25
+ useStyles,
26
+ className: largeTitleClassName,
25
27
  displayName: 'LargeTitle'
26
28
  });
27
29
  //# sourceMappingURL=LargeTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/LargeTitle/LargeTitle.tsx"],"names":[],"mappings":"AAAA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAA8B,YAA9B;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,UAAU,gBAAG,aAAa,CAAC;AAAE,EAAA,SAAS,EAAA,SAAX;AAAa,EAAA,WAAW,EAAE;AAA1B,CAAD,CAAhC","sourcesContent":["import { makeStyles } from '@fluentui/react-make-styles';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper } from '../wrapper';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.largeTitle,\n});\n\n/**\n * Text wrapper component for the Large Title typography variant\n */\nexport const LargeTitle = createWrapper({ useStyles, displayName: 'LargeTitle' });\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/LargeTitle/LargeTitle.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA,OAAO,MAAM,mBAAmB,GAAG,gBAA5B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,UAAU,gBAAwC,aAAa,CAAC;AAC3E,EAAA,SAD2E;AAE3E,EAAA,SAAS,EAAE,mBAFgE;AAG3E,EAAA,WAAW,EAAE;AAH8D,CAAD,CAArE","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/LargeTitle/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC","sourcesContent":["export * from './LargeTitle';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/LargeTitle/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,4 +1,7 @@
1
+ import type { FunctionComponent } from 'react';
2
+ import { TextWrapperProps } from '../wrapper';
3
+ export declare const subheadlineClassName = "fui-Subheadline";
1
4
  /**
2
5
  * Text wrapper component for the Subheadline typography variant
3
6
  */
4
- export declare const Subheadline: import("react").ForwardRefExoticComponent<import("../wrapper").Props & import("react").RefAttributes<HTMLElement>>;
7
+ export declare const Subheadline: FunctionComponent<TextWrapperProps>;
@@ -1,27 +1,29 @@
1
1
  import { __styles } from '@fluentui/react-make-styles';
2
2
  import { typographyStyles } from '../../typographyStyles/index';
3
3
  import { createWrapper } from '../wrapper';
4
+ export const subheadlineClassName = 'fui-Subheadline';
4
5
  /**
5
6
  * Styles for the root slot
6
7
  */
7
8
 
8
- var useStyles = /*#__PURE__*/__styles({
9
+ const useStyles = /*#__PURE__*/__styles({
9
10
  "root": {
10
- "Bahqtrf": "f1kx028l",
11
- "Be2twd7": "f1y5x3qd",
12
- "Bg96gwp": "f1r32vcg",
13
- "Bhrd7zp": "fss2gpl"
11
+ "Bahqtrf": "fk6fouc",
12
+ "Be2twd7": "fod5ikn",
13
+ "Bg96gwp": "faaz57k",
14
+ "Bhrd7zp": "fl43uef"
14
15
  }
15
16
  }, {
16
- "d": [".f1kx028l{font-family:var(--global-type-fontFamilies-base);}", ".f1y5x3qd{font-size:var(--global-type-fontSizes-base-400);}", ".f1r32vcg{line-height:var(--global-type-lineHeights-base-400);}", ".fss2gpl{font-weight:var(--global-type-fontWeights-semibold);}"]
17
+ "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}"]
17
18
  });
18
19
  /**
19
20
  * Text wrapper component for the Subheadline typography variant
20
21
  */
21
22
 
22
23
 
23
- export var Subheadline = /*#__PURE__*/createWrapper({
24
- useStyles: useStyles,
24
+ export const Subheadline = /*#__PURE__*/createWrapper({
25
+ useStyles,
26
+ className: subheadlineClassName,
25
27
  displayName: 'Subheadline'
26
28
  });
27
29
  //# sourceMappingURL=Subheadline.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Subheadline/Subheadline.tsx"],"names":[],"mappings":"AAAA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAA8B,YAA9B;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,WAAW,gBAAG,aAAa,CAAC;AAAE,EAAA,SAAS,EAAA,SAAX;AAAa,EAAA,WAAW,EAAE;AAA1B,CAAD,CAAjC","sourcesContent":["import { makeStyles } from '@fluentui/react-make-styles';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper } from '../wrapper';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.subheadline,\n});\n\n/**\n * Text wrapper component for the Subheadline typography variant\n */\nexport const Subheadline = createWrapper({ useStyles, displayName: 'Subheadline' });\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Subheadline/Subheadline.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,WAAW,gBAAwC,aAAa,CAAC;AAC5E,EAAA,SAD4E;AAE5E,EAAA,SAAS,EAAE,oBAFiE;AAG5E,EAAA,WAAW,EAAE;AAH+D,CAAD,CAAtE","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Subheadline/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC","sourcesContent":["export * from './Subheadline';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Subheadline/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
1
  import type { TextProps } from './Text.types';
2
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Typography and styling abstraction component used to ensure consistency of text.
5
5
  */
6
- export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
6
+ export declare const Text: ForwardRefComponent<TextProps>;
@@ -6,10 +6,10 @@ import { useTextStyles } from './useTextStyles';
6
6
  * Typography and styling abstraction component used to ensure consistency of text.
7
7
  */
8
8
 
9
- export var Text = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useText(props, ref);
9
+ export const Text = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useText(props, ref);
11
11
  useTextStyles(state);
12
- return renderText(state);
12
+ return renderText(state); // Work around some small mismatches in inferred types which don't matter in practice
13
13
  });
14
14
  Text.displayName = 'Text';
15
15
  //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,OAAT,QAAwB,WAAxB;AACA,SAAS,UAAT,QAA2B,cAA3B;AACA,SAAS,aAAT,QAA8B,iBAA9B;AAGA;;AAEG;;AACH,OAAO,IAAM,IAAI,gBAAG,KAAK,CAAC,UAAN,CAAyC,UAAC,KAAD,EAAQ,GAAR,EAAW;AACtE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAD,EAAQ,GAAR,CAArB;AAEA,EAAA,aAAa,CAAC,KAAD,CAAb;AACA,SAAO,UAAU,CAAC,KAAD,CAAjB;AACD,CALmB,CAAb;AAOP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourcesContent":["import * as React from 'react';\nimport { useText } from './useText';\nimport { renderText } from './renderText';\nimport { useTextStyles } from './useTextStyles';\nimport type { TextProps } from './Text.types';\n\n/**\n * Typography and styling abstraction component used to ensure consistency of text.\n */\nexport const Text = React.forwardRef<HTMLElement, TextProps>((props, ref) => {\n const state = useText(props, ref);\n\n useTextStyles(state);\n return renderText(state);\n});\n\nText.displayName = 'Text';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,OAAT,QAAwB,WAAxB;AACA,SAAS,UAAT,QAA2B,cAA3B;AACA,SAAS,aAAT,QAA8B,iBAA9B;AAIA;;AAEG;;AACH,OAAO,MAAM,IAAI,gBAAmC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClF,QAAM,KAAK,GAAG,OAAO,CAAC,KAAD,EAAQ,GAAR,CAArB;AAEA,EAAA,aAAa,CAAC,KAAD,CAAb;AAEA,SAAO,UAAU,CAAC,KAAD,CAAjB,CALkF,CAMlF;AACD,CAPmD,CAA7C;AASP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourceRoot":""}
@@ -1,86 +1,77 @@
1
- import * as React from 'react';
2
- import type { ComponentPropsCompat, ComponentStateCompat } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
3
2
  /**
4
- * Text Props
3
+ * Text slots
5
4
  */
6
- export interface TextProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {
5
+ export declare type TextSlots = {
6
+ root: IntrinsicShorthandProps<'span', 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'pre'>;
7
+ };
8
+ export declare type TextCommons = {
7
9
  /**
8
10
  * Wraps the text content on white spaces.
9
11
  *
10
12
  * @defaultValue true
11
13
  */
12
- wrap?: boolean;
14
+ wrap: boolean;
13
15
  /**
14
16
  * Truncate overflowing text for block displays.
15
17
  *
16
18
  * @defaultValue false
17
19
  */
18
- truncate?: boolean;
20
+ truncate: boolean;
19
21
  /**
20
22
  * Applies a block display for the content.
21
23
  *
22
24
  * @defaultValue false
23
25
  */
24
- block?: boolean;
26
+ block: boolean;
25
27
  /**
26
28
  * Applies the italic font style to the content.
27
29
  *
28
30
  * @defaultValue false
29
31
  */
30
- italic?: boolean;
32
+ italic: boolean;
31
33
  /**
32
34
  * Applies the underline text decoration to the content.
33
35
  *
34
36
  * @defaultValue false
35
37
  */
36
- underline?: boolean;
38
+ underline: boolean;
37
39
  /**
38
40
  * Applies the strikethrough text decoration to the content.
39
41
  *
40
42
  * @defaultValue false
41
43
  */
42
- strikethrough?: boolean;
44
+ strikethrough: boolean;
43
45
  /**
44
46
  * Applies font size and line height based on the theme tokens.
45
47
  *
46
48
  * @defaultValue 300
47
49
  */
48
- size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;
50
+ size: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;
49
51
  /**
50
52
  * Applies the font family to the content.
51
53
  *
52
54
  * @defaultValue base
53
55
  */
54
- font?: 'base' | 'monospace' | 'numeric';
56
+ font: 'base' | 'monospace' | 'numeric';
55
57
  /**
56
58
  * Applies font weight to the content.
57
59
  *
58
60
  * @defaultValue regular
59
61
  */
60
- weight?: 'regular' | 'medium' | 'semibold';
62
+ weight: 'regular' | 'medium' | 'semibold';
61
63
  /**
62
64
  * Aligns text based on the parent container.
63
65
  *
64
66
  * @defaultValue start
65
67
  */
66
- align?: 'start' | 'center' | 'end' | 'justify';
67
- /**
68
- * Component to be rendered as.
69
- *
70
- * @defaultValue span
71
- */
72
- as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'pre';
73
- }
68
+ align: 'start' | 'center' | 'end' | 'justify';
69
+ };
74
70
  /**
75
- * Names of TextProps that have a default value in useText
71
+ * Text Props
76
72
  */
77
- export declare type TextDefaultedProps = never;
73
+ export declare type TextProps = ComponentProps<TextSlots> & Partial<TextCommons>;
78
74
  /**
79
75
  * State used in rendering Text
80
76
  */
81
- export interface TextState extends ComponentStateCompat<TextProps, TextDefaultedProps> {
82
- /**
83
- * Ref to the root element
84
- */
85
- ref: React.Ref<HTMLElement>;
86
- }
77
+ export declare type TextState = ComponentState<TextSlots> & TextCommons;
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.js","sourceRoot":"../src/","sources":["components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentPropsCompat, ComponentStateCompat } from '@fluentui/react-utilities';\n\n/**\n * Text Props\n */\nexport interface TextProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {\n /**\n * Wraps the text content on white spaces.\n *\n * @defaultValue true\n */\n wrap?: boolean;\n\n /**\n * Truncate overflowing text for block displays.\n *\n * @defaultValue false\n */\n truncate?: boolean;\n\n /**\n * Applies a block display for the content.\n *\n * @defaultValue false\n */\n block?: boolean;\n\n /**\n * Applies the italic font style to the content.\n *\n * @defaultValue false\n */\n italic?: boolean;\n\n /**\n * Applies the underline text decoration to the content.\n *\n * @defaultValue false\n */\n underline?: boolean;\n\n /**\n * Applies the strikethrough text decoration to the content.\n *\n * @defaultValue false\n */\n strikethrough?: boolean;\n\n /**\n * Applies font size and line height based on the theme tokens.\n *\n * @defaultValue 300\n */\n size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;\n\n /**\n * Applies the font family to the content.\n *\n * @defaultValue base\n */\n font?: 'base' | 'monospace' | 'numeric';\n\n /**\n * Applies font weight to the content.\n *\n * @defaultValue regular\n */\n weight?: 'regular' | 'medium' | 'semibold';\n\n /**\n * Aligns text based on the parent container.\n *\n * @defaultValue start\n */\n align?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * Component to be rendered as.\n *\n * @defaultValue span\n */\n as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'pre';\n}\n\n/**\n * Names of TextProps that have a default value in useText\n */\nexport type TextDefaultedProps = never;\n\n/**\n * State used in rendering Text\n */\nexport interface TextState extends ComponentStateCompat<TextProps, TextDefaultedProps> {\n /**\n * Ref to the root element\n */\n ref: React.Ref<HTMLElement>;\n}\n"]}
1
+ {"version":3,"file":"Text.types.js","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Text/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './Text';\nexport * from './Text.types';\nexport * from './renderText';\nexport * from './useText';\nexport * from './useTextStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
@@ -1,15 +1,14 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
- import { getSlotsCompat } from '@fluentui/react-utilities';
2
+ import { getSlots } from '@fluentui/react-utilities';
4
3
  /**
5
4
  * Render the final JSX of Text
6
5
  */
7
6
 
8
- export var renderText = function (state) {
9
- var _a = getSlotsCompat(state),
10
- slots = _a.slots,
11
- slotProps = _a.slotProps;
12
-
13
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.children);
7
+ export const renderText = state => {
8
+ const {
9
+ slots,
10
+ slotProps
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root));
14
13
  };
15
14
  //# sourceMappingURL=renderText.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Text/renderText.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,2BAA/B;AAGA;;AAEG;;AACH,OAAO,IAAM,UAAU,GAAG,UAAC,KAAD,EAAiB;AACnC,MAAA,EAAA,GAAuB,cAAc,CAAC,KAAD,CAArC;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EAAiC,KAAK,CAAC,QAAvC,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport type { TextState } from './Text.types';\n\n/**\n * Render the final JSX of Text\n */\nexport const renderText = (state: TextState) => {\n const { slots, slotProps } = getSlotsCompat(state);\n\n return <slots.root {...slotProps.root}>{state.children}</slots.root>;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Text/renderText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,UAAU,GAAI,KAAD,IAAqB;AAC7C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAY,KAAZ,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAAP;AACD,CAJM","sourceRoot":""}
@@ -8,6 +8,5 @@ import type { TextProps, TextState } from './Text.types';
8
8
  *
9
9
  * @param props - props from this instance of Text
10
10
  * @param ref - reference to root HTMLElement of Text
11
- * @param defaultProps - (optional) default prop values provided by the implementing type
12
11
  */
13
- export declare const useText: (props: TextProps, ref: React.Ref<HTMLElement>, defaultProps?: TextProps | undefined) => TextState;
12
+ export declare const useText: (props: TextProps, ref: React.Ref<HTMLElement>) => TextState;
@@ -1,5 +1,4 @@
1
- import { makeMergeProps } from '@fluentui/react-utilities';
2
- var mergeProps = /*#__PURE__*/makeMergeProps();
1
+ import { getNativeElementProps } from '@fluentui/react-utilities';
3
2
  /**
4
3
  * Create the state required to render Text.
5
4
  *
@@ -8,14 +7,44 @@ var mergeProps = /*#__PURE__*/makeMergeProps();
8
7
  *
9
8
  * @param props - props from this instance of Text
10
9
  * @param ref - reference to root HTMLElement of Text
11
- * @param defaultProps - (optional) default prop values provided by the implementing type
12
10
  */
13
11
 
14
- export var useText = function (props, ref, defaultProps) {
15
- var state = mergeProps({
16
- ref: ref,
17
- as: 'span'
18
- }, defaultProps, props);
12
+ export const useText = (props, ref) => {
13
+ var _a;
14
+
15
+ const {
16
+ wrap,
17
+ truncate,
18
+ block,
19
+ italic,
20
+ underline,
21
+ strikethrough,
22
+ size,
23
+ font,
24
+ weight,
25
+ align
26
+ } = props;
27
+ const as = (_a = props.as) !== null && _a !== void 0 ? _a : 'span';
28
+ const state = {
29
+ wrap: wrap !== null && wrap !== void 0 ? wrap : true,
30
+ truncate: truncate !== null && truncate !== void 0 ? truncate : false,
31
+ block: block !== null && block !== void 0 ? block : false,
32
+ italic: italic !== null && italic !== void 0 ? italic : false,
33
+ underline: underline !== null && underline !== void 0 ? underline : false,
34
+ strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,
35
+ size: size !== null && size !== void 0 ? size : 300,
36
+ font: font !== null && font !== void 0 ? font : 'base',
37
+ weight: weight !== null && weight !== void 0 ? weight : 'regular',
38
+ align: align !== null && align !== void 0 ? align : 'start',
39
+ components: {
40
+ root: 'span'
41
+ },
42
+ root: getNativeElementProps(as, {
43
+ ref,
44
+ ...props,
45
+ as
46
+ })
47
+ };
19
48
  return state;
20
49
  };
21
50
  //# sourceMappingURL=useText.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Text/useText.ts"],"names":[],"mappings":"AACA,SAAS,cAAT,QAA+B,2BAA/B;AAGA,IAAM,UAAU,gBAAG,cAAc,EAAjC;AAEA;;;;;;;;;AASG;;AACH,OAAO,IAAM,OAAO,GAAG,UAAC,KAAD,EAAmB,GAAnB,EAAgD,YAAhD,EAAwE;AAC7F,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,GAAG,EAAA,GADL;AAEE,IAAA,EAAE,EAAE;AAFN,GADsB,EAKtB,YALsB,EAMtB,KANsB,CAAxB;AASA,SAAO,KAAP;AACD,CAXM","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps } from '@fluentui/react-utilities';\nimport type { TextProps, TextState } from './Text.types';\n\nconst mergeProps = makeMergeProps<TextState>();\n\n/**\n * Create the state required to render Text.\n *\n * The returned state can be modified with hooks such as useTextStyles,\n * before being passed to renderText.\n *\n * @param props - props from this instance of Text\n * @param ref - reference to root HTMLElement of Text\n * @param defaultProps - (optional) default prop values provided by the implementing type\n */\nexport const useText = (props: TextProps, ref: React.Ref<HTMLElement>, defaultProps?: TextProps): TextState => {\n const state = mergeProps(\n {\n ref,\n as: 'span',\n },\n defaultProps,\n props,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Text/useText.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,OAAO,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;;;AAClF,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,QAAR;AAAkB,IAAA,KAAlB;AAAyB,IAAA,MAAzB;AAAiC,IAAA,SAAjC;AAA4C,IAAA,aAA5C;AAA2D,IAAA,IAA3D;AAAiE,IAAA,IAAjE;AAAuE,IAAA,MAAvE;AAA+E,IAAA;AAA/E,MAAyF,KAA/F;AACA,QAAM,EAAE,GAAA,CAAA,EAAA,GAAG,KAAK,CAAC,EAAT,MAAW,IAAX,IAAW,EAAA,KAAA,KAAA,CAAX,GAAW,EAAX,GAAe,MAAvB;AAEA,QAAM,KAAK,GAAc;AACvB,IAAA,IAAI,EAAE,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAA,IAAA,GAAQ,IADS;AAEvB,IAAA,QAAQ,EAAE,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAA,QAAA,GAAY,KAFC;AAGvB,IAAA,KAAK,EAAE,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAA,KAAA,GAAS,KAHO;AAIvB,IAAA,MAAM,EAAE,MAAM,KAAA,IAAN,IAAA,MAAM,KAAA,KAAA,CAAN,GAAA,MAAA,GAAU,KAJK;AAKvB,IAAA,SAAS,EAAE,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAA,SAAA,GAAa,KALD;AAMvB,IAAA,aAAa,EAAE,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAA,aAAA,GAAiB,KANT;AAOvB,IAAA,IAAI,EAAE,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAA,IAAA,GAAQ,GAPS;AAQvB,IAAA,IAAI,EAAE,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAA,IAAA,GAAQ,MARS;AASvB,IAAA,MAAM,EAAE,MAAM,KAAA,IAAN,IAAA,MAAM,KAAA,KAAA,CAAN,GAAA,MAAA,GAAU,SATK;AAUvB,IAAA,KAAK,EAAE,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAA,KAAA,GAAS,OAVO;AAYvB,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE;AAAR,KAZW;AAcvB,IAAA,IAAI,EAAE,qBAAqB,CAAC,EAAD,EAAK;AAC9B,MAAA,GAD8B;AAE9B,SAAG,KAF2B;AAG9B,MAAA;AAH8B,KAAL;AAdJ,GAAzB;AAqBA,SAAO,KAAP;AACD,CA1BM","sourceRoot":""}
@@ -1,4 +1,5 @@
1
1
  import type { TextState } from './Text.types';
2
+ export declare const textClassName = "fui-Text";
2
3
  /**
3
4
  * Apply styling to the Text slots based on the state
4
5
  */