@sanity/ui 1.0.0 → 1.0.2

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": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "sideEffects": false,
5
5
  "types": "./dist/index.d.ts",
6
6
  "source": "./src/index.ts",
@@ -24,65 +24,66 @@
24
24
  "scripts": {
25
25
  "build": "run-s clean build:pkg check:pkg",
26
26
  "build:pkg": "pkg build --strict",
27
- "build:workshop": "node scripts/build",
28
27
  "check:pkg": "pkg --strict",
29
28
  "check:types": "tsc",
30
29
  "clean": "rimraf .workshop dist",
31
30
  "commit": "cz",
31
+ "cypress:dev": "run-p dev cypress:open",
32
32
  "cypress:open": "cypress open",
33
33
  "cypress:run": "cypress run",
34
- "dev": "node scripts/dev",
35
- "dev:cypress": "run-p dev cypress:open",
34
+ "dev": "run-s workshop:dev",
36
35
  "format": "prettier --write --cache --ignore-unknown .",
37
36
  "lint": "eslint . --ext .cjs,.js,.jsx,.mjs,.ts,.tsx --quiet",
38
37
  "prepare": "husky install",
39
38
  "prepublishOnly": "pnpm build",
40
39
  "release": "semantic-release",
41
- "start:workshop": "http-server -a localhost -c-0 -p 1337 -s -P http://localhost:1337/index.html? .workshop/dist",
42
40
  "test": "jest",
43
- "test:browser": "start-server-and-test 'run-s build:workshop start:workshop' http://localhost:1337 'run-s cypress:run'",
44
- "watch": "pkg watch --strict"
41
+ "test:browser": "start-server-and-test 'run-s workshop:build workshop:start' http://localhost:1337 'run-s cypress:run'",
42
+ "watch": "pkg watch --strict",
43
+ "workshop:build": "node -r esbuild-register -r tsconfig-paths/register scripts/build",
44
+ "workshop:dev": "node -r esbuild-register -r tsconfig-paths/register scripts/dev",
45
+ "workshop:start": "http-server -a localhost -c-0 -p 1337 -s -P http://localhost:1337/index.html? dist"
45
46
  },
46
47
  "dependencies": {
47
- "@floating-ui/react-dom": "^1.0.0",
48
+ "@floating-ui/react-dom": "^1.0.1",
48
49
  "@sanity/color": "^2.1.20",
49
- "@sanity/icons": "^2.0.0",
50
+ "@sanity/icons": "^2.1.0",
50
51
  "csstype": "^3.1.1",
51
- "framer-motion": "^7.5.3",
52
+ "framer-motion": "^7.10.2",
52
53
  "react-refractor": "^2.1.7"
53
54
  },
