@sanity/ui 2.0.0-gamma.1 → 2.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/ui",
3
- "version": "2.0.0-gamma.1",
3
+ "version": "2.0.0",
4
4
  "sideEffects": false,
5
5
  "types": "./dist/index.d.ts",
6
6
  "source": "./exports/index.ts",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "dependencies": {
74
74
  "@floating-ui/react-dom": "^2.0.4",
75
- "@sanity/color": "3.0.0-beta.9",
75
+ "@sanity/color": "^3.0.0",
76
76
  "@sanity/icons": "^2.7.0",
77
77
  "csstype": "^3.1.2",
78
78
  "framer-motion": "^10.16.5",
@@ -206,10 +206,6 @@
206
206
  {
207
207
  "name": "alpha",
208
208
  "prerelease": true
209
- },
210
- {
211
- "name": "gamma",
212
- "prerelease": true
213
209
  }
214
210
  ]
215
211
  }
@@ -3,20 +3,60 @@ import {createGlobalStyle} from 'styled-components'
3
3
 
4
4
  const GlobalStyle = createGlobalStyle`
5
5
  @font-face {
6
- font-family: 'Inter';
6
+ font-family: Inter;
7
7
  font-style: normal;
8
- font-weight: 100 900;
8
+ font-weight: 400;
9
9
  font-display: swap;
10
- src: url('https://studio-static.sanity.io/InterVariable.ttf') format('ttf');
11
- font-named-instance: 'Regular';
10
+ src: url('https://studio-static.sanity.io/Inter-Regular.woff2') format('woff2');
12
11
  }
13
12
  @font-face {
14
- font-family: 'Inter';
13
+ font-family: Inter;
15
14
  font-style: italic;
16
- font-weight: 100 900;
15
+ font-weight: 400;
17
16
  font-display: swap;
18
- src: url('https://studio-static.sanity.io/InterVariable-Italic.ttf') format('ttf');
19
- font-named-instance: 'Italic';
17
+ src: url('https://studio-static.sanity.io/Inter-Italic.woff2') format('woff2');
18
+ }
19
+ @font-face {
20
+ font-family: Inter;
21
+ font-style: normal;
22
+ font-weight: 500;
23
+ font-display: swap;
24
+ src: url('https://studio-static.sanity.io/Inter-Medium.woff2') format('woff2');
25
+ }
26
+ @font-face {
27
+ font-family: Inter;
28
+ font-style: italic;
29
+ font-weight: 500;
30
+ font-display: swap;
31
+ src: url('https://studio-static.sanity.io/Inter-MediumItalic.woff2') format('woff2');
32
+ }
33
+ @font-face {
34
+ font-family: Inter;
35
+ font-style: normal;
36
+ font-weight: 600;
37
+ font-display: swap;
38
+ src: url('https://studio-static.sanity.io/Inter-SemiBold.woff2') format('woff2');
39
+ }
40
+ @font-face {
41
+ font-family: Inter;
42
+ font-style: italic;
43
+ font-weight: 600;
44
+ font-display: swap;
45
+ src: url('https://studio-static.sanity.io/Inter-SemiBoldItalic.woff2') format('woff2');
46
+ }
47
+ @font-face {
48
+ font-family: Inter;
49
+ font-style: normal;
50
+ font-weight: 700;
51
+ font-display: swap;
52
+ src: url('https://studio-static.sanity.io/Inter-Bold.woff2') format('woff2');
53
+ }
54
+ @font-face {
55
+ font-family: Inter;
56
+ font-style: italic;
57
+ font-weight: 700;
58
+ font-display: swap;
59
+ src: url('https://studio-static.sanity.io/Inter-BoldItalic.woff2') format('woff2');
20
60
  }
21
61
  `
22
62
 
@@ -72,7 +72,7 @@ export const Button = forwardRef(function Button(
72
72
  iconRight,
73
73
  justify: justifyProp = 'center',
74
74
  loading,
75
- mode = 'ghost',
75
+ mode = 'default',
76
76
  padding: paddingProp = 3,
77
77
  paddingX: paddingXProp,
78
78
  paddingY: paddingYProp,
@@ -14,7 +14,7 @@ export const defaultColorTokens: ThemeColorTokens = {
14
14
  fg: ['white', 'black'],
15
15
  },
16
16
  },
17
- backdrop: ['gray/200/0.2', 'black/0.5'],
17
+ backdrop: ['gray/200/0.5', 'black/0.5'],
18
18
  badge: {
19
19
  '*': {
20
20
  bg: ['100', '900'],
@@ -12,7 +12,13 @@ export interface ThemeColorState_v2 {
12
12
  accent: {
13
13
  fg: string
14
14
  }
15
+ /**
16
+ * @internal This may be removed in a future release
17
+ * */
15
18
  avatar: ThemeColorAvatar_v2
19
+ /**
20
+ * @internal This may be removed in a future release
21
+ * */
16
22
  badge: ThemeColorBadge_v2
17
23
  bg: string
18
24
  border: string
@@ -18,7 +18,6 @@ export interface ThemeColor extends Partial<Omit<ThemeColorGenericState, 'muted'
18
18
  button: ThemeColorButton
19
19
  card: ThemeColorCard
20
20
  dark: boolean
21
- focusRing?: string
22
21
  input: ThemeColorInput
23
22
  muted: ThemeColorMuted
24
23
  selectable?: ThemeColorSelectable
@@ -91,6 +91,7 @@ function themeColor_v2_v0(color_v2: ThemeColorCard_v2): ThemeColor {
91
91
  ...color_v2.button.default,
92
92
  transparent: color_v2.button.default.default,
93
93
  },
94
+ selectable: color_v2.selectable,
94
95
  spot: {
95
96
  gray: color_v2.avatar.gray.bg,
96
97
  blue: color_v2.avatar.blue.bg,