@fluentui/react-text 0.0.0-nightly-20220302-0405.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +1510 -0
- package/CHANGELOG.md +538 -0
- package/LICENSE +15 -0
- package/MIGRATION.md +730 -0
- package/README.md +99 -0
- package/Spec.md +162 -0
- package/assets/typography-examples.gif +0 -0
- package/dist/react-text.d.ts +183 -0
- package/lib/Body.d.ts +1 -0
- package/lib/Body.js +2 -0
- package/lib/Body.js.map +1 -0
- package/lib/Caption.d.ts +1 -0
- package/lib/Caption.js +2 -0
- package/lib/Caption.js.map +1 -0
- package/lib/Display.d.ts +1 -0
- package/lib/Display.js +2 -0
- package/lib/Display.js.map +1 -0
- package/lib/Headline.d.ts +1 -0
- package/lib/Headline.js +2 -0
- package/lib/Headline.js.map +1 -0
- package/lib/LargeTitle.d.ts +1 -0
- package/lib/LargeTitle.js +2 -0
- package/lib/LargeTitle.js.map +1 -0
- package/lib/Subheadline.d.ts +1 -0
- package/lib/Subheadline.js +2 -0
- package/lib/Subheadline.js.map +1 -0
- package/lib/Text.d.ts +1 -0
- package/lib/Text.js +2 -0
- package/lib/Text.js.map +1 -0
- package/lib/Title1.d.ts +1 -0
- package/lib/Title1.js +2 -0
- package/lib/Title1.js.map +1 -0
- package/lib/Title2.d.ts +1 -0
- package/lib/Title2.js +2 -0
- package/lib/Title2.js.map +1 -0
- package/lib/Title3.d.ts +1 -0
- package/lib/Title3.js +2 -0
- package/lib/Title3.js.map +1 -0
- package/lib/components/Body/Body.d.ts +7 -0
- package/lib/components/Body/Body.js +29 -0
- package/lib/components/Body/Body.js.map +1 -0
- package/lib/components/Body/index.d.ts +1 -0
- package/lib/components/Body/index.js +2 -0
- package/lib/components/Body/index.js.map +1 -0
- package/lib/components/Caption/Caption.d.ts +7 -0
- package/lib/components/Caption/Caption.js +29 -0
- package/lib/components/Caption/Caption.js.map +1 -0
- package/lib/components/Caption/index.d.ts +1 -0
- package/lib/components/Caption/index.js +2 -0
- package/lib/components/Caption/index.js.map +1 -0
- package/lib/components/Display/Display.d.ts +7 -0
- package/lib/components/Display/Display.js +29 -0
- package/lib/components/Display/Display.js.map +1 -0
- package/lib/components/Display/index.d.ts +1 -0
- package/lib/components/Display/index.js +2 -0
- package/lib/components/Display/index.js.map +1 -0
- package/lib/components/Headline/Headline.d.ts +7 -0
- package/lib/components/Headline/Headline.js +29 -0
- package/lib/components/Headline/Headline.js.map +1 -0
- package/lib/components/Headline/index.d.ts +1 -0
- package/lib/components/Headline/index.js +2 -0
- package/lib/components/Headline/index.js.map +1 -0
- package/lib/components/LargeTitle/LargeTitle.d.ts +7 -0
- package/lib/components/LargeTitle/LargeTitle.js +29 -0
- package/lib/components/LargeTitle/LargeTitle.js.map +1 -0
- package/lib/components/LargeTitle/index.d.ts +1 -0
- package/lib/components/LargeTitle/index.js +2 -0
- package/lib/components/LargeTitle/index.js.map +1 -0
- package/lib/components/Subheadline/Subheadline.d.ts +7 -0
- package/lib/components/Subheadline/Subheadline.js +29 -0
- package/lib/components/Subheadline/Subheadline.js.map +1 -0
- package/lib/components/Subheadline/index.d.ts +1 -0
- package/lib/components/Subheadline/index.js +2 -0
- package/lib/components/Subheadline/index.js.map +1 -0
- package/lib/components/Text/Text.d.ts +6 -0
- package/lib/components/Text/Text.js +15 -0
- package/lib/components/Text/Text.js.map +1 -0
- package/lib/components/Text/Text.types.d.ts +78 -0
- package/lib/components/Text/Text.types.js +2 -0
- package/lib/components/Text/Text.types.js.map +1 -0
- package/lib/components/Text/index.d.ts +5 -0
- package/lib/components/Text/index.js +6 -0
- package/lib/components/Text/index.js.map +1 -0
- package/lib/components/Text/renderText.d.ts +5 -0
- package/lib/components/Text/renderText.js +15 -0
- package/lib/components/Text/renderText.js.map +1 -0
- package/lib/components/Text/useText.d.ts +12 -0
- package/lib/components/Text/useText.js +50 -0
- package/lib/components/Text/useText.js.map +1 -0
- package/lib/components/Text/useTextStyles.d.ts +6 -0
- package/lib/components/Text/useTextStyles.js +114 -0
- package/lib/components/Text/useTextStyles.js.map +1 -0
- package/lib/components/Title1/Title1.d.ts +7 -0
- package/lib/components/Title1/Title1.js +29 -0
- package/lib/components/Title1/Title1.js.map +1 -0
- package/lib/components/Title1/index.d.ts +1 -0
- package/lib/components/Title1/index.js +2 -0
- package/lib/components/Title1/index.js.map +1 -0
- package/lib/components/Title2/Title2.d.ts +7 -0
- package/lib/components/Title2/Title2.js +29 -0
- package/lib/components/Title2/Title2.js.map +1 -0
- package/lib/components/Title2/index.d.ts +1 -0
- package/lib/components/Title2/index.js +2 -0
- package/lib/components/Title2/index.js.map +1 -0
- package/lib/components/Title3/Title3.d.ts +7 -0
- package/lib/components/Title3/Title3.js +29 -0
- package/lib/components/Title3/Title3.js.map +1 -0
- package/lib/components/Title3/index.d.ts +1 -0
- package/lib/components/Title3/index.js +2 -0
- package/lib/components/Title3/index.js.map +1 -0
- package/lib/components/wrapper.d.ts +8 -0
- package/lib/components/wrapper.js +20 -0
- package/lib/components/wrapper.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/lib/typographyStyles/index.d.ts +2 -0
- package/lib/typographyStyles/index.js +3 -0
- package/lib/typographyStyles/index.js.map +1 -0
- package/lib/typographyStyles/typographyStyles.d.ts +13 -0
- package/lib/typographyStyles/typographyStyles.js +60 -0
- package/lib/typographyStyles/typographyStyles.js.map +1 -0
- package/lib-commonjs/Body.d.ts +1 -0
- package/lib-commonjs/Body.js +10 -0
- package/lib-commonjs/Body.js.map +1 -0
- package/lib-commonjs/Caption.d.ts +1 -0
- package/lib-commonjs/Caption.js +10 -0
- package/lib-commonjs/Caption.js.map +1 -0
- package/lib-commonjs/Display.d.ts +1 -0
- package/lib-commonjs/Display.js +10 -0
- package/lib-commonjs/Display.js.map +1 -0
- package/lib-commonjs/Headline.d.ts +1 -0
- package/lib-commonjs/Headline.js +10 -0
- package/lib-commonjs/Headline.js.map +1 -0
- package/lib-commonjs/LargeTitle.d.ts +1 -0
- package/lib-commonjs/LargeTitle.js +10 -0
- package/lib-commonjs/LargeTitle.js.map +1 -0
- package/lib-commonjs/Subheadline.d.ts +1 -0
- package/lib-commonjs/Subheadline.js +10 -0
- package/lib-commonjs/Subheadline.js.map +1 -0
- package/lib-commonjs/Text.d.ts +1 -0
- package/lib-commonjs/Text.js +10 -0
- package/lib-commonjs/Text.js.map +1 -0
- package/lib-commonjs/Title1.d.ts +1 -0
- package/lib-commonjs/Title1.js +10 -0
- package/lib-commonjs/Title1.js.map +1 -0
- package/lib-commonjs/Title2.d.ts +1 -0
- package/lib-commonjs/Title2.js +10 -0
- package/lib-commonjs/Title2.js.map +1 -0
- package/lib-commonjs/Title3.d.ts +1 -0
- package/lib-commonjs/Title3.js +10 -0
- package/lib-commonjs/Title3.js.map +1 -0
- package/lib-commonjs/components/Body/Body.d.ts +7 -0
- package/lib-commonjs/components/Body/Body.js +30 -0
- package/lib-commonjs/components/Body/Body.js.map +1 -0
- package/lib-commonjs/components/Body/index.d.ts +1 -0
- package/lib-commonjs/components/Body/index.js +10 -0
- package/lib-commonjs/components/Body/index.js.map +1 -0
- package/lib-commonjs/components/Caption/Caption.d.ts +7 -0
- package/lib-commonjs/components/Caption/Caption.js +30 -0
- package/lib-commonjs/components/Caption/Caption.js.map +1 -0
- package/lib-commonjs/components/Caption/index.d.ts +1 -0
- package/lib-commonjs/components/Caption/index.js +10 -0
- package/lib-commonjs/components/Caption/index.js.map +1 -0
- package/lib-commonjs/components/Display/Display.d.ts +7 -0
- package/lib-commonjs/components/Display/Display.js +30 -0
- package/lib-commonjs/components/Display/Display.js.map +1 -0
- package/lib-commonjs/components/Display/index.d.ts +1 -0
- package/lib-commonjs/components/Display/index.js +10 -0
- package/lib-commonjs/components/Display/index.js.map +1 -0
- package/lib-commonjs/components/Headline/Headline.d.ts +7 -0
- package/lib-commonjs/components/Headline/Headline.js +30 -0
- package/lib-commonjs/components/Headline/Headline.js.map +1 -0
- package/lib-commonjs/components/Headline/index.d.ts +1 -0
- package/lib-commonjs/components/Headline/index.js +10 -0
- package/lib-commonjs/components/Headline/index.js.map +1 -0
- package/lib-commonjs/components/LargeTitle/LargeTitle.d.ts +7 -0
- package/lib-commonjs/components/LargeTitle/LargeTitle.js +30 -0
- package/lib-commonjs/components/LargeTitle/LargeTitle.js.map +1 -0
- package/lib-commonjs/components/LargeTitle/index.d.ts +1 -0
- package/lib-commonjs/components/LargeTitle/index.js +10 -0
- package/lib-commonjs/components/LargeTitle/index.js.map +1 -0
- package/lib-commonjs/components/Subheadline/Subheadline.d.ts +7 -0
- package/lib-commonjs/components/Subheadline/Subheadline.js +30 -0
- package/lib-commonjs/components/Subheadline/Subheadline.js.map +1 -0
- package/lib-commonjs/components/Subheadline/index.d.ts +1 -0
- package/lib-commonjs/components/Subheadline/index.js +10 -0
- package/lib-commonjs/components/Subheadline/index.js.map +1 -0
- package/lib-commonjs/components/Text/Text.d.ts +6 -0
- package/lib-commonjs/components/Text/Text.js +26 -0
- package/lib-commonjs/components/Text/Text.js.map +1 -0
- package/lib-commonjs/components/Text/Text.types.d.ts +78 -0
- package/lib-commonjs/components/Text/Text.types.js +6 -0
- package/lib-commonjs/components/Text/Text.types.js.map +1 -0
- package/lib-commonjs/components/Text/index.d.ts +5 -0
- package/lib-commonjs/components/Text/index.js +18 -0
- package/lib-commonjs/components/Text/index.js.map +1 -0
- package/lib-commonjs/components/Text/renderText.d.ts +5 -0
- package/lib-commonjs/components/Text/renderText.js +26 -0
- package/lib-commonjs/components/Text/renderText.js.map +1 -0
- package/lib-commonjs/components/Text/useText.d.ts +12 -0
- package/lib-commonjs/components/Text/useText.js +60 -0
- package/lib-commonjs/components/Text/useText.js.map +1 -0
- package/lib-commonjs/components/Text/useTextStyles.d.ts +6 -0
- package/lib-commonjs/components/Text/useTextStyles.js +125 -0
- package/lib-commonjs/components/Text/useTextStyles.js.map +1 -0
- package/lib-commonjs/components/Title1/Title1.d.ts +7 -0
- package/lib-commonjs/components/Title1/Title1.js +30 -0
- package/lib-commonjs/components/Title1/Title1.js.map +1 -0
- package/lib-commonjs/components/Title1/index.d.ts +1 -0
- package/lib-commonjs/components/Title1/index.js +10 -0
- package/lib-commonjs/components/Title1/index.js.map +1 -0
- package/lib-commonjs/components/Title2/Title2.d.ts +7 -0
- package/lib-commonjs/components/Title2/Title2.js +30 -0
- package/lib-commonjs/components/Title2/Title2.js.map +1 -0
- package/lib-commonjs/components/Title2/index.d.ts +1 -0
- package/lib-commonjs/components/Title2/index.js +10 -0
- package/lib-commonjs/components/Title2/index.js.map +1 -0
- package/lib-commonjs/components/Title3/Title3.d.ts +7 -0
- package/lib-commonjs/components/Title3/Title3.js +30 -0
- package/lib-commonjs/components/Title3/Title3.js.map +1 -0
- package/lib-commonjs/components/Title3/index.d.ts +1 -0
- package/lib-commonjs/components/Title3/index.js +10 -0
- package/lib-commonjs/components/Title3/index.js.map +1 -0
- package/lib-commonjs/components/wrapper.d.ts +8 -0
- package/lib-commonjs/components/wrapper.js +32 -0
- package/lib-commonjs/components/wrapper.js.map +1 -0
- package/lib-commonjs/index.d.ts +10 -0
- package/lib-commonjs/index.js +28 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/typographyStyles/index.d.ts +2 -0
- package/lib-commonjs/typographyStyles/index.js +11 -0
- package/lib-commonjs/typographyStyles/index.js.map +1 -0
- package/lib-commonjs/typographyStyles/typographyStyles.d.ts +13 -0
- package/lib-commonjs/typographyStyles/typographyStyles.js +68 -0
- package/lib-commonjs/typographyStyles/typographyStyles.js.map +1 -0
- package/package.json +63 -0
@@ -0,0 +1,125 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.useTextStyles_unstable = exports.textClassName = void 0;
|
7
|
+
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
+
|
10
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
11
|
+
|
12
|
+
exports.textClassName = 'fui-Text';
|
13
|
+
/**
|
14
|
+
* Styles for the root slot
|
15
|
+
*/
|
16
|
+
|
17
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
18
|
+
"root": {
|
19
|
+
"Bahqtrf": "fk6fouc",
|
20
|
+
"Be2twd7": "fkhj508",
|
21
|
+
"Bg96gwp": "f1i3iumi",
|
22
|
+
"Bhrd7zp": "figsok6",
|
23
|
+
"fsow6f": "fpgzoln",
|
24
|
+
"mc9l5x": "f1w7gpdv",
|
25
|
+
"Huce71": "f6juhto",
|
26
|
+
"B68tc82": "f1mtd64y",
|
27
|
+
"Bmxbyg5": "f1y7q3j9",
|
28
|
+
"ygn44y": "f2jf649"
|
29
|
+
},
|
30
|
+
"nowrap": {
|
31
|
+
"Huce71": "fz5stix",
|
32
|
+
"B68tc82": "f1p9o1ba",
|
33
|
+
"Bmxbyg5": "f1sil6mw"
|
34
|
+
},
|
35
|
+
"truncate": {
|
36
|
+
"ygn44y": "f1cmbuwj"
|
37
|
+
},
|
38
|
+
"block": {
|
39
|
+
"mc9l5x": "ftgm304"
|
40
|
+
},
|
41
|
+
"italic": {
|
42
|
+
"B80ckks": "f1j4dglz"
|
43
|
+
},
|
44
|
+
"underline": {
|
45
|
+
"w71qe1": "f13mvf36"
|
46
|
+
},
|
47
|
+
"strikethrough": {
|
48
|
+
"w71qe1": "fv5q2k7"
|
49
|
+
},
|
50
|
+
"strikethroughUnderline": {
|
51
|
+
"w71qe1": "f1drk4o6"
|
52
|
+
},
|
53
|
+
"base100": {
|
54
|
+
"Be2twd7": "f13mqy1h",
|
55
|
+
"Bg96gwp": "fcpl73t"
|
56
|
+
},
|
57
|
+
"base200": {
|
58
|
+
"Be2twd7": "fy9rknc",
|
59
|
+
"Bg96gwp": "fwrc4pm"
|
60
|
+
},
|
61
|
+
"base400": {
|
62
|
+
"Be2twd7": "fod5ikn",
|
63
|
+
"Bg96gwp": "faaz57k"
|
64
|
+
},
|
65
|
+
"base500": {
|
66
|
+
"Be2twd7": "f1pp30po",
|
67
|
+
"Bg96gwp": "f106mvju"
|
68
|
+
},
|
69
|
+
"base600": {
|
70
|
+
"Be2twd7": "f1x0m3f5",
|
71
|
+
"Bg96gwp": "fb86gi6"
|
72
|
+
},
|
73
|
+
"hero700": {
|
74
|
+
"Be2twd7": "fojgt09",
|
75
|
+
"Bg96gwp": "fcen8rp"
|
76
|
+
},
|
77
|
+
"hero800": {
|
78
|
+
"Be2twd7": "fccw675",
|
79
|
+
"Bg96gwp": "f1ebx5kk"
|
80
|
+
},
|
81
|
+
"hero900": {
|
82
|
+
"Be2twd7": "f15afnhw",
|
83
|
+
"Bg96gwp": "fr3w3wp"
|
84
|
+
},
|
85
|
+
"hero1000": {
|
86
|
+
"Be2twd7": "fpyltcb",
|
87
|
+
"Bg96gwp": "f1ivgwrt"
|
88
|
+
},
|
89
|
+
"monospace": {
|
90
|
+
"Bahqtrf": "f1fedwem"
|
91
|
+
},
|
92
|
+
"numeric": {
|
93
|
+
"Bahqtrf": "f1uq0ln5"
|
94
|
+
},
|
95
|
+
"weightMedium": {
|
96
|
+
"Bhrd7zp": "fdj6btp"
|
97
|
+
},
|
98
|
+
"weightSemibold": {
|
99
|
+
"Bhrd7zp": "fl43uef"
|
100
|
+
},
|
101
|
+
"alignCenter": {
|
102
|
+
"fsow6f": "f17mccla"
|
103
|
+
},
|
104
|
+
"alignEnd": {
|
105
|
+
"fsow6f": "f12ymhq5"
|
106
|
+
},
|
107
|
+
"alignJustify": {
|
108
|
+
"fsow6f": "f1j59e10"
|
109
|
+
}
|
110
|
+
}, {
|
111
|
+
"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;}"]
|
112
|
+
});
|
113
|
+
/**
|
114
|
+
* Apply styling to the Text slots based on the state
|
115
|
+
*/
|
116
|
+
|
117
|
+
|
118
|
+
const useTextStyles_unstable = state => {
|
119
|
+
const styles = useStyles();
|
120
|
+
state.root.className = react_1.mergeClasses(exports.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);
|
121
|
+
return state;
|
122
|
+
};
|
123
|
+
|
124
|
+
exports.useTextStyles_unstable = useTextStyles_unstable;
|
125
|
+
//# sourceMappingURL=useTextStyles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Text/useTextStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TextState } from './Text.types';\n\nexport const textClassName = 'fui-Text';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n fontWeight: tokens.fontWeightRegular,\n textAlign: 'start',\n display: 'inline',\n whiteSpace: 'normal',\n ...shorthands.overflow('visible'),\n textOverflow: 'clip',\n },\n nowrap: {\n whiteSpace: 'nowrap',\n ...shorthands.overflow('hidden'),\n },\n truncate: {\n textOverflow: 'ellipsis',\n },\n block: {\n display: 'block',\n },\n italic: {\n fontStyle: 'italic',\n },\n underline: {\n textDecorationLine: 'underline',\n },\n strikethrough: {\n textDecorationLine: 'line-through',\n },\n strikethroughUnderline: {\n textDecorationLine: 'line-through underline',\n },\n base100: {\n fontSize: tokens.fontSizeBase100,\n lineHeight: tokens.lineHeightBase100,\n },\n base200: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n base400: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n base500: {\n fontSize: tokens.fontSizeBase500,\n lineHeight: tokens.lineHeightBase500,\n },\n base600: {\n fontSize: tokens.fontSizeBase600,\n lineHeight: tokens.lineHeightBase600,\n },\n hero700: {\n fontSize: tokens.fontSizeHero700,\n lineHeight: tokens.lineHeightHero700,\n },\n hero800: {\n fontSize: tokens.fontSizeHero800,\n lineHeight: tokens.lineHeightHero800,\n },\n hero900: {\n fontSize: tokens.fontSizeHero900,\n lineHeight: tokens.lineHeightHero900,\n },\n hero1000: {\n fontSize: tokens.fontSizeHero1000,\n lineHeight: tokens.lineHeightHero1000,\n },\n monospace: {\n fontFamily: tokens.fontFamilyMonospace,\n },\n numeric: {\n fontFamily: tokens.fontFamilyNumeric,\n },\n weightMedium: {\n fontWeight: tokens.fontWeightMedium,\n },\n weightSemibold: {\n fontWeight: tokens.fontWeightSemibold,\n },\n alignCenter: {\n textAlign: 'center',\n },\n alignEnd: {\n textAlign: 'end',\n },\n alignJustify: {\n textAlign: 'justify',\n },\n});\n\n/**\n * Apply styling to the Text slots based on the state\n */\nexport const useTextStyles_unstable = (state: TextState): TextState => {\n const styles = useStyles();\n\n state.root.className = mergeClasses(\n textClassName,\n styles.root,\n state.wrap === false && styles.nowrap,\n state.truncate && styles.truncate,\n state.block && styles.block,\n state.italic && styles.italic,\n state.underline && styles.underline,\n state.strikethrough && styles.strikethrough,\n state.underline && state.strikethrough && styles.strikethroughUnderline,\n state.size === 100 && styles.base100,\n state.size === 200 && styles.base200,\n state.size === 400 && styles.base400,\n state.size === 500 && styles.base500,\n state.size === 600 && styles.base600,\n state.size === 700 && styles.hero700,\n state.size === 800 && styles.hero800,\n state.size === 900 && styles.hero900,\n state.size === 1000 && styles.hero1000,\n state.font === 'monospace' && styles.monospace,\n state.font === 'numeric' && styles.numeric,\n state.weight === 'medium' && styles.weightMedium,\n state.weight === 'semibold' && styles.weightSemibold,\n state.align === 'center' && styles.alignCenter,\n state.align === 'end' && styles.alignEnd,\n state.align === 'justify' && styles.alignJustify,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
2
|
+
import { TextWrapperProps } from '../wrapper';
|
3
|
+
export declare const title1ClassName = "fui-Title1";
|
4
|
+
/**
|
5
|
+
* Text wrapper component for the Title 1 typography variant
|
6
|
+
*/
|
7
|
+
export declare const Title1: FunctionComponent<TextWrapperProps>;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Title1 = exports.title1ClassName = void 0;
|
7
|
+
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
+
|
10
|
+
const index_1 = /*#__PURE__*/require("../../typographyStyles/index");
|
11
|
+
|
12
|
+
const wrapper_1 = /*#__PURE__*/require("../wrapper");
|
13
|
+
|
14
|
+
exports.title1ClassName = 'fui-Title1';
|
15
|
+
/**
|
16
|
+
* Styles for the root slot
|
17
|
+
*/
|
18
|
+
|
19
|
+
const useStyles = /*#__PURE__*/react_1.__styles({}, {});
|
20
|
+
/**
|
21
|
+
* Text wrapper component for the Title 1 typography variant
|
22
|
+
*/
|
23
|
+
|
24
|
+
|
25
|
+
exports.Title1 = /*#__PURE__*/wrapper_1.createWrapper({
|
26
|
+
useStyles,
|
27
|
+
className: exports.title1ClassName,
|
28
|
+
displayName: 'Title1'
|
29
|
+
});
|
30
|
+
//# sourceMappingURL=Title1.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Title1/Title1.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,8BAAA,CAAA;;AACA,MAAA,SAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AAEa,OAAA,CAAA,eAAA,GAAkB,YAAlB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA,QAAlB;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA8C,SAAA,CAAA,aAAA,CAAc;AACvE,EAAA,SADuE;AAEvE,EAAA,SAAS,EAAE,OAAA,CAAA,eAF4D;AAGvE,EAAA,WAAW,EAAE;AAH0D,CAAd,CAA9C","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const title1ClassName = 'fui-Title1';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.title1,\n});\n\n/**\n * Text wrapper component for the Title 1 typography variant\n */\nexport const Title1: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: title1ClassName,\n displayName: 'Title1',\n});\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Title1';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Title1/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Title1';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
2
|
+
import { TextWrapperProps } from '../wrapper';
|
3
|
+
export declare const title2ClassName = "fui-Title2";
|
4
|
+
/**
|
5
|
+
* Text wrapper component for the Title 2 typography variant
|
6
|
+
*/
|
7
|
+
export declare const Title2: FunctionComponent<TextWrapperProps>;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Title2 = exports.title2ClassName = void 0;
|
7
|
+
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
+
|
10
|
+
const index_1 = /*#__PURE__*/require("../../typographyStyles/index");
|
11
|
+
|
12
|
+
const wrapper_1 = /*#__PURE__*/require("../wrapper");
|
13
|
+
|
14
|
+
exports.title2ClassName = 'fui-Title2';
|
15
|
+
/**
|
16
|
+
* Styles for the root slot
|
17
|
+
*/
|
18
|
+
|
19
|
+
const useStyles = /*#__PURE__*/react_1.__styles({}, {});
|
20
|
+
/**
|
21
|
+
* Text wrapper component for the Title 2 typography variant
|
22
|
+
*/
|
23
|
+
|
24
|
+
|
25
|
+
exports.Title2 = /*#__PURE__*/wrapper_1.createWrapper({
|
26
|
+
useStyles,
|
27
|
+
className: exports.title2ClassName,
|
28
|
+
displayName: 'Title2'
|
29
|
+
});
|
30
|
+
//# sourceMappingURL=Title2.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Title2/Title2.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,8BAAA,CAAA;;AACA,MAAA,SAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AAEa,OAAA,CAAA,eAAA,GAAkB,YAAlB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA,QAAlB;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA8C,SAAA,CAAA,aAAA,CAAc;AACvE,EAAA,SADuE;AAEvE,EAAA,SAAS,EAAE,OAAA,CAAA,eAF4D;AAGvE,EAAA,WAAW,EAAE;AAH0D,CAAd,CAA9C","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const title2ClassName = 'fui-Title2';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.title2,\n});\n\n/**\n * Text wrapper component for the Title 2 typography variant\n */\nexport const Title2: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: title2ClassName,\n displayName: 'Title2',\n});\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Title2';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Title2/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Title2';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
2
|
+
import { TextWrapperProps } from '../wrapper';
|
3
|
+
export declare const title3ClassName = "fui-Title3";
|
4
|
+
/**
|
5
|
+
* Text wrapper component for the Title 3 typography variant
|
6
|
+
*/
|
7
|
+
export declare const Title3: FunctionComponent<TextWrapperProps>;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Title3 = exports.title3ClassName = void 0;
|
7
|
+
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
+
|
10
|
+
const index_1 = /*#__PURE__*/require("../../typographyStyles/index");
|
11
|
+
|
12
|
+
const wrapper_1 = /*#__PURE__*/require("../wrapper");
|
13
|
+
|
14
|
+
exports.title3ClassName = 'fui-Title3';
|
15
|
+
/**
|
16
|
+
* Styles for the root slot
|
17
|
+
*/
|
18
|
+
|
19
|
+
const useStyles = /*#__PURE__*/react_1.__styles({}, {});
|
20
|
+
/**
|
21
|
+
* Text wrapper component for the Title 3 typography variant
|
22
|
+
*/
|
23
|
+
|
24
|
+
|
25
|
+
exports.Title3 = /*#__PURE__*/wrapper_1.createWrapper({
|
26
|
+
useStyles,
|
27
|
+
className: exports.title3ClassName,
|
28
|
+
displayName: 'Title3'
|
29
|
+
});
|
30
|
+
//# sourceMappingURL=Title3.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Title3/Title3.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,8BAAA,CAAA;;AACA,MAAA,SAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AAEa,OAAA,CAAA,eAAA,GAAkB,YAAlB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA,QAAlB;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA8C,SAAA,CAAA,aAAA,CAAc;AACvE,EAAA,SADuE;AAEvE,EAAA,SAAS,EAAE,OAAA,CAAA,eAF4D;AAGvE,EAAA,WAAW,EAAE;AAH0D,CAAd,CAA9C","sourcesContent":["import type { FunctionComponent } from 'react';\nimport { makeStyles } from '@griffel/react';\nimport { typographyStyles } from '../../typographyStyles/index';\nimport { createWrapper, TextWrapperProps } from '../wrapper';\n\nexport const title3ClassName = 'fui-Title3';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: typographyStyles.title3,\n});\n\n/**\n * Text wrapper component for the Title 3 typography variant\n */\nexport const Title3: FunctionComponent<TextWrapperProps> = createWrapper({\n useStyles,\n className: title3ClassName,\n displayName: 'Title3',\n});\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Title3';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Title3/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Title3';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { TextProps } from '../Text';
|
3
|
+
export declare type TextWrapperProps = Omit<TextProps, 'font' | 'size'>;
|
4
|
+
export declare function createWrapper(options: {
|
5
|
+
className: string;
|
6
|
+
displayName: string;
|
7
|
+
useStyles: () => Record<'root', string>;
|
8
|
+
}): React.FunctionComponent<TextWrapperProps>;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createWrapper = void 0;
|
7
|
+
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
|
+
|
10
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
11
|
+
|
12
|
+
const Text_1 = /*#__PURE__*/require("../Text");
|
13
|
+
|
14
|
+
function createWrapper(options) {
|
15
|
+
const {
|
16
|
+
useStyles,
|
17
|
+
className,
|
18
|
+
displayName
|
19
|
+
} = options;
|
20
|
+
const Wrapper = React.forwardRef((props, ref) => {
|
21
|
+
const styles = useStyles();
|
22
|
+
const state = Text_1.useText_unstable(props, ref);
|
23
|
+
Text_1.useTextStyles_unstable(state);
|
24
|
+
state.root.className = react_1.mergeClasses(className, state.root.className, styles.root, props.className);
|
25
|
+
return Text_1.renderText_unstable(state);
|
26
|
+
});
|
27
|
+
Wrapper.displayName = displayName;
|
28
|
+
return Wrapper;
|
29
|
+
}
|
30
|
+
|
31
|
+
exports.createWrapper = createWrapper;
|
32
|
+
//# sourceMappingURL=wrapper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/wrapper.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,MAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AAMA,SAAgB,aAAhB,CAA8B,OAA9B,EAIC;AACC,QAAM;AAAE,IAAA,SAAF;AAAa,IAAA,SAAb;AAAwB,IAAA;AAAxB,MAAwC,OAA9C;AACA,QAAM,OAAO,GAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACrF,UAAM,MAAM,GAAG,SAAS,EAAxB;AACA,UAAM,KAAK,GAAG,MAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAqC,GAArC,CAAd;AAEA,IAAA,MAAA,CAAA,sBAAA,CAAuB,KAAvB;AAEA,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,SAAb,EAAwB,KAAK,CAAC,IAAN,CAAW,SAAnC,EAA8C,MAAM,CAAC,IAArD,EAA2D,KAAK,CAAC,SAAjE,CAAvB;AAEA,WAAO,MAAA,CAAA,mBAAA,CAAoB,KAApB,CAAP;AACD,GATsD,CAAvD;AAUA,EAAA,OAAO,CAAC,WAAR,GAAsB,WAAtB;AAEA,SAAO,OAAP;AACD;;AAnBD,OAAA,CAAA,aAAA,GAAA,aAAA","sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@griffel/react';\nimport { renderText_unstable, useText_unstable, useTextStyles_unstable } from '../Text';\nimport type { TextProps } from '../Text';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\nexport type TextWrapperProps = Omit<TextProps, 'font' | 'size'>;\n\nexport function createWrapper(options: {\n className: string;\n displayName: string;\n useStyles: () => Record<'root', string>;\n}): React.FunctionComponent<TextWrapperProps> {\n const { useStyles, className, displayName } = options;\n const Wrapper: ForwardRefComponent<TextWrapperProps> = React.forwardRef((props, ref) => {\n const styles = useStyles();\n const state = useText_unstable(props as TextProps, ref);\n\n useTextStyles_unstable(state);\n\n state.root.className = mergeClasses(className, state.root.className, styles.root, props.className);\n\n return renderText_unstable(state);\n });\n Wrapper.displayName = displayName;\n\n return Wrapper;\n}\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * from './Text';
|
2
|
+
export * from './Display';
|
3
|
+
export * from './LargeTitle';
|
4
|
+
export * from './Title1';
|
5
|
+
export * from './Title2';
|
6
|
+
export * from './Title3';
|
7
|
+
export * from './Headline';
|
8
|
+
export * from './Subheadline';
|
9
|
+
export * from './Body';
|
10
|
+
export * from './Caption';
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
|
+
|
9
|
+
tslib_1.__exportStar(require("./Text"), exports);
|
10
|
+
|
11
|
+
tslib_1.__exportStar(require("./Display"), exports);
|
12
|
+
|
13
|
+
tslib_1.__exportStar(require("./LargeTitle"), exports);
|
14
|
+
|
15
|
+
tslib_1.__exportStar(require("./Title1"), exports);
|
16
|
+
|
17
|
+
tslib_1.__exportStar(require("./Title2"), exports);
|
18
|
+
|
19
|
+
tslib_1.__exportStar(require("./Title3"), exports);
|
20
|
+
|
21
|
+
tslib_1.__exportStar(require("./Headline"), exports);
|
22
|
+
|
23
|
+
tslib_1.__exportStar(require("./Subheadline"), exports);
|
24
|
+
|
25
|
+
tslib_1.__exportStar(require("./Body"), exports);
|
26
|
+
|
27
|
+
tslib_1.__exportStar(require("./Caption"), exports);
|
28
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Text';\nexport * from './Display';\nexport * from './LargeTitle';\nexport * from './Title1';\nexport * from './Title2';\nexport * from './Title3';\nexport * from './Headline';\nexport * from './Subheadline';\nexport * from './Body';\nexport * from './Caption';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.typographyStyles = void 0;
|
7
|
+
|
8
|
+
const typographyStyles = /*#__PURE__*/require("./typographyStyles");
|
9
|
+
|
10
|
+
exports.typographyStyles = typographyStyles;
|
11
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["typographyStyles/index.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,gBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACS,OAAA,CAAA,gBAAA,GAAA,gBAAA","sourcesContent":["import * as typographyStyles from './typographyStyles';\nexport { typographyStyles };\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { GriffelStyle } from '@griffel/react';
|
2
|
+
/**
|
3
|
+
* Make-styles rules for the typography variants
|
4
|
+
*/
|
5
|
+
export declare const caption: GriffelStyle;
|
6
|
+
export declare const body: GriffelStyle;
|
7
|
+
export declare const subheadline: GriffelStyle;
|
8
|
+
export declare const headline: GriffelStyle;
|
9
|
+
export declare const title3: GriffelStyle;
|
10
|
+
export declare const title2: GriffelStyle;
|
11
|
+
export declare const title1: GriffelStyle;
|
12
|
+
export declare const largeTitle: GriffelStyle;
|
13
|
+
export declare const display: GriffelStyle;
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.display = exports.largeTitle = exports.title1 = exports.title2 = exports.title3 = exports.headline = exports.subheadline = exports.body = exports.caption = void 0;
|
7
|
+
|
8
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
9
|
+
/**
|
10
|
+
* Make-styles rules for the typography variants
|
11
|
+
*/
|
12
|
+
|
13
|
+
|
14
|
+
exports.caption = {
|
15
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
16
|
+
fontSize: react_theme_1.tokens.fontSizeBase200,
|
17
|
+
lineHeight: react_theme_1.tokens.lineHeightBase200,
|
18
|
+
fontWeight: react_theme_1.tokens.fontWeightRegular
|
19
|
+
};
|
20
|
+
exports.body = {
|
21
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
22
|
+
fontSize: react_theme_1.tokens.fontSizeBase300,
|
23
|
+
lineHeight: react_theme_1.tokens.lineHeightBase300,
|
24
|
+
fontWeight: react_theme_1.tokens.fontWeightRegular
|
25
|
+
};
|
26
|
+
exports.subheadline = {
|
27
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
28
|
+
fontSize: react_theme_1.tokens.fontSizeBase400,
|
29
|
+
lineHeight: react_theme_1.tokens.lineHeightBase400,
|
30
|
+
fontWeight: react_theme_1.tokens.fontWeightSemibold
|
31
|
+
};
|
32
|
+
exports.headline = {
|
33
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
34
|
+
fontSize: react_theme_1.tokens.fontSizeBase500,
|
35
|
+
lineHeight: react_theme_1.tokens.lineHeightBase500,
|
36
|
+
fontWeight: react_theme_1.tokens.fontWeightSemibold
|
37
|
+
};
|
38
|
+
exports.title3 = {
|
39
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
40
|
+
fontSize: react_theme_1.tokens.fontSizeBase600,
|
41
|
+
lineHeight: react_theme_1.tokens.lineHeightBase600,
|
42
|
+
fontWeight: react_theme_1.tokens.fontWeightSemibold
|
43
|
+
};
|
44
|
+
exports.title2 = {
|
45
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
46
|
+
fontSize: react_theme_1.tokens.fontSizeHero700,
|
47
|
+
lineHeight: react_theme_1.tokens.lineHeightHero700,
|
48
|
+
fontWeight: react_theme_1.tokens.fontWeightSemibold
|
49
|
+
};
|
50
|
+
exports.title1 = {
|
51
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
52
|
+
fontSize: react_theme_1.tokens.fontSizeHero800,
|
53
|
+
lineHeight: react_theme_1.tokens.lineHeightHero800,
|
54
|
+
fontWeight: react_theme_1.tokens.fontWeightSemibold
|
55
|
+
};
|
56
|
+
exports.largeTitle = {
|
57
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
58
|
+
fontSize: react_theme_1.tokens.fontSizeHero900,
|
59
|
+
lineHeight: react_theme_1.tokens.lineHeightHero900,
|
60
|
+
fontWeight: react_theme_1.tokens.fontWeightSemibold
|
61
|
+
};
|
62
|
+
exports.display = {
|
63
|
+
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
64
|
+
fontSize: react_theme_1.tokens.fontSizeHero1000,
|
65
|
+
lineHeight: react_theme_1.tokens.lineHeightHero1000,
|
66
|
+
fontWeight: react_theme_1.tokens.fontWeightSemibold
|
67
|
+
};
|
68
|
+
//# sourceMappingURL=typographyStyles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["typographyStyles/typographyStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport type { GriffelStyle } from '@griffel/react';\n\n/**\n * Make-styles rules for the typography variants\n */\nexport const caption: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n fontWeight: tokens.fontWeightRegular,\n};\nexport const body: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n fontWeight: tokens.fontWeightRegular,\n};\nexport const subheadline: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n};\nexport const headline: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase500,\n lineHeight: tokens.lineHeightBase500,\n fontWeight: tokens.fontWeightSemibold,\n};\nexport const title3: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase600,\n lineHeight: tokens.lineHeightBase600,\n fontWeight: tokens.fontWeightSemibold,\n};\nexport const title2: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeHero700,\n lineHeight: tokens.lineHeightHero700,\n fontWeight: tokens.fontWeightSemibold,\n};\nexport const title1: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeHero800,\n lineHeight: tokens.lineHeightHero800,\n fontWeight: tokens.fontWeightSemibold,\n};\nexport const largeTitle: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeHero900,\n lineHeight: tokens.lineHeightHero900,\n fontWeight: tokens.fontWeightSemibold,\n};\nexport const display: GriffelStyle = {\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeHero1000,\n lineHeight: tokens.lineHeightHero1000,\n fontWeight: tokens.fontWeightSemibold,\n};\n"],"sourceRoot":"../src/"}
|
package/package.json
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"name": "@fluentui/react-text",
|
3
|
+
"version": "0.0.0-nightly-20220302-0405.1",
|
4
|
+
"description": "Text is a typography and styling abstraction component that can be used to ensure the consistency of all text across your application.",
|
5
|
+
"main": "lib-commonjs/index.js",
|
6
|
+
"module": "lib/index.js",
|
7
|
+
"typings": "lib/index.d.ts",
|
8
|
+
"sideEffects": false,
|
9
|
+
"repository": {
|
10
|
+
"type": "git",
|
11
|
+
"url": "https://github.com/microsoft/fluentui"
|
12
|
+
},
|
13
|
+
"license": "MIT",
|
14
|
+
"scripts": {
|
15
|
+
"build": "just-scripts build",
|
16
|
+
"bundle-size": "bundle-size measure",
|
17
|
+
"clean": "just-scripts clean",
|
18
|
+
"code-style": "just-scripts code-style",
|
19
|
+
"just": "just-scripts",
|
20
|
+
"lint": "just-scripts lint",
|
21
|
+
"start": "yarn storybook",
|
22
|
+
"test": "jest --passWithNoTests",
|
23
|
+
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-text/src && yarn docs",
|
25
|
+
"storybook": "node ../../scripts/storybook/runner",
|
26
|
+
"type-check": "tsc -b tsconfig.json"
|
27
|
+
},
|
28
|
+
"devDependencies": {
|
29
|
+
"@fluentui/eslint-plugin": "*",
|
30
|
+
"@fluentui/react-conformance": "*",
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20220302-0405.1",
|
32
|
+
"@fluentui/scripts": "^1.0.0",
|
33
|
+
"@types/enzyme": "3.10.3",
|
34
|
+
"@types/enzyme-adapter-react-16": "1.0.3",
|
35
|
+
"@types/react": "16.9.42",
|
36
|
+
"@types/react-dom": "16.9.10",
|
37
|
+
"@types/react-test-renderer": "^16.0.0",
|
38
|
+
"enzyme": "~3.10.0",
|
39
|
+
"enzyme-adapter-react-16": "^1.15.0",
|
40
|
+
"react": "16.8.6",
|
41
|
+
"react-dom": "16.8.6",
|
42
|
+
"react-test-renderer": "^16.3.0"
|
43
|
+
},
|
44
|
+
"dependencies": {
|
45
|
+
"@griffel/react": "1.0.0",
|
46
|
+
"@fluentui/react-theme": "0.0.0-nightly-20220302-0405.1",
|
47
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20220302-0405.1",
|
48
|
+
"tslib": "^2.1.0"
|
49
|
+
},
|
50
|
+
"peerDependencies": {
|
51
|
+
"@types/react": ">=16.8.0 <18.0.0",
|
52
|
+
"@types/react-dom": ">=16.8.0 <18.0.0",
|
53
|
+
"react": ">=16.8.0 <18.0.0",
|
54
|
+
"react-dom": ">=16.8.0 <18.0.0"
|
55
|
+
},
|
56
|
+
"beachball": {
|
57
|
+
"disallowedChangeTypes": [
|
58
|
+
"major",
|
59
|
+
"minor",
|
60
|
+
"patch"
|
61
|
+
]
|
62
|
+
}
|
63
|
+
}
|