@react-spectrum/s2 3.0.0-nightly-e228ed814-250129 → 3.0.0-nightly-016590a4a-250131

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 (283) 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 +92 -67
  23. package/dist/Badge.cjs.map +1 -1
  24. package/dist/Badge.css +168 -92
  25. package/dist/Badge.css.map +1 -1
  26. package/dist/Badge.mjs +92 -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/Content.cjs.map +1 -1
  99. package/dist/Content.mjs.map +1 -1
  100. package/dist/ContextualHelp.cjs +5 -5
  101. package/dist/ContextualHelp.css +38 -38
  102. package/dist/ContextualHelp.mjs +5 -5
  103. package/dist/CustomDialog.cjs +31 -31
  104. package/dist/CustomDialog.css +25 -25
  105. package/dist/CustomDialog.mjs +31 -31
  106. package/dist/Dialog.cjs +17 -17
  107. package/dist/Dialog.css +64 -64
  108. package/dist/Dialog.mjs +17 -17
  109. package/dist/Disclosure.cjs +111 -108
  110. package/dist/Disclosure.cjs.map +1 -1
  111. package/dist/Disclosure.css +124 -112
  112. package/dist/Disclosure.css.map +1 -1
  113. package/dist/Disclosure.mjs +111 -108
  114. package/dist/Disclosure.mjs.map +1 -1
  115. package/dist/Divider.cjs +26 -26
  116. package/dist/Divider.css +16 -16
  117. package/dist/Divider.mjs +26 -26
  118. package/dist/DropZone.cjs +56 -47
  119. package/dist/DropZone.cjs.map +1 -1
  120. package/dist/DropZone.css +80 -56
  121. package/dist/DropZone.css.map +1 -1
  122. package/dist/DropZone.mjs +56 -47
  123. package/dist/DropZone.mjs.map +1 -1
  124. package/dist/Field.cjs +204 -150
  125. package/dist/Field.cjs.map +1 -1
  126. package/dist/Field.css +246 -150
  127. package/dist/Field.css.map +1 -1
  128. package/dist/Field.mjs +204 -150
  129. package/dist/Field.mjs.map +1 -1
  130. package/dist/Form.cjs +10 -10
  131. package/dist/Form.css +9 -9
  132. package/dist/Form.mjs +10 -10
  133. package/dist/FullscreenDialog.cjs +5 -5
  134. package/dist/FullscreenDialog.css +72 -72
  135. package/dist/FullscreenDialog.mjs +5 -5
  136. package/dist/IllustratedMessage.cjs +134 -134
  137. package/dist/IllustratedMessage.css +69 -69
  138. package/dist/IllustratedMessage.mjs +134 -134
  139. package/dist/Image.cjs +12 -12
  140. package/dist/Image.css +13 -13
  141. package/dist/Image.mjs +12 -12
  142. package/dist/InlineAlert.cjs +104 -77
  143. package/dist/InlineAlert.cjs.map +1 -1
  144. package/dist/InlineAlert.css +149 -77
  145. package/dist/InlineAlert.css.map +1 -1
  146. package/dist/InlineAlert.mjs +104 -77
  147. package/dist/InlineAlert.mjs.map +1 -1
  148. package/dist/Link.cjs +31 -31
  149. package/dist/Link.css +30 -30
  150. package/dist/Link.mjs +31 -31
  151. package/dist/Menu.cjs +269 -264
  152. package/dist/Menu.cjs.map +1 -1
  153. package/dist/Menu.css +152 -152
  154. package/dist/Menu.css.map +1 -1
  155. package/dist/Menu.mjs +270 -265
  156. package/dist/Menu.mjs.map +1 -1
  157. package/dist/Meter.cjs +85 -85
  158. package/dist/Meter.css +81 -81
  159. package/dist/Meter.mjs +85 -85
  160. package/dist/Modal.cjs +48 -48
  161. package/dist/Modal.css +46 -46
  162. package/dist/Modal.mjs +48 -48
  163. package/dist/NumberField.cjs +115 -115
  164. package/dist/NumberField.css +114 -114
  165. package/dist/NumberField.mjs +115 -115
  166. package/dist/Picker.cjs +193 -175
  167. package/dist/Picker.cjs.map +1 -1
  168. package/dist/Picker.css +223 -163
  169. package/dist/Picker.css.map +1 -1
  170. package/dist/Picker.mjs +193 -175
  171. package/dist/Picker.mjs.map +1 -1
  172. package/dist/Popover.cjs +84 -78
  173. package/dist/Popover.cjs.map +1 -1
  174. package/dist/Popover.css +89 -65
  175. package/dist/Popover.css.map +1 -1
  176. package/dist/Popover.mjs +84 -78
  177. package/dist/Popover.mjs.map +1 -1
  178. package/dist/ProgressBar.cjs +98 -98
  179. package/dist/ProgressBar.css +92 -92
  180. package/dist/ProgressBar.mjs +98 -98
  181. package/dist/ProgressCircle.cjs +17 -17
  182. package/dist/ProgressCircle.css +15 -15
  183. package/dist/ProgressCircle.mjs +17 -17
  184. package/dist/Provider.cjs +4 -4
  185. package/dist/Provider.css +5 -5
  186. package/dist/Provider.mjs +4 -4
  187. package/dist/Radio.cjs +152 -80
  188. package/dist/Radio.cjs.map +1 -1
  189. package/dist/Radio.css +240 -96
  190. package/dist/Radio.css.map +1 -1
  191. package/dist/Radio.mjs +152 -80
  192. package/dist/Radio.mjs.map +1 -1
  193. package/dist/RadioGroup.cjs +47 -47
  194. package/dist/RadioGroup.css +41 -41
  195. package/dist/RadioGroup.mjs +47 -47
  196. package/dist/SearchField.cjs +42 -42
  197. package/dist/SearchField.css +47 -47
  198. package/dist/SearchField.mjs +42 -42
  199. package/dist/SegmentedControl.cjs +101 -89
  200. package/dist/SegmentedControl.cjs.map +1 -1
  201. package/dist/SegmentedControl.css +140 -92
  202. package/dist/SegmentedControl.css.map +1 -1
  203. package/dist/SegmentedControl.mjs +101 -89
  204. package/dist/SegmentedControl.mjs.map +1 -1
  205. package/dist/Slider.cjs +229 -196
  206. package/dist/Slider.cjs.map +1 -1
  207. package/dist/Slider.css +221 -149
  208. package/dist/Slider.css.map +1 -1
  209. package/dist/Slider.mjs +229 -196
  210. package/dist/Slider.mjs.map +1 -1
  211. package/dist/StatusLight.cjs +56 -56
  212. package/dist/StatusLight.css +59 -59
  213. package/dist/StatusLight.mjs +56 -56
  214. package/dist/Switch.cjs +107 -74
  215. package/dist/Switch.cjs.map +1 -1
  216. package/dist/Switch.css +141 -69
  217. package/dist/Switch.css.map +1 -1
  218. package/dist/Switch.mjs +107 -74
  219. package/dist/Switch.mjs.map +1 -1
  220. package/dist/TableView.cjs +280 -253
  221. package/dist/TableView.cjs.map +1 -1
  222. package/dist/TableView.css +199 -163
  223. package/dist/TableView.css.map +1 -1
  224. package/dist/TableView.mjs +280 -253
  225. package/dist/TableView.mjs.map +1 -1
  226. package/dist/Tabs.cjs +493 -197
  227. package/dist/Tabs.cjs.map +1 -1
  228. package/dist/Tabs.css +250 -134
  229. package/dist/Tabs.css.map +1 -1
  230. package/dist/Tabs.mjs +494 -198
  231. package/dist/Tabs.mjs.map +1 -1
  232. package/dist/TabsPicker.cjs +415 -0
  233. package/dist/TabsPicker.cjs.map +1 -0
  234. package/dist/TabsPicker.css +482 -0
  235. package/dist/TabsPicker.css.map +1 -0
  236. package/dist/TabsPicker.mjs +409 -0
  237. package/dist/TabsPicker.mjs.map +1 -0
  238. package/dist/TagGroup.cjs +148 -148
  239. package/dist/TagGroup.css +134 -134
  240. package/dist/TagGroup.mjs +148 -148
  241. package/dist/TextField.cjs +59 -59
  242. package/dist/TextField.css +62 -62
  243. package/dist/TextField.mjs +59 -59
  244. package/dist/ToggleButton.cjs +3 -3
  245. package/dist/ToggleButton.css +12 -12
  246. package/dist/ToggleButton.mjs +3 -3
  247. package/dist/Tooltip.cjs +60 -57
  248. package/dist/Tooltip.cjs.map +1 -1
  249. package/dist/Tooltip.css +83 -71
  250. package/dist/Tooltip.css.map +1 -1
  251. package/dist/Tooltip.mjs +60 -57
  252. package/dist/Tooltip.mjs.map +1 -1
  253. package/dist/TreeView.cjs +465 -0
  254. package/dist/TreeView.cjs.map +1 -0
  255. package/dist/TreeView.css +632 -0
  256. package/dist/TreeView.css.map +1 -0
  257. package/dist/TreeView.mjs +455 -0
  258. package/dist/TreeView.mjs.map +1 -0
  259. package/dist/main.cjs +4 -0
  260. package/dist/main.cjs.map +1 -1
  261. package/dist/module.mjs +3 -1
  262. package/dist/module.mjs.map +1 -1
  263. package/dist/types.d.ts +33 -8
  264. package/dist/types.d.ts.map +1 -1
  265. package/icons/Skeleton.cjs +2 -2
  266. package/icons/Skeleton.css +5 -5
  267. package/icons/Skeleton.mjs +2 -2
  268. package/package.json +21 -19
  269. package/src/Badge.tsx +4 -1
  270. package/src/Content.tsx +2 -1
  271. package/src/Menu.tsx +2 -0
  272. package/src/Tabs.tsx +450 -144
  273. package/src/TabsPicker.tsx +350 -0
  274. package/src/TreeView.tsx +497 -0
  275. package/src/index.ts +2 -0
  276. package/style/__tests__/style-macro.test.js +18 -18
  277. package/style/dist/spectrum-theme.cjs +20 -10
  278. package/style/dist/spectrum-theme.cjs.map +1 -1
  279. package/style/dist/spectrum-theme.mjs +20 -10
  280. package/style/dist/spectrum-theme.mjs.map +1 -1
  281. package/style/dist/types.d.ts +4 -0
  282. package/style/dist/types.d.ts.map +1 -1
  283. package/style/spectrum-theme.ts +18 -11
