Skip to content

Commit 679fa35

Browse files
committed
feat!: use UI v4
1 parent b37bf00 commit 679fa35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1450
-1431
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- platform: macos-latest
2525
node-version: lts/*
2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828
- uses: pnpm/action-setup@v4
2929
- uses: actions/setup-node@v4
3030
with:
@@ -44,7 +44,7 @@ jobs:
4444
needs: test
4545
runs-on: ubuntu-latest
4646
steps:
47-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v5
4848
with:
4949
# Need to fetch entire commit history to
5050
# analyze every commit since last release

.github/workflows/react-compiler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
name: Should React Compiler dependencies be updated? 🤔
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121
- uses: pnpm/action-setup@v4
2222
- uses: actions/setup-node@v4
2323
with:

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,87 @@
55
All notable changes to this project will be documented in this file. See
66
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
77

8+
## [4.0.0-static.1](https://github.com/sanity-io/ui-workshop/compare/v3.3.0...v4.0.0-static.1) (2025-10-15)
9+
10+
### ⚠ BREAKING CHANGES
11+
12+
- use UI v4
13+
14+
### Features
15+
16+
- use UI v4 ([1b3dbc9](https://github.com/sanity-io/ui-workshop/commit/1b3dbc9316c9d7851e411ada1cb8a2231b68fd4f))
17+
18+
## [4.0.0-static.11](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.10...v4.0.0-static.11) (2025-08-07)
19+
20+
### Bug Fixes
21+
22+
- simplify media queries ([62055fc](https://github.com/sanity-io/ui-workshop/commit/62055fc645ed7a948b7ae45812868f663a82edd8))
23+
24+
## [4.0.0-static.10](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.9...v4.0.0-static.10) (2025-08-07)
25+
26+
### Bug Fixes
27+
28+
- **deps:** Update dependency @vitejs/plugin-react to v5 ([#191](https://github.com/sanity-io/ui-workshop/issues/191)) ([2013988](https://github.com/sanity-io/ui-workshop/commit/2013988fc5c35bef682bce0817933cd6fa3dc4dc))
29+
30+
## [4.0.0-static.9](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.8...v4.0.0-static.9) (2025-08-07)
31+
32+
### Bug Fixes
33+
34+
- stable bg color ([7e7cadd](https://github.com/sanity-io/ui-workshop/commit/7e7cadd203f73657b123497e172a4feafe88f675))
35+
36+
## [4.0.0-static.8](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.7...v4.0.0-static.8) (2025-08-07)
37+
38+
### Bug Fixes
39+
40+
- stable border colors ([369621e](https://github.com/sanity-io/ui-workshop/commit/369621ed0ec49c8cb60ca63007d81a0d13992464))
41+
42+
## [4.0.0-static.7](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.6...v4.0.0-static.7) (2025-08-07)
43+
44+
### Features
45+
46+
- allow configuring vanilla extract ([0124dbf](https://github.com/sanity-io/ui-workshop/commit/0124dbfb244aa819904dbfd8a93a035535880ba3))
47+
- use lightningcss to minify css ([7322fd7](https://github.com/sanity-io/ui-workshop/commit/7322fd7f5b3cea51079bf90bb23051682f51940f))
48+
49+
## [4.0.0-static.6](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.5...v4.0.0-static.6) (2025-08-06)
50+
51+
### Bug Fixes
52+
53+
- allow overflow on body ([742c451](https://github.com/sanity-io/ui-workshop/commit/742c451ebad9eca2a94c2352f063d0c192cf5e74))
54+
55+
## [4.0.0-static.5](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.4...v4.0.0-static.5) (2025-08-06)
56+
57+
### Bug Fixes
58+
59+
- provide fallback colors ([0c47af3](https://github.com/sanity-io/ui-workshop/commit/0c47af39e82c983a9fdebf6de13a6b5a788627fd))
60+
61+
## [4.0.0-static.4](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.3...v4.0.0-static.4) (2025-08-06)
62+
63+
### Bug Fixes
64+
65+
- add back meta tags ([cfbf5bb](https://github.com/sanity-io/ui-workshop/commit/cfbf5bb61124ce6286fd04a300a178d5cdc3af6c))
66+
67+
## [4.0.0-static.3](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.2...v4.0.0-static.3) (2025-08-06)
68+
69+
### Bug Fixes
70+
71+
- workaround workshop.runtime.ts css import regression ([bebacee](https://github.com/sanity-io/ui-workshop/commit/bebaceed85a572a414f735ac063666188f4ec774))
72+
73+
## [4.0.0-static.2](https://github.com/sanity-io/ui-workshop/compare/v4.0.0-static.1...v4.0.0-static.2) (2025-08-06)
74+
75+
### Bug Fixes
76+
77+
- minor cleanup ([9e1bf79](https://github.com/sanity-io/ui-workshop/commit/9e1bf794cf27c3c0e88da9d4b9ecd66cf88e5958))
78+
79+
## [4.0.0-static.1](https://github.com/sanity-io/ui-workshop/compare/v3.3.0...v4.0.0-static.1) (2025-08-06)
80+
81+
### ⚠ BREAKING CHANGES
82+
83+
- use UI v4
84+
85+
### Features
86+
87+
- use UI v4 ([819b1c2](https://github.com/sanity-io/ui-workshop/commit/819b1c2803d8a251ae33c7a7c2267b6161da2f4d))
88+
889
## [3.3.0](https://github.com/sanity-io/ui-workshop/compare/v3.2.0...v3.3.0) (2025-08-06)
990

1091
### Features

README.md

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -88,85 +88,6 @@ function TestStory() {
8888
}
8989
```
9090

91-
## Styling
92-
93-
In addition to the [CSS features that `vite` supports](https://vite.dev/guide/features.html#css), you can also use [Vanilla Extract](https://vanilla-extract.style/) for styling.
94-
95-
First install the `@vanilla-extract/css` package:
96-
97-
```sh
98-
npm install @vanilla-extract/css
99-
```
100-
101-
Then, add a `style.css.ts` file for your workshop:
102-
103-
```ts
104-
// src/__workshop__/style.css.ts
105-
106-
import {style} from '@vanilla-extract/css'
107-
108-
export const container = style({
109-
display: 'grid',
110-
alignItems: 'center',
111-
justifyContent: 'center',
112-
height: '100%',
113-
width: '100%',
114-
})
115-
```
116-
117-
And finally, import the `container` className and use it in your workshop:
118-
119-
```diff
120-
import {
121-
defineScope,
122-
useBoolean,
123-
useNumber,
124-
useSelect,
125-
useString,
126-
useText,
127-
} from '@sanity/ui-workshop'
128-
+import {container} from './style.css'
129-
130-
export default defineScope({
131-
name: 'test',
132-
title: 'Test',
133-
stories: [
134-
{
135-
name: 'test',
136-
title: 'Test',
137-
component: TestStory,
138-
},
139-
],
140-
})
141-
142-
const options = {
143-
None: '',
144-
Small: 'sm',
145-
Medium: 'md',
146-
Large: 'lg',
147-
}
148-
149-
function TestStory() {
150-
const text = useText('Text', 'Hello, world')
151-
const boolean = useBoolean('Boolean', true)
152-
const number = useNumber('Number', 1234)
153-
const string = useString('String', '...')
154-
const option = useSelect('Select option', options)
155-
156-
return (
157-
- <div>
158-
+ <div className={container}>
159-
<h1>This is my first story.</h1>
160-
<p>Some text: {text}</p>
161-
<p>A boolean: {boolean ? 'true' : 'false'}</p>
162-
<p>A number: {number}</p>
163-
<p>A string: {string}</p>
164-
<p>An option: {option}</p>
165-
</div>
166-
)
167-
}
168-
```
169-
17091
## License
17192

17293
[MIT](LICENSE)

package.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export default defineConfig({
77
import: './dist/cli.js',
88
runtime: 'node',
99
},
10+
{
11+
// Working around workshop.runtime.ts files importing `defineRuntime` that points to a file that has CSS imports, which nodejs doesn't support
12+
source: './exports/index.ts',
13+
import: './dist/index.node.js',
14+
runtime: 'node',
15+
},
1016
],
1117
extract: {
1218
rules: {

package.json

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sanity/ui-workshop",
3-
"version": "3.3.0",
3+
"version": "4.0.0-static.1",
44
"keywords": [
55
"sanity",
66
"ui",
@@ -27,6 +27,9 @@
2727
"exports": {
2828
".": {
2929
"source": "./exports/index.ts",
30+
"node": {
31+
"default": "./dist/index.node.js"
32+
},
3033
"default": "./dist/index.js"
3134
},
3235
"./plugin-a11y": {
@@ -112,37 +115,38 @@
112115
"@vanilla-extract/css-utils": "^0.1.6",
113116
"@vanilla-extract/dynamic": "^2.1.5",
114117
"@vanilla-extract/vite-plugin": "^5.1.1",
115-
"@vitejs/plugin-react": "^4.7.0",
116-
"axe-core": "^4.10.3",
118+
"@vitejs/plugin-react": "^5.0.4",
119+
"axe-core": "^4.11.0",
117120
"cac": "^6.7.14",
118121
"chokidar": "^3.6.0",
119122
"cpx": "^1.5.0",
120123
"dotenv-flow": "^4.1.0",
121-
"esbuild": "^0.25.8",
124+
"esbuild": "^0.25.11",
122125
"esbuild-register": "^3.6.0",
123126
"express": "^5.1.0",
124127
"globby": "^11.1.0",
128+
"lightningcss": "^1.30.2",
125129
"lodash": "^4.17.21",
126130
"mkdirp": "^2.1.6",
127131
"pako": "^2.1.0",
128132
"rimraf": "^4.4.1",
129133
"segmented-property": "^4.0.0",
130-
"vite": "^7.0.6"
134+
"vite": "^7.1.10"
131135
},
132136
"devDependencies": {
133137
"@commitlint/config-conventional": "^19.8.1",
134138
"@sanity/browserslist-config": "^1.0.5",
135-
"@sanity/pkg-utils": "^7.11.1",
139+
"@sanity/pkg-utils": "^8.1.21",
136140
"@sanity/prettier-config": "^1.0.6",
137141
"@sanity/semantic-release-preset": "^4.1.8",
138-
"@sanity/ui": "^3.0.5",
142+
"@sanity/ui": "4.0.0-static.38",
139143
"@types/cpx": "^1.5.5",
140144
"@types/express": "^5.0.3",
141145
"@types/lodash": "^4.17.20",
142-
"@types/node": "^20.17.9",
143-
"@types/pako": "^2.0.3",
144-
"@types/react": "^19.1.9",
145-
"@types/react-dom": "^19.1.7",
146+
"@types/node": "^20.19.21",
147+
"@types/pako": "^2.0.4",
148+
"@types/react": "^19.2.2",
149+
"@types/react-dom": "^19.2.2",
146150
"@typescript-eslint/eslint-plugin": "^7.18.0",
147151
"@typescript-eslint/parser": "^7.18.0",
148152
"babel-plugin-react-compiler": "19.1.0-rc.2",
@@ -161,16 +165,16 @@
161165
"jsdom": "^22.1.0",
162166
"npm-run-all2": "^6.2.6",
163167
"prettier": "^3.6.2",
164-
"react": "^19.1.1",
165-
"react-dom": "^19.1.1",
166-
"react-is": "^19.1.1",
168+
"react": "^19.2.0",
169+
"react-dom": "^19.2.0",
170+
"react-is": "^19.2.0",
167171
"semantic-release": "^23.1.1",
168172
"tsconfig-paths": "^4.2.0",
169-
"typescript": "5.9.2",
173+
"typescript": "5.9.3",
170174
"vitest": "^3.2.4"
171175
},
172176
"peerDependencies": {
173-
"@sanity/ui": "^3",
177+
"@sanity/ui": "^4.0.0-0",
174178
"react": "^19",
175179
"react-dom": "^19"
176180
},

0 commit comments

Comments
 (0)