@sanity/ui 2.0.0-alpha.35 → 2.0.0-alpha.36

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
@@ -8,42 +8,64 @@ import type {StyledObject} from 'styled-components'
8
8
  */
9
9
  export declare interface BaseTheme {
10
10
  _version?: 0
11
+ /**
12
+ * @deprecated Use `v2.avatar` instead
13
+ */
11
14
  avatar: ThemeAvatar
15
+ /**
16
+ * @deprecated Use `v2.button` instead
17
+ */
12
18
  button: {
13
- border: {
14
- width: number
15
- }
16
- focusRing: ThemeFocusRing
17
19
  textWeight: ThemeFontWeightKey
18
20
  }
19
- card: {
20
- border: {
21
- width: number
22
- }
23
- focusRing: ThemeFocusRing
24
- shadow: {
25
- outline: number
26
- }
27
- }
21
+ /**
22
+ * @deprecated Use `v2.color` instead
23
+ */
28
24
  color: ThemeColorSchemes
25
+ /**
26
+ * @deprecated Use `v2.container` instead
27
+ */
29
28
  container: number[]
30
- /** @deprecated Use component-specific `focusRing` values instead */
29
+ /**
30
+ * @deprecated Use component-specific `v2.{button | card | input}.focusRing` values instead
31
+ */
31
32
  focusRing: {
32
33
  offset: number
33
34
  width: number
34
35
  }
36
+ /**
37
+ * @deprecated Use `v2.font` instead
38
+ */
35
39
  fonts: ThemeFonts
40
+ /**
41
+ * @deprecated Use `v2.input` instead
42
+ */
36
43
  input: ThemeInput
37
44
  /**
38
45
  * THIS API MAY BE UNSTABLE. DO NOT USE IN PRODUCTION.
39
46
  * @beta
47
+ * @deprecated Use `v2.layer` instead
40
48
  */
41
49
  layer?: ThemeLayer
50
+ /**
51
+ * @deprecated Use `v2.media` instead
52
+ */
42
53
  media: number[]
54
+ /**
55
+ * @deprecated Use `v2.radius` instead
56
+ */
43
57
  radius: number[]
58
+ /**
59
+ * @deprecated Use `v2.shadow` instead
60
+ */
44
61
  shadows: Array<ThemeShadow | null>
62
+ /**
63
+ * @deprecated Use `v2.space` instead
64
+ */
45
65
  space: number[]
46
- /** @internal */
66
+ /**
67
+ * @deprecated Use `v2.style` instead
68
+ */
47
69
  styles?: ThemeStyles
48
70
  v2?: RootTheme_v2
49
71
  }
@@ -418,6 +440,9 @@ export declare type Styles = ThemeStyles
418
440
  */
419
441
  export declare interface Theme {
420
442
  sanity: Omit<RootTheme, 'color' | 'v2'> & {
443
+ /**
444
+ * @deprecated Use `v2.color` instead
445
+ */
421
446
  color: ThemeColor
422
447
  v2?: Theme_v2
423
448
  }
package/dist/theme.esm.js CHANGED
@@ -1680,8 +1680,11 @@ function getTheme_v2(theme) {
1680
1680
  const v2 = {
1681
1681
  _version: 2,
1682
1682
  avatar: theme.sanity.avatar,
1683
- button: theme.sanity.button,
1684
- card: theme.sanity.card,
1683
+ button: {
1684
+ ...defaultThemeConfig.button,
1685
+ ...theme.sanity.button
1686
+ },
1687
+ card: defaultThemeConfig.card,
1685
1688
  color: themeColor_v0_v2(theme.sanity.color),
1686
1689
  container: theme.sanity.container,
1687
1690
  font: theme.sanity.fonts,
@@ -1710,7 +1713,6 @@ function v0_v2(v0) {
1710
1713
  const {
1711
1714
  avatar,
1712
1715
  button,
1713
- card,
1714
1716
  color,
1715
1717
  container,
1716
1718
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -1727,8 +1729,11 @@ function v0_v2(v0) {
1727
1729
  const v2 = {
1728
1730
  _version: 2,
1729
1731
  avatar,
1730
- button,
1731
- card,
1732
+ button: {
1733
+ ...defaultThemeConfig.button,
1734
+ ...button
1735
+ },
1736
+ card: defaultThemeConfig.card,
1732
1737
  color: {
1733
1738
  light: {
1734
1739
  transparent: themeColor_v0_v2(color.light.transparent),
@@ -1767,7 +1772,6 @@ function v2_v0(v2) {
1767
1772
  const {
1768
1773
  avatar,
1769
1774
  button,
1770
- card,
1771
1775
  color,
1772
1776
  container,
1773
1777
  font: fonts,
@@ -1782,7 +1786,6 @@ function v2_v0(v2) {
1782
1786
  _version: 0,
1783
1787
  avatar,
1784
1788
  button,
1785
- card,
1786
1789
  container,
1787
1790
  color: {
1788
1791
  light: {