@react-spectrum/s2 3.0.0-nightly-e228ed814-250129 → 3.0.0-nightly-e3ed3c7f6-250130

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.
Files changed (268) hide show
  1. package/dist/Accordion.cjs +3 -3
  2. package/dist/Accordion.css +2 -2
  3. package/dist/Accordion.mjs +3 -3
  4. package/dist/ActionBar.cjs +47 -47
  5. package/dist/ActionBar.css +51 -51
  6. package/dist/ActionBar.mjs +47 -47
  7. package/dist/ActionButton.cjs +97 -97
  8. package/dist/ActionButton.css +96 -96
  9. package/dist/ActionButton.mjs +97 -97
  10. package/dist/ActionButtonGroup.cjs +11 -11
  11. package/dist/ActionButtonGroup.css +9 -9
  12. package/dist/ActionButtonGroup.mjs +11 -11
  13. package/dist/AlertDialog.cjs +3 -3
  14. package/dist/AlertDialog.css +3 -3
  15. package/dist/AlertDialog.mjs +3 -3
  16. package/dist/Avatar.cjs +17 -17
  17. package/dist/Avatar.css +14 -14
  18. package/dist/Avatar.mjs +17 -17
  19. package/dist/AvatarGroup.cjs +100 -100
  20. package/dist/AvatarGroup.css +34 -34
  21. package/dist/AvatarGroup.mjs +100 -100
  22. package/dist/Badge.cjs +91 -67
  23. package/dist/Badge.cjs.map +1 -1
  24. package/dist/Badge.css +163 -91
  25. package/dist/Badge.css.map +1 -1
  26. package/dist/Badge.mjs +91 -67
  27. package/dist/Badge.mjs.map +1 -1
  28. package/dist/Breadcrumbs.cjs +115 -115
  29. package/dist/Breadcrumbs.css +89 -89
  30. package/dist/Breadcrumbs.mjs +115 -115
  31. package/dist/Button.cjs +236 -152
  32. package/dist/Button.cjs.map +1 -1
  33. package/dist/Button.css +309 -165
  34. package/dist/Button.css.map +1 -1
  35. package/dist/Button.mjs +236 -152
  36. package/dist/Button.mjs.map +1 -1
  37. package/dist/ButtonGroup.cjs +19 -19
  38. package/dist/ButtonGroup.css +15 -15
  39. package/dist/ButtonGroup.mjs +19 -19
  40. package/dist/Card.cjs +264 -261
  41. package/dist/Card.cjs.map +1 -1
  42. package/dist/Card.css +210 -198
  43. package/dist/Card.css.map +1 -1
  44. package/dist/Card.mjs +264 -261
  45. package/dist/Card.mjs.map +1 -1
  46. package/dist/CardView.cjs +15 -15
  47. package/dist/CardView.css +18 -18
  48. package/dist/CardView.mjs +15 -15
  49. package/dist/CenterBaseline.cjs +1 -1
  50. package/dist/CenterBaseline.css +2 -2
  51. package/dist/CenterBaseline.mjs +1 -1
  52. package/dist/Checkbox.cjs +124 -73
  53. package/dist/Checkbox.cjs.map +1 -1
  54. package/dist/Checkbox.css +201 -81
  55. package/dist/Checkbox.css.map +1 -1
  56. package/dist/Checkbox.mjs +124 -73
  57. package/dist/Checkbox.mjs.map +1 -1
  58. package/dist/CheckboxGroup.cjs +49 -49
  59. package/dist/CheckboxGroup.css +41 -41
  60. package/dist/CheckboxGroup.mjs +49 -49
  61. package/dist/ClearButton.cjs +15 -15
  62. package/dist/ClearButton.css +17 -17
  63. package/dist/ClearButton.mjs +15 -15
  64. package/dist/CloseButton.cjs +35 -35
  65. package/dist/CloseButton.css +33 -33
  66. package/dist/CloseButton.mjs +35 -35
  67. package/dist/ColorArea.cjs +22 -22
  68. package/dist/ColorArea.css +15 -15
  69. package/dist/ColorArea.mjs +22 -22
  70. package/dist/ColorField.cjs +38 -38
  71. package/dist/ColorField.css +32 -32
  72. package/dist/ColorField.mjs +38 -38
  73. package/dist/ColorHandle.cjs +27 -21
  74. package/dist/ColorHandle.cjs.map +1 -1
  75. package/dist/ColorHandle.css +93 -45
  76. package/dist/ColorHandle.css.map +1 -1
  77. package/dist/ColorHandle.mjs +27 -21
  78. package/dist/ColorHandle.mjs.map +1 -1
  79. package/dist/ColorSlider.cjs +52 -52
  80. package/dist/ColorSlider.css +51 -51
  81. package/dist/ColorSlider.mjs +52 -52
  82. package/dist/ColorSwatch.cjs +27 -24
  83. package/dist/ColorSwatch.cjs.map +1 -1
  84. package/dist/ColorSwatch.css +41 -29
  85. package/dist/ColorSwatch.css.map +1 -1
  86. package/dist/ColorSwatch.mjs +27 -24
  87. package/dist/ColorSwatch.mjs.map +1 -1
  88. package/dist/ColorSwatchPicker.cjs +23 -23
  89. package/dist/ColorSwatchPicker.css +60 -48
  90. package/dist/ColorSwatchPicker.css.map +1 -1
  91. package/dist/ColorSwatchPicker.mjs +23 -23
  92. package/dist/ColorWheel.cjs +22 -22
  93. package/dist/ColorWheel.css +16 -16
  94. package/dist/ColorWheel.mjs +22 -22
  95. package/dist/ComboBox.cjs +80 -80
  96. package/dist/ComboBox.css +88 -88
  97. package/dist/ComboBox.mjs +80 -80
  98. package/dist/ContextualHelp.cjs +5 -5
  99. package/dist/ContextualHelp.css +38 -38
  100. package/dist/ContextualHelp.mjs +5 -5
  101. package/dist/CustomDialog.cjs +31 -31
  102. package/dist/CustomDialog.css +25 -25
  103. package/dist/CustomDialog.mjs +31 -31
  104. package/dist/Dialog.cjs +17 -17
  105. package/dist/Dialog.css +64 -64
  106. package/dist/Dialog.mjs +17 -17
  107. package/dist/Disclosure.cjs +111 -108
  108. package/dist/Disclosure.cjs.map +1 -1
  109. package/dist/Disclosure.css +124 -112
  110. package/dist/Disclosure.css.map +1 -1
  111. package/dist/Disclosure.mjs +111 -108
  112. package/dist/Disclosure.mjs.map +1 -1
  113. package/dist/Divider.cjs +26 -26
  114. package/dist/Divider.css +16 -16
  115. package/dist/Divider.mjs +26 -26
  116. package/dist/DropZone.cjs +56 -47
  117. package/dist/DropZone.cjs.map +1 -1
  118. package/dist/DropZone.css +80 -56
  119. package/dist/DropZone.css.map +1 -1
  120. package/dist/DropZone.mjs +56 -47
  121. package/dist/DropZone.mjs.map +1 -1
  122. package/dist/Field.cjs +204 -150
  123. package/dist/Field.cjs.map +1 -1
  124. package/dist/Field.css +246 -150
  125. package/dist/Field.css.map +1 -1
  126. package/dist/Field.mjs +204 -150
  127. package/dist/Field.mjs.map +1 -1
  128. package/dist/Form.cjs +10 -10
  129. package/dist/Form.css +9 -9
  130. package/dist/Form.mjs +10 -10
  131. package/dist/FullscreenDialog.cjs +5 -5
  132. package/dist/FullscreenDialog.css +72 -72
  133. package/dist/FullscreenDialog.mjs +5 -5
  134. package/dist/IllustratedMessage.cjs +134 -134
  135. package/dist/IllustratedMessage.css +69 -69
  136. package/dist/IllustratedMessage.mjs +134 -134
  137. package/dist/Image.cjs +12 -12
  138. package/dist/Image.css +13 -13
  139. package/dist/Image.mjs +12 -12
  140. package/dist/InlineAlert.cjs +104 -77
  141. package/dist/InlineAlert.cjs.map +1 -1
  142. package/dist/InlineAlert.css +149 -77
  143. package/dist/InlineAlert.css.map +1 -1
  144. package/dist/InlineAlert.mjs +104 -77
  145. package/dist/InlineAlert.mjs.map +1 -1
  146. package/dist/Link.cjs +31 -31
  147. package/dist/Link.css +30 -30
  148. package/dist/Link.mjs +31 -31
  149. package/dist/Menu.cjs +269 -264
  150. package/dist/Menu.cjs.map +1 -1
  151. package/dist/Menu.css +152 -152
  152. package/dist/Menu.css.map +1 -1
  153. package/dist/Menu.mjs +270 -265
  154. package/dist/Menu.mjs.map +1 -1
  155. package/dist/Meter.cjs +85 -85
  156. package/dist/Meter.css +81 -81
  157. package/dist/Meter.mjs +85 -85
  158. package/dist/Modal.cjs +48 -48
  159. package/dist/Modal.css +46 -46
  160. package/dist/Modal.mjs +48 -48
  161. package/dist/NumberField.cjs +115 -115
  162. package/dist/NumberField.css +114 -114
  163. package/dist/NumberField.mjs +115 -115
  164. package/dist/Picker.cjs +193 -175
  165. package/dist/Picker.cjs.map +1 -1
  166. package/dist/Picker.css +223 -163
  167. package/dist/Picker.css.map +1 -1
  168. package/dist/Picker.mjs +193 -175
  169. package/dist/Picker.mjs.map +1 -1
  170. package/dist/Popover.cjs +84 -78
  171. package/dist/Popover.cjs.map +1 -1
  172. package/dist/Popover.css +89 -65
  173. package/dist/Popover.css.map +1 -1
  174. package/dist/Popover.mjs +84 -78
  175. package/dist/Popover.mjs.map +1 -1
  176. package/dist/ProgressBar.cjs +98 -98
  177. package/dist/ProgressBar.css +92 -92
  178. package/dist/ProgressBar.mjs +98 -98
  179. package/dist/ProgressCircle.cjs +17 -17
  180. package/dist/ProgressCircle.css +15 -15
  181. package/dist/ProgressCircle.mjs +17 -17
  182. package/dist/Provider.cjs +4 -4
  183. package/dist/Provider.css +5 -5
  184. package/dist/Provider.mjs +4 -4
  185. package/dist/Radio.cjs +152 -80
  186. package/dist/Radio.cjs.map +1 -1
  187. package/dist/Radio.css +240 -96
  188. package/dist/Radio.css.map +1 -1
  189. package/dist/Radio.mjs +152 -80
  190. package/dist/Radio.mjs.map +1 -1
  191. package/dist/RadioGroup.cjs +47 -47
  192. package/dist/RadioGroup.css +41 -41
  193. package/dist/RadioGroup.mjs +47 -47
  194. package/dist/SearchField.cjs +42 -42
  195. package/dist/SearchField.css +47 -47
  196. package/dist/SearchField.mjs +42 -42
  197. package/dist/SegmentedControl.cjs +101 -89
  198. package/dist/SegmentedControl.cjs.map +1 -1
  199. package/dist/SegmentedControl.css +140 -92
  200. package/dist/SegmentedControl.css.map +1 -1
  201. package/dist/SegmentedControl.mjs +101 -89
  202. package/dist/SegmentedControl.mjs.map +1 -1
  203. package/dist/Slider.cjs +229 -196
  204. package/dist/Slider.cjs.map +1 -1
  205. package/dist/Slider.css +221 -149
  206. package/dist/Slider.css.map +1 -1
  207. package/dist/Slider.mjs +229 -196
  208. package/dist/Slider.mjs.map +1 -1
  209. package/dist/StatusLight.cjs +56 -56
  210. package/dist/StatusLight.css +59 -59
  211. package/dist/StatusLight.mjs +56 -56
  212. package/dist/Switch.cjs +107 -74
  213. package/dist/Switch.cjs.map +1 -1
  214. package/dist/Switch.css +141 -69
  215. package/dist/Switch.css.map +1 -1
  216. package/dist/Switch.mjs +107 -74
  217. package/dist/Switch.mjs.map +1 -1
  218. package/dist/TableView.cjs +280 -253
  219. package/dist/TableView.cjs.map +1 -1
  220. package/dist/TableView.css +199 -163
  221. package/dist/TableView.css.map +1 -1
  222. package/dist/TableView.mjs +280 -253
  223. package/dist/TableView.mjs.map +1 -1
  224. package/dist/Tabs.cjs +83 -83
  225. package/dist/Tabs.css +58 -58
  226. package/dist/Tabs.mjs +83 -83
  227. package/dist/TagGroup.cjs +148 -148
  228. package/dist/TagGroup.css +134 -134
  229. package/dist/TagGroup.mjs +148 -148
  230. package/dist/TextField.cjs +59 -59
  231. package/dist/TextField.css +62 -62
  232. package/dist/TextField.mjs +59 -59
  233. package/dist/ToggleButton.cjs +3 -3
  234. package/dist/ToggleButton.css +12 -12
  235. package/dist/ToggleButton.mjs +3 -3
  236. package/dist/Tooltip.cjs +60 -57
  237. package/dist/Tooltip.cjs.map +1 -1
  238. package/dist/Tooltip.css +83 -71
  239. package/dist/Tooltip.css.map +1 -1
  240. package/dist/Tooltip.mjs +60 -57
  241. package/dist/Tooltip.mjs.map +1 -1
  242. package/dist/TreeView.cjs +465 -0
  243. package/dist/TreeView.cjs.map +1 -0
  244. package/dist/TreeView.css +632 -0
  245. package/dist/TreeView.css.map +1 -0
  246. package/dist/TreeView.mjs +455 -0
  247. package/dist/TreeView.mjs.map +1 -0
  248. package/dist/main.cjs +4 -0
  249. package/dist/main.cjs.map +1 -1
  250. package/dist/module.mjs +3 -1
  251. package/dist/module.mjs.map +1 -1
  252. package/dist/types.d.ts +21 -1
  253. package/dist/types.d.ts.map +1 -1
  254. package/icons/Skeleton.cjs +2 -2
  255. package/icons/Skeleton.css +5 -5
  256. package/icons/Skeleton.mjs +2 -2
  257. package/package.json +20 -19
  258. package/src/Menu.tsx +2 -0
  259. package/src/TreeView.tsx +497 -0
  260. package/src/index.ts +2 -0
  261. package/style/__tests__/style-macro.test.js +18 -18
  262. package/style/dist/spectrum-theme.cjs +20 -10
  263. package/style/dist/spectrum-theme.cjs.map +1 -1
  264. package/style/dist/spectrum-theme.mjs +20 -10
  265. package/style/dist/spectrum-theme.mjs.map +1 -1
  266. package/style/dist/types.d.ts +4 -0
  267. package/style/dist/types.d.ts.map +1 -1
  268. package/style/spectrum-theme.ts +18 -11
