@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.
Files changed (75) hide show
  1. package/CHANGELOG.md +54 -1
  2. package/SPEC.md +1 -1
  3. package/lib/Text.d.ts +6 -2
  4. package/lib/Text.d.ts.map +1 -1
  5. package/lib/Text.js +124 -91
  6. package/lib/Text.js.map +1 -1
  7. package/lib/Text.types.d.ts +9 -6
  8. package/lib/Text.types.js +1 -1
  9. package/lib/TextTokens.d.ts +2 -2
  10. package/lib/TextTokens.js +6 -3
  11. package/lib/Variants.android.d.ts +61 -13
  12. package/lib/Variants.android.d.ts.map +1 -1
  13. package/lib/Variants.android.js +13 -13
  14. package/lib/Variants.d.ts +86 -18
  15. package/lib/Variants.d.ts.map +1 -1
  16. package/lib/Variants.ios.d.ts +61 -13
  17. package/lib/Variants.ios.d.ts.map +1 -1
  18. package/lib/Variants.ios.js +13 -13
  19. package/lib/Variants.js +1 -1
  20. package/lib/Variants.win32.d.ts +66 -14
  21. package/lib/Variants.win32.d.ts.map +1 -1
  22. package/lib/Variants.win32.js +14 -14
  23. package/lib/Variants.windows.d.ts +66 -14
  24. package/lib/Variants.windows.d.ts.map +1 -1
  25. package/lib/Variants.windows.js +14 -14
  26. package/lib/__tests__/Text.test.d.ts +1 -1
  27. package/lib/__tests__/Text.test.js +36 -23
  28. package/lib/__tests__/Text.test.js.map +1 -1
  29. package/lib/deprecated/Text.d.ts +14 -4
  30. package/lib/deprecated/Text.js +9 -9
  31. package/lib/deprecated/Text.settings.d.ts +1 -1
  32. package/lib/deprecated/Text.settings.js +18 -18
  33. package/lib/deprecated/Text.types.d.ts +11 -9
  34. package/lib/deprecated/Text.types.js +1 -1
  35. package/lib/index.d.ts +20 -2
  36. package/lib/index.js +20 -2
  37. package/lib-commonjs/Text.d.ts +6 -2
  38. package/lib-commonjs/Text.d.ts.map +1 -1
  39. package/lib-commonjs/Text.js +142 -102
  40. package/lib-commonjs/Text.js.map +1 -1
  41. package/lib-commonjs/Text.types.d.ts +9 -6
  42. package/lib-commonjs/Text.types.js +3 -3
  43. package/lib-commonjs/TextTokens.d.ts +2 -2
  44. package/lib-commonjs/TextTokens.js +10 -7
  45. package/lib-commonjs/Variants.android.d.ts +61 -13
  46. package/lib-commonjs/Variants.android.d.ts.map +1 -1
  47. package/lib-commonjs/Variants.android.js +34 -17
  48. package/lib-commonjs/Variants.d.ts +86 -18
  49. package/lib-commonjs/Variants.d.ts.map +1 -1
  50. package/lib-commonjs/Variants.ios.d.ts +61 -13
  51. package/lib-commonjs/Variants.ios.d.ts.map +1 -1
  52. package/lib-commonjs/Variants.ios.js +34 -17
  53. package/lib-commonjs/Variants.js +22 -5
  54. package/lib-commonjs/Variants.win32.d.ts +66 -14
  55. package/lib-commonjs/Variants.win32.d.ts.map +1 -1
  56. package/lib-commonjs/Variants.win32.js +35 -18
  57. package/lib-commonjs/Variants.windows.d.ts +66 -14
  58. package/lib-commonjs/Variants.windows.d.ts.map +1 -1
  59. package/lib-commonjs/Variants.windows.js +35 -18
  60. package/lib-commonjs/__tests__/Text.test.d.ts +1 -1
  61. package/lib-commonjs/__tests__/Text.test.js +92 -50
  62. package/lib-commonjs/__tests__/Text.test.js.map +1 -1
  63. package/lib-commonjs/deprecated/Text.d.ts +14 -4
  64. package/lib-commonjs/deprecated/Text.js +17 -17
  65. package/lib-commonjs/deprecated/Text.js.map +1 -1
  66. package/lib-commonjs/deprecated/Text.settings.d.ts +1 -1
  67. package/lib-commonjs/deprecated/Text.settings.js +21 -21
  68. package/lib-commonjs/deprecated/Text.types.d.ts +11 -9
  69. package/lib-commonjs/deprecated/Text.types.js +3 -3
  70. package/lib-commonjs/index.d.ts +20 -2
  71. package/lib-commonjs/index.js +156 -30
  72. package/lib-commonjs/index.js.map +1 -1
  73. package/package.json +63 -62
  74. package/src/Text.tsx +8 -9
  75. package/src/__tests__/Text.test.tsx +25 -13
