@fluentui/react-text 0.0.0-nightly-20230501-0418.1 → 0.0.0-nightly-20230503-0419.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/CHANGELOG.json +13 -13
  2. package/CHANGELOG.md +9 -9
  3. package/dist/index.d.ts +240 -0
  4. package/lib/Body1.js +2 -0
  5. package/lib/Body1.js.map +1 -0
  6. package/lib/Body1Strong.js +2 -0
  7. package/lib/Body1Strong.js.map +1 -0
  8. package/lib/Body1Stronger.js +2 -0
  9. package/lib/Body1Stronger.js.map +1 -0
  10. package/lib/Body2.js +2 -0
  11. package/lib/Body2.js.map +1 -0
  12. package/lib/Caption1.js +2 -0
  13. package/lib/Caption1.js.map +1 -0
  14. package/lib/Caption1Strong.js +2 -0
  15. package/lib/Caption1Strong.js.map +1 -0
  16. package/lib/Caption1Stronger.js +2 -0
  17. package/lib/Caption1Stronger.js.map +1 -0
  18. package/lib/Caption2.js +2 -0
  19. package/lib/Caption2.js.map +1 -0
  20. package/lib/Caption2Strong.js +2 -0
  21. package/lib/Caption2Strong.js.map +1 -0
  22. package/lib/Display.js +2 -0
  23. package/lib/Display.js.map +1 -0
  24. package/lib/LargeTitle.js +2 -0
  25. package/lib/LargeTitle.js.map +1 -0
  26. package/lib/Subtitle1.js +2 -0
  27. package/lib/Subtitle1.js.map +1 -0
  28. package/lib/Subtitle2.js +2 -0
  29. package/lib/Subtitle2.js.map +1 -0
  30. package/lib/Subtitle2Stronger.js +2 -0
  31. package/lib/Subtitle2Stronger.js.map +1 -0
  32. package/lib/Text.js +2 -0
  33. package/lib/Text.js.map +1 -0
  34. package/lib/Title1.js +2 -0
  35. package/lib/Title1.js.map +1 -0
  36. package/lib/Title2.js +2 -0
  37. package/lib/Title2.js.map +1 -0
  38. package/lib/Title3.js +2 -0
  39. package/lib/Title3.js.map +1 -0
  40. package/lib/components/Text/Text.js +18 -0
  41. package/lib/components/Text/Text.js.map +1 -0
  42. package/lib/components/Text/Text.types.js +2 -0
  43. package/lib/components/Text/Text.types.js.map +1 -0
  44. package/lib/components/Text/index.js +6 -0
  45. package/lib/components/Text/index.js.map +1 -0
  46. package/lib/components/Text/renderText.js +13 -0
  47. package/lib/components/Text/renderText.js.map +1 -0
  48. package/lib/components/Text/useText.js +49 -0
  49. package/lib/components/Text/useText.js.map +1 -0
  50. package/lib/components/Text/useTextStyles.styles.js +116 -0
  51. package/lib/components/Text/useTextStyles.styles.js.map +1 -0
  52. package/lib/components/presets/Body1/Body1.js +11 -0
  53. package/lib/components/presets/Body1/Body1.js.map +1 -0
  54. package/lib/components/presets/Body1/index.js +3 -0
  55. package/lib/components/presets/Body1/index.js.map +1 -0
  56. package/lib/components/presets/Body1/useBody1Styles.styles.js +19 -0
  57. package/lib/components/presets/Body1/useBody1Styles.styles.js.map +1 -0
  58. package/lib/components/presets/Body1Strong/Body1Strong.js +11 -0
  59. package/lib/components/presets/Body1Strong/Body1Strong.js.map +1 -0
  60. package/lib/components/presets/Body1Strong/index.js +3 -0
  61. package/lib/components/presets/Body1Strong/index.js.map +1 -0
  62. package/lib/components/presets/Body1Strong/useBody1StrongStyles.styles.js +19 -0
  63. package/lib/components/presets/Body1Strong/useBody1StrongStyles.styles.js.map +1 -0
  64. package/lib/components/presets/Body1Stronger/Body1Stronger.js +11 -0
  65. package/lib/components/presets/Body1Stronger/Body1Stronger.js.map +1 -0
  66. package/lib/components/presets/Body1Stronger/index.js +3 -0
  67. package/lib/components/presets/Body1Stronger/index.js.map +1 -0
  68. package/lib/components/presets/Body1Stronger/useBody1StrongerStyles.styles.js +19 -0
  69. package/lib/components/presets/Body1Stronger/useBody1StrongerStyles.styles.js.map +1 -0
  70. package/lib/components/presets/Body2/Body2.js +11 -0
  71. package/lib/components/presets/Body2/Body2.js.map +1 -0
  72. package/lib/components/presets/Body2/index.js +3 -0
  73. package/lib/components/presets/Body2/index.js.map +1 -0
  74. package/lib/components/presets/Body2/useBody2Styles.styles.js +19 -0
  75. package/lib/components/presets/Body2/useBody2Styles.styles.js.map +1 -0
  76. package/lib/components/presets/Caption1/Caption1.js +11 -0
  77. package/lib/components/presets/Caption1/Caption1.js.map +1 -0
  78. package/lib/components/presets/Caption1/index.js +3 -0
  79. package/lib/components/presets/Caption1/index.js.map +1 -0
  80. package/lib/components/presets/Caption1/useCaption1Styles.styles.js +19 -0
  81. package/lib/components/presets/Caption1/useCaption1Styles.styles.js.map +1 -0
  82. package/lib/components/presets/Caption1Strong/Caption1Strong.js +11 -0
  83. package/lib/components/presets/Caption1Strong/Caption1Strong.js.map +1 -0
  84. package/lib/components/presets/Caption1Strong/index.js +3 -0
  85. package/lib/components/presets/Caption1Strong/index.js.map +1 -0
  86. package/lib/components/presets/Caption1Strong/useCaption1StrongStyles.styles.js +19 -0
  87. package/lib/components/presets/Caption1Strong/useCaption1StrongStyles.styles.js.map +1 -0
  88. package/lib/components/presets/Caption1Stronger/Caption1Stronger.js +11 -0
  89. package/lib/components/presets/Caption1Stronger/Caption1Stronger.js.map +1 -0
  90. package/lib/components/presets/Caption1Stronger/index.js +3 -0
  91. package/lib/components/presets/Caption1Stronger/index.js.map +1 -0
  92. package/lib/components/presets/Caption1Stronger/useCaption1Stronger.styles.js +19 -0
  93. package/lib/components/presets/Caption1Stronger/useCaption1Stronger.styles.js.map +1 -0
  94. package/lib/components/presets/Caption2/Caption2.js +11 -0
  95. package/lib/components/presets/Caption2/Caption2.js.map +1 -0
  96. package/lib/components/presets/Caption2/index.js +3 -0
  97. package/lib/components/presets/Caption2/index.js.map +1 -0
  98. package/lib/components/presets/Caption2/useCaption2Styles.styles.js +19 -0
  99. package/lib/components/presets/Caption2/useCaption2Styles.styles.js.map +1 -0
  100. package/lib/components/presets/Caption2Strong/Caption2Strong.js +11 -0
  101. package/lib/components/presets/Caption2Strong/Caption2Strong.js.map +1 -0
  102. package/lib/components/presets/Caption2Strong/index.js +3 -0
  103. package/lib/components/presets/Caption2Strong/index.js.map +1 -0
  104. package/lib/components/presets/Caption2Strong/useCaption2StrongStyles.styles.js +19 -0
  105. package/lib/components/presets/Caption2Strong/useCaption2StrongStyles.styles.js.map +1 -0
  106. package/lib/components/presets/Display/Display.js +11 -0
  107. package/lib/components/presets/Display/Display.js.map +1 -0
  108. package/lib/components/presets/Display/index.js +3 -0
  109. package/lib/components/presets/Display/index.js.map +1 -0
  110. package/lib/components/presets/Display/useDisplayStyles.styles.js +19 -0
  111. package/lib/components/presets/Display/useDisplayStyles.styles.js.map +1 -0
  112. package/lib/components/presets/LargeTitle/LargeTitle.js +11 -0
  113. package/lib/components/presets/LargeTitle/LargeTitle.js.map +1 -0
  114. package/lib/components/presets/LargeTitle/index.js +3 -0
  115. package/lib/components/presets/LargeTitle/index.js.map +1 -0
  116. package/lib/components/presets/LargeTitle/useLargeTitleStyles.styles.js +19 -0
  117. package/lib/components/presets/LargeTitle/useLargeTitleStyles.styles.js.map +1 -0
  118. package/lib/components/presets/Subtitle1/Subtitle1.js +11 -0
  119. package/lib/components/presets/Subtitle1/Subtitle1.js.map +1 -0
  120. package/lib/components/presets/Subtitle1/index.js +3 -0
  121. package/lib/components/presets/Subtitle1/index.js.map +1 -0
  122. package/lib/components/presets/Subtitle1/useSubtitle1Styles.styles.js +19 -0
  123. package/lib/components/presets/Subtitle1/useSubtitle1Styles.styles.js.map +1 -0
  124. package/lib/components/presets/Subtitle2/Subtitle2.js +11 -0
  125. package/lib/components/presets/Subtitle2/Subtitle2.js.map +1 -0
  126. package/lib/components/presets/Subtitle2/index.js +3 -0
  127. package/lib/components/presets/Subtitle2/index.js.map +1 -0
  128. package/lib/components/presets/Subtitle2/useSubtitle2Styles.styles.js +19 -0
  129. package/lib/components/presets/Subtitle2/useSubtitle2Styles.styles.js.map +1 -0
  130. package/lib/components/presets/Subtitle2Stronger/Subtitle2Stronger.js +11 -0
  131. package/lib/components/presets/Subtitle2Stronger/Subtitle2Stronger.js.map +1 -0
  132. package/lib/components/presets/Subtitle2Stronger/index.js +3 -0
  133. package/lib/components/presets/Subtitle2Stronger/index.js.map +1 -0
  134. package/lib/components/presets/Subtitle2Stronger/useSubtitle2Stronger.styles.js +19 -0
  135. package/lib/components/presets/Subtitle2Stronger/useSubtitle2Stronger.styles.js.map +1 -0
  136. package/lib/components/presets/Title1/Title1.js +11 -0
  137. package/lib/components/presets/Title1/Title1.js.map +1 -0
  138. package/lib/components/presets/Title1/index.js +3 -0
  139. package/lib/components/presets/Title1/index.js.map +1 -0
  140. package/lib/components/presets/Title1/useTitle1Styles.styles.js +19 -0
  141. package/lib/components/presets/Title1/useTitle1Styles.styles.js.map +1 -0
  142. package/lib/components/presets/Title2/Title2.js +11 -0
  143. package/lib/components/presets/Title2/Title2.js.map +1 -0
  144. package/lib/components/presets/Title2/index.js +3 -0
  145. package/lib/components/presets/Title2/index.js.map +1 -0
  146. package/lib/components/presets/Title2/useTitle2Styles.styles.js +19 -0
  147. package/lib/components/presets/Title2/useTitle2Styles.styles.js.map +1 -0
  148. package/lib/components/presets/Title3/Title3.js +11 -0
  149. package/lib/components/presets/Title3/Title3.js.map +1 -0
  150. package/lib/components/presets/Title3/index.js +3 -0
  151. package/lib/components/presets/Title3/index.js.map +1 -0
  152. package/lib/components/presets/Title3/useTitle3Styles.styles.js +19 -0
  153. package/lib/components/presets/Title3/useTitle3Styles.styles.js.map +1 -0
  154. package/lib/components/presets/createPreset.js +20 -0
  155. package/lib/components/presets/createPreset.js.map +1 -0
  156. package/lib/index.js +19 -0
  157. package/lib/index.js.map +1 -0
  158. package/package.json +6 -6
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-text",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 01 May 2023 04:24:07 GMT",
6
- "tag": "@fluentui/react-text_v0.0.0-nightly-20230501-0418.1",
7
- "version": "0.0.0-nightly-20230501-0418.1",
5
+ "date": "Wed, 03 May 2023 04:25:46 GMT",
6
+ "tag": "@fluentui/react-text_v0.0.0-nightly-20230503-0419.1",
7
+ "version": "0.0.0-nightly-20230503-0419.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,32 +16,32 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-text",
19
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230501-0418.1",
20
- "commit": "ec7f7770aa9dd65ad47721639ad0c5d238d9e037"
19
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230503-0419.1",
20
+ "commit": "a9a6cef152f4c3885a3697ddf9ded12bfce5a2be"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-text",
25
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230501-0418.1",
26
- "commit": "ec7f7770aa9dd65ad47721639ad0c5d238d9e037"
25
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230503-0419.1",
26
+ "commit": "a9a6cef152f4c3885a3697ddf9ded12bfce5a2be"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-text",
31
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230501-0418.1",
32
- "commit": "ec7f7770aa9dd65ad47721639ad0c5d238d9e037"
31
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230503-0419.1",
32
+ "commit": "a9a6cef152f4c3885a3697ddf9ded12bfce5a2be"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-text",
37
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230501-0418.1",
38
- "commit": "ec7f7770aa9dd65ad47721639ad0c5d238d9e037"
37
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230503-0419.1",
38
+ "commit": "a9a6cef152f4c3885a3697ddf9ded12bfce5a2be"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-text",
43
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230501-0418.1",
44
- "commit": "ec7f7770aa9dd65ad47721639ad0c5d238d9e037"
43
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230503-0419.1",
44
+ "commit": "a9a6cef152f4c3885a3697ddf9ded12bfce5a2be"
45
45
  }
