@react-spectrum/s2 0.10.1 → 0.11.1
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/ComboBox.cjs +19 -4
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +19 -4
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/DatePicker.cjs +2 -5
- package/dist/DatePicker.cjs.map +1 -1
- package/dist/DatePicker.css.map +1 -1
- package/dist/DatePicker.mjs +2 -5
- package/dist/DatePicker.mjs.map +1 -1
- package/dist/DateRangePicker.cjs +2 -5
- package/dist/DateRangePicker.cjs.map +1 -1
- package/dist/DateRangePicker.css.map +1 -1
- package/dist/DateRangePicker.mjs +2 -5
- package/dist/DateRangePicker.mjs.map +1 -1
- package/dist/SelectBoxGroup.cjs +342 -0
- package/dist/SelectBoxGroup.cjs.map +1 -0
- package/dist/SelectBoxGroup.css +503 -0
- package/dist/SelectBoxGroup.css.map +1 -0
- package/dist/SelectBoxGroup.mjs +335 -0
- package/dist/SelectBoxGroup.mjs.map +1 -0
- package/dist/SkeletonCollection.cjs +6 -1
- package/dist/SkeletonCollection.cjs.map +1 -1
- package/dist/SkeletonCollection.mjs +7 -2
- package/dist/SkeletonCollection.mjs.map +1 -1
- package/dist/Tabs.cjs +102 -77
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +8 -4
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +102 -77
- package/dist/Tabs.mjs.map +1 -1
- package/dist/main.cjs +5 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +3 -1
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +43 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +21 -21
- package/src/ComboBox.tsx +20 -5
- package/src/DatePicker.tsx +1 -7
- package/src/DateRangePicker.tsx +1 -7
- package/src/SelectBoxGroup.tsx +408 -0
- package/src/SkeletonCollection.tsx +6 -2
- package/src/Tabs.tsx +49 -24
- package/src/index.ts +2 -0
- package/style/dist/main.cjs +24 -24
- package/style/dist/module.mjs +13 -13
- package/style/dist/properties.mjs +3 -3
- package/style/dist/spectrum-theme.cjs +219 -219
- package/style/dist/spectrum-theme.mjs +210 -210
- package/style/dist/style-macro.cjs +80 -80
- package/style/dist/style-macro.mjs +75 -75
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
@layer _.a {
|
|
2
|
+
._Le11 {
|
|
3
|
+
outline-style: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
._Lf11 {
|
|
7
|
+
outline-style: solid;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.Oh11 {
|
|
11
|
+
outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
._Mc11 {
|
|
15
|
+
outline-width: 2px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
._Kd11 {
|
|
19
|
+
outline-offset: 2px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
._Pc11 {
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.uk11 {
|
|
27
|
+
font-family: var(--s2-font-family-sans, adobe-clean-spectrum-vf), adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.-_6BNtrc-c11 {
|
|
31
|
+
--fs: pow(1.125, 0);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.vx11 {
|
|
35
|
+
font-size: round(var(--s2-font-size-base, 14) * var(--fs) / 16 * 1rem, 1px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.wb11 {
|
|
39
|
+
font-variation-settings: "wght" 400;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.xb11 {
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
._Fd11 {
|
|
47
|
+
line-height: round(1em * (1.15 + (1 - ((min(32, var(--s2-font-size-base, 14) * var(--fs)) - 10)) / 22) * .15), 2px);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ri11 {
|
|
51
|
+
cursor: default;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
._oa11 {
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.Z75oWv11 {
|
|
59
|
+
width: calc(10.625rem * var(--s2-scale));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ZAK24ue11 {
|
|
63
|
+
width: calc(23rem * var(--s2-scale));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.F75oWv11 {
|
|
67
|
+
height: calc(10.625rem * var(--s2-scale));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.Fd11 {
|
|
71
|
+
height: auto;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.NQGV3L11 {
|
|
75
|
+
min-width: calc(9rem * var(--s2-scale));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.NBzUiud11 {
|
|
79
|
+
min-width: calc(11.75rem * var(--s2-scale));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.L75oWv11 {
|
|
83
|
+
max-width: calc(10.625rem * var(--s2-scale));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.LILqIYb11 {
|
|
87
|
+
max-width: calc(30rem * var(--s2-scale));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.MQGV3L11 {
|
|
91
|
+
min-height: calc(9rem * var(--s2-scale));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.MKniM11 {
|
|
95
|
+
min-height: calc(5rem * var(--s2-scale));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.K75oWv11 {
|
|
99
|
+
max-height: calc(10.625rem * var(--s2-scale));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.KDvO7ld11 {
|
|
103
|
+
max-height: calc(15rem * var(--s2-scale));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.Th11 {
|
|
107
|
+
padding-top: 24px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.Tf11 {
|
|
111
|
+
padding-top: 16px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.Qh11 {
|
|
115
|
+
padding-bottom: 24px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.Qf11 {
|
|
119
|
+
padding-bottom: 16px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.Sk11 {
|
|
123
|
+
padding-inline-start: 32px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.Rh11 {
|
|
127
|
+
padding-inline-end: 24px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.CfwsTtd11 {
|
|
131
|
+
grid-template-areas: "illustration"
|
|
132
|
+
"."
|
|
133
|
+
"label";
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.CtXiS9b11 {
|
|
137
|
+
grid-template-areas: "illustration . label"
|
|
138
|
+
"illustration . description";
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.EOwqVhc11 {
|
|
142
|
+
grid-template-rows: min-content .5rem min-content;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.EtYIsBb11 {
|
|
146
|
+
grid-template-rows: min-content .125rem min-content;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.DJSAqje11 {
|
|
150
|
+
grid-template-columns: min-content 10px 1fr;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
._cb11 {
|
|
154
|
+
align-content: center;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.oc11 {
|
|
158
|
+
border-start-start-radius: .625rem;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.nc11 {
|
|
162
|
+
border-start-end-radius: .625rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.kc11 {
|
|
166
|
+
border-end-start-radius: .625rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.jc11 {
|
|
170
|
+
border-end-end-radius: .625rem;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
._jf11 {
|
|
174
|
+
border-style: solid;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.in11 {
|
|
178
|
+
border-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.iA11 {
|
|
182
|
+
border-color: #0000;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.g_g11 {
|
|
186
|
+
background-color: var(--lightningcss-light, #fff) var(--lightningcss-dark, #222);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.gH11 {
|
|
190
|
+
background-color: var(--lightningcss-light, #e9e9e9) var(--lightningcss-dark, #2c2c2c);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
._na11 {
|
|
194
|
+
box-shadow: 0 1px 6px var(--lightningcss-light, #0000001f) var(--lightningcss-dark, #0000005c);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
._nb11 {
|
|
198
|
+
box-shadow: 0 2px 8px var(--lightningcss-light, #00000029) var(--lightningcss-dark, #0000007a);
|
|
199
|
+
box-shadow: 0 2px 8px var(--lightningcss-light, #00000029) var(--lightningcss-dark, #0000007a);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
._nd11 {
|
|
203
|
+
box-shadow: none;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
._kc11 {
|
|
207
|
+
border-top-width: 2px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.hc11 {
|
|
211
|
+
border-bottom-width: 2px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.mc11 {
|
|
215
|
+
border-inline-start-width: 2px;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.lc11 {
|
|
219
|
+
border-inline-end-width: 2px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.Yd11 {
|
|
223
|
+
transition-property: color, background-color, var(--gp, color), border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.Xb11 {
|
|
227
|
+
transition-duration: .15s;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
._2b11 {
|
|
231
|
+
transition-timing-function: cubic-bezier(.45, 0, .4, 1);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.zTZ8xtd11 {
|
|
235
|
+
grid-column-start: illustration;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.yTZ8xtd11 {
|
|
239
|
+
grid-column-end: illustration;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.BTZ8xtd11 {
|
|
243
|
+
grid-row-start: illustration;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.ATZ8xtd11 {
|
|
247
|
+
grid-row-end: illustration;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.Nl11 {
|
|
251
|
+
min-width: calc(3rem * var(--s2-scale));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.Mk11 {
|
|
255
|
+
min-height: calc(3rem * var(--s2-scale));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.-_8sjo0b-pt11 {
|
|
259
|
+
--iconPrimary: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.-_8sjo0b-po11 {
|
|
263
|
+
--iconPrimary: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.-_8sjo0b-pp11 {
|
|
267
|
+
--iconPrimary: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.z9u7zPc11 {
|
|
271
|
+
grid-column-start: description;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.y9u7zPc11 {
|
|
275
|
+
grid-column-end: description;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.B9u7zPc11 {
|
|
279
|
+
grid-row-start: description;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.A9u7zPc11 {
|
|
283
|
+
grid-row-end: description;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.sb11 {
|
|
287
|
+
display: block;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.sk11 {
|
|
291
|
+
display: none;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.zv6x9r11 {
|
|
295
|
+
grid-column-start: label;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.yv6x9r11 {
|
|
299
|
+
grid-column-end: label;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.Bv6x9r11 {
|
|
303
|
+
grid-row-start: label;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.Av6x9r11 {
|
|
307
|
+
grid-row-end: label;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
._dc11 {
|
|
311
|
+
align-self: center;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.__Ab11 {
|
|
315
|
+
justify-self: center;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.__Ad11 {
|
|
319
|
+
justify-self: start;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.Za11 {
|
|
323
|
+
width: 100%;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
._Nc11 {
|
|
327
|
+
overflow-x: hidden;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.Pc11 {
|
|
331
|
+
overflow-y: hidden;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.Na11 {
|
|
335
|
+
min-width: 0;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
._Wa11 {
|
|
339
|
+
text-align: center;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
._Wd11 {
|
|
343
|
+
text-align: start;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
._7c11 {
|
|
347
|
+
white-space: nowrap;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
._Yb11 {
|
|
351
|
+
text-overflow: ellipsis;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.wd11 {
|
|
355
|
+
font-variation-settings: "wght" 700;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.xd11 {
|
|
359
|
+
font-weight: 700;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
._xa11 {
|
|
363
|
+
font-synthesis-weight: none;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.pt11 {
|
|
367
|
+
color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.po11 {
|
|
371
|
+
color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.pp11 {
|
|
375
|
+
color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.se11 {
|
|
379
|
+
display: grid;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.__yM8Mfn11 {
|
|
383
|
+
grid-auto-rows: 1fr;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.Uj11 {
|
|
387
|
+
row-gap: 1.5rem;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.qj11 {
|
|
391
|
+
column-gap: 1.5rem;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
._Ca11 {
|
|
395
|
+
justify-content: center;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.-SFnbic-ZAK24ue11 {
|
|
399
|
+
--size: calc(23rem * var(--s2-scale));
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.-SFnbic-Z75oWv11 {
|
|
403
|
+
--size: calc(10.625rem * var(--s2-scale));
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.DbFoS411 {
|
|
407
|
+
grid-template-columns: repeat(auto-fit, var(--size));
|
|
408
|
+
grid-template-columns: repeat(auto-fit, var(--size));
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
._Pa11 {
|
|
412
|
+
position: absolute;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.WJ11 {
|
|
416
|
+
top: 8px;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
._AI11 {
|
|
420
|
+
inset-inline-start: 8px;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
._Ob11 {
|
|
424
|
+
pointer-events: none;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
@layer _.b {
|
|
429
|
+
.uch11:lang(ar) {
|
|
430
|
+
font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
._FezxGHba11:is(:lang(ar), :lang(he)) {
|
|
434
|
+
line-height: 1.3;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.CbWiMddxbX3ib11:has([slot="label"]):not(:has([slot="description"])) {
|
|
438
|
+
grid-template-areas: "illustration . label";
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.E1099pdfYMhHd11:not(:has([slot="illustration"])) {
|
|
442
|
+
grid-template-rows: min-content;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.wX0cczbc11:is(:lang(ja), :lang(ko), :lang(zh)) {
|
|
446
|
+
font-variation-settings: "wght" 500;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.xX0cczbc11:is(:lang(ja), :lang(ko), :lang(zh)) {
|
|
450
|
+
font-weight: 500;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
._xX0cczba11:is(:lang(ja), :lang(ko), :lang(zh)) {
|
|
454
|
+
font-synthesis-weight: none;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
@layer _.c {
|
|
459
|
+
.udi11:lang(he) {
|
|
460
|
+
font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
._FnuYUweb11:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
464
|
+
line-height: 1.5;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
@layer _.d {
|
|
469
|
+
.uea11:lang(ja) {
|
|
470
|
+
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
@layer _.e {
|
|
475
|
+
.ugb11:lang(ko) {
|
|
476
|
+
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
@layer _.f {
|
|
481
|
+
.uhd11:lang(zh) {
|
|
482
|
+
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
@layer _.g {
|
|
487
|
+
.uje11:lang(zh-hant) {
|
|
488
|
+
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
@layer _.h {
|
|
493
|
+
.u2NhKxcl11:lang(zh-HK) {
|
|
494
|
+
font-family: adobe-clean-han-hong-kong, source-han-hong-kong, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
@layer _.i {
|
|
499
|
+
.uic11:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
500
|
+
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
/*# sourceMappingURL=SelectBoxGroup.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AC+EwB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0HM;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAcN;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAsBN;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA+BC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAkDM;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AA/OD;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA8JN;;;;EAAA;;;;EAAA;;;;;AA9JM;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA","sources":["e0c4e8faec553462","packages/@react-spectrum/s2/src/SelectBoxGroup.tsx"],"sourcesContent":["@import \"6c115799477d85f3\";\n@import \"76c5b1a079443994\";\n@import \"57b5eb6b4b0308a7\";\n@import \"c7f260d858a15199\";\n@import \"c9c8eebe8c33c5fb\";\n@import \"183428cb2b58de79\";\n","/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {box, iconStyles} from './Checkbox';\nimport Checkmark from '../ui-icons/Checkmark';\nimport {\n ContextValue,\n DEFAULT_SLOT,\n ListBox,\n ListBoxItem,\n ListBoxProps,\n Provider\n} from 'react-aria-components';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes, Key, Orientation} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from '../src/Icon';\nimport {pressScale} from './pressScale';\nimport React, {createContext, forwardRef, ReactNode, useContext, useMemo, useRef} from 'react';\nimport {TextContext} from './Content';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface SelectBoxGroupProps<T> extends StyleProps, Omit<ListBoxProps<T>, keyof GlobalDOMAttributes | 'layout' | 'dragAndDropHooks' | 'dependencies' | 'renderEmptyState' | 'children' | 'onAction' | 'shouldFocusOnHover' | 'selectionBehavior' | 'shouldSelectOnPressUp' | 'shouldFocusWrap' | 'style' | 'className'> {\n /**\n * The SelectBox elements contained within the SelectBoxGroup.\n */\n children: ReactNode,\n /**\n * The layout direction of the content in each SelectBox.\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The selection mode for the SelectBoxGroup.\n * @default 'single'\n */\n selectionMode?: 'single' | 'multiple',\n /**\n * Whether the SelectBoxGroup is disabled.\n */\n isDisabled?: boolean\n}\n\nexport interface SelectBoxProps extends StyleProps {\n /** The unique id of the SelectBox. */\n id?: Key,\n /** A string representation of the SelectBox's contents, used for features like typeahead. */\n textValue?: string,\n /** An accessibility label for this item. */\n 'aria-label'?: string,\n /**\n * The contents of the SelectBox.\n */\n children: ReactNode,\n /**\n * Whether the SelectBox is disabled.\n */\n isDisabled?: boolean\n}\n\ninterface SelectBoxContextValue {\n allowMultiSelect?: boolean,\n orientation?: Orientation,\n isDisabled?: boolean\n}\n\nconst SelectBoxContext = createContext<SelectBoxContextValue>({orientation: 'vertical'});\nexport const SelectBoxGroupContext = createContext<ContextValue<Partial<SelectBoxGroupProps<any>>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst labelOnly = ':has([slot=label]):not(:has([slot=description]))';\nconst noIllustration = ':not(:has([slot=illustration]))';\nconst selectBoxStyles = style({\n ...focusRing(),\n display: 'grid',\n gridAutoRows: '1fr',\n position: 'relative',\n font: 'ui',\n cursor: 'default',\n boxSizing: 'border-box',\n overflow: 'hidden',\n width: {\n default: 170,\n orientation: {\n horizontal: 368\n }\n },\n height: {\n default: 170,\n orientation: {\n horizontal: 'auto'\n }\n },\n minWidth: {\n default: 144,\n orientation: {\n horizontal: 188\n }\n },\n maxWidth: {\n default: 170,\n orientation: {\n horizontal: 480\n }\n },\n minHeight: {\n default: 144,\n orientation: {\n horizontal: 80\n }\n },\n maxHeight: {\n default: 170,\n orientation: {\n horizontal: 240\n }\n },\n padding: {\n default: 24,\n orientation: {\n horizontal: 16\n }\n },\n paddingStart: {\n orientation: {\n horizontal: 32\n }\n },\n paddingEnd: {\n orientation: {\n horizontal: 24\n }\n },\n gridTemplateAreas: {\n orientation: {\n vertical: [\n 'illustration',\n '.',\n 'label'\n ],\n horizontal: {\n default: [\n 'illustration . label',\n 'illustration . description'\n ],\n [labelOnly]: [\n 'illustration . label'\n ]\n }\n }\n },\n gridTemplateRows: {\n orientation: {\n vertical: ['min-content', 8, 'min-content'],\n horizontal: {\n default: ['min-content', 2, 'min-content'],\n [noIllustration]: ['min-content']\n }\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: 'min-content 10px 1fr'\n }\n },\n alignContent: {\n orientation: {\n vertical: 'center'\n }\n },\n borderRadius: 'lg',\n borderStyle: 'solid',\n borderColor: {\n default: 'transparent',\n isSelected: 'gray-900',\n isDisabled: 'transparent'\n },\n backgroundColor: {\n default: 'layer-2',\n isDisabled: 'disabled'\n },\n color: {\n isDisabled: 'disabled'\n },\n boxShadow: {\n default: 'emphasized',\n isHovered: 'elevated',\n isSelected: 'elevated',\n isDisabled: 'none'\n },\n borderWidth: 2,\n transition: 'default'\n}, getAllowedOverrides());\n\nconst illustrationContainer = style({\n gridArea: 'illustration',\n alignSelf: 'center',\n justifySelf: 'center',\n minSize: 48,\n '--iconPrimary': {\n type: 'color',\n value: {\n default: baseColor('neutral'),\n isDisabled: 'disabled'\n }\n }\n});\n\nconst descriptionText = style({\n gridArea: 'description',\n alignSelf: 'center',\n display: {\n default: 'block',\n orientation: {\n vertical: 'none'\n }\n },\n overflow: 'hidden',\n textAlign: {\n default: 'center',\n orientation: {\n horizontal: 'start'\n }\n },\n color: {\n default: baseColor('neutral'),\n isDisabled: 'disabled'\n }\n});\n\nconst labelText = style({\n gridArea: 'label',\n alignSelf: 'center',\n justifySelf: {\n default: 'center',\n orientation: {\n horizontal: 'start'\n }\n },\n width: '100%',\n overflow: 'hidden',\n minWidth: 0,\n textAlign: {\n default: 'center',\n orientation: {\n horizontal: 'start'\n }\n },\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: {\n orientation: {\n horizontal: 'bold'\n }\n },\n color: {\n default: baseColor('neutral'),\n isDisabled: 'disabled'\n }\n});\n\nconst gridStyles = style<{orientation?: Orientation}>({\n display: 'grid',\n gridAutoRows: '1fr',\n gap: 24,\n justifyContent: 'center',\n '--size': {\n type: 'width',\n value: {\n orientation: {\n horizontal: 368,\n vertical: 170\n }\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: 'repeat(auto-fit, var(--size))',\n vertical: 'repeat(auto-fit, var(--size))'\n }\n }\n}, getAllowedOverrides());\n\n/**\n * SelectBox is a single selectable item in a SelectBoxGroup.\n */\nexport function SelectBox(props: SelectBoxProps): ReactNode {\n let {children, isDisabled: individualDisabled = false, UNSAFE_style, UNSAFE_className, styles, ...otherProps} = props;\n \n let {\n orientation = 'vertical',\n isDisabled: groupDisabled = false\n } = useContext(SelectBoxContext);\n\n const isDisabled = individualDisabled || groupDisabled;\n const ref = useRef<HTMLDivElement>(null);\n\n return (\n <ListBoxItem\n isDisabled={isDisabled}\n ref={ref}\n className={renderProps => (UNSAFE_className || '') + selectBoxStyles({\n ...renderProps,\n orientation\n }, styles)}\n style={pressScale(ref, UNSAFE_style)}\n {...otherProps}>\n {({isSelected, isDisabled, isHovered}) => {\n return (\n <>\n <div \n className={style({\n position: 'absolute',\n top: 8,\n insetStart: 8,\n pointerEvents: 'none'\n })}\n aria-hidden=\"true\">\n {!isDisabled && (\n <div\n className={box({\n isSelected,\n isDisabled,\n size: 'M'\n } as any)}>\n <Checkmark \n size=\"S\" \n className={iconStyles} />\n </div>\n )}\n </div>\n <Provider\n values={[\n [IllustrationContext, {\n size: 'S',\n styles: illustrationContainer({size: 'S', orientation, isDisabled, isHovered})\n }],\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {\n styles: labelText({orientation, isDisabled, isHovered})\n },\n label: {\n styles: labelText({orientation, isDisabled, isHovered})\n },\n description: {\n styles: descriptionText({orientation, isDisabled, isHovered})\n }\n }\n }]\n ]}>\n {children}\n </Provider>\n </>\n );\n }}\n </ListBoxItem>\n );\n}\n\n/*\n * SelectBoxGroup allows users to select one or more options from a list.\n */\nexport const SelectBoxGroup = /*#__PURE__*/ forwardRef(function SelectBoxGroup<T extends object>(props: SelectBoxGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, SelectBoxGroupContext);\n\n let {\n children,\n selectionMode = 'single',\n orientation = 'vertical',\n isDisabled = false,\n UNSAFE_className,\n UNSAFE_style,\n styles,\n ...otherProps\n } = props;\n\n const selectBoxContextValue = useMemo(\n () => {\n const contextValue = {\n orientation,\n isDisabled\n };\n return contextValue;\n },\n [orientation, isDisabled]\n );\n\n return (\n <ListBox\n selectionMode={selectionMode}\n layout=\"grid\"\n className={(UNSAFE_className || '') + gridStyles({orientation}, styles)}\n style={UNSAFE_style}\n {...otherProps}>\n <SelectBoxContext.Provider value={selectBoxContextValue}>\n {children}\n </SelectBoxContext.Provider>\n </ListBox>\n );\n});\n"],"names":[],"version":3,"file":"SelectBoxGroup.css.map"}
|