@react-spectrum/s2 1.0.0 → 1.1.0

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 (477) hide show
  1. package/dist/Accordion.cjs +3 -3
  2. package/dist/Accordion.cjs.map +1 -1
  3. package/dist/Accordion.css +2 -2
  4. package/dist/Accordion.css.map +1 -1
  5. package/dist/Accordion.mjs +3 -3
  6. package/dist/Accordion.mjs.map +1 -1
  7. package/dist/ActionBar.cjs +62 -61
  8. package/dist/ActionBar.cjs.map +1 -1
  9. package/dist/ActionBar.css +58 -58
  10. package/dist/ActionBar.css.map +1 -1
  11. package/dist/ActionBar.mjs +62 -61
  12. package/dist/ActionBar.mjs.map +1 -1
  13. package/dist/ActionButton.cjs +234 -234
  14. package/dist/ActionButton.cjs.map +1 -1
  15. package/dist/ActionButton.css +160 -160
  16. package/dist/ActionButton.css.map +1 -1
  17. package/dist/ActionButton.mjs +234 -234
  18. package/dist/ActionButton.mjs.map +1 -1
  19. package/dist/ActionButtonGroup.cjs +16 -16
  20. package/dist/ActionButtonGroup.css +9 -9
  21. package/dist/ActionButtonGroup.mjs +16 -16
  22. package/dist/Add.cjs +10 -10
  23. package/dist/Add.css +6 -6
  24. package/dist/Add.mjs +10 -10
  25. package/dist/AlertDialog.cjs +3 -3
  26. package/dist/AlertDialog.css +3 -3
  27. package/dist/AlertDialog.mjs +3 -3
  28. package/dist/Asterisk.cjs +6 -6
  29. package/dist/Asterisk.css +4 -4
  30. package/dist/Asterisk.mjs +6 -6
  31. package/dist/Avatar.cjs +17 -17
  32. package/dist/Avatar.css +16 -16
  33. package/dist/Avatar.mjs +17 -17
  34. package/dist/AvatarGroup.cjs +121 -121
  35. package/dist/AvatarGroup.css +31 -31
  36. package/dist/AvatarGroup.mjs +121 -121
  37. package/dist/Badge.cjs +197 -197
  38. package/dist/Badge.css +125 -125
  39. package/dist/Badge.mjs +197 -197
  40. package/dist/Breadcrumbs.cjs +235 -235
  41. package/dist/Breadcrumbs.cjs.map +1 -1
  42. package/dist/Breadcrumbs.css +100 -100
  43. package/dist/Breadcrumbs.css.map +1 -1
  44. package/dist/Breadcrumbs.mjs +235 -235
  45. package/dist/Breadcrumbs.mjs.map +1 -1
  46. package/dist/Button.cjs +333 -333
  47. package/dist/Button.cjs.map +1 -1
  48. package/dist/Button.css +174 -174
  49. package/dist/Button.css.map +1 -1
  50. package/dist/Button.mjs +333 -333
  51. package/dist/Button.mjs.map +1 -1
  52. package/dist/ButtonGroup.cjs +21 -21
  53. package/dist/ButtonGroup.css +15 -15
  54. package/dist/ButtonGroup.mjs +21 -21
  55. package/dist/Calendar.cjs +169 -169
  56. package/dist/Calendar.cjs.map +1 -1
  57. package/dist/Calendar.css +134 -134
  58. package/dist/Calendar.css.map +1 -1
  59. package/dist/Calendar.mjs +169 -169
  60. package/dist/Calendar.mjs.map +1 -1
  61. package/dist/Card.cjs +310 -310
  62. package/dist/Card.cjs.map +1 -1
  63. package/dist/Card.css +206 -206
  64. package/dist/Card.css.map +1 -1
  65. package/dist/Card.mjs +310 -310
  66. package/dist/Card.mjs.map +1 -1
  67. package/dist/CardView.cjs +19 -19
  68. package/dist/CardView.cjs.map +1 -1
  69. package/dist/CardView.css +17 -17
  70. package/dist/CardView.css.map +1 -1
  71. package/dist/CardView.mjs +19 -19
  72. package/dist/CardView.mjs.map +1 -1
  73. package/dist/CenterBaseline.cjs +1 -1
  74. package/dist/CenterBaseline.css +2 -2
  75. package/dist/CenterBaseline.mjs +1 -1
  76. package/dist/Checkbox.cjs +162 -162
  77. package/dist/Checkbox.cjs.map +1 -1
  78. package/dist/Checkbox.css +95 -91
  79. package/dist/Checkbox.css.map +1 -1
  80. package/dist/Checkbox.mjs +162 -162
  81. package/dist/Checkbox.mjs.map +1 -1
  82. package/dist/CheckboxGroup.cjs +44 -44
  83. package/dist/CheckboxGroup.cjs.map +1 -1
  84. package/dist/CheckboxGroup.css +37 -37
  85. package/dist/CheckboxGroup.css.map +1 -1
  86. package/dist/CheckboxGroup.mjs +44 -44
  87. package/dist/CheckboxGroup.mjs.map +1 -1
  88. package/dist/Checkmark.cjs +12 -12
  89. package/dist/Checkmark.css +8 -8
  90. package/dist/Checkmark.mjs +12 -12
  91. package/dist/Chevron.cjs +12 -12
  92. package/dist/Chevron.css +10 -10
  93. package/dist/Chevron.mjs +12 -12
  94. package/dist/ClearButton.cjs +30 -30
  95. package/dist/ClearButton.css +30 -30
  96. package/dist/ClearButton.mjs +30 -30
  97. package/dist/CloseButton.cjs +56 -56
  98. package/dist/CloseButton.css +47 -47
  99. package/dist/CloseButton.mjs +56 -56
  100. package/dist/ColorArea.cjs +17 -17
  101. package/dist/ColorArea.cjs.map +1 -1
  102. package/dist/ColorArea.css +16 -16
  103. package/dist/ColorArea.css.map +1 -1
  104. package/dist/ColorArea.mjs +17 -17
  105. package/dist/ColorArea.mjs.map +1 -1
  106. package/dist/ColorField.cjs +32 -32
  107. package/dist/ColorField.cjs.map +1 -1
  108. package/dist/ColorField.css +27 -27
  109. package/dist/ColorField.css.map +1 -1
  110. package/dist/ColorField.mjs +32 -32
  111. package/dist/ColorField.mjs.map +1 -1
  112. package/dist/ColorHandle.cjs +27 -27
  113. package/dist/ColorHandle.css +42 -42
  114. package/dist/ColorHandle.mjs +27 -27
  115. package/dist/ColorSlider.cjs +109 -109
  116. package/dist/ColorSlider.cjs.map +1 -1
  117. package/dist/ColorSlider.css +52 -52
  118. package/dist/ColorSlider.css.map +1 -1
  119. package/dist/ColorSlider.mjs +109 -109
  120. package/dist/ColorSlider.mjs.map +1 -1
  121. package/dist/ColorSwatch.cjs +30 -30
  122. package/dist/ColorSwatch.cjs.map +1 -1
  123. package/dist/ColorSwatch.css +29 -29
  124. package/dist/ColorSwatch.css.map +1 -1
  125. package/dist/ColorSwatch.mjs +30 -30
  126. package/dist/ColorSwatch.mjs.map +1 -1
  127. package/dist/ColorSwatchPicker.cjs +30 -30
  128. package/dist/ColorSwatchPicker.css +48 -48
  129. package/dist/ColorSwatchPicker.mjs +30 -30
  130. package/dist/ColorWheel.cjs +31 -27
  131. package/dist/ColorWheel.cjs.map +1 -1
  132. package/dist/ColorWheel.css +17 -17
  133. package/dist/ColorWheel.css.map +1 -1
  134. package/dist/ColorWheel.mjs +31 -27
  135. package/dist/ColorWheel.mjs.map +1 -1
  136. package/dist/ComboBox.cjs +383 -383
  137. package/dist/ComboBox.cjs.map +1 -1
  138. package/dist/ComboBox.css +187 -187
  139. package/dist/ComboBox.css.map +1 -1
  140. package/dist/ComboBox.mjs +383 -383
  141. package/dist/ComboBox.mjs.map +1 -1
  142. package/dist/ContextualHelp.cjs +5 -5
  143. package/dist/ContextualHelp.css +50 -50
  144. package/dist/ContextualHelp.mjs +5 -5
  145. package/dist/Cross.cjs +14 -14
  146. package/dist/Cross.css +10 -10
  147. package/dist/Cross.mjs +14 -14
  148. package/dist/CustomDialog.cjs +26 -26
  149. package/dist/CustomDialog.cjs.map +1 -1
  150. package/dist/CustomDialog.css +25 -25
  151. package/dist/CustomDialog.css.map +1 -1
  152. package/dist/CustomDialog.mjs +26 -26
  153. package/dist/CustomDialog.mjs.map +1 -1
  154. package/dist/Dash.cjs +10 -10
  155. package/dist/Dash.css +6 -6
  156. package/dist/Dash.mjs +10 -10
  157. package/dist/DateField.cjs +74 -74
  158. package/dist/DateField.cjs.map +1 -1
  159. package/dist/DateField.css +77 -77
  160. package/dist/DateField.css.map +1 -1
  161. package/dist/DateField.mjs +74 -74
  162. package/dist/DateField.mjs.map +1 -1
  163. package/dist/DatePicker.cjs +173 -173
  164. package/dist/DatePicker.cjs.map +1 -1
  165. package/dist/DatePicker.css +128 -128
  166. package/dist/DatePicker.css.map +1 -1
  167. package/dist/DatePicker.mjs +173 -173
  168. package/dist/DatePicker.mjs.map +1 -1
  169. package/dist/DateRangePicker.cjs +56 -56
  170. package/dist/DateRangePicker.cjs.map +1 -1
  171. package/dist/DateRangePicker.css +59 -59
  172. package/dist/DateRangePicker.css.map +1 -1
  173. package/dist/DateRangePicker.mjs +56 -56
  174. package/dist/DateRangePicker.mjs.map +1 -1
  175. package/dist/Dialog.cjs +17 -17
  176. package/dist/Dialog.cjs.map +1 -1
  177. package/dist/Dialog.css +70 -70
  178. package/dist/Dialog.css.map +1 -1
  179. package/dist/Dialog.mjs +17 -17
  180. package/dist/Dialog.mjs.map +1 -1
  181. package/dist/Disclosure.cjs +120 -120
  182. package/dist/Disclosure.cjs.map +1 -1
  183. package/dist/Disclosure.css +112 -112
  184. package/dist/Disclosure.css.map +1 -1
  185. package/dist/Disclosure.mjs +120 -120
  186. package/dist/Disclosure.mjs.map +1 -1
  187. package/dist/Divider.cjs +26 -26
  188. package/dist/Divider.cjs.map +1 -1
  189. package/dist/Divider.css +25 -25
  190. package/dist/Divider.css.map +1 -1
  191. package/dist/Divider.mjs +26 -26
  192. package/dist/Divider.mjs.map +1 -1
  193. package/dist/DropZone.cjs +62 -62
  194. package/dist/DropZone.cjs.map +1 -1
  195. package/dist/DropZone.css +57 -57
  196. package/dist/DropZone.css.map +1 -1
  197. package/dist/DropZone.mjs +62 -62
  198. package/dist/DropZone.mjs.map +1 -1
  199. package/dist/Field.cjs +348 -348
  200. package/dist/Field.cjs.map +1 -1
  201. package/dist/Field.css +147 -147
  202. package/dist/Field.css.map +1 -1
  203. package/dist/Field.mjs +348 -348
  204. package/dist/Field.mjs.map +1 -1
  205. package/dist/Form.cjs +10 -10
  206. package/dist/Form.cjs.map +1 -1
  207. package/dist/Form.css +9 -9
  208. package/dist/Form.css.map +1 -1
  209. package/dist/Form.mjs +10 -10
  210. package/dist/Form.mjs.map +1 -1
  211. package/dist/FullscreenDialog.cjs +5 -5
  212. package/dist/FullscreenDialog.cjs.map +1 -1
  213. package/dist/FullscreenDialog.css +78 -78
  214. package/dist/FullscreenDialog.css.map +1 -1
  215. package/dist/FullscreenDialog.mjs +5 -5
  216. package/dist/FullscreenDialog.mjs.map +1 -1
  217. package/dist/IllustratedMessage.cjs +229 -229
  218. package/dist/IllustratedMessage.css +72 -72
  219. package/dist/IllustratedMessage.mjs +229 -229
  220. package/dist/Image.cjs +14 -14
  221. package/dist/Image.css +14 -14
  222. package/dist/Image.mjs +14 -14
  223. package/dist/InlineAlert.cjs +101 -101
  224. package/dist/InlineAlert.css +76 -76
  225. package/dist/InlineAlert.mjs +101 -101
  226. package/dist/Link.cjs +50 -50
  227. package/dist/Link.cjs.map +1 -1
  228. package/dist/Link.css +41 -41
  229. package/dist/Link.css.map +1 -1
  230. package/dist/Link.mjs +50 -50
  231. package/dist/Link.mjs.map +1 -1
  232. package/dist/LinkOut.cjs +8 -8
  233. package/dist/LinkOut.css +8 -8
  234. package/dist/LinkOut.mjs +8 -8
  235. package/dist/Menu.cjs +446 -443
  236. package/dist/Menu.cjs.map +1 -1
  237. package/dist/Menu.css +184 -184
  238. package/dist/Menu.css.map +1 -1
  239. package/dist/Menu.mjs +446 -443
  240. package/dist/Menu.mjs.map +1 -1
  241. package/dist/Meter.cjs +154 -154
  242. package/dist/Meter.cjs.map +1 -1
  243. package/dist/Meter.css +91 -91
  244. package/dist/Meter.css.map +1 -1
  245. package/dist/Meter.mjs +154 -154
  246. package/dist/Meter.mjs.map +1 -1
  247. package/dist/Modal.cjs +66 -66
  248. package/dist/Modal.cjs.map +1 -1
  249. package/dist/Modal.css +54 -54
  250. package/dist/Modal.css.map +1 -1
  251. package/dist/Modal.mjs +66 -66
  252. package/dist/Modal.mjs.map +1 -1
  253. package/dist/NotificationBadge.cjs +57 -57
  254. package/dist/NotificationBadge.css +49 -49
  255. package/dist/NotificationBadge.mjs +57 -57
  256. package/dist/NumberField.cjs +115 -115
  257. package/dist/NumberField.cjs.map +1 -1
  258. package/dist/NumberField.css +99 -99
  259. package/dist/NumberField.css.map +1 -1
  260. package/dist/NumberField.mjs +115 -115
  261. package/dist/NumberField.mjs.map +1 -1
  262. package/dist/Picker.cjs +275 -275
  263. package/dist/Picker.cjs.map +1 -1
  264. package/dist/Picker.css +173 -173
  265. package/dist/Picker.css.map +1 -1
  266. package/dist/Picker.mjs +275 -275
  267. package/dist/Picker.mjs.map +1 -1
  268. package/dist/Popover.cjs +89 -89
  269. package/dist/Popover.cjs.map +1 -1
  270. package/dist/Popover.css +70 -70
  271. package/dist/Popover.css.map +1 -1
  272. package/dist/Popover.mjs +89 -89
  273. package/dist/Popover.mjs.map +1 -1
  274. package/dist/ProgressBar.cjs +164 -164
  275. package/dist/ProgressBar.cjs.map +1 -1
  276. package/dist/ProgressBar.css +99 -99
  277. package/dist/ProgressBar.css.map +1 -1
  278. package/dist/ProgressBar.mjs +164 -164
  279. package/dist/ProgressBar.mjs.map +1 -1
  280. package/dist/ProgressCircle.cjs +32 -32
  281. package/dist/ProgressCircle.cjs.map +1 -1
  282. package/dist/ProgressCircle.css +24 -24
  283. package/dist/ProgressCircle.css.map +1 -1
  284. package/dist/ProgressCircle.mjs +32 -32
  285. package/dist/ProgressCircle.mjs.map +1 -1
  286. package/dist/Provider.cjs +11 -11
  287. package/dist/Provider.css +10 -10
  288. package/dist/Provider.mjs +11 -11
  289. package/dist/Radio.cjs +146 -146
  290. package/dist/Radio.cjs.map +1 -1
  291. package/dist/Radio.css +78 -78
  292. package/dist/Radio.css.map +1 -1
  293. package/dist/Radio.mjs +146 -146
  294. package/dist/Radio.mjs.map +1 -1
  295. package/dist/RadioGroup.cjs +42 -42
  296. package/dist/RadioGroup.cjs.map +1 -1
  297. package/dist/RadioGroup.css +37 -37
  298. package/dist/RadioGroup.css.map +1 -1
  299. package/dist/RadioGroup.mjs +42 -42
  300. package/dist/RadioGroup.mjs.map +1 -1
  301. package/dist/RangeCalendar.cjs +8 -8
  302. package/dist/RangeCalendar.cjs.map +1 -1
  303. package/dist/RangeCalendar.css +10 -10
  304. package/dist/RangeCalendar.css.map +1 -1
  305. package/dist/RangeCalendar.mjs +8 -8
  306. package/dist/RangeCalendar.mjs.map +1 -1
  307. package/dist/SearchField.cjs +42 -42
  308. package/dist/SearchField.cjs.map +1 -1
  309. package/dist/SearchField.css +45 -45
  310. package/dist/SearchField.css.map +1 -1
  311. package/dist/SearchField.mjs +42 -42
  312. package/dist/SearchField.mjs.map +1 -1
  313. package/dist/SegmentedControl.cjs +180 -180
  314. package/dist/SegmentedControl.css +123 -123
  315. package/dist/SegmentedControl.mjs +180 -180
  316. package/dist/SelectBoxGroup.cjs +144 -144
  317. package/dist/SelectBoxGroup.cjs.map +1 -1
  318. package/dist/SelectBoxGroup.css +120 -120
  319. package/dist/SelectBoxGroup.css.map +1 -1
  320. package/dist/SelectBoxGroup.mjs +144 -144
  321. package/dist/SelectBoxGroup.mjs.map +1 -1
  322. package/dist/Slider.cjs +295 -295
  323. package/dist/Slider.cjs.map +1 -1
  324. package/dist/Slider.css +154 -154
  325. package/dist/Slider.css.map +1 -1
  326. package/dist/Slider.mjs +295 -295
  327. package/dist/Slider.mjs.map +1 -1
  328. package/dist/StatusLight.cjs +116 -116
  329. package/dist/StatusLight.css +59 -59
  330. package/dist/StatusLight.mjs +116 -116
  331. package/dist/Switch.cjs +155 -155
  332. package/dist/Switch.cjs.map +1 -1
  333. package/dist/Switch.css +74 -74
  334. package/dist/Switch.css.map +1 -1
  335. package/dist/Switch.mjs +155 -155
  336. package/dist/Switch.mjs.map +1 -1
  337. package/dist/TableView.cjs +415 -415
  338. package/dist/TableView.cjs.map +1 -1
  339. package/dist/TableView.css +199 -199
  340. package/dist/TableView.css.map +1 -1
  341. package/dist/TableView.mjs +416 -416
  342. package/dist/TableView.mjs.map +1 -1
  343. package/dist/Tabs.cjs +127 -127
  344. package/dist/Tabs.cjs.map +1 -1
  345. package/dist/Tabs.css +105 -105
  346. package/dist/Tabs.css.map +1 -1
  347. package/dist/Tabs.mjs +127 -127
  348. package/dist/Tabs.mjs.map +1 -1
  349. package/dist/TabsPicker.cjs +127 -127
  350. package/dist/TabsPicker.cjs.map +1 -1
  351. package/dist/TabsPicker.css +108 -108
  352. package/dist/TabsPicker.css.map +1 -1
  353. package/dist/TabsPicker.mjs +127 -127
  354. package/dist/TabsPicker.mjs.map +1 -1
  355. package/dist/TagGroup.cjs +204 -204
  356. package/dist/TagGroup.cjs.map +1 -1
  357. package/dist/TagGroup.css +146 -146
  358. package/dist/TagGroup.css.map +1 -1
  359. package/dist/TagGroup.mjs +204 -204
  360. package/dist/TagGroup.mjs.map +1 -1
  361. package/dist/TextField.cjs +59 -59
  362. package/dist/TextField.cjs.map +1 -1
  363. package/dist/TextField.css +54 -54
  364. package/dist/TextField.css.map +1 -1
  365. package/dist/TextField.mjs +59 -59
  366. package/dist/TextField.mjs.map +1 -1
  367. package/dist/TimeField.cjs +52 -52
  368. package/dist/TimeField.cjs.map +1 -1
  369. package/dist/TimeField.css +47 -47
  370. package/dist/TimeField.css.map +1 -1
  371. package/dist/TimeField.mjs +52 -52
  372. package/dist/TimeField.mjs.map +1 -1
  373. package/dist/Toast.cjs +120 -120
  374. package/dist/Toast.cjs.map +1 -1
  375. package/dist/Toast.css +110 -110
  376. package/dist/Toast.css.map +1 -1
  377. package/dist/Toast.mjs +120 -120
  378. package/dist/Toast.mjs.map +1 -1
  379. package/dist/ToggleButton.cjs +3 -3
  380. package/dist/ToggleButton.cjs.map +1 -1
  381. package/dist/ToggleButton.css +12 -12
  382. package/dist/ToggleButton.css.map +1 -1
  383. package/dist/ToggleButton.mjs +3 -3
  384. package/dist/ToggleButton.mjs.map +1 -1
  385. package/dist/ToggleButtonGroup.cjs.map +1 -1
  386. package/dist/ToggleButtonGroup.mjs.map +1 -1
  387. package/dist/Tooltip.cjs +78 -78
  388. package/dist/Tooltip.cjs.map +1 -1
  389. package/dist/Tooltip.css +65 -65
  390. package/dist/Tooltip.css.map +1 -1
  391. package/dist/Tooltip.mjs +78 -78
  392. package/dist/Tooltip.mjs.map +1 -1
  393. package/dist/TreeView.cjs +144 -128
  394. package/dist/TreeView.cjs.map +1 -1
  395. package/dist/TreeView.css +131 -127
  396. package/dist/TreeView.css.map +1 -1
  397. package/dist/TreeView.mjs +144 -128
  398. package/dist/TreeView.mjs.map +1 -1
  399. package/dist/types.d.ts +68 -72
  400. package/dist/types.d.ts.map +1 -1
  401. package/icons/Icon.cjs +12 -12
  402. package/icons/Icon.css +9 -9
  403. package/icons/Icon.mjs +12 -12
  404. package/icons/Skeleton.cjs +2 -2
  405. package/icons/Skeleton.cjs.map +1 -1
  406. package/icons/Skeleton.css +6 -6
  407. package/icons/Skeleton.mjs +2 -2
  408. package/icons/Skeleton.mjs.map +1 -1
  409. package/icons/runtime.cjs +16 -3
  410. package/icons/runtime.cjs.map +1 -1
  411. package/icons/runtime.mjs +16 -3
  412. package/icons/runtime.mjs.map +1 -1
  413. package/package.json +21 -21
  414. package/src/Accordion.tsx +1 -1
  415. package/src/ActionBar.tsx +2 -2
  416. package/src/ActionButton.tsx +1 -1
  417. package/src/Breadcrumbs.tsx +2 -2
  418. package/src/Button.tsx +2 -2
  419. package/src/Calendar.tsx +1 -1
  420. package/src/Card.tsx +1 -1
  421. package/src/CardView.tsx +1 -1
  422. package/src/Checkbox.tsx +2 -1
  423. package/src/CheckboxGroup.tsx +1 -1
  424. package/src/CoachMark.tsx +1 -1
  425. package/src/ColorArea.tsx +1 -1
  426. package/src/ColorField.tsx +1 -1
  427. package/src/ColorSlider.tsx +1 -1
  428. package/src/ColorSwatch.tsx +1 -1
  429. package/src/ColorWheel.tsx +2 -2
  430. package/src/ComboBox.tsx +2 -2
  431. package/src/CustomDialog.tsx +1 -1
  432. package/src/DateField.tsx +1 -1
  433. package/src/DatePicker.tsx +1 -1
  434. package/src/DateRangePicker.tsx +1 -1
  435. package/src/Dialog.tsx +1 -1
  436. package/src/Disclosure.tsx +2 -2
  437. package/src/Divider.tsx +1 -1
  438. package/src/DropZone.tsx +1 -1
  439. package/src/Field.tsx +3 -3
  440. package/src/Form.tsx +1 -1
  441. package/src/FullscreenDialog.tsx +1 -1
  442. package/src/Link.tsx +1 -1
  443. package/src/Menu.tsx +11 -13
  444. package/src/Meter.tsx +1 -1
  445. package/src/Modal.tsx +1 -1
  446. package/src/NumberField.tsx +1 -1
  447. package/src/Picker.tsx +3 -3
  448. package/src/Popover.tsx +2 -1
  449. package/src/ProgressBar.tsx +1 -1
  450. package/src/ProgressCircle.tsx +1 -1
  451. package/src/Radio.tsx +1 -1
  452. package/src/RadioGroup.tsx +1 -1
  453. package/src/RangeCalendar.tsx +1 -1
  454. package/src/SearchField.tsx +1 -1
  455. package/src/SelectBoxGroup.tsx +1 -1
  456. package/src/Slider.tsx +1 -1
  457. package/src/Switch.tsx +1 -1
  458. package/src/TableView.tsx +9 -9
  459. package/src/Tabs.tsx +4 -4
  460. package/src/TabsPicker.tsx +2 -2
  461. package/src/TagGroup.tsx +2 -2
  462. package/src/TextField.tsx +1 -1
  463. package/src/TimeField.tsx +1 -1
  464. package/src/Toast.tsx +1 -1
  465. package/src/ToggleButton.tsx +1 -1
  466. package/src/ToggleButtonGroup.tsx +1 -1
  467. package/src/Tooltip.tsx +1 -1
  468. package/src/TreeView.tsx +10 -6
  469. package/style/__tests__/mergeStyles.test.ts +68 -0
  470. package/style/__tests__/style-macro.test.js +79 -59
  471. package/style/dist/style-macro.cjs +65 -14
  472. package/style/dist/style-macro.cjs.map +1 -1
  473. package/style/dist/style-macro.mjs +65 -14
  474. package/style/dist/style-macro.mjs.map +1 -1
  475. package/style/runtime.ts +21 -5
  476. package/style/style-macro.ts +81 -16
  477. package/style/__tests__/mergeStyles.test.js +0 -32
