Skip to content

Commit da09a6d

Browse files
committed
Publish
1 parent 1e8c02e commit da09a6d

File tree

5 files changed

+63
-61
lines changed

5 files changed

+63
-61
lines changed

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,6 @@ module.exports = {
227227

228228
// Whether to use watchman for file crawling
229229
// watchman: true,
230+
231+
prettierPath: null
230232
};

packages/@react-spectrum/s2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-spectrum/s2",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"description": "Spectrum 2 UI components in React",
55
"license": "Apache-2.0",
66
"repository": {

packages/@react-spectrum/s2/style/__tests__/style-macro.test.js

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ describe('style-macro', () => {
4040
"@layer _.a, _.b, _.c;
4141
4242
@layer _.b {
43-
.Jbs1:first-child {
43+
.Jbs11:first-child {
4444
margin-top: 0.25rem;
4545
}
4646
}
4747
4848
@layer _.c.p {
4949
@media (min-width: 64rem) {
50-
.Jbpv1:first-child {
50+
.Jbpv11:first-child {
5151
margin-top: 0.5rem;
5252
}
5353
}
5454
}
5555
5656
"
5757
`);
58-
expect(js).toMatchInlineSnapshot('" Jbs1 Jbpv1"');
58+
expect(js).toMatchInlineSnapshot('" Jbs11 Jbpv11"');
5959
});
6060

6161
it('should support self references', () => {
@@ -69,55 +69,55 @@ describe('style-macro', () => {
6969
"@layer _.a;
7070
7171
@layer _.a {
72-
._kc1 {
72+
._kc11 {
7373
border-top-width: 2px;
7474
}
7575
7676
77-
.hc1 {
77+
.hc11 {
7878
border-bottom-width: 2px;
7979
}
8080
8181
82-
.mCPFGYc1 {
82+
.mCPFGYc11 {
8383
border-inline-start-width: var(--m);
8484
}
8585
8686
87-
.lc1 {
87+
.lc11 {
8888
border-inline-end-width: 2px;
8989
}
9090
9191
92-
.SMBFGYc1 {
92+
.SMBFGYc11 {
9393
padding-inline-start: var(--S);
9494
}
9595
9696
97-
.Rv1 {
97+
.Rv11 {
9898
padding-inline-end: calc(var(--F, var(--M)) * 3 / 8);
9999
}
100100
101101
102-
.ZjUQgKd1 {
102+
.ZjUQgKd11 {
103103
width: calc(200px - var(--m) - var(--S));
104104
}
105105
106106
107-
.-m_-mc1 {
107+
.-m_-mc11 {
108108
--m: 2px;
109109
}
110110
111111
112-
.-S_-Sv1 {
112+
.-S_-Sv11 {
113113
--S: calc(var(--F, var(--M)) * 3 / 8);
114114
}
115115
}
116116
117117
"
118118
`);
119119

120-
expect(js).toMatchInlineSnapshot('" _kc1 hc1 mCPFGYc1 lc1 SMBFGYc1 Rv1 ZjUQgKd1 -m_-mc1 -S_-Sv1"');
120+
expect(js).toMatchInlineSnapshot('" _kc11 hc11 mCPFGYc11 lc11 SMBFGYc11 Rv11 ZjUQgKd11 -m_-mc11 -S_-Sv11"');
121121
});
122122

123123
it('should support allowed overrides', () => {
@@ -134,9 +134,9 @@ describe('style-macro', () => {
134134
color: 'green-400'
135135
});
136136

137-
expect(js()).toMatchInlineSnapshot('" gw1 pg1"');
138-
expect(overrides).toMatchInlineSnapshot('" g8tmWqb1 pHJ3AUd1"');
139-
expect(js({}, overrides)).toMatchInlineSnapshot('" g8tmWqb1 pg1"');
137+
expect(js()).toMatchInlineSnapshot('" gw11 pg11"');
138+
expect(overrides).toMatchInlineSnapshot('" g8tmWqb11 pHJ3AUd11"');
139+
expect(js({}, overrides)).toMatchInlineSnapshot('" g8tmWqb11 pg11"');
140140
});
141141

142142
it('should support allowed overrides for properties that expand into multiple', () => {
@@ -151,9 +151,9 @@ describe('style-macro', () => {
151151
translateX: 40
152152
});
153153

154-
expect(js()).toMatchInlineSnapshot('" -_7PloMd-B1 __Ya1"');
155-
expect(overrides).toMatchInlineSnapshot('" -_7PloMd-D1 __Ya1"');
156-
expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-D1 __Ya1"');
154+
expect(js()).toMatchInlineSnapshot('" -_7PloMd-B11 __Ya11"');
155+
expect(overrides).toMatchInlineSnapshot('" -_7PloMd-D11 __Ya11"');
156+
expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-D11 __Ya11"');
157157
});
158158

159159
it('should support allowed overrides for shorthands', () => {
@@ -168,9 +168,9 @@ describe('style-macro', () => {
168168
padding: 40
169169
});
170170

171-
expect(js()).toMatchInlineSnapshot('" Tk1 Qk1 Sk1 Rk1"');
172-
expect(overrides).toMatchInlineSnapshot('" Tm1 Qm1 Sm1 Rm1"');
173-
expect(js({}, overrides)).toMatchInlineSnapshot('" Tm1 Qm1 Sm1 Rm1"');
171+
expect(js()).toMatchInlineSnapshot('" Tk11 Qk11 Sk11 Rk11"');
172+
expect(overrides).toMatchInlineSnapshot('" Tm11 Qm11 Sm11 Rm11"');
173+
expect(js({}, overrides)).toMatchInlineSnapshot('" Tm11 Qm11 Sm11 Rm11"');
174174
});
175175

176176
it("should support allowed overrides for values that aren't defined", () => {
@@ -185,9 +185,9 @@ describe('style-macro', () => {
185185
minWidth: 32
186186
});
187187

188-
expect(js()).toMatchInlineSnapshot('" gE1"');
189-
expect(overrides).toMatchInlineSnapshot('" Nk1"');
190-
expect(js({}, overrides)).toMatchInlineSnapshot('" Nk1 gE1"');
188+
expect(js()).toMatchInlineSnapshot('" gE11"');
189+
expect(overrides).toMatchInlineSnapshot('" Nk11"');
190+
expect(js({}, overrides)).toMatchInlineSnapshot('" Nk11 gE11"');
191191
});
192192

193193
it('should support runtime conditions', () => {
@@ -208,42 +208,42 @@ describe('style-macro', () => {
208208
"@layer _.a;
209209
210210
@layer _.a {
211-
.gH1 {
211+
.gH11 {
212212
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
213213
}
214214
215215
216-
.gF1 {
216+
.gF11 {
217217
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
218218
}
219219
220220
221-
.gE1 {
221+
.gE11 {
222222
background-color: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
223223
}
224224
225225
226-
.pt1 {
226+
.pt11 {
227227
color: light-dark(rgb(41, 41, 41), rgb(219, 219, 219));
228228
}
229229
230230
231-
.po1 {
231+
.po11 {
232232
color: light-dark(rgb(19, 19, 19), rgb(242, 242, 242));
233233
}
234234
235235
236-
.pm1 {
236+
.pm11 {
237237
color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));
238238
}
239239
}
240240
241241
"
242242
`);
243243

244-
expect(js({})).toMatchInlineSnapshot('" gH1 pt1"');
245-
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF1 po1"');
246-
expect(js({isPressed: true})).toMatchInlineSnapshot('" gE1 pm1"');
244+
expect(js({})).toMatchInlineSnapshot('" gH11 pt11"');
245+
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF11 po11"');
246+
expect(js({isPressed: true})).toMatchInlineSnapshot('" gE11 pm11"');
247247
});
248248

249249
it('should support nested runtime conditions', () => {
@@ -262,32 +262,32 @@ describe('style-macro', () => {
262262
"@layer _.a;
263263
264264
@layer _.a {
265-
.gH1 {
265+
.gH11 {
266266
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
267267
}
268268
269269
270-
.gF1 {
270+
.gF11 {
271271
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
272272
}
273273
274274
275-
.g_h1 {
275+
.g_h11 {
276276
background-color: light-dark(rgb(75, 117, 255), rgb(64, 105, 253));
277277
}
278278
279279
280-
.g31 {
280+
.g311 {
281281
background-color: light-dark(rgb(59, 99, 251), rgb(86, 129, 255));
282282
}
283283
}
284284
285285
"
286286
`);
287-
expect(js({})).toMatchInlineSnapshot('" gH1"');
288-
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF1"');
289-
expect(js({isSelected: true})).toMatchInlineSnapshot('" g_h1"');
290-
expect(js({isSelected: true, isHovered: true})).toMatchInlineSnapshot('" g31"');
287+
expect(js({})).toMatchInlineSnapshot('" gH11"');
288+
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF11"');
289+
expect(js({isSelected: true})).toMatchInlineSnapshot('" g_h11"');
290+
expect(js({isSelected: true, isHovered: true})).toMatchInlineSnapshot('" g311"');
291291
});
292292

293293
it('should support variant runtime conditions', () => {
@@ -301,9 +301,9 @@ describe('style-macro', () => {
301301
}
302302
});
303303

304-
expect(js({variant: 'accent'})).toMatchInlineSnapshot('" gY1"');
305-
expect(js({variant: 'primary'})).toMatchInlineSnapshot('" gjQquMe1"');
306-
expect(js({variant: 'secondary'})).toMatchInlineSnapshot('" gw1"');
304+
expect(js({variant: 'accent'})).toMatchInlineSnapshot('" gY11"');
305+
expect(js({variant: 'primary'})).toMatchInlineSnapshot('" gjQquMe11"');
306+
expect(js({variant: 'secondary'})).toMatchInlineSnapshot('" gw11"');
307307
});
308308

309309
it('supports runtime conditions nested inside css conditions', () => {
@@ -321,14 +321,14 @@ describe('style-macro', () => {
321321
322322
@layer _.b.l {
323323
@media (forced-colors: active) {
324-
.plb1 {
324+
.plb11 {
325325
color: ButtonText;
326326
}
327327
}
328328
329329
330330
@media (forced-colors: active) {
331-
.ple1 {
331+
.ple11 {
332332
color: HighlightText;
333333
}
334334
}
@@ -337,36 +337,36 @@ describe('style-macro', () => {
337337
"
338338
`);
339339

340-
expect(js({})).toMatchInlineSnapshot('" plb1"');
341-
expect(js({isSelected: true})).toMatchInlineSnapshot('" ple1"');
340+
expect(js({})).toMatchInlineSnapshot('" plb11"');
341+
expect(js({isSelected: true})).toMatchInlineSnapshot('" ple11"');
342342
});
343343

344344
it('should expand shorthand properties to longhands', () => {
345345
let {js, css} = testStyle({
346346
padding: 24
347347
});
348348

349-
expect(js).toMatchInlineSnapshot('" Th1 Qh1 Sh1 Rh1"');
349+
expect(js).toMatchInlineSnapshot('" Th11 Qh11 Sh11 Rh11"');
350350
expect(css).toMatchInlineSnapshot(`
351351
"@layer _.a;
352352
353353
@layer _.a {
354-
.Th1 {
354+
.Th11 {
355355
padding-top: 24px;
356356
}
357357
358358
359-
.Qh1 {
359+
.Qh11 {
360360
padding-bottom: 24px;
361361
}
362362
363363
364-
.Sh1 {
364+
.Sh11 {
365365
padding-inline-start: 24px;
366366
}
367367
368368
369-
.Rh1 {
369+
.Rh11 {
370370
padding-inline-end: 24px;
371371
}
372372
}
@@ -384,7 +384,7 @@ describe('style-macro', () => {
384384
"@layer _.a;
385385
386386
@layer _.a {
387-
.gpQzfVb1 {
387+
.gpQzfVb11 {
388388
background-color: rgb(from light-dark(rgb(39, 77, 234), rgb(105, 149, 254)) r g b / 50%);
389389
}
390390
}
@@ -405,7 +405,7 @@ describe('style-macro', () => {
405405
"@layer _.a;
406406
407407
@layer _.a {
408-
.-FUeYm-gE1 {
408+
.-FUeYm-gE11 {
409409
--foo: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
410410
}
411411
}

packages/dev/codemods/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-spectrum/codemods",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"main": "dist/index.js",
55
"source": "src/index.ts",
66
"bin": "dist/index.js",
@@ -24,7 +24,7 @@
2424
"@babel/parser": "^7.24.5",
2525
"@babel/traverse": "^7.24.5",
2626
"@babel/types": "^7.24.5",
27-
"@react-spectrum/s2": "^0.10.0",
27+
"@react-spectrum/s2": "^0.10.1",
2828
"@react-types/shared": "^3.31.0",
2929
"@types/node": "^22",
3030
"boxen": "^5.1.2",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6645,7 +6645,7 @@ __metadata:
66456645
"@babel/parser": "npm:^7.24.5"
66466646
"@babel/traverse": "npm:^7.24.5"
66476647
"@babel/types": "npm:^7.24.5"
6648-
"@react-spectrum/s2": "npm:^0.10.0"
6648+
"@react-spectrum/s2": "npm:^0.10.1"
66496649
"@react-types/shared": "npm:^3.31.0"
66506650
"@types/jscodeshift": "npm:^0.11.11"
66516651
"@types/node": "npm:^22"
@@ -7441,7 +7441,7 @@ __metadata:
74417441
languageName: unknown
74427442
linkType: soft
74437443

7444-
"@react-spectrum/s2@npm:^0.10.0, @react-spectrum/s2@workspace:packages/@react-spectrum/s2":
7444+
"@react-spectrum/s2@npm:^0.10.0, @react-spectrum/s2@npm:^0.10.1, @react-spectrum/s2@workspace:packages/@react-spectrum/s2":
74457445
version: 0.0.0-use.local
74467446
resolution: "@react-spectrum/s2@workspace:packages/@react-spectrum/s2"
74477447
dependencies:

0 commit comments

Comments
 (0)