@artsy/palette 41.8.0 → 41.8.1

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,6 +1,147 @@
1
1
  import React from "react";
2
2
  export * from "@artsy/palette-tokens/dist/themes/v3";
3
3
  export { TextVariant } from "@artsy/palette-tokens/dist/typography/v3";
4
+ export declare const THEMES: {
5
+ light: {
6
+ id: string;
7
+ name: string;
8
+ breakpoints: string[] & {
9
+ lg: string;
10
+ md: string;
11
+ sm: string;
12
+ xs: string;
13
+ };
14
+ colors: {
15
+ mono100: string;
16
+ mono60: string;
17
+ mono30: string;
18
+ mono15: string;
19
+ mono10: string;
20
+ mono5: string;
21
+ mono0: string;
22
+ blue200: string;
23
+ blue150: string;
24
+ blue100: string;
25
+ brand: string;
26
+ blue15: string;
27
+ blue10: string;
28
+ green150: string;
29
+ green100: string;
30
+ green10: string;
31
+ yellow150: string;
32
+ yellow100: string;
33
+ yellow10: string;
34
+ orange150: string;
35
+ orange100: string;
36
+ orange10: string;
37
+ red150: string;
38
+ red100: string;
39
+ red50: string;
40
+ red10: string;
41
+ };
42
+ effects: {
43
+ dropShadow: string;
44
+ innerShadow: string;
45
+ flatShadow: string;
46
+ textShadow: string;
47
+ overlayGradient: string;
48
+ fadeRight: string;
49
+ backdrop: string;
50
+ };
51
+ fonts: {
52
+ sans: string;
53
+ };
54
+ mediaQueries: {
55
+ lg: string;
56
+ md: string;
57
+ sm: string;
58
+ xs: string;
59
+ hover: string;
60
+ };
61
+ grid: {
62
+ breakpoints: {};
63
+ };
64
+ space: {
65
+ 0.5: string;
66
+ 1: string;
67
+ 2: string;
68
+ 4: string;
69
+ 6: string;
70
+ 12: string;
71
+ };
72
+ textVariants: Record<"xxxl" | "xxl" | "xl" | "lg" | "lg-display" | "md" | "sm" | "sm-display" | "xs" | "xxs" | "bq", import("@artsy/palette-tokens/dist/typography/v3").TextTreatment>;
73
+ };
74
+ dark: {
75
+ id: string;
76
+ name: string;
77
+ colors: {
78
+ mono100: string;
79
+ mono60: string;
80
+ mono30: string;
81
+ mono15: string;
82
+ mono10: string;
83
+ mono5: string;
84
+ mono0: string;
85
+ blue200: string;
86
+ blue150: string;
87
+ blue100: string;
88
+ brand: string;
89
+ blue15: string;
90
+ blue10: string;
91
+ green150: string;
92
+ green100: string;
93
+ green10: string;
94
+ yellow150: string;
95
+ yellow100: string;
96
+ yellow10: string;
97
+ orange150: string;
98
+ orange100: string;
99
+ orange10: string;
100
+ red150: string;
101
+ red100: string;
102
+ red50: string;
103
+ red10: string;
104
+ };
105
+ effects: {
106
+ /** Returns the current theme */
107
+ dropShadow: string;
108
+ innerShadow: string;
109
+ flatShadow: string;
110
+ textShadow: string;
111
+ overlayGradient: string;
112
+ fadeRight: string;
113
+ backdrop: string;
114
+ };
115
+ breakpoints: string[] & {
116
+ lg: string;
117
+ md: string;
118
+ sm: string;
119
+ xs: string;
120
+ };
121
+ fonts: {
122
+ sans: string;
123
+ };
124
+ mediaQueries: {
125
+ lg: string;
126
+ md: string;
127
+ sm: string;
128
+ xs: string;
129
+ hover: string;
130
+ };
131
+ grid: {
132
+ breakpoints: {};
133
+ };
134
+ space: {
135
+ 0.5: string;
136
+ 1: string;
137
+ 2: string;
138
+ 4: string;
139
+ 6: string;
140
+ 12: string;
141
+ };
142
+ textVariants: Record<"xxxl" | "xxl" | "xl" | "lg" | "lg-display" | "md" | "sm" | "sm-display" | "xs" | "xxs" | "bq", import("@artsy/palette-tokens/dist/typography/v3").TextTreatment>;
143
+ };
144
+ };
4
145
  interface ThemeProps {
5
146
  children?: React.ReactNode;
6
147
  theme?: "light" | "dark";
package/dist/Theme.js CHANGED
@@ -5,10 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  var _exportNames = {
8
+ THEMES: true,
8
9
  Theme: true,
9
10
  useTheme: true,
10
11
  TextVariant: true
11
12
  };
13
+ exports.THEMES = void 0;
12
14
  Object.defineProperty(exports, "TextVariant", {
13
15
  enumerable: true,
14
16
  get: function get() {
@@ -39,6 +41,7 @@ var THEMES = {
39
41
  light: _themes.THEME,
40
42
  dark: _v3Dark.THEME_DARK
41
43
  };
44
+ exports.THEMES = THEMES;
42
45
  var DEFAULT_THEME = _themes.THEME;
43
46
  /**
44
47
  * A wrapper component for passing down the Artsy theme context
package/dist/Theme.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_themes","_v","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_v3Dark","_v2","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","THEMES","light","THEME","dark","THEME_DARK","DEFAULT_THEME","Theme","_ref","children","_ref$theme","theme","selectedTheme","createElement","ThemeProvider","displayName","useTheme","useContext","ThemeContext"],"sources":["../src/Theme.tsx"],"sourcesContent":["import React, { useContext } from \"react\"\nimport { ThemeContext, ThemeProvider } from \"styled-components\"\nimport { THEME, Theme as TTheme } from \"./themes\"\n\nexport * from \"@artsy/palette-tokens/dist/themes/v3\"\nimport { THEME_DARK } from \"@artsy/palette-tokens/dist/themes/v3Dark\"\nexport { TextVariant } from \"@artsy/palette-tokens/dist/typography/v3\"\n\nconst THEMES = {\n light: THEME,\n dark: THEME_DARK,\n}\n\nconst DEFAULT_THEME = THEME\n\ninterface ThemeProps {\n children?: React.ReactNode\n theme?: \"light\" | \"dark\"\n}\n\n/**\n * A wrapper component for passing down the Artsy theme context\n */\nexport const Theme: React.FC<React.PropsWithChildren<ThemeProps>> = ({ children, theme = \"light\" }) => {\n const selectedTheme = THEMES[theme]\n return <ThemeProvider theme={selectedTheme}>{children}</ThemeProvider>\n}\n\n/** Returns the current theme */\nexport const useTheme = <T extends TTheme>() => {\n const theme: T = (useContext(Theme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CAAA,EAA2B;EAC9C,IAAML,KAAQ,GAAI,IAAAM,iBAAU,EAACC,8BAAY,CAAC,IAAIZ,aAAmB;EACjE,OAAO;IAAEK,KAAK,EAALA;EAAM,CAAC;AAClB,CAAC;AAAAhC,OAAA,CAAAqC,QAAA,GAAAA,QAAA"}
1
+ {"version":3,"file":"Theme.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_themes","_v","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_v3Dark","_v2","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","THEMES","light","THEME","dark","THEME_DARK","DEFAULT_THEME","Theme","_ref","children","_ref$theme","theme","selectedTheme","createElement","ThemeProvider","displayName","useTheme","useContext","ThemeContext"],"sources":["../src/Theme.tsx"],"sourcesContent":["import React, { useContext } from \"react\"\nimport { ThemeContext, ThemeProvider } from \"styled-components\"\nimport { THEME, Theme as TTheme } from \"./themes\"\n\nexport * from \"@artsy/palette-tokens/dist/themes/v3\"\nimport { THEME_DARK } from \"@artsy/palette-tokens/dist/themes/v3Dark\"\nexport { TextVariant } from \"@artsy/palette-tokens/dist/typography/v3\"\n\nexport const THEMES = {\n light: THEME,\n dark: THEME_DARK,\n}\n\nconst DEFAULT_THEME = THEME\n\ninterface ThemeProps {\n children?: React.ReactNode\n theme?: \"light\" | \"dark\"\n}\n\n/**\n * A wrapper component for passing down the Artsy theme context\n */\nexport const Theme: React.FC<React.PropsWithChildren<ThemeProps>> = ({\n children,\n theme = \"light\",\n}) => {\n const selectedTheme = THEMES[theme]\n return <ThemeProvider theme={selectedTheme}>{children}</ThemeProvider>\n}\n\n/** Returns the current theme */\nexport const useTheme = <T extends TTheme>() => {\n const theme: T = (useContext(ThemeContext) || DEFAULT_THEME) as T\n return { theme }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAA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Q,GAAI,IAAAM,iBAAU,EAACC,8BAAY,CAAC,IAAIZ,aAAmB;EACjE,OAAO;IAAEK,KAAK,EAALA;EAAM,CAAC;AAClB,CAAC;AAAAhC,OAAA,CAAAqC,QAAA,GAAAA,QAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette",
3
- "version": "41.8.0",
3
+ "version": "41.8.1",
4
4
  "description": "Design system library for react components",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
@@ -118,7 +118,7 @@
118
118
  },
119
119
  "dependencies": {
120
120
  "@artsy/icons": "^3.2.2",
121
- "@artsy/palette-tokens": "^7.0.0",
121
+ "@artsy/palette-tokens": "^7.0.1",
122
122
  "@seznam/compose-react-refs": "^1.0.6",
123
123
  "@styled-system/theme-get": "^5.1.2",
124
124
  "es-toolkit": "^1.16.0",
@@ -187,5 +187,5 @@
187
187
  "url": "http://localhost"
188
188
  }
189
189
  },
190
- "gitHead": "85a1a41d546c86902279dabbb0c84e5cfc8a5302"
190
+ "gitHead": "a677dc3f0858561f042de36a4560f6678de262a9"
191
191
  }