@sanity/ui 2.8.11-canary.0 → 2.8.12
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/_chunks-cjs/getTheme_v2.js +28 -84
- package/dist/_chunks-cjs/getTheme_v2.js.map +1 -1
- package/dist/_chunks-es/getTheme_v2.mjs +28 -84
- package/dist/_chunks-es/getTheme_v2.mjs.map +1 -1
- package/dist/_legacy/getTheme_v2.esm.js +28 -84
- package/dist/_legacy/getTheme_v2.esm.js.map +1 -1
- package/dist/index.esm.js +2949 -2950
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2942 -2942
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2949 -2950
- package/dist/index.mjs.map +1 -1
- package/dist/theme.esm.js +448 -1197
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +448 -1197
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +448 -1197
- package/dist/theme.mjs.map +1 -1
- package/package.json +66 -60
- package/src/core/primitives/button/button.tsx +11 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.12",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"sanity",
|
|
6
6
|
"ui",
|
|
@@ -51,6 +51,32 @@
|
|
|
51
51
|
"src",
|
|
52
52
|
"theme.js"
|
|
53
53
|
],
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "run-s clean pkg:build pkg:check figma:pkg:build",
|
|
56
|
+
"clean": "rimraf .workshop dist",
|
|
57
|
+
"commit": "cz",
|
|
58
|
+
"cypress:dev": "run-p dev cypress:open",
|
|
59
|
+
"cypress:open": "cypress open",
|
|
60
|
+
"cypress:run": "cypress run",
|
|
61
|
+
"dev": "run-p storybook:dev workshop:dev",
|
|
62
|
+
"figma:pkg:build": "cd figma && pnpm build",
|
|
63
|
+
"format": "prettier --write --cache --ignore-unknown .",
|
|
64
|
+
"lint": "eslint . --ext .cjs,.js,.jsx,.mjs,.ts,.tsx",
|
|
65
|
+
"pkg:build": "pkg build --strict",
|
|
66
|
+
"pkg:check": "pkg --strict",
|
|
67
|
+
"prepare": "husky install",
|
|
68
|
+
"prepack": "pnpm build",
|
|
69
|
+
"release": "semantic-release",
|
|
70
|
+
"storybook:build": "storybook build",
|
|
71
|
+
"storybook:dev": "storybook dev -p 6006",
|
|
72
|
+
"test": "jest",
|
|
73
|
+
"test:browser": "start-server-and-test 'run-s workshop:build workshop:start' http://localhost:1337 'run-s cypress:run'",
|
|
74
|
+
"ts:check": "tsc",
|
|
75
|
+
"watch": "pkg watch --strict",
|
|
76
|
+
"workshop:build": "workshop build",
|
|
77
|
+
"workshop:dev": "workshop dev",
|
|
78
|
+
"workshop:start": "http-server -a localhost -c-0 -p 1337 -s -P http://localhost:1337/index.html? dist"
|
|
79
|
+
},
|
|
54
80
|
"commitlint": {
|
|
55
81
|
"extends": [
|
|
56
82
|
"@commitlint/config-conventional"
|
|
@@ -79,69 +105,67 @@
|
|
|
79
105
|
"extends": "@sanity/semantic-release-preset"
|
|
80
106
|
},
|
|
81
107
|
"dependencies": {
|
|
82
|
-
"@floating-ui/react-dom": "^2.1.
|
|
108
|
+
"@floating-ui/react-dom": "^2.1.2",
|
|
83
109
|
"@sanity/color": "^3.0.6",
|
|
84
110
|
"@sanity/icons": "^3.4.0",
|
|
85
111
|
"csstype": "^3.1.3",
|
|
86
112
|
"framer-motion": "11.0.8",
|
|
87
|
-
"react-compiler-runtime": "19.0.0-beta-6fc168f-20241025",
|
|
88
113
|
"react-refractor": "^2.2.0",
|
|
89
114
|
"use-effect-event": "^1.0.2"
|
|
90
115
|
},
|
|
91
116
|
"devDependencies": {
|
|
92
|
-
"@babel/core": "^7.
|
|
93
|
-
"@babel/preset-env": "^7.
|
|
94
|
-
"@babel/preset-react": "^7.
|
|
95
|
-
"@babel/preset-typescript": "^7.
|
|
117
|
+
"@babel/core": "^7.26.0",
|
|
118
|
+
"@babel/preset-env": "^7.26.0",
|
|
119
|
+
"@babel/preset-react": "^7.25.9",
|
|
120
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
96
121
|
"@commitlint/cli": "^19.4.0",
|
|
97
122
|
"@commitlint/config-conventional": "^19.2.2",
|
|
98
123
|
"@juggle/resize-observer": "^3.4.0",
|
|
99
|
-
"@sanity/pkg-utils": "^6.11.
|
|
124
|
+
"@sanity/pkg-utils": "^6.11.7",
|
|
100
125
|
"@sanity/prettier-config": "^1.0.2",
|
|
101
126
|
"@sanity/semantic-release-preset": "^5.0.0",
|
|
102
127
|
"@sanity/ui-workshop": "^2.0.16",
|
|
103
|
-
"@storybook/addon-a11y": "^8.
|
|
104
|
-
"@storybook/addon-docs": "^8.
|
|
105
|
-
"@storybook/addon-essentials": "^8.
|
|
106
|
-
"@storybook/addon-interactions": "^8.
|
|
107
|
-
"@storybook/addon-links": "^8.
|
|
108
|
-
"@storybook/addon-mdx-gfm": "^8.
|
|
109
|
-
"@storybook/addon-storysource": "^8.
|
|
110
|
-
"@storybook/addon-themes": "^8.
|
|
111
|
-
"@storybook/blocks": "^8.
|
|
112
|
-
"@storybook/manager-api": "^8.
|
|
113
|
-
"@storybook/react": "^8.
|
|
114
|
-
"@storybook/react-vite": "^8.
|
|
115
|
-
"@storybook/test": "^8.
|
|
116
|
-
"@storybook/theming": "^8.
|
|
128
|
+
"@storybook/addon-a11y": "^8.3.6",
|
|
129
|
+
"@storybook/addon-docs": "^8.3.6",
|
|
130
|
+
"@storybook/addon-essentials": "^8.3.6",
|
|
131
|
+
"@storybook/addon-interactions": "^8.3.6",
|
|
132
|
+
"@storybook/addon-links": "^8.3.6",
|
|
133
|
+
"@storybook/addon-mdx-gfm": "^8.3.6",
|
|
134
|
+
"@storybook/addon-storysource": "^8.3.6",
|
|
135
|
+
"@storybook/addon-themes": "^8.3.6",
|
|
136
|
+
"@storybook/blocks": "^8.3.6",
|
|
137
|
+
"@storybook/manager-api": "^8.3.6",
|
|
138
|
+
"@storybook/react": "^8.3.6",
|
|
139
|
+
"@storybook/react-vite": "^8.3.6",
|
|
140
|
+
"@storybook/test": "^8.3.6",
|
|
141
|
+
"@storybook/theming": "^8.3.6",
|
|
117
142
|
"@testing-library/dom": "^10.4.0",
|
|
118
|
-
"@testing-library/jest-dom": "^6.
|
|
119
|
-
"@testing-library/react": "^16.0.
|
|
143
|
+
"@testing-library/jest-dom": "^6.6.2",
|
|
144
|
+
"@testing-library/react": "^16.0.1",
|
|
120
145
|
"@testing-library/user-event": "^14.5.2",
|
|
121
146
|
"@types/jest": "^29.5.12",
|
|
122
147
|
"@types/jest-axe": "^3.5.9",
|
|
123
148
|
"@types/node": "^20.12.7",
|
|
124
|
-
"@types/react": "^18.3.
|
|
125
|
-
"@types/react-dom": "^18.3.
|
|
149
|
+
"@types/react": "^18.3.12",
|
|
150
|
+
"@types/react-dom": "^18.3.1",
|
|
126
151
|
"@types/react-is": "^18.3.0",
|
|
127
152
|
"@types/refractor": "^3.4.1",
|
|
128
153
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
129
154
|
"@typescript-eslint/parser": "^7.18.0",
|
|
130
|
-
"babel-plugin-react-compiler": "beta",
|
|
131
155
|
"commitizen": "^4.3.0",
|
|
132
156
|
"cypress": "^13.13.2",
|
|
133
157
|
"cypress-real-events": "^1.13.0",
|
|
134
158
|
"cz-conventional-changelog": "^3.3.0",
|
|
135
|
-
"eslint": "^8.57.
|
|
159
|
+
"eslint": "^8.57.1",
|
|
136
160
|
"eslint-config-prettier": "^9.1.0",
|
|
137
161
|
"eslint-plugin-boundaries": "^4.2.2",
|
|
138
|
-
"eslint-plugin-import": "^2.
|
|
139
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
162
|
+
"eslint-plugin-import": "^2.31.0",
|
|
163
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
140
164
|
"eslint-plugin-prettier": "^5.2.1",
|
|
141
|
-
"eslint-plugin-react": "^7.
|
|
165
|
+
"eslint-plugin-react": "^7.37.2",
|
|
142
166
|
"eslint-plugin-react-compiler": "beta",
|
|
143
|
-
"eslint-plugin-react-hooks": "^
|
|
144
|
-
"eslint-plugin-storybook": "^0.
|
|
167
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
168
|
+
"eslint-plugin-storybook": "^0.10.1",
|
|
145
169
|
"http-server": "^14.1.1",
|
|
146
170
|
"husky": "^8.0.3",
|
|
147
171
|
"jest": "^29.7.0",
|
|
@@ -158,8 +182,8 @@
|
|
|
158
182
|
"rimraf": "^5.0.5",
|
|
159
183
|
"semantic-release": "^24.0.0",
|
|
160
184
|
"start-server-and-test": "^2.0.5",
|
|
161
|
-
"storybook": "^8.
|
|
162
|
-
"styled-components": "^6.1.
|
|
185
|
+
"storybook": "^8.3.6",
|
|
186
|
+
"styled-components": "^6.1.13",
|
|
163
187
|
"tsconfig-paths": "^4.2.0",
|
|
164
188
|
"typescript": "5.5.3",
|
|
165
189
|
"vite": "^5.4.2",
|
|
@@ -171,37 +195,19 @@
|
|
|
171
195
|
"react-is": "^18",
|
|
172
196
|
"styled-components": "^5.2 || ^6"
|
|
173
197
|
},
|
|
198
|
+
"packageManager": "pnpm@9.12.3",
|
|
174
199
|
"engines": {
|
|
175
200
|
"node": ">=14.0.0"
|
|
176
201
|
},
|
|
177
202
|
"publishConfig": {
|
|
178
203
|
"access": "public"
|
|
179
204
|
},
|
|
205
|
+
"pnpm": {
|
|
206
|
+
"overrides": {
|
|
207
|
+
"conventional-changelog-conventionalcommits": ">= 8.0.0"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
180
210
|
"esm.sh": {
|
|
181
211
|
"bundle": false
|
|
182
|
-
},
|
|
183
|
-
"scripts": {
|
|
184
|
-
"build": "run-s clean pkg:build pkg:check figma:pkg:build",
|
|
185
|
-
"clean": "rimraf .workshop dist",
|
|
186
|
-
"commit": "cz",
|
|
187
|
-
"cypress:dev": "run-p dev cypress:open",
|
|
188
|
-
"cypress:open": "cypress open",
|
|
189
|
-
"cypress:run": "cypress run",
|
|
190
|
-
"dev": "run-p storybook:dev workshop:dev",
|
|
191
|
-
"figma:pkg:build": "cd figma && pnpm build",
|
|
192
|
-
"format": "prettier --write --cache --ignore-unknown .",
|
|
193
|
-
"lint": "eslint . --ext .cjs,.js,.jsx,.mjs,.ts,.tsx",
|
|
194
|
-
"pkg:build": "pkg build --strict",
|
|
195
|
-
"pkg:check": "pkg --strict",
|
|
196
|
-
"release": "semantic-release",
|
|
197
|
-
"storybook:build": "storybook build",
|
|
198
|
-
"storybook:dev": "storybook dev -p 6006",
|
|
199
|
-
"test": "jest",
|
|
200
|
-
"test:browser": "start-server-and-test 'run-s workshop:build workshop:start' http://localhost:1337 'run-s cypress:run'",
|
|
201
|
-
"ts:check": "tsc",
|
|
202
|
-
"watch": "pkg watch --strict",
|
|
203
|
-
"workshop:build": "workshop build",
|
|
204
|
-
"workshop:dev": "workshop dev",
|
|
205
|
-
"workshop:start": "http-server -a localhost -c-0 -p 1337 -s -P http://localhost:1337/index.html? dist"
|
|
206
212
|
}
|
|
207
|
-
}
|
|
213
|
+
}
|
|
@@ -149,15 +149,17 @@ export const Button = forwardRef(function Button(
|
|
|
149
149
|
)}
|
|
150
150
|
|
|
151
151
|
{text && (
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
152
|
+
<Box>
|
|
153
|
+
<Text
|
|
154
|
+
muted={muted}
|
|
155
|
+
align={textAlign}
|
|
156
|
+
size={fontSize}
|
|
157
|
+
textOverflow="ellipsis"
|
|
158
|
+
weight={button.textWeight}
|
|
159
|
+
>
|
|
160
|
+
{text}
|
|
161
|
+
</Text>
|
|
162
|
+
</Box>
|
|
161
163
|
)}
|
|
162
164
|
|
|
163
165
|
{IconRightComponent && (
|