@@ -32,25 +32,25 @@ const $cf1d656285911959$export$d665dd135a51b28a = /*#__PURE__*/ (0, $7VHtn$creat
32
32
  const $cf1d656285911959$var$disclosure = function anonymous(props, overrides) {
33
33
  let rules = " ";
34
34
  let minWidth = false;
35
- let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
35
+ let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
36
36
  for (let p of matches){
37
37
  if (p[1] === "N") minWidth = true;
38
38
  rules += p[0];
39
39
  }
40
- rules += ' po1';
41
- if (props.isQuiet) rules += ' _ka1';
42
- else rules += ' _kb1';
40
+ rules += ' po11';
41
+ if (props.isQuiet) rules += ' _ka11';
42
+ else rules += ' _kb11';
43
43
  if (props.isInGroup) {
44
- rules += ' ha1';
45
- if (props.isQuiet) rules += ' hka1';
46
- else rules += ' hkb1';
47
- } else if (props.isQuiet) rules += ' ha1';
48
- else rules += ' hb1';
49
- rules += ' ma1';
50
- rules += ' la1';
51
- rules += ' _jf1';
52
- rules += ' ir1';
53
- if (!minWidth) rules += ' Ng1';
44
+ rules += ' ha11';
45
+ if (props.isQuiet) rules += ' hka11';
46
+ else rules += ' hkb11';
47
+ } else if (props.isQuiet) rules += ' ha11';
48
+ else rules += ' hb11';
49
+ rules += ' ma11';
50
+ rules += ' la11';
51
+ rules += ' _jf11';
52
+ rules += ' ir11';
53
+ if (!minWidth) rules += ' Ng11';
54
54
  return rules;
55
55
  };
