@fluentui/react-text 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.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 (169) hide show
  1. package/CHANGELOG.json +275 -16
  2. package/CHANGELOG.md +80 -10
  3. package/MIGRATION.md +153 -103
  4. package/dist/react-text.d.ts +28 -8
  5. package/lib/Body.js.map +1 -1
  6. package/lib/Caption.js.map +1 -1
  7. package/lib/Display.js.map +1 -1
  8. package/lib/Headline.js.map +1 -1
  9. package/lib/LargeTitle.js.map +1 -1
  10. package/lib/Subheadline.js.map +1 -1
  11. package/lib/Text.js.map +1 -1
  12. package/lib/Title1.js.map +1 -1
  13. package/lib/Title2.js.map +1 -1
  14. package/lib/Title3.js.map +1 -1
  15. package/lib/components/Body/Body.d.ts +1 -0
  16. package/lib/components/Body/Body.js +6 -4
  17. package/lib/components/Body/Body.js.map +1 -1
  18. package/lib/components/Body/index.js.map +1 -1
  19. package/lib/components/Caption/Caption.d.ts +1 -0
  20. package/lib/components/Caption/Caption.js +6 -4
  21. package/lib/components/Caption/Caption.js.map +1 -1
  22. package/lib/components/Caption/index.js.map +1 -1
  23. package/lib/components/Display/Display.d.ts +1 -0
  24. package/lib/components/Display/Display.js +6 -4
  25. package/lib/components/Display/Display.js.map +1 -1
  26. package/lib/components/Display/index.js.map +1 -1
  27. package/lib/components/Headline/Headline.d.ts +1 -0
  28. package/lib/components/Headline/Headline.js +6 -4
  29. package/lib/components/Headline/Headline.js.map +1 -1
  30. package/lib/components/Headline/index.js.map +1 -1
  31. package/lib/components/LargeTitle/LargeTitle.d.ts +1 -0
  32. package/lib/components/LargeTitle/LargeTitle.js +6 -4
  33. package/lib/components/LargeTitle/LargeTitle.js.map +1 -1
  34. package/lib/components/LargeTitle/index.js.map +1 -1
  35. package/lib/components/Subheadline/Subheadline.d.ts +1 -0
  36. package/lib/components/Subheadline/Subheadline.js +6 -4
  37. package/lib/components/Subheadline/Subheadline.js.map +1 -1
  38. package/lib/components/Subheadline/index.js.map +1 -1
  39. package/lib/components/Text/Text.js +7 -7
  40. package/lib/components/Text/Text.js.map +1 -1
  41. package/lib/components/Text/Text.types.d.ts +4 -3
  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.d.ts +1 -1
  45. package/lib/components/Text/renderText.js +7 -7
  46. package/lib/components/Text/renderText.js.map +1 -1
  47. package/lib/components/Text/useText.d.ts +3 -3
  48. package/lib/components/Text/useText.js +22 -21
  49. package/lib/components/Text/useText.js.map +1 -1
  50. package/lib/components/Text/useTextStyles.d.ts +2 -1
  51. package/lib/components/Text/useTextStyles.js +15 -11
  52. package/lib/components/Text/useTextStyles.js.map +1 -1
  53. package/lib/components/Title1/Title1.d.ts +1 -0
  54. package/lib/components/Title1/Title1.js +6 -4
  55. package/lib/components/Title1/Title1.js.map +1 -1
  56. package/lib/components/Title1/index.js.map +1 -1
  57. package/lib/components/Title2/Title2.d.ts +1 -0
  58. package/lib/components/Title2/Title2.js +6 -4
  59. package/lib/components/Title2/Title2.js.map +1 -1
  60. package/lib/components/Title2/index.js.map +1 -1
  61. package/lib/components/Title3/Title3.d.ts +1 -0
  62. package/lib/components/Title3/Title3.js +6 -4
  63. package/lib/components/Title3/Title3.js.map +1 -1
  64. package/lib/components/Title3/index.js.map +1 -1
  65. package/lib/components/wrapper.d.ts +1 -0
  66. package/lib/components/wrapper.js +13 -10
  67. package/lib/components/wrapper.js.map +1 -1
  68. package/lib/index.js.map +1 -1
  69. package/lib/typographyStyles/index.js.map +1 -1
  70. package/lib/typographyStyles/typographyStyles.d.ts +10 -11
  71. package/lib/typographyStyles/typographyStyles.js +55 -71
  72. package/lib/typographyStyles/typographyStyles.js.map +1 -1
  73. package/lib-commonjs/Body.js +1 -1
  74. package/lib-commonjs/Body.js.map +1 -1
  75. package/lib-commonjs/Caption.js +1 -1
  76. package/lib-commonjs/Caption.js.map +1 -1
  77. package/lib-commonjs/Display.js +1 -1
  78. package/lib-commonjs/Display.js.map +1 -1
  79. package/lib-commonjs/Headline.js +1 -1
  80. package/lib-commonjs/Headline.js.map +1 -1
  81. package/lib-commonjs/LargeTitle.js +1 -1
  82. package/lib-commonjs/LargeTitle.js.map +1 -1
  83. package/lib-commonjs/Subheadline.js +1 -1
  84. package/lib-commonjs/Subheadline.js.map +1 -1
  85. package/lib-commonjs/Text.js +1 -1
  86. package/lib-commonjs/Text.js.map +1 -1
  87. package/lib-commonjs/Title1.js +1 -1
  88. package/lib-commonjs/Title1.js.map +1 -1
  89. package/lib-commonjs/Title2.js +1 -1
  90. package/lib-commonjs/Title2.js.map +1 -1
  91. package/lib-commonjs/Title3.js +1 -1
  92. package/lib-commonjs/Title3.js.map +1 -1
  93. package/lib-commonjs/components/Body/Body.d.ts +1 -0
  94. package/lib-commonjs/components/Body/Body.js +9 -9
  95. package/lib-commonjs/components/Body/Body.js.map +1 -1
  96. package/lib-commonjs/components/Body/index.js +1 -1
  97. package/lib-commonjs/components/Body/index.js.map +1 -1
  98. package/lib-commonjs/components/Caption/Caption.d.ts +1 -0
  99. package/lib-commonjs/components/Caption/Caption.js +9 -9
  100. package/lib-commonjs/components/Caption/Caption.js.map +1 -1
  101. package/lib-commonjs/components/Caption/index.js +1 -1
  102. package/lib-commonjs/components/Caption/index.js.map +1 -1
  103. package/lib-commonjs/components/Display/Display.d.ts +1 -0
  104. package/lib-commonjs/components/Display/Display.js +9 -9
  105. package/lib-commonjs/components/Display/Display.js.map +1 -1
  106. package/lib-commonjs/components/Display/index.js +1 -1
  107. package/lib-commonjs/components/Display/index.js.map +1 -1
  108. package/lib-commonjs/components/Headline/Headline.d.ts +1 -0
  109. package/lib-commonjs/components/Headline/Headline.js +9 -9
  110. package/lib-commonjs/components/Headline/Headline.js.map +1 -1
  111. package/lib-commonjs/components/Headline/index.js +1 -1
  112. package/lib-commonjs/components/Headline/index.js.map +1 -1
  113. package/lib-commonjs/components/LargeTitle/LargeTitle.d.ts +1 -0
  114. package/lib-commonjs/components/LargeTitle/LargeTitle.js +9 -9
  115. package/lib-commonjs/components/LargeTitle/LargeTitle.js.map +1 -1
  116. package/lib-commonjs/components/LargeTitle/index.js +1 -1
  117. package/lib-commonjs/components/LargeTitle/index.js.map +1 -1
  118. package/lib-commonjs/components/Subheadline/Subheadline.d.ts +1 -0
  119. package/lib-commonjs/components/Subheadline/Subheadline.js +9 -9
  120. package/lib-commonjs/components/Subheadline/Subheadline.js.map +1 -1
  121. package/lib-commonjs/components/Subheadline/index.js +1 -1
  122. package/lib-commonjs/components/Subheadline/index.js.map +1 -1
  123. package/lib-commonjs/components/Text/Text.js +8 -8
  124. package/lib-commonjs/components/Text/Text.js.map +1 -1
  125. package/lib-commonjs/components/Text/Text.types.d.ts +4 -3
  126. package/lib-commonjs/components/Text/Text.types.js.map +1 -1
  127. package/lib-commonjs/components/Text/index.js +1 -1
  128. package/lib-commonjs/components/Text/index.js.map +1 -1
  129. package/lib-commonjs/components/Text/renderText.d.ts +1 -1
  130. package/lib-commonjs/components/Text/renderText.js +11 -12
  131. package/lib-commonjs/components/Text/renderText.js.map +1 -1
  132. package/lib-commonjs/components/Text/useText.d.ts +3 -3
  133. package/lib-commonjs/components/Text/useText.js +25 -25
  134. package/lib-commonjs/components/Text/useText.js.map +1 -1
  135. package/lib-commonjs/components/Text/useTextStyles.d.ts +2 -1
  136. package/lib-commonjs/components/Text/useTextStyles.js +19 -14
  137. package/lib-commonjs/components/Text/useTextStyles.js.map +1 -1
  138. package/lib-commonjs/components/Title1/Title1.d.ts +1 -0
  139. package/lib-commonjs/components/Title1/Title1.js +9 -9
  140. package/lib-commonjs/components/Title1/Title1.js.map +1 -1
  141. package/lib-commonjs/components/Title1/index.js +1 -1
  142. package/lib-commonjs/components/Title1/index.js.map +1 -1
  143. package/lib-commonjs/components/Title2/Title2.d.ts +1 -0
  144. package/lib-commonjs/components/Title2/Title2.js +9 -9
  145. package/lib-commonjs/components/Title2/Title2.js.map +1 -1
  146. package/lib-commonjs/components/Title2/index.js +1 -1
  147. package/lib-commonjs/components/Title2/index.js.map +1 -1
  148. package/lib-commonjs/components/Title3/Title3.d.ts +1 -0
  149. package/lib-commonjs/components/Title3/Title3.js +9 -9
  150. package/lib-commonjs/components/Title3/Title3.js.map +1 -1
  151. package/lib-commonjs/components/Title3/index.js +1 -1
  152. package/lib-commonjs/components/Title3/index.js.map +1 -1
  153. package/lib-commonjs/components/wrapper.d.ts +1 -0
  154. package/lib-commonjs/components/wrapper.js +14 -11
  155. package/lib-commonjs/components/wrapper.js.map +1 -1
  156. package/lib-commonjs/index.js +1 -1
  157. package/lib-commonjs/index.js.map +1 -1
  158. package/lib-commonjs/typographyStyles/index.js +1 -1
  159. package/lib-commonjs/typographyStyles/index.js.map +1 -1
  160. package/lib-commonjs/typographyStyles/typographyStyles.d.ts +10 -11
  161. package/lib-commonjs/typographyStyles/typographyStyles.js +48 -89
  162. package/lib-commonjs/typographyStyles/typographyStyles.js.map +1 -1
  163. package/package.json +9 -10
  164. package/lib/common/isConformant.d.ts +0 -4
  165. package/lib/common/isConformant.js +0 -16
  166. package/lib/common/isConformant.js.map +0 -1
  167. package/lib-commonjs/common/isConformant.d.ts +0 -4
  168. package/lib-commonjs/common/isConformant.js +0 -27
  169. package/lib-commonjs/common/isConformant.js.map +0 -1