46
46
  ]
47
47
  }
package/CHANGELOG.md CHANGED
@@ -1,22 +1,22 @@
1
1
  # Change Log - @fluentui/react-text
2
2
 
3
- This log was last generated on Mon, 01 May 2023 04:24:07 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 03 May 2023 04:25:46 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230501-0418.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-text_v0.0.0-nightly-20230501-0418.1)
7
+ ## [0.0.0-nightly-20230503-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-text_v0.0.0-nightly-20230503-0419.1)
8
8
 
9
- Mon, 01 May 2023 04:24:07 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-text_v9.3.7..@fluentui/react-text_v0.0.0-nightly-20230501-0418.1)
9
+ Wed, 03 May 2023 04:25:46 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-text_v9.3.7..@fluentui/react-text_v0.0.0-nightly-20230503-0419.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230501-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ec7f7770aa9dd65ad47721639ad0c5d238d9e037) by beachball)
16
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230501-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ec7f7770aa9dd65ad47721639ad0c5d238d9e037) by beachball)
17
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230501-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ec7f7770aa9dd65ad47721639ad0c5d238d9e037) by beachball)
18
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230501-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ec7f7770aa9dd65ad47721639ad0c5d238d9e037) by beachball)
19
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230501-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ec7f7770aa9dd65ad47721639ad0c5d238d9e037) by beachball)
15
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230503-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/a9a6cef152f4c3885a3697ddf9ded12bfce5a2be) by beachball)
16
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230503-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/a9a6cef152f4c3885a3697ddf9ded12bfce5a2be) by beachball)
17
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230503-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/a9a6cef152f4c3885a3697ddf9ded12bfce5a2be) by beachball)
18
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230503-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/a9a6cef152f4c3885a3697ddf9ded12bfce5a2be) by beachball)
19
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230503-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/a9a6cef152f4c3885a3697ddf9ded12bfce5a2be) by beachball)
20
20
 