54
55
  "devDependencies": {
55
- "@babel/core": "^7.20.2",
56
+ "@babel/core": "^7.20.5",
56
57
  "@babel/preset-env": "^7.20.2",
57
58
  "@babel/preset-react": "^7.18.6",
58
59
  "@babel/preset-typescript": "^7.18.6",
59
60
  "@commitlint/cli": "^17.3.0",
60
61
  "@commitlint/config-conventional": "^17.3.0",
61
62
  "@juggle/resize-observer": "^3.4.0",
62
- "@sanity/pkg-utils": "^1.18.0",
63
- "@sanity/semantic-release-preset": "^2.0.2",
64
- "@sanity/ui-workshop": "1.0.0-beta.9",
63
+ "@sanity/pkg-utils": "^1.20.4",
64
+ "@sanity/semantic-release-preset": "^2.0.4",
65
+ "@sanity/ui-workshop": "^1.0.1",
65
66
  "@testing-library/dom": "^8.19.0",
66
67
  "@testing-library/jest-dom": "^5.16.5",
67
68
  "@testing-library/react": "^13.4.0",
68
- "@types/jest": "^29.2.3",
69
+ "@types/jest": "^29.2.4",
69
70
  "@types/jest-axe": "^3.5.5",
70
- "@types/node": "^18.11.9",
71
- "@types/react": "^18.0.25",
71
+ "@types/node": "^18.11.16",
72
+ "@types/react": "^18.0.26",
72
73
  "@types/react-dom": "^18.0.9",
73
74
  "@types/react-is": "^17.0.3",
74
75
  "@types/refractor": "^3.0.2",
75
76
  "@types/styled-components": "^5.1.26",
76
77
  "@types/testing-library__jest-dom": "^5.14.5",
77
- "@typescript-eslint/eslint-plugin": "^5.44.0",
78
- "@typescript-eslint/parser": "^5.44.0",
79
- "commitizen": "^4.2.5",
78
+ "@typescript-eslint/eslint-plugin": "^5.46.1",
79
+ "@typescript-eslint/parser": "^5.46.1",
80
+ "commitizen": "^4.2.6",
80
81
  "cypress": "^11.2.0",
81
82
  "cypress-real-events": "^1.7.4",
82
83
  "cz-conventional-changelog": "^3.3.0",
83
- "esbuild": "^0.15.15",
84
- "esbuild-register": "^3.4.1",
85
- "eslint": "^8.28.0",
84
+ "esbuild": "^0.16.7",
85
+ "esbuild-register": "^3.4.2",
86
+ "eslint": "^8.29.0",
86
87
  "eslint-config-prettier": "^8.5.0",
87
88
  "eslint-plugin-import": "^2.26.0",
88
89
  "eslint-plugin-jsx-a11y": "^6.6.1",
@@ -94,18 +95,19 @@
94
95
  "jest": "^29.3.1",
95
96
  "jest-axe": "^7.0.0",
96
97
  "jest-environment-jsdom": "^29.3.1",
97
- "lint-staged": "^13.0.3",
98
+ "lint-staged": "^13.1.0",
98
99
  "module-alias": "^2.2.2",
99
100
  "npm-run-all": "^4.1.5",
100
- "prettier": "^2.8.0",
101
+ "prettier": "^2.8.1",
101
102
  "react": "^18.2.0",
102
103
  "react-dom": "^18.2.0",
103
104
  "react-is": "^18.2.0",
104
105
  "rimraf": "^3.0.2",
105
106
  "semantic-release": "^19.0.5",
106
- "start-server-and-test": "^1.14.0",
107
+ "start-server-and-test": "^1.15.2",
107
108
  "styled-components": "^5.3.6",
108
- "typescript": "^4.9.3"
109
+ "tsconfig-paths": "^4.1.1",
110
+ "typescript": "^4.9.4"
109
111
  },
110
112
  "peerDependencies": {
111
113
  "react": "^18",
@@ -149,6 +151,7 @@
149
151
  "branches": [
150
152
  "+([0-9])?(.{+([0-9]),x}).x",
151
153
  "main",
154
+ "next",
152
155
  {
153
156
  "name": "beta",
154
157
  "prerelease": true
@@ -95,7 +95,8 @@ function ConstrainedHeightExampleField({id, label}: {id: string; label: string})
95
95
  constrainSize
96
96
  matchReferenceWidth
97
97
  open
98
- placement="bottom"
98
+ overflow="auto"
99
+ placement="bottom-start"
99
100
  radius={1}
100
101
  ref={popoverRef}
101
102
  referenceElement={inputElement}
@@ -118,7 +119,6 @@ function ConstrainedHeightExampleField({id, label}: {id: string; label: string})
118
119
  openButton
119
120
  options={options}
120
121
  placeholder="Search"
121
- // popover={{allowedAutoPlacements: ['bottom-start', 'top-start']}}
122
122
  radius={1}
123
123
  renderOption={renderOption}
124
124
  renderPopover={renderPopover}
package/src/global.ts ADDED
@@ -0,0 +1,6 @@
1
+ declare global {
2
+ // eslint-disable-next-line no-var
3
+ var __DEV__: boolean
4
+ }
5
+
6
+ export {}
@@ -292,6 +292,7 @@ export const TextInput = forwardRef(function TextInput(
292
292
  tone={customValidity ? 'critical' : 'inherit'}
293
293
  >
294
294
  <Button
295
+ aria-label="Clear"
295
296
  data-qa="clear-button"
296
297
  fontSize={fontSize}
297
298
  icon={CloseIcon}