@@ -1,48 +1,65 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Display = exports.LargeTitle = exports.Title3 = exports.Title2 = exports.Title1Strong = exports.Title1 = exports.Subtitle2Strong = exports.Subtitle2 = exports.Subtitle1Strong = exports.Subtitle1 = exports.Body2Strong = exports.Body2 = exports.Body1Strong = exports.Body1 = exports.Caption2 = exports.Caption1Strong = exports.Caption1 = void 0;
4
- const Text_1 = require("./Text");
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
- variant: 'caption1',
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
- variant: 'body1',
28
+ variant: 'body1',
12
29
  });
13
30
  exports.Body1Strong = Text_1.Text.customize({
14
- variant: 'body1Strong',
31
+ variant: 'body1Strong',
15
32
  });
16
33
  exports.Body2 = Text_1.Text.customize({
17
- variant: 'body2',
34
+ variant: 'body2',
18
35
  });
19
36
  exports.Body2Strong = Text_1.Text.customize({
20
- variant: 'body2Strong',
37
+ variant: 'body2Strong',
21
38
  });
22
39
  exports.Subtitle1 = Text_1.Text.customize({
23
- variant: 'subtitle1',
40
+ variant: 'subtitle1',
24
41
  });
25
42
  exports.Subtitle1Strong = Text_1.Text.customize({
26
- variant: 'subtitle1Strong',
43
+ variant: 'subtitle1Strong',
27
44
  });
28
45
  exports.Subtitle2 = Text_1.Text.customize({
29
- variant: 'subtitle2',
46
+ variant: 'subtitle2',
30
47
  });
31
48
  exports.Subtitle2Strong = Text_1.Text.customize({
32
- variant: 'subtitle2Strong',
49
+ variant: 'subtitle2Strong',
33
50
  });
34
51
  exports.Title1 = Text_1.Text.customize({
35
- variant: 'title1',
52
+ variant: 'title1',
36
53
  });
37
54
  exports.Title1Strong = Text_1.Text.customize({
38
- variant: 'title1Strong',
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
- variant: 'largeTitle',
60
+ variant: 'largeTitle',
44
61
  });
