@sanity/ui 0.37.16 → 0.37.19

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,12 +1,12 @@
1
1
  {
2
2
  "name": "@sanity/ui",
3
- "version": "0.37.16",
3
+ "version": "0.37.19",
4
4
  "sideEffects": false,
5
5
  "source": "./src/index.ts",
6
6
  "exports": {
7
7
  ".": {
8
8
  "require": "./lib/sanity-ui.js",
9
- "default": "./lib/sanity-ui.modern.mjs"
9
+ "default": "./lib/sanity-ui.modern.js"
10
10
  }
11
11
  },
12
12
  "main": "./lib/sanity-ui.js",
@@ -33,8 +33,8 @@
33
33
  "@juggle/resize-observer": "^3.4.0",
34
34
  "@popperjs/core": "^2.11.6",
35
35
  "@reach/auto-id": "^0.17.0",
36
- "@sanity/color": "^2.1.13",
37
- "@sanity/icons": "^1.3.3",
36
+ "@sanity/color": "^2.1.14",
37
+ "@sanity/icons": "^1.3.4",
38
38
  "framer-motion": "6.3.0",
39
39
  "popper-max-size-modifier": "^0.2.0",
40
40
  "react-is": "^17.0.2",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "4650efb5fc7f539f42465ae515ad1b8312826091"
75
+ "gitHead": "0190c1b5b2882569b605647ea28af72e62f78725"
76
76
  }
@@ -24,7 +24,7 @@ export function dialogStyle({theme}: ThemeProps): CSSObject {
24
24
  alignItems: 'center',
25
25
  justifyContent: 'center',
26
26
  outline: 'none',
27
- background: color.shadow.penumbra,
27
+ background: color.shadow.umbra,
28
28
  }
29
29
  }
30
30
 
@@ -76,6 +76,7 @@ export const TextArea = forwardRef(function TextArea(
76
76
  <InputRoot>
77
77
  <Input
78
78
  data-as="textarea"
79
+ data-scheme={rootTheme.scheme}
79
80
  data-tone={rootTheme.tone}
80
81
  {...restProps}
81
82
  $fontSize={useArrayProp(fontSize)}
@@ -92,6 +93,7 @@ export const TextArea = forwardRef(function TextArea(
92
93
  $radius={useArrayProp(radius)}
93
94
  $scheme={rootTheme.scheme}
94
95
  $tone={rootTheme.tone}
96
+ data-scheme={rootTheme.scheme}
95
97
  data-tone={rootTheme.tone}
96
98
  />
97
99
  </InputRoot>
@@ -17,18 +17,19 @@ const NEUTRAL_TONES = ['default', 'transparent']
17
17
  export const color = createColorTheme({
18
18
  base: ({dark, name}) => {
19
19
  if (name === 'default') {
20
- const skeletonFrom = dark ? hues.gray[900].hex : hues.gray[100].hex
20
+ const tints = hues.gray
21
+ const skeletonFrom = dark ? tints[900].hex : tints[100].hex
21
22
 
22
23
  return {
23
24
  fg: dark ? white.hex : black.hex,
24
25
  bg: dark ? black.hex : white.hex,
25
- border: hues.gray[dark ? 800 : 200].hex,
26
+ border: tints[dark ? 800 : 200].hex,
26
27
  focusRing: hues.blue[dark ? 500 : 500].hex,
27
28
  shadow: {
28
- outline: rgba(hues.gray[500].hex, 0.4),
29
- umbra: rgba(dark ? black.hex : hues.gray[500].hex, 0.2),
30
- penumbra: rgba(dark ? black.hex : hues.gray[500].hex, 0.14),
31
- ambient: rgba(dark ? black.hex : hues.gray[500].hex, 0.12),
29
+ outline: rgba(tints[500].hex, 0.4),
30
+ umbra: dark ? rgba(tints[950].hex, 0.4) : rgba(tints[500].hex, 0.2),
31
+ penumbra: dark ? rgba(tints[950].hex, 0.28) : rgba(tints[500].hex, 0.14),
32
+ ambient: dark ? rgba(tints[950].hex, 0.24) : rgba(tints[500].hex, 0.12),
32
33
  },
33
34
  skeleton: {
34
35
  from: skeletonFrom,
@@ -47,10 +48,10 @@ export const color = createColorTheme({
47
48
  border: tints[dark ? 800 : 300].hex,
48
49
  focusRing: hues.blue[500].hex,
49
50
  shadow: {
50
- outline: rgba(tints[500].hex, dark ? 0.2 : 0.4),
51
- umbra: rgba(dark ? black.hex : tints[500].hex, 0.2),
52
- penumbra: rgba(dark ? black.hex : tints[500].hex, 0.14),
53
- ambient: rgba(dark ? black.hex : tints[500].hex, 0.12),
51
+ outline: rgba(tints[500].hex, 0.4),
52
+ umbra: dark ? rgba(tints[900].hex, 0.4) : rgba(tints[500].hex, 0.2),
53
+ penumbra: dark ? rgba(tints[900].hex, 0.28) : rgba(tints[500].hex, 0.14),
54
+ ambient: dark ? rgba(tints[900].hex, 0.24) : rgba(tints[500].hex, 0.12),
54
55
  },
55
56
  skeleton: {
56
57
  from: skeletonFrom,
@@ -68,10 +69,10 @@ export const color = createColorTheme({
68
69
  border: tints[dark ? 800 : 200].hex,
69
70
  focusRing: tints[500].hex,
70
71
  shadow: {
71
- outline: rgba(tints[500].hex, dark ? 0.2 : 0.4),
72
- umbra: rgba(dark ? black.hex : tints[500].hex, 0.2),
73
- penumbra: rgba(dark ? black.hex : tints[500].hex, 0.14),
74
- ambient: rgba(dark ? black.hex : tints[500].hex, 0.12),
72
+ outline: rgba(tints[500].hex, 0.4),
73
+ umbra: dark ? rgba(tints[900].hex, 0.4) : rgba(tints[500].hex, 0.2),
74
+ penumbra: dark ? rgba(tints[900].hex, 0.28) : rgba(tints[500].hex, 0.14),
75
+ ambient: dark ? rgba(tints[900].hex, 0.24) : rgba(tints[500].hex, 0.12),
75
76
  },
76
77
  skeleton: {
77
78
  from: skeletonFrom,