56
56
  const $cf1d656285911959$export$74a362b31437ec83 = /*#__PURE__*/ (0, $7VHtn$forwardRef)(function Disclosure(props, ref) {
@@ -81,119 +81,119 @@ const $cf1d656285911959$export$74a362b31437ec83 = /*#__PURE__*/ (0, $7VHtn$forwa
81
81
  })
82
82
  });
83
83
  });
84
- const $cf1d656285911959$var$headingStyle = " Jy1 Gy1 Iy1 Hy1 _ub1 sd1 _vb1 Na1";
84
+ const $cf1d656285911959$var$headingStyle = " Jy11 Gy11 Iy11 Hy11 _ub11 sd11 _vb11 Na11";
85
85
  const $cf1d656285911959$var$buttonStyles = function anonymous(props) {
86
86
  let rules = " ";
87
- if (props.isFocusVisible) rules += ' _Lf1';
88
- else rules += ' _Le1';
89
- rules += ' Oh1';
90
- rules += ' Olc1';
91
- rules += ' _Mc1';
92
- rules += ' _Kb1';
93
- rules += ' uk1';
94
- rules += ' ucJ9TBTb1';
95
- rules += ' ud3Euai1';
96
- rules += ' uea1';
97
- rules += ' ugb1';
98
- rules += ' uhd1';
99
- rules += ' uje1';
100
- rules += ' u2NhKxcl1';
101
- rules += ' uic1';
87
+ if (props.isFocusVisible) rules += ' _Lf11';
88
+ else rules += ' _Le11';
89
+ rules += ' Oh11';
90
+ rules += ' Olc11';
91
+ rules += ' _Mc11';
92
+ rules += ' _Kb11';
93
+ rules += ' uk11';
94
+ rules += ' ucJ9TBTb11';
95
+ rules += ' ud3Euai11';
96
+ rules += ' uea11';
97
+ rules += ' ugb11';
98
+ rules += ' uhd11';
99
+ rules += ' uje11';
100
+ rules += ' u2NhKxcl11';
101
+ rules += ' uic11';
102
102
  if (props.size === "XL") {
103
- rules += ' -_6BNtrc-f1';
104
- rules += ' vx1';
103
+ rules += ' -_6BNtrc-f11';
104
+ rules += ' vx11';
105
105
  } else if (props.size === "L") {
106
- rules += ' -_6BNtrc-e1';
107
- rules += ' vx1';
106
+ rules += ' -_6BNtrc-e11';
107
+ rules += ' vx11';
108
108
  } else if (props.size === "M") {
109
- rules += ' -_6BNtrc-d1';
110
- rules += ' vx1';
109
+ rules += ' -_6BNtrc-d11';
110
+ rules += ' vx11';
111
111
  } else if (props.size === "S") {
112
- rules += ' -_6BNtrc-c1';
113
- rules += ' vx1';
112
+ rules += ' -_6BNtrc-c11';
113
+ rules += ' vx11';
114
114
  }
115
- rules += ' xd1';
116
- rules += ' _xa1';
117
- rules += ' xX0cczbc1';
118
- rules += ' _xX0cczba1';
119
- rules += ' _Fd1';
120
- rules += ' _FnuYUweb1';
115
+ rules += ' xd11';
116
+ rules += ' _xa11';
117
+ rules += ' xX0cczbc11';
118
+ rules += ' _xX0cczba11';
119
+ rules += ' _Fd11';
120
+ rules += ' _FnuYUweb11';
121
121
  if (props.isDisabled) {
122
- rules += ' pp1';
123
- rules += ' plc1';
122
+ rules += ' pp11';
123
+ rules += ' plc11';
124
124
  } else {
125
- if (props.isPressed) rules += ' po1';
126
- else if (props.isFocusVisible) rules += ' po1';
127
- else if (props.isHovered) rules += ' po1';
128
- else rules += ' pt1';
129
- rules += ' plb1';
125
+ if (props.isPressed) rules += ' po11';
126
+ else if (props.isFocusVisible) rules += ' po11';
127
+ else if (props.isHovered) rules += ' po11';
128
+ else rules += ' pt11';
129
+ rules += ' plb11';
130
130
  }
131
- rules += ' sd1';
132
- rules += ' _ub1';
133
- rules += ' ea1';
134
- rules += ' S6FcKR1';
135
- rules += ' R6FcKR1';
136
- rules += ' Tu7Fubd1';
137
- rules += ' Qu7Fubd1';
138
- rules += ' U6FcKR1';
139
- rules += ' q6FcKR1';
140
- rules += ' MAyFGYc1';
141
- rules += ' Za1';
142
- if (props.isPressed) rules += ' gnSjEFb1';
143
- else if (props.isHovered) rules += ' gabY4te1';
144
- else if (props.isFocusVisible) rules += ' gabY4te1';
145
- else rules += ' g91';
146
- rules += ' Yd1';
147
- rules += ' Xb1';
148
- rules += ' _2b1';
149
- rules += ' _kJ8iPYd1';
150
- rules += ' hXMFGYc1';
151
- rules += ' ma1';
152
- rules += ' la1';
153
- if (props.isQuiet) rules += ' ob1';
154
- else if (props.isFocusVisible) rules += ' ob1';
155
- else rules += ' od1';
156
- if (props.isQuiet) rules += ' nb1';
157
- else if (props.isFocusVisible) rules += ' nb1';
158
- else rules += ' nd1';
159
- if (props.isQuiet) rules += ' kb1';
160
- else if (props.isFocusVisible) rules += ' kb1';
161
- else rules += ' kd1';
162
- if (props.isQuiet) rules += ' jb1';
163
- else if (props.isFocusVisible) rules += ' jb1';
164
- else rules += ' jd1';
165
- rules += ' _Wd1';
166
- rules += ' __ca1';
131
+ rules += ' sd11';
132
+ rules += ' _ub11';
133
+ rules += ' ea11';
134
+ rules += ' S6FcKR11';
135
+ rules += ' R6FcKR11';
136
+ rules += ' Tu7Fubd11';
137
+ rules += ' Qu7Fubd11';
138
+ rules += ' U6FcKR11';
139
+ rules += ' q6FcKR11';
140
+ rules += ' MAyFGYc11';
141
+ rules += ' Za11';
142
+ if (props.isPressed) rules += ' gnSjEFb11';
143
+ else if (props.isHovered) rules += ' gabY4te11';
144
+ else if (props.isFocusVisible) rules += ' gabY4te11';
145
+ else rules += ' g911';
146
+ rules += ' Yd11';
147
+ rules += ' Xb11';
148
+ rules += ' _2b11';
149
+ rules += ' _kJ8iPYd11';
150
+ rules += ' hXMFGYc11';
151
+ rules += ' ma11';
152
+ rules += ' la11';
153
+ if (props.isQuiet) rules += ' ob11';
154
+ else if (props.isFocusVisible) rules += ' ob11';
155
+ else rules += ' od11';
156
+ if (props.isQuiet) rules += ' nb11';
157
+ else if (props.isFocusVisible) rules += ' nb11';
158
+ else rules += ' nd11';
159
+ if (props.isQuiet) rules += ' kb11';
160
+ else if (props.isFocusVisible) rules += ' kb11';
161
+ else rules += ' kd11';
162
+ if (props.isQuiet) rules += ' jb11';
163
+ else if (props.isFocusVisible) rules += ' jb11';
164
+ else rules += ' jd11';
165
+ rules += ' _Wd11';
166
+ rules += ' __ca11';
167
167
  if (props.size === "XL") {
168
- if (props.density === "spacious") rules += ' -M_-Mj1';
169
- else if (props.density === "regular") rules += ' -M_-Mk1';
170
- else if (props.density === "compact") rules += ' -M_-Mh1';
168
+ if (props.density === "spacious") rules += ' -M_-Mj11';
169
+ else if (props.density === "regular") rules += ' -M_-Mk11';
170
+ else if (props.density === "compact") rules += ' -M_-Mh11';
171
171
  } else if (props.size === "L") {
172
- if (props.density === "spacious") rules += ' -M_-Mk1';
173
- else if (props.density === "regular") rules += ' -M_-Mh1';
174
- else if (props.density === "compact") rules += ' -M_-Mi1';
172
+ if (props.density === "spacious") rules += ' -M_-Mk11';
173
+ else if (props.density === "regular") rules += ' -M_-Mh11';
174
+ else if (props.density === "compact") rules += ' -M_-Mi11';
175
175
  } else if (props.size === "M") {
176
- if (props.density === "spacious") rules += ' -M_-Mh1';
177
- else if (props.density === "regular") rules += ' -M_-Mi1';
178
- else if (props.density === "compact") rules += ' -M_-Mg1';
176
+ if (props.density === "spacious") rules += ' -M_-Mh11';
177
+ else if (props.density === "regular") rules += ' -M_-Mi11';
178
+ else if (props.density === "compact") rules += ' -M_-Mg11';
179
179
  } else if (props.size === "S") {
180
- if (props.density === "spacious") rules += ' -M_-Mi1';
181
- else if (props.density === "regular") rules += ' -M_-Mg1';
182
- else if (props.density === "compact") rules += ' -M_-Me1';
180
+ if (props.density === "spacious") rules += ' -M_-Mi11';
181
+ else if (props.density === "regular") rules += ' -M_-Mg11';
182
+ else if (props.density === "compact") rules += ' -M_-Me11';
183
183
  }
184
- rules += ' -_k_-_ka1';
185
- rules += ' -h_-ha1';
184
+ rules += ' -_k_-_ka11';
185
+ rules += ' -h_-ha11';
186
186
  return rules;
187
187
  };