45
62
  exports.Display = Text_1.Text.customize({
46
- variant: 'display',
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("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
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("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
5
- export declare const Body1Strong: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
6
- export declare const Body2: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
7
- export declare const Body2Strong: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
8
- export declare const Subtitle1: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
9
- export declare const Subtitle1Strong: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
10
- export declare const Subtitle2: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
11
- export declare const Subtitle2Strong: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
12
- export declare const Title1: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
13
- export declare const Title1Strong: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
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("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
17
- export declare const Display: import("@fluentui-react-native/use-tokens").CustomizableComponent<import("./Text.types").TextProps<import("@fluentui-react-native/adapters").ITextProps>, import("./Text.types").TextTokens, import("@fluentui-react-native/theme-types").Theme>;
18
- //# sourceMappingURL=Variants.windows.d.ts.map
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,kPAEnB,CAAC;AACH,eAAO,MAAM,cAAc,KAAO,CAAC;AACnC,eAAO,MAAM,QAAQ,KAAO,CAAC;AAC7B,eAAO,MAAM,KAAK,kPAEhB,CAAC;AACH,eAAO,MAAM,WAAW,kPAEtB,CAAC;AACH,eAAO,MAAM,KAAK,kPAEhB,CAAC;AACH,eAAO,MAAM,WAAW,kPAEtB,CAAC;AACH,eAAO,MAAM,SAAS,kPAEpB,CAAC;AACH,eAAO,MAAM,eAAe,kPAE1B,CAAC;AACH,eAAO,MAAM,SAAS,kPAEpB,CAAC;AACH,eAAO,MAAM,eAAe,kPAE1B,CAAC;AACH,eAAO,MAAM,MAAM,kPAEjB,CAAC;AACH,eAAO,MAAM,YAAY,kPAEvB,CAAC;AACH,eAAO,MAAM,MAAM,KAAO,CAAC;AAC3B,eAAO,MAAM,MAAM,KAAO,CAAC;AAC3B,eAAO,MAAM,UAAU,kPAErB,CAAC;AACH,eAAO,MAAM,OAAO,kPAElB,CAAC"}
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Display = exports.LargeTitle = exports.Title3 = exports.Title2 = exports.Title1Strong = exports.Title1 = exports.Subtitle2Strong = exports.Subtitle2 = exports.Subtitle1Strong = exports.Subtitle1 = exports.Body2Strong = exports.Body2 = exports.Body1Strong = exports.Body1 = exports.Caption2 = exports.Caption1Strong = exports.Caption1 = void 0;
4
- const Text_1 = require("./Text");
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
- variant: 'caption1',
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
- variant: 'body1',
28
+ variant: 'body1',
12
29
  });
13
30
  exports.Body1Strong = Text_1.Text.customize({
14
- variant: 'body1Strong',
31
+ variant: 'body1Strong',
15
32
  });
16
33
  exports.Body2 = Text_1.Text.customize({
17
- variant: 'body2',
34
+ variant: 'body2',
18
35
  });
19
36
  exports.Body2Strong = Text_1.Text.customize({
20
- variant: 'body2Strong',
37
+ variant: 'body2Strong',
21
38
  });
22
39
  exports.Subtitle1 = Text_1.Text.customize({
23
- variant: 'subtitle1',
40
+ variant: 'subtitle1',
24
41
  });
25
42
  exports.Subtitle1Strong = Text_1.Text.customize({
26
- variant: 'subtitle1Strong',
43
+ variant: 'subtitle1Strong',
27
44
  });
28
45
  exports.Subtitle2 = Text_1.Text.customize({
29
- variant: 'subtitle2',
46
+ variant: 'subtitle2',
30
47
  });
31
48
  exports.Subtitle2Strong = Text_1.Text.customize({
32
- variant: 'subtitle2Strong',
49
+ variant: 'subtitle2Strong',
33
50
  });
34
51
  exports.Title1 = Text_1.Text.customize({
35
- variant: 'title1',
52
+ variant: 'title1',
36
53
  });
37
54
  exports.Title1Strong = Text_1.Text.customize({
38
- variant: 'title1Strong',
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
- variant: 'largeTitle',
60
+ variant: 'largeTitle',
44
61
  });
45
62
  exports.Display = Text_1.Text.customize({
46
- variant: 'display',
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
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- const React = __importStar(require("react"));
27
- const renderer = __importStar(require("react-test-renderer"));
28
- const Text_1 = require("../Text");
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
- it('Text default', () => {
31
- const tree = renderer.create(React.createElement(Text_1.Text, null, "Text default")).toJSON();
32
- expect(tree).toMatchSnapshot();
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
- it('Text all props', () => {
35
- const tree = renderer.create(React.createElement(Text_1.Text, { variant: "bodyStandard" }, "All props")).toJSON();
36
- expect(tree).toMatchSnapshot();
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
- it('Text all tokens', () => {
39
- const BoldText = Text_1.Text.customize({
40
- fontFamily: 'Wingdings',
41
- fontWeight: '900',
42
- fontSize: 20,
43
- });
44
- const tree = renderer.create(React.createElement(BoldText, null, "All tokens")).toJSON();
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
- it('Text variants render correctly with style', () => {
48
- const style = {
49
- marginBottom: 8,
50
- marginTop: 4,
51
- };
52
- const tree = renderer.create(React.createElement(Text_1.Text, { variant: "heroLargeSemibold", color: "blue", style: style }, "Header Text"));
53
- expect(tree).toMatchSnapshot();
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":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,8DAAgD;AAEhD,kCAA+B;AAE/B,QAAQ,CAAC,sB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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("@uifabricshared/foundation-compose").IComposeReturnType<import("./Text.types").ITextProps<import("@fluentui-react-native/adapters").ITextProps>, {
2
- root: import("@fluentui-react-native/adapters").ITextProps;
3
- }, import("@fluentui-react-native/tokens").FontStyleTokens & import("@fluentui-react-native/tokens").FontVariantTokens & import("@fluentui-react-native/tokens").FontDecorationTokens & import("@fluentui-react-native/tokens").IForegroundColorTokens & import("@fluentui-react-native/tokens").IBackgroundColorTokens, object, object>;
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.Text = void 0;
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");
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
- 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
- },
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;AAEH,kBAAe,YAAI,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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.settings = void 0;
4
- const Text_types_1 = require("./Text.types");
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
- variant: 'secondaryStandard',
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
- _precedence: ['disabled'],
21
+ },
24
22
  },
25
- Text_types_1.textName,
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 = "RNFText";
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 & FontVariantTokens & IForegroundColorTokens & {
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
- props: ITextProps<TBase>;
12
- tokens: FontTokens & IColorTokens;
13
- slotProps: {
14
- root: TBase;
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
@@ -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 { Caption1, Caption1Strong, Caption2, Body1, Body1Strong, Body2, Body2Strong, Subtitle1, Subtitle1Strong, Subtitle2, Subtitle2Strong, Title1, Title1Strong, Title2, Title3, LargeTitle, Display, } from './Variants';
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