package/lib/Title2.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Title2.js","sourceRoot":"","sources":["../src/Title2.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"Title2.js","sourceRoot":"../src/","sources":["Title2.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Title2/index';\n"]}
package/lib/Title3.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Title3.js","sourceRoot":"","sources":["../src/Title3.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"Title3.js","sourceRoot":"../src/","sources":["Title3.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Title3/index';\n"]}
@@ -1,5 +1,6 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import { TextWrapperProps } from '../wrapper';
3
+ export declare const bodyClassName = "fui-Body";
3
4
  /**
4
5
  * Text wrapper component for the Body typography variant
5
6
  */
@@ -1,11 +1,12 @@
1
- import { __styles } from '@fluentui/react-make-styles';
1
+ import { __styles } from '@griffel/react';
2
2
  import { typographyStyles } from '../../typographyStyles/index';
3
3
  import { createWrapper } from '../wrapper';
4
+ export const bodyClassName = 'fui-Body';
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
11
  "Bahqtrf": "fk6fouc",
11
12
  "Be2twd7": "fkhj508",
@@ -20,8 +21,9 @@ var useStyles = /*#__PURE__*/__styles({
20
21
  */
21
22
 
22
23
 
23
- export var Body = /*#__PURE__*/createWrapper({
24
- useStyles: useStyles,
24
+ export const Body = /*#__PURE__*/createWrapper({
25
+ useStyles,
26
+ className: bodyClassName,
25
27
  displayName: 'Body'
26
28
  });
27
29
  //# sourceMappingURL=Body.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Body/Body.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,IAAI,gBAAwC,aAAa,CAAC;AAAE,EAAA,SAAS,EAAA,SAAX;AAAa,EAAA,WAAW,EAAE;AAA1B,CAAD,CAA/D","sourceRoot":""}
1
+ {"version":3,"sources":["components/Body/Body.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA,OAAO,MAAM,aAAa,GAAG,UAAtB;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,MAAM,IAAI,gBAAwC,aAAa,CAAC;AACrE,EAAA,SADqE;AAErE,EAAA,SAAS,EAAE,aAF0D;AAGrE,EAAA,WAAW,EAAE;AAHwD,CAAD,CAA/D","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const bodyClassName = 'fui-Body';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.body,\n});\n\n/**\n * Text wrapper component for the Body typography variant\n */\nexport const Body: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: bodyClassName,\n displayName: 'Body',\n});\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Body/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Body/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './Body';\n"]}
@@ -1,5 +1,6 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import { TextWrapperProps } from '../wrapper';
3
+ export declare const captionClassName = "fui-Caption";
3
4
  /**
4
5
  * Text wrapper component for the Caption typography variant
5
6
  */
@@ -1,11 +1,12 @@
1
- import { __styles } from '@fluentui/react-make-styles';
1
+ import { __styles } from '@griffel/react';
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
11
  "Bahqtrf": "fk6fouc",
11
12
  "Be2twd7": "fy9rknc",
@@ -20,8 +21,9 @@ var useStyles = /*#__PURE__*/__styles({
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":["../../../src/components/Caption/Caption.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,OAAO,gBAAwC,aAAa,CAAC;AAAE,EAAA,SAAS,EAAA,SAAX;AAAa,EAAA,WAAW,EAAE;AAA1B,CAAD,CAAlE","sourceRoot":""}
1
+ {"version":3,"sources":["components/Caption/Caption.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;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","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const captionClassName = 'fui-Caption';\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: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: captionClassName,\n displayName: 'Caption',\n});\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Caption/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
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,5 +1,6 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import { TextWrapperProps } from '../wrapper';
3
+ export declare const displayClassName = "fui-Display";
3
4
  /**
4
5
  * Text wrapper component for the Display typography variant
5
6
  */
@@ -1,11 +1,12 @@
1
- import { __styles } from '@fluentui/react-make-styles';
1
+ import { __styles } from '@griffel/react';
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
11
  "Bahqtrf": "fk6fouc",
11
12
  "Be2twd7": "fpyltcb",
@@ -20,8 +21,9 @@ var useStyles = /*#__PURE__*/__styles({
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":["../../../src/components/Display/Display.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,OAAO,gBAAwC,aAAa,CAAC;AAAE,EAAA,SAAS,EAAA,SAAX;AAAa,EAAA,WAAW,EAAE;AAA1B,CAAD,CAAlE","sourceRoot":""}
1
+ {"version":3,"sources":["components/Display/Display.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;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","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const displayClassName = 'fui-Display';\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: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: displayClassName,\n displayName: 'Display',\n});\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Display/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
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,5 +1,6 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import { TextWrapperProps } from '../wrapper';
3
+ export declare const headlineClassName = "fui-Headline";
3
4
  /**
4
5
  * Text wrapper component for the Headline typography variant
5
6
  */
@@ -1,11 +1,12 @@
1
- import { __styles } from '@fluentui/react-make-styles';
1
+ import { __styles } from '@griffel/react';
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
11
  "Bahqtrf": "fk6fouc",
11
12
  "Be2twd7": "f1pp30po",
@@ -20,8 +21,9 @@ var useStyles = /*#__PURE__*/__styles({
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":["../../../src/components/Headline/Headline.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,QAAQ,gBAAwC,aAAa,CAAC;AACzE,EAAA,SAAS,EAAA,SADgE;AAEzE,EAAA,WAAW,EAAE;AAF4D,CAAD,CAAnE","sourceRoot":""}
1
+ {"version":3,"sources":["components/Headline/Headline.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;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","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const headlineClassName = 'fui-Headline';\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: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: headlineClassName,\n displayName: 'Headline',\n});\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Headline/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
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,5 +1,6 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import { TextWrapperProps } from '../wrapper';
3
+ export declare const largeTitleClassName = "fui-LargeTitle";
3
4
  /**
4
5
  * Text wrapper component for the Large Title typography variant
5
6
  */
@@ -1,11 +1,12 @@
1
- import { __styles } from '@fluentui/react-make-styles';
1
+ import { __styles } from '@griffel/react';
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
11
  "Bahqtrf": "fk6fouc",
11
12
  "Be2twd7": "f15afnhw",
@@ -20,8 +21,9 @@ var useStyles = /*#__PURE__*/__styles({
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":["../../../src/components/LargeTitle/LargeTitle.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,UAAU,gBAAwC,aAAa,CAAC;AAC3E,EAAA,SAAS,EAAA,SADkE;AAE3E,EAAA,WAAW,EAAE;AAF8D,CAAD,CAArE","sourceRoot":""}
1
+ {"version":3,"sources":["components/LargeTitle/LargeTitle.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;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","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const largeTitleClassName = 'fui-LargeTitle';\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: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: largeTitleClassName,\n displayName: 'LargeTitle',\n});\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/LargeTitle/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
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,5 +1,6 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import { TextWrapperProps } from '../wrapper';
3
+ export declare const subheadlineClassName = "fui-Subheadline";
3
4
  /**
4
5
  * Text wrapper component for the Subheadline typography variant
5
6
  */
@@ -1,11 +1,12 @@
1
- import { __styles } from '@fluentui/react-make-styles';
1
+ import { __styles } from '@griffel/react';
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
11
  "Bahqtrf": "fk6fouc",
11
12
  "Be2twd7": "fod5ikn",
@@ -20,8 +21,9 @@ var useStyles = /*#__PURE__*/__styles({
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":["../../../src/components/Subheadline/Subheadline.tsx"],"names":[],"mappings":"AACA,yBAA2B,6BAA3B;AACA,SAAS,gBAAT,QAAiC,8BAAjC;AACA,SAAS,aAAT,QAAgD,YAAhD;AAEA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAIA;;AAEG;;;AACH,OAAO,IAAM,WAAW,gBAAwC,aAAa,CAAC;AAC5E,EAAA,SAAS,EAAA,SADmE;AAE5E,EAAA,WAAW,EAAE;AAF+D,CAAD,CAAtE","sourceRoot":""}
1
+ {"version":3,"sources":["components/Subheadline/Subheadline.tsx"],"names":[],"mappings":"AACA,yBAA2B,gBAA3B;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","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const subheadlineClassName = 'fui-Subheadline';\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: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: subheadlineClassName,\n displayName: 'Subheadline',\n});\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Subheadline/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
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,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useText } from './useText';
3
- import { renderText } from './renderText';
4
- import { useTextStyles } from './useTextStyles';
2
+ import { useText_unstable } from './useText';
3
+ import { renderText_unstable } from './renderText';
4
+ import { useTextStyles_unstable } from './useTextStyles';
5
5
  /**
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);
11
- useTextStyles(state);
12
- return renderText(state); // Work around some small mismatches in inferred types which don't matter in practice
9
+ export const Text = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useText_unstable(props, ref);
11
+ useTextStyles_unstable(state);
12
+ return renderText_unstable(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":["../../../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,IAAM,IAAI,gBAAmC,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAC9E,MAAM,KAAK,GAAG,OAAO,CAAC,KAAD,EAAQ,GAAR,CAArB;AAEA,EAAA,aAAa,CAAC,KAAD,CAAb;AAEA,SAAO,UAAU,CAAC,KAAD,CAAjB,CAL8E,CAM9E;AACD,CAPmD,CAA7C;AASP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourceRoot":""}
1
+ {"version":3,"sources":["components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,WAAjC;AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AAIA;;AAEG;;AACH,OAAO,MAAM,IAAI,gBAAmC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClF,QAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;AAEA,EAAA,sBAAsB,CAAC,KAAD,CAAtB;AAEA,SAAO,mBAAmB,CAAC,KAAD,CAA1B,CALkF,CAMlF;AACD,CAPmD,CAA7C;AASP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourcesContent":["import * as React from 'react';\nimport { useText_unstable } from './useText';\nimport { renderText_unstable } from './renderText';\nimport { useTextStyles_unstable } from './useTextStyles';\nimport type { TextProps } from './Text.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Typography and styling abstraction component used to ensure consistency of text.\n */\nexport const Text: ForwardRefComponent<TextProps> = React.forwardRef((props, ref) => {\n const state = useText_unstable(props, ref);\n\n useTextStyles_unstable(state);\n\n return renderText_unstable(state);\n // Work around some small mismatches in inferred types which don't matter in practice\n}) as ForwardRefComponent<TextProps>;\n\nText.displayName = 'Text';\n"],"sourceRoot":"../src/"}
@@ -1,11 +1,11 @@
1
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
2
  /**
3
3
  * Text slots
4
4
  */
5
5
  export declare type TextSlots = {
6
- root: IntrinsicShorthandProps<'span', 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'pre'>;
6
+ root: Slot<'span', 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'pre'>;
7
7
  };
8
- export declare type TextCommons = {
8
+ declare type TextCommons = {
9
9
  /**
10
10
  * Wraps the text content on white spaces.
11
11
  *
@@ -75,3 +75,4 @@ export declare type TextProps = ComponentProps<TextSlots> & Partial<TextCommons>
75
75
  * State used in rendering Text
76
76
  */
77
77
  export declare type TextState = ComponentState<TextSlots> & TextCommons;
78
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.js","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"Text.types.js","sourceRoot":"../src/","sources":["components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Text slots\n */\nexport type TextSlots = {\n root: Slot<'span', 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'pre'>;\n};\n\ntype TextCommons = {\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/**\n * Text Props\n */\nexport type TextProps = ComponentProps<TextSlots> & Partial<TextCommons>;\n\n/**\n * State used in rendering Text\n */\nexport type TextState = ComponentState<TextSlots> & TextCommons;\n"]}
@@ -1 +1 @@
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
+ {"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"]}
@@ -2,4 +2,4 @@ import type { TextState } from './Text.types';
2
2
  /**
3
3
  * Render the final JSX of Text
4
4
  */
5
- export declare const renderText: (state: TextState) => JSX.Element;
5
+ export declare const renderText_unstable: (state: TextState) => JSX.Element;
@@ -1,15 +1,15 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
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 = getSlots(state),
10
- slots = _a.slots,
11
- slotProps = _a.slotProps;
12
-
13
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root));
7
+ export const renderText_unstable = state => {
8
+ const {
9
+ slots,
10
+ slotProps
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ });
14
14
  };
15
15
  //# sourceMappingURL=renderText.js.map
@@ -1 +1 @@
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,IAAM,UAAU,GAAG,UAAC,KAAD,EAAiB;AACnC,MAAA,EAAA,GAAuB,QAAQ,CAAY,KAAZ,CAA/B;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,CAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["components/Text/renderText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAAqB;AACtD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAY,KAAZ,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TextSlots, TextState } from './Text.types';\n\n/**\n * Render the final JSX of Text\n */\nexport const renderText_unstable = (state: TextState) => {\n const { slots, slotProps } = getSlots<TextSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -3,10 +3,10 @@ import type { TextProps, TextState } from './Text.types';
3
3
  /**
4
4
  * Create the state required to render Text.
5
5
  *
6
- * The returned state can be modified with hooks such as useTextStyles,
7
- * before being passed to renderText.
6
+ * The returned state can be modified with hooks such as useTextStyles_unstable,
7
+ * before being passed to renderText_unstable.
8
8
  *
9
9
  * @param props - props from this instance of Text
10
10
  * @param ref - reference to root HTMLElement of Text
11
11
  */
12
- export declare const useText: (props: TextProps, ref: React.Ref<HTMLElement>) => TextState;
12
+ export declare const useText_unstable: (props: TextProps, ref: React.Ref<HTMLElement>) => TextState;
@@ -1,30 +1,31 @@
1
- import { __assign } from "tslib";
2
1
  import { getNativeElementProps } from '@fluentui/react-utilities';
3
2
  /**
4
3
  * Create the state required to render Text.
5
4
  *
6
- * The returned state can be modified with hooks such as useTextStyles,
7
- * before being passed to renderText.
5
+ * The returned state can be modified with hooks such as useTextStyles_unstable,
6
+ * before being passed to renderText_unstable.
8
7
  *
9
8
  * @param props - props from this instance of Text
10
9
  * @param ref - reference to root HTMLElement of Text
11
10
  */
12
11
 
13
- export var useText = function (props, ref) {
12
+ export const useText_unstable = (props, ref) => {
14
13
  var _a;
15
14
 
16
- var wrap = props.wrap,
17
- truncate = props.truncate,
18
- block = props.block,
19
- italic = props.italic,
20
- underline = props.underline,
21
- strikethrough = props.strikethrough,
22
- size = props.size,
23
- font = props.font,
24
- weight = props.weight,
25
- align = props.align;
26
- var as = (_a = props.as) !== null && _a !== void 0 ? _a : 'span';
27
- var state = {
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 = {
28
29
  wrap: wrap !== null && wrap !== void 0 ? wrap : true,
29
30
  truncate: truncate !== null && truncate !== void 0 ? truncate : false,
30
31
  block: block !== null && block !== void 0 ? block : false,
@@ -38,11 +39,11 @@ export var useText = function (props, ref) {
38
39
  components: {
39
40
  root: 'span'
40
41
  },
41
- root: getNativeElementProps(as, __assign(__assign({
42
- ref: ref
43
- }, props), {
44
- as: as
45
- }))
42
+ root: getNativeElementProps(as, {
43
+ ref,
44
+ ...props,
45
+ as
46
+ })
46
47
  };
47
48
  return state;
48
49
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Text/useText.ts"],"names":[],"mappings":";AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,IAAM,OAAO,GAAG,UAAC,KAAD,EAAmB,GAAnB,EAA8C;;;AAC3D,MAAA,IAAI,GAAmF,KAAK,CAAxF,IAAJ;AAAA,MAAM,QAAQ,GAAyE,KAAK,CAA9E,QAAd;AAAA,MAAgB,KAAK,GAAkE,KAAK,CAAvE,KAArB;AAAA,MAAuB,MAAM,GAA0D,KAAK,CAA/D,MAA7B;AAAA,MAA+B,SAAS,GAA+C,KAAK,CAApD,SAAxC;AAAA,MAA0C,aAAa,GAAgC,KAAK,CAArC,aAAvD;AAAA,MAAyD,IAAI,GAA0B,KAAK,CAA/B,IAA7D;AAAA,MAA+D,IAAI,GAAoB,KAAK,CAAzB,IAAnE;AAAA,MAAqE,MAAM,GAAY,KAAK,CAAjB,MAA3E;AAAA,MAA6E,KAAK,GAAK,KAAK,CAAV,KAAlF;AACR,MAAM,EAAE,GAAA,CAAA,EAAA,GAAG,KAAK,CAAC,EAAT,MAAW,IAAX,IAAW,EAAA,KAAA,KAAA,CAAX,GAAW,EAAX,GAAe,MAAvB;AAEA,MAAM,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,EAAG,QAAA,CAAA,QAAA,CAAA;AAC5B,MAAA,GAAG,EAAA;AADyB,KAAA,EAEzB,KAFyB,CAAA,EAEpB;AACR,MAAA,EAAE,EAAA;AADM,KAFoB,CAAH;AAdJ,GAAzB;AAqBA,SAAO,KAAP;AACD,CA1BM","sourceRoot":""}
1
+ {"version":3,"sources":["components/Text/useText.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;;;AAC3F,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,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,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","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TextProps, TextState } from './Text.types';\n\n/**\n * Create the state required to render Text.\n *\n * The returned state can be modified with hooks such as useTextStyles_unstable,\n * before being passed to renderText_unstable.\n *\n * @param props - props from this instance of Text\n * @param ref - reference to root HTMLElement of Text\n */\nexport const useText_unstable = (props: TextProps, ref: React.Ref<HTMLElement>): TextState => {\n const { wrap, truncate, block, italic, underline, strikethrough, size, font, weight, align } = props;\n const as = props.as ?? 'span';\n\n const state: TextState = {\n wrap: wrap ?? true,\n truncate: truncate ?? false,\n block: block ?? false,\n italic: italic ?? false,\n underline: underline ?? false,\n strikethrough: strikethrough ?? false,\n size: size ?? 300,\n font: font ?? 'base',\n weight: weight ?? 'regular',\n align: align ?? 'start',\n\n components: { root: 'span' },\n\n root: getNativeElementProps(as, {\n ref,\n ...props,\n as,\n }),\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,5 +1,6 @@
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
  */
5
- export declare const useTextStyles: (state: TextState) => TextState;
6
+ export declare const useTextStyles_unstable: (state: TextState) => TextState;
@@ -1,9 +1,11 @@
1
- import { __styles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ export const textClassName = 'fui-Text';
2
4
  /**
3
5
  * Styles for the root slot
4
6
  */
5
7
 
6
- var useStyles = /*#__PURE__*/__styles({
8
+ const useStyles = /*#__PURE__*/__styles({
7
9
  "root": {
8
10
  "Bahqtrf": "fk6fouc",
9
11
  "Be2twd7": "fkhj508",
@@ -12,12 +14,14 @@ var useStyles = /*#__PURE__*/__styles({
12
14
  "fsow6f": "fpgzoln",
13
15
  "mc9l5x": "f1w7gpdv",
14
16
  "Huce71": "f6juhto",
15
- "Bpg54ce": "f1gl81tg",
17
+ "B68tc82": "f1mtd64y",
18
+ "Bmxbyg5": "f1y7q3j9",
16
19
  "ygn44y": "f2jf649"
17
20
  },
18
21
  "nowrap": {
19
22
  "Huce71": "fz5stix",
20
- "Bpg54ce": "f1a3p1vp"
23
+ "B68tc82": "f1p9o1ba",
24
+ "Bmxbyg5": "f1sil6mw"
21
25
  },
22
26
  "truncate": {
23
27
  "ygn44y": "f1cmbuwj"
@@ -29,13 +33,13 @@ var useStyles = /*#__PURE__*/__styles({
29
33
  "B80ckks": "f1j4dglz"
30
34
  },
31
35
  "underline": {
32
- "dwov6y": "fctto54"
36
+ "w71qe1": "f13mvf36"
33
37
  },
34
38
  "strikethrough": {
35
- "dwov6y": "f1y2xhd0"
39
+ "w71qe1": "fv5q2k7"
36
40
  },
37
41
  "strikethroughUnderline": {
38
- "dwov6y": "f13legbo"
42
+ "w71qe1": "f1drk4o6"
39
43
  },
40
44
  "base100": {
41
45
  "Be2twd7": "f13mqy1h",
@@ -95,16 +99,16 @@ var useStyles = /*#__PURE__*/__styles({
95
99
  "fsow6f": "f1j59e10"
96
100
  }
97
101
  }, {
98
- "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fpgzoln{text-align:start;}", ".f1w7gpdv{display:inline;}", ".f6juhto{white-space:normal;}", ".f1gl81tg{overflow:visible;}", ".f2jf649{text-overflow:clip;}", ".fz5stix{white-space:nowrap;}", ".f1a3p1vp{overflow:hidden;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".ftgm304{display:block;}", ".f1j4dglz{font-style:italic;}", ".fctto54{-webkit-text-decoration:underline;text-decoration:underline;}", ".f1y2xhd0{-webkit-text-decoration:line-through;text-decoration:line-through;}", ".f13legbo{-webkit-text-decoration:line-through underline;text-decoration:line-through underline;}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".f1x0m3f5{font-size:var(--fontSizeBase600);}", ".fb86gi6{line-height:var(--lineHeightBase600);}", ".fojgt09{font-size:var(--fontSizeHero700);}", ".fcen8rp{line-height:var(--lineHeightHero700);}", ".fccw675{font-size:var(--fontSizeHero800);}", ".f1ebx5kk{line-height:var(--lineHeightHero800);}", ".f15afnhw{font-size:var(--fontSizeHero900);}", ".fr3w3wp{line-height:var(--lineHeightHero900);}", ".fpyltcb{font-size:var(--fontSizeHero1000);}", ".f1ivgwrt{line-height:var(--lineHeightHero1000);}", ".f1fedwem{font-family:var(--fontFamilyMonospace);}", ".f1uq0ln5{font-family:var(--fontFamilyNumeric);}", ".fdj6btp{font-weight:var(--fontWeightMedium);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f17mccla{text-align:center;}", ".f12ymhq5{text-align:end;}", ".f1j59e10{text-align:justify;}"]
102
+ "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fpgzoln{text-align:start;}", ".f1w7gpdv{display:inline;}", ".f6juhto{white-space:normal;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f2jf649{text-overflow:clip;}", ".fz5stix{white-space:nowrap;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".ftgm304{display:block;}", ".f1j4dglz{font-style:italic;}", ".f13mvf36{text-decoration-line:underline;}", ".fv5q2k7{text-decoration-line:line-through;}", ".f1drk4o6{text-decoration-line:line-through underline;}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".f1x0m3f5{font-size:var(--fontSizeBase600);}", ".fb86gi6{line-height:var(--lineHeightBase600);}", ".fojgt09{font-size:var(--fontSizeHero700);}", ".fcen8rp{line-height:var(--lineHeightHero700);}", ".fccw675{font-size:var(--fontSizeHero800);}", ".f1ebx5kk{line-height:var(--lineHeightHero800);}", ".f15afnhw{font-size:var(--fontSizeHero900);}", ".fr3w3wp{line-height:var(--lineHeightHero900);}", ".fpyltcb{font-size:var(--fontSizeHero1000);}", ".f1ivgwrt{line-height:var(--lineHeightHero1000);}", ".f1fedwem{font-family:var(--fontFamilyMonospace);}", ".f1uq0ln5{font-family:var(--fontFamilyNumeric);}", ".fdj6btp{font-weight:var(--fontWeightMedium);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f17mccla{text-align:center;}", ".f12ymhq5{text-align:end;}", ".f1j59e10{text-align:justify;}"]
99
103
  });
100
104
  /**
101
105
  * Apply styling to the Text slots based on the state
102
106
  */
103
107
 
104
108
 
105
- export var useTextStyles = function (state) {
106
- var styles = useStyles();
107
- state.root.className = mergeClasses(styles.root, state.wrap === false && styles.nowrap, state.truncate && styles.truncate, state.block && styles.block, state.italic && styles.italic, state.underline && styles.underline, state.strikethrough && styles.strikethrough, state.underline && state.strikethrough && styles.strikethroughUnderline, state.size === 100 && styles.base100, state.size === 200 && styles.base200, state.size === 400 && styles.base400, state.size === 500 && styles.base500, state.size === 600 && styles.base600, state.size === 700 && styles.hero700, state.size === 800 && styles.hero800, state.size === 900 && styles.hero900, state.size === 1000 && styles.hero1000, state.font === 'monospace' && styles.monospace, state.font === 'numeric' && styles.numeric, state.weight === 'medium' && styles.weightMedium, state.weight === 'semibold' && styles.weightSemibold, state.align === 'center' && styles.alignCenter, state.align === 'end' && styles.alignEnd, state.align === 'justify' && styles.alignJustify, state.root.className);
109
+ export const useTextStyles_unstable = state => {
110
+ const styles = useStyles();
111
+ state.root.className = mergeClasses(textClassName, styles.root, state.wrap === false && styles.nowrap, state.truncate && styles.truncate, state.block && styles.block, state.italic && styles.italic, state.underline && styles.underline, state.strikethrough && styles.strikethrough, state.underline && state.strikethrough && styles.strikethroughUnderline, state.size === 100 && styles.base100, state.size === 200 && styles.base200, state.size === 400 && styles.base400, state.size === 500 && styles.base500, state.size === 600 && styles.base600, state.size === 700 && styles.hero700, state.size === 800 && styles.hero800, state.size === 900 && styles.hero900, state.size === 1000 && styles.hero1000, state.font === 'monospace' && styles.monospace, state.font === 'numeric' && styles.numeric, state.weight === 'medium' && styles.weightMedium, state.weight === 'semibold' && styles.weightSemibold, state.align === 'center' && styles.alignCenter, state.align === 'end' && styles.alignEnd, state.align === 'justify' && styles.alignJustify, state.root.className);
108
112
  return state;
109
113
  };
110
114
  //# sourceMappingURL=useTextStyles.js.map