@fluentui-react-native/apple-theme 0.18.4 → 0.18.6

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 (96) hide show
  1. package/CHANGELOG.json +124 -1
  2. package/CHANGELOG.md +31 -2
  3. package/lib/__tests__/apple-theme.test.js +1 -1
  4. package/lib/appleColors.ios.d.ts +2 -2
  5. package/lib/appleColors.ios.d.ts.map +1 -1
  6. package/lib/appleColors.ios.js +4 -1
  7. package/lib/appleColors.ios.js.map +1 -1
  8. package/lib/appleColors.macos.d.ts +1 -1
  9. package/lib/appleColors.macos.d.ts.map +1 -1
  10. package/lib/appleColors.types.ios.d.ts +2 -2
  11. package/lib/appleColors.types.ios.d.ts.map +1 -1
  12. package/lib/appleColors.types.macos.d.ts +2 -2
  13. package/lib/appleColors.types.macos.d.ts.map +1 -1
  14. package/lib/appleShadows.ios.d.ts +1 -1
  15. package/lib/appleShadows.ios.d.ts.map +1 -1
  16. package/lib/appleShadows.macos.d.ts +1 -1
  17. package/lib/appleShadows.macos.d.ts.map +1 -1
  18. package/lib/appleTheme.ios.d.ts +2 -2
  19. package/lib/appleTheme.ios.d.ts.map +1 -1
  20. package/lib/appleTheme.ios.js +2 -2
  21. package/lib/appleTheme.ios.js.map +1 -1
  22. package/lib/appleTheme.macos.d.ts +1 -1
  23. package/lib/appleTheme.macos.d.ts.map +1 -1
  24. package/lib/appleTypography.ios.d.ts +1 -1
  25. package/lib/appleTypography.ios.d.ts.map +1 -1
  26. package/lib/appleTypography.macos.d.ts +1 -1
  27. package/lib/appleTypography.macos.d.ts.map +1 -1
  28. package/lib/createAppleTheme.ios.d.ts.map +1 -1
  29. package/lib/createAppleTheme.ios.js +8 -2
  30. package/lib/createAppleTheme.ios.js.map +1 -1
  31. package/lib/createFontAliasTokens.ios.d.ts +1 -1
  32. package/lib/createFontAliasTokens.ios.d.ts.map +1 -1
  33. package/lib/createMacOSAliasTokens.d.ts +2 -2
  34. package/lib/createMacOSAliasTokens.d.ts.map +1 -1
  35. package/lib/createiOSAliasTokens.d.ts +2 -2
  36. package/lib/createiOSAliasTokens.d.ts.map +1 -1
  37. package/lib/getMacOSTokens.d.ts +1 -1
  38. package/lib/getMacOSTokens.d.ts.map +1 -1
  39. package/lib/getMacOSTokens.js +2 -2
  40. package/lib/getMacOSTokens.js.map +1 -1
  41. package/lib-commonjs/__tests__/apple-theme.test.js +1 -1
  42. package/lib-commonjs/appleColors.ios.d.ts +2 -2
  43. package/lib-commonjs/appleColors.ios.d.ts.map +1 -1
  44. package/lib-commonjs/appleColors.ios.js +4 -1
  45. package/lib-commonjs/appleColors.ios.js.map +1 -1
  46. package/lib-commonjs/appleColors.macos.d.ts +1 -1
  47. package/lib-commonjs/appleColors.macos.d.ts.map +1 -1
  48. package/lib-commonjs/appleColors.types.ios.d.ts +2 -2
  49. package/lib-commonjs/appleColors.types.ios.d.ts.map +1 -1
  50. package/lib-commonjs/appleColors.types.macos.d.ts +2 -2
  51. package/lib-commonjs/appleColors.types.macos.d.ts.map +1 -1
  52. package/lib-commonjs/appleShadows.ios.d.ts +1 -1
  53. package/lib-commonjs/appleShadows.ios.d.ts.map +1 -1
  54. package/lib-commonjs/appleShadows.macos.d.ts +1 -1
  55. package/lib-commonjs/appleShadows.macos.d.ts.map +1 -1
  56. package/lib-commonjs/appleTheme.ios.d.ts +2 -2
  57. package/lib-commonjs/appleTheme.ios.d.ts.map +1 -1
  58. package/lib-commonjs/appleTheme.ios.js +2 -2
  59. package/lib-commonjs/appleTheme.ios.js.map +1 -1
  60. package/lib-commonjs/appleTheme.macos.d.ts +1 -1
  61. package/lib-commonjs/appleTheme.macos.d.ts.map +1 -1
  62. package/lib-commonjs/appleTypography.ios.d.ts +1 -1
  63. package/lib-commonjs/appleTypography.ios.d.ts.map +1 -1
  64. package/lib-commonjs/appleTypography.macos.d.ts +1 -1
  65. package/lib-commonjs/appleTypography.macos.d.ts.map +1 -1
  66. package/lib-commonjs/createAppleTheme.ios.d.ts.map +1 -1
  67. package/lib-commonjs/createAppleTheme.ios.js +7 -1
  68. package/lib-commonjs/createAppleTheme.ios.js.map +1 -1
  69. package/lib-commonjs/createFontAliasTokens.ios.d.ts +1 -1
  70. package/lib-commonjs/createFontAliasTokens.ios.d.ts.map +1 -1
  71. package/lib-commonjs/createMacOSAliasTokens.d.ts +2 -2
  72. package/lib-commonjs/createMacOSAliasTokens.d.ts.map +1 -1
  73. package/lib-commonjs/createiOSAliasTokens.d.ts +2 -2
  74. package/lib-commonjs/createiOSAliasTokens.d.ts.map +1 -1
  75. package/lib-commonjs/getMacOSTokens.d.ts +1 -1
  76. package/lib-commonjs/getMacOSTokens.d.ts.map +1 -1
  77. package/lib-commonjs/getMacOSTokens.js +2 -2
  78. package/lib-commonjs/getMacOSTokens.js.map +1 -1
  79. package/package.json +23 -16
  80. package/src/__tests__/apple-theme.test.ts +1 -1
  81. package/src/appleColors.ios.ts +7 -4
  82. package/src/appleColors.macos.ts +2 -2
  83. package/src/appleColors.types.ios.ts +1 -1
  84. package/src/appleColors.types.macos.ts +1 -1
  85. package/src/appleShadows.ios.ts +1 -1
  86. package/src/appleShadows.macos.ts +1 -1
  87. package/src/appleTheme.ios.ts +3 -3
  88. package/src/appleTheme.macos.ts +1 -1
  89. package/src/appleTypography.ios.ts +1 -1
  90. package/src/appleTypography.macos.ts +1 -1
  91. package/src/createAppleTheme.ios.ts +10 -3
  92. package/src/createAppleTheme.macos.ts +1 -1
  93. package/src/createFontAliasTokens.ios.ts +1 -1
  94. package/src/createMacOSAliasTokens.ts +2 -2
  95. package/src/createiOSAliasTokens.ts +2 -2
  96. package/src/getMacOSTokens.ts +3 -3
