@fluentui/react-text 0.0.0-nightlyca6ef2bc8e20220105.1 → 0.0.0-nightlyd45ba4664620220211.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 +85 -20
- package/CHANGELOG.md +25 -10
- package/MIGRATION.md +153 -103
- package/dist/react-text.d.ts +8 -8
- package/lib/components/Body/Body.js +1 -1
- package/lib/components/Body/Body.js.map +1 -1
- package/lib/components/Caption/Caption.js +1 -1
- package/lib/components/Caption/Caption.js.map +1 -1
- package/lib/components/Display/Display.js +1 -1
- package/lib/components/Display/Display.js.map +1 -1
- package/lib/components/Headline/Headline.js +1 -1
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/LargeTitle/LargeTitle.js +1 -1
- package/lib/components/LargeTitle/LargeTitle.js.map +1 -1
- package/lib/components/Subheadline/Subheadline.js +1 -1
- package/lib/components/Subheadline/Subheadline.js.map +1 -1
- package/lib/components/Text/Text.js +6 -6
- package/lib/components/Text/Text.js.map +1 -1
- package/lib/components/Text/Text.types.d.ts +4 -3
- package/lib/components/Text/renderText.d.ts +1 -1
- package/lib/components/Text/renderText.js +1 -1
- package/lib/components/Text/renderText.js.map +1 -1
- package/lib/components/Text/useText.d.ts +3 -3
- package/lib/components/Text/useText.js +3 -3
- package/lib/components/Text/useText.js.map +1 -1
- package/lib/components/Text/useTextStyles.d.ts +1 -1
- package/lib/components/Text/useTextStyles.js +3 -2
- package/lib/components/Text/useTextStyles.js.map +1 -1
- package/lib/components/Title1/Title1.js +1 -1
- package/lib/components/Title1/Title1.js.map +1 -1
- package/lib/components/Title2/Title2.js +1 -1
- package/lib/components/Title2/Title2.js.map +1 -1
- package/lib/components/Title3/Title3.js +1 -1
- package/lib/components/Title3/Title3.js.map +1 -1
- package/lib/components/wrapper.js +5 -5
- package/lib/components/wrapper.js.map +1 -1
- package/lib/typographyStyles/typographyStyles.d.ts +10 -11
- package/lib/typographyStyles/typographyStyles.js +56 -54
- package/lib/typographyStyles/typographyStyles.js.map +1 -1
- package/lib-commonjs/components/Body/Body.js +2 -4
- package/lib-commonjs/components/Body/Body.js.map +1 -1
- package/lib-commonjs/components/Caption/Caption.js +2 -4
- package/lib-commonjs/components/Caption/Caption.js.map +1 -1
- package/lib-commonjs/components/Display/Display.js +2 -4
- package/lib-commonjs/components/Display/Display.js.map +1 -1
- package/lib-commonjs/components/Headline/Headline.js +2 -4
- package/lib-commonjs/components/Headline/Headline.js.map +1 -1
- package/lib-commonjs/components/LargeTitle/LargeTitle.js +2 -4
- package/lib-commonjs/components/LargeTitle/LargeTitle.js.map +1 -1
- package/lib-commonjs/components/Subheadline/Subheadline.js +2 -4
- package/lib-commonjs/components/Subheadline/Subheadline.js.map +1 -1
- package/lib-commonjs/components/Text/Text.js +3 -3
- package/lib-commonjs/components/Text/Text.js.map +1 -1
- package/lib-commonjs/components/Text/Text.types.d.ts +4 -3
- package/lib-commonjs/components/Text/renderText.d.ts +1 -1
- package/lib-commonjs/components/Text/renderText.js +3 -3
- package/lib-commonjs/components/Text/renderText.js.map +1 -1
- package/lib-commonjs/components/Text/useText.d.ts +3 -3
- package/lib-commonjs/components/Text/useText.js +5 -5
- package/lib-commonjs/components/Text/useText.js.map +1 -1
- package/lib-commonjs/components/Text/useTextStyles.d.ts +1 -1
- package/lib-commonjs/components/Text/useTextStyles.js +8 -6
- package/lib-commonjs/components/Text/useTextStyles.js.map +1 -1
- package/lib-commonjs/components/Title1/Title1.js +2 -4
- package/lib-commonjs/components/Title1/Title1.js.map +1 -1
- package/lib-commonjs/components/Title2/Title2.js +2 -4
- package/lib-commonjs/components/Title2/Title2.js.map +1 -1
- package/lib-commonjs/components/Title3/Title3.js +2 -4
- package/lib-commonjs/components/Title3/Title3.js.map +1 -1
- package/lib-commonjs/components/wrapper.js +5 -5
- package/lib-commonjs/components/wrapper.js.map +1 -1
- package/lib-commonjs/typographyStyles/typographyStyles.d.ts +10 -11
- package/lib-commonjs/typographyStyles/typographyStyles.js +56 -79
- package/lib-commonjs/typographyStyles/typographyStyles.js.map +1 -1
- package/package.json +6 -8
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.renderText_unstable = void 0;
|
7
7
|
|
8
8
|
const React = /*#__PURE__*/require("react");
|
9
9
|
|
@@ -13,7 +13,7 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
13
13
|
*/
|
14
14
|
|
15
15
|
|
16
|
-
const
|
16
|
+
const renderText_unstable = state => {
|
17
17
|
const {
|
18
18
|
slots,
|
19
19
|
slotProps
|
@@ -22,5 +22,5 @@ const renderText = state => {
|
|
22
22
|
});
|
23
23
|
};
|
24
24
|
|
25
|
-
exports.
|
25
|
+
exports.renderText_unstable = renderText_unstable;
|
26
26
|
//# sourceMappingURL=renderText.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Text/renderText.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,
|
1
|
+
{"version":3,"sources":["../../../src/components/Text/renderText.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,mBAAmB,GAAI,KAAD,IAAqB;AACtD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAoB,KAApB,CAA7B;AAEA,SAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourceRoot":""}
|
@@ -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
|
7
|
-
* before being passed to
|
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
|
12
|
+
export declare const useText_unstable: (props: TextProps, ref: React.Ref<HTMLElement>) => TextState;
|
@@ -3,21 +3,21 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useText_unstable = void 0;
|
7
7
|
|
8
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
9
|
/**
|
10
10
|
* Create the state required to render Text.
|
11
11
|
*
|
12
|
-
* The returned state can be modified with hooks such as
|
13
|
-
* before being passed to
|
12
|
+
* The returned state can be modified with hooks such as useTextStyles_unstable,
|
13
|
+
* before being passed to renderText_unstable.
|
14
14
|
*
|
15
15
|
* @param props - props from this instance of Text
|
16
16
|
* @param ref - reference to root HTMLElement of Text
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
|
-
const
|
20
|
+
const useText_unstable = (props, ref) => {
|
21
21
|
var _a;
|
22
22
|
|
23
23
|
const {
|
@@ -56,5 +56,5 @@ const useText = (props, ref) => {
|
|
56
56
|
return state;
|
57
57
|
};
|
58
58
|
|
59
|
-
exports.
|
59
|
+
exports.useText_unstable = useText_unstable;
|
60
60
|
//# sourceMappingURL=useText.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Text/useText.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,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AAI,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,iBAAA,CAAA,qBAAA,CAAsB,EAAtB,EAA0B;AAC9B,MAAA,GAD8B;AAE9B,SAAG,KAF2B;AAG9B,MAAA;AAH8B,KAA1B;AAdiB,GAAzB;AAqBA,SAAO,KAAP;AACD,CA1BM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourceRoot":""}
|
@@ -3,16 +3,18 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useTextStyles_unstable = exports.textClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
+
|
10
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
9
11
|
|
10
12
|
exports.textClassName = 'fui-Text';
|
11
13
|
/**
|
12
14
|
* Styles for the root slot
|
13
15
|
*/
|
14
16
|
|
15
|
-
const useStyles = /*#__PURE__*/
|
17
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
16
18
|
"root": {
|
17
19
|
"Bahqtrf": "fk6fouc",
|
18
20
|
"Be2twd7": "fkhj508",
|
@@ -113,11 +115,11 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
113
115
|
*/
|
114
116
|
|
115
117
|
|
116
|
-
const
|
118
|
+
const useTextStyles_unstable = state => {
|
117
119
|
const styles = useStyles();
|
118
|
-
state.root.className =
|
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);
|
119
121
|
return state;
|
120
122
|
};
|
121
123
|
|
122
|
-
exports.
|
124
|
+
exports.useTextStyles_unstable = useTextStyles_unstable;
|
123
125
|
//# sourceMappingURL=useTextStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Text/useTextStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/Text/useTextStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,aAAA,GAAgB,UAAhB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,OAZR,EAarB,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAbR,EAcrB,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAdR,EAerB,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAfR,EAgBrB,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAhBR,EAiBrB,KAAK,CAAC,IAAN,KAAe,GAAf,IAAsB,MAAM,CAAC,OAjBR,EAkBrB,KAAK,CAAC,IAAN,KAAe,IAAf,IAAuB,MAAM,CAAC,QAlBT,EAmBrB,KAAK,CAAC,IAAN,KAAe,WAAf,IAA8B,MAAM,CAAC,SAnBhB,EAoBrB,KAAK,CAAC,IAAN,KAAe,SAAf,IAA4B,MAAM,CAAC,OApBd,EAqBrB,KAAK,CAAC,MAAN,KAAiB,QAAjB,IAA6B,MAAM,CAAC,YArBf,EAsBrB,KAAK,CAAC,MAAN,KAAiB,UAAjB,IAA+B,MAAM,CAAC,cAtBjB,EAuBrB,KAAK,CAAC,KAAN,KAAgB,QAAhB,IAA4B,MAAM,CAAC,WAvBd,EAwBrB,KAAK,CAAC,KAAN,KAAgB,KAAhB,IAAyB,MAAM,CAAC,QAxBX,EAyBrB,KAAK,CAAC,KAAN,KAAgB,SAAhB,IAA6B,MAAM,CAAC,YAzBf,EA0BrB,KAAK,CAAC,IAAN,CAAW,SA1BU,CAAvB;AA6BA,SAAO,KAAP;AACD,CAjCM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.Title1 = exports.title1ClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
10
|
const index_1 = /*#__PURE__*/require("../../typographyStyles/index");
|
11
11
|
|
@@ -16,9 +16,7 @@ exports.title1ClassName = 'fui-Title1';
|
|
16
16
|
* Styles for the root slot
|
17
17
|
*/
|
18
18
|
|
19
|
-
const useStyles = /*#__PURE__*/
|
20
|
-
"root": {}
|
21
|
-
}, {});
|
19
|
+
const useStyles = /*#__PURE__*/react_1.__styles({}, {});
|
22
20
|
/**
|
23
21
|
* Text wrapper component for the Title 1 typography variant
|
24
22
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Title1/Title1.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,
|
1
|
+
{"version":3,"sources":["../../../src/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","sourceRoot":""}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.Title2 = exports.title2ClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
10
|
const index_1 = /*#__PURE__*/require("../../typographyStyles/index");
|
11
11
|
|
@@ -16,9 +16,7 @@ exports.title2ClassName = 'fui-Title2';
|
|
16
16
|
* Styles for the root slot
|
17
17
|
*/
|
18
18
|
|
19
|
-
const useStyles = /*#__PURE__*/
|
20
|
-
"root": {}
|
21
|
-
}, {});
|
19
|
+
const useStyles = /*#__PURE__*/react_1.__styles({}, {});
|
22
20
|
/**
|
23
21
|
* Text wrapper component for the Title 2 typography variant
|
24
22
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Title2/Title2.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,
|
1
|
+
{"version":3,"sources":["../../../src/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","sourceRoot":""}
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.Title3 = exports.title3ClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
10
|
const index_1 = /*#__PURE__*/require("../../typographyStyles/index");
|
11
11
|
|
@@ -16,9 +16,7 @@ exports.title3ClassName = 'fui-Title3';
|
|
16
16
|
* Styles for the root slot
|
17
17
|
*/
|
18
18
|
|
19
|
-
const useStyles = /*#__PURE__*/
|
20
|
-
"root": {}
|
21
|
-
}, {});
|
19
|
+
const useStyles = /*#__PURE__*/react_1.__styles({}, {});
|
22
20
|
/**
|
23
21
|
* Text wrapper component for the Title 3 typography variant
|
24
22
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Title3/Title3.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,
|
1
|
+
{"version":3,"sources":["../../../src/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","sourceRoot":""}
|
@@ -7,7 +7,7 @@ exports.createWrapper = void 0;
|
|
7
7
|
|
8
8
|
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
|
-
const
|
10
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
11
11
|
|
12
12
|
const Text_1 = /*#__PURE__*/require("../Text");
|
13
13
|
|
@@ -19,10 +19,10 @@ function createWrapper(options) {
|
|
19
19
|
} = options;
|
20
20
|
const Wrapper = React.forwardRef((props, ref) => {
|
21
21
|
const styles = useStyles();
|
22
|
-
const state = Text_1.
|
23
|
-
Text_1.
|
24
|
-
state.root.className =
|
25
|
-
return Text_1.
|
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
26
|
});
|
27
27
|
Wrapper.displayName = displayName;
|
28
28
|
return Wrapper;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/components/wrapper.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,
|
1
|
+
{"version":3,"sources":["../../src/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","sourceRoot":""}
|
@@ -1,14 +1,13 @@
|
|
1
|
-
import type {
|
2
|
-
import type { Theme } from '@fluentui/react-theme';
|
1
|
+
import type { GriffelStyle } from '@griffel/react';
|
3
2
|
/**
|
4
3
|
* Make-styles rules for the typography variants
|
5
4
|
*/
|
6
|
-
export declare const caption:
|
7
|
-
export declare const body:
|
8
|
-
export declare const subheadline:
|
9
|
-
export declare const headline:
|
10
|
-
export declare const title3:
|
11
|
-
export declare const title2:
|
12
|
-
export declare const title1:
|
13
|
-
export declare const largeTitle:
|
14
|
-
export declare const display:
|
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;
|
@@ -4,88 +4,65 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
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");
|
7
9
|
/**
|
8
10
|
* Make-styles rules for the typography variants
|
9
11
|
*/
|
10
12
|
|
11
|
-
const caption = theme => ({
|
12
|
-
fontFamily: theme.fontFamilyBase,
|
13
|
-
fontSize: theme.fontSizeBase200,
|
14
|
-
lineHeight: theme.lineHeightBase200,
|
15
|
-
fontWeight: theme.fontWeightRegular
|
16
|
-
});
|
17
|
-
|
18
|
-
exports.caption = caption;
|
19
|
-
|
20
|
-
const body = theme => ({
|
21
|
-
fontFamily: theme.fontFamilyBase,
|
22
|
-
fontSize: theme.fontSizeBase300,
|
23
|
-
lineHeight: theme.lineHeightBase300,
|
24
|
-
fontWeight: theme.fontWeightRegular
|
25
|
-
});
|
26
|
-
|
27
|
-
exports.body = body;
|
28
|
-
|
29
|
-
const subheadline = theme => ({
|
30
|
-
fontFamily: theme.fontFamilyBase,
|
31
|
-
fontSize: theme.fontSizeBase400,
|
32
|
-
lineHeight: theme.lineHeightBase400,
|
33
|
-
fontWeight: theme.fontWeightSemibold
|
34
|
-
});
|
35
|
-
|
36
|
-
exports.subheadline = subheadline;
|
37
|
-
|
38
|
-
const headline = theme => ({
|
39
|
-
fontFamily: theme.fontFamilyBase,
|
40
|
-
fontSize: theme.fontSizeBase500,
|
41
|
-
lineHeight: theme.lineHeightBase500,
|
42
|
-
fontWeight: theme.fontWeightSemibold
|
43
|
-
});
|
44
|
-
|
45
|
-
exports.headline = headline;
|
46
|
-
|
47
|
-
const title3 = theme => ({
|
48
|
-
fontFamily: theme.fontFamilyBase,
|
49
|
-
fontSize: theme.fontSizeBase600,
|
50
|
-
lineHeight: theme.lineHeightBase600,
|
51
|
-
fontWeight: theme.fontWeightSemibold
|
52
|
-
});
|
53
|
-
|
54
|
-
exports.title3 = title3;
|
55
|
-
|
56
|
-
const title2 = theme => ({
|
57
|
-
fontFamily: theme.fontFamilyBase,
|
58
|
-
fontSize: theme.fontSizeHero700,
|
59
|
-
lineHeight: theme.lineHeightHero700,
|
60
|
-
fontWeight: theme.fontWeightSemibold
|
61
|
-
});
|
62
|
-
|
63
|
-
exports.title2 = title2;
|
64
|
-
|
65
|
-
const title1 = theme => ({
|
66
|
-
fontFamily: theme.fontFamilyBase,
|
67
|
-
fontSize: theme.fontSizeHero800,
|
68
|
-
lineHeight: theme.lineHeightHero800,
|
69
|
-
fontWeight: theme.fontWeightSemibold
|
70
|
-
});
|
71
|
-
|
72
|
-
exports.title1 = title1;
|
73
|
-
|
74
|
-
const largeTitle = theme => ({
|
75
|
-
fontFamily: theme.fontFamilyBase,
|
76
|
-
fontSize: theme.fontSizeHero900,
|
77
|
-
lineHeight: theme.lineHeightHero900,
|
78
|
-
fontWeight: theme.fontWeightSemibold
|
79
|
-
});
|
80
|
-
|
81
|
-
exports.largeTitle = largeTitle;
|
82
|
-
|
83
|
-
const display = theme => ({
|
84
|
-
fontFamily: theme.fontFamilyBase,
|
85
|
-
fontSize: theme.fontSizeHero1000,
|
86
|
-
lineHeight: theme.lineHeightHero1000,
|
87
|
-
fontWeight: theme.fontWeightSemibold
|
88
|
-
});
|
89
13
|
|
90
|
-
exports.
|
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
|
+
};
|
91
68
|
//# sourceMappingURL=typographyStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/typographyStyles/typographyStyles.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../src/typographyStyles/typographyStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,OAAA,GAAwB;AACnC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,cADgB;AAEnC,EAAA,QAAQ,EAAE,aAAA,CAAA,MAAA,CAAO,eAFkB;AAGnC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,iBAHgB;AAInC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO;AAJgB,CAAxB;AAMA,OAAA,CAAA,IAAA,GAAqB;AAChC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,cADa;AAEhC,EAAA,QAAQ,EAAE,aAAA,CAAA,M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,EAAE,aAAA,CAAA,MAAA,CAAO,cADe;AAElC,EAAA,QAAQ,EAAE,aAAA,CAAA,MAAA,CAAO,eAFiB;AAGlC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,iBAHe;AAIlC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO;AAJe,CAAvB;AAMA,OAAA,CAAA,UAAA,GAA2B;AACtC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,cADmB;AAEtC,EAAA,QAAQ,EAAE,aAAA,CAAA,MAAA,CAAO,eAFqB;AAGtC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,iBAHmB;AAItC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO;AAJmB,CAA3B;AAMA,OAAA,CAAA,OAAA,GAAwB;AACnC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,cADgB;AAEnC,EAAA,QAAQ,EAAE,aAAA,CAAA,MAAA,CAAO,gBAFkB;AAGnC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO,kBAHgB;AAInC,EAAA,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO;AAJgB,CAAxB","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-text",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlyd45ba4664620220211.1",
|
4
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
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -19,18 +19,16 @@
|
|
19
19
|
"just": "just-scripts",
|
20
20
|
"lint": "just-scripts lint",
|
21
21
|
"start": "yarn storybook",
|
22
|
-
"test": "jest",
|
22
|
+
"test": "jest --passWithNoTests",
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
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": "
|
25
|
+
"storybook": "node ../../scripts/storybook/runner",
|
26
26
|
"type-check": "tsc -b tsconfig.json"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
|
-
"@fluentui/babel-make-styles": "0.0.0-nightlyca6ef2bc8e20220105.1",
|
30
29
|
"@fluentui/eslint-plugin": "*",
|
31
|
-
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyca6ef2bc8e20220105.1",
|
32
30
|
"@fluentui/react-conformance": "*",
|
33
|
-
"@fluentui/react-conformance-
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightlyd45ba4664620220211.1",
|
34
32
|
"@fluentui/scripts": "^1.0.0",
|
35
33
|
"@types/enzyme": "3.10.3",
|
36
34
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -44,8 +42,8 @@
|
|
44
42
|
"react-test-renderer": "^16.3.0"
|
45
43
|
},
|
46
44
|
"dependencies": {
|
47
|
-
"@
|
48
|
-
"@fluentui/react-utilities": "0.0.0-
|
45
|
+
"@griffel/react": "1.0.0",
|
46
|
+
"@fluentui/react-utilities": "0.0.0-nightlyd45ba4664620220211.1",
|
49
47
|
"tslib": "^2.1.0"
|
50
48
|
},
|
51
49
|
"peerDependencies": {
|