@fluentui-react-native/apple-theme 0.18.12 → 0.18.14
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 +79 -1
- package/CHANGELOG.md +26 -2
- package/lib/__tests__/apple-theme.test.js +1 -1
- package/lib/__tests__/apple-theme.test.js.map +1 -1
- package/lib/appleColors.ios.d.ts.map +1 -1
- package/lib/appleColors.ios.js +1 -1
- package/lib/appleColors.ios.js.map +1 -1
- package/lib/appleColors.macos.d.ts.map +1 -1
- package/lib/appleColors.macos.js +1 -1
- package/lib/appleColors.macos.js.map +1 -1
- package/lib/appleShadows.ios.d.ts.map +1 -1
- package/lib/appleShadows.ios.js +1 -1
- package/lib/appleShadows.ios.js.map +1 -1
- package/lib/appleShadows.macos.d.ts.map +1 -1
- package/lib/appleShadows.macos.js.map +1 -1
- package/lib/appleTheme.ios.d.ts.map +1 -1
- package/lib/appleTheme.ios.js +2 -2
- package/lib/appleTheme.ios.js.map +1 -1
- package/lib/appleTheme.macos.d.ts.map +1 -1
- package/lib/appleTheme.macos.js +1 -1
- package/lib/appleTheme.macos.js.map +1 -1
- package/lib/appleTypography.ios.d.ts.map +1 -1
- package/lib/appleTypography.ios.js.map +1 -1
- package/lib/createAppleTheme.d.ts.map +1 -1
- package/lib/createAppleTheme.ios.d.ts.map +1 -1
- package/lib/createAppleTheme.ios.js +1 -1
- package/lib/createAppleTheme.ios.js.map +1 -1
- package/lib/createAppleTheme.js +1 -1
- package/lib/createAppleTheme.js.map +1 -1
- package/lib/createAppleTheme.macos.d.ts.map +1 -1
- package/lib/createAppleTheme.macos.js +2 -2
- package/lib/createAppleTheme.macos.js.map +1 -1
- package/lib/createFontAliasTokens.ios.d.ts.map +1 -1
- package/lib/createFontAliasTokens.ios.js.map +1 -1
- package/lib/createMacOSAliasTokens.d.ts.map +1 -1
- package/lib/createMacOSAliasTokens.js +2 -2
- package/lib/createMacOSAliasTokens.js.map +1 -1
- package/lib/createiOSAliasTokens.d.ts.map +1 -1
- package/lib/createiOSAliasTokens.js +1 -1
- package/lib/createiOSAliasTokens.js.map +1 -1
- package/lib/getMacOSTokens.d.ts +2 -2
- package/lib/getMacOSTokens.js +5 -5
- package/lib/getMacOSTokens.js.map +1 -1
- package/lib-commonjs/__tests__/apple-theme.test.js +1 -1
- package/lib-commonjs/__tests__/apple-theme.test.js.map +1 -1
- package/lib-commonjs/appleColors.ios.d.ts.map +1 -1
- package/lib-commonjs/appleColors.ios.js +1 -1
- package/lib-commonjs/appleColors.ios.js.map +1 -1
- package/lib-commonjs/appleColors.macos.d.ts.map +1 -1
- package/lib-commonjs/appleColors.macos.js +1 -1
- package/lib-commonjs/appleColors.macos.js.map +1 -1
- package/lib-commonjs/appleShadows.ios.d.ts.map +1 -1
- package/lib-commonjs/appleShadows.ios.js +1 -1
- package/lib-commonjs/appleShadows.ios.js.map +1 -1
- package/lib-commonjs/appleShadows.macos.d.ts.map +1 -1
- package/lib-commonjs/appleShadows.macos.js.map +1 -1
- package/lib-commonjs/appleTheme.ios.d.ts.map +1 -1
- package/lib-commonjs/appleTheme.ios.js +2 -2
- package/lib-commonjs/appleTheme.ios.js.map +1 -1
- package/lib-commonjs/appleTheme.macos.d.ts.map +1 -1
- package/lib-commonjs/appleTheme.macos.js +1 -1
- package/lib-commonjs/appleTheme.macos.js.map +1 -1
- package/lib-commonjs/appleTypography.ios.d.ts.map +1 -1
- package/lib-commonjs/appleTypography.ios.js.map +1 -1
- package/lib-commonjs/createAppleTheme.d.ts.map +1 -1
- package/lib-commonjs/createAppleTheme.ios.d.ts.map +1 -1
- package/lib-commonjs/createAppleTheme.ios.js +1 -1
- package/lib-commonjs/createAppleTheme.ios.js.map +1 -1
- package/lib-commonjs/createAppleTheme.js +1 -1
- package/lib-commonjs/createAppleTheme.js.map +1 -1
- package/lib-commonjs/createAppleTheme.macos.d.ts.map +1 -1
- package/lib-commonjs/createAppleTheme.macos.js +2 -2
- package/lib-commonjs/createAppleTheme.macos.js.map +1 -1
- package/lib-commonjs/createFontAliasTokens.ios.d.ts.map +1 -1
- package/lib-commonjs/createFontAliasTokens.ios.js.map +1 -1
- package/lib-commonjs/createMacOSAliasTokens.d.ts.map +1 -1
- package/lib-commonjs/createMacOSAliasTokens.js +2 -2
- package/lib-commonjs/createMacOSAliasTokens.js.map +1 -1
- package/lib-commonjs/createiOSAliasTokens.d.ts.map +1 -1
- package/lib-commonjs/createiOSAliasTokens.js +1 -1
- package/lib-commonjs/createiOSAliasTokens.js.map +1 -1
- package/lib-commonjs/getMacOSTokens.d.ts +2 -2
- package/lib-commonjs/getMacOSTokens.js +12 -12
- package/lib-commonjs/getMacOSTokens.js.map +1 -1
- package/package.json +7 -7
- package/src/__tests__/apple-theme.test.ts +3 -2
- package/src/appleColors.ios.ts +3 -1
- package/src/appleColors.macos.ts +3 -2
- package/src/appleShadows.ios.ts +3 -1
- package/src/appleShadows.macos.ts +1 -0
- package/src/appleTheme.ios.ts +3 -2
- package/src/appleTheme.macos.ts +2 -1
- package/src/appleTypography.ios.ts +1 -0
- package/src/createAppleTheme.ios.ts +3 -1
- package/src/createAppleTheme.macos.ts +4 -2
- package/src/createAppleTheme.ts +1 -1
- package/src/createFontAliasTokens.ios.ts +1 -1
- package/src/createMacOSAliasTokens.ts +4 -3
- package/src/createiOSAliasTokens.ts +2 -2
- package/src/getMacOSTokens.ts +5 -5
package/src/appleColors.macos.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ThemeColorDefinition, AppearanceOptions } from '@fluentui-react-native/theme-types';
|
|
2
|
-
import type { AppleSemanticPalette, FluentUIApplePalette } from './appleColors.types.macos';
|
|
3
2
|
import { PlatformColor, DynamicColorMacOS, ColorWithSystemEffectMacOS } from 'react-native-macos';
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
import type { AppleSemanticPalette, FluentUIApplePalette } from './appleColors.types.macos';
|
|
5
5
|
import { getIsHighContrast } from './appleHighContrast.macos';
|
|
6
|
+
import { createMacOSColorAliasTokens } from './createMacOSAliasTokens';
|
|
6
7
|
|
|
7
8
|
/** Creates a Palette of PlatformColors defined for macOS */
|
|
8
9
|
function getAppleSemanticPalette(): AppleSemanticPalette {
|
package/src/appleShadows.ios.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Appearance } from 'react-native';
|
|
2
|
+
|
|
1
3
|
import type { ThemeShadowDefinition } from '@fluentui-react-native/theme-types';
|
|
2
4
|
import { getCurrentAppearance } from '@fluentui-react-native/theming-utils';
|
|
3
|
-
|
|
5
|
+
|
|
4
6
|
import { createiOSShadowAliasTokens } from './createiOSAliasTokens';
|
|
5
7
|
|
|
6
8
|
export function iOSShadows(): ThemeShadowDefinition {
|
package/src/appleTheme.ios.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
1
2
|
import type { Theme, Spacing } from '@fluentui-react-native/theme-types';
|
|
3
|
+
|
|
2
4
|
import { paletteFromAppleColors } from './appleColors.ios';
|
|
3
|
-
import { appleTypography } from './appleTypography.ios';
|
|
4
5
|
import { iOSShadows } from './appleShadows.ios';
|
|
5
|
-
import {
|
|
6
|
+
import { appleTypography } from './appleTypography.ios';
|
|
6
7
|
|
|
7
8
|
function appleSpacing(): Spacing {
|
|
8
9
|
return {
|
package/src/appleTheme.macos.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
1
2
|
import type { Spacing, Theme, AppearanceOptions } from '@fluentui-react-native/theme-types';
|
|
3
|
+
|
|
2
4
|
import { fallbackApplePalette } from './appleColors.macos';
|
|
3
5
|
import { fallbackAppleShadows } from './appleShadows.macos';
|
|
4
6
|
import { fallbackAppleTypography } from './appleTypography.macos';
|
|
5
|
-
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
6
7
|
|
|
7
8
|
export function appleSpacing(): Spacing {
|
|
8
9
|
return {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FontSize, FontSizes, FontWeightValue, Typography, Variants } from '@fluentui-react-native/theme-types';
|
|
2
|
+
|
|
2
3
|
import { createFontAliasTokens } from './createFontAliasTokens.ios';
|
|
3
4
|
|
|
4
5
|
// The sizes are taken for the Dynamic Type Size "Large", which is the system default
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Appearance, NativeEventEmitter } from 'react-native';
|
|
2
|
+
|
|
1
3
|
import { NativeAppearanceAdditions } from '@fluentui-react-native/experimental-appearance-additions';
|
|
2
4
|
import { ThemeReference } from '@fluentui-react-native/theme';
|
|
3
5
|
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
4
|
-
|
|
6
|
+
|
|
5
7
|
import { getBaseAppleThemeIOS } from './appleTheme.ios';
|
|
6
8
|
|
|
7
9
|
export function createAppleTheme(): ThemeReference {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { Appearance } from 'react-native';
|
|
2
|
+
|
|
1
3
|
import { ThemeReference } from '@fluentui-react-native/theme';
|
|
2
4
|
import type { Theme } from '@fluentui-react-native/theme-types';
|
|
3
5
|
import { getCurrentAppearance } from '@fluentui-react-native/theming-utils';
|
|
4
|
-
import { Appearance } from 'react-native';
|
|
5
|
-
import { getBaseAppleThemeMacOS } from './appleTheme.macos';
|
|
6
6
|
import { AccessibilityInfo } from 'react-native-macos';
|
|
7
|
+
|
|
7
8
|
import { setIsHighContrast } from './appleHighContrast.macos';
|
|
9
|
+
import { getBaseAppleThemeMacOS } from './appleTheme.macos';
|
|
8
10
|
|
|
9
11
|
let appleThemeReference: ThemeReference;
|
|
10
12
|
|
package/src/createAppleTheme.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ThemeReference } from '@fluentui-react-native/theme';
|
|
2
1
|
import { createDefaultTheme } from '@fluentui-react-native/default-theme';
|
|
2
|
+
import { ThemeReference } from '@fluentui-react-native/theme';
|
|
3
3
|
|
|
4
4
|
export function createAppleTheme(): ThemeReference {
|
|
5
5
|
console.warn('Platform is not supported by apple theme, using default theme');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import aliasTokens from '@fluentui-react-native/design-tokens-ios/light/tokens-aliases.json'; // Font alias tokens should be the same for all color styles
|
|
2
|
-
import type { Variants } from '@fluentui-react-native/theme-types';
|
|
3
2
|
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
3
|
+
import type { Variants } from '@fluentui-react-native/theme-types';
|
|
4
4
|
import { mapFontPipelineToTheme } from '@fluentui-react-native/theming-utils';
|
|
5
5
|
|
|
6
6
|
function createFontAliasTokensWorker(): Partial<Variants> {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { getMacOSAliasTokens, getMacOSShadowTokens } from './getMacOSTokens';
|
|
2
|
-
import type { AliasColorTokens, AppearanceOptions } from '@fluentui-react-native/theme-types';
|
|
3
|
-
import { mapPipelineToTheme, mapPipelineToShadow } from '@fluentui-react-native/theming-utils';
|
|
4
1
|
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
2
|
+
import type { AliasColorTokens, AppearanceOptions } from '@fluentui-react-native/theme-types';
|
|
5
3
|
import type { ThemeShadowDefinition } from '@fluentui-react-native/theme-types/lib/Shadow.types';
|
|
4
|
+
import { mapPipelineToTheme, mapPipelineToShadow } from '@fluentui-react-native/theming-utils';
|
|
5
|
+
|
|
6
|
+
import { getMacOSAliasTokens, getMacOSShadowTokens } from './getMacOSTokens';
|
|
6
7
|
|
|
7
8
|
function createMacOSColorAliasTokensWorker(mode: AppearanceOptions, isHighContrast: boolean): AliasColorTokens {
|
|
8
9
|
const aliasTokens = getMacOSAliasTokens(mode, isHighContrast);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
1
2
|
import { getAliasTokens, getShadowTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
3
|
import type { AliasColorTokens, AppearanceOptions } from '@fluentui-react-native/theme-types';
|
|
3
|
-
import { mapPipelineToTheme, mapPipelineToShadow } from '@fluentui-react-native/theming-utils';
|
|
4
|
-
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
5
4
|
import type { ThemeShadowDefinition } from '@fluentui-react-native/theme-types/lib/Shadow.types';
|
|
5
|
+
import { mapPipelineToTheme, mapPipelineToShadow } from '@fluentui-react-native/theming-utils';
|
|
6
6
|
|
|
7
7
|
function createiOSColorAliasTokensWorker(mode: AppearanceOptions): AliasColorTokens {
|
|
8
8
|
const aliasTokens = getAliasTokens(mode);
|
package/src/getMacOSTokens.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import macOSLightAliasTokens from '@fluentui-react-native/design-tokens-macos/light/tokens-aliases.json';
|
|
2
1
|
import macOSDarkAliasTokens from '@fluentui-react-native/design-tokens-macos/dark/tokens-aliases.json';
|
|
3
|
-
import macOSLightHCAliasTokens from '@fluentui-react-native/design-tokens-macos/hclight/tokens-aliases.json';
|
|
4
|
-
import macOSDarkHCAliasTokens from '@fluentui-react-native/design-tokens-macos/hcdark/tokens-aliases.json';
|
|
5
|
-
import macOSLightShadowTokens from '@fluentui-react-native/design-tokens-macos/light/tokens-shadow.json';
|
|
6
2
|
import macOSDarkShadowTokens from '@fluentui-react-native/design-tokens-macos/dark/tokens-shadow.json';
|
|
7
|
-
import
|
|
3
|
+
import macOSDarkHCAliasTokens from '@fluentui-react-native/design-tokens-macos/hcdark/tokens-aliases.json';
|
|
8
4
|
import macOSDarkHCShadowTokens from '@fluentui-react-native/design-tokens-macos/hcdark/tokens-shadow.json';
|
|
5
|
+
import macOSLightHCAliasTokens from '@fluentui-react-native/design-tokens-macos/hclight/tokens-aliases.json';
|
|
6
|
+
import macOSLightHCShadowTokens from '@fluentui-react-native/design-tokens-macos/hclight/tokens-shadow.json';
|
|
7
|
+
import macOSLightAliasTokens from '@fluentui-react-native/design-tokens-macos/light/tokens-aliases.json';
|
|
8
|
+
import macOSLightShadowTokens from '@fluentui-react-native/design-tokens-macos/light/tokens-shadow.json';
|
|
9
9
|
import type { AppearanceOptions } from '@fluentui-react-native/theme-types';
|
|
10
10
|
import { assertNever } from 'assert-never';
|
|
11
11
|
|