@@ -1,5 +1,5 @@
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 { Variants } from '@fluentui-react-native/theme-types';
2
+ import type { Variants } from '@fluentui-react-native/theme-types';
3
3
  import { memoize } from '@fluentui-react-native/memo-cache';
4
4
  import { mapFontPipelineToTheme } from '@fluentui-react-native/theming-utils';
5
5
 
@@ -1,8 +1,8 @@
1
1
  import { getMacOSAliasTokens, getMacOSShadowTokens } from './getMacOSTokens';
2
- import { AliasColorTokens, AppearanceOptions } from '@fluentui-react-native/theme-types';
2
+ import type { AliasColorTokens, AppearanceOptions } from '@fluentui-react-native/theme-types';
3
3
  import { mapPipelineToTheme, mapPipelineToShadow } from '@fluentui-react-native/theming-utils';
4
4
  import { memoize } from '@fluentui-react-native/memo-cache';
5
- import { ThemeShadowDefinition } from '@fluentui-react-native/theme-types/lib/Shadow.types';
5
+ import type { ThemeShadowDefinition } from '@fluentui-react-native/theme-types/lib/Shadow.types';
6
6
 
7
7
  function createMacOSColorAliasTokensWorker(mode: AppearanceOptions, isHighContrast: boolean): AliasColorTokens {
8
8
  const aliasTokens = getMacOSAliasTokens(mode, isHighContrast);
@@ -1,8 +1,8 @@
1
1
  import { getAliasTokens, getShadowTokens } from '@fluentui-react-native/theme-tokens';
2
- import { AliasColorTokens, AppearanceOptions } from '@fluentui-react-native/theme-types';
2
+ import type { AliasColorTokens, AppearanceOptions } from '@fluentui-react-native/theme-types';
3
3
  import { mapPipelineToTheme, mapPipelineToShadow } from '@fluentui-react-native/theming-utils';
4
4
  import { memoize } from '@fluentui-react-native/memo-cache';
5
- import { ThemeShadowDefinition } from '@fluentui-react-native/theme-types/lib/Shadow.types';
5
+ import type { ThemeShadowDefinition } from '@fluentui-react-native/theme-types/lib/Shadow.types';
6
6
 
7
7
  function createiOSColorAliasTokensWorker(mode: AppearanceOptions): AliasColorTokens {
8
8
  const aliasTokens = getAliasTokens(mode);
@@ -6,7 +6,7 @@ import macOSLightShadowTokens from '@fluentui-react-native/design-tokens-macos/l
6
6
  import macOSDarkShadowTokens from '@fluentui-react-native/design-tokens-macos/dark/tokens-shadow.json';
7
7
  import macOSLightHCShadowTokens from '@fluentui-react-native/design-tokens-macos/hclight/tokens-shadow.json';
8
8
  import macOSDarkHCShadowTokens from '@fluentui-react-native/design-tokens-macos/hcdark/tokens-shadow.json';
9
- import { AppearanceOptions } from '@fluentui-react-native/theme-types';
9
+ import type { AppearanceOptions } from '@fluentui-react-native/theme-types';
10
10
  import { assertNever } from 'assert-never';
11
11
 
12
12
  export function getMacOSAliasTokens(mode: AppearanceOptions, isHighContrast: boolean) {
@@ -16,7 +16,7 @@ export function getMacOSAliasTokens(mode: AppearanceOptions, isHighContrast: boo
16
16
  } else {
17
17
  return macOSLightAliasTokens;
18
18
  }
19
- } else if (mode === 'dark') {
19
+ } else if (mode === 'dark' || mode === 'darkElevated') {
20
20
  if (isHighContrast) {
21
21
  return macOSDarkHCAliasTokens;
22
22
  } else {
@@ -36,7 +36,7 @@ export function getMacOSShadowTokens(mode: AppearanceOptions, isHighContrast: bo
36
36
  } else {
37
37
  return macOSLightShadowTokens;
38
38
  }
39
- } else if (mode === 'dark') {
39
+ } else if (mode === 'dark' || mode === 'darkElevated') {
40
40
  if (isHighContrast) {
41
41
  return macOSDarkHCShadowTokens;
42
42
  } else {