188
188
  const $cf1d656285911959$var$chevronStyles = function anonymous(props) {
189
189
  let rules = " ";
190
- if (props.isExpanded) rules += ' _Sd1';
191
- else if (props.isRTL) rules += ' _Sc1';
192
- rules += ' Yd1';
193
- rules += ' Xb1';
194
- rules += ' _2b1';
195
- rules += ' -_8sjo0b-t5ZbAob1';
196
- rules += ' _va1';
190
+ if (props.isExpanded) rules += ' _Sd11';
191
+ else if (props.isRTL) rules += ' _Sc11';
192
+ rules += ' Yd11';
193
+ rules += ' Xb11';
194
+ rules += ' _2b11';
195
+ rules += ' -_8sjo0b-t5ZbAob11';
196
+ rules += ' _va11';
197
197
  return rules;
198
198
  };
199
199
  const $cf1d656285911959$var$InternalDisclosureHeader = /*#__PURE__*/ (0, $7VHtn$createContext)(null);
@@ -229,7 +229,7 @@ function $cf1d656285911959$var$DisclosureHeaderWithForwardRef(props, ref) {
229
229
  ],
230
230
  children: /*#__PURE__*/ (0, $7VHtn$jsx)("div", {
231
231
  style: UNSAFE_style,
232
- className: (UNSAFE_className ?? '') + " sd1 eb1 Ub1 qb1",
232
+ className: (UNSAFE_className ?? '') + " sd11 eb11 Ub11 qb11",
233
233
  ref: domRef,
234
234
  children: children
235
235
  })