package/dist/Switch.css CHANGED
@@ -1,51 +1,51 @@
1
1
  @layer _.a {
2
- ._0d {
2
+ ._3d {
3
3
  display: flex;
4
4
  }
5
5
 
6
- .jF {
6
+ .iF {
7
7
  column-gap: .714286em;
8
8
  }
9
9
 
10
- ._2d {
10
+ ._5d {
11
11
  align-items: baseline;
12
12
  }
13
13
 
14
- .le {
14
+ .ke {
15
15
  width: fit-content;
16
16
  }
17
17
 
18
- ._da {
18
+ ._ga {
19
19
  font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
20
20
  }
21
21
 
22
- ._ee {
22
+ ._he {
23
23
  font-size: .875rem;
24
24
  }
25
25
 
26
- ._ea {
26
+ ._ha {
27
27
  font-size: .6875rem;
28
28
  }
29
29
 
30
- ._ec {
30
+ ._hc {
31
31
  font-size: .75rem;
32
32
  }
33
33
 
34
- ._eg {
34
+ ._hg {
35
35
  font-size: 1rem;
36
36
  }
37
37
 
38
- ._ei {
38
+ ._hi {
39
39
  font-size: 1.125rem;
40
40
  }
41
41
 
42
- ._fb {
42
+ ._ib {
43
43
  font-variation-settings: "wght" 400;
44
44
  font-synthesis-weight: none;
45
45
  font-weight: 400;
46
46
  }
47
47
 
48
- ._ga {
48
+ ._ja {
49
49
  line-height: 1.3;
50
50
  }
51
51
 
@@ -61,108 +61,156 @@
61
61
  color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
62
62
  }
63
63
 
64
- ._Pb {
64
+ ._Sb {
65
65
  transition-property: color, background-color, var(--gp), border-color, text-decoration-color, fill, stroke;
66
66
  }
67
67
 
68
- .__b-e10s0d {
68
+ .__e-e10s0d {
69
69
  grid-column-start: field;
70
70
  }
71
71
 
72
- .__S-yksgrp {
72
+ .__V-yksgrp {
73
73
  -webkit-tap-highlight-color: #0000;
74
74
  }
75
75
 
76
- ._Ma {
76
+ ._Pa {
77
77
  outline-style: none;
78
78
  }
79
79
 
80
- ._Mb {
80
+ ._Pb {
81
81
  outline-style: solid;
82
82
  }
83
83
 
84
- .dx {
84
+ .cx {
85
85
  outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
86
86
  }
87
87
 
88
- ._Oc {
88
+ ._Rc {
89
89
  outline-width: 2px;
90
90
  }
91
91
 
92
- ._N-3t1z {
92
+ ._Q-3t1z {
93
93
  outline-offset: 2px;
94
94
  }
95
95
 
96
- .-rcxrzo_l--unb2ci {
96
+ .-rcxrzo_k--unb2ci {
97
97
  --trackWidth: 1.85714em;
98
98
  }
99
99
 
100
- .-_14pdrm5_k-k {
100
+ .-_14pdrm5_j-k {
101
101
  --trackHeight: calc(1rem * var(--s2-scale));
102
102
  }
103
103
 
104
- .-_14pdrm5_k-l {
104
+ .-_14pdrm5_j-l {
105
105
  --trackHeight: calc(.875rem * var(--s2-scale));
106
106
  }
107
107
 
108
- .-_14pdrm5_k-m {
108
+ .-_14pdrm5_j-m {
109
109
  --trackHeight: calc(1.125rem * var(--s2-scale));
110
110
  }
111
111
 
112
- .-_14pdrm5_k-g {
112
+ .-_14pdrm5_j-g {
113
113
  --trackHeight: calc(1.25rem * var(--s2-scale));
114
114
  }
115
115
 
116
- .l-rcxrzo {
116
+ .k-rcxrzo {
117
117
  width: var(--trackWidth);
118
118
  }
119
119
 
120
- .k-14pdrm5 {
120
+ .j-14pdrm5 {
121
121
  height: var(--trackHeight);
122
122
  }
123
123
 
124
- .__oa {
124
+ .__ra {
125
125
  box-sizing: border-box;
126
126
  }
127
127
 
128
- .uc {
128
+ .tc {
129
129
  border-top-width: 2px;
130
130
  }
131
131
 
132
- .vc {
132
+ .uc {
133
133
  border-bottom-width: 2px;
134
134
  }
135
135
 
136
- .sc {
136
+ .rc {
137
137
  border-inline-start-width: 2px;
138
138
  }
139
139
 
140
- .tc {
140
+ .sc {
141
141
  border-inline-end-width: 2px;
142
142
  }
143
143
 
144
- .wa {
144
+ .za {
145
145
  border-style: solid;
146
146
  }
147
147
 
148
- ._Ab {
148
+ ._Db {
149
149
  forced-color-adjust: none;
150
150
  }
151
151
 
152
- .cn {
153
- border-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
152
+ .xn {
153
+ border-top-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
154
+ }
155
+
156
+ .xo {
157
+ border-top-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
158
+ }
159
+
160
+ .xj {
161
+ border-top-color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
162
+ }
163
+
164
+ .xa {
165
+ border-top-color: #0000;
166
+ }
167
+
168
+ .yn {
169
+ border-bottom-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
170
+ }
171
+
172
+ .yo {
173
+ border-bottom-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
174
+ }
175
+
176
+ .yj {
177
+ border-bottom-color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
178
+ }
179
+
180
+ .ya {
181
+ border-bottom-color: #0000;
182
+ }
183
+
184
+ .vn {
185
+ border-inline-start-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
186
+ }
187
+
188
+ .vo {
189
+ border-inline-start-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
190
+ }
191
+
192
+ .vj {
193
+ border-inline-start-color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
194
+ }
195
+
196
+ .va {
197
+ border-inline-start-color: #0000;
154
198
  }
155
199
 
156
- .co {
157
- border-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
200
+ .wn {
201
+ border-inline-end-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
158
202
  }
159
203
 
160
- .cj {
161
- border-color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
204
+ .wo {
205
+ border-inline-end-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
162
206
  }
163
207
 
164
- .ca {
165
- border-color: #0000;
208
+ .wj {
209
+ border-inline-end-color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
210
+ }
211
+
212
+ .wa {
213
+ border-inline-end-color: #0000;
166
214
  }
167
215
 
168
216
  .by {
@@ -173,27 +221,27 @@
173
221
  background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #6995fe);
174
222
  }
175
223
 
176
- .kb {
224
+ .jb {
177
225
  height: 100%;
178
226
  }
179
227
 
180
- ._cb {
228
+ ._fb {
181
229
  aspect-ratio: 1;
182
230
  }
183
231
 
184
- ._wf {
232
+ ._zf {
185
233
  border-start-start-radius: 9999px;
186
234
  }
187
235
 
188
- ._xf {
236
+ ._Af {
189
237
  border-start-end-radius: 9999px;
190
238
  }
191
239
 
192
- ._yf {
240
+ ._Bf {
193
241
  border-end-start-radius: 9999px;
194
242
  }
195
243
 
196
- ._zf {
244
+ ._Cf {
197
245
  border-end-end-radius: 9999px;
198
246
  }
199
247
 
@@ -213,84 +261,84 @@
213
261
  background-color: var(--lightningcss-light, #fff) var(--lightningcss-dark, #111);
214
262
  }
215
263
 
216
- ._Pa {
264
+ ._Sa {
217
265
  transition-property: color, background-color, var(--gp), border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter;
218
266
  }
219
267
 
220
- ._R-375x7f {
268
+ ._U-375x7f {
221
269
  transition-duration: .15s;
222
270
  }
223
271
 
224
- ._Sa {
272
+ ._Va {
225
273
  transition-timing-function: cubic-bezier(.45, 0, .4, 1);
226
274
  }
227
275
  }
228
276
 
229
277
  @layer _.b {
230
- ._d-enzrfpb:lang(ar) {
278
+ ._g-enzrfpb:lang(ar) {
231
279
  font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
232
280
  }
233
281
 
234
- ._g-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
282
+ ._j-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
235
283
  line-height: 1.5;
236
284
  }
237
285
  }
238
286
 
239
287
  @layer _.c {
240
- ._d-enzwzjc:lang(he) {
288
+ ._g-enzwzjc:lang(he) {
241
289
  font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
242
290
  }
243
291
  }
244
292
 
245
293
  @layer _.d {
246
- ._d-enzykdd:lang(ja) {
294
+ ._g-enzykdd:lang(ja) {
247
295
  font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
248
296
  }
249
297
  }
250
298
 
251
299
  @layer _.e {
252
- ._d-enzzrge:lang(ko) {
300
+ ._g-enzzrge:lang(ko) {
253
301
  font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
254
302
  }
255
303
  }
256
304
 
257
305
  @layer _.f {
258
- ._d-eo0c6sf:lang(zh) {
306
+ ._g-eo0c6sf:lang(zh) {
259
307
  font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
260
308
  }
261
309
  }
262
310
 
263
311
  @layer _.g {
264
- ._d-1uotwbwg:lang(zh-hant) {
312
+ ._g-1uotwbwg:lang(zh-hant) {
265
313
  font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
266
314
  }
267
315
  }
268
316
 
269
317
  @layer _.h {
270
- ._d-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
318
+ ._g-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
271
319
  font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
272
320
  }
273
321
  }
274
322
 
275
323
  @layer _.b.b {
276
324
  @media not ((hover: hover) and (pointer: fine)) {
277
- ._ebf {
325
+ ._hbf {
278
326
  font-size: 1.0625rem;
279
327
  }
280
328
 
281
- ._ebb {
329
+ ._hbb {
282
330
  font-size: .8125rem;
283
331
  }
284
332
 
285
- ._ebd {
333
+ ._hbd {
286
334
  font-size: .9375rem;
287
335
  }
288
336
 
289
- ._ebh {
337
+ ._hbh {
290
338
  font-size: 1.1875rem;
291
339
  }
292
340
 
293
- ._ebj {
341
+ ._hbj {
294
342
  font-size: 1.375rem;
295
343
  }
296
344
  }
@@ -302,16 +350,40 @@
302
350
  color: graytext;
303
351
  }
304
352
 
305
- .da_____M {
353
+ .ca_____M {
306
354
  outline-color: highlight;
307
355
  }
308
356
 
309
- .ca_____I {
310
- border-color: buttonborder;
357
+ .xa_____I {
358
+ border-top-color: buttonborder;
359
+ }
360
+
361
+ .xa_____O {
362
+ border-top-color: graytext;
363
+ }
364
+
365
+ .ya_____I {
366
+ border-bottom-color: buttonborder;
367
+ }
368
+
369
+ .ya_____O {
370
+ border-bottom-color: graytext;
371
+ }
372
+
373
+ .va_____I {
374
+ border-inline-start-color: buttonborder;
375
+ }
376
+
377
+ .va_____O {
378
+ border-inline-start-color: graytext;
379
+ }
380
+
381
+ .wa_____I {
382
+ border-inline-end-color: buttonborder;
311
383
  }
312
384
 
313
- .ca_____O {
314
- border-color: graytext;
385
+ .wa_____O {
386
+ border-inline-end-color: graytext;
315
387
  }
316
388
 
317
389
  .ba_____M {
@@ -1 +1 @@
1
- {"mappings":"ACiDgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAoBF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAyCC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AA7DC;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAoBF;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["dcb0a1e1b828d584","packages/@react-spectrum/s2/src/Switch.tsx"],"sourcesContent":["@import \"b4e99f1579042857\";\n@import \"8f3fcc7ad85a1ee6\";\n@import \"a22e7952bd491c56\";\n","/*\n * Copyright 2024 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 REPRESENTATIONS\n * 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 {\n Switch as AriaSwitch,\n SwitchProps as AriaSwitchProps,\n ContextValue,\n SwitchRenderProps\n} from 'react-aria-components';\nimport {baseColor, focusRing, fontRelative, style} from '../style' with {type: 'macro'};\nimport {CenterBaseline} from './CenterBaseline';\nimport {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface SwitchStyleProps {\n /**\n * The size of the Switch.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * Whether the Switch should be displayed with an emphasized style.\n */\n isEmphasized?: boolean\n}\n\ninterface RenderProps extends SwitchRenderProps, SwitchStyleProps {}\n\nexport interface SwitchProps extends Omit<AriaSwitchProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, SwitchStyleProps {\n children?: ReactNode\n}\n\nexport const SwitchContext = createContext<ContextValue<SwitchProps, FocusableRefValue<HTMLLabelElement>>>(null);\n\nconst wrapper = style({\n display: 'flex',\n columnGap: 'text-to-control',\n alignItems: 'baseline',\n width: 'fit',\n font: 'control',\n transition: 'colors',\n color: {\n default: 'neutral',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n gridColumnStart: {\n isInForm: 'field'\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\nconst track = style<RenderProps>({\n ...focusRing(),\n borderRadius: 'full',\n '--trackWidth': {\n type: 'width',\n value: fontRelative(26)\n },\n '--trackHeight': {\n type: 'height',\n value: 'control-sm'\n },\n width: '--trackWidth',\n height: '--trackHeight',\n boxSizing: 'border-box',\n borderWidth: 2,\n borderStyle: 'solid',\n transition: 'default',\n forcedColorAdjust: 'none',\n borderColor: {\n default: baseColor('gray-800'),\n forcedColors: 'ButtonBorder',\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'transparent'\n },\n backgroundColor: {\n default: 'gray-25',\n isSelected: {\n default: 'neutral',\n isEmphasized: baseColor('accent-900'),\n forcedColors: 'Highlight',\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n }\n }\n});\n\nconst handle = style<RenderProps>({\n height: 'full',\n aspectRatio: 'square',\n borderRadius: 'full',\n backgroundColor: {\n default: 'neutral',\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'gray-25'\n },\n transition: 'default'\n});\n\n// Use an inline style to calculate the transform so we can combine it with the press scale.\nconst transformStyle = ({isSelected}: SwitchRenderProps) => ({\n // In the default state, the handle is 8px smaller than the track. When selected it grows to 6px smaller than the track.\n // Normally this could be calculated as a scale transform with (trackHeight - 8px) / trackHeight, however,\n // CSS does not allow division with units. To solve this we use a 3d perspective transform. Perspective is the\n // distance from the Z=0 plane to the viewer. Since we want to scale the handle by a fixed amount and we cannot divide\n // by a value with units, we can set the Z translation to a fixed amount and change the perspective in order to achieve\n // the desired effect. Given the following formula:\n //\n // scale = perspective / (perspective - translateZ)\n //\n // and desired scale factors (accounting for the 2px border on each side of the track):\n //\n // defaultScale = (trackHeight - 8px) / (trackHeight - 4px)\n // selectedScale = (trackHeight - 6px) / (trackHeight - 4px)\n //\n // we can solve for the perspective needed in each case where translateZ is hard coded to -4px:\n //\n // defaultPerspective = trackHeight - 8px\n // selectedPerspective = 2 * (trackHeight - 6px)\n transform: isSelected\n // The selected state also translates the X position to the end of the track (minus the borders).\n ? 'translateX(calc(var(--trackWidth) - 100% - 4px)) perspective(calc(2 * (var(--trackHeight) - 6px))) translateZ(-4px)'\n : 'perspective(calc(var(--trackHeight) - 8px)) translateZ(-4px)'\n});\n\n/**\n * Switches allow users to turn an individual option on or off.\n * They are usually used to activate or deactivate a specific setting.\n */\nexport const Switch = /*#__PURE__*/ forwardRef(function Switch(props: SwitchProps, ref: FocusableRef<HTMLLabelElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, SwitchContext);\n let {children, UNSAFE_className = '', UNSAFE_style} = props;\n let inputRef = useRef<HTMLInputElement | null>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let handleRef = useRef(null);\n let isInForm = !!useContext(FormContext);\n props = useFormProps(props);\n return (\n <AriaSwitch\n {...props}\n ref={domRef}\n inputRef={inputRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}>\n {renderProps => (\n <>\n <CenterBaseline>\n <div\n className={track({\n ...renderProps,\n size: props.size || 'M',\n isEmphasized: props.isEmphasized\n })}>\n <div\n ref={handleRef}\n style={pressScale(handleRef, transformStyle)(renderProps)}\n className={handle(renderProps)} />\n </div>\n </CenterBaseline>\n {children}\n </>\n )}\n </AriaSwitch>\n );\n});\n"],"names":[],"version":3,"file":"Switch.css.map"}
1
+ {"mappings":"ACiDgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAoBF;;;;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;;;;EAyCC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AA7DC;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAoBF;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["dcb0a1e1b828d584","packages/@react-spectrum/s2/src/Switch.tsx"],"sourcesContent":["@import \"b4e99f1579042857\";\n@import \"8f3fcc7ad85a1ee6\";\n@import \"a22e7952bd491c56\";\n","/*\n * Copyright 2024 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 REPRESENTATIONS\n * 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 {\n Switch as AriaSwitch,\n SwitchProps as AriaSwitchProps,\n ContextValue,\n SwitchRenderProps\n} from 'react-aria-components';\nimport {baseColor, focusRing, fontRelative, style} from '../style' with {type: 'macro'};\nimport {CenterBaseline} from './CenterBaseline';\nimport {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface SwitchStyleProps {\n /**\n * The size of the Switch.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * Whether the Switch should be displayed with an emphasized style.\n */\n isEmphasized?: boolean\n}\n\ninterface RenderProps extends SwitchRenderProps, SwitchStyleProps {}\n\nexport interface SwitchProps extends Omit<AriaSwitchProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, SwitchStyleProps {\n children?: ReactNode\n}\n\nexport const SwitchContext = createContext<ContextValue<SwitchProps, FocusableRefValue<HTMLLabelElement>>>(null);\n\nconst wrapper = style({\n display: 'flex',\n columnGap: 'text-to-control',\n alignItems: 'baseline',\n width: 'fit',\n font: 'control',\n transition: 'colors',\n color: {\n default: 'neutral',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n gridColumnStart: {\n isInForm: 'field'\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\nconst track = style<RenderProps>({\n ...focusRing(),\n borderRadius: 'full',\n '--trackWidth': {\n type: 'width',\n value: fontRelative(26)\n },\n '--trackHeight': {\n type: 'height',\n value: 'control-sm'\n },\n width: '--trackWidth',\n height: '--trackHeight',\n boxSizing: 'border-box',\n borderWidth: 2,\n borderStyle: 'solid',\n transition: 'default',\n forcedColorAdjust: 'none',\n borderColor: {\n default: baseColor('gray-800'),\n forcedColors: 'ButtonBorder',\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'transparent'\n },\n backgroundColor: {\n default: 'gray-25',\n isSelected: {\n default: 'neutral',\n isEmphasized: baseColor('accent-900'),\n forcedColors: 'Highlight',\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n }\n }\n});\n\nconst handle = style<RenderProps>({\n height: 'full',\n aspectRatio: 'square',\n borderRadius: 'full',\n backgroundColor: {\n default: 'neutral',\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'gray-25'\n },\n transition: 'default'\n});\n\n// Use an inline style to calculate the transform so we can combine it with the press scale.\nconst transformStyle = ({isSelected}: SwitchRenderProps) => ({\n // In the default state, the handle is 8px smaller than the track. When selected it grows to 6px smaller than the track.\n // Normally this could be calculated as a scale transform with (trackHeight - 8px) / trackHeight, however,\n // CSS does not allow division with units. To solve this we use a 3d perspective transform. Perspective is the\n // distance from the Z=0 plane to the viewer. Since we want to scale the handle by a fixed amount and we cannot divide\n // by a value with units, we can set the Z translation to a fixed amount and change the perspective in order to achieve\n // the desired effect. Given the following formula:\n //\n // scale = perspective / (perspective - translateZ)\n //\n // and desired scale factors (accounting for the 2px border on each side of the track):\n //\n // defaultScale = (trackHeight - 8px) / (trackHeight - 4px)\n // selectedScale = (trackHeight - 6px) / (trackHeight - 4px)\n //\n // we can solve for the perspective needed in each case where translateZ is hard coded to -4px:\n //\n // defaultPerspective = trackHeight - 8px\n // selectedPerspective = 2 * (trackHeight - 6px)\n transform: isSelected\n // The selected state also translates the X position to the end of the track (minus the borders).\n ? 'translateX(calc(var(--trackWidth) - 100% - 4px)) perspective(calc(2 * (var(--trackHeight) - 6px))) translateZ(-4px)'\n : 'perspective(calc(var(--trackHeight) - 8px)) translateZ(-4px)'\n});\n\n/**\n * Switches allow users to turn an individual option on or off.\n * They are usually used to activate or deactivate a specific setting.\n */\nexport const Switch = /*#__PURE__*/ forwardRef(function Switch(props: SwitchProps, ref: FocusableRef<HTMLLabelElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, SwitchContext);\n let {children, UNSAFE_className = '', UNSAFE_style} = props;\n let inputRef = useRef<HTMLInputElement | null>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let handleRef = useRef(null);\n let isInForm = !!useContext(FormContext);\n props = useFormProps(props);\n return (\n <AriaSwitch\n {...props}\n ref={domRef}\n inputRef={inputRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}>\n {renderProps => (\n <>\n <CenterBaseline>\n <div\n className={track({\n ...renderProps,\n size: props.size || 'M',\n isEmphasized: props.isEmphasized\n })}>\n <div\n ref={handleRef}\n style={pressScale(handleRef, transformStyle)(renderProps)}\n className={handle(renderProps)} />\n </div>\n </CenterBaseline>\n {children}\n </>\n )}\n </AriaSwitch>\n );\n});\n"],"names":[],"version":3,"file":"Switch.css.map"}