@sanity/ui 0.38.1 → 0.38.2-next.4
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/sanity-ui.cjs +9734 -254
- package/dist/sanity-ui.cjs.map +1 -1
- package/dist/sanity-ui.js +9608 -254
- package/dist/sanity-ui.js.map +1 -1
- package/package.json +4 -4
- package/src/styles/font/responsiveFont.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.2-next.4+e7b282f0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"module": "./dist/sanity-ui.js",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@juggle/resize-observer": "^3.4.0",
|
|
33
33
|
"@popperjs/core": "^2.11.6",
|
|
34
34
|
"@reach/auto-id": "^0.17.0",
|
|
35
|
-
"@sanity/color": "
|
|
36
|
-
"@sanity/icons": "
|
|
35
|
+
"@sanity/color": "2.1.16-next.4+e7b282f0",
|
|
36
|
+
"@sanity/icons": "1.3.6-next.4+e7b282f0",
|
|
37
37
|
"framer-motion": "6.3.0",
|
|
38
38
|
"popper-max-size-modifier": "^0.2.0",
|
|
39
39
|
"react-is": "^17.0.2",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "e7b282f0b819b53d3a24de57a24f254faebd82c3"
|
|
75
75
|
}
|
|
@@ -48,6 +48,19 @@ export function responsiveFont(
|
|
|
48
48
|
},
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
// @TODO fix the real condition that is causing $size to be undefined sometimes
|
|
52
|
+
if (!$size) {
|
|
53
|
+
// @ts-expect-error: `warned` isn't typed, the underlying issue should be solved rather than typing it
|
|
54
|
+
if (!responsiveFont.warned) {
|
|
55
|
+
// eslint-disable-next-line no-console
|
|
56
|
+
console.warn('No size specified for responsive font', {fontKey, $size, props, base})
|
|
57
|
+
// @ts-expect-error: `warned` isn't typed, the underlying issue should be solved rather than typing it
|
|
58
|
+
responsiveFont.warned = true
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return [base]
|
|
62
|
+
}
|
|
63
|
+
|
|
51
64
|
const resp = _responsive(media, $size, (sizeIndex) => fontSize(sizes[sizeIndex] || defaultSize))
|
|
52
65
|
|
|
53
66
|
return [base, ...resp]
|