@@ -279,19 +279,19 @@ const $cf1d656285911959$export$7843c6a5b3e340a2 = /*#__PURE__*/ (0, $7VHtn$forwa
279
279
  children: buttonTrigger
280
280
  });
281
281
  });
282
- const $cf1d656285911959$var$panelStyles = " uk1 ucJ9TBTb1 ud3Euai1 uea1 ugb1 uhd1 uje1 u2NhKxcl1 uic1 -_6BNtrc-d1 vx1 xb1 _xa1 _Fb1 _FnuYUwec1 pt1 FfwmW1d1 _Nb1 Pb1 Ysgyfc1 Ydklsgce1 Xb1 Xdklsgcb1 _2b1 _2dklsgcb1";
282
+ const $cf1d656285911959$var$panelStyles = " uk11 ucJ9TBTb11 ud3Euai11 uea11 ugb11 uhd11 uje11 u2NhKxcl11 uic11 -_6BNtrc-d11 vx11 xb11 _xa11 _Fb11 _FnuYUwec11 pt11 FfwmW1d11 _Nb11 Pb11 Ysgyfc11 Ydklsgce11 Xb11 Xdklsgcb11 _2b11 _2dklsgcb11";
283
283
  const $cf1d656285911959$var$panelInner = function anonymous(props) {
284
284
  let rules = " ";
285
- rules += ' Tt1';
286
- rules += ' Qf1';
287
- if (props.size === "XL") rules += ' Sz5EUbe1';
288
- else if (props.size === "L") rules += ' Se1';
289
- else if (props.size === "M") rules += ' SLabwmd1';
290
- else if (props.size === "S") rules += ' St1';
291
- if (props.size === "XL") rules += ' Rz5EUbe1';
292
- else if (props.size === "L") rules += ' Re1';
293
- else if (props.size === "M") rules += ' RLabwmd1';
294
- else if (props.size === "S") rules += ' Rt1';
285
+ rules += ' Tt11';
286
+ rules += ' Qf11';
287
+ if (props.size === "XL") rules += ' Sz5EUbe11';
288
+ else if (props.size === "L") rules += ' Se11';
289
+ else if (props.size === "M") rules += ' SLabwmd11';
290
+ else if (props.size === "S") rules += ' St11';
291
+ if (props.size === "XL") rules += ' Rz5EUbe11';
292
+ else if (props.size === "L") rules += ' Re11';
293
+ else if (props.size === "M") rules += ' RLabwmd11';
294
+ else if (props.size === "S") rules += ' Rt11';
295
295
  return rules;
296
296
  };
