@fluentui-react-native/win32-theme 0.34.6 → 0.34.8
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 +42 -1
- package/CHANGELOG.md +10 -2
- package/eslint.config.js +3 -0
- package/lib/NativeModule/fallbackOfficeModule.js +8 -5
- package/lib/NativeModule/fallbackOfficeModule.js.map +1 -1
- package/lib/NativeModule/getThemingModule.native.js +12 -13
- package/lib/NativeModule/getThemingModule.native.js.map +1 -1
- package/lib/NativeModule/hostThemeSetting.js +3 -3
- package/lib/NativeModule/hostThemeSetting.js.map +1 -1
- package/lib/__tests__/win32-theme.test.js +45 -70
- package/lib/__tests__/win32-theme.test.js.map +1 -1
- package/lib/createBrandedThemeWithAlias.js +2 -2
- package/lib/createBrandedThemeWithAlias.js.map +1 -1
- package/lib/createFontAliasTokens.js +2 -2
- package/lib/createFontAliasTokens.js.map +1 -1
- package/lib/createOfficeAliasTokens.js +4 -4
- package/lib/createOfficeAliasTokens.js.map +1 -1
- package/lib/createOfficeTheme.js +19 -18
- package/lib/createOfficeTheme.js.map +1 -1
- package/lib/createPartialOfficeTheme.js +14 -9
- package/lib/createPartialOfficeTheme.js.map +1 -1
- package/lib/getThemeTypography.js +17 -3
- package/lib/getThemeTypography.js.map +1 -1
- package/lib/highContrast/tokens-alias.js +5 -5
- package/lib/highContrast/tokens-alias.js.map +1 -1
- package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js +1 -1
- package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js.map +1 -1
- package/lib-commonjs/NativeModule/fallbackOfficeModule.js +7 -4
- package/lib-commonjs/NativeModule/fallbackOfficeModule.js.map +1 -1
- package/lib-commonjs/NativeModule/getThemingModule.js +1 -1
- package/lib-commonjs/NativeModule/getThemingModule.js.map +1 -1
- package/lib-commonjs/NativeModule/getThemingModule.native.js +15 -16
- package/lib-commonjs/NativeModule/getThemingModule.native.js.map +1 -1
- package/lib-commonjs/NativeModule/hostThemeSetting.js +3 -3
- package/lib-commonjs/NativeModule/hostThemeSetting.js.map +1 -1
- package/lib-commonjs/NativeModule/index.js +1 -1
- package/lib-commonjs/__tests__/win32-theme.test.js +53 -78
- package/lib-commonjs/__tests__/win32-theme.test.js.map +1 -1
- package/lib-commonjs/createBrandedThemeWithAlias.js +3 -3
- package/lib-commonjs/createBrandedThemeWithAlias.js.map +1 -1
- package/lib-commonjs/createFontAliasTokens.js +4 -4
- package/lib-commonjs/createFontAliasTokens.js.map +1 -1
- package/lib-commonjs/createOfficeAliasTokens.js +5 -5
- package/lib-commonjs/createOfficeAliasTokens.js.map +1 -1
- package/lib-commonjs/createOfficeTheme.js +28 -27
- package/lib-commonjs/createOfficeTheme.js.map +1 -1
- package/lib-commonjs/createPartialOfficeTheme.js +15 -10
- package/lib-commonjs/createPartialOfficeTheme.js.map +1 -1
- package/lib-commonjs/getOfficeTokens.js +9 -9
- package/lib-commonjs/getOfficeTokens.js.map +1 -1
- package/lib-commonjs/getThemeTypography.js +19 -5
- package/lib-commonjs/getThemeTypography.js.map +1 -1
- package/lib-commonjs/highContrast/tokens-alias.js +7 -7
- package/lib-commonjs/highContrast/tokens-alias.js.map +1 -1
- package/package.json +20 -8
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createOfficeTheme = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var hostThemeSetting_1 = require("./NativeModule/hostThemeSetting");
|
|
4
|
+
const default_theme_1 = require("@fluentui-react-native/default-theme");
|
|
5
|
+
const theme_1 = require("@fluentui-react-native/theme");
|
|
6
|
+
const createAliasesFromPalette_1 = require("./createAliasesFromPalette");
|
|
7
|
+
const createBrandedThemeWithAlias_1 = require("./createBrandedThemeWithAlias");
|
|
8
|
+
const createOfficeAliasTokens_1 = require("./createOfficeAliasTokens");
|
|
9
|
+
const createPartialOfficeTheme_1 = require("./createPartialOfficeTheme");
|
|
10
|
+
const getThemeTypography_1 = require("./getThemeTypography");
|
|
11
|
+
const getThemingModule_1 = require("./NativeModule/getThemingModule");
|
|
12
|
+
const hostThemeSetting_1 = require("./NativeModule/hostThemeSetting");
|
|
14
13
|
function handlePaletteCall(palette) {
|
|
15
|
-
|
|
14
|
+
const exception = palette;
|
|
16
15
|
return exception && exception.message !== undefined ? undefined : palette;
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
@@ -24,41 +23,43 @@ function handlePaletteCall(palette) {
|
|
|
24
23
|
*
|
|
25
24
|
* @param paletteName - optional specifier for the currently active office palette
|
|
26
25
|
*/
|
|
27
|
-
function createOfficeTheme(options) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var palette = handlePaletteCall(ref.module.getPalette(name));
|
|
26
|
+
function createOfficeTheme(options = {}) {
|
|
27
|
+
const [module, emitter] = (0, getThemingModule_1.getThemingModule)();
|
|
28
|
+
const ref = { module, emitter, themeName: (0, hostThemeSetting_1.getCurrentHostThemeSetting)() || '' };
|
|
29
|
+
const { paletteName } = options;
|
|
30
|
+
const themeRef = new theme_1.ThemeReference((0, default_theme_1.createDefaultTheme)(options), () => {
|
|
31
|
+
const name = paletteName || 'WhiteColors';
|
|
32
|
+
const palette = handlePaletteCall(ref.module.getPalette(name));
|
|
35
33
|
return (0, createPartialOfficeTheme_1.createPartialOfficeTheme)(module, ref.themeName, palette);
|
|
36
|
-
},
|
|
34
|
+
}, () => {
|
|
37
35
|
if (!ref.themeName || ref.themeName === '') {
|
|
38
36
|
return {};
|
|
39
37
|
}
|
|
40
38
|
return {
|
|
41
|
-
shadows:
|
|
39
|
+
shadows: { ...(0, createOfficeAliasTokens_1.createOfficeShadowAliasTokens)(ref.themeName) },
|
|
42
40
|
typography: (0, getThemeTypography_1.win32Typography)(),
|
|
43
41
|
};
|
|
44
|
-
},
|
|
42
|
+
}, () => {
|
|
45
43
|
if (!ref.themeName || ref.themeName === '') {
|
|
46
44
|
return {};
|
|
47
45
|
}
|
|
48
46
|
return {
|
|
49
|
-
colors:
|
|
47
|
+
colors: { ...(0, createOfficeAliasTokens_1.createOfficeColorAliasTokens)(ref.themeName) },
|
|
50
48
|
typography: (0, getThemeTypography_1.win32Typography)(),
|
|
51
49
|
};
|
|
52
|
-
},
|
|
50
|
+
}, (theme) => {
|
|
53
51
|
return (0, createBrandedThemeWithAlias_1.createBrandedThemeWithAlias)(ref.themeName, theme);
|
|
54
|
-
},
|
|
52
|
+
}, (theme) => {
|
|
55
53
|
if (!theme.host.palette) {
|
|
56
54
|
return {};
|
|
57
55
|
}
|
|
58
|
-
return
|
|
56
|
+
return {
|
|
57
|
+
...(paletteName !== undefined && { colors: (0, createAliasesFromPalette_1.createAliasesFromPalette)(theme.host.palette, ref.themeName === 'HighContrast') }),
|
|
58
|
+
typography: (0, getThemeTypography_1.win32Typography)(),
|
|
59
|
+
};
|
|
59
60
|
});
|
|
60
61
|
// set up the callback for theme changes on the native side
|
|
61
|
-
|
|
62
|
+
const onPlatformDefaultsChanged = (args) => {
|
|
62
63
|
ref.themeName = (args && args.hostThemeSetting) || ref.themeName;
|
|
63
64
|
(0, hostThemeSetting_1.setCurrentHostThemeSetting)(ref.themeName);
|
|
64
65
|
themeRef.invalidate();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOfficeTheme.js","sourceRoot":"","sources":["../src/createOfficeTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createOfficeTheme.js","sourceRoot":"","sources":["../src/createOfficeTheme.ts"],"names":[],"mappings":";;;AAAA,wEAA0E;AAC1E,wDAA8D;AAG9D,yEAAsE;AACtE,+EAA4E;AAC5E,uEAAwG;AACxG,yEAAsE;AACtE,6DAAuD;AACvD,sEAAmE;AACn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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return _a = {}, _a[rampValueName] = module.getConstants().ramps[colorRamp][index], _a;
|
|
11
|
-
}), false));
|
|
4
|
+
const paletteFromOfficeColors_1 = require("./paletteFromOfficeColors");
|
|
5
|
+
const getRamps = (module) => {
|
|
6
|
+
return Object.keys(module.getConstants().ramps).reduce((total, colorRamp) => {
|
|
7
|
+
return Object.assign(total, ...module.getConstants().rampNames[colorRamp].map((rampValueName, index) => {
|
|
8
|
+
return { [rampValueName]: module.getConstants().ramps[colorRamp][index] };
|
|
9
|
+
}));
|
|
12
10
|
}, {});
|
|
13
11
|
};
|
|
14
12
|
/**
|
|
@@ -18,12 +16,19 @@ var getRamps = function (module) {
|
|
|
18
16
|
* @param palette - Office palette colors, if they have been successfully retrieved
|
|
19
17
|
*/
|
|
20
18
|
function createPartialOfficeTheme(module, themeName, palette) {
|
|
21
|
-
return
|
|
19
|
+
return {
|
|
20
|
+
colors: {
|
|
21
|
+
...(palette && (0, paletteFromOfficeColors_1.paletteFromOfficeColors)(palette)),
|
|
22
|
+
},
|
|
23
|
+
typography: module.getConstants().fluentTypography,
|
|
24
|
+
host: {
|
|
22
25
|
// Office Semantic Colors
|
|
23
26
|
palette: palette || {},
|
|
24
27
|
// Office Branding Colors
|
|
25
28
|
colors: getRamps(module),
|
|
26
|
-
}
|
|
29
|
+
},
|
|
30
|
+
...(themeName ? { name: themeName } : undefined),
|
|
31
|
+
};
|
|
27
32
|
}
|
|
28
33
|
exports.createPartialOfficeTheme = createPartialOfficeTheme;
|
|
29
34
|
//# sourceMappingURL=createPartialOfficeTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPartialOfficeTheme.js","sourceRoot":"","sources":["../src/createPartialOfficeTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createPartialOfficeTheme.js","sourceRoot":"","sources":["../src/createPartialOfficeTheme.ts"],"names":[],"mappings":";;;AA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
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const tokens_aliases_json_1 = tslib_1.__importDefault(require("@fluentui-react-native/design-tokens-win32/black/tokens-aliases.json"));
|
|
6
|
+
const tokens_shadow_json_1 = tslib_1.__importDefault(require("@fluentui-react-native/design-tokens-win32/black/tokens-shadow.json"));
|
|
7
|
+
const tokens_aliases_json_2 = tslib_1.__importDefault(require("@fluentui-react-native/design-tokens-win32/colorful/tokens-aliases.json"));
|
|
8
|
+
const tokens_shadow_json_2 = tslib_1.__importDefault(require("@fluentui-react-native/design-tokens-win32/colorful/tokens-shadow.json"));
|
|
9
|
+
const tokens_aliases_json_3 = tslib_1.__importDefault(require("@fluentui-react-native/design-tokens-win32/darkgray/tokens-aliases.json"));
|
|
10
|
+
const tokens_shadow_json_3 = tslib_1.__importDefault(require("@fluentui-react-native/design-tokens-win32/darkgray/tokens-shadow.json"));
|
|
11
|
+
const tokens_shadow_json_4 = tslib_1.__importDefault(require("@fluentui-react-native/design-tokens-win32/hc/tokens-shadow.json"));
|
|
12
|
+
const tokens_alias_1 = require("./highContrast/tokens-alias");
|
|
13
13
|
function getOfficeAliasTokens(officeTheme) {
|
|
14
14
|
if (officeTheme === 'White' || officeTheme === 'Colorful') {
|
|
15
15
|
return tokens_aliases_json_2.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOfficeTokens.js","sourceRoot":"","sources":["../src/getOfficeTokens.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"getOfficeTokens.js","sourceRoot":"","sources":["../src/getOfficeTokens.ts"],"names":[],"mappings":";;;;AAAA,uIAAoG;AACpG,qIAAoG;AACpG,0IAA0G;AAC1G,wIAA0G;AAC1G,0IAA0G;AAC1G,wIAA0G;AAC1G,kIAA8F;AAE9F,8DAA4D;AAE5D,SAAgB,oBAAoB,CAAC,WAAmB;IACtD,IAAI,WAAW,KAAK,OAAO,IAAI,WAAW,KAAK,UAAU,EAAE;QACzD,OAAO,6BAAmB,CAAC;KAC5B;SAAM,IAAI,WAAW,KAAK,UAAU,EAAE;QACrC,OAAO,6BAAmB,CAAC;KAC5B;SAAM,IAAI,WAAW,KAAK,OAAO,EAAE;QAClC,OAAO,6BAAgB,CAAC;KACzB;SAAM,IAAI,WAAW,KAAK,cAAc,EAAE;QACzC,OAAO,4BAAa,CAAC;KACtB;IAED,OAAO,6BAAmB,CAAC;AAC7B,CAAC;AAZD,oDAYC;AAED,SAAgB,qBAAqB,CAAC,WAAmB;IACvD,IAAI,WAAW,KAAK,OAAO,IAAI,WAAW,KAAK,UAAU,EAAE;QACzD,OAAO,4BAAoB,CAAC;KAC7B;SAAM,IAAI,WAAW,KAAK,UAAU,EAAE;QACrC,OAAO,4BAAoB,CAAC;KAC7B;SAAM,IAAI,WAAW,KAAK,OAAO,EAAE;QAClC,OAAO,4BAAiB,CAAC;KAC1B;SAAM,IAAI,WAAW,KAAK,cAAc,EAAE;QACzC,OAAO,4BAAc,CAAC;KACvB;IAED,OAAO,6BAAmB,CAAC;AAC7B,CAAC;AAZD,sDAYC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.win32Typography = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var createFontAliasTokens_1 = require("./createFontAliasTokens");
|
|
4
|
+
const default_theme_1 = require("@fluentui-react-native/default-theme");
|
|
5
|
+
const createFontAliasTokens_1 = require("./createFontAliasTokens");
|
|
7
6
|
function win32Typography() {
|
|
8
|
-
|
|
7
|
+
const win32Dict = {
|
|
9
8
|
sizes: default_theme_1.defaultFluentTheme.typography.sizes,
|
|
10
9
|
weights: default_theme_1.defaultFluentTheme.typography.weights,
|
|
11
10
|
// hard coded until we support new fontFamily format
|
|
@@ -18,7 +17,22 @@ function win32Typography() {
|
|
|
18
17
|
serif: 'System',
|
|
19
18
|
numeric: 'Bahnschrift',
|
|
20
19
|
},
|
|
21
|
-
variants:
|
|
20
|
+
variants: {
|
|
21
|
+
captionStandard: { face: 'primary', size: 'caption', weight: 'regular' },
|
|
22
|
+
secondaryStandard: { face: 'primary', size: 'secondary', weight: 'regular' },
|
|
23
|
+
secondarySemibold: { face: 'primary', size: 'secondary', weight: 'semiBold' },
|
|
24
|
+
bodyStandard: { face: 'primary', size: 'body', weight: 'regular' },
|
|
25
|
+
bodySemibold: { face: 'primary', size: 'body', weight: 'semiBold' },
|
|
26
|
+
subheaderStandard: { face: 'primary', size: 'subheader', weight: 'regular' },
|
|
27
|
+
subheaderSemibold: { face: 'primary', size: 'subheader', weight: 'semiBold' },
|
|
28
|
+
headerStandard: { face: 'primary', size: 'header', weight: 'regular' },
|
|
29
|
+
headerSemibold: { face: 'primary', size: 'header', weight: 'semiBold' },
|
|
30
|
+
heroStandard: { face: 'primary', size: 'hero', weight: 'regular' },
|
|
31
|
+
heroSemibold: { face: 'primary', size: 'hero', weight: 'semiBold' },
|
|
32
|
+
heroLargeStandard: { face: 'primary', size: 'heroLarge', weight: 'regular' },
|
|
33
|
+
heroLargeSemibold: { face: 'primary', size: 'heroLarge', weight: 'semiBold' },
|
|
34
|
+
...(0, createFontAliasTokens_1.createFontAliasTokens)(),
|
|
35
|
+
},
|
|
22
36
|
};
|
|
23
37
|
return win32Dict;
|
|
24
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThemeTypography.js","sourceRoot":"","sources":["../src/getThemeTypography.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getThemeTypography.js","sourceRoot":"","sources":["../src/getThemeTypography.ts"],"names":[],"mappings":";;;AAAA,wEAA0E;AAG1E,mEAAgE;AAEhE,SAAgB,eAAe;IAC7B,MAAM,SAAS,GAAG;QAChB,KAAK,EAAE,kCAAkB,CAAC,UAA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I,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE;YAClE,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE;YACnE,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE;YAC5E,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE;YAC7E,GAAG,IAAA,6CAAqB,GAAE;SACf;KACd,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAjCD,0CAiCC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.hcAliasTokens = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const tokens_aliases_json_1 = tslib_1.__importDefault(require("@fluentui-react-native/design-tokens-win32/hc/tokens-aliases.json"));
|
|
7
7
|
exports.hcAliasTokens = processAliasTokens(tokens_aliases_json_1.default);
|
|
8
8
|
function processAliasTokens(aliasTokens) {
|
|
9
|
-
for (
|
|
10
|
-
for (
|
|
11
|
-
|
|
9
|
+
for (const key in aliasTokens) {
|
|
10
|
+
for (const innerKey in aliasTokens[key]) {
|
|
11
|
+
const entry = aliasTokens[key][innerKey];
|
|
12
12
|
if (typeof entry === 'string' && entry.includes('PlatformColor')) {
|
|
13
|
-
|
|
13
|
+
const color = entry.substring(14, entry.length - 1);
|
|
14
14
|
aliasTokens[key][innerKey] = (0, react_native_1.PlatformColor)(color);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens-alias.js","sourceRoot":"","sources":["../../src/highContrast/tokens-alias.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"tokens-alias.js","sourceRoot":"","sources":["../../src/highContrast/tokens-alias.ts"],"names":[],"mappings":";;;;AAAA,+CAA6C;AAE7C,oIAA4F;AAE/E,QAAA,aAAa,GAAG,kBAAkB,CAAC,6BAAW,CAAC,CAAC;AAE7D,SAAS,kBAAkB,CAAC,WAAgB;IAC1C,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE;QAC7B,KAAK,MAAM,QAAQ,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;YACvC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAChE,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACpD,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,IAAA,4BAAa,EAAC,KAAK,CAAC,CAAC;aACnD;SACF;KACF;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/win32-theme",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.8",
|
|
4
4
|
"description": "Win32 office theme that works with the theming native module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
},
|
|
10
10
|
"main": "lib-commonjs/index.js",
|
|
11
11
|
"module": "lib/index.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./lib/index.js",
|
|
15
|
+
"require": "./lib-commonjs/index.js",
|
|
16
|
+
"types": "./lib/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
12
19
|
"typings": "lib/index.d.ts",
|
|
13
20
|
"scripts": {
|
|
14
21
|
"build": "fluentui-scripts build",
|
|
@@ -27,13 +34,13 @@
|
|
|
27
34
|
"author": "",
|
|
28
35
|
"license": "MIT",
|
|
29
36
|
"dependencies": {
|
|
30
|
-
"@fluentui-react-native/default-theme": "0.26.
|
|
37
|
+
"@fluentui-react-native/default-theme": "0.26.5",
|
|
31
38
|
"@fluentui-react-native/design-tokens-win32": "^0.53.0",
|
|
32
|
-
"@fluentui-react-native/memo-cache": "1.3.
|
|
33
|
-
"@fluentui-react-native/theme": "0.11.
|
|
34
|
-
"@fluentui-react-native/theme-tokens": "0.27.
|
|
35
|
-
"@fluentui-react-native/theme-types": "0.39.
|
|
36
|
-
"@fluentui-react-native/theming-utils": "0.26.
|
|
39
|
+
"@fluentui-react-native/memo-cache": "1.3.5",
|
|
40
|
+
"@fluentui-react-native/theme": "0.11.4",
|
|
41
|
+
"@fluentui-react-native/theme-tokens": "0.27.4",
|
|
42
|
+
"@fluentui-react-native/theme-types": "0.39.4",
|
|
43
|
+
"@fluentui-react-native/theming-utils": "0.26.4",
|
|
37
44
|
"tslib": "^2.3.1"
|
|
38
45
|
},
|
|
39
46
|
"devDependencies": {
|
|
@@ -45,7 +52,9 @@
|
|
|
45
52
|
"@react-native/metro-config": "^0.74.0",
|
|
46
53
|
"@types/react": "^18.2.0",
|
|
47
54
|
"react": "18.2.0",
|
|
48
|
-
"react-native": "^0.74.0"
|
|
55
|
+
"react-native": "^0.74.0",
|
|
56
|
+
"react-native-macos": "^0.74.0",
|
|
57
|
+
"react-native-windows": "^0.74.0"
|
|
49
58
|
},
|
|
50
59
|
"peerDependencies": {
|
|
51
60
|
"@office-iss/react-native-win32": "^0.74.0",
|
|
@@ -69,9 +78,12 @@
|
|
|
69
78
|
]
|
|
70
79
|
},
|
|
71
80
|
"capabilities": [
|
|
81
|
+
"babel-preset-react-native",
|
|
72
82
|
"core",
|
|
73
83
|
"core-android",
|
|
74
84
|
"core-ios",
|
|
85
|
+
"core-macos",
|
|
86
|
+
"core-windows",
|
|
75
87
|
"react"
|
|
76
88
|
]
|
|
77
89
|
}
|