@react-spectrum/s2 3.0.0-nightly-56da82e3e-250212 → 3.0.0-nightly-260eb700f-250213

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 (267) 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 +68 -92
  23. package/dist/Badge.cjs.map +1 -1
  24. package/dist/Badge.css +92 -164
  25. package/dist/Badge.css.map +1 -1
  26. package/dist/Badge.mjs +68 -92
  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 +152 -236
  32. package/dist/Button.cjs.map +1 -1
  33. package/dist/Button.css +165 -309
  34. package/dist/Button.css.map +1 -1
  35. package/dist/Button.mjs +152 -236
  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 +261 -264
  41. package/dist/Card.cjs.map +1 -1
  42. package/dist/Card.css +198 -210
  43. package/dist/Card.css.map +1 -1
  44. package/dist/Card.mjs +261 -264
  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 +73 -124
  53. package/dist/Checkbox.cjs.map +1 -1
  54. package/dist/Checkbox.css +81 -201
  55. package/dist/Checkbox.css.map +1 -1
  56. package/dist/Checkbox.mjs +73 -124
  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 +21 -27
  74. package/dist/ColorHandle.cjs.map +1 -1
  75. package/dist/ColorHandle.css +45 -93
  76. package/dist/ColorHandle.css.map +1 -1
  77. package/dist/ColorHandle.mjs +21 -27
  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 +24 -27
  83. package/dist/ColorSwatch.cjs.map +1 -1
  84. package/dist/ColorSwatch.css +29 -41
  85. package/dist/ColorSwatch.css.map +1 -1
  86. package/dist/ColorSwatch.mjs +24 -27
  87. package/dist/ColorSwatch.mjs.map +1 -1
  88. package/dist/ColorSwatchPicker.cjs +23 -23
  89. package/dist/ColorSwatchPicker.css +48 -60
  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 +108 -111
  108. package/dist/Disclosure.cjs.map +1 -1
  109. package/dist/Disclosure.css +112 -124
  110. package/dist/Disclosure.css.map +1 -1
  111. package/dist/Disclosure.mjs +108 -111
  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 +47 -56
  117. package/dist/DropZone.cjs.map +1 -1
  118. package/dist/DropZone.css +56 -80
  119. package/dist/DropZone.css.map +1 -1
  120. package/dist/DropZone.mjs +47 -56
  121. package/dist/DropZone.mjs.map +1 -1
  122. package/dist/Field.cjs +150 -204
  123. package/dist/Field.cjs.map +1 -1
  124. package/dist/Field.css +150 -246
  125. package/dist/Field.css.map +1 -1
  126. package/dist/Field.mjs +150 -204
  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 +77 -104
  141. package/dist/InlineAlert.cjs.map +1 -1
  142. package/dist/InlineAlert.css +77 -149
  143. package/dist/InlineAlert.css.map +1 -1
  144. package/dist/InlineAlert.mjs +77 -104
  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 -269
  150. package/dist/Menu.css +155 -155
  151. package/dist/Menu.mjs +269 -269
  152. package/dist/Meter.cjs +85 -85
  153. package/dist/Meter.css +81 -81
  154. package/dist/Meter.mjs +85 -85
  155. package/dist/Modal.cjs +48 -48
  156. package/dist/Modal.css +46 -46
  157. package/dist/Modal.mjs +48 -48
  158. package/dist/NumberField.cjs +115 -115
  159. package/dist/NumberField.css +114 -114
  160. package/dist/NumberField.mjs +115 -115
  161. package/dist/Picker.cjs +177 -195
  162. package/dist/Picker.cjs.map +1 -1
  163. package/dist/Picker.css +164 -224
  164. package/dist/Picker.css.map +1 -1
  165. package/dist/Picker.mjs +177 -195
  166. package/dist/Picker.mjs.map +1 -1
  167. package/dist/Popover.cjs +79 -85
  168. package/dist/Popover.cjs.map +1 -1
  169. package/dist/Popover.css +65 -89
  170. package/dist/Popover.css.map +1 -1
  171. package/dist/Popover.mjs +79 -85
  172. package/dist/Popover.mjs.map +1 -1
  173. package/dist/ProgressBar.cjs +98 -98
  174. package/dist/ProgressBar.css +92 -92
  175. package/dist/ProgressBar.mjs +98 -98
  176. package/dist/ProgressCircle.cjs +17 -17
  177. package/dist/ProgressCircle.css +15 -15
  178. package/dist/ProgressCircle.mjs +17 -17
  179. package/dist/Provider.cjs +4 -4
  180. package/dist/Provider.css +5 -5
  181. package/dist/Provider.mjs +4 -4
  182. package/dist/Radio.cjs +80 -152
  183. package/dist/Radio.cjs.map +1 -1
  184. package/dist/Radio.css +96 -240
  185. package/dist/Radio.css.map +1 -1
  186. package/dist/Radio.mjs +80 -152
  187. package/dist/Radio.mjs.map +1 -1
  188. package/dist/RadioGroup.cjs +47 -47
  189. package/dist/RadioGroup.css +41 -41
  190. package/dist/RadioGroup.mjs +47 -47
  191. package/dist/SearchField.cjs +42 -42
  192. package/dist/SearchField.css +47 -47
  193. package/dist/SearchField.mjs +42 -42
  194. package/dist/SegmentedControl.cjs +89 -101
  195. package/dist/SegmentedControl.cjs.map +1 -1
  196. package/dist/SegmentedControl.css +92 -140
  197. package/dist/SegmentedControl.css.map +1 -1
  198. package/dist/SegmentedControl.mjs +89 -101
  199. package/dist/SegmentedControl.mjs.map +1 -1
  200. package/dist/Slider.cjs +196 -229
  201. package/dist/Slider.cjs.map +1 -1
  202. package/dist/Slider.css +149 -221
  203. package/dist/Slider.css.map +1 -1
  204. package/dist/Slider.mjs +196 -229
  205. package/dist/Slider.mjs.map +1 -1
  206. package/dist/StatusLight.cjs +56 -56
  207. package/dist/StatusLight.css +59 -59
  208. package/dist/StatusLight.mjs +56 -56
  209. package/dist/Switch.cjs +74 -107
  210. package/dist/Switch.cjs.map +1 -1
  211. package/dist/Switch.css +69 -141
  212. package/dist/Switch.css.map +1 -1
  213. package/dist/Switch.mjs +74 -107
  214. package/dist/Switch.mjs.map +1 -1
  215. package/dist/TableView.cjs +253 -280
  216. package/dist/TableView.cjs.map +1 -1
  217. package/dist/TableView.css +163 -199
  218. package/dist/TableView.css.map +1 -1
  219. package/dist/TableView.mjs +253 -280
  220. package/dist/TableView.mjs.map +1 -1
  221. package/dist/Tabs.cjs +108 -108
  222. package/dist/Tabs.css +81 -81
  223. package/dist/Tabs.mjs +108 -108
  224. package/dist/TabsPicker.cjs +105 -105
  225. package/dist/TabsPicker.css +111 -111
  226. package/dist/TabsPicker.mjs +105 -105
  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 +57 -60
  237. package/dist/Tooltip.cjs.map +1 -1
  238. package/dist/Tooltip.css +71 -83
  239. package/dist/Tooltip.css.map +1 -1
  240. package/dist/Tooltip.mjs +57 -60
  241. package/dist/Tooltip.mjs.map +1 -1
  242. package/dist/TreeView.cjs +199 -248
  243. package/dist/TreeView.cjs.map +1 -1
  244. package/dist/TreeView.css +131 -175
  245. package/dist/TreeView.css.map +1 -1
  246. package/dist/TreeView.mjs +202 -248
  247. package/dist/TreeView.mjs.map +1 -1
  248. package/dist/main.cjs +1 -0
  249. package/dist/main.cjs.map +1 -1
  250. package/dist/module.mjs +2 -2
  251. package/dist/module.mjs.map +1 -1
  252. package/dist/types.d.ts +4 -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 +21 -21
  258. package/src/TreeView.tsx +66 -134
  259. package/src/index.ts +1 -1
  260. package/style/__tests__/style-macro.test.js +18 -18
  261. package/style/dist/spectrum-theme.cjs +10 -20
  262. package/style/dist/spectrum-theme.cjs.map +1 -1
  263. package/style/dist/spectrum-theme.mjs +10 -20
  264. package/style/dist/spectrum-theme.mjs.map +1 -1
  265. package/style/dist/types.d.ts +0 -4
  266. package/style/dist/types.d.ts.map +1 -1
  267. package/style/spectrum-theme.ts +11 -19
