@fluentui-react-native/text 0.24.20 → 0.25.0
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.md +54 -1
- package/SPEC.md +1 -1
- package/lib/Text.d.ts +6 -2
- package/lib/Text.d.ts.map +1 -1
- package/lib/Text.js +124 -91
- package/lib/Text.js.map +1 -1
- package/lib/Text.types.d.ts +9 -6
- package/lib/Text.types.js +1 -1
- package/lib/TextTokens.d.ts +2 -2
- package/lib/TextTokens.js +6 -3
- package/lib/Variants.android.d.ts +61 -13
- package/lib/Variants.android.d.ts.map +1 -1
- package/lib/Variants.android.js +13 -13
- package/lib/Variants.d.ts +86 -18
- package/lib/Variants.d.ts.map +1 -1
- package/lib/Variants.ios.d.ts +61 -13
- package/lib/Variants.ios.d.ts.map +1 -1
- package/lib/Variants.ios.js +13 -13
- package/lib/Variants.js +1 -1
- package/lib/Variants.win32.d.ts +66 -14
- package/lib/Variants.win32.d.ts.map +1 -1
- package/lib/Variants.win32.js +14 -14
- package/lib/Variants.windows.d.ts +66 -14
- package/lib/Variants.windows.d.ts.map +1 -1
- package/lib/Variants.windows.js +14 -14
- package/lib/__tests__/Text.test.d.ts +1 -1
- package/lib/__tests__/Text.test.js +36 -23
- package/lib/__tests__/Text.test.js.map +1 -1
- package/lib/deprecated/Text.d.ts +14 -4
- package/lib/deprecated/Text.js +9 -9
- package/lib/deprecated/Text.settings.d.ts +1 -1
- package/lib/deprecated/Text.settings.js +18 -18
- package/lib/deprecated/Text.types.d.ts +11 -9
- package/lib/deprecated/Text.types.js +1 -1
- package/lib/index.d.ts +20 -2
- package/lib/index.js +20 -2
- package/lib-commonjs/Text.d.ts +6 -2
- package/lib-commonjs/Text.d.ts.map +1 -1
- package/lib-commonjs/Text.js +142 -102
- package/lib-commonjs/Text.js.map +1 -1
- package/lib-commonjs/Text.types.d.ts +9 -6
- package/lib-commonjs/Text.types.js +3 -3
- package/lib-commonjs/TextTokens.d.ts +2 -2
- package/lib-commonjs/TextTokens.js +10 -7
- package/lib-commonjs/Variants.android.d.ts +61 -13
- package/lib-commonjs/Variants.android.d.ts.map +1 -1
- package/lib-commonjs/Variants.android.js +34 -17
- package/lib-commonjs/Variants.d.ts +86 -18
- package/lib-commonjs/Variants.d.ts.map +1 -1
- package/lib-commonjs/Variants.ios.d.ts +61 -13
- package/lib-commonjs/Variants.ios.d.ts.map +1 -1
- package/lib-commonjs/Variants.ios.js +34 -17
- package/lib-commonjs/Variants.js +22 -5
- package/lib-commonjs/Variants.win32.d.ts +66 -14
- package/lib-commonjs/Variants.win32.d.ts.map +1 -1
- package/lib-commonjs/Variants.win32.js +35 -18
- package/lib-commonjs/Variants.windows.d.ts +66 -14
- package/lib-commonjs/Variants.windows.d.ts.map +1 -1
- package/lib-commonjs/Variants.windows.js +35 -18
- package/lib-commonjs/__tests__/Text.test.d.ts +1 -1
- package/lib-commonjs/__tests__/Text.test.js +92 -50
- package/lib-commonjs/__tests__/Text.test.js.map +1 -1
- package/lib-commonjs/deprecated/Text.d.ts +14 -4
- package/lib-commonjs/deprecated/Text.js +17 -17
- package/lib-commonjs/deprecated/Text.js.map +1 -1
- package/lib-commonjs/deprecated/Text.settings.d.ts +1 -1
- package/lib-commonjs/deprecated/Text.settings.js +21 -21
- package/lib-commonjs/deprecated/Text.types.d.ts +11 -9
- package/lib-commonjs/deprecated/Text.types.js +3 -3
- package/lib-commonjs/index.d.ts +20 -2
- package/lib-commonjs/index.js +156 -30
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +63 -62
- package/src/Text.tsx +8 -9
- package/src/__tests__/Text.test.tsx +25 -13
|
@@ -1,48 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
exports.Display =
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.Display =
|
|
4
|
+
exports.LargeTitle =
|
|
5
|
+
exports.Title3 =
|
|
6
|
+
exports.Title2 =
|
|
7
|
+
exports.Title1Strong =
|
|
8
|
+
exports.Title1 =
|
|
9
|
+
exports.Subtitle2Strong =
|
|
10
|
+
exports.Subtitle2 =
|
|
11
|
+
exports.Subtitle1Strong =
|
|
12
|
+
exports.Subtitle1 =
|
|
13
|
+
exports.Body2Strong =
|
|
14
|
+
exports.Body2 =
|
|
15
|
+
exports.Body1Strong =
|
|
16
|
+
exports.Body1 =
|
|
17
|
+
exports.Caption2 =
|
|
18
|
+
exports.Caption1Strong =
|
|
19
|
+
exports.Caption1 =
|
|
20
|
+
void 0;
|
|
21
|
+
const Text_1 = require('./Text');
|
|
5
22
|
exports.Caption1 = Text_1.Text.customize({
|
|
6
|
-
|
|
23
|
+
variant: 'caption1',
|
|
7
24
|
});
|
|
8
25
|
exports.Caption1Strong = null; // Not supported on Win32
|
|
9
26
|
exports.Caption2 = null; // Not supported on Win32
|
|
10
27
|
exports.Body1 = Text_1.Text.customize({
|
|
11
|
-
|
|
28
|
+
variant: 'body1',
|
|
12
29
|
});
|
|
13
30
|
exports.Body1Strong = Text_1.Text.customize({
|
|
14
|
-
|
|
31
|
+
variant: 'body1Strong',
|
|
15
32
|
});
|
|
16
33
|
exports.Body2 = Text_1.Text.customize({
|
|
17
|
-
|
|
34
|
+
variant: 'body2',
|
|
18
35
|
});
|
|
19
36
|
exports.Body2Strong = Text_1.Text.customize({
|
|
20
|
-
|
|
37
|
+
variant: 'body2Strong',
|
|
21
38
|
});
|
|
22
39
|
exports.Subtitle1 = Text_1.Text.customize({
|
|
23
|
-
|
|
40
|
+
variant: 'subtitle1',
|
|
24
41
|
});
|
|
25
42
|
exports.Subtitle1Strong = Text_1.Text.customize({
|
|
26
|
-
|
|
43
|
+
variant: 'subtitle1Strong',
|
|
27
44
|
});
|
|
28
45
|
exports.Subtitle2 = Text_1.Text.customize({
|
|
29
|
-
|
|
46
|
+
variant: 'subtitle2',
|
|
30
47
|
});
|
|
31
48
|
exports.Subtitle2Strong = Text_1.Text.customize({
|
|
32
|
-
|
|
49
|
+
variant: 'subtitle2Strong',
|
|
33
50
|
});
|
|
34
51
|
exports.Title1 = Text_1.Text.customize({
|
|
35
|
-
|
|
52
|
+
variant: 'title1',
|
|
36
53
|
});
|
|
37
54
|
exports.Title1Strong = Text_1.Text.customize({
|
|
38
|
-
|
|
55
|
+
variant: 'title1Strong',
|
|
39
56
|
});
|
|
40
57
|
exports.Title2 = null; // Not supported on Win32
|
|
41
58
|
exports.Title3 = null; // Not supported on Win32
|
|
42
59
|
exports.LargeTitle = Text_1.Text.customize({
|
|
43
|
-
|
|
60
|
+
variant: 'largeTitle',
|
|
44
61
|
});
|
|
45
62
|
exports.Display = Text_1.Text.customize({
|
|
46
|
-
|
|
63
|
+
variant: 'display',
|
|
47
64
|
});
|
|
48
|
-
//# sourceMappingURL=Variants.win32.js.map
|
|
65
|
+
//# sourceMappingURL=Variants.win32.js.map
|
|
@@ -1,18 +1,70 @@
|
|
|
1
|
-
export declare const Caption1: import(
|
|
1
|
+
export declare const Caption1: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
2
|
+
import('./Text.types').TextProps,
|
|
3
|
+
import('./Text.types').TextTokens,
|
|
4
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
5
|
+
>;
|
|
2
6
|
export declare const Caption1Strong: any;
|
|
3
7
|
export declare const Caption2: any;
|
|
4
|
-
export declare const Body1: import(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
export declare const Body1: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
9
|
+
import('./Text.types').TextProps,
|
|
10
|
+
import('./Text.types').TextTokens,
|
|
11
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
12
|
+
>;
|
|
13
|
+
export declare const Body1Strong: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
14
|
+
import('./Text.types').TextProps,
|
|
15
|
+
import('./Text.types').TextTokens,
|
|
16
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
17
|
+
>;
|
|
18
|
+
export declare const Body2: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
19
|
+
import('./Text.types').TextProps,
|
|
20
|
+
import('./Text.types').TextTokens,
|
|
21
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
22
|
+
>;
|
|
23
|
+
export declare const Body2Strong: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
24
|
+
import('./Text.types').TextProps,
|
|
25
|
+
import('./Text.types').TextTokens,
|
|
26
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
27
|
+
>;
|
|
28
|
+
export declare const Subtitle1: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
29
|
+
import('./Text.types').TextProps,
|
|
30
|
+
import('./Text.types').TextTokens,
|
|
31
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
32
|
+
>;
|
|
33
|
+
export declare const Subtitle1Strong: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
34
|
+
import('./Text.types').TextProps,
|
|
35
|
+
import('./Text.types').TextTokens,
|
|
36
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
37
|
+
>;
|
|
38
|
+
export declare const Subtitle2: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
39
|
+
import('./Text.types').TextProps,
|
|
40
|
+
import('./Text.types').TextTokens,
|
|
41
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
42
|
+
>;
|
|
43
|
+
export declare const Subtitle2Strong: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
44
|
+
import('./Text.types').TextProps,
|
|
45
|
+
import('./Text.types').TextTokens,
|
|
46
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
47
|
+
>;
|
|
48
|
+
export declare const Title1: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
49
|
+
import('./Text.types').TextProps,
|
|
50
|
+
import('./Text.types').TextTokens,
|
|
51
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
52
|
+
>;
|
|
53
|
+
export declare const Title1Strong: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
54
|
+
import('./Text.types').TextProps,
|
|
55
|
+
import('./Text.types').TextTokens,
|
|
56
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
57
|
+
>;
|
|
14
58
|
export declare const Title2: any;
|
|
15
59
|
export declare const Title3: any;
|
|
16
|
-
export declare const LargeTitle: import(
|
|
17
|
-
|
|
18
|
-
|
|
60
|
+
export declare const LargeTitle: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
61
|
+
import('./Text.types').TextProps,
|
|
62
|
+
import('./Text.types').TextTokens,
|
|
63
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
64
|
+
>;
|
|
65
|
+
export declare const Display: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
66
|
+
import('./Text.types').TextProps,
|
|
67
|
+
import('./Text.types').TextTokens,
|
|
68
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
69
|
+
>;
|
|
70
|
+
//# sourceMappingURL=Variants.windows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Variants.windows.d.ts","sourceRoot":"","sources":["../src/Variants.windows.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Variants.windows.d.ts","sourceRoot":"","sources":["../src/Variants.windows.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,4LAEnB,CAAC;AACH,eAAO,MAAM,cAAc,KAAO,CAAC;AACnC,eAAO,MAAM,QAAQ,KAAO,CAAC;AAC7B,eAAO,MAAM,KAAK,4LAEhB,CAAC;AACH,eAAO,MAAM,WAAW,4LAEtB,CAAC;AACH,eAAO,MAAM,KAAK,4LAEhB,CAAC;AACH,eAAO,MAAM,WAAW,4LAEtB,CAAC;AACH,eAAO,MAAM,SAAS,4LAEpB,CAAC;AACH,eAAO,MAAM,eAAe,4LAE1B,CAAC;AACH,eAAO,MAAM,SAAS,4LAEpB,CAAC;AACH,eAAO,MAAM,eAAe,4LAE1B,CAAC;AACH,eAAO,MAAM,MAAM,4LAEjB,CAAC;AACH,eAAO,MAAM,YAAY,4LAEvB,CAAC;AACH,eAAO,MAAM,MAAM,KAAO,CAAC;AAC3B,eAAO,MAAM,MAAM,KAAO,CAAC;AAC3B,eAAO,MAAM,UAAU,4LAErB,CAAC;AACH,eAAO,MAAM,OAAO,4LAElB,CAAC"}
|
|
@@ -1,48 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
exports.Display =
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.Display =
|
|
4
|
+
exports.LargeTitle =
|
|
5
|
+
exports.Title3 =
|
|
6
|
+
exports.Title2 =
|
|
7
|
+
exports.Title1Strong =
|
|
8
|
+
exports.Title1 =
|
|
9
|
+
exports.Subtitle2Strong =
|
|
10
|
+
exports.Subtitle2 =
|
|
11
|
+
exports.Subtitle1Strong =
|
|
12
|
+
exports.Subtitle1 =
|
|
13
|
+
exports.Body2Strong =
|
|
14
|
+
exports.Body2 =
|
|
15
|
+
exports.Body1Strong =
|
|
16
|
+
exports.Body1 =
|
|
17
|
+
exports.Caption2 =
|
|
18
|
+
exports.Caption1Strong =
|
|
19
|
+
exports.Caption1 =
|
|
20
|
+
void 0;
|
|
21
|
+
const Text_1 = require('./Text');
|
|
5
22
|
exports.Caption1 = Text_1.Text.customize({
|
|
6
|
-
|
|
23
|
+
variant: 'caption1',
|
|
7
24
|
});
|
|
8
25
|
exports.Caption1Strong = null; // Not supported on windows
|
|
9
26
|
exports.Caption2 = null; // Not supported on windows
|
|
10
27
|
exports.Body1 = Text_1.Text.customize({
|
|
11
|
-
|
|
28
|
+
variant: 'body1',
|
|
12
29
|
});
|
|
13
30
|
exports.Body1Strong = Text_1.Text.customize({
|
|
14
|
-
|
|
31
|
+
variant: 'body1Strong',
|
|
15
32
|
});
|
|
16
33
|
exports.Body2 = Text_1.Text.customize({
|
|
17
|
-
|
|
34
|
+
variant: 'body2',
|
|
18
35
|
});
|
|
19
36
|
exports.Body2Strong = Text_1.Text.customize({
|
|
20
|
-
|
|
37
|
+
variant: 'body2Strong',
|
|
21
38
|
});
|
|
22
39
|
exports.Subtitle1 = Text_1.Text.customize({
|
|
23
|
-
|
|
40
|
+
variant: 'subtitle1',
|
|
24
41
|
});
|
|
25
42
|
exports.Subtitle1Strong = Text_1.Text.customize({
|
|
26
|
-
|
|
43
|
+
variant: 'subtitle1Strong',
|
|
27
44
|
});
|
|
28
45
|
exports.Subtitle2 = Text_1.Text.customize({
|
|
29
|
-
|
|
46
|
+
variant: 'subtitle2',
|
|
30
47
|
});
|
|
31
48
|
exports.Subtitle2Strong = Text_1.Text.customize({
|
|
32
|
-
|
|
49
|
+
variant: 'subtitle2Strong',
|
|
33
50
|
});
|
|
34
51
|
exports.Title1 = Text_1.Text.customize({
|
|
35
|
-
|
|
52
|
+
variant: 'title1',
|
|
36
53
|
});
|
|
37
54
|
exports.Title1Strong = Text_1.Text.customize({
|
|
38
|
-
|
|
55
|
+
variant: 'title1Strong',
|
|
39
56
|
});
|
|
40
57
|
exports.Title2 = null; // Not supported on windows
|
|
41
58
|
exports.Title3 = null; // Not supported on windows
|
|
42
59
|
exports.LargeTitle = Text_1.Text.customize({
|
|
43
|
-
|
|
60
|
+
variant: 'largeTitle',
|
|
44
61
|
});
|
|
45
62
|
exports.Display = Text_1.Text.customize({
|
|
46
|
-
|
|
63
|
+
variant: 'display',
|
|
47
64
|
});
|
|
48
|
-
//# sourceMappingURL=Variants.windows.js.map
|
|
65
|
+
//# sourceMappingURL=Variants.windows.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=Text.test.d.ts.map
|
|
2
|
+
//# sourceMappingURL=Text.test.d.ts.map
|
|
@@ -1,56 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return m[k];
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}
|
|
18
|
+
: function (o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
});
|
|
22
|
+
var __setModuleDefault =
|
|
23
|
+
(this && this.__setModuleDefault) ||
|
|
24
|
+
(Object.create
|
|
25
|
+
? function (o, v) {
|
|
26
|
+
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
27
|
+
}
|
|
28
|
+
: function (o, v) {
|
|
29
|
+
o['default'] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar =
|
|
32
|
+
(this && this.__importStar) ||
|
|
33
|
+
(function () {
|
|
34
|
+
var ownKeys = function (o) {
|
|
35
|
+
ownKeys =
|
|
36
|
+
Object.getOwnPropertyNames ||
|
|
37
|
+
function (o) {
|
|
38
|
+
var ar = [];
|
|
39
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
40
|
+
return ar;
|
|
41
|
+
};
|
|
42
|
+
return ownKeys(o);
|
|
43
|
+
};
|
|
44
|
+
return function (mod) {
|
|
45
|
+
if (mod && mod.__esModule) return mod;
|
|
46
|
+
var result = {};
|
|
47
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]);
|
|
48
|
+
__setModuleDefault(result, mod);
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
53
|
+
const jsx_runtime_1 = require('react/jsx-runtime');
|
|
54
|
+
const react_1 = require('react');
|
|
55
|
+
const renderer = __importStar(require('react-test-renderer'));
|
|
56
|
+
const Text_1 = require('../Text');
|
|
29
57
|
describe('Text component tests', () => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
58
|
+
it('Text default', () => {
|
|
59
|
+
let component;
|
|
60
|
+
(0, react_1.act)(() => {
|
|
61
|
+
component = renderer.create(jsx_runtime_1.jsx(Text_1.Text, { children: 'Text default' }));
|
|
33
62
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
63
|
+
expect(component.toJSON()).toMatchSnapshot();
|
|
64
|
+
});
|
|
65
|
+
it('Text all props', () => {
|
|
66
|
+
let component;
|
|
67
|
+
(0, react_1.act)(() => {
|
|
68
|
+
component = renderer.create(jsx_runtime_1.jsx(Text_1.Text, { variant: 'bodyStandard', children: 'All props' }));
|
|
37
69
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
expect(tree).toMatchSnapshot();
|
|
70
|
+
expect(component.toJSON()).toMatchSnapshot();
|
|
71
|
+
});
|
|
72
|
+
it('Text all tokens', () => {
|
|
73
|
+
const BoldText = Text_1.Text.customize({
|
|
74
|
+
fontFamily: 'Wingdings',
|
|
75
|
+
fontWeight: '900',
|
|
76
|
+
fontSize: 20,
|
|
46
77
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
78
|
+
let component;
|
|
79
|
+
(0, react_1.act)(() => {
|
|
80
|
+
component = renderer.create(jsx_runtime_1.jsx(BoldText, { children: 'All tokens' }));
|
|
81
|
+
});
|
|
82
|
+
expect(component.toJSON()).toMatchSnapshot();
|
|
83
|
+
});
|
|
84
|
+
it('Text variants render correctly with style', () => {
|
|
85
|
+
const style = {
|
|
86
|
+
marginBottom: 8,
|
|
87
|
+
marginTop: 4,
|
|
88
|
+
};
|
|
89
|
+
let component;
|
|
90
|
+
(0, react_1.act)(() => {
|
|
91
|
+
component = renderer.create(
|
|
92
|
+
jsx_runtime_1.jsx(Text_1.Text, { variant: 'heroLargeSemibold', color: 'blue', style: style, children: 'Header Text' }),
|
|
93
|
+
);
|
|
54
94
|
});
|
|
95
|
+
expect(component.toJSON()).toMatchSnapshot();
|
|
96
|
+
});
|
|
55
97
|
});
|
|
56
|
-
//# sourceMappingURL=Text.test.js.map
|
|
98
|
+
//# sourceMappingURL=Text.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.test.js","sourceRoot":"","sources":["../../src/__tests__/Text.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.test.js","sourceRoot":"","sources":["../../src/__tests__/Text.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA4B;AAE5B,MAAY,QAAQ,gDAA4B;AAEhD,kCAA+B;AAE/B,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC;IACrC,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC;QACvB,IAAI,SAAqC,CAAC;QAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAC,WAAI,+BAAoB,CAAC,CAAC;QAAA,CACxD,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC/C,CAAC,CAAC;IAEH,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC;QACzB,IAAI,SAAqC,CAAC;QAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAC,WAAI,IAAC,OAAO,EAAC,cAAc,0BAAiB,CAAC,CAAC;QAAA,CAC5E,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC/C,CAAC,CAAC;IAEH,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE,CAAC;QAC1B,MAAM,QAAQ,GAAG,WAAI,CAAC,SAAS,CAAC;YAC9B,UAAU,EAAE,WAAW;YACvB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,EAAE;SACb,CAAC,CAAC;QACH,IAAI,SAAqC,CAAC;QAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAC,QAAQ,6BAAsB,CAAC,CAAC;QAAA,CAC9D,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC/C,CAAC,CAAC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE,CAAC;QACpD,MAAM,KAAK,GAAG;YACZ,YAAY,EAAE,CAAC;YACf,SAAS,EAAE,CAAC;SACb,CAAC;QACF,IAAI,SAAqC,CAAC;QAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;YACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CACzB,kBAAC,WAAI,IAAC,OAAO,EAAC,mBAAmB,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,4BAEpD,CACR,CAAC;QAAA,CACH,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC/C,CAAC,CAAC;AAAA,CACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
export declare const Text: import(
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const Text: import('@uifabricshared/foundation-compose').IComposeReturnType<
|
|
2
|
+
import('./Text.types').ITextProps<import('@fluentui-react-native/adapters').ITextProps>,
|
|
3
|
+
{
|
|
4
|
+
root: import('@fluentui-react-native/adapters').ITextProps;
|
|
5
|
+
},
|
|
6
|
+
import('@fluentui-react-native/tokens').FontStyleTokens &
|
|
7
|
+
import('@fluentui-react-native/tokens').FontVariantTokens &
|
|
8
|
+
import('@fluentui-react-native/tokens').FontDecorationTokens &
|
|
9
|
+
import('@fluentui-react-native/tokens').IForegroundColorTokens &
|
|
10
|
+
import('@fluentui-react-native/tokens').IBackgroundColorTokens,
|
|
11
|
+
object,
|
|
12
|
+
object
|
|
13
|
+
>;
|
|
4
14
|
export default Text;
|
|
5
|
-
//# sourceMappingURL=Text.d.ts.map
|
|
15
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.Text = void 0;
|
|
4
|
-
const react_native_1 = require(
|
|
5
|
-
const adapters_1 = require(
|
|
6
|
-
const tokens_1 = require(
|
|
7
|
-
const foundation_compose_1 = require(
|
|
8
|
-
const Text_settings_1 = require(
|
|
9
|
-
const Text_types_1 = require(
|
|
4
|
+
const react_native_1 = require('react-native');
|
|
5
|
+
const adapters_1 = require('@fluentui-react-native/adapters');
|
|
6
|
+
const tokens_1 = require('@fluentui-react-native/tokens');
|
|
7
|
+
const foundation_compose_1 = require('@uifabricshared/foundation-compose');
|
|
8
|
+
const Text_settings_1 = require('./Text.settings');
|
|
9
|
+
const Text_types_1 = require('./Text.types');
|
|
10
10
|
exports.Text = (0, foundation_compose_1.compose)({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
displayName: Text_types_1.textName,
|
|
12
|
+
settings: Text_settings_1.settings,
|
|
13
|
+
slots: {
|
|
14
|
+
root: { slotType: react_native_1.Text, filter: adapters_1.filterTextProps },
|
|
15
|
+
},
|
|
16
|
+
styles: {
|
|
17
|
+
root: [tokens_1.textTokens, tokens_1.foregroundColorTokens],
|
|
18
|
+
},
|
|
19
19
|
});
|
|
20
20
|
exports.default = exports.Text;
|
|
21
|
-
//# sourceMappingURL=Text.js.map
|
|
21
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/deprecated/Text.tsx"],"names":[],"mappings":";;;AAAA,+CAA8C;AAE9C,8DAAkE;AAClE,0DAAkF;AAClF,2EAA6D;AAE7D,mDAA2C;AAC3C,6CAAwC;AAG3B,QAAA,IAAI,GAAG,IAAA,4BAAO,EAAY;IACrC,WAAW,EAAE,qBAAQ;IACrB,QAAQ,EAAR,wBAAQ;IACR,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,mBAAM,EAAE,MAAM,EAAE,0BAAe,EAAE;KACpD;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,mBAAU,EAAE,8BAAqB,CAAC;KAC1C;CACF,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/deprecated/Text.tsx"],"names":[],"mappings":";;;AAAA,+CAA8C;AAE9C,8DAAkE;AAClE,0DAAkF;AAClF,2EAA6D;AAE7D,mDAA2C;AAC3C,6CAAwC;AAG3B,QAAA,IAAI,GAAG,IAAA,4BAAO,EAAY;IACrC,WAAW,EAAE,qBAAQ;IACrB,QAAQ,EAAR,wBAAQ;IACR,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,mBAAM,EAAE,MAAM,EAAE,0BAAe,EAAE;KACpD;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,mBAAU,EAAE,8BAAqB,CAAC;KAC1C;CACF,CAAC,CAAC;kBAEY,QAAA,IAAI"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { IComposeSettings } from '@uifabricshared/foundation-compose';
|
|
2
2
|
import type { ITextType } from './Text.types';
|
|
3
3
|
export declare const settings: IComposeSettings<ITextType>;
|
|
4
|
-
//# sourceMappingURL=Text.settings.d.ts.map
|
|
4
|
+
//# sourceMappingURL=Text.settings.d.ts.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.settings = void 0;
|
|
4
|
-
const Text_types_1 = require(
|
|
4
|
+
const Text_types_1 = require('./Text.types');
|
|
5
5
|
exports.settings = [
|
|
6
|
-
|
|
6
|
+
{
|
|
7
|
+
tokens: {
|
|
8
|
+
variant: 'secondaryStandard',
|
|
9
|
+
color: 'bodyText',
|
|
10
|
+
},
|
|
11
|
+
root: {
|
|
12
|
+
style: {
|
|
13
|
+
margin: 0,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
_overrides: {
|
|
17
|
+
disabled: {
|
|
7
18
|
tokens: {
|
|
8
|
-
|
|
9
|
-
color: 'bodyText',
|
|
10
|
-
},
|
|
11
|
-
root: {
|
|
12
|
-
style: {
|
|
13
|
-
margin: 0,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
_overrides: {
|
|
17
|
-
disabled: {
|
|
18
|
-
tokens: {
|
|
19
|
-
color: 'disabledText',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
19
|
+
color: 'disabledText',
|
|
22
20
|
},
|
|
23
|
-
|
|
21
|
+
},
|
|
24
22
|
},
|
|
25
|
-
|
|
23
|
+
_precedence: ['disabled'],
|
|
24
|
+
},
|
|
25
|
+
Text_types_1.textName,
|
|
26
26
|
];
|
|
27
|
-
//# sourceMappingURL=Text.settings.js.map
|
|
27
|
+
//# sourceMappingURL=Text.settings.js.map
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import type { ITextProps as INativeTextProps } from '@fluentui-react-native/adapters';
|
|
2
2
|
import type { FontTokens, FontVariantTokens, IForegroundColorTokens, IColorTokens } from '@fluentui-react-native/tokens';
|
|
3
|
-
export declare const textName =
|
|
3
|
+
export declare const textName = 'RNFText';
|
|
4
4
|
/**
|
|
5
5
|
* Properties for fabric native text field, these extend the default props for text
|
|
6
6
|
*/
|
|
7
|
-
export type ITextProps<TBase = INativeTextProps> = TBase &
|
|
7
|
+
export type ITextProps<TBase = INativeTextProps> = TBase &
|
|
8
|
+
FontVariantTokens &
|
|
9
|
+
IForegroundColorTokens & {
|
|
8
10
|
disabled?: boolean;
|
|
9
|
-
};
|
|
11
|
+
};
|
|
10
12
|
export type ITextType<TBase = INativeTextProps> = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
props: ITextProps<TBase>;
|
|
14
|
+
tokens: FontTokens & IColorTokens;
|
|
15
|
+
slotProps: {
|
|
16
|
+
root: TBase;
|
|
17
|
+
};
|
|
16
18
|
};
|
|
17
|
-
//# sourceMappingURL=Text.types.d.ts.map
|
|
19
|
+
//# sourceMappingURL=Text.types.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.textName = void 0;
|
|
4
4
|
exports.textName = 'RNFText';
|
|
5
|
-
//# sourceMappingURL=Text.types.js.map
|
|
5
|
+
//# sourceMappingURL=Text.types.js.map
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
export { Text as TextV1 } from './Text';
|
|
2
2
|
export type { TextProps, TextTokens } from './Text.types';
|
|
3
3
|
export { textName as textNameV1 } from './Text.types';
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
Caption1,
|
|
6
|
+
Caption1Strong,
|
|
7
|
+
Caption2,
|
|
8
|
+
Body1,
|
|
9
|
+
Body1Strong,
|
|
10
|
+
Body2,
|
|
11
|
+
Body2Strong,
|
|
12
|
+
Subtitle1,
|
|
13
|
+
Subtitle1Strong,
|
|
14
|
+
Subtitle2,
|
|
15
|
+
Subtitle2Strong,
|
|
16
|
+
Title1,
|
|
17
|
+
Title1Strong,
|
|
18
|
+
Title2,
|
|
19
|
+
Title3,
|
|
20
|
+
LargeTitle,
|
|
21
|
+
Display,
|
|
22
|
+
} from './Variants';
|
|
5
23
|
export { textName } from './deprecated/Text.types';
|
|
6
24
|
export type { ITextProps, ITextType } from './deprecated/Text.types';
|
|
7
25
|
export { Text } from './deprecated/Text';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|