@@ -1,99 +1,111 @@
1
1
  @layer _.a {
2
- .ub {
2
+ .tb {
3
3
  border-top-width: 1px;
4
4
  }
5
5
 
6
- .ua {
6
+ .ta {
7
7
  border-top-width: 0;
8
8
  }
9
9
 
10
- .vb {
10
+ .ub {
11
11
  border-bottom-width: 1px;
12
12
  }
13
13
 
14
- .va {
14
+ .ua {
15
15
  border-bottom-width: 0;
16
16
  }
17
17
 
18
- .wa {
18
+ .za {
19
19
  border-style: solid;
20
20
  }
21
21
 
22
- .ch {
23
- border-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
22
+ .xh {
23
+ border-top-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
24
+ }
25
+
26
+ .yh {
27
+ border-bottom-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
28
+ }
29
+
30
+ .vh {
31
+ border-inline-start-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
24
32
  }
25
33
 
26
- .q___C {
34
+ .wh {
35
+ border-inline-end-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
36
+ }
37
+
38
+ .p___C {
27
39
  min-width: calc(12.5rem * var(--s2-scale));
28
40
  }
29
41
 
30
- .Aa {
42
+ .Da {
31
43
  margin-top: 0;
32
44
  }
33
45
 
34
- .Ba {
46
+ .Ea {
35
47
  margin-bottom: 0;
36
48
  }
37
49
 
38
- .ya {
50
+ .Ba {
39
51
  margin-inline-start: 0;
40
52
  }
41
53
 
42
- .za {
54
+ .Ca {
43
55
  margin-inline-end: 0;
44
56
  }
45
57
 
46
- ._9-3t1y {
58
+ .__c-3t1y {
47
59
  flex-shrink: 1;
48
60
  }
49
61
 
50
- .qo {
62
+ .po {
51
63
  min-width: 0;
52
64
  }
53
65
 
54
- ._Ma {
66
+ ._Pa {
55
67
  outline-style: none;
56
68
  }
57
69
 
58
- ._Mb {
70
+ ._Pb {
59
71
  outline-style: solid;
60
72
  }
61
73
 
62
- .dx {
74
+ .cx {
63
75
  outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
64
76
  }
65
77
 
66
- ._Oc {
78
+ ._Rc {
67
79
  outline-width: 2px;
68
80
  }
69
81
 
70
- ._N-3hmpw {
82
+ ._Q-3hmpw {
71
83
  outline-offset: -2px;
72
84
  }
73
85
 
74
- ._ei {
86
+ ._hi {
75
87
  font-size: 1.125rem;
76
88
  }
77
89
 
78
- ._ek {
90
+ ._hk {
79
91
  font-size: 1.25rem;
80
92
  }
81
93
 
82
- ._ej {
94
+ ._hj {
83
95
  font-size: 1.375rem;
84
96
  }
85
97
 
86
- ._en {
98
+ ._hn {
87
99
  font-size: 1.75rem;
88
100
  }
89
101
 
90
- ._fd {
102
+ ._id {
91
103
  font-variation-settings: "wght" 700;
92
104
  font-synthesis-weight: none;
93
105
  font-weight: 700;
94
106
  }
95
107
 
96
- ._ga {
108
+ ._ja {
97
109
  line-height: 1.3;
98
110
  }
99
111
 
@@ -105,43 +117,43 @@
105
117
  color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
106
118
  }
107
119
 
108
- .__a-3t1y {
120
+ .__d-3t1y {
109
121
  flex-grow: 1;
110
122
  }
111
123
 
112
- ._2d {
124
+ ._5d {
113
125
  align-items: baseline;
114
126
  }
115
127
 
116
- .C-10cd9hn {
117
- padding-inline-start: calc(var(--o) * 3 / 8 - 1px);
128
+ .F-10cd9hn {
129
+ padding-inline-start: calc(var(--n) * 3 / 8 - 1px);
118
130
  }
119
131
 
120
- .D-10cd9hn {
121
- padding-inline-end: calc(var(--o) * 3 / 8 - 1px);
132
+ .G-10cd9hn {
133
+ padding-inline-end: calc(var(--n) * 3 / 8 - 1px);
122
134
  }
123
135
 
124
- .E-1dbqcch {
125
- padding-top: calc((var(--o) - var(--u, 0px) - var(--v, 0px) - 1lh) / 2);
136
+ .H-1dbqcch {
137
+ padding-top: calc((var(--n) - var(--t, 0px) - var(--u, 0px) - 1lh) / 2);
126
138
  }
127
139
 
128
- .F-1dbqcch {
129
- padding-bottom: calc((var(--o) - var(--u, 0px) - var(--v, 0px) - 1lh) / 2);
140
+ .I-1dbqcch {
141
+ padding-bottom: calc((var(--n) - var(--t, 0px) - var(--u, 0px) - 1lh) / 2);
130
142
  }
131
143
 
132
- .i-10cd9hn {
133
- row-gap: calc(var(--o) * 3 / 8 - 1px);
144
+ .h-10cd9hn {
145
+ row-gap: calc(var(--n) * 3 / 8 - 1px);
134
146
  }
135
147
 
136
- .j-10cd9hn {
137
- column-gap: calc(var(--o) * 3 / 8 - 1px);
148
+ .i-10cd9hn {
149
+ column-gap: calc(var(--n) * 3 / 8 - 1px);
138
150
  }
139
151
 
140
- .o-375tou {
141
- min-height: var(--o);
152
+ .n-375tot {
153
+ min-height: var(--n);
142
154
  }
143
155
 
144
- .lb {
156
+ .kb {
145
157
  width: 100%;
146
158
  }
147
159
 
@@ -157,153 +169,153 @@
157
169
  background-color: var(--lightningcss-light, #00000026) var(--lightningcss-dark, #ffffff2b);
158
170
  }
159
171
 
160
- .u-375tp0 {
161
- border-top-width: var(--u);
172
+ .t-375toz {
173
+ border-top-width: var(--t);
162
174
  }
163
175
 
164
- .v-375tp1 {
165
- border-bottom-width: var(--v);
176
+ .u-375tp0 {
177
+ border-bottom-width: var(--u);
166
178
  }
167
179
 
168
- .sa {
180
+ .ra {
169
181
  border-inline-start-width: 0;
170
182
  }
171
183
 
172
- .ta {
184
+ .sa {
173
185
  border-inline-end-width: 0;
174
186
  }
175
187
 
176
- ._wa {
188
+ ._za {
177
189
  border-start-start-radius: 0;
178
190
  }
179
191
 
180
- ._wh {
192
+ ._zh {
181
193
  border-start-start-radius: .571429em;
182
194
  }
183
195
 
184
- ._xa {
196
+ ._Aa {
185
197
  border-start-end-radius: 0;
186
198
  }
187
199
 
188
- ._xh {
200
+ ._Ah {
189
201
  border-start-end-radius: .571429em;
190
202
  }
191
203
 
192
- ._ya {
204
+ ._Ba {
193
205
  border-end-start-radius: 0;
194
206
  }
195
207
 
196
- ._yh {
208
+ ._Bh {
197
209
  border-end-start-radius: .571429em;
198
210
  }
199
211
 
200
- ._za {
212
+ ._Ca {
201
213
  border-end-end-radius: 0;
202
214
  }
203
215
 
204
- ._zh {
216
+ ._Ch {
205
217
  border-end-end-radius: .571429em;
206
218
  }
207
219
 
208
- ._ka {
220
+ ._na {
209
221
  text-align: start;
210
222
  }
211
223
 
212
- .__S-yksgrp {
224
+ .__V-yksgrp {
213
225
  -webkit-tap-highlight-color: #0000;
214
226
  }
215
227
 
216
- .-_375tou_o-M {
217
- --o: calc(1.5rem * var(--s2-scale));
228
+ .-_375tot_n-M {
229
+ --n: calc(1.5rem * var(--s2-scale));
218
230
  }
219
231
 
220
- .-_375tou_o-U {
221
- --o: calc(2rem * var(--s2-scale));
232
+ .-_375tot_n-U {
233
+ --n: calc(2rem * var(--s2-scale));
222
234
  }
223
235
 
224
- .-_375tou_o-2 {
225
- --o: calc(2.5rem * var(--s2-scale));
236
+ .-_375tot_n-2 {
237
+ --n: calc(2.5rem * var(--s2-scale));
226
238
  }
227
239
 
228
- .-_375tou_o-_a {
229
- --o: calc(3rem * var(--s2-scale));
240
+ .-_375tot_n-_a {
241
+ --n: calc(3rem * var(--s2-scale));
230
242
  }
231
243
 
232
- .-_375tou_o-_i {
233
- --o: calc(3.5rem * var(--s2-scale));
244
+ .-_375tot_n-_i {
245
+ --n: calc(3.5rem * var(--s2-scale));
234
246
  }
235
247
 
236
- .-_375tou_o-_q {
237
- --o: calc(4rem * var(--s2-scale));
248
+ .-_375tot_n-_q {
249
+ --n: calc(4rem * var(--s2-scale));
238
250
  }
239
251
 
240
- .-_375tp0_u-a {
241
- --u: 0px;
252
+ .-_375toz_t-a {
253
+ --t: 0px;
242
254
  }
243
255
 
244
- .-_375tp1_v-a {
245
- --v: 0px;
256
+ .-_375tp0_u-a {
257
+ --u: 0px;
246
258
  }
247
259
 
248
- .R-375xa6 {
260
+ .U-375xa6 {
249
261
  rotate: 180deg;
250
262
  }
251
263
 
252
- .R-3hn0u {
264
+ .U-3hn0u {
253
265
  rotate: 90deg;
254
266
  }
255
267
 
256
- ._Pa {
268
+ ._Sa {
257
269
  transition-property: color, background-color, var(--gp), border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter;
258
270
  }
259
271
 
260
- ._R-375x7f {
272
+ ._U-375x7f {
261
273
  transition-duration: .15s;
262
274
  }
263
275
 
264
- ._Sa {
276
+ ._Va {
265
277
  transition-timing-function: cubic-bezier(.45, 0, .4, 1);
266
278
  }
267
279
 
268
- .-rwx0fg_e-b {
280
+ .-rwx0fg_d-b {
269
281
  --iconPrimary: currentColor;
270
282
  }
271
283
 
272
- ._9-3t1x {
284
+ .__c-3t1x {
273
285
  flex-shrink: 0;
274
286
  }
275
287
 
276
- ._0d {
288
+ ._3d {
277
289
  display: flex;
278
290
  }
279
291
 
280
- ._2c {
292
+ ._5c {
281
293
  align-items: center;
282
294
  }
283
295
 
284
- .ic {
296
+ .hc {
285
297
  row-gap: .25rem;
286
298
  }
287
299
 
288
- .jc {
300
+ .ic {
289
301
  column-gap: .25rem;
290
302
  }
291
303
 
292
- ._da {
304
+ ._ga {
293
305
  font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
294
306
  }
295
307
 
296
- ._eg {
308
+ ._hg {
297
309
  font-size: 1rem;
298
310
  }
299
311
 
300
- ._fb {
312
+ ._ib {
301
313
  font-variation-settings: "wght" 400;
302
314
  font-synthesis-weight: none;
303
315
  font-weight: 400;
304
316
  }
305
317
 
306
- ._gb {
318
+ ._jb {
307
319
  line-height: 1.5;
308
320
  }
309
321
 
@@ -311,92 +323,92 @@
311
323
  color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
312
324
  }
313
325
 
314
- .Ed {
326
+ .Hd {
315
327
  padding-top: .5rem;
316
328
  }
317
329
 
318
- .Ff {
330
+ .If {
319
331
  padding-bottom: 1rem;
320
332
  }
321
333
 
322
- .Cd {
334
+ .Fd {
323
335
  padding-inline-start: .5rem;
324
336
  }
325
337
 
326
- .Ce {
338
+ .Fe {
327
339
  padding-inline-start: .75rem;
328
340
  }
329
341
 
330
- .Dd {
342
+ .Gd {
331
343
  padding-inline-end: .5rem;
332
344
  }
333
345
 
334
- .De {
346
+ .Ge {
335
347
  padding-inline-end: .75rem;
336
348
  }
337
349
  }
338
350
 
339
351
  @layer _.b {
340
- .v-uamghwb:last-child {
352
+ .u-uamghwb:last-child {
341
353
  border-bottom-width: 1px;
342
354
  }
343
355
 
344
- .v-uamghwa:last-child {
356
+ .u-uamghwa:last-child {
345
357
  border-bottom-width: 0;
346
358
  }
347
359
 
348
- ._g-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
360
+ ._j-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
349
361
  line-height: 1.5;
350
362
  }
351
363
 
352
- ._d-enzrfpb:lang(ar) {
364
+ ._g-enzrfpb:lang(ar) {
353
365
  font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
354
366
  }
355
367
 
356
- ._g-1x99dloc:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
368
+ ._j-1x99dloc:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
357
369
  line-height: 1.7;
358
370
  }
359
371
  }
360
372
 
361
373
  @layer _.c {
362
- ._d-enzwzjc:lang(he) {
374
+ ._g-enzwzjc:lang(he) {
363
375
  font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
364
376
  }
365
377
  }
366
378
 
367
379
  @layer _.d {
368
- ._d-enzykdd:lang(ja) {
380
+ ._g-enzykdd:lang(ja) {
369
381
  font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
370
382
  }
371
383
  }
372
384
 
373
385
  @layer _.e {
374
- ._d-enzzrge:lang(ko) {
386
+ ._g-enzzrge:lang(ko) {
375
387
  font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
376
388
  }
377
389
  }
378
390
 
379
391
  @layer _.f {
380
- ._d-eo0c6sf:lang(zh) {
392
+ ._g-eo0c6sf:lang(zh) {
381
393
  font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
382
394
  }
383
395
  }
384
396
 
385
397
  @layer _.g {
386
- ._d-1uotwbwg:lang(zh-hant) {
398
+ ._g-1uotwbwg:lang(zh-hant) {
387
399
  font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
388
400
  }
389
401
  }
390
402
 
391
403
  @layer _.h {
392
- ._d-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
404
+ ._g-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
393
405
  font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
394
406
  }
395
407
  }
396
408
 
397
409
  @layer _.b.a {
398
410
  @media (forced-colors: active) {
399
- .da_____M {
411
+ .ca_____M {
400
412
  outline-color: highlight;
401
413
  }
402
414
  }
@@ -404,23 +416,23 @@
404
416
 
405
417
  @layer _.b.b {
406
418
  @media not ((hover: hover) and (pointer: fine)) {
407
- ._ebj {
419
+ ._hbj {
408
420
  font-size: 1.375rem;
409
421
  }
410
422
 
411
- ._ebl {
423
+ ._hbl {
412
424
  font-size: 1.5rem;
413
425
  }
414
426
 
415
- ._ebm {
427
+ ._hbm {
416
428
  font-size: 1.6875rem;
417
429
  }
418
430
 
419
- ._ebo {
431
+ ._hbo {
420
432
  font-size: 2.125rem;
421
433
  }
422
434
 
423
- ._ebh {
435
+ ._hbh {
424
436
  font-size: 1.1875rem;
425
437
  }
426
438
  }
@@ -1 +1 @@
1
- {"mappings":"AC2CmB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAsEE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQA;;;;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;;;;EA4EC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6CwB;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6D1B;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AApQD;EAAA;;;;EAAA;;;;EA8EE;;;;EAsLD;;;;EAAA;;;;;AAtLC;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAsLD","sources":["af82a6f8008c749b","packages/@react-spectrum/s2/src/Disclosure.tsx"],"sourcesContent":["@import \"02b9b02b69a441b2\";\n@import \"80d1cf6aba9342e9\";\n@import \"d47c144c912b2c65\";\n@import \"54c3947845455457\";\n@import \"47e48706d70658de\";\n@import \"879f5cdc449bf13e\";\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 {ActionButtonContext} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue, forwardRefType} from '@react-types/shared';\nimport {Button, ContextValue, DisclosureStateContext, Heading, Provider, Disclosure as RACDisclosure, DisclosurePanel as RACDisclosurePanel, DisclosurePanelProps as RACDisclosurePanelProps, DisclosureProps as RACDisclosureProps, useLocale, useSlottedContext} from 'react-aria-components';\nimport {CenterBaseline} from './CenterBaseline';\nimport {centerPadding, getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport Chevron from '../ui-icons/Chevron';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, lightDark, style} from '../style' with { type: 'macro' };\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DisclosureProps extends Omit<RACDisclosureProps, 'className' | 'style' | 'children'>, StyleProps {\n /**\n * The size of the disclosure.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of space between the disclosures.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /** Whether the disclosure should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** The contents of the disclosure, consisting of a DisclosureTitle and DisclosurePanel. */\n children: ReactNode\n}\n\nexport const DisclosureContext = createContext<ContextValue<Omit<DisclosureProps, 'children'>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst disclosure = style({\n color: 'heading',\n borderTopWidth: {\n default: 1,\n isQuiet: 0\n },\n borderBottomWidth: {\n default: 1,\n isQuiet: 0,\n isInGroup: {\n default: 0,\n ':last-child': {\n default: 1,\n isQuiet: 0\n }\n }\n },\n borderStartWidth: 0,\n borderEndWidth: 0,\n borderStyle: 'solid',\n borderColor: 'gray-200',\n minWidth: 200\n}, getAllowedOverrides());\n\n/**\n * A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.\n */\nexport const Disclosure = forwardRef(function Disclosure(props: DisclosureProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, DisclosureContext);\n let {\n size = 'M',\n density = 'regular',\n isQuiet,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let isInGroup = useContext(DisclosureContext) !== null;\n\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density}]\n ]}>\n <RACDisclosure\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + disclosure({isQuiet, isInGroup}, props.styles)}>\n {props.children}\n </RACDisclosure>\n </Provider>\n );\n});\n\nexport interface DisclosureTitleProps extends UnsafeStyles, DOMProps {\n /** The heading level of the disclosure header.\n * \n * @default 3\n */\n level?: number,\n /** The contents of the disclosure header. */\n children: React.ReactNode\n}\n\ninterface DisclosureHeaderProps extends UnsafeStyles, DOMProps {\n children: React.ReactNode\n}\n\nconst headingStyle = style({\n margin: 0,\n flexGrow: 1,\n display: 'flex',\n flexShrink: 1,\n minWidth: 0\n});\n\nconst buttonStyles = style({\n ...focusRing(),\n outlineOffset: -2,\n font: 'heading',\n color: {\n default: 'neutral',\n isDisabled: 'disabled'\n },\n fontWeight: 'bold',\n fontSize: {\n size: {\n S: 'heading-xs',\n M: 'heading-sm',\n L: 'heading',\n XL: 'heading-lg'\n }\n },\n lineHeight: 'ui',\n display: 'flex',\n flexGrow: 1,\n alignItems: 'baseline',\n paddingX: '[calc(self(minHeight) * 3/8 - 1px)]',\n paddingY: centerPadding(),\n gap: '[calc(self(minHeight) * 3/8 - 1px)]',\n minHeight: {\n // compact is equivalent to 'control', but other densities have more padding.\n size: {\n S: {\n density: {\n compact: 24,\n regular: 32,\n spacious: 40\n }\n },\n M: {\n density: {\n compact: 32,\n regular: 40,\n spacious: 48\n }\n },\n L: {\n density: {\n compact: 40,\n regular: 48,\n spacious: 56\n }\n },\n XL: {\n density: {\n compact: 48,\n regular: 56,\n spacious: 64\n }\n }\n }\n },\n width: 'full',\n backgroundColor: {\n default: 'transparent',\n isFocusVisible: lightDark('transparent-black-100', 'transparent-white-100'),\n isHovered: lightDark('transparent-black-100', 'transparent-white-100'),\n isPressed: lightDark('transparent-black-300', 'transparent-white-300')\n },\n transition: 'default',\n borderWidth: 0,\n borderRadius: {\n // Only rounded for keyboard focus and quiet.\n default: 'none',\n isFocusVisible: 'control',\n isQuiet: 'control'\n },\n textAlign: 'start',\n disableTapHighlight: true\n});\n\nconst chevronStyles = style({\n rotate: {\n isRTL: 180,\n isExpanded: 90\n },\n transition: 'default',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n flexShrink: 0\n});\n\nconst InternalDisclosureHeader = createContext<{} | null>(null);\n\nfunction DisclosureHeaderWithForwardRef(props: DisclosureHeaderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_className,\n UNSAFE_style,\n children\n } = props;\n let domRef = useDOMRef(ref);\n let {size, isQuiet, density} = useSlottedContext(DisclosureContext)!;\n\n let mapSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n };\n\n // maps to one size smaller in the compact density to ensure there is space between the top and bottom of the action button and container\n let newSize : 'XS' | 'S' | 'M' | 'L' | 'XL' | undefined = size;\n if (density === 'compact') {\n newSize = mapSize[size ?? 'M'] as 'XS' | 'S' | 'M' | 'L';\n }\n\n return (\n <Provider\n values={[\n [ActionButtonContext, {size: newSize, isQuiet}],\n [InternalDisclosureHeader, {}]\n ]}>\n <div\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + style({display: 'flex', alignItems: 'center', gap: 4})}\n ref={domRef}>\n {children}\n </div>\n </Provider>\n );\n}\n\n/**\n * A wrapper element for the disclosure title that can contain other elements not part of the trigger.\n */\nexport const DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosureHeaderWithForwardRef);\n\n/**\n * A disclosure title consisting of a heading and a trigger button to expand/collapse the panel.\n */\nexport const DisclosureTitle = forwardRef(function DisclosureTitle(props: DisclosureTitleProps, ref: DOMRef<HTMLDivElement>) {\n let {\n level = 3,\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n const domProps = filterDOMProps(otherProps);\n let {direction} = useLocale();\n let {isExpanded} = useContext(DisclosureStateContext)!;\n let {size, density, isQuiet} = useSlottedContext(DisclosureContext)!;\n let isRTL = direction === 'rtl';\n\n let buttonTrigger = (\n <Heading\n {...domProps}\n level={level}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + headingStyle}>\n <Button className={(renderProps) => buttonStyles({...renderProps, size, density, isQuiet})} slot=\"trigger\">\n <CenterBaseline>\n <Chevron size={size} className={chevronStyles({isExpanded, isRTL})} aria-hidden=\"true\" />\n </CenterBaseline>\n {props.children}\n </Button>\n </Heading>\n );\n let ctx = useContext(InternalDisclosureHeader);\n if (ctx) {\n return buttonTrigger;\n }\n\n return (\n <DisclosureHeader>\n {buttonTrigger}\n </DisclosureHeader>\n );\n});\n\nexport interface DisclosurePanelProps extends Omit<RACDisclosurePanelProps, 'className' | 'style' | 'children'>, UnsafeStyles, DOMProps, AriaLabelingProps {\n children: React.ReactNode\n}\n\nconst panelStyles = style({\n font: 'body',\n paddingTop: {\n isExpanded: 8\n },\n paddingBottom: {\n isExpanded: 16\n },\n paddingX: {\n isExpanded: {\n size: {\n S: 8,\n M: 9,\n L: 12,\n XL: 15\n }\n }\n }\n});\n\n/**\n * A disclosure panel is a collapsible section of content that is hidden until the disclosure is expanded.\n */\nexport const DisclosurePanel = forwardRef(function DisclosurePanel(props: DisclosurePanelProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n let {size} = useSlottedContext(DisclosureContext)!;\n let {isExpanded} = useContext(DisclosureStateContext)!;\n let panelRef = useDOMRef(ref);\n return (\n <RACDisclosurePanel\n {...domProps}\n ref={panelRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + panelStyles({size, isExpanded})}>\n {props.children}\n </RACDisclosurePanel>\n );\n});\n\n"],"names":[],"version":3,"file":"Disclosure.css.map"}
1
+ {"mappings":"AC2CmB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAsEE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQA;;;;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;;;;EA4EC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6CwB;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6D1B;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AApQD;EAAA;;;;EAAA;;;;EA8EE;;;;EAsLD;;;;EAAA;;;;;AAtLC;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAsLD","sources":["af82a6f8008c749b","packages/@react-spectrum/s2/src/Disclosure.tsx"],"sourcesContent":["@import \"02b9b02b69a441b2\";\n@import \"80d1cf6aba9342e9\";\n@import \"d47c144c912b2c65\";\n@import \"54c3947845455457\";\n@import \"47e48706d70658de\";\n@import \"879f5cdc449bf13e\";\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 {ActionButtonContext} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue, forwardRefType} from '@react-types/shared';\nimport {Button, ContextValue, DisclosureStateContext, Heading, Provider, Disclosure as RACDisclosure, DisclosurePanel as RACDisclosurePanel, DisclosurePanelProps as RACDisclosurePanelProps, DisclosureProps as RACDisclosureProps, useLocale, useSlottedContext} from 'react-aria-components';\nimport {CenterBaseline} from './CenterBaseline';\nimport {centerPadding, getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport Chevron from '../ui-icons/Chevron';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, lightDark, style} from '../style' with { type: 'macro' };\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DisclosureProps extends Omit<RACDisclosureProps, 'className' | 'style' | 'children'>, StyleProps {\n /**\n * The size of the disclosure.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of space between the disclosures.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /** Whether the disclosure should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** The contents of the disclosure, consisting of a DisclosureTitle and DisclosurePanel. */\n children: ReactNode\n}\n\nexport const DisclosureContext = createContext<ContextValue<Omit<DisclosureProps, 'children'>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst disclosure = style({\n color: 'heading',\n borderTopWidth: {\n default: 1,\n isQuiet: 0\n },\n borderBottomWidth: {\n default: 1,\n isQuiet: 0,\n isInGroup: {\n default: 0,\n ':last-child': {\n default: 1,\n isQuiet: 0\n }\n }\n },\n borderStartWidth: 0,\n borderEndWidth: 0,\n borderStyle: 'solid',\n borderColor: 'gray-200',\n minWidth: 200\n}, getAllowedOverrides());\n\n/**\n * A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.\n */\nexport const Disclosure = forwardRef(function Disclosure(props: DisclosureProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, DisclosureContext);\n let {\n size = 'M',\n density = 'regular',\n isQuiet,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let isInGroup = useContext(DisclosureContext) !== null;\n\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density}]\n ]}>\n <RACDisclosure\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + disclosure({isQuiet, isInGroup}, props.styles)}>\n {props.children}\n </RACDisclosure>\n </Provider>\n );\n});\n\nexport interface DisclosureTitleProps extends UnsafeStyles, DOMProps {\n /** The heading level of the disclosure header.\n * \n * @default 3\n */\n level?: number,\n /** The contents of the disclosure header. */\n children: React.ReactNode\n}\n\ninterface DisclosureHeaderProps extends UnsafeStyles, DOMProps {\n children: React.ReactNode\n}\n\nconst headingStyle = style({\n margin: 0,\n flexGrow: 1,\n display: 'flex',\n flexShrink: 1,\n minWidth: 0\n});\n\nconst buttonStyles = style({\n ...focusRing(),\n outlineOffset: -2,\n font: 'heading',\n color: {\n default: 'neutral',\n isDisabled: 'disabled'\n },\n fontWeight: 'bold',\n fontSize: {\n size: {\n S: 'heading-xs',\n M: 'heading-sm',\n L: 'heading',\n XL: 'heading-lg'\n }\n },\n lineHeight: 'ui',\n display: 'flex',\n flexGrow: 1,\n alignItems: 'baseline',\n paddingX: '[calc(self(minHeight) * 3/8 - 1px)]',\n paddingY: centerPadding(),\n gap: '[calc(self(minHeight) * 3/8 - 1px)]',\n minHeight: {\n // compact is equivalent to 'control', but other densities have more padding.\n size: {\n S: {\n density: {\n compact: 24,\n regular: 32,\n spacious: 40\n }\n },\n M: {\n density: {\n compact: 32,\n regular: 40,\n spacious: 48\n }\n },\n L: {\n density: {\n compact: 40,\n regular: 48,\n spacious: 56\n }\n },\n XL: {\n density: {\n compact: 48,\n regular: 56,\n spacious: 64\n }\n }\n }\n },\n width: 'full',\n backgroundColor: {\n default: 'transparent',\n isFocusVisible: lightDark('transparent-black-100', 'transparent-white-100'),\n isHovered: lightDark('transparent-black-100', 'transparent-white-100'),\n isPressed: lightDark('transparent-black-300', 'transparent-white-300')\n },\n transition: 'default',\n borderWidth: 0,\n borderRadius: {\n // Only rounded for keyboard focus and quiet.\n default: 'none',\n isFocusVisible: 'control',\n isQuiet: 'control'\n },\n textAlign: 'start',\n disableTapHighlight: true\n});\n\nconst chevronStyles = style({\n rotate: {\n isRTL: 180,\n isExpanded: 90\n },\n transition: 'default',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n flexShrink: 0\n});\n\nconst InternalDisclosureHeader = createContext<{} | null>(null);\n\nfunction DisclosureHeaderWithForwardRef(props: DisclosureHeaderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_className,\n UNSAFE_style,\n children\n } = props;\n let domRef = useDOMRef(ref);\n let {size, isQuiet, density} = useSlottedContext(DisclosureContext)!;\n\n let mapSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n };\n\n // maps to one size smaller in the compact density to ensure there is space between the top and bottom of the action button and container\n let newSize : 'XS' | 'S' | 'M' | 'L' | 'XL' | undefined = size;\n if (density === 'compact') {\n newSize = mapSize[size ?? 'M'] as 'XS' | 'S' | 'M' | 'L';\n }\n\n return (\n <Provider\n values={[\n [ActionButtonContext, {size: newSize, isQuiet}],\n [InternalDisclosureHeader, {}]\n ]}>\n <div\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + style({display: 'flex', alignItems: 'center', gap: 4})}\n ref={domRef}>\n {children}\n </div>\n </Provider>\n );\n}\n\n/**\n * A wrapper element for the disclosure title that can contain other elements not part of the trigger.\n */\nexport const DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosureHeaderWithForwardRef);\n\n/**\n * A disclosure title consisting of a heading and a trigger button to expand/collapse the panel.\n */\nexport const DisclosureTitle = forwardRef(function DisclosureTitle(props: DisclosureTitleProps, ref: DOMRef<HTMLDivElement>) {\n let {\n level = 3,\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n const domProps = filterDOMProps(otherProps);\n let {direction} = useLocale();\n let {isExpanded} = useContext(DisclosureStateContext)!;\n let {size, density, isQuiet} = useSlottedContext(DisclosureContext)!;\n let isRTL = direction === 'rtl';\n\n let buttonTrigger = (\n <Heading\n {...domProps}\n level={level}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + headingStyle}>\n <Button className={(renderProps) => buttonStyles({...renderProps, size, density, isQuiet})} slot=\"trigger\">\n <CenterBaseline>\n <Chevron size={size} className={chevronStyles({isExpanded, isRTL})} aria-hidden=\"true\" />\n </CenterBaseline>\n {props.children}\n </Button>\n </Heading>\n );\n let ctx = useContext(InternalDisclosureHeader);\n if (ctx) {\n return buttonTrigger;\n }\n\n return (\n <DisclosureHeader>\n {buttonTrigger}\n </DisclosureHeader>\n );\n});\n\nexport interface DisclosurePanelProps extends Omit<RACDisclosurePanelProps, 'className' | 'style' | 'children'>, UnsafeStyles, DOMProps, AriaLabelingProps {\n children: React.ReactNode\n}\n\nconst panelStyles = style({\n font: 'body',\n paddingTop: {\n isExpanded: 8\n },\n paddingBottom: {\n isExpanded: 16\n },\n paddingX: {\n isExpanded: {\n size: {\n S: 8,\n M: 9,\n L: 12,\n XL: 15\n }\n }\n }\n});\n\n/**\n * A disclosure panel is a collapsible section of content that is hidden until the disclosure is expanded.\n */\nexport const DisclosurePanel = forwardRef(function DisclosurePanel(props: DisclosurePanelProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n let {size} = useSlottedContext(DisclosureContext)!;\n let {isExpanded} = useContext(DisclosureStateContext)!;\n let panelRef = useDOMRef(ref);\n return (\n <RACDisclosurePanel\n {...domProps}\n ref={panelRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + panelStyles({size, isExpanded})}>\n {props.children}\n </RACDisclosurePanel>\n );\n});\n\n"],"names":[],"version":3,"file":"Disclosure.css.map"}