@artsy/palette-mobile 8.7.4 → 8.7.5

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/dist/Theme.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  /// <reference types="react" />
2
- import { AllThemesType, ThemeV3Type, ThemeV5Type, THEMES } from "./tokens";
2
+ import { AllThemesType, ThemeV3Type, ThemeV3WithDarkModeSupportType, THEMES } from "./tokens";
3
3
  export declare const Theme: ({ children, theme, }: {
4
4
  children?: React.ReactNode;
5
- theme?: AllThemesType | "v3" | "v5light" | "v5dark" | undefined;
5
+ theme?: AllThemesType | "v3" | "v3light" | "v3dark" | undefined;
6
6
  }) => JSX.Element;
7
7
  /**
8
8
  * Only use this if it's are absolutely neccessary, and only in tests.
9
9
  */
10
10
  export declare const _test_THEMES: {
11
11
  v3: ThemeV3Type;
12
- v5light: ThemeV5Type;
13
- v5dark: ThemeV5Type;
12
+ v3light: ThemeV3WithDarkModeSupportType;
13
+ v3dark: ThemeV3WithDarkModeSupportType;
14
14
  };
package/dist/Theme.js CHANGED
@@ -9,13 +9,13 @@ const figureOutTheme = (theme) => {
9
9
  if (!(0, lodash_1.isString)(theme)) {
10
10
  return theme;
11
11
  }
12
- if (theme === "v5light")
13
- return tokens_1.THEMES.v5light;
14
- if (theme === "v5dark")
15
- return tokens_1.THEMES.v5dark;
12
+ if (theme === "v3light")
13
+ return tokens_1.THEMES.v3light;
14
+ if (theme === "v3dark")
15
+ return tokens_1.THEMES.v3dark;
16
16
  return tokens_1.THEMES.v3;
17
17
  };
18
- const Theme = ({ children, theme = "v5light", }) => {
18
+ const Theme = ({ children, theme = "v3light", }) => {
19
19
  const actualTheme = figureOutTheme(theme);
20
20
  return (0, jsx_runtime_1.jsx)(native_1.ThemeProvider, { theme: actualTheme, children: children });
21
21
  };
package/dist/hooks.js CHANGED
@@ -22,7 +22,7 @@ const useTheme = () => {
22
22
  console.error("You are trying to use the `Theme` context but you have not wrapped your component/screen with `<Theme>`. Please wrap and try again.");
23
23
  throw new Error("ThemeContext is not defined. Wrap your component with `<Theme>` and try again.");
24
24
  }
25
- const defaultTheme = tokens_1.THEMES.v5light;
25
+ const defaultTheme = tokens_1.THEMES.v3light;
26
26
  const theme = maybeTheme ?? defaultTheme;
27
27
  return {
28
28
  theme: theme,
package/dist/tokens.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * All of the config for the Artsy theming system, based on the
3
3
  * design system from our design team:
4
- * https://www.notion.so/artsy/Master-Library-810612339f474d0997fe359af4285c56
4
+ * https://www.figma.com/file/gZNkyqLT8AU3T61tluVJyB/Artsy-3.1-Design-System
5
5
  */
6
6
  import { SpacingUnit as SpacingUnitV3Numbers } from "@artsy/palette-tokens/dist/themes/v3";
7
7
  import { TextTreatment as TextTreatmentWithUnits, TextVariant as TextVariantV3 } from "@artsy/palette-tokens/dist/typography/v3";
@@ -41,7 +41,7 @@ export type ThemeV3Type = {
41
41
  };
42
42
  textTreatments: Record<TextVariantV3, TextTreatment>;
43
43
  };
44
- export type ThemeV5Type = {
44
+ export type ThemeV3WithDarkModeSupportType = {
45
45
  space: Record<SpacingUnitV3Numbers, `${number}px`>;
46
46
  colors: Record<ColorStrict, string>;
47
47
  fonts: {
@@ -54,11 +54,11 @@ export type ThemeV5Type = {
54
54
  };
55
55
  textTreatments: Record<TextVariantV3, TextTreatment>;
56
56
  };
57
- export type AllThemesType = ThemeV3Type & ThemeV5Type;
57
+ export type AllThemesType = ThemeV3Type & ThemeV3WithDarkModeSupportType;
58
58
  export declare const THEMES: {
59
59
  v3: ThemeV3Type;
60
- v5light: ThemeV5Type;
61
- v5dark: ThemeV5Type;
60
+ v3light: ThemeV3WithDarkModeSupportType;
61
+ v3dark: ThemeV3WithDarkModeSupportType;
62
62
  };
63
63
  export type SpacingUnitsTheme = {
64
64
  space: Record<SpacingUnit, any>;
package/dist/tokens.js CHANGED
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * All of the config for the Artsy theming system, based on the
4
4
  * design system from our design team:
5
- * https://www.notion.so/artsy/Master-Library-810612339f474d0997fe359af4285c56
5
+ * https://www.figma.com/file/gZNkyqLT8AU3T61tluVJyB/Artsy-3.1-Design-System
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.THEMES = exports.isNamedLayerName = exports.isUsageLayerName = exports.ROLE_LAYER_NAMES = exports.NAMED_LAYER_NAMES = void 0;
@@ -118,7 +118,7 @@ exports.THEMES = {
118
118
  },
119
119
  textTreatments: fixTextTreatments(textVariantsWithUnits),
120
120
  },
121
- get v5light() {
121
+ get v3light() {
122
122
  return {
123
123
  ...this.v3,
124
124
  colors: {
@@ -146,7 +146,7 @@ exports.THEMES = {
146
146
  },
147
147
  };
148
148
  },
149
- get v5dark() {
149
+ get v3dark() {
150
150
  return {
151
151
  ...this.v3,
152
152
  colors: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "8.7.4",
3
+ "version": "8.7.5",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "react-native run-android",