Skip to content

Commit cf4f47a

Browse files
committed
feat!: use UI v4
1 parent 565c951 commit cf4f47a

Some content is hidden

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

49 files changed

+291
-502
lines changed

.changeset/deep-cameras-matter.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sanity/ui-workshop': patch
3+
---
4+
5+
Update react compiler to v1

.changeset/pre.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"mode": "pre",
3+
"tag": "static",
4+
"initialVersions": {
5+
"@sanity/ui-workshop": "4.0.0-static.11"
6+
},
7+
"changesets": [
8+
"deep-cameras-matter"
9+
]
10+
}

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
pull_request:
66
branches:
77
- main
8+
- static
89

910
permissions:
1011
contents: read # for checkout

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- static
78

89
concurrency: ${{ github.workflow }}-${{ github.ref }}
910

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1+
<!-- markdownlint-disable --><!-- textlint-disable -->
2+
3+
## 4.0.0-static.12
4+
5+
### Patch Changes
6+
7+
- [#185](https://github.com/sanity-io/ui-workshop/pull/185) [`4cc0738`](https://github.com/sanity-io/ui-workshop/commit/4cc0738310247e908ad94d29c03554c16248b8df) Thanks [@stipsan](https://github.com/stipsan)! - Update react compiler to v1
8+
19
## 3.4.0
210

311
### Minor Changes
412

513
- [`b1f9eea`](https://github.com/sanity-io/ui-workshop/commit/b1f9eeaab4bb016cbd867e9c0dff91cd9af293af) Thanks [@stipsan](https://github.com/stipsan)! - Upgrade React Compiler to v1
614

15+
# 📓 Changelog
16+
17+
All notable changes to this project will be documented in this file. See
18+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
19+
720
## [3.3.2](https://github.com/sanity-io/ui-workshop/compare/v3.3.1...v3.3.2) (2025-08-07)
821

922
### Bug Fixes

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.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sanity/ui-workshop",
3-
"version": "3.4.0",
3+
"version": "4.0.0-static.12",
44
"keywords": [
55
"sanity",
66
"ui",
@@ -108,6 +108,7 @@
108108
"esbuild-register": "^3.6.0",
109109
"express": "^5.1.0",
110110
"globby": "^11.1.0",
111+
"lightningcss": "^1.30.2",
111112
"lodash": "^4.17.21",
112113
"mkdirp": "^2.1.6",
113114
"pako": "^2.1.0",
@@ -121,7 +122,7 @@
121122
"@sanity/browserslist-config": "^1.0.5",
122123
"@sanity/pkg-utils": "^8.1.21",
123124
"@sanity/prettier-config": "^2.0.1",
124-
"@sanity/ui": "^3.1.10",
125+
"@sanity/ui": "4.0.0-static.38",
125126
"@types/cpx": "^1.5.5",
126127
"@types/express": "^5.0.3",
127128
"@types/lodash": "^4.17.20",
@@ -153,7 +154,7 @@
153154
"vitest": "^3.2.4"
154155
},
155156
"peerDependencies": {
156-
"@sanity/ui": "^3",
157+
"@sanity/ui": "^4.0.0-0",
157158
"react": "^19",
158159
"react-dom": "^19"
159160
},

0 commit comments

Comments
 (0)