21
21
  ## [9.3.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-text_v9.3.7)
22
22
 
@@ -0,0 +1,240 @@
1
+ import type { ComponentProps } from '@fluentui/react-utilities';
2
+ import type { ComponentState } from '@fluentui/react-utilities';
3
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
4
+ import type { FunctionComponent } from 'react';
5
+ import * as React_2 from 'react';
6
+ import type { Slot } from '@fluentui/react-utilities';
7
+ import { SlotClassNames } from '@fluentui/react-utilities';
8
+
9
+ /**
10
+ * Text preset component for the Body1 typography variant
11
+ */
12
+ export declare const Body1: FunctionComponent<TextPresetProps>;
13
+
14
+ export declare const body1ClassNames: SlotClassNames<TextSlots>;
15
+
16
+ /**
17
+ * Text preset component for the Body1Strong typography variant
18
+ */
19
+ export declare const Body1Strong: FunctionComponent<TextPresetProps>;
20
+
21
+ export declare const body1StrongClassNames: SlotClassNames<TextSlots>;
22
+
23
+ /**
24
+ * Text preset component for the Body1Stronger typography variant
25
+ */
26
+ export declare const Body1Stronger: FunctionComponent<TextPresetProps>;
27
+
28
+ export declare const body1StrongerClassNames: SlotClassNames<TextSlots>;
29
+
30
+ /**
31
+ * Text preset component for the Body2 typography variant
32
+ */
33
+ export declare const Body2: FunctionComponent<TextPresetProps>;
34
+
35
+ export declare const body2ClassNames: SlotClassNames<TextSlots>;
36
+
37
+ /**
38
+ * Text preset component for the Caption1 typography variant
39
+ */
40
+ export declare const Caption1: FunctionComponent<TextPresetProps>;
41
+
42
+ export declare const caption1ClassNames: SlotClassNames<TextSlots>;
43
+
44
+ /**
45
+ * Text preset component for the Caption1Strong typography variant
46
+ */
47
+ export declare const Caption1Strong: FunctionComponent<TextPresetProps>;
48
+
49
+ export declare const caption1StrongClassNames: SlotClassNames<TextSlots>;
50
+
51
+ /**
52
+ * Text preset component for the Caption1Stronger typography variant
53
+ */
54
+ export declare const Caption1Stronger: FunctionComponent<TextPresetProps>;
55
+
56
+ export declare const caption1StrongerClassNames: SlotClassNames<TextSlots>;
57
+
58
+ /**
59
+ * Text preset component for the Caption2 typography variant
60
+ */
61
+ export declare const Caption2: FunctionComponent<TextPresetProps>;
62
+
63
+ export declare const caption2ClassNames: SlotClassNames<TextSlots>;
64
+
65
+ /**
66
+ * Text preset component for the Caption2Strong typography variant
67
+ */
68
+ export declare const Caption2Strong: FunctionComponent<TextPresetProps>;
69
+
70
+ export declare const caption2StrongClassNames: SlotClassNames<TextSlots>;
71
+
72
+ /**
73
+ * Text preset component for the Display typography variant
74
+ */
75
+ export declare const Display: FunctionComponent<TextPresetProps>;
76
+
77
+ export declare const displayClassNames: SlotClassNames<TextSlots>;
78
+
79
+ /**
80
+ * Text preset component for the Large Title typography variant
81
+ */
82
+ export declare const LargeTitle: FunctionComponent<TextPresetProps>;
83
+
84
+ export declare const largeTitleClassNames: SlotClassNames<TextSlots>;
85
+
86
+ /**
87
+ * Render the final JSX of Text
88
+ */
89
+ export declare const renderText_unstable: (state: TextState) => JSX.Element;
90
+
91
+ /**
92
+ * Text preset component for the Subtitle1 typography variant
93
+ */
94
+ export declare const Subtitle1: FunctionComponent<TextPresetProps>;
95
+
96
+ export declare const subtitle1ClassNames: SlotClassNames<TextSlots>;
97
+
98
+ /**
99
+ * Text preset component for the Subtitle2 typography variant
100
+ */
101
+ export declare const Subtitle2: FunctionComponent<TextPresetProps>;
102
+
103
+ export declare const subtitle2ClassNames: SlotClassNames<TextSlots>;
104
+
105
+ /**
106
+ * Text preset component for the Subtitle2Stronger typography variant
107
+ */
108
+ export declare const Subtitle2Stronger: FunctionComponent<TextPresetProps>;
109
+
110
+ export declare const subtitle2StrongerClassNames: SlotClassNames<TextSlots>;
111
+
112
+ /**
113
+ * Typography and styling abstraction component used to ensure consistency of text.
114
+ */
115
+ declare const Text_2: ForwardRefComponent<TextProps>;
116
+ export { Text_2 as Text }
117
+
118
+ export declare const textClassNames: SlotClassNames<TextSlots>;
119
+
120
+ /**
121
+ * TextPreset Props
122
+ */
123
+ export declare type TextPresetProps = Omit<TextProps, 'font' | 'size' | 'weight'>;
124
+
125
+ /**
126
+ * Text Props
127
+ */
128
+ export declare type TextProps = ComponentProps<TextSlots> & {
129
+ /**
130
+ * Aligns text based on the parent container.
131
+ *
132
+ * @default start
133
+ */
134
+ align?: 'start' | 'center' | 'end' | 'justify';
135
+ /**
136
+ * Applies a block display for the content.
137
+ *
138
+ * @default false
139
+ */
140
+ block?: boolean;
141
+ /**
142
+ * Applies the font family to the content.
143
+ *
144
+ * @default base
145
+ */
146
+ font?: 'base' | 'monospace' | 'numeric';
147
+ /**
148
+ * Applies the italic font style to the content.
149
+ *
150
+ * @default false
151
+ */
152
+ italic?: boolean;
153
+ /**
154
+ * Applies font size and line height based on the theme typography tokens.
155
+ *
156
+ * @default 300
157
+ */
158
+ size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;
159
+ /**
160
+ * Applies the strikethrough text decoration to the content.
161
+ *
162
+ * @default false
163
+ */
164
+ strikethrough?: boolean;
165
+ /**
166
+ * Truncate overflowing text for block displays.
167
+ *
168
+ * @default false
169
+ */
170
+ truncate?: boolean;
171
+ /**
172
+ * Applies the underline text decoration to the content.
173
+ *
174
+ * @default false
175
+ */
176
+ underline?: boolean;
177
+ /**
178
+ * Applies font weight to the content.
179
+ *
180
+ * @default regular
181
+ */
182
+ weight?: 'regular' | 'medium' | 'semibold' | 'bold';
183
+ /**
184
+ * Wraps the text content on white spaces.
185
+ *
186
+ * @default true
187
+ */
188
+ wrap?: boolean;
189
+ };
190
+
191
+ /**
192
+ * Text slots
193
+ */
194
+ export declare type TextSlots = {
195
+ root: Slot<'span', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'pre'>;
196
+ };
197
+
198
+ /**
199
+ * State used in rendering Text
200
+ */
201
+ export declare type TextState = ComponentState<TextSlots> & Required<Pick<TextProps, 'align' | 'block' | 'font' | 'italic' | 'size' | 'strikethrough' | 'truncate' | 'underline' | 'weight' | 'wrap'>>;
202
+
203
+ /**
204
+ * Text preset component for the Title 1 typography variant
205
+ */
206
+ export declare const Title1: FunctionComponent<TextPresetProps>;
207
+
208
+ export declare const title1ClassNames: SlotClassNames<TextSlots>;
209
+
210
+ /**
211
+ * Text preset component for the Title 2 typography variant
212
+ */
213
+ export declare const Title2: FunctionComponent<TextPresetProps>;
214
+
215
+ export declare const title2ClassNames: SlotClassNames<TextSlots>;
216
+
217
+ /**
218
+ * Text preset component for the Title 3 typography variant
219
+ */
220
+ export declare const Title3: FunctionComponent<TextPresetProps>;
221
+
222
+ export declare const title3ClassNames: SlotClassNames<TextSlots>;
223
+
224
+ /**
225
+ * Create the state required to render Text.
226
+ *
227
+ * The returned state can be modified with hooks such as useTextStyles_unstable,
228
+ * before being passed to renderText_unstable.
229
+ *
230
+ * @param props - props from this instance of Text
231
+ * @param ref - reference to root HTMLElement of Text
232
+ */
233
+ export declare const useText_unstable: (props: TextProps, ref: React_2.Ref<HTMLElement>) => TextState;
234
+
235
+ /**
236
+ * Apply styling to the Text slots based on the state
237
+ */
238
+ export declare const useTextStyles_unstable: (state: TextState) => TextState;
239
+
240
+ export { }
package/lib/Body1.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Body1/index';
2
+ //# sourceMappingURL=Body1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Body1.ts"],"sourcesContent":["export * from './components/presets/Body1/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Body1Strong/index';
2
+ //# sourceMappingURL=Body1Strong.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Body1Strong.ts"],"sourcesContent":["export * from './components/presets/Body1Strong/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Body1Stronger/index';
2
+ //# sourceMappingURL=Body1Stronger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Body1Stronger.ts"],"sourcesContent":["export * from './components/presets/Body1Stronger/index';\n"],"mappings":"AAAA,cAAc"}
package/lib/Body2.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Body2/index';
2
+ //# sourceMappingURL=Body2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Body2.ts"],"sourcesContent":["export * from './components/presets/Body2/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Caption1/index';
2
+ //# sourceMappingURL=Caption1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Caption1.ts"],"sourcesContent":["export * from './components/presets/Caption1/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Caption1Strong/index';
2
+ //# sourceMappingURL=Caption1Strong.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Caption1Strong.ts"],"sourcesContent":["export * from './components/presets/Caption1Strong/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Caption1Stronger/index';
2
+ //# sourceMappingURL=Caption1Stronger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Caption1Stronger.ts"],"sourcesContent":["export * from './components/presets/Caption1Stronger/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Caption2/index';
2
+ //# sourceMappingURL=Caption2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Caption2.ts"],"sourcesContent":["export * from './components/presets/Caption2/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Caption2Strong/index';
2
+ //# sourceMappingURL=Caption2Strong.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Caption2Strong.ts"],"sourcesContent":["export * from './components/presets/Caption2Strong/index';\n"],"mappings":"AAAA,cAAc"}
package/lib/Display.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Display/index';
2
+ //# sourceMappingURL=Display.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Display.ts"],"sourcesContent":["export * from './components/presets/Display/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/LargeTitle/index';
2
+ //# sourceMappingURL=LargeTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/LargeTitle.ts"],"sourcesContent":["export * from './components/presets/LargeTitle/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Subtitle1/index';
2
+ //# sourceMappingURL=Subtitle1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Subtitle1.ts"],"sourcesContent":["export * from './components/presets/Subtitle1/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Subtitle2/index';
2
+ //# sourceMappingURL=Subtitle2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Subtitle2.ts"],"sourcesContent":["export * from './components/presets/Subtitle2/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Subtitle2Stronger/index';
2
+ //# sourceMappingURL=Subtitle2Stronger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Subtitle2Stronger.ts"],"sourcesContent":["export * from './components/presets/Subtitle2Stronger/index';\n"],"mappings":"AAAA,cAAc"}
package/lib/Text.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/Text/index';
2
+ //# sourceMappingURL=Text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Text.ts"],"sourcesContent":["export * from './components/Text/index';\n"],"mappings":"AAAA,cAAc"}
package/lib/Title1.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Title1/index';
2
+ //# sourceMappingURL=Title1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Title1.ts"],"sourcesContent":["export * from './components/presets/Title1/index';\n"],"mappings":"AAAA,cAAc"}
package/lib/Title2.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Title2/index';
2
+ //# sourceMappingURL=Title2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Title2.ts"],"sourcesContent":["export * from './components/presets/Title2/index';\n"],"mappings":"AAAA,cAAc"}
package/lib/Title3.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/presets/Title3/index';
2
+ //# sourceMappingURL=Title3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../src/Title3.ts"],"sourcesContent":["export * from './components/presets/Title3/index';\n"],"mappings":"AAAA,cAAc"}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { useText_unstable } from './useText';
3
+ import { renderText_unstable } from './renderText';
4
+ import { useTextStyles_unstable } from './useTextStyles.styles';
5
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
+ /**
7
+ * Typography and styling abstraction component used to ensure consistency of text.
8
+ */
9
+ export const Text = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useText_unstable(props, ref);
11
+ useTextStyles_unstable(state);
12
+ useCustomStyleHook_unstable('useTextStyles_unstable')(state);
13
+ return renderText_unstable(state);
14
+ // Work around some small mismatches in inferred types which don't matter in practice
15
+ });
16
+
17
+ Text.displayName = 'Text';
18
+ //# sourceMappingURL=Text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useText_unstable","renderText_unstable","useTextStyles_unstable","useCustomStyleHook_unstable","Text","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useText_unstable } from './useText';\nimport { renderText_unstable } from './renderText';\nimport { useTextStyles_unstable } from './useTextStyles.styles';\nimport type { TextProps } from './Text.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 useCustomStyleHook_unstable('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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,gBAAgB,QAAQ;AACjC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,sBAAsB,QAAQ;AAGvC,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,IAAA,gBAAuCL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACnF,MAAMC,KAAA,GAAQR,gBAAA,CAAiBM,KAAA,EAAOC,GAAA;EAEtCL,sBAAA,CAAuBM,KAAA;EAEvBL,2BAAA,CAA4B,0BAA0BK,KAAA;EAEtD,OAAOP,mBAAA,CAAoBO,KAAA;EAC3B;AACF;;AAEAJ,IAAA,CAAKK,WAAW,GAAG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Text.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../../src/components/Text/Text.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Text slots\n */\nexport type TextSlots = {\n root: Slot<'span', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'pre'>;\n};\n\n/**\n * Text Props\n */\nexport type TextProps = ComponentProps<TextSlots> & {\n /**\n * Aligns text based on the parent container.\n *\n * @default start\n */\n align?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * Applies a block display for the content.\n *\n * @default false\n */\n block?: boolean;\n\n /**\n * Applies the font family to the content.\n *\n * @default base\n */\n font?: 'base' | 'monospace' | 'numeric';\n\n /**\n * Applies the italic font style to the content.\n *\n * @default false\n */\n italic?: boolean;\n\n /**\n * Applies font size and line height based on the theme typography tokens.\n *\n * @default 300\n */\n size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;\n\n /**\n * Applies the strikethrough text decoration to the content.\n *\n * @default false\n */\n strikethrough?: boolean;\n\n /**\n * Truncate overflowing text for block displays.\n *\n * @default false\n */\n\n truncate?: boolean;\n\n /**\n * Applies the underline text decoration to the content.\n *\n * @default false\n */\n underline?: boolean;\n\n /**\n * Applies font weight to the content.\n *\n * @default regular\n */\n weight?: 'regular' | 'medium' | 'semibold' | 'bold';\n\n /**\n * Wraps the text content on white spaces.\n *\n * @default true\n */\n wrap?: boolean;\n};\n\n/**\n * TextPreset Props\n */\nexport type TextPresetProps = Omit<TextProps, 'font' | 'size' | 'weight'>;\n\n/**\n * State used in rendering Text\n */\nexport type TextState = ComponentState<TextSlots> &\n Required<\n Pick<\n TextProps,\n 'align' | 'block' | 'font' | 'italic' | 'size' | 'strikethrough' | 'truncate' | 'underline' | 'weight' | 'wrap'\n >\n >;\n"],"mappings":"AAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './Text';
2
+ export * from './Text.types';
3
+ export * from './renderText';
4
+ export * from './useText';
5
+ export * from './useTextStyles.styles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../../src/components/Text/index.ts"],"sourcesContent":["export * from './Text';\nexport * from './Text.types';\nexport * from './renderText';\nexport * from './useText';\nexport * from './useTextStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -0,0 +1,13 @@
1
+ /** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
2
+ import { getSlotsNext } from '@fluentui/react-utilities';
3
+ /**
4
+ * Render the final JSX of Text
5
+ */
6
+ export const renderText_unstable = state => {
7
+ const {
8
+ slots,
9
+ slotProps
10
+ } = getSlotsNext(state);
11
+ return /*#__PURE__*/createElement(slots.root, slotProps.root);
12
+ };
13
+ //# sourceMappingURL=renderText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createElement","getSlotsNext","renderText_unstable","state","slots","slotProps","root"],"sources":["../../../src/components/Text/renderText.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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 } = getSlotsNext<TextSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,mBAAA,GAAuBC,KAAA,IAAqB;EACvD,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAAwBE,KAAA;EAErD,oBAAOH,aAbT,CAaUI,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI;AACvC"}
@@ -0,0 +1,49 @@
1
+ import * as React from 'react';
2
+ import { getNativeElementProps } from '@fluentui/react-utilities';
3
+ /**
4
+ * Create the state required to render Text.
5
+ *
6
+ * The returned state can be modified with hooks such as useTextStyles_unstable,
7
+ * before being passed to renderText_unstable.
8
+ *
9
+ * @param props - props from this instance of Text
10
+ * @param ref - reference to root HTMLElement of Text
11
+ */
12
+ export const useText_unstable = (props, ref) => {
13
+ const {
14
+ wrap,
15
+ truncate,
16
+ block,
17
+ italic,
18
+ underline,
19
+ strikethrough,
20
+ size,
21
+ font,
22
+ weight,
23
+ align
24
+ } = props;
25
+ var _props_as;
26
+ const as = (_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'span';
27
+ const state = {
28
+ align: align !== null && align !== void 0 ? align : 'start',
29
+ block: block !== null && block !== void 0 ? block : false,
30
+ font: font !== null && font !== void 0 ? font : 'base',
31
+ italic: italic !== null && italic !== void 0 ? italic : false,
32
+ size: size !== null && size !== void 0 ? size : 300,
33
+ strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,
34
+ truncate: truncate !== null && truncate !== void 0 ? truncate : false,
35
+ underline: underline !== null && underline !== void 0 ? underline : false,
36
+ weight: weight !== null && weight !== void 0 ? weight : 'regular',
37
+ wrap: wrap !== null && wrap !== void 0 ? wrap : true,
38
+ components: {
39
+ root: 'span'
40
+ },
41
+ root: getNativeElementProps(as, {
42
+ ref,
43
+ ...props,
44
+ as
45
+ })
46
+ };
47
+ return state;
48
+ };
49
+ //# sourceMappingURL=useText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","getNativeElementProps","useText_unstable","props","ref","wrap","truncate","block","italic","underline","strikethrough","size","font","weight","align","_props_as","as","state","components","root"],"sources":["../../../src/components/Text/useText.ts"],"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 align: align ?? 'start',\n block: block ?? false,\n font: font ?? 'base',\n italic: italic ?? false,\n size: size ?? 300,\n strikethrough: strikethrough ?? false,\n truncate: truncate ?? false,\n underline: underline ?? false,\n weight: weight ?? 'regular',\n wrap: wrap ?? true,\n\n components: { root: 'span' },\n\n root: getNativeElementProps(as, {\n ref,\n ...props,\n as,\n }),\n };\n\n return state;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,QAAQ;AAGtC;;;;;;;;;AASA,OAAO,MAAMC,gBAAA,GAAmBA,CAACC,KAAA,EAAkBC,GAAA,KAA2C;EAC5F,MAAM;IAAEC,IAAA;IAAMC,QAAA;IAAUC,KAAA;IAAOC,MAAA;IAAQC,SAAA;IAAWC,aAAA;IAAeC,IAAA;IAAMC,IAAA;IAAMC,MAAA;IAAQC;EAAK,CAAE,GAAGX,KAAA;MACpFY,SAAA;EAAX,MAAMC,EAAA,GAAK,CAAAD,SAAA,GAAAZ,KAAA,CAAMa,EAAE,cAARD,SAAA,cAAAA,SAAA,GAAY,MAAM;EAE7B,MAAME,KAAA,GAAmB;IACvBH,KAAA,EAAOA,KAAA,aAAAA,KAAA,cAAAA,KAAA,GAAS,OAAO;IACvBP,KAAA,EAAOA,KAAA,aAAAA,KAAA,cAAAA,KAAA,GAAS,KAAK;IACrBK,IAAA,EAAMA,IAAA,aAAAA,IAAA,cAAAA,IAAA,GAAQ,MAAM;IACpBJ,MAAA,EAAQA,MAAA,aAAAA,MAAA,cAAAA,MAAA,GAAU,KAAK;IACvBG,IAAA,EAAMA,IAAA,aAAAA,IAAA,cAAAA,IAAA,GAAQ,GAAG;IACjBD,aAAA,EAAeA,aAAA,aAAAA,aAAA,cAAAA,aAAA,GAAiB,KAAK;IACrCJ,QAAA,EAAUA,QAAA,aAAAA,QAAA,cAAAA,QAAA,GAAY,KAAK;IAC3BG,SAAA,EAAWA,SAAA,aAAAA,SAAA,cAAAA,SAAA,GAAa,KAAK;IAC7BI,MAAA,EAAQA,MAAA,aAAAA,MAAA,cAAAA,MAAA,GAAU,SAAS;IAC3BR,IAAA,EAAMA,IAAA,aAAAA,IAAA,cAAAA,IAAA,GAAQ,IAAI;IAElBa,UAAA,EAAY;MAAEC,IAAA,EAAM;IAAO;IAE3BA,IAAA,EAAMlB,qBAAA,CAAsBe,EAAA,EAAI;MAC9BZ,GAAA;MACA,GAAGD,KAAK;MACRa;IACF;EACF;EAEA,OAAOC,KAAA;AACT"}