297
297
  const $cf1d656285911959$export$feabaa331e1d464c = /*#__PURE__*/ (0, $7VHtn$forwardRef)(function DisclosurePanel(props, ref) {
@@ -1 +1 @@
1
- {"mappings":"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","sources":["packages/@react-spectrum/s2/src/Disclosure.tsx"],"sourcesContent":["/*\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, GlobalDOMAttributes} from '@react-types/shared';\nimport {baseColor, focusRing, lightDark, space, style} from '../style' with { type: 'macro' };\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 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' | keyof GlobalDOMAttributes>, 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<Partial<DisclosureProps>, 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 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: baseColor('neutral'),\n forcedColors: 'ButtonText',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n fontWeight: 'bold',\n fontSize: {\n size: {\n S: 'title-sm',\n M: 'title',\n L: 'title-lg',\n XL: 'title-xl'\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: 18,\n regular: 24,\n spacious: 32\n }\n },\n M: {\n density: {\n compact: 24,\n regular: 32,\n spacious: 40\n }\n },\n L: {\n density: {\n compact: 32,\n regular: 40,\n spacious: 48\n }\n },\n XL: {\n density: {\n compact: 40,\n regular: 48,\n spacious: 56\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: 'default',\n isQuiet: 'default'\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 // Shift button size down by 2 for compact density, 1 for regular/spacious 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 const sizes = ['XS', 'S', 'M', 'L', 'XL'];\n const currentIndex = sizes.indexOf(size ?? 'M');\n const shift = density === 'compact' ? 2 : 1;\n newSize = sizes[Math.max(0, currentIndex - shift)] as 'XS' | 'S' | 'M' | 'L' | 'XL';\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 height: '--disclosure-panel-height',\n overflow: 'clip',\n transition: {\n default: '[height]',\n '@media (prefers-reduced-motion: reduce)': 'none'\n }\n});\n\nconst panelInner = style({\n paddingTop: 8,\n paddingBottom: 16,\n paddingX: {\n size: {\n S: 8,\n M: space(9),\n L: 12,\n XL: space(15)\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 panelRef = useDOMRef(ref);\n return (\n <RACDisclosurePanel\n {...domProps}\n ref={panelRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + panelStyles}>\n <div className={panelInner({size})}>\n {props.children}\n </div>\n </RACDisclosurePanel>\n );\n});\n"],"names":[],"version":3,"file":"Disclosure.mjs.map"}
1
+ {"mappings":"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","sources":["packages/@react-spectrum/s2/src/Disclosure.tsx"],"sourcesContent":["/*\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, GlobalDOMAttributes} from '@react-types/shared';\nimport {baseColor, focusRing, lightDark, space, style} from '../style' with { type: 'macro' };\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 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' | 'render' | 'children' | keyof GlobalDOMAttributes>, 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<Partial<DisclosureProps>, 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 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: baseColor('neutral'),\n forcedColors: 'ButtonText',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n fontWeight: 'bold',\n fontSize: {\n size: {\n S: 'title-sm',\n M: 'title',\n L: 'title-lg',\n XL: 'title-xl'\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: 18,\n regular: 24,\n spacious: 32\n }\n },\n M: {\n density: {\n compact: 24,\n regular: 32,\n spacious: 40\n }\n },\n L: {\n density: {\n compact: 32,\n regular: 40,\n spacious: 48\n }\n },\n XL: {\n density: {\n compact: 40,\n regular: 48,\n spacious: 56\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: 'default',\n isQuiet: 'default'\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 // Shift button size down by 2 for compact density, 1 for regular/spacious 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 const sizes = ['XS', 'S', 'M', 'L', 'XL'];\n const currentIndex = sizes.indexOf(size ?? 'M');\n const shift = density === 'compact' ? 2 : 1;\n newSize = sizes[Math.max(0, currentIndex - shift)] as 'XS' | 'S' | 'M' | 'L' | 'XL';\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' | 'render' | 'children'>, UnsafeStyles, DOMProps, AriaLabelingProps {\n children: React.ReactNode\n}\n\nconst panelStyles = style({\n font: 'body',\n height: '--disclosure-panel-height',\n overflow: 'clip',\n transition: {\n default: '[height]',\n '@media (prefers-reduced-motion: reduce)': 'none'\n }\n});\n\nconst panelInner = style({\n paddingTop: 8,\n paddingBottom: 16,\n paddingX: {\n size: {\n S: 8,\n M: space(9),\n L: 12,\n XL: space(15)\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 panelRef = useDOMRef(ref);\n return (\n <RACDisclosurePanel\n {...domProps}\n ref={panelRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + panelStyles}>\n <div className={panelInner({size})}>\n {props.children}\n </div>\n </RACDisclosurePanel>\n );\n});\n"],"names":[],"version":3,"file":"Disclosure.mjs.map"}
package/dist/Divider.cjs CHANGED
@@ -39,7 +39,7 @@ const $2d04acb918636de0$export$e8c9778bf415dd08 = function anonymous(props, over
39
39
  let flexGrow = false;
40
40
  let flexShrink = false;
41
41
  let width = false;
42
- let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
42
+ let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
43
43
  for (let p of matches){
44
44
  if (p[1] === "_d") alignSelf = true;
45
45
  if (p[1] === "J") marginTop = true;
@@ -51,37 +51,37 @@ const $2d04acb918636de0$export$e8c9778bf415dd08 = function anonymous(props, over
51
51
  if (p[1] === "Z") width = true;
52
52
  rules += p[0];
53
53
  }
54
- if (props.staticColor === "white") rules += ' -Ovbhqd-gcwrnr1';
55
- else if (props.staticColor === "black") rules += ' -Ovbhqd-g4hn3s1';
56
- if (!alignSelf) rules += ' _df1';
54
+ if (props.staticColor === "white") rules += ' -Ovbhqd-gcwrnr11';
55
+ else if (props.staticColor === "black") rules += ' -Ovbhqd-g4hn3s11';
56
+ if (!alignSelf) rules += ' _df11';
57
57
  if (props.isStaticColor) {
58
- if (props.size === "L") rules += ' gi1';
59
- else rules += ' gg1';
60
- } else if (props.size === "L") rules += ' g01';
61
- else rules += ' gF1';
62
- rules += ' gl_a1';
63
- rules += ' _je1';
64
- rules += ' og1';
65
- rules += ' ng1';
66
- rules += ' kg1';
67
- rules += ' jg1';
68
- if (!marginTop) rules += ' Jy1';
69
- if (!marginBottom) rules += ' Gy1';
70
- if (!marginInlineStart) rules += ' Iy1';
71
- if (!marginInlineEnd) rules += ' Hy1';
72
- if (!flexGrow) rules += ' _ua1';
73
- if (!flexShrink) rules += ' _va1';
58
+ if (props.size === "L") rules += ' gi11';
59
+ else rules += ' gg11';
60
+ } else if (props.size === "L") rules += ' g011';
61
+ else rules += ' gF11';
62
+ rules += ' gl_a11';
63
+ rules += ' _je11';
64
+ rules += ' og11';
65
+ rules += ' ng11';
66
+ rules += ' kg11';
67
+ rules += ' jg11';
68
+ if (!marginTop) rules += ' Jy11';
69
+ if (!marginBottom) rules += ' Gy11';
70
+ if (!marginInlineStart) rules += ' Iy11';
71
+ if (!marginInlineEnd) rules += ' Hy11';
72
+ if (!flexGrow) rules += ' _ua11';
73
+ if (!flexShrink) rules += ' _va11';
74
74
  if (props.orientation === "horizontal") {
75
- if (props.size === "L") rules += ' FT4Nfn1';
76
- else if (props.size === "S") rules += ' FceNfn1';
77
- else rules += ' FLvNfn1';
75
+ if (props.size === "L") rules += ' FT4Nfn11';
76
+ else if (props.size === "S") rules += ' FceNfn11';
77
+ else rules += ' FLvNfn11';
78
78
  }
79
79
  if (props.orientation === "vertical") {
80
80
  if (props.size === "L") {
81
- if (!width) rules += ' ZT4Nfn1';
81
+ if (!width) rules += ' ZT4Nfn11';
82
82
  } else if (props.size === "S") {
83
- if (!width) rules += ' ZceNfn1';
84
- } else if (!width) rules += ' ZLvNfn1';
83
+ if (!width) rules += ' ZceNfn11';
84
+ } else if (!width) rules += ' ZLvNfn11';
85
85
  }
86
86
  return rules;
87
87
  };
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAgCM,MAAM,0DAAiB,CAAA,GAAA,0BAAY,EAAoD;AAEvF,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDN,MAAM,4CAAU,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE,SAAS,QAAQ,KAAmB,EAAE,GAAW;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,oCAAW;QACT,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,0CAAQ;YAClD,MAAM,MAAM,IAAI,IAAI;YACpB,aAAa,MAAM,WAAW,IAAI;YAClC,aAAa,MAAM,WAAW;YAC9B,eAAe,CAAC,CAAC,MAAM,WAAW;QACpC,GAAG,MAAM,MAAM;;AAErB","sources":["packages/@react-spectrum/s2/src/Divider.tsx"],"sourcesContent":["/*\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 {ContextValue, Separator as RACSeparator, SeparatorProps as RACSeparatorProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n/*\n * Adding as it's own type to deal with size being a part of the theme so we\n * can type style() and it's parameters.\n */\ninterface DividerSpectrumProps {\n /**\n * How thick the Divider should be.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The orientation of the Divider.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** The static color style to apply. Useful when the Divider appears over a color background. */\n staticColor?: 'white' | 'black' | 'auto'\n}\n\n// TODO: allow overriding height (only when orientation is vertical)??\nexport interface DividerProps extends DividerSpectrumProps, Omit<RACSeparatorProps, 'className' | 'style' | 'elementType' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const DividerContext = createContext<ContextValue<Partial<DividerProps>, DOMRefValue>>(null);\n\nexport const divider = style<DividerSpectrumProps & {isStaticColor: boolean}>({\n ...staticColor(),\n alignSelf: 'stretch',\n backgroundColor: {\n default: 'gray-200',\n size: {\n L: 'gray-800'\n },\n isStaticColor: {\n default: 'transparent-overlay-200',\n size: {\n L: 'transparent-overlay-800'\n }\n },\n forcedColors: 'ButtonBorder'\n },\n borderStyle: 'none',\n borderRadius: 'full',\n margin: 0,\n flexGrow: 0,\n flexShrink: 0,\n height: {\n orientation: {\n horizontal: {\n // These should be px not rems, because we're emulating a border.\n default: '[2px]',\n size: {\n S: '[1px]',\n L: '[4px]'\n }\n }\n }\n },\n width: {\n orientation: {\n vertical: {\n default: '[2px]',\n size: {\n S: '[1px]',\n L: '[4px]'\n }\n }\n }\n }\n}, getAllowedOverrides());\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nexport const Divider = /*#__PURE__*/ forwardRef(function Divider(props: DividerProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, DividerContext);\n let domRef = useDOMRef(ref);\n\n return (\n <RACSeparator\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + divider({\n size: props.size || 'M',\n orientation: props.orientation || 'horizontal',\n staticColor: props.staticColor,\n isStaticColor: !!props.staticColor\n }, props.styles)} />\n );\n});\n"],"names":[],"version":3,"file":"Divider.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAgCM,MAAM,0DAAiB,CAAA,GAAA,0BAAY,EAAoD;AAEvF,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDN,MAAM,4CAAU,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE,SAAS,QAAQ,KAAmB,EAAE,GAAW;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,oCAAW;QACT,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,0CAAQ;YAClD,MAAM,MAAM,IAAI,IAAI;YACpB,aAAa,MAAM,WAAW,IAAI;YAClC,aAAa,MAAM,WAAW;YAC9B,eAAe,CAAC,CAAC,MAAM,WAAW;QACpC,GAAG,MAAM,MAAM;;AAErB","sources":["packages/@react-spectrum/s2/src/Divider.tsx"],"sourcesContent":["/*\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 {ContextValue, Separator as RACSeparator, SeparatorProps as RACSeparatorProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n/*\n * Adding as it's own type to deal with size being a part of the theme so we\n * can type style() and it's parameters.\n */\ninterface DividerSpectrumProps {\n /**\n * How thick the Divider should be.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The orientation of the Divider.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** The static color style to apply. Useful when the Divider appears over a color background. */\n staticColor?: 'white' | 'black' | 'auto'\n}\n\n// TODO: allow overriding height (only when orientation is vertical)??\nexport interface DividerProps extends DividerSpectrumProps, Omit<RACSeparatorProps, 'className' | 'style' | 'render' | 'elementType' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const DividerContext = createContext<ContextValue<Partial<DividerProps>, DOMRefValue>>(null);\n\nexport const divider = style<DividerSpectrumProps & {isStaticColor: boolean}>({\n ...staticColor(),\n alignSelf: 'stretch',\n backgroundColor: {\n default: 'gray-200',\n size: {\n L: 'gray-800'\n },\n isStaticColor: {\n default: 'transparent-overlay-200',\n size: {\n L: 'transparent-overlay-800'\n }\n },\n forcedColors: 'ButtonBorder'\n },\n borderStyle: 'none',\n borderRadius: 'full',\n margin: 0,\n flexGrow: 0,\n flexShrink: 0,\n height: {\n orientation: {\n horizontal: {\n // These should be px not rems, because we're emulating a border.\n default: '[2px]',\n size: {\n S: '[1px]',\n L: '[4px]'\n }\n }\n }\n },\n width: {\n orientation: {\n vertical: {\n default: '[2px]',\n size: {\n S: '[1px]',\n L: '[4px]'\n }\n }\n }\n }\n}, getAllowedOverrides());\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nexport const Divider = /*#__PURE__*/ forwardRef(function Divider(props: DividerProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, DividerContext);\n let domRef = useDOMRef(ref);\n\n return (\n <RACSeparator\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + divider({\n size: props.size || 'M',\n orientation: props.orientation || 'horizontal',\n staticColor: props.staticColor,\n isStaticColor: !!props.staticColor\n }, props.styles)} />\n );\n});\n"],"names":[],"version":3,"file":"Divider.cjs.map"}
package/dist/Divider.css CHANGED
@@ -1,97 +1,97 @@
1
1
  @layer _.a {
2
- .-Ovbhqd-g4hn3s1 {
2
+ .-Ovbhqd-g4hn3s11 {
3
3
  --s2-container-bg: white;
4
4
  }
5
5
 
6
- .-Ovbhqd-gcwrnr1 {
6
+ .-Ovbhqd-gcwrnr11 {
7
7
  --s2-container-bg: black;
8
8
  }
9
9
 
10
- ._df1 {
10
+ ._df11 {
11
11
  align-self: stretch;
12
12
  }
13
13
 
14
- .gF1 {
14
+ .gF11 {
15
15
  background-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
16
16
  }
17
17
 
18
- .g01 {
18
+ .g011 {
19
19
  background-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
20
20
  }
21
21
 
22
- .gg1 {
22
+ .gg11 {
23
23
  background-color: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / .14);
24
24
  }
25
25
 
26
- .gi1 {
26
+ .gi11 {
27
27
  background-color: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / .85);
28
28
  }
29
29
 
30
- ._je1 {
30
+ ._je11 {
31
31
  border-style: none;
32
32
  }
33
33
 
34
- .og1 {
34
+ .og11 {
35
35
  border-start-start-radius: 9999px;
36
36
  }
37
37
 
38
- .ng1 {
38
+ .ng11 {
39
39
  border-start-end-radius: 9999px;
40
40
  }
41
41
 
42
- .kg1 {
42
+ .kg11 {
43
43
  border-end-start-radius: 9999px;
44
44
  }
45
45
 
46
- .jg1 {
46
+ .jg11 {
47
47
  border-end-end-radius: 9999px;
48
48
  }
49
49
 
50
- .Jy1 {
50
+ .Jy11 {
51
51
  margin-top: 0;
52
52
  }
53
53
 
54
- .Gy1 {
54
+ .Gy11 {
55
55
  margin-bottom: 0;
56
56
  }
57
57
 
58
- .Iy1 {
58
+ .Iy11 {
59
59
  margin-inline-start: 0;
60
60
  }
61
61
 
62
- .Hy1 {
62
+ .Hy11 {
63
63
  margin-inline-end: 0;
64
64
  }
65
65
 
66
- ._ua1 {
66
+ ._ua11 {
67
67
  flex-grow: 0;
68
68
  }
69
69
 
70
- ._va1 {
70
+ ._va11 {
71
71
  flex-shrink: 0;
72
72
  }
73
73
 
74
- .FLvNfn1 {
74
+ .FLvNfn11 {
75
75
  height: 2px;
76
76
  }
77
77
 
78
- .FceNfn1 {
78
+ .FceNfn11 {
79
79
  height: 1px;
80
80
  }
81
81
 
82
- .FT4Nfn1 {
82
+ .FT4Nfn11 {
83
83
  height: 4px;
84
84
  }
85
85
 
86
- .ZLvNfn1 {
86
+ .ZLvNfn11 {
87
87
  width: 2px;
88
88
  }
89
89
 
90
- .ZceNfn1 {
90
+ .ZceNfn11 {
91
91
  width: 1px;
92
92
  }
93
93
 
94
- .ZT4Nfn1 {
94
+ .ZT4Nfn11 {
95
95
  width: 4px;
96
96
  }
97
97
  }
@@ -100,7 +100,7 @@
100
100
 
101
101
  @layer _.b.l {
102
102
  @media (forced-colors: active) {
103
- .gl_a1 {
103
+ .gl_a11 {
104
104
  background-color: buttonborder;
105
105
  }
106
106
  }
@@ -1 +1 @@
1
- {"mappings":"AA4CuB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/Divider.tsx"],"sourcesContent":["/*\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 {ContextValue, Separator as RACSeparator, SeparatorProps as RACSeparatorProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n/*\n * Adding as it's own type to deal with size being a part of the theme so we\n * can type style() and it's parameters.\n */\ninterface DividerSpectrumProps {\n /**\n * How thick the Divider should be.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The orientation of the Divider.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** The static color style to apply. Useful when the Divider appears over a color background. */\n staticColor?: 'white' | 'black' | 'auto'\n}\n\n// TODO: allow overriding height (only when orientation is vertical)??\nexport interface DividerProps extends DividerSpectrumProps, Omit<RACSeparatorProps, 'className' | 'style' | 'elementType' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const DividerContext = createContext<ContextValue<Partial<DividerProps>, DOMRefValue>>(null);\n\nexport const divider = style<DividerSpectrumProps & {isStaticColor: boolean}>({\n ...staticColor(),\n alignSelf: 'stretch',\n backgroundColor: {\n default: 'gray-200',\n size: {\n L: 'gray-800'\n },\n isStaticColor: {\n default: 'transparent-overlay-200',\n size: {\n L: 'transparent-overlay-800'\n }\n },\n forcedColors: 'ButtonBorder'\n },\n borderStyle: 'none',\n borderRadius: 'full',\n margin: 0,\n flexGrow: 0,\n flexShrink: 0,\n height: {\n orientation: {\n horizontal: {\n // These should be px not rems, because we're emulating a border.\n default: '[2px]',\n size: {\n S: '[1px]',\n L: '[4px]'\n }\n }\n }\n },\n width: {\n orientation: {\n vertical: {\n default: '[2px]',\n size: {\n S: '[1px]',\n L: '[4px]'\n }\n }\n }\n }\n}, getAllowedOverrides());\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nexport const Divider = /*#__PURE__*/ forwardRef(function Divider(props: DividerProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, DividerContext);\n let domRef = useDOMRef(ref);\n\n return (\n <RACSeparator\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + divider({\n size: props.size || 'M',\n orientation: props.orientation || 'horizontal',\n staticColor: props.staticColor,\n isStaticColor: !!props.staticColor\n }, props.styles)} />\n );\n});\n"],"names":[],"version":3,"file":"Divider.css.map"}
1
+ {"mappings":"AA4CuB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/Divider.tsx"],"sourcesContent":["/*\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 {ContextValue, Separator as RACSeparator, SeparatorProps as RACSeparatorProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n/*\n * Adding as it's own type to deal with size being a part of the theme so we\n * can type style() and it's parameters.\n */\ninterface DividerSpectrumProps {\n /**\n * How thick the Divider should be.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /**\n * The orientation of the Divider.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** The static color style to apply. Useful when the Divider appears over a color background. */\n staticColor?: 'white' | 'black' | 'auto'\n}\n\n// TODO: allow overriding height (only when orientation is vertical)??\nexport interface DividerProps extends DividerSpectrumProps, Omit<RACSeparatorProps, 'className' | 'style' | 'render' | 'elementType' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const DividerContext = createContext<ContextValue<Partial<DividerProps>, DOMRefValue>>(null);\n\nexport const divider = style<DividerSpectrumProps & {isStaticColor: boolean}>({\n ...staticColor(),\n alignSelf: 'stretch',\n backgroundColor: {\n default: 'gray-200',\n size: {\n L: 'gray-800'\n },\n isStaticColor: {\n default: 'transparent-overlay-200',\n size: {\n L: 'transparent-overlay-800'\n }\n },\n forcedColors: 'ButtonBorder'\n },\n borderStyle: 'none',\n borderRadius: 'full',\n margin: 0,\n flexGrow: 0,\n flexShrink: 0,\n height: {\n orientation: {\n horizontal: {\n // These should be px not rems, because we're emulating a border.\n default: '[2px]',\n size: {\n S: '[1px]',\n L: '[4px]'\n }\n }\n }\n },\n width: {\n orientation: {\n vertical: {\n default: '[2px]',\n size: {\n S: '[1px]',\n L: '[4px]'\n }\n }\n }\n }\n}, getAllowedOverrides());\n\n/**\n * Dividers bring clarity to a layout by grouping and dividing content in close proximity.\n * They can also be used to establish rhythm and hierarchy.\n */\nexport const Divider = /*#__PURE__*/ forwardRef(function Divider(props: DividerProps, ref: DOMRef) {\n [props, ref] = useSpectrumContextProps(props, ref, DividerContext);\n let domRef = useDOMRef(ref);\n\n return (\n <RACSeparator\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + divider({\n size: props.size || 'M',\n orientation: props.orientation || 'horizontal',\n staticColor: props.staticColor,\n isStaticColor: !!props.staticColor\n }, props.styles)} />\n );\n});\n"],"names":[],"version":3,"file":"Divider.css.map"}