package/dist/Switch.css CHANGED
@@ -1,51 +1,51 @@
1
1
  @layer _.a {
2
- ._3d {
2
+ ._0d {
3
3
  display: flex;
4
4
  }
5
5
 
6
- .iF {
6
+ .jF {
7
7
  column-gap: .714286em;
8
8
  }
9
9
 
10
- ._5d {
10
+ ._2d {
11
11
  align-items: baseline;
12
12
  }
13
13
 
14
- .ke {
14
+ .le {
15
15
  width: fit-content;
16
16
  }
17
17
 
18
- ._ga {
18
+ ._da {
19
19
  font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
20
20
  }
21
21
 
22
- ._he {
22
+ ._ee {
23
23
  font-size: .875rem;
24
24
  }
25
25
 
26
- ._ha {
26
+ ._ea {
27
27
  font-size: .6875rem;
28
28
  }
29
29
 
30
- ._hc {
30
+ ._ec {
31
31
  font-size: .75rem;
32
32
  }
33
33
 
34
- ._hg {
34
+ ._eg {
35
35
  font-size: 1rem;
36
36
  }
37
37
 
38
- ._hi {
38
+ ._ei {
39
39
  font-size: 1.125rem;
40
40
  }
41
41
 
42
- ._ib {
42
+ ._fb {
43
43
  font-variation-settings: "wght" 400;
44
44
  font-synthesis-weight: none;
45
45
  font-weight: 400;
46
46
  }
47
47
 
48
- ._ja {
48
+ ._ga {
49
49
  line-height: 1.3;
50
50
  }
51
51
 
@@ -61,156 +61,108 @@
61
61
  color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
62
62
  }
63
63
 
64
- ._Sb {
64
+ ._Pb {
65
65
  transition-property: color, background-color, var(--gp), border-color, text-decoration-color, fill, stroke;
66
66
  }
67
67
 
68
- .__e-e10s0d {
68
+ .__b-e10s0d {
69
69
  grid-column-start: field;
70
70
  }
71
71
 
72
- .__V-yksgrp {
72
+ .__S-yksgrp {
73
73
  -webkit-tap-highlight-color: #0000;
74
74
  }
75
75
 
76
- ._Pa {
76
+ ._Ma {
77
77
  outline-style: none;
78
78
  }
79
79
 
80
- ._Pb {
80
+ ._Mb {
81
81
  outline-style: solid;
82
82
  }
83
83
 
84
- .cx {
84
+ .dx {
85
85
  outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
86
86
  }
87
87
 
88
- ._Rc {
88
+ ._Oc {
89
89
  outline-width: 2px;
90
90
  }
91
91
 
92
- ._Q-3t1z {
92
+ ._N-3t1z {
93
93
  outline-offset: 2px;
94
94
  }
95
95
 
96
- .-rcxrzo_k--unb2ci {
96
+ .-rcxrzo_l--unb2ci {
97
97
  --trackWidth: 1.85714em;
98
98
  }
99
99
 
100
- .-_14pdrm5_j-k {
100
+ .-_14pdrm5_k-k {
101
101
  --trackHeight: calc(1rem * var(--s2-scale));
102
102
  }
103
103
 
104
- .-_14pdrm5_j-l {
104
+ .-_14pdrm5_k-l {
105
105
  --trackHeight: calc(.875rem * var(--s2-scale));
106
106
  }
107
107
 
108
- .-_14pdrm5_j-m {
108
+ .-_14pdrm5_k-m {
109
109
  --trackHeight: calc(1.125rem * var(--s2-scale));
110
110
  }
111
111
 
112
- .-_14pdrm5_j-g {
112
+ .-_14pdrm5_k-g {
113
113
  --trackHeight: calc(1.25rem * var(--s2-scale));
114
114
  }
115
115
 
116
- .k-rcxrzo {
116
+ .l-rcxrzo {
117
117
  width: var(--trackWidth);
118
118
  }
119
119
 
120
- .j-14pdrm5 {
120
+ .k-14pdrm5 {
121
121
  height: var(--trackHeight);
122
122
  }
123
123
 
124
- .__ra {
124
+ .__oa {
125
125
  box-sizing: border-box;
126
126
  }
127
127
 
128
- .tc {
128
+ .uc {
129
129
  border-top-width: 2px;
130
130
  }
131
131
 
132
- .uc {
132
+ .vc {
133
133
  border-bottom-width: 2px;
134
134
  }
135
135
 
136
- .rc {
136
+ .sc {
137
137
  border-inline-start-width: 2px;
138
138
  }
139
139
 
140
- .sc {
140
+ .tc {
141
141
  border-inline-end-width: 2px;
142
142
  }
143
143
 
144
- .za {
144
+ .wa {
145
145
  border-style: solid;
146
146
  }
147
147
 
148
- ._Db {
148
+ ._Ab {
149
149
  forced-color-adjust: none;
150
150
  }
151
151
 
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;
152
+ .cn {
153
+ border-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
198
154
  }
199
155
 
200
- .wn {
201
- border-inline-end-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
156
+ .co {
157
+ border-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
202
158
  }
203
159
 
204
- .wo {
205
- border-inline-end-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
160
+ .cj {
161
+ border-color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
206
162
  }
207
163
 
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;
164
+ .ca {
165
+ border-color: #0000;
214
166
  }
215
167
 
216
168
  .by {
@@ -221,27 +173,27 @@
221
173
  background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #6995fe);
222
174
  }
223
175
 
224
- .jb {
176
+ .kb {
225
177
  height: 100%;
226
178
  }
227
179
 
228
- ._fb {
180
+ ._cb {
229
181
  aspect-ratio: 1;
230
182
  }
231
183
 
232
- ._zf {
184
+ ._wf {
233
185
  border-start-start-radius: 9999px;
234
186
  }
235
187
 
236
- ._Af {
188
+ ._xf {
237
189
  border-start-end-radius: 9999px;
238
190
  }
239
191
 
240
- ._Bf {
192
+ ._yf {
241
193
  border-end-start-radius: 9999px;
242
194
  }
243
195
 
244
- ._Cf {
196
+ ._zf {
245
197
  border-end-end-radius: 9999px;
246
198
  }
247
199
 
@@ -261,84 +213,84 @@
261
213
  background-color: var(--lightningcss-light, #fff) var(--lightningcss-dark, #111);
262
214
  }
263
215
 
264
- ._Sa {
216
+ ._Pa {
265
217
  transition-property: color, background-color, var(--gp), border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter;
266
218
  }
267
219
 
268
- ._U-375x7f {
220
+ ._R-375x7f {
269
221
  transition-duration: .15s;
270
222
  }
271
223
 
272
- ._Va {
224
+ ._Sa {
273
225
  transition-timing-function: cubic-bezier(.45, 0, .4, 1);
274
226
  }
275
227
  }
276
228
 
277
229
  @layer _.b {
278
- ._g-enzrfpb:lang(ar) {
230
+ ._d-enzrfpb:lang(ar) {
279
231
  font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
280
232
  }
281
233
 
282
- ._j-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
234
+ ._g-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
283
235
  line-height: 1.5;
284
236
  }
285
237
  }
286
238
 
287
239
  @layer _.c {
288
- ._g-enzwzjc:lang(he) {
240
+ ._d-enzwzjc:lang(he) {
289
241
  font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
290
242
  }
291
243
  }
292
244
 
293
245
  @layer _.d {
294
- ._g-enzykdd:lang(ja) {
246
+ ._d-enzykdd:lang(ja) {
295
247
  font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
296
248
  }
297
249
  }
298
250
 
299
251
  @layer _.e {
300
- ._g-enzzrge:lang(ko) {
252
+ ._d-enzzrge:lang(ko) {
301
253
  font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
302
254
  }
303
255
  }
304
256
 
305
257
  @layer _.f {
306
- ._g-eo0c6sf:lang(zh) {
258
+ ._d-eo0c6sf:lang(zh) {
307
259
  font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
308
260
  }
309
261
  }
310
262
 
311
263
  @layer _.g {
312
- ._g-1uotwbwg:lang(zh-hant) {
264
+ ._d-1uotwbwg:lang(zh-hant) {
313
265
  font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
314
266
  }
315
267
  }
316
268
 
317
269
  @layer _.h {
318
- ._g-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
270
+ ._d-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
319
271
  font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
320
272
  }
321
273
  }
322
274
 
323
275
  @layer _.b.b {
324
276
  @media not ((hover: hover) and (pointer: fine)) {
325
- ._hbf {
277
+ ._ebf {
326
278
  font-size: 1.0625rem;
327
279
  }
328
280
 
329
- ._hbb {
281
+ ._ebb {
330
282
  font-size: .8125rem;
331
283
  }
332
284
 
333
- ._hbd {
285
+ ._ebd {
334
286
  font-size: .9375rem;
335
287
  }
336
288
 
337
- ._hbh {
289
+ ._ebh {
338
290
  font-size: 1.1875rem;
339
291
  }
340
292
 
341
- ._hbj {
293
+ ._ebj {
342
294
  font-size: 1.375rem;
343
295
  }
344
296
  }
@@ -350,40 +302,16 @@
350
302
  color: graytext;
351
303
  }
352
304
 
353
- .ca_____M {
305
+ .da_____M {
354
306
  outline-color: highlight;
355
307
  }
356
308
 
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;
309
+ .ca_____I {
310
+ border-color: buttonborder;
383
311
  }
384
312
 
385
- .wa_____O {
386
- border-inline-end-color: graytext;
313
+ .ca_____O {
314
+ border-color: graytext;
387
315
  }
388
316
 
389
317
  .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;;;;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<Partial<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;;;;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<Partial<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"}