@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/text
|
|
2
2
|
|
|
3
|
+
## 0.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d7adbdd: # Migration from Beachball to Changesets
|
|
8
|
+
|
|
9
|
+
This changeset represents the migration from Beachball to Changesets for version management and consolidates all changes from 440+ beachball change files that were in the `change/` directory.
|
|
10
|
+
|
|
11
|
+
All 75 affected packages receive a minor version bump to acknowledge the accumulated changes from the beachball era.
|
|
12
|
+
|
|
13
|
+
## What Changed
|
|
14
|
+
|
|
15
|
+
Going forward, all version management uses Changesets via `yarn changeset`. The following beachball infrastructure has been removed:
|
|
16
|
+
|
|
17
|
+
- ❌ 440+ beachball change files from `change/` directory
|
|
18
|
+
- ❌ `beachball` package dependency
|
|
19
|
+
- ❌ Beachball scripts from `package.json`
|
|
20
|
+
- ❌ `beachball.config.js` configuration file
|
|
21
|
+
- ❌ Beachball publish steps from Azure Pipelines
|
|
22
|
+
|
|
23
|
+
## New Workflow
|
|
24
|
+
|
|
25
|
+
✅ **Create changes**: Run `yarn changeset` to document changes
|
|
26
|
+
✅ **Version bump PRs**: Automatically created by GitHub Actions
|
|
27
|
+
✅ **Publishing**: Handled by Azure Pipelines using `changeset publish`
|
|
28
|
+
✅ **Validation**: CI validates changesets and blocks major version bumps
|
|
29
|
+
|
|
30
|
+
For details, see `CHANGESETS_SETUP.md` and `CONTRIBUTING.md`.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- d1d8c26: We were pinning @types/react and react-native-macos via resolutions. This fixes that which uncovered a bunch of type inconsistencies that needed to be addressed.
|
|
35
|
+
- Updated dependencies [d7adbdd]
|
|
36
|
+
- Updated dependencies [d1d8c26]
|
|
37
|
+
- Updated dependencies [d1d8c26]
|
|
38
|
+
- @fluentui-react-native/adapters@0.14.0
|
|
39
|
+
- @fluentui-react-native/framework@0.15.0
|
|
40
|
+
- @fluentui-react-native/interactive-hooks@0.28.0
|
|
41
|
+
- @fluentui-react-native/theme-tokens@0.28.0
|
|
42
|
+
- @fluentui-react-native/tokens@0.24.0
|
|
43
|
+
- @uifabricshared/foundation-compose@1.16.0
|
|
44
|
+
|
|
3
45
|
<!-- This log was last generated on Tue, 05 Aug 2025 18:50:41 GMT and should not be manually modified. -->
|
|
4
46
|
|
|
5
47
|
<!-- Start content -->
|
|
@@ -1298,7 +1340,7 @@ Thu, 16 Dec 2021 19:10:25 GMT
|
|
|
1298
1340
|
|
|
1299
1341
|
### Patches
|
|
1300
1342
|
|
|
1301
|
-
- Rename Jest snapshots to be platform agnostic
|
|
1343
|
+
- Rename Jest snapshots to be platform agnostic (sanajmi@microsoft.com)
|
|
1302
1344
|
- Bump @uifabricshared/foundation-compose to v1.11.1
|
|
1303
1345
|
- Bump @fluentui-react-native/adapters to v0.8.1
|
|
1304
1346
|
- Bump @fluentui-react-native/tokens to v0.11.1
|
|
@@ -1787,36 +1829,47 @@ Thu, 16 Apr 2020 23:57:38 GMT
|
|
|
1787
1829
|
- publish with correct main/module references (jasonmo@microsoft.com)
|
|
1788
1830
|
|
|
1789
1831
|
## 0.3.0
|
|
1832
|
+
|
|
1790
1833
|
Mon, 13 Apr 2020 22:48:23 GMT
|
|
1791
1834
|
|
|
1792
1835
|
### Minor changes
|
|
1793
1836
|
|
|
1794
1837
|
- Add variants and fluent typeramp to text (krsiler@microsoft.com)
|
|
1838
|
+
|
|
1795
1839
|
## 0.2.10
|
|
1840
|
+
|
|
1796
1841
|
Thu, 09 Apr 2020 18:39:15 GMT
|
|
1797
1842
|
|
|
1798
1843
|
### Patches
|
|
1799
1844
|
|
|
1800
1845
|
- merge conflicts (ppatboyd@outlook.com)
|
|
1846
|
+
|
|
1801
1847
|
## 0.2.8
|
|
1848
|
+
|
|
1802
1849
|
Fri, 03 Apr 2020 20:40:51 GMT
|
|
1803
1850
|
|
|
1804
1851
|
### Patches
|
|
1805
1852
|
|
|
1806
1853
|
- switch the bin name from just-script to fluent-scripts to disambiguate names (jasonmo@microsoft.com)
|
|
1854
|
+
|
|
1807
1855
|
## 0.2.7
|
|
1856
|
+
|
|
1808
1857
|
Tue, 31 Mar 2020 18:01:09 GMT
|
|
1809
1858
|
|
|
1810
1859
|
### Patches
|
|
1811
1860
|
|
|
1812
1861
|
- Merge branch 'sammy/checkboxV1' of https://github.com/samuelfreiberg/fluentui-react-native into sammy/checkboxV1 (safreibe@microsoft.com)
|
|
1862
|
+
|
|
1813
1863
|
## 0.2.6
|
|
1864
|
+
|
|
1814
1865
|
Mon, 30 Mar 2020 16:27:00 GMT
|
|
1815
1866
|
|
|
1816
1867
|
### Patches
|
|
1817
1868
|
|
|
1818
1869
|
- Update main attribute to specify TypeScript index file. (kinhln@microsoft.com)
|
|
1870
|
+
|
|
1819
1871
|
## 0.2.0
|
|
1872
|
+
|
|
1820
1873
|
Mon, 16 Mar 2020 23:03:24 GMT
|
|
1821
1874
|
|
|
1822
1875
|
### Minor changes
|
package/SPEC.md
CHANGED
|
@@ -24,7 +24,7 @@ Basic example:
|
|
|
24
24
|
<Text>Hello World</Text>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
More examples on the [Test pages for Text](../../../apps/
|
|
27
|
+
More examples on the [Test pages for Text](../../../apps/tester-core/src/TestComponents/TextV1). Instructions on running the tester app can be found [here](../../../apps/fluent-tester/README.md).
|
|
28
28
|
|
|
29
29
|
## Visual Examples
|
|
30
30
|
|
package/lib/Text.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { TextProps, TextTokens } from './Text.types';
|
|
2
|
-
export declare const Text: import(
|
|
2
|
+
export declare const Text: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
3
|
+
TextProps,
|
|
4
|
+
TextTokens,
|
|
5
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
6
|
+
>;
|
|
3
7
|
export default Text;
|
|
4
|
-
//# sourceMappingURL=Text.d.ts.map
|
|
8
|
+
//# sourceMappingURL=Text.d.ts.map
|
package/lib/Text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1D,eAAO,MAAM,IAAI,8IA2IA,CAAC;AAGlB,eAAe,IAAI,CAAC"}
|
package/lib/Text.js
CHANGED
|
@@ -1,104 +1,137 @@
|
|
|
1
|
-
|
|
2
|
-
/** @
|
|
1
|
+
import { jsx as _jsx } from '@fluentui-react-native/framework-base/jsx-runtime';
|
|
2
|
+
/** @jsxImportSource @fluentui-react-native/framework-base */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { I18nManager, Platform, Text as RNText } from 'react-native';
|
|
5
|
-
import { fontStyles,
|
|
5
|
+
import { fontStyles, useFluentTheme, mergeStyles, compressible, patchTokens } from '@fluentui-react-native/framework';
|
|
6
6
|
import { useKeyProps } from '@fluentui-react-native/interactive-hooks';
|
|
7
7
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
8
8
|
import { textName } from './Text.types';
|
|
9
9
|
import { useTextTokens } from './TextTokens';
|
|
10
10
|
const emptyProps = {};
|
|
11
11
|
export const Text = compressible((props, useTokens) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
12
|
+
if (props === undefined) {
|
|
13
|
+
props = emptyProps;
|
|
14
|
+
}
|
|
15
|
+
// split out color and variant from props
|
|
16
|
+
const {
|
|
17
|
+
align = undefined,
|
|
18
|
+
block,
|
|
19
|
+
color,
|
|
20
|
+
componentRef,
|
|
21
|
+
font,
|
|
22
|
+
italic,
|
|
23
|
+
numberOfLines,
|
|
24
|
+
onAccessibilityTap,
|
|
25
|
+
onKeyUp,
|
|
26
|
+
onKeyDown,
|
|
27
|
+
keyUpEvents,
|
|
28
|
+
keyDownEvents,
|
|
29
|
+
onPress,
|
|
30
|
+
size,
|
|
31
|
+
strikethrough,
|
|
32
|
+
style,
|
|
33
|
+
truncate = false,
|
|
34
|
+
underline,
|
|
35
|
+
variant,
|
|
36
|
+
weight,
|
|
37
|
+
wrap = true,
|
|
38
|
+
...rest
|
|
39
|
+
} = props;
|
|
40
|
+
const theme = useFluentTheme();
|
|
41
|
+
// get the tokens from the theme
|
|
42
|
+
let [tokens, cache] = useTokens(theme);
|
|
43
|
+
const textAlign = I18nManager.isRTL
|
|
44
|
+
? align === 'start'
|
|
45
|
+
? 'right'
|
|
46
|
+
: align === 'end'
|
|
47
|
+
? 'left'
|
|
48
|
+
: align
|
|
49
|
+
: align === 'start'
|
|
50
|
+
? 'left'
|
|
51
|
+
: align === 'end'
|
|
52
|
+
? 'right'
|
|
53
|
+
: align;
|
|
54
|
+
const textOnPress = React.useCallback(
|
|
55
|
+
(e) => {
|
|
56
|
+
if (onPress) {
|
|
57
|
+
onPress(e);
|
|
58
|
+
}
|
|
59
|
+
e.stopPropagation();
|
|
60
|
+
},
|
|
61
|
+
[onPress],
|
|
62
|
+
);
|
|
63
|
+
const keyProps = useKeyProps(textOnPress, ' ', 'Enter');
|
|
64
|
+
const onAccTap = React.useCallback(
|
|
65
|
+
(event) => {
|
|
66
|
+
onAccessibilityTap ? onAccessibilityTap() : onPress(event);
|
|
67
|
+
},
|
|
68
|
+
[onPress, onAccessibilityTap],
|
|
69
|
+
);
|
|
70
|
+
// override tokens from props
|
|
71
|
+
[tokens, cache] = patchTokens(tokens, cache, {
|
|
72
|
+
color,
|
|
73
|
+
variant,
|
|
74
|
+
fontFamily: font == 'base' ? 'primary' : font,
|
|
75
|
+
fontMaximumSize: tokens.maximumFontSize,
|
|
76
|
+
fontSize: globalTokens.font['size' + size],
|
|
77
|
+
fontWeight: globalTokens.font.weight[weight],
|
|
78
|
+
// leave it undefined for tokens to be set by user
|
|
79
|
+
fontStyle: italic ? 'italic' : undefined,
|
|
80
|
+
textAlign: textAlign,
|
|
81
|
+
textDecorationLine:
|
|
82
|
+
underline && strikethrough ? 'underline line-through' : underline ? 'underline' : strikethrough ? 'line-through' : undefined,
|
|
83
|
+
});
|
|
84
|
+
// now build the text style from tokens that can be shared between different Text instances
|
|
85
|
+
const [tokenStyle] = cache(
|
|
86
|
+
() => ({
|
|
87
|
+
margin: 0,
|
|
88
|
+
color: tokens.color,
|
|
89
|
+
fontStyle: tokens.fontStyle,
|
|
90
|
+
textAlign: tokens.textAlign,
|
|
91
|
+
textDecorationLine: tokens.textDecorationLine,
|
|
92
|
+
...fontStyles.from(tokens, theme),
|
|
93
|
+
}),
|
|
94
|
+
['color', 'fontStyle', 'textAlign', 'textDecorationLine', ...fontStyles.keys],
|
|
95
|
+
);
|
|
96
|
+
// Safety measure: Dynamic Type is an iOS-specific thing
|
|
97
|
+
const dynamicTypeVariant = Platform.OS === 'ios' ? tokenStyle.dynamicTypeRamp : undefined;
|
|
98
|
+
let maxFontSizeScaleAdjustment = emptyProps;
|
|
99
|
+
// tokenStyle.fontSize can also be a string (e.g., "14px").
|
|
100
|
+
// Therefore, we only support scaling for number-based size values in order to avoid any messy calculations.
|
|
101
|
+
if (dynamicTypeVariant !== undefined && typeof tokenStyle.fontSize === 'number' && tokenStyle.maximumFontSize !== undefined) {
|
|
102
|
+
maxFontSizeScaleAdjustment = {
|
|
103
|
+
maxFontSizeMultiplier: tokenStyle.maximumFontSize / tokenStyle.fontSize,
|
|
82
104
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
}
|
|
106
|
+
const isWin32Platform = Platform.OS === 'win32';
|
|
107
|
+
const filteredProps = {
|
|
108
|
+
onKeyUp: isWin32Platform ? onKeyUp : undefined,
|
|
109
|
+
keyUpEvents: isWin32Platform ? keyUpEvents : undefined,
|
|
110
|
+
validKeysUp: undefined,
|
|
111
|
+
onKeyDown: isWin32Platform ? onKeyDown : undefined,
|
|
112
|
+
keyDownEvents: isWin32Platform ? keyDownEvents : undefined,
|
|
113
|
+
validKeysDown: undefined,
|
|
114
|
+
onAccessibilityTap: isWin32Platform ? onAccTap : undefined,
|
|
115
|
+
};
|
|
116
|
+
// return a continuation function that allows this text to be compressed
|
|
117
|
+
return (extra, children) => {
|
|
118
|
+
const mergedProps = {
|
|
119
|
+
...rest,
|
|
120
|
+
...keyProps,
|
|
121
|
+
...filteredProps,
|
|
122
|
+
...extra,
|
|
123
|
+
...maxFontSizeScaleAdjustment,
|
|
124
|
+
onPress,
|
|
125
|
+
numberOfLines: numberOfLines ?? (truncate || !wrap ? 1 : 0),
|
|
126
|
+
style: mergeStyles(tokenStyle, props.style, extra?.style),
|
|
100
127
|
};
|
|
128
|
+
// RN TextStyle doesn't recognize these properties.
|
|
129
|
+
// Don't let them leak through or RN will complain about invalid props.
|
|
130
|
+
delete mergedProps.style.dynamicTypeRamp;
|
|
131
|
+
delete mergedProps.style.maximumFontSize;
|
|
132
|
+
return _jsx(RNText, { ref: componentRef, ellipsizeMode: !wrap && !truncate ? 'clip' : 'tail', ...mergedProps, children: children });
|
|
133
|
+
};
|
|
101
134
|
}, useTextTokens);
|
|
102
135
|
Text.displayName = textName;
|
|
103
136
|
export default Text;
|
|
104
|
-
//# sourceMappingURL=Text.js.map
|
|
137
|
+
//# sourceMappingURL=Text.js.map
|
package/lib/Text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAGnE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAwB,CAAC,KAAgB,EAAE,SAAgC,EAAE,EAAE,CAAC;IAC9G,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,KAAK,GAAG,UAAU,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CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,KAAK,EAAE,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;SAC1D,CAAC;QAEF,mDAAmD;QACnD,uEAAuE;QACvE,OAAQ,WAAW,CAAC,KAAoB,CAAC,eAAe,CAAC;QACzD,OAAQ,WAAW,CAAC,KAAoB,CAAC,eAAe,CAAC;QAEzD,OAAO,CACL,KAAC,MAAM,IAAC,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,KAAM,WAAW,YAC5F,QAAQ,GACF,CACV,CAAC;IAAA,CACH,CAAC;AAAA,CACH,EAAE,aAAa,CAAC,CAAC;AAClB,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE5B,eAAe,IAAI,CAAC"}
|
package/lib/Text.types.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { ColorValue, Text, TextStyle } from 'react-native';
|
|
2
2
|
import type { ITextProps } from '@fluentui-react-native/adapters';
|
|
3
3
|
import type { FontTokens, FontVariantTokens, IForegroundColorTokens } from '@fluentui-react-native/framework';
|
|
4
|
-
export declare const textName =
|
|
4
|
+
export declare const textName = 'Text';
|
|
5
5
|
/**
|
|
6
6
|
* Text tokens, these are the internally configurable values for Text elements. In particular these
|
|
7
7
|
* drive decisions on how to build the styles
|
|
8
8
|
*/
|
|
9
|
-
export type TextTokens = Omit<FontTokens, 'fontFamily'> &
|
|
9
|
+
export type TextTokens = Omit<FontTokens, 'fontFamily'> &
|
|
10
|
+
IForegroundColorTokens &
|
|
11
|
+
Omit<TextStyle, 'fontSize' | 'fontWeight' | 'color'> & {
|
|
10
12
|
/**
|
|
11
13
|
* (iOS only) The Dynamic Type ramp that a Text element should follow as the user changes their
|
|
12
14
|
* preferred content size.
|
|
@@ -17,7 +19,7 @@ export type TextTokens = Omit<FontTokens, 'fontFamily'> & IForegroundColorTokens
|
|
|
17
19
|
* preferred content size.
|
|
18
20
|
*/
|
|
19
21
|
maximumFontSize?: number;
|
|
20
|
-
};
|
|
22
|
+
};
|
|
21
23
|
export type TextAlign = 'start' | 'center' | 'end' | 'justify';
|
|
22
24
|
export type TextFont = 'base' | 'monospace' | 'numeric';
|
|
23
25
|
export type TextSize = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;
|
|
@@ -25,7 +27,8 @@ export type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
|
25
27
|
/**
|
|
26
28
|
* Text props, based off of the standard react-native TextProps with some new extensions
|
|
27
29
|
*/
|
|
28
|
-
export type TextProps<TBase = ITextProps> = TBase &
|
|
30
|
+
export type TextProps<TBase = ITextProps> = TBase &
|
|
31
|
+
FontVariantTokens & {
|
|
29
32
|
/**
|
|
30
33
|
* foreground text color
|
|
31
34
|
*/
|
|
@@ -94,5 +97,5 @@ export type TextProps<TBase = ITextProps> = TBase & FontVariantTokens & {
|
|
|
94
97
|
* @defaultValue true
|
|
95
98
|
*/
|
|
96
99
|
wrap?: boolean;
|
|
97
|
-
};
|
|
98
|
-
//# sourceMappingURL=Text.types.d.ts.map
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=Text.types.d.ts.map
|
package/lib/Text.types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const textName = 'Text';
|
|
2
|
-
//# sourceMappingURL=Text.types.js.map
|
|
2
|
+
//# sourceMappingURL=Text.types.js.map
|
package/lib/TextTokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TextTokens } from './Text.types';
|
|
2
|
-
export declare const useTextTokens: import(
|
|
3
|
-
//# sourceMappingURL=TextTokens.d.ts.map
|
|
2
|
+
export declare const useTextTokens: import('@fluentui-react-native/framework').UseTokens<TextTokens>;
|
|
3
|
+
//# sourceMappingURL=TextTokens.d.ts.map
|
package/lib/TextTokens.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { buildUseTokens } from '@fluentui-react-native/framework';
|
|
2
2
|
import { textName } from './Text.types';
|
|
3
|
-
export const useTextTokens = buildUseTokens(
|
|
3
|
+
export const useTextTokens = buildUseTokens(
|
|
4
|
+
(t) => ({
|
|
4
5
|
variant: 'secondaryStandard',
|
|
5
6
|
color: t.colors.bodyText,
|
|
6
|
-
}),
|
|
7
|
-
|
|
7
|
+
}),
|
|
8
|
+
textName,
|
|
9
|
+
);
|
|
10
|
+
//# sourceMappingURL=TextTokens.js.map
|
|
@@ -1,18 +1,66 @@
|
|
|
1
|
-
export declare const Caption1: import(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
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
|
+
>;
|
|
6
|
+
export declare const Caption1Strong: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
7
|
+
import('./Text.types').TextProps,
|
|
8
|
+
import('./Text.types').TextTokens,
|
|
9
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
10
|
+
>;
|
|
11
|
+
export declare const Caption2: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
12
|
+
import('./Text.types').TextProps,
|
|
13
|
+
import('./Text.types').TextTokens,
|
|
14
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
15
|
+
>;
|
|
16
|
+
export declare const Body1: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
17
|
+
import('./Text.types').TextProps,
|
|
18
|
+
import('./Text.types').TextTokens,
|
|
19
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
20
|
+
>;
|
|
21
|
+
export declare const Body1Strong: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
22
|
+
import('./Text.types').TextProps,
|
|
23
|
+
import('./Text.types').TextTokens,
|
|
24
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
25
|
+
>;
|
|
26
|
+
export declare const Body2: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
27
|
+
import('./Text.types').TextProps,
|
|
28
|
+
import('./Text.types').TextTokens,
|
|
29
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
30
|
+
>;
|
|
31
|
+
export declare const Body2Strong: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
32
|
+
import('./Text.types').TextProps,
|
|
33
|
+
import('./Text.types').TextTokens,
|
|
34
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
35
|
+
>;
|
|
8
36
|
export declare const Subtitle1: any;
|
|
9
37
|
export declare const Subtitle1Strong: any;
|
|
10
38
|
export declare const Subtitle2: any;
|
|
11
39
|
export declare const Subtitle2Strong: any;
|
|
12
|
-
export declare const Title1: import(
|
|
40
|
+
export declare const Title1: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
41
|
+
import('./Text.types').TextProps,
|
|
42
|
+
import('./Text.types').TextTokens,
|
|
43
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
44
|
+
>;
|
|
13
45
|
export declare const Title1Strong: any;
|
|
14
|
-
export declare const Title2: import(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
46
|
+
export declare const Title2: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
47
|
+
import('./Text.types').TextProps,
|
|
48
|
+
import('./Text.types').TextTokens,
|
|
49
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
50
|
+
>;
|
|
51
|
+
export declare const Title3: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
52
|
+
import('./Text.types').TextProps,
|
|
53
|
+
import('./Text.types').TextTokens,
|
|
54
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
55
|
+
>;
|
|
56
|
+
export declare const LargeTitle: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
57
|
+
import('./Text.types').TextProps,
|
|
58
|
+
import('./Text.types').TextTokens,
|
|
59
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
60
|
+
>;
|
|
61
|
+
export declare const Display: import('@fluentui-react-native/use-tokens').CustomizableComponent<
|
|
62
|
+
import('./Text.types').TextProps,
|
|
63
|
+
import('./Text.types').TextTokens,
|
|
64
|
+
import('@fluentui-react-native/theme-types').Theme
|
|
65
|
+
>;
|
|
66
|
+
//# sourceMappingURL=Variants.android.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Variants.android.d.ts","sourceRoot":"","sources":["../src/Variants.android.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Variants.android.d.ts","sourceRoot":"","sources":["../src/Variants.android.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,4LAEZ,CAAC;AACV,eAAO,MAAM,cAAc,4LAElB,CAAC;AACV,eAAO,MAAM,QAAQ,4LAEZ,CAAC;AACV,eAAO,MAAM,KAAK,4LAET,CAAC;AACV,eAAO,MAAM,WAAW,4LAEf,CAAC;AACV,eAAO,MAAM,KAAK,4LAET,CAAC;AACV,eAAO,MAAM,WAAW,4LAEf,CAAC;AAEV,eAAO,MAAM,SAAS,KAAO,CAAC;AAC9B,eAAO,MAAM,eAAe,KAAO,CAAC;AACpC,eAAO,MAAM,SAAS,KAAO,CAAC;AAC9B,eAAO,MAAM,eAAe,KAAO,CAAC;AAEpC,eAAO,MAAM,MAAM,4LAEV,CAAC;AAEV,eAAO,MAAM,YAAY,KAAO,CAAC;AAEjC,eAAO,MAAM,MAAM,4LAEV,CAAC;AACV,eAAO,MAAM,MAAM,4LAEV,CAAC;AACV,eAAO,MAAM,UAAU,4LAEd,CAAC;AACV,eAAO,MAAM,OAAO,4LAEX,CAAC"}
|
package/lib/Variants.android.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { Text } from './Text';
|
|
2
2
|
export const Caption1 = Text.customize({
|
|
3
|
-
|
|
3
|
+
variant: 'caption1',
|
|
4
4
|
});
|
|
5
5
|
export const Caption1Strong = Text.customize({
|
|
6
|
-
|
|
6
|
+
variant: 'caption1Strong',
|
|
7
7
|
});
|
|
8
8
|
export const Caption2 = Text.customize({
|
|
9
|
-
|
|
9
|
+
variant: 'caption2',
|
|
10
10
|
});
|
|
11
11
|
export const Body1 = Text.customize({
|
|
12
|
-
|
|
12
|
+
variant: 'body1',
|
|
13
13
|
});
|
|
14
14
|
export const Body1Strong = Text.customize({
|
|
15
|
-
|
|
15
|
+
variant: 'body1Strong',
|
|
16
16
|
});
|
|
17
17
|
export const Body2 = Text.customize({
|
|
18
|
-
|
|
18
|
+
variant: 'body2',
|
|
19
19
|
});
|
|
20
20
|
export const Body2Strong = Text.customize({
|
|
21
|
-
|
|
21
|
+
variant: 'body2Strong',
|
|
22
22
|
});
|
|
23
23
|
export const Subtitle1 = null; // Not supported
|
|
24
24
|
export const Subtitle1Strong = null; // Not supported
|
|
25
25
|
export const Subtitle2 = null; // Not supported
|
|
26
26
|
export const Subtitle2Strong = null; // Not supported
|
|
27
27
|
export const Title1 = Text.customize({
|
|
28
|
-
|
|
28
|
+
variant: 'title1',
|
|
29
29
|
});
|
|
30
30
|
export const Title1Strong = null; // Not supported
|
|
31
31
|
export const Title2 = Text.customize({
|
|
32
|
-
|
|
32
|
+
variant: 'title2',
|
|
33
33
|
});
|
|
34
34
|
export const Title3 = Text.customize({
|
|
35
|
-
|
|
35
|
+
variant: 'title3',
|
|
36
36
|
});
|
|
37
37
|
export const LargeTitle = Text.customize({
|
|
38
|
-
|
|
38
|
+
variant: 'largeTitle',
|
|
39
39
|
});
|
|
40
40
|
export const Display = Text.customize({
|
|
41
|
-
|
|
41
|
+
variant: 'display',
|
|
42
42
|
});
|
|
43
|
-
//# sourceMappingURL=Variants.android.js.map
|
|
43
|
+
//# sourceMappingURL=Variants.android.js.map
|