@react-spectrum/s2 0.5.0 → 0.6.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 (598) hide show
  1. package/dist/Accordion.cjs +5 -8
  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 +5 -8
  6. package/dist/Accordion.mjs.map +1 -1
  7. package/dist/ActionBar.cjs +264 -0
  8. package/dist/ActionBar.cjs.map +1 -0
  9. package/dist/ActionBar.css +267 -0
  10. package/dist/ActionBar.css.map +1 -0
  11. package/dist/ActionBar.mjs +257 -0
  12. package/dist/ActionBar.mjs.map +1 -0
  13. package/dist/ActionButton.cjs +121 -147
  14. package/dist/ActionButton.cjs.map +1 -1
  15. package/dist/ActionButton.css +133 -153
  16. package/dist/ActionButton.css.map +1 -1
  17. package/dist/ActionButton.mjs +122 -148
  18. package/dist/ActionButton.mjs.map +1 -1
  19. package/dist/ActionButtonGroup.cjs +6 -9
  20. package/dist/ActionButtonGroup.cjs.map +1 -1
  21. package/dist/ActionButtonGroup.css +3 -3
  22. package/dist/ActionButtonGroup.css.map +1 -1
  23. package/dist/ActionButtonGroup.mjs +6 -9
  24. package/dist/ActionButtonGroup.mjs.map +1 -1
  25. package/dist/ActionMenu.cjs +2 -5
  26. package/dist/ActionMenu.cjs.map +1 -1
  27. package/dist/ActionMenu.mjs +2 -5
  28. package/dist/ActionMenu.mjs.map +1 -1
  29. package/dist/AlertDialog.cjs +2 -5
  30. package/dist/AlertDialog.cjs.map +1 -1
  31. package/dist/AlertDialog.css.map +1 -1
  32. package/dist/AlertDialog.mjs +2 -5
  33. package/dist/AlertDialog.mjs.map +1 -1
  34. package/dist/Avatar.cjs +12 -15
  35. package/dist/Avatar.cjs.map +1 -1
  36. package/dist/Avatar.css +11 -11
  37. package/dist/Avatar.css.map +1 -1
  38. package/dist/Avatar.mjs +12 -15
  39. package/dist/Avatar.mjs.map +1 -1
  40. package/dist/AvatarGroup.cjs +99 -102
  41. package/dist/AvatarGroup.cjs.map +1 -1
  42. package/dist/AvatarGroup.css +31 -31
  43. package/dist/AvatarGroup.css.map +1 -1
  44. package/dist/AvatarGroup.mjs +99 -102
  45. package/dist/AvatarGroup.mjs.map +1 -1
  46. package/dist/Badge.cjs +99 -102
  47. package/dist/Badge.cjs.map +1 -1
  48. package/dist/Badge.css +76 -76
  49. package/dist/Badge.css.map +1 -1
  50. package/dist/Badge.mjs +99 -102
  51. package/dist/Badge.mjs.map +1 -1
  52. package/dist/Breadcrumbs.cjs +93 -94
  53. package/dist/Breadcrumbs.cjs.map +1 -1
  54. package/dist/Breadcrumbs.css +70 -64
  55. package/dist/Breadcrumbs.css.map +1 -1
  56. package/dist/Breadcrumbs.mjs +94 -95
  57. package/dist/Breadcrumbs.mjs.map +1 -1
  58. package/dist/Button.cjs +305 -278
  59. package/dist/Button.cjs.map +1 -1
  60. package/dist/Button.css +255 -182
  61. package/dist/Button.css.map +1 -1
  62. package/dist/Button.mjs +307 -280
  63. package/dist/Button.mjs.map +1 -1
  64. package/dist/ButtonGroup.cjs +17 -20
  65. package/dist/ButtonGroup.cjs.map +1 -1
  66. package/dist/ButtonGroup.css +11 -11
  67. package/dist/ButtonGroup.css.map +1 -1
  68. package/dist/ButtonGroup.mjs +18 -21
  69. package/dist/ButtonGroup.mjs.map +1 -1
  70. package/dist/Card.cjs +167 -167
  71. package/dist/Card.css +121 -121
  72. package/dist/Card.mjs +167 -167
  73. package/dist/CardView.cjs +47 -21
  74. package/dist/CardView.cjs.map +1 -1
  75. package/dist/CardView.css +39 -15
  76. package/dist/CardView.css.map +1 -1
  77. package/dist/CardView.mjs +49 -23
  78. package/dist/CardView.mjs.map +1 -1
  79. package/dist/CenterBaseline.cjs +1 -1
  80. package/dist/CenterBaseline.css +2 -2
  81. package/dist/CenterBaseline.mjs +1 -1
  82. package/dist/Checkbox.cjs +58 -62
  83. package/dist/Checkbox.cjs.map +1 -1
  84. package/dist/Checkbox.css +54 -54
  85. package/dist/Checkbox.css.map +1 -1
  86. package/dist/Checkbox.mjs +59 -63
  87. package/dist/Checkbox.mjs.map +1 -1
  88. package/dist/CheckboxGroup.cjs +43 -45
  89. package/dist/CheckboxGroup.cjs.map +1 -1
  90. package/dist/CheckboxGroup.css +32 -32
  91. package/dist/CheckboxGroup.css.map +1 -1
  92. package/dist/CheckboxGroup.mjs +44 -46
  93. package/dist/CheckboxGroup.mjs.map +1 -1
  94. package/dist/ClearButton.cjs +7 -8
  95. package/dist/ClearButton.cjs.map +1 -1
  96. package/dist/ClearButton.css +5 -5
  97. package/dist/ClearButton.css.map +1 -1
  98. package/dist/ClearButton.mjs +7 -8
  99. package/dist/ClearButton.mjs.map +1 -1
  100. package/dist/CloseButton.cjs +40 -53
  101. package/dist/CloseButton.cjs.map +1 -1
  102. package/dist/CloseButton.css +45 -49
  103. package/dist/CloseButton.css.map +1 -1
  104. package/dist/CloseButton.mjs +40 -53
  105. package/dist/CloseButton.mjs.map +1 -1
  106. package/dist/ColorArea.cjs +12 -15
  107. package/dist/ColorArea.cjs.map +1 -1
  108. package/dist/ColorArea.css +10 -10
  109. package/dist/ColorArea.css.map +1 -1
  110. package/dist/ColorArea.mjs +12 -15
  111. package/dist/ColorArea.mjs.map +1 -1
  112. package/dist/ColorField.cjs +31 -34
  113. package/dist/ColorField.cjs.map +1 -1
  114. package/dist/ColorField.css +24 -24
  115. package/dist/ColorField.css.map +1 -1
  116. package/dist/ColorField.mjs +32 -35
  117. package/dist/ColorField.mjs.map +1 -1
  118. package/dist/ColorHandle.cjs +11 -11
  119. package/dist/ColorHandle.css +19 -19
  120. package/dist/ColorHandle.mjs +11 -11
  121. package/dist/ColorSlider.cjs +43 -46
  122. package/dist/ColorSlider.cjs.map +1 -1
  123. package/dist/ColorSlider.css +43 -43
  124. package/dist/ColorSlider.css.map +1 -1
  125. package/dist/ColorSlider.mjs +44 -47
  126. package/dist/ColorSlider.mjs.map +1 -1
  127. package/dist/ColorSwatch.cjs +8 -11
  128. package/dist/ColorSwatch.cjs.map +1 -1
  129. package/dist/ColorSwatch.css +14 -14
  130. package/dist/ColorSwatch.css.map +1 -1
  131. package/dist/ColorSwatch.mjs +9 -12
  132. package/dist/ColorSwatch.mjs.map +1 -1
  133. package/dist/ColorSwatchPicker.cjs +15 -18
  134. package/dist/ColorSwatchPicker.cjs.map +1 -1
  135. package/dist/ColorSwatchPicker.css +33 -33
  136. package/dist/ColorSwatchPicker.css.map +1 -1
  137. package/dist/ColorSwatchPicker.mjs +15 -18
  138. package/dist/ColorSwatchPicker.mjs.map +1 -1
  139. package/dist/ColorWheel.cjs +18 -21
  140. package/dist/ColorWheel.cjs.map +1 -1
  141. package/dist/ColorWheel.css +15 -15
  142. package/dist/ColorWheel.css.map +1 -1
  143. package/dist/ColorWheel.mjs +18 -21
  144. package/dist/ColorWheel.mjs.map +1 -1
  145. package/dist/ComboBox.cjs +61 -61
  146. package/dist/ComboBox.cjs.map +1 -1
  147. package/dist/ComboBox.css +52 -52
  148. package/dist/ComboBox.css.map +1 -1
  149. package/dist/ComboBox.mjs +62 -62
  150. package/dist/ComboBox.mjs.map +1 -1
  151. package/dist/Content.cjs +12 -19
  152. package/dist/Content.cjs.map +1 -1
  153. package/dist/Content.mjs +12 -19
  154. package/dist/Content.mjs.map +1 -1
  155. package/dist/ContextualHelp.cjs +7 -10
  156. package/dist/ContextualHelp.cjs.map +1 -1
  157. package/dist/ContextualHelp.css +23 -23
  158. package/dist/ContextualHelp.css.map +1 -1
  159. package/dist/ContextualHelp.mjs +7 -10
  160. package/dist/ContextualHelp.mjs.map +1 -1
  161. package/dist/CustomDialog.cjs +10 -13
  162. package/dist/CustomDialog.cjs.map +1 -1
  163. package/dist/CustomDialog.css +9 -9
  164. package/dist/CustomDialog.css.map +1 -1
  165. package/dist/CustomDialog.mjs +10 -13
  166. package/dist/CustomDialog.mjs.map +1 -1
  167. package/dist/Dialog.cjs +12 -16
  168. package/dist/Dialog.cjs.map +1 -1
  169. package/dist/Dialog.css +39 -39
  170. package/dist/Dialog.css.map +1 -1
  171. package/dist/Dialog.mjs +12 -16
  172. package/dist/Dialog.mjs.map +1 -1
  173. package/dist/Disclosure.cjs +60 -69
  174. package/dist/Disclosure.cjs.map +1 -1
  175. package/dist/Disclosure.css +49 -49
  176. package/dist/Disclosure.css.map +1 -1
  177. package/dist/Disclosure.mjs +61 -70
  178. package/dist/Disclosure.mjs.map +1 -1
  179. package/dist/Divider.cjs +15 -19
  180. package/dist/Divider.cjs.map +1 -1
  181. package/dist/Divider.css +18 -18
  182. package/dist/Divider.css.map +1 -1
  183. package/dist/Divider.mjs +15 -19
  184. package/dist/Divider.mjs.map +1 -1
  185. package/dist/DropZone.cjs +30 -33
  186. package/dist/DropZone.cjs.map +1 -1
  187. package/dist/DropZone.css +26 -26
  188. package/dist/DropZone.css.map +1 -1
  189. package/dist/DropZone.mjs +30 -33
  190. package/dist/DropZone.mjs.map +1 -1
  191. package/dist/Field.cjs +133 -131
  192. package/dist/Field.cjs.map +1 -1
  193. package/dist/Field.css +76 -84
  194. package/dist/Field.css.map +1 -1
  195. package/dist/Field.mjs +133 -131
  196. package/dist/Field.mjs.map +1 -1
  197. package/dist/Form.cjs +6 -9
  198. package/dist/Form.cjs.map +1 -1
  199. package/dist/Form.css +3 -3
  200. package/dist/Form.css.map +1 -1
  201. package/dist/Form.mjs +6 -9
  202. package/dist/Form.mjs.map +1 -1
  203. package/dist/FullscreenDialog.cjs +7 -10
  204. package/dist/FullscreenDialog.cjs.map +1 -1
  205. package/dist/FullscreenDialog.css +54 -54
  206. package/dist/FullscreenDialog.css.map +1 -1
  207. package/dist/FullscreenDialog.mjs +7 -10
  208. package/dist/FullscreenDialog.mjs.map +1 -1
  209. package/dist/IllustratedMessage.cjs +128 -132
  210. package/dist/IllustratedMessage.cjs.map +1 -1
  211. package/dist/IllustratedMessage.css +58 -58
  212. package/dist/IllustratedMessage.css.map +1 -1
  213. package/dist/IllustratedMessage.mjs +128 -132
  214. package/dist/IllustratedMessage.mjs.map +1 -1
  215. package/dist/Image.cjs +12 -13
  216. package/dist/Image.cjs.map +1 -1
  217. package/dist/Image.css +11 -11
  218. package/dist/Image.css.map +1 -1
  219. package/dist/Image.mjs +13 -14
  220. package/dist/Image.mjs.map +1 -1
  221. package/dist/InlineAlert.cjs +75 -84
  222. package/dist/InlineAlert.cjs.map +1 -1
  223. package/dist/InlineAlert.css +59 -63
  224. package/dist/InlineAlert.css.map +1 -1
  225. package/dist/InlineAlert.mjs +76 -85
  226. package/dist/InlineAlert.mjs.map +1 -1
  227. package/dist/Link.cjs +36 -39
  228. package/dist/Link.cjs.map +1 -1
  229. package/dist/Link.css +42 -42
  230. package/dist/Link.css.map +1 -1
  231. package/dist/Link.mjs +37 -40
  232. package/dist/Link.mjs.map +1 -1
  233. package/dist/Menu.cjs +322 -234
  234. package/dist/Menu.cjs.map +1 -1
  235. package/dist/Menu.css +118 -116
  236. package/dist/Menu.css.map +1 -1
  237. package/dist/Menu.mjs +323 -235
  238. package/dist/Menu.mjs.map +1 -1
  239. package/dist/Meter.cjs +66 -70
  240. package/dist/Meter.cjs.map +1 -1
  241. package/dist/Meter.css +69 -73
  242. package/dist/Meter.css.map +1 -1
  243. package/dist/Meter.mjs +66 -70
  244. package/dist/Meter.mjs.map +1 -1
  245. package/dist/Modal.cjs +36 -45
  246. package/dist/Modal.cjs.map +1 -1
  247. package/dist/Modal.css +48 -72
  248. package/dist/Modal.css.map +1 -1
  249. package/dist/Modal.mjs +37 -46
  250. package/dist/Modal.mjs.map +1 -1
  251. package/dist/NumberField.cjs +66 -69
  252. package/dist/NumberField.cjs.map +1 -1
  253. package/dist/NumberField.css +70 -70
  254. package/dist/NumberField.css.map +1 -1
  255. package/dist/NumberField.mjs +67 -70
  256. package/dist/NumberField.mjs.map +1 -1
  257. package/dist/Picker.cjs +122 -122
  258. package/dist/Picker.cjs.map +1 -1
  259. package/dist/Picker.css +84 -84
  260. package/dist/Picker.css.map +1 -1
  261. package/dist/Picker.mjs +123 -123
  262. package/dist/Picker.mjs.map +1 -1
  263. package/dist/Popover.cjs +47 -69
  264. package/dist/Popover.cjs.map +1 -1
  265. package/dist/Popover.css +55 -126
  266. package/dist/Popover.css.map +1 -1
  267. package/dist/Popover.mjs +48 -70
  268. package/dist/Popover.mjs.map +1 -1
  269. package/dist/ProgressBar.cjs +85 -87
  270. package/dist/ProgressBar.cjs.map +1 -1
  271. package/dist/ProgressBar.css +81 -85
  272. package/dist/ProgressBar.css.map +1 -1
  273. package/dist/ProgressBar.mjs +85 -87
  274. package/dist/ProgressBar.mjs.map +1 -1
  275. package/dist/ProgressCircle.cjs +16 -18
  276. package/dist/ProgressCircle.cjs.map +1 -1
  277. package/dist/ProgressCircle.css +16 -16
  278. package/dist/ProgressCircle.css.map +1 -1
  279. package/dist/ProgressCircle.mjs +16 -18
  280. package/dist/ProgressCircle.mjs.map +1 -1
  281. package/dist/Provider.cjs +5 -5
  282. package/dist/Provider.css +6 -6
  283. package/dist/Provider.mjs +5 -5
  284. package/dist/Radio.cjs +54 -58
  285. package/dist/Radio.cjs.map +1 -1
  286. package/dist/Radio.css +50 -50
  287. package/dist/Radio.css.map +1 -1
  288. package/dist/Radio.mjs +55 -59
  289. package/dist/Radio.mjs.map +1 -1
  290. package/dist/RadioGroup.cjs +39 -43
  291. package/dist/RadioGroup.cjs.map +1 -1
  292. package/dist/RadioGroup.css +32 -32
  293. package/dist/RadioGroup.css.map +1 -1
  294. package/dist/RadioGroup.mjs +40 -44
  295. package/dist/RadioGroup.mjs.map +1 -1
  296. package/dist/RangeSlider.cjs +2 -3
  297. package/dist/RangeSlider.cjs.map +1 -1
  298. package/dist/RangeSlider.mjs +3 -4
  299. package/dist/RangeSlider.mjs.map +1 -1
  300. package/dist/SearchField.cjs +34 -37
  301. package/dist/SearchField.cjs.map +1 -1
  302. package/dist/SearchField.css +30 -30
  303. package/dist/SearchField.css.map +1 -1
  304. package/dist/SearchField.mjs +35 -38
  305. package/dist/SearchField.mjs.map +1 -1
  306. package/dist/SegmentedControl.cjs +67 -73
  307. package/dist/SegmentedControl.cjs.map +1 -1
  308. package/dist/SegmentedControl.css +63 -63
  309. package/dist/SegmentedControl.css.map +1 -1
  310. package/dist/SegmentedControl.mjs +68 -74
  311. package/dist/SegmentedControl.mjs.map +1 -1
  312. package/dist/Slider.cjs +111 -112
  313. package/dist/Slider.cjs.map +1 -1
  314. package/dist/Slider.css +87 -87
  315. package/dist/Slider.css.map +1 -1
  316. package/dist/Slider.mjs +112 -113
  317. package/dist/Slider.mjs.map +1 -1
  318. package/dist/StatusLight.cjs +28 -32
  319. package/dist/StatusLight.cjs.map +1 -1
  320. package/dist/StatusLight.css +26 -26
  321. package/dist/StatusLight.css.map +1 -1
  322. package/dist/StatusLight.mjs +28 -32
  323. package/dist/StatusLight.mjs.map +1 -1
  324. package/dist/Switch.cjs +56 -60
  325. package/dist/Switch.cjs.map +1 -1
  326. package/dist/Switch.css +48 -48
  327. package/dist/Switch.css.map +1 -1
  328. package/dist/Switch.mjs +57 -61
  329. package/dist/Switch.mjs.map +1 -1
  330. package/dist/TableView.cjs +209 -196
  331. package/dist/TableView.cjs.map +1 -1
  332. package/dist/TableView.css +95 -95
  333. package/dist/TableView.css.map +1 -1
  334. package/dist/TableView.mjs +211 -198
  335. package/dist/TableView.mjs.map +1 -1
  336. package/dist/Tabs.cjs +59 -62
  337. package/dist/Tabs.cjs.map +1 -1
  338. package/dist/Tabs.css +42 -42
  339. package/dist/Tabs.css.map +1 -1
  340. package/dist/Tabs.mjs +59 -62
  341. package/dist/Tabs.mjs.map +1 -1
  342. package/dist/TagGroup.cjs +122 -124
  343. package/dist/TagGroup.cjs.map +1 -1
  344. package/dist/TagGroup.css +93 -93
  345. package/dist/TagGroup.css.map +1 -1
  346. package/dist/TagGroup.mjs +122 -124
  347. package/dist/TagGroup.mjs.map +1 -1
  348. package/dist/TextField.cjs +44 -55
  349. package/dist/TextField.cjs.map +1 -1
  350. package/dist/TextField.css +33 -33
  351. package/dist/TextField.css.map +1 -1
  352. package/dist/TextField.mjs +45 -56
  353. package/dist/TextField.mjs.map +1 -1
  354. package/dist/ToggleButton.cjs +6 -9
  355. package/dist/ToggleButton.cjs.map +1 -1
  356. package/dist/ToggleButton.css +7 -7
  357. package/dist/ToggleButton.css.map +1 -1
  358. package/dist/ToggleButton.mjs +6 -9
  359. package/dist/ToggleButton.mjs.map +1 -1
  360. package/dist/ToggleButtonGroup.cjs +2 -5
  361. package/dist/ToggleButtonGroup.cjs.map +1 -1
  362. package/dist/ToggleButtonGroup.mjs +2 -5
  363. package/dist/ToggleButtonGroup.mjs.map +1 -1
  364. package/dist/Tooltip.cjs +48 -48
  365. package/dist/Tooltip.cjs.map +1 -1
  366. package/dist/Tooltip.css +55 -70
  367. package/dist/Tooltip.css.map +1 -1
  368. package/dist/Tooltip.mjs +49 -49
  369. package/dist/Tooltip.mjs.map +1 -1
  370. package/dist/ar-AE.cjs +10 -2
  371. package/dist/ar-AE.cjs.map +1 -1
  372. package/dist/ar-AE.mjs +10 -2
  373. package/dist/ar-AE.mjs.map +1 -1
  374. package/dist/bg-BG.cjs +11 -2
  375. package/dist/bg-BG.cjs.map +1 -1
  376. package/dist/bg-BG.mjs +11 -2
  377. package/dist/bg-BG.mjs.map +1 -1
  378. package/dist/cs-CZ.cjs +7 -2
  379. package/dist/cs-CZ.cjs.map +1 -1
  380. package/dist/cs-CZ.mjs +7 -2
  381. package/dist/cs-CZ.mjs.map +1 -1
  382. package/dist/da-DK.cjs +12 -4
  383. package/dist/da-DK.cjs.map +1 -1
  384. package/dist/da-DK.mjs +12 -4
  385. package/dist/da-DK.mjs.map +1 -1
  386. package/dist/de-DE.cjs +11 -2
  387. package/dist/de-DE.cjs.map +1 -1
  388. package/dist/de-DE.mjs +11 -2
  389. package/dist/de-DE.mjs.map +1 -1
  390. package/dist/el-GR.cjs +11 -2
  391. package/dist/el-GR.cjs.map +1 -1
  392. package/dist/el-GR.mjs +11 -2
  393. package/dist/el-GR.mjs.map +1 -1
  394. package/dist/en-US.cjs +8 -0
  395. package/dist/en-US.cjs.map +1 -1
  396. package/dist/en-US.mjs +8 -0
  397. package/dist/en-US.mjs.map +1 -1
  398. package/dist/es-ES.cjs +11 -2
  399. package/dist/es-ES.cjs.map +1 -1
  400. package/dist/es-ES.mjs +11 -2
  401. package/dist/es-ES.mjs.map +1 -1
  402. package/dist/et-EE.cjs +10 -2
  403. package/dist/et-EE.cjs.map +1 -1
  404. package/dist/et-EE.mjs +10 -2
  405. package/dist/et-EE.mjs.map +1 -1
  406. package/dist/fi-FI.cjs +10 -2
  407. package/dist/fi-FI.cjs.map +1 -1
  408. package/dist/fi-FI.mjs +10 -2
  409. package/dist/fi-FI.mjs.map +1 -1
  410. package/dist/fr-FR.cjs +11 -2
  411. package/dist/fr-FR.cjs.map +1 -1
  412. package/dist/fr-FR.mjs +11 -2
  413. package/dist/fr-FR.mjs.map +1 -1
  414. package/dist/he-IL.cjs +11 -2
  415. package/dist/he-IL.cjs.map +1 -1
  416. package/dist/he-IL.mjs +11 -2
  417. package/dist/he-IL.mjs.map +1 -1
  418. package/dist/hr-HR.cjs +7 -2
  419. package/dist/hr-HR.cjs.map +1 -1
  420. package/dist/hr-HR.mjs +7 -2
  421. package/dist/hr-HR.mjs.map +1 -1
  422. package/dist/hu-HU.cjs +10 -2
  423. package/dist/hu-HU.cjs.map +1 -1
  424. package/dist/hu-HU.mjs +10 -2
  425. package/dist/hu-HU.mjs.map +1 -1
  426. package/dist/it-IT.cjs +11 -2
  427. package/dist/it-IT.cjs.map +1 -1
  428. package/dist/it-IT.mjs +11 -2
  429. package/dist/it-IT.mjs.map +1 -1
  430. package/dist/ja-JP.cjs +10 -2
  431. package/dist/ja-JP.cjs.map +1 -1
  432. package/dist/ja-JP.mjs +10 -2
  433. package/dist/ja-JP.mjs.map +1 -1
  434. package/dist/ko-KR.cjs +12 -4
  435. package/dist/ko-KR.cjs.map +1 -1
  436. package/dist/ko-KR.mjs +12 -4
  437. package/dist/ko-KR.mjs.map +1 -1
  438. package/dist/lt-LT.cjs +9 -4
  439. package/dist/lt-LT.cjs.map +1 -1
  440. package/dist/lt-LT.mjs +9 -4
  441. package/dist/lt-LT.mjs.map +1 -1
  442. package/dist/lv-LV.cjs +11 -3
  443. package/dist/lv-LV.cjs.map +1 -1
  444. package/dist/lv-LV.mjs +11 -3
  445. package/dist/lv-LV.mjs.map +1 -1
  446. package/dist/main.cjs +4 -0
  447. package/dist/main.cjs.map +1 -1
  448. package/dist/module.mjs +3 -1
  449. package/dist/module.mjs.map +1 -1
  450. package/dist/nb-NO.cjs +9 -4
  451. package/dist/nb-NO.cjs.map +1 -1
  452. package/dist/nb-NO.mjs +9 -4
  453. package/dist/nb-NO.mjs.map +1 -1
  454. package/dist/nl-NL.cjs +10 -2
  455. package/dist/nl-NL.cjs.map +1 -1
  456. package/dist/nl-NL.mjs +10 -2
  457. package/dist/nl-NL.mjs.map +1 -1
  458. package/dist/pl-PL.cjs +8 -3
  459. package/dist/pl-PL.cjs.map +1 -1
  460. package/dist/pl-PL.mjs +8 -3
  461. package/dist/pl-PL.mjs.map +1 -1
  462. package/dist/pt-BR.cjs +11 -2
  463. package/dist/pt-BR.cjs.map +1 -1
  464. package/dist/pt-BR.mjs +11 -2
  465. package/dist/pt-BR.mjs.map +1 -1
  466. package/dist/pt-PT.cjs +11 -2
  467. package/dist/pt-PT.cjs.map +1 -1
  468. package/dist/pt-PT.mjs +11 -2
  469. package/dist/pt-PT.mjs.map +1 -1
  470. package/dist/ro-RO.cjs +12 -3
  471. package/dist/ro-RO.cjs.map +1 -1
  472. package/dist/ro-RO.mjs +12 -3
  473. package/dist/ro-RO.mjs.map +1 -1
  474. package/dist/ru-RU.cjs +7 -2
  475. package/dist/ru-RU.cjs.map +1 -1
  476. package/dist/ru-RU.mjs +7 -2
  477. package/dist/ru-RU.mjs.map +1 -1
  478. package/dist/sk-SK.cjs +7 -2
  479. package/dist/sk-SK.cjs.map +1 -1
  480. package/dist/sk-SK.mjs +7 -2
  481. package/dist/sk-SK.mjs.map +1 -1
  482. package/dist/sl-SI.cjs +7 -2
  483. package/dist/sl-SI.cjs.map +1 -1
  484. package/dist/sl-SI.mjs +7 -2
  485. package/dist/sl-SI.mjs.map +1 -1
  486. package/dist/sr-SP.cjs +7 -2
  487. package/dist/sr-SP.cjs.map +1 -1
  488. package/dist/sr-SP.mjs +7 -2
  489. package/dist/sr-SP.mjs.map +1 -1
  490. package/dist/sv-SE.cjs +11 -2
  491. package/dist/sv-SE.cjs.map +1 -1
  492. package/dist/sv-SE.mjs +11 -2
  493. package/dist/sv-SE.mjs.map +1 -1
  494. package/dist/tr-TR.cjs +10 -2
  495. package/dist/tr-TR.cjs.map +1 -1
  496. package/dist/tr-TR.mjs +10 -2
  497. package/dist/tr-TR.mjs.map +1 -1
  498. package/dist/types.d.ts +109 -89
  499. package/dist/types.d.ts.map +1 -1
  500. package/dist/uk-UA.cjs +7 -2
  501. package/dist/uk-UA.cjs.map +1 -1
  502. package/dist/uk-UA.mjs +7 -2
  503. package/dist/uk-UA.mjs.map +1 -1
  504. package/dist/zh-CN.cjs +10 -2
  505. package/dist/zh-CN.cjs.map +1 -1
  506. package/dist/zh-CN.mjs +10 -2
  507. package/dist/zh-CN.mjs.map +1 -1
  508. package/dist/zh-TW.cjs +10 -2
  509. package/dist/zh-TW.cjs.map +1 -1
  510. package/dist/zh-TW.mjs +10 -2
  511. package/dist/zh-TW.mjs.map +1 -1
  512. package/icons/Skeleton.cjs +2 -2
  513. package/icons/Skeleton.css +5 -5
  514. package/icons/Skeleton.mjs +2 -2
  515. package/package.json +20 -21
  516. package/src/Accordion.tsx +5 -8
  517. package/src/ActionBar.tsx +229 -0
  518. package/src/ActionButton.tsx +25 -52
  519. package/src/ActionButtonGroup.tsx +9 -11
  520. package/src/ActionMenu.tsx +5 -8
  521. package/src/AlertDialog.tsx +5 -8
  522. package/src/Avatar.tsx +5 -8
  523. package/src/AvatarGroup.tsx +5 -8
  524. package/src/Badge.tsx +5 -8
  525. package/src/Breadcrumbs.tsx +6 -12
  526. package/src/Button.tsx +197 -154
  527. package/src/ButtonGroup.tsx +5 -8
  528. package/src/CardView.tsx +37 -12
  529. package/src/Checkbox.tsx +6 -9
  530. package/src/CheckboxGroup.tsx +6 -9
  531. package/src/ClearButton.tsx +2 -5
  532. package/src/CloseButton.tsx +21 -31
  533. package/src/ColorArea.tsx +5 -8
  534. package/src/ColorField.tsx +5 -8
  535. package/src/ColorSlider.tsx +5 -8
  536. package/src/ColorSwatch.tsx +5 -8
  537. package/src/ColorSwatchPicker.tsx +5 -8
  538. package/src/ColorWheel.tsx +5 -8
  539. package/src/ComboBox.tsx +7 -9
  540. package/src/Content.tsx +12 -30
  541. package/src/ContextualHelp.tsx +5 -8
  542. package/src/CustomDialog.tsx +5 -8
  543. package/src/Dialog.tsx +6 -9
  544. package/src/Disclosure.tsx +15 -24
  545. package/src/Divider.tsx +16 -25
  546. package/src/DropZone.tsx +5 -8
  547. package/src/Field.tsx +25 -32
  548. package/src/Form.tsx +5 -8
  549. package/src/FullscreenDialog.tsx +5 -8
  550. package/src/IllustratedMessage.tsx +6 -9
  551. package/src/Image.tsx +3 -6
  552. package/src/InlineAlert.tsx +6 -10
  553. package/src/Link.tsx +13 -21
  554. package/src/Menu.tsx +69 -33
  555. package/src/Meter.tsx +13 -23
  556. package/src/Modal.tsx +22 -52
  557. package/src/NumberField.tsx +5 -8
  558. package/src/Picker.tsx +7 -9
  559. package/src/Popover.tsx +30 -104
  560. package/src/ProgressBar.tsx +14 -24
  561. package/src/ProgressCircle.tsx +18 -24
  562. package/src/Radio.tsx +6 -9
  563. package/src/RadioGroup.tsx +6 -9
  564. package/src/RangeSlider.tsx +2 -5
  565. package/src/SearchField.tsx +5 -8
  566. package/src/SegmentedControl.tsx +10 -16
  567. package/src/Slider.tsx +2 -5
  568. package/src/StatusLight.tsx +6 -9
  569. package/src/Switch.tsx +6 -9
  570. package/src/TableView.tsx +53 -50
  571. package/src/Tabs.tsx +5 -8
  572. package/src/TagGroup.tsx +7 -14
  573. package/src/TextField.tsx +20 -28
  574. package/src/ToggleButton.tsx +7 -9
  575. package/src/ToggleButtonGroup.tsx +5 -8
  576. package/src/Tooltip.tsx +30 -51
  577. package/src/bar-utils.ts +3 -10
  578. package/src/index.ts +2 -0
  579. package/src/style-utils.ts +15 -8
  580. package/style/dist/main.cjs +1 -0
  581. package/style/dist/main.cjs.map +1 -1
  582. package/style/dist/module.mjs +2 -2
  583. package/style/dist/module.mjs.map +1 -1
  584. package/style/dist/spectrum-theme.cjs +72 -5
  585. package/style/dist/spectrum-theme.cjs.map +1 -1
  586. package/style/dist/spectrum-theme.mjs +72 -6
  587. package/style/dist/spectrum-theme.mjs.map +1 -1
  588. package/style/dist/style-macro.cjs +13 -1
  589. package/style/dist/style-macro.cjs.map +1 -1
  590. package/style/dist/style-macro.mjs +13 -1
  591. package/style/dist/style-macro.mjs.map +1 -1
  592. package/style/dist/types.d.ts +50 -29
  593. package/style/dist/types.d.ts.map +1 -1
  594. package/style/index.ts +1 -1
  595. package/style/spectrum-theme.ts +72 -7
  596. package/style/style-macro.ts +20 -4
  597. package/style/tokens.ts +30 -0
  598. package/style/types.ts +1 -1
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA+D;AAE7G,SAAS,kCAAY,KAAuB,EAAE,GAA2B;IACvE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,gBAAQ,EAAE;IAC7B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAEvB,qBACE,gBAAC,CAAA,GAAA,kBAAc;QACZ,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,8EAA8E;QAC9E,cAAY,KAAK,CAAC,aAAa,IAAK,CAAA,MAAM,WAAW,KAAK,aAAa,MAAM,KAAK,GAAG,SAAQ;QAC7F,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;cAuBnB,aAAa;kBACtC,CAAC,cAAC,UAAU,eAAE,WAAW,SAAE,KAAK,EAAC,iBAAM;;oBACrC,gBAAgB,gBAAiB,CAAA,MAAM,KAAK,IAAK,MAAM,KAAK,KAAK,aAAa,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAC9H,mEAAmE;oBACnE,qDAAqD;oBACrD,8FAA8F;oBAC9F,mEAAmE;kCACnE,gBAAC,CAAA,GAAA,yCAAS;wBAAE,YAAY;wBAAY,gBAAgB,MAAM,cAAc;kCACrE,MAAM,KAAK,IAAI,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;;oBAG7D,gBAAgB,8BACf,gBAAC,CAAA,GAAA,mBAAW;wBACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAUJ,gBAAC,CAAA,GAAA,kBAAU;wBACT,KAAK;wBACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gCACtC,YAAY,aAAa,YAAY,GAAG,aAAa,UAAU,CAAC,wEAAwE,CAAC;4BAC3I,CAAA;wBACA;;;;;;;;;;;;;;;;;;;;;;;kCA6BA,cAAA,gBAAC,CAAA,GAAA,yCAAU;4BACT,cAAc;4BACd,aAAa;gCACX,IAAI,IAAI,MAAM,WAAW,KAAK,eAAe,MAAM,eAAe,CAAC,KAAK;gCACxE,IAAI,IAAI,MAAM,WAAW,KAAK,eAAe,MAAM,IAAI,MAAM,eAAe,CAAC;gCAC7E,OAAO;uCAAC;uCAAG;gCAAC;4BACd;;;;;;AAKZ;AAEA;;CAEC,GACD,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorSlider.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 {\n ColorSlider as AriaColorSlider,\n ColorSliderProps as AriaColorSliderProps,\n ContextValue,\n SliderOutput,\n SliderTrack,\n useLocale\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef, useRef} from 'react';\nimport {DOMRef, DOMRefValue, SpectrumLabelableProps} from '@react-types/shared';\nimport {FieldLabel} from './Field';\nimport {getAllowedOverrides, 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\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'children' | 'className' | 'style'>, Pick<SpectrumLabelableProps, 'contextualHelp'>, StyleProps {\n label?: string\n}\n\nexport const ColorSliderContext = createContext<ContextValue<ColorSliderProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction ColorSlider(props: ColorSliderProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSliderContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n let trackRef = useRef(null);\n let {locale} = useLocale();\n\n return (\n <AriaColorSlider\n {...props}\n ref={containerRef}\n style={UNSAFE_style}\n // The visual label is hidden when vertical, so make it an aria-label instead.\n aria-label={props['aria-label'] || (props.orientation === 'vertical' ? props.label : undefined)}\n className={renderProps => UNSAFE_className + style({\n width: {\n orientation: {\n horizontal: 192\n }\n },\n height: {\n orientation: {\n vertical: 192\n }\n },\n display: {\n orientation: {\n horizontal: 'grid',\n vertical: 'block'\n }\n },\n gridTemplateColumns: ['1fr', 'auto'],\n gridTemplateAreas: [\n 'label output',\n 'track track'\n ],\n rowGap: 4\n }, getAllowedOverrides())(renderProps, styles)}>\n {({isDisabled, orientation, state}) => (<>\n {orientation === 'horizontal' && (props.label || (props.label === undefined && !props['aria-label'] && !props['aria-labelledby'])) && (\n // If no external label, aria-label or aria-labelledby is provided,\n // default to displaying the localized channel value.\n // Specifically check if label is undefined. If label is `null` then display no visible label.\n // A default aria-label is provided by useColorSlider in that case.\n <FieldLabel isDisabled={isDisabled} contextualHelp={props.contextualHelp}>\n {props.label || state.value.getChannelName(props.channel, locale)}\n </FieldLabel>\n )}\n {orientation === 'horizontal' &&\n <SliderOutput\n className={style({\n gridArea: 'output',\n font: 'control',\n cursor: 'default',\n color: {\n default: 'neutral-subdued',\n isDisabled: 'disabled'\n }\n })} />\n }\n <SliderTrack\n ref={trackRef}\n style={({defaultStyle, isDisabled}) => ({\n background: isDisabled ? undefined : `${defaultStyle.background}, repeating-conic-gradient(#E1E1E1 0% 25%, white 0% 50%) 50% / 16px 16px`\n })}\n className={style({\n gridArea: 'track',\n width: {\n orientation: {\n horizontal: 'full',\n vertical: 24\n }\n },\n height: {\n orientation: {\n horizontal: 24,\n vertical: 'full'\n }\n },\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n })}>\n <ColorHandle\n containerRef={trackRef}\n getPosition={() => {\n let x = state.orientation === 'horizontal' ? state.getThumbPercent(0) : 0.5;\n let y = state.orientation === 'horizontal' ? 0.5 : 1 - state.getThumbPercent(0);\n return {x, y};\n }} />\n </SliderTrack>\n </>)}\n </AriaColorSlider>\n );\n}\n\n/**\n * A ColorSlider allows users to adjust an individual channel of a color value.\n */\nlet _ColorSlider = forwardRef(ColorSlider);\nexport {_ColorSlider as ColorSlider};\n"],"names":[],"version":3,"file":"ColorSlider.mjs.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA+D;AAKtG,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAA2B;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,gBAAQ,EAAE;IAC7B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAEvB,qBACE,gBAAC,CAAA,GAAA,kBAAc;QACZ,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,8EAA8E;QAC9E,cAAY,KAAK,CAAC,aAAa,IAAK,CAAA,MAAM,WAAW,KAAK,aAAa,MAAM,KAAK,GAAG,SAAQ;QAC7F,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;cAuBnB,aAAa;kBACtC,CAAC,cAAC,UAAU,eAAE,WAAW,SAAE,KAAK,EAAC,iBAAM;;oBACrC,gBAAgB,gBAAiB,CAAA,MAAM,KAAK,IAAK,MAAM,KAAK,KAAK,aAAa,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAC9H,mEAAmE;oBACnE,qDAAqD;oBACrD,8FAA8F;oBAC9F,mEAAmE;kCACnE,gBAAC,CAAA,GAAA,yCAAS;wBAAE,YAAY;wBAAY,gBAAgB,MAAM,cAAc;kCACrE,MAAM,KAAK,IAAI,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,OAAO,EAAE;;oBAG7D,gBAAgB,8BACf,gBAAC,CAAA,GAAA,mBAAW;wBACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAUJ,gBAAC,CAAA,GAAA,kBAAU;wBACT,KAAK;wBACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gCACtC,YAAY,aAAa,YAAY,GAAG,aAAa,UAAU,CAAC,wEAAwE,CAAC;4BAC3I,CAAA;wBACA;;;;;;;;;;;;;;;;;;;;;;;kCA6BA,cAAA,gBAAC,CAAA,GAAA,yCAAU;4BACT,cAAc;4BACd,aAAa;gCACX,IAAI,IAAI,MAAM,WAAW,KAAK,eAAe,MAAM,eAAe,CAAC,KAAK;gCACxE,IAAI,IAAI,MAAM,WAAW,KAAK,eAAe,MAAM,IAAI,MAAM,eAAe,CAAC;gCAC7E,OAAO;uCAAC;uCAAG;gCAAC;4BACd;;;;;;AAKZ","sources":["packages/@react-spectrum/s2/src/ColorSlider.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 {\n ColorSlider as AriaColorSlider,\n ColorSliderProps as AriaColorSliderProps,\n ContextValue,\n SliderOutput,\n SliderTrack,\n useLocale\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef, useRef} from 'react';\nimport {DOMRef, DOMRefValue, SpectrumLabelableProps} from '@react-types/shared';\nimport {FieldLabel} from './Field';\nimport {getAllowedOverrides, 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\nexport interface ColorSliderProps extends Omit<AriaColorSliderProps, 'children' | 'className' | 'style'>, Pick<SpectrumLabelableProps, 'contextualHelp'>, StyleProps {\n label?: string\n}\n\nexport const ColorSliderContext = createContext<ContextValue<ColorSliderProps, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorSlider allows users to adjust an individual channel of a color value.\n */\nexport const ColorSlider = forwardRef(function ColorSlider(props: ColorSliderProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSliderContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n let trackRef = useRef(null);\n let {locale} = useLocale();\n\n return (\n <AriaColorSlider\n {...props}\n ref={containerRef}\n style={UNSAFE_style}\n // The visual label is hidden when vertical, so make it an aria-label instead.\n aria-label={props['aria-label'] || (props.orientation === 'vertical' ? props.label : undefined)}\n className={renderProps => UNSAFE_className + style({\n width: {\n orientation: {\n horizontal: 192\n }\n },\n height: {\n orientation: {\n vertical: 192\n }\n },\n display: {\n orientation: {\n horizontal: 'grid',\n vertical: 'block'\n }\n },\n gridTemplateColumns: ['1fr', 'auto'],\n gridTemplateAreas: [\n 'label output',\n 'track track'\n ],\n rowGap: 4\n }, getAllowedOverrides())(renderProps, styles)}>\n {({isDisabled, orientation, state}) => (<>\n {orientation === 'horizontal' && (props.label || (props.label === undefined && !props['aria-label'] && !props['aria-labelledby'])) && (\n // If no external label, aria-label or aria-labelledby is provided,\n // default to displaying the localized channel value.\n // Specifically check if label is undefined. If label is `null` then display no visible label.\n // A default aria-label is provided by useColorSlider in that case.\n <FieldLabel isDisabled={isDisabled} contextualHelp={props.contextualHelp}>\n {props.label || state.value.getChannelName(props.channel, locale)}\n </FieldLabel>\n )}\n {orientation === 'horizontal' &&\n <SliderOutput\n className={style({\n gridArea: 'output',\n font: 'control',\n cursor: 'default',\n color: {\n default: 'neutral-subdued',\n isDisabled: 'disabled'\n }\n })} />\n }\n <SliderTrack\n ref={trackRef}\n style={({defaultStyle, isDisabled}) => ({\n background: isDisabled ? undefined : `${defaultStyle.background}, repeating-conic-gradient(#E1E1E1 0% 25%, white 0% 50%) 50% / 16px 16px`\n })}\n className={style({\n gridArea: 'track',\n width: {\n orientation: {\n horizontal: 'full',\n vertical: 24\n }\n },\n height: {\n orientation: {\n horizontal: 24,\n vertical: 'full'\n }\n },\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n })}>\n <ColorHandle\n containerRef={trackRef}\n getPosition={() => {\n let x = state.orientation === 'horizontal' ? state.getThumbPercent(0) : 0.5;\n let y = state.orientation === 'horizontal' ? 0.5 : 1 - state.getThumbPercent(0);\n return {x, y};\n }} />\n </SliderTrack>\n </>)}\n </AriaColorSlider>\n );\n});\n"],"names":[],"version":3,"file":"ColorSlider.mjs.map"}
@@ -30,7 +30,7 @@ $parcel$export(module.exports, "ColorSwatch", () => $8b1ea085cefae738$export$cae
30
30
 
31
31
  const $8b1ea085cefae738$export$83cc445538396800 = /*#__PURE__*/ (0, $7Qhsa$react.createContext)(null);
32
32
  const $8b1ea085cefae738$export$2d9e1fe7b5c0ceb6 = /*#__PURE__*/ (0, $7Qhsa$react.createContext)(null);
33
- function $8b1ea085cefae738$var$ColorSwatch(props, ref) {
33
+ const $8b1ea085cefae738$export$cae13e90592f246a = /*#__PURE__*/ (0, $7Qhsa$react.forwardRef)(function ColorSwatch(props, ref) {
34
34
  [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $8b1ea085cefae738$export$83cc445538396800);
35
35
  let domRef = (0, $7Qhsa$reactspectrumutils.useDOMRef)(ref);
36
36
  let ctx = (0, $7Qhsa$react.useContext)($8b1ea085cefae738$export$2d9e1fe7b5c0ceb6);
@@ -49,7 +49,7 @@ function $8b1ea085cefae738$var$ColorSwatch(props, ref) {
49
49
  }),
50
50
  className: function anonymous(props, overrides) {
51
51
  let rules = " .";
52
- let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W|l|q|r|k|o|p)[^\s]+/g) || [];
52
+ let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r|k|o|p)[^\s]+/g) || [];
53
53
  rules += matches.join('');
54
54
  let $l = false;
55
55
  let $k = false;
@@ -69,9 +69,6 @@ function $8b1ea085cefae738$var$ColorSwatch(props, ref) {
69
69
  else if (props.size === "S") rules += ' kM';
70
70
  else if (props.size === "XS") rules += ' kE';
71
71
  }
72
- if (props.rounding === "full") rules += ' _vf';
73
- else if (props.rounding === "none") rules += ' _va';
74
- else if (props.rounding === "default") rules += ' _vb';
75
72
  if (props.rounding === "full") rules += ' _wf';
76
73
  else if (props.rounding === "none") rules += ' _wa';
77
74
  else if (props.rounding === "default") rules += ' _wb';
@@ -81,14 +78,17 @@ function $8b1ea085cefae738$var$ColorSwatch(props, ref) {
81
78
  if (props.rounding === "full") rules += ' _yf';
82
79
  else if (props.rounding === "none") rules += ' _ya';
83
80
  else if (props.rounding === "default") rules += ' _yb';
81
+ if (props.rounding === "full") rules += ' _zf';
82
+ else if (props.rounding === "none") rules += ' _za';
83
+ else if (props.rounding === "default") rules += ' _zb';
84
84
  rules += ' cp42';
85
85
  rules += ' ub';
86
86
  rules += ' vb';
87
87
  rules += ' sb';
88
88
  rules += ' tb';
89
89
  rules += ' wa';
90
- rules += ' __na';
91
- rules += ' _zb';
90
+ rules += ' __oa';
91
+ rules += ' _Ab';
92
92
  rules += ' -_14u0212_a-O';
93
93
  return rules;
94
94
  }({
@@ -99,10 +99,7 @@ function $8b1ea085cefae738$var$ColorSwatch(props, ref) {
99
99
  // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem.
100
100
  if (ctx) return ctx.useWrapper(swatch, color, rounding);
101
101
  return swatch;
102
- }
103
- /**
104
- * A ColorSwatch displays a preview of a selected color.
105
- */ let $8b1ea085cefae738$export$cae13e90592f246a = /*#__PURE__*/ (0, $7Qhsa$react.forwardRef)($8b1ea085cefae738$var$ColorSwatch);
102
+ });
106
103
 
107
104
 
108
105
  //# sourceMappingURL=ColorSwatch.cjs.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAmCM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA+D;AACtG,MAAM,0DAA6B,CAAA,GAAA,0BAAY,EAA0C;AAEhG,SAAS,kCAAY,KAAuB,EAAE,GAA2B;IACvE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,IAAI,QACF,OAAO,KAAK,QAAQ,eACpB,WAAW,KAAK,YAAY,kBAC5B,KAAK,EACN,GAAG;IACJ,IAAI,eAAe,SAAS;IAC5B,QAAQ,CAAA,GAAA,oBAAM,EAAE,IAAM,OAAO,iBAAiB,WAAW,CAAA,GAAA,qCAAS,EAAE,gBAAgB,cAAc;QAAC;KAAa;IAEhH,IAAI,uBACF,gCAAC,CAAA,GAAA,sCAAc;QACZ,GAAG,KAAK;QACT,OAAO;QACP,KAAK;QACL,OAAO,CAAC,SAAC,KAAK,EAAC,GAAM,CAAA;gBACnB,oFAAoF;gBACpF,YAAY,MAAM,eAAe,CAAC,WAAW,IACzC,CAAC,gBAAgB,EAAE,MAAM,EAAE,EAAE,MAAM,4EAA4E,CAAC,GAEhH;YACN,CAAA;QACA,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAyB6B;kBAAC;sBAAM;QAAQ,GAAG,MAAM,MAAM;;IAG1E,+DAA+D;IAC/D,IAAI,KACF,OAAO,IAAI,UAAU,CAAC,QAAQ,OAAO;IAGvC,OAAO;AACT;AAEA;;CAEC,GACD,IAAI,0DAAe,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorSwatch.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 {\n ColorSwatch as AriaColorSwatch,\n ColorSwatchProps as AriaColorSwatchProps,\n ContextValue,\n parseColor\n} from 'react-aria-components';\nimport {Color} from '@react-types/color';\nimport {createContext, forwardRef, JSX, ReactElement, useContext, useMemo} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorSwatchProps extends Omit<AriaColorSwatchProps, 'className' | 'style'>, UnsafeStyles {\n /**\n * The size of the ColorSwatch.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the ColorSwatch.\n * @default 'default'\n */\n rounding?: 'default' | 'none' | 'full',\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\ninterface SpectrumColorSwatchContextValue extends Pick<ColorSwatchProps, 'size' | 'rounding'> {\n useWrapper: (swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) => JSX.Element\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, DOMRefValue<HTMLDivElement>>>(null);\nexport const InternalColorSwatchContext = createContext<SpectrumColorSwatchContextValue | null>(null);\n\nfunction ColorSwatch(props: ColorSwatchProps, ref: DOMRef<HTMLDivElement>): JSX.Element {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSwatchContext);\n let domRef = useDOMRef(ref);\n let ctx = useContext(InternalColorSwatchContext);\n let {\n size = ctx?.size || 'M',\n rounding = ctx?.rounding || 'default',\n color\n } = props;\n let nonNullValue = color || '#fff0';\n color = useMemo(() => typeof nonNullValue === 'string' ? parseColor(nonNullValue) : nonNullValue, [nonNullValue]);\n\n let swatch = (\n <AriaColorSwatch\n {...props}\n color={color}\n ref={domRef}\n style={({color}) => ({\n // TODO: should there be a distinction between transparent and no value (e.g. null)?\n background: color.getChannelValue('alpha') > 0\n ? `linear-gradient(${color}, ${color}), repeating-conic-gradient(#e6e6e6 0% 25%, white 0% 50%) 0% 50% / 16px 16px`\n // Red slash to indicate there is no selected color.\n : 'linear-gradient(to bottom right, transparent calc(50% - 2px), var(--slash-color) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)) no-repeat'\n })}\n className={style({\n size: {\n size: {\n XS: 16,\n S: 24,\n M: 32,\n L: 40\n }\n },\n borderRadius: {\n rounding: {\n default: 'sm',\n none: 'none',\n full: 'full'\n }\n },\n borderColor: 'gray-1000/42',\n borderWidth: 1,\n borderStyle: 'solid',\n boxSizing: 'border-box',\n forcedColorAdjust: 'none',\n '--slash-color': {\n type: 'color',\n value: 'red-900'\n }\n }, getAllowedOverrides({height: true}))({size, rounding}, props.styles)} />\n );\n\n // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem.\n if (ctx) {\n return ctx.useWrapper(swatch, color, rounding);\n }\n\n return swatch;\n}\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nlet _ColorSwatch = forwardRef(ColorSwatch);\nexport {_ColorSwatch as ColorSwatch};\n"],"names":[],"version":3,"file":"ColorSwatch.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAmCM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA+D;AACtG,MAAM,0DAA6B,CAAA,GAAA,0BAAY,EAA0C;AAKzF,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAA2B;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,IAAI,QACF,OAAO,KAAK,QAAQ,eACpB,WAAW,KAAK,YAAY,kBAC5B,KAAK,EACN,GAAG;IACJ,IAAI,eAAe,SAAS;IAC5B,QAAQ,CAAA,GAAA,oBAAM,EAAE,IAAM,OAAO,iBAAiB,WAAW,CAAA,GAAA,qCAAS,EAAE,gBAAgB,cAAc;QAAC;KAAa;IAEhH,IAAI,uBACF,gCAAC,CAAA,GAAA,sCAAc;QACZ,GAAG,KAAK;QACT,OAAO;QACP,KAAK;QACL,OAAO,CAAC,SAAC,KAAK,EAAC,GAAM,CAAA;gBACnB,oFAAoF;gBACpF,YAAY,MAAM,eAAe,CAAC,WAAW,IACzC,CAAC,gBAAgB,EAAE,MAAM,EAAE,EAAE,MAAM,4EAA4E,CAAC,GAEhH;YACN,CAAA;QACA,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAyB6B;kBAAC;sBAAM;QAAQ,GAAG,MAAM,MAAM;;IAG1E,+DAA+D;IAC/D,IAAI,KACF,OAAO,IAAI,UAAU,CAAC,QAAQ,OAAO;IAGvC,OAAO;AACT","sources":["packages/@react-spectrum/s2/src/ColorSwatch.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 {\n ColorSwatch as AriaColorSwatch,\n ColorSwatchProps as AriaColorSwatchProps,\n ContextValue,\n parseColor\n} from 'react-aria-components';\nimport {Color} from '@react-types/color';\nimport {createContext, forwardRef, JSX, ReactElement, useContext, useMemo} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorSwatchProps extends Omit<AriaColorSwatchProps, 'className' | 'style'>, UnsafeStyles {\n /**\n * The size of the ColorSwatch.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the ColorSwatch.\n * @default 'default'\n */\n rounding?: 'default' | 'none' | 'full',\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\ninterface SpectrumColorSwatchContextValue extends Pick<ColorSwatchProps, 'size' | 'rounding'> {\n useWrapper: (swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) => JSX.Element\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, DOMRefValue<HTMLDivElement>>>(null);\nexport const InternalColorSwatchContext = createContext<SpectrumColorSwatchContextValue | null>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: DOMRef<HTMLDivElement>): JSX.Element {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSwatchContext);\n let domRef = useDOMRef(ref);\n let ctx = useContext(InternalColorSwatchContext);\n let {\n size = ctx?.size || 'M',\n rounding = ctx?.rounding || 'default',\n color\n } = props;\n let nonNullValue = color || '#fff0';\n color = useMemo(() => typeof nonNullValue === 'string' ? parseColor(nonNullValue) : nonNullValue, [nonNullValue]);\n\n let swatch = (\n <AriaColorSwatch\n {...props}\n color={color}\n ref={domRef}\n style={({color}) => ({\n // TODO: should there be a distinction between transparent and no value (e.g. null)?\n background: color.getChannelValue('alpha') > 0\n ? `linear-gradient(${color}, ${color}), repeating-conic-gradient(#e6e6e6 0% 25%, white 0% 50%) 0% 50% / 16px 16px`\n // Red slash to indicate there is no selected color.\n : 'linear-gradient(to bottom right, transparent calc(50% - 2px), var(--slash-color) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)) no-repeat'\n })}\n className={style({\n size: {\n size: {\n XS: 16,\n S: 24,\n M: 32,\n L: 40\n }\n },\n borderRadius: {\n rounding: {\n default: 'sm',\n none: 'none',\n full: 'full'\n }\n },\n borderColor: 'gray-1000/42',\n borderWidth: 1,\n borderStyle: 'solid',\n boxSizing: 'border-box',\n forcedColorAdjust: 'none',\n '--slash-color': {\n type: 'color',\n value: 'red-900'\n }\n }, getAllowedOverrides({height: true}))({size, rounding}, props.styles)} />\n );\n\n // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem.\n if (ctx) {\n return ctx.useWrapper(swatch, color, rounding);\n }\n\n return swatch;\n});\n"],"names":[],"version":3,"file":"ColorSwatch.cjs.map"}
@@ -35,51 +35,51 @@
35
35
  height: calc(2.5rem * var(--s2-scale));
36
36
  }
37
37
 
38
- ._vb {
38
+ ._wb {
39
39
  border-start-start-radius: .25rem;
40
40
  }
41
41
 
42
- ._va {
42
+ ._wa {
43
43
  border-start-start-radius: 0;
44
44
  }
45
45
 
46
- ._vf {
46
+ ._wf {
47
47
  border-start-start-radius: 9999px;
48
48
  }
49
49
 
50
- ._wb {
50
+ ._xb {
51
51
  border-start-end-radius: .25rem;
52
52
  }
53
53
 
54
- ._wa {
54
+ ._xa {
55
55
  border-start-end-radius: 0;
56
56
  }
57
57
 
58
- ._wf {
58
+ ._xf {
59
59
  border-start-end-radius: 9999px;
60
60
  }
61
61
 
62
- ._xb {
62
+ ._yb {
63
63
  border-end-start-radius: .25rem;
64
64
  }
65
65
 
66
- ._xa {
66
+ ._ya {
67
67
  border-end-start-radius: 0;
68
68
  }
69
69
 
70
- ._xf {
70
+ ._yf {
71
71
  border-end-start-radius: 9999px;
72
72
  }
73
73
 
74
- ._yb {
74
+ ._zb {
75
75
  border-end-end-radius: .25rem;
76
76
  }
77
77
 
78
- ._ya {
78
+ ._za {
79
79
  border-end-end-radius: 0;
80
80
  }
81
81
 
82
- ._yf {
82
+ ._zf {
83
83
  border-end-end-radius: 9999px;
84
84
  }
85
85
 
@@ -107,11 +107,11 @@
107
107
  border-style: solid;
108
108
  }
109
109
 
110
- .__na {
110
+ .__oa {
111
111
  box-sizing: border-box;
112
112
  }
113
113
 
114
- ._zb {
114
+ ._Ab {
115
115
  forced-color-adjust: none;
116
116
  }
117
117
 
@@ -1 +1 @@
1
- {"mappings":"AAwEiB;;;;AAAA;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;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/ColorSwatch.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 {\n ColorSwatch as AriaColorSwatch,\n ColorSwatchProps as AriaColorSwatchProps,\n ContextValue,\n parseColor\n} from 'react-aria-components';\nimport {Color} from '@react-types/color';\nimport {createContext, forwardRef, JSX, ReactElement, useContext, useMemo} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorSwatchProps extends Omit<AriaColorSwatchProps, 'className' | 'style'>, UnsafeStyles {\n /**\n * The size of the ColorSwatch.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the ColorSwatch.\n * @default 'default'\n */\n rounding?: 'default' | 'none' | 'full',\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\ninterface SpectrumColorSwatchContextValue extends Pick<ColorSwatchProps, 'size' | 'rounding'> {\n useWrapper: (swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) => JSX.Element\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, DOMRefValue<HTMLDivElement>>>(null);\nexport const InternalColorSwatchContext = createContext<SpectrumColorSwatchContextValue | null>(null);\n\nfunction ColorSwatch(props: ColorSwatchProps, ref: DOMRef<HTMLDivElement>): JSX.Element {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSwatchContext);\n let domRef = useDOMRef(ref);\n let ctx = useContext(InternalColorSwatchContext);\n let {\n size = ctx?.size || 'M',\n rounding = ctx?.rounding || 'default',\n color\n } = props;\n let nonNullValue = color || '#fff0';\n color = useMemo(() => typeof nonNullValue === 'string' ? parseColor(nonNullValue) : nonNullValue, [nonNullValue]);\n\n let swatch = (\n <AriaColorSwatch\n {...props}\n color={color}\n ref={domRef}\n style={({color}) => ({\n // TODO: should there be a distinction between transparent and no value (e.g. null)?\n background: color.getChannelValue('alpha') > 0\n ? `linear-gradient(${color}, ${color}), repeating-conic-gradient(#e6e6e6 0% 25%, white 0% 50%) 0% 50% / 16px 16px`\n // Red slash to indicate there is no selected color.\n : 'linear-gradient(to bottom right, transparent calc(50% - 2px), var(--slash-color) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)) no-repeat'\n })}\n className={style({\n size: {\n size: {\n XS: 16,\n S: 24,\n M: 32,\n L: 40\n }\n },\n borderRadius: {\n rounding: {\n default: 'sm',\n none: 'none',\n full: 'full'\n }\n },\n borderColor: 'gray-1000/42',\n borderWidth: 1,\n borderStyle: 'solid',\n boxSizing: 'border-box',\n forcedColorAdjust: 'none',\n '--slash-color': {\n type: 'color',\n value: 'red-900'\n }\n }, getAllowedOverrides({height: true}))({size, rounding}, props.styles)} />\n );\n\n // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem.\n if (ctx) {\n return ctx.useWrapper(swatch, color, rounding);\n }\n\n return swatch;\n}\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nlet _ColorSwatch = forwardRef(ColorSwatch);\nexport {_ColorSwatch as ColorSwatch};\n"],"names":[],"version":3,"file":"ColorSwatch.css.map"}
1
+ {"mappings":"AA2EiB;;;;AAAA;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;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/ColorSwatch.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 {\n ColorSwatch as AriaColorSwatch,\n ColorSwatchProps as AriaColorSwatchProps,\n ContextValue,\n parseColor\n} from 'react-aria-components';\nimport {Color} from '@react-types/color';\nimport {createContext, forwardRef, JSX, ReactElement, useContext, useMemo} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorSwatchProps extends Omit<AriaColorSwatchProps, 'className' | 'style'>, UnsafeStyles {\n /**\n * The size of the ColorSwatch.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the ColorSwatch.\n * @default 'default'\n */\n rounding?: 'default' | 'none' | 'full',\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\ninterface SpectrumColorSwatchContextValue extends Pick<ColorSwatchProps, 'size' | 'rounding'> {\n useWrapper: (swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) => JSX.Element\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, DOMRefValue<HTMLDivElement>>>(null);\nexport const InternalColorSwatchContext = createContext<SpectrumColorSwatchContextValue | null>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: DOMRef<HTMLDivElement>): JSX.Element {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSwatchContext);\n let domRef = useDOMRef(ref);\n let ctx = useContext(InternalColorSwatchContext);\n let {\n size = ctx?.size || 'M',\n rounding = ctx?.rounding || 'default',\n color\n } = props;\n let nonNullValue = color || '#fff0';\n color = useMemo(() => typeof nonNullValue === 'string' ? parseColor(nonNullValue) : nonNullValue, [nonNullValue]);\n\n let swatch = (\n <AriaColorSwatch\n {...props}\n color={color}\n ref={domRef}\n style={({color}) => ({\n // TODO: should there be a distinction between transparent and no value (e.g. null)?\n background: color.getChannelValue('alpha') > 0\n ? `linear-gradient(${color}, ${color}), repeating-conic-gradient(#e6e6e6 0% 25%, white 0% 50%) 0% 50% / 16px 16px`\n // Red slash to indicate there is no selected color.\n : 'linear-gradient(to bottom right, transparent calc(50% - 2px), var(--slash-color) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)) no-repeat'\n })}\n className={style({\n size: {\n size: {\n XS: 16,\n S: 24,\n M: 32,\n L: 40\n }\n },\n borderRadius: {\n rounding: {\n default: 'sm',\n none: 'none',\n full: 'full'\n }\n },\n borderColor: 'gray-1000/42',\n borderWidth: 1,\n borderStyle: 'solid',\n boxSizing: 'border-box',\n forcedColorAdjust: 'none',\n '--slash-color': {\n type: 'color',\n value: 'red-900'\n }\n }, getAllowedOverrides({height: true}))({size, rounding}, props.styles)} />\n );\n\n // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem.\n if (ctx) {\n return ctx.useWrapper(swatch, color, rounding);\n }\n\n return swatch;\n});\n"],"names":[],"version":3,"file":"ColorSwatch.css.map"}
@@ -2,7 +2,7 @@ import "./ColorSwatch.css";
2
2
  import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
3
3
  import {jsx as $b2Wh1$jsx} from "react/jsx-runtime";
4
4
  import {parseColor as $b2Wh1$parseColor, ColorSwatch as $b2Wh1$ColorSwatch} from "react-aria-components";
5
- import {createContext as $b2Wh1$createContext, useContext as $b2Wh1$useContext, useMemo as $b2Wh1$useMemo, forwardRef as $b2Wh1$forwardRef} from "react";
5
+ import {createContext as $b2Wh1$createContext, forwardRef as $b2Wh1$forwardRef, useContext as $b2Wh1$useContext, useMemo as $b2Wh1$useMemo} from "react";
6
6
  import {useDOMRef as $b2Wh1$useDOMRef} from "@react-spectrum/utils";
7
7
 
8
8
  /*
@@ -22,7 +22,7 @@ import {useDOMRef as $b2Wh1$useDOMRef} from "@react-spectrum/utils";
22
22
 
23
23
  const $cd9e1720baab3945$export$83cc445538396800 = /*#__PURE__*/ (0, $b2Wh1$createContext)(null);
24
24
  const $cd9e1720baab3945$export$2d9e1fe7b5c0ceb6 = /*#__PURE__*/ (0, $b2Wh1$createContext)(null);
25
- function $cd9e1720baab3945$var$ColorSwatch(props, ref) {
25
+ const $cd9e1720baab3945$export$cae13e90592f246a = /*#__PURE__*/ (0, $b2Wh1$forwardRef)(function ColorSwatch(props, ref) {
26
26
  [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $cd9e1720baab3945$export$83cc445538396800);
27
27
  let domRef = (0, $b2Wh1$useDOMRef)(ref);
28
28
  let ctx = (0, $b2Wh1$useContext)($cd9e1720baab3945$export$2d9e1fe7b5c0ceb6);
@@ -41,7 +41,7 @@ function $cd9e1720baab3945$var$ColorSwatch(props, ref) {
41
41
  }),
42
42
  className: function anonymous(props, overrides) {
43
43
  let rules = " .";
44
- let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W|l|q|r|k|o|p)[^\s]+/g) || [];
44
+ let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r|k|o|p)[^\s]+/g) || [];
45
45
  rules += matches.join('');
46
46
  let $l = false;
47
47
  let $k = false;
@@ -61,9 +61,6 @@ function $cd9e1720baab3945$var$ColorSwatch(props, ref) {
61
61
  else if (props.size === "S") rules += ' kM';
62
62
  else if (props.size === "XS") rules += ' kE';
63
63
  }
64
- if (props.rounding === "full") rules += ' _vf';
65
- else if (props.rounding === "none") rules += ' _va';
66
- else if (props.rounding === "default") rules += ' _vb';
67
64
  if (props.rounding === "full") rules += ' _wf';
68
65
  else if (props.rounding === "none") rules += ' _wa';
69
66
  else if (props.rounding === "default") rules += ' _wb';
@@ -73,14 +70,17 @@ function $cd9e1720baab3945$var$ColorSwatch(props, ref) {
73
70
  if (props.rounding === "full") rules += ' _yf';
74
71
  else if (props.rounding === "none") rules += ' _ya';
75
72
  else if (props.rounding === "default") rules += ' _yb';
73
+ if (props.rounding === "full") rules += ' _zf';
74
+ else if (props.rounding === "none") rules += ' _za';
75
+ else if (props.rounding === "default") rules += ' _zb';
76
76
  rules += ' cp42';
77
77
  rules += ' ub';
78
78
  rules += ' vb';
79
79
  rules += ' sb';
80
80
  rules += ' tb';
81
81
  rules += ' wa';
82
- rules += ' __na';
83
- rules += ' _zb';
82
+ rules += ' __oa';
83
+ rules += ' _Ab';
84
84
  rules += ' -_14u0212_a-O';
85
85
  return rules;
86
86
  }({
@@ -91,10 +91,7 @@ function $cd9e1720baab3945$var$ColorSwatch(props, ref) {
91
91
  // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem.
92
92
  if (ctx) return ctx.useWrapper(swatch, color, rounding);
93
93
  return swatch;
94
- }
95
- /**
96
- * A ColorSwatch displays a preview of a selected color.
97
- */ let $cd9e1720baab3945$export$cae13e90592f246a = /*#__PURE__*/ (0, $b2Wh1$forwardRef)($cd9e1720baab3945$var$ColorSwatch);
94
+ });
98
95
 
99
96
 
100
97
  export {$cd9e1720baab3945$export$83cc445538396800 as ColorSwatchContext, $cd9e1720baab3945$export$2d9e1fe7b5c0ceb6 as InternalColorSwatchContext, $cd9e1720baab3945$export$cae13e90592f246a as ColorSwatch};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAmCM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA+D;AACtG,MAAM,0DAA6B,CAAA,GAAA,oBAAY,EAA0C;AAEhG,SAAS,kCAAY,KAAuB,EAAE,GAA2B;IACvE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,QACF,OAAO,KAAK,QAAQ,eACpB,WAAW,KAAK,YAAY,kBAC5B,KAAK,EACN,GAAG;IACJ,IAAI,eAAe,SAAS;IAC5B,QAAQ,CAAA,GAAA,cAAM,EAAE,IAAM,OAAO,iBAAiB,WAAW,CAAA,GAAA,iBAAS,EAAE,gBAAgB,cAAc;QAAC;KAAa;IAEhH,IAAI,uBACF,gBAAC,CAAA,GAAA,kBAAc;QACZ,GAAG,KAAK;QACT,OAAO;QACP,KAAK;QACL,OAAO,CAAC,SAAC,KAAK,EAAC,GAAM,CAAA;gBACnB,oFAAoF;gBACpF,YAAY,MAAM,eAAe,CAAC,WAAW,IACzC,CAAC,gBAAgB,EAAE,MAAM,EAAE,EAAE,MAAM,4EAA4E,CAAC,GAEhH;YACN,CAAA;QACA,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAyB6B;kBAAC;sBAAM;QAAQ,GAAG,MAAM,MAAM;;IAG1E,+DAA+D;IAC/D,IAAI,KACF,OAAO,IAAI,UAAU,CAAC,QAAQ,OAAO;IAGvC,OAAO;AACT;AAEA;;CAEC,GACD,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorSwatch.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 {\n ColorSwatch as AriaColorSwatch,\n ColorSwatchProps as AriaColorSwatchProps,\n ContextValue,\n parseColor\n} from 'react-aria-components';\nimport {Color} from '@react-types/color';\nimport {createContext, forwardRef, JSX, ReactElement, useContext, useMemo} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorSwatchProps extends Omit<AriaColorSwatchProps, 'className' | 'style'>, UnsafeStyles {\n /**\n * The size of the ColorSwatch.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the ColorSwatch.\n * @default 'default'\n */\n rounding?: 'default' | 'none' | 'full',\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\ninterface SpectrumColorSwatchContextValue extends Pick<ColorSwatchProps, 'size' | 'rounding'> {\n useWrapper: (swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) => JSX.Element\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, DOMRefValue<HTMLDivElement>>>(null);\nexport const InternalColorSwatchContext = createContext<SpectrumColorSwatchContextValue | null>(null);\n\nfunction ColorSwatch(props: ColorSwatchProps, ref: DOMRef<HTMLDivElement>): JSX.Element {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSwatchContext);\n let domRef = useDOMRef(ref);\n let ctx = useContext(InternalColorSwatchContext);\n let {\n size = ctx?.size || 'M',\n rounding = ctx?.rounding || 'default',\n color\n } = props;\n let nonNullValue = color || '#fff0';\n color = useMemo(() => typeof nonNullValue === 'string' ? parseColor(nonNullValue) : nonNullValue, [nonNullValue]);\n\n let swatch = (\n <AriaColorSwatch\n {...props}\n color={color}\n ref={domRef}\n style={({color}) => ({\n // TODO: should there be a distinction between transparent and no value (e.g. null)?\n background: color.getChannelValue('alpha') > 0\n ? `linear-gradient(${color}, ${color}), repeating-conic-gradient(#e6e6e6 0% 25%, white 0% 50%) 0% 50% / 16px 16px`\n // Red slash to indicate there is no selected color.\n : 'linear-gradient(to bottom right, transparent calc(50% - 2px), var(--slash-color) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)) no-repeat'\n })}\n className={style({\n size: {\n size: {\n XS: 16,\n S: 24,\n M: 32,\n L: 40\n }\n },\n borderRadius: {\n rounding: {\n default: 'sm',\n none: 'none',\n full: 'full'\n }\n },\n borderColor: 'gray-1000/42',\n borderWidth: 1,\n borderStyle: 'solid',\n boxSizing: 'border-box',\n forcedColorAdjust: 'none',\n '--slash-color': {\n type: 'color',\n value: 'red-900'\n }\n }, getAllowedOverrides({height: true}))({size, rounding}, props.styles)} />\n );\n\n // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem.\n if (ctx) {\n return ctx.useWrapper(swatch, color, rounding);\n }\n\n return swatch;\n}\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nlet _ColorSwatch = forwardRef(ColorSwatch);\nexport {_ColorSwatch as ColorSwatch};\n"],"names":[],"version":3,"file":"ColorSwatch.mjs.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAmCM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA+D;AACtG,MAAM,0DAA6B,CAAA,GAAA,oBAAY,EAA0C;AAKzF,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAA2B;IAC7G,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,QACF,OAAO,KAAK,QAAQ,eACpB,WAAW,KAAK,YAAY,kBAC5B,KAAK,EACN,GAAG;IACJ,IAAI,eAAe,SAAS;IAC5B,QAAQ,CAAA,GAAA,cAAM,EAAE,IAAM,OAAO,iBAAiB,WAAW,CAAA,GAAA,iBAAS,EAAE,gBAAgB,cAAc;QAAC;KAAa;IAEhH,IAAI,uBACF,gBAAC,CAAA,GAAA,kBAAc;QACZ,GAAG,KAAK;QACT,OAAO;QACP,KAAK;QACL,OAAO,CAAC,SAAC,KAAK,EAAC,GAAM,CAAA;gBACnB,oFAAoF;gBACpF,YAAY,MAAM,eAAe,CAAC,WAAW,IACzC,CAAC,gBAAgB,EAAE,MAAM,EAAE,EAAE,MAAM,4EAA4E,CAAC,GAEhH;YACN,CAAA;QACA,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAyB6B;kBAAC;sBAAM;QAAQ,GAAG,MAAM,MAAM;;IAG1E,+DAA+D;IAC/D,IAAI,KACF,OAAO,IAAI,UAAU,CAAC,QAAQ,OAAO;IAGvC,OAAO;AACT","sources":["packages/@react-spectrum/s2/src/ColorSwatch.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 {\n ColorSwatch as AriaColorSwatch,\n ColorSwatchProps as AriaColorSwatchProps,\n ContextValue,\n parseColor\n} from 'react-aria-components';\nimport {Color} from '@react-types/color';\nimport {createContext, forwardRef, JSX, ReactElement, useContext, useMemo} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorSwatchProps extends Omit<AriaColorSwatchProps, 'className' | 'style'>, UnsafeStyles {\n /**\n * The size of the ColorSwatch.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the ColorSwatch.\n * @default 'default'\n */\n rounding?: 'default' | 'none' | 'full',\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\ninterface SpectrumColorSwatchContextValue extends Pick<ColorSwatchProps, 'size' | 'rounding'> {\n useWrapper: (swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) => JSX.Element\n}\n\nexport const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, DOMRefValue<HTMLDivElement>>>(null);\nexport const InternalColorSwatchContext = createContext<SpectrumColorSwatchContextValue | null>(null);\n\n/**\n * A ColorSwatch displays a preview of a selected color.\n */\nexport const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchProps, ref: DOMRef<HTMLDivElement>): JSX.Element {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSwatchContext);\n let domRef = useDOMRef(ref);\n let ctx = useContext(InternalColorSwatchContext);\n let {\n size = ctx?.size || 'M',\n rounding = ctx?.rounding || 'default',\n color\n } = props;\n let nonNullValue = color || '#fff0';\n color = useMemo(() => typeof nonNullValue === 'string' ? parseColor(nonNullValue) : nonNullValue, [nonNullValue]);\n\n let swatch = (\n <AriaColorSwatch\n {...props}\n color={color}\n ref={domRef}\n style={({color}) => ({\n // TODO: should there be a distinction between transparent and no value (e.g. null)?\n background: color.getChannelValue('alpha') > 0\n ? `linear-gradient(${color}, ${color}), repeating-conic-gradient(#e6e6e6 0% 25%, white 0% 50%) 0% 50% / 16px 16px`\n // Red slash to indicate there is no selected color.\n : 'linear-gradient(to bottom right, transparent calc(50% - 2px), var(--slash-color) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)) no-repeat'\n })}\n className={style({\n size: {\n size: {\n XS: 16,\n S: 24,\n M: 32,\n L: 40\n }\n },\n borderRadius: {\n rounding: {\n default: 'sm',\n none: 'none',\n full: 'full'\n }\n },\n borderColor: 'gray-1000/42',\n borderWidth: 1,\n borderStyle: 'solid',\n boxSizing: 'border-box',\n forcedColorAdjust: 'none',\n '--slash-color': {\n type: 'color',\n value: 'red-900'\n }\n }, getAllowedOverrides({height: true}))({size, rounding}, props.styles)} />\n );\n\n // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem.\n if (ctx) {\n return ctx.useWrapper(swatch, color, rounding);\n }\n\n return swatch;\n});\n"],"names":[],"version":3,"file":"ColorSwatch.mjs.map"}
@@ -30,7 +30,7 @@ $parcel$export(module.exports, "ColorSwatchPicker", () => $a267e3efa7024819$expo
30
30
 
31
31
 
32
32
  const $a267e3efa7024819$export$7214f50881fc1eaf = /*#__PURE__*/ (0, $7eldL$react.createContext)(null);
33
- function $a267e3efa7024819$var$ColorSwatchPicker(props, ref) {
33
+ const $a267e3efa7024819$export$b46792416e3d8515 = /*#__PURE__*/ (0, $7eldL$react.forwardRef)(function ColorSwatchPicker(props, ref) {
34
34
  [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $a267e3efa7024819$export$7214f50881fc1eaf);
35
35
  let { density: density = 'regular', size: size = 'M', rounding: rounding = 'none', ...otherProps } = props;
36
36
  let domRef = (0, $7eldL$reactspectrumutils.useDOMRef)(ref);
@@ -39,10 +39,10 @@ function $a267e3efa7024819$var$ColorSwatchPicker(props, ref) {
39
39
  ref: domRef,
40
40
  className: props.UNSAFE_className + function anonymous(props, overrides) {
41
41
  let rules = " .";
42
- let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W|l|q|r)[^\s]+/g) || [];
42
+ let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r)[^\s]+/g) || [];
43
43
  rules += matches.join('');
44
- rules += ' _Zd';
45
- rules += ' _7a';
44
+ rules += ' _0d';
45
+ rules += ' _8a';
46
46
  if (props.density === "spacious") rules += ' i-6njx2e';
47
47
  else if (props.density === "regular") rules += ' ic';
48
48
  else if (props.density === "compact") rules += ' i-59f7mn';
@@ -62,25 +62,19 @@ function $a267e3efa7024819$var$ColorSwatchPicker(props, ref) {
62
62
  children: props.children
63
63
  })
64
64
  });
65
- }
66
- /**
67
- * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.
68
- */ let $a267e3efa7024819$export$b46792416e3d8515 = /*#__PURE__*/ (0, $7eldL$react.forwardRef)($a267e3efa7024819$var$ColorSwatchPicker);
65
+ });
69
66
  function $a267e3efa7024819$var$useWrapper(swatch, color, rounding) {
70
67
  return /*#__PURE__*/ (0, $7eldL$reactjsxruntime.jsx)((0, $7eldL$reactariacomponents.ColorSwatchPickerItem), {
71
68
  color: color,
72
69
  className: (renderProps)=>(function anonymous(props) {
73
70
  let rules = " .";
74
- if (props.isFocusVisible) rules += ' _Lb';
75
- else rules += ' _La';
76
- rules += ' da_____z';
71
+ if (props.isFocusVisible) rules += ' _Mb';
72
+ else rules += ' _Ma';
73
+ rules += ' da_____M';
77
74
  rules += ' dx';
78
- rules += ' _Nc';
79
- rules += ' _M-3t1z';
80
- rules += ' Uc';
81
- if (props.rounding === "full") rules += ' _vf';
82
- else if (props.rounding === "default") rules += ' _vb';
83
- else if (props.rounding === "none") rules += ' _va';
75
+ rules += ' _Oc';
76
+ rules += ' _N-3t1z';
77
+ rules += ' Vc';
84
78
  if (props.rounding === "full") rules += ' _wf';
85
79
  else if (props.rounding === "default") rules += ' _wb';
86
80
  else if (props.rounding === "none") rules += ' _wa';
@@ -90,6 +84,9 @@ function $a267e3efa7024819$var$useWrapper(swatch, color, rounding) {
90
84
  if (props.rounding === "full") rules += ' _yf';
91
85
  else if (props.rounding === "default") rules += ' _yb';
92
86
  else if (props.rounding === "none") rules += ' _ya';
87
+ if (props.rounding === "full") rules += ' _zf';
88
+ else if (props.rounding === "default") rules += ' _zb';
89
+ else if (props.rounding === "none") rules += ' _za';
93
90
  return rules;
94
91
  })({
95
92
  ...renderProps,
@@ -100,7 +97,7 @@ function $a267e3efa7024819$var$useWrapper(swatch, color, rounding) {
100
97
  swatch,
101
98
  isSelected && /*#__PURE__*/ (0, $7eldL$reactjsxruntime.jsx)("div", {
102
99
  "aria-hidden": true,
103
- className: " . Ua __Ba Xa Za Va Wa __na co wa uc vc sc tc dd _Lb _Nc _M-3hmpy _zb _v-17zqamw _w-17zqamw _x-17zqamw _y-17zqamw"
100
+ className: " . Va __Ca Ya _aa Wa Xa __oa co wa uc vc sc tc dd _Mb _Oc _N-3hmpy _Ab _w-17zqamw _x-17zqamw _y-17zqamw _z-17zqamw"
104
101
  })
105
102
  ]
106
103
  })
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAgCM,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAA8E;AAElI,SAAS,wCAAkB,KAA6B,EAAE,GAA2B;IACnF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,WACF,UAAU,iBACV,OAAO,eACP,WAAW,QACX,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,4CAAoB;QAClB,GAAG,UAAU;QACd,KAAK;QACL,WAAW,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;UAUV;qBAAC;QAAO,GAAG,MAAM,MAAM;kBACjD,cAAA,gCAAC,CAAA,GAAA,oDAAyB,EAAE,QAAQ;YAAC,OAAO;4BAAC;sBAAY;0BAAM;YAAQ;sBACpE,MAAM,QAAQ;;;AAIvB;AAEA;;CAEC,GACD,IAAI,0DAAqB,CAAA,GAAA,uBAAS,EAAE;AAGpC,SAAS,iCAAW,MAAoB,EAAE,KAAY,EAAE,QAAsC;IAC5F,qBACE,gCAAC,CAAA,GAAA,gDAAwB;QACvB,OAAO;QACP,WAAW,CAAA,cAAe;;;;;;;;;;;;;;;;;;;;;;eAUvB;gBAAC,GAAG,WAAW;0BAAE;YAAQ;kBAC3B,CAAC,cAAC,UAAU,EAAC,iBAAM;;oBACjB;oBACA,4BACC,gCAAC;wBACC,aAAW;wBACX,SAAS;;;;;AAmBrB","sources":["packages/@react-spectrum/s2/src/ColorSwatchPicker.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 {ColorSwatchPicker as AriaColorSwatchPicker, ColorSwatchPickerItem as AriaColorSwatchPickerItem, ContextValue, SlotProps} from 'react-aria-components';\nimport {Color} from '@react-types/color';\nimport {ColorSwatchProps, InternalColorSwatchContext} from './ColorSwatch';\nimport {createContext, forwardRef, ReactElement, ReactNode} from 'react';\nimport {DOMRef, DOMRefValue, ValueBase} from '@react-types/shared';\nimport {focusRing, space, style} from '../style' with {type: 'macro'};\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, StyleProps, SlotProps {\n /** The ColorSwatches within the ColorSwatchPicker. */\n children: ReactNode,\n /**\n * The amount of padding between the swatches.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * The size of the color swatches.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the color swatches.\n * @default 'none'\n */\n rounding?: 'none' | 'default' | 'full'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<Partial<ColorSwatchPickerProps>, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction ColorSwatchPicker(props: ColorSwatchPickerProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSwatchPickerContext);\n let {\n density = 'regular',\n size = 'M',\n rounding = 'none',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaColorSwatchPicker\n {...otherProps}\n ref={domRef}\n className={props.UNSAFE_className + style({\n display: 'flex',\n flexWrap: 'wrap',\n gap: {\n density: {\n compact: space(2),\n regular: 4,\n spacious: space(6)\n }\n }\n }, getAllowedOverrides())({density}, props.styles)}>\n <InternalColorSwatchContext.Provider value={{useWrapper, size, rounding}}>\n {props.children}\n </InternalColorSwatchContext.Provider>\n </AriaColorSwatchPicker>\n );\n}\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nlet _ColorSwatchPicker = forwardRef(ColorSwatchPicker);\nexport {_ColorSwatchPicker as ColorSwatchPicker};\n\nfunction useWrapper(swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) {\n return (\n <AriaColorSwatchPickerItem\n color={color}\n className={renderProps => style({\n ...focusRing(),\n position: 'relative',\n borderRadius: {\n rounding: {\n none: 'none',\n default: 'sm',\n full: 'full'\n }\n }\n })({...renderProps, rounding})}>\n {({isSelected}) => (<>\n {swatch}\n {isSelected && (\n <div\n aria-hidden\n className={style({\n position: 'absolute',\n pointerEvents: 'none',\n inset: 0,\n boxSizing: 'border-box',\n borderColor: 'gray-900',\n borderStyle: 'solid',\n borderWidth: 2,\n outlineColor: 'gray-25',\n outlineStyle: 'solid',\n outlineWidth: 2,\n outlineOffset: -4,\n forcedColorAdjust: 'none',\n borderRadius: '[inherit]'\n })} />\n )}\n </>)}\n </AriaColorSwatchPickerItem>\n );\n}\n"],"names":[],"version":3,"file":"ColorSwatchPicker.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAgCM,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAA8E;AAK3H,MAAM,0DAAoB,CAAA,GAAA,uBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAA2B;IAC/H,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,WACF,UAAU,iBACV,OAAO,eACP,WAAW,QACX,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,4CAAoB;QAClB,GAAG,UAAU;QACd,KAAK;QACL,WAAW,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;UAUV;qBAAC;QAAO,GAAG,MAAM,MAAM;kBACjD,cAAA,gCAAC,CAAA,GAAA,oDAAyB,EAAE,QAAQ;YAAC,OAAO;4BAAC;sBAAY;0BAAM;YAAQ;sBACpE,MAAM,QAAQ;;;AAIvB;AAEA,SAAS,iCAAW,MAAoB,EAAE,KAAY,EAAE,QAAsC;IAC5F,qBACE,gCAAC,CAAA,GAAA,gDAAwB;QACvB,OAAO;QACP,WAAW,CAAA,cAAe;;;;;;;;;;;;;;;;;;;;;;eAUvB;gBAAC,GAAG,WAAW;0BAAE;YAAQ;kBAC3B,CAAC,cAAC,UAAU,EAAC,iBAAM;;oBACjB;oBACA,4BACC,gCAAC;wBACC,aAAW;wBACX,SAAS;;;;;AAmBrB","sources":["packages/@react-spectrum/s2/src/ColorSwatchPicker.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 {ColorSwatchPicker as AriaColorSwatchPicker, ColorSwatchPickerItem as AriaColorSwatchPickerItem, ContextValue, SlotProps} from 'react-aria-components';\nimport {Color} from '@react-types/color';\nimport {ColorSwatchProps, InternalColorSwatchContext} from './ColorSwatch';\nimport {createContext, forwardRef, ReactElement, ReactNode} from 'react';\nimport {DOMRef, DOMRefValue, ValueBase} from '@react-types/shared';\nimport {focusRing, space, style} from '../style' with {type: 'macro'};\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorSwatchPickerProps extends ValueBase<string | Color, Color>, StyleProps, SlotProps {\n /** The ColorSwatches within the ColorSwatchPicker. */\n children: ReactNode,\n /**\n * The amount of padding between the swatches.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * The size of the color swatches.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the color swatches.\n * @default 'none'\n */\n rounding?: 'none' | 'default' | 'full'\n}\n\nexport const ColorSwatchPickerContext = createContext<ContextValue<Partial<ColorSwatchPickerProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.\n */\nexport const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorSwatchPickerContext);\n let {\n density = 'regular',\n size = 'M',\n rounding = 'none',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaColorSwatchPicker\n {...otherProps}\n ref={domRef}\n className={props.UNSAFE_className + style({\n display: 'flex',\n flexWrap: 'wrap',\n gap: {\n density: {\n compact: space(2),\n regular: 4,\n spacious: space(6)\n }\n }\n }, getAllowedOverrides())({density}, props.styles)}>\n <InternalColorSwatchContext.Provider value={{useWrapper, size, rounding}}>\n {props.children}\n </InternalColorSwatchContext.Provider>\n </AriaColorSwatchPicker>\n );\n});\n\nfunction useWrapper(swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) {\n return (\n <AriaColorSwatchPickerItem\n color={color}\n className={renderProps => style({\n ...focusRing(),\n position: 'relative',\n borderRadius: {\n rounding: {\n none: 'none',\n default: 'sm',\n full: 'full'\n }\n }\n })({...renderProps, rounding})}>\n {({isSelected}) => (<>\n {swatch}\n {isSelected && (\n <div\n aria-hidden\n className={style({\n position: 'absolute',\n pointerEvents: 'none',\n inset: 0,\n boxSizing: 'border-box',\n borderColor: 'gray-900',\n borderStyle: 'solid',\n borderWidth: 2,\n outlineColor: 'gray-25',\n outlineStyle: 'solid',\n outlineWidth: 2,\n outlineOffset: -4,\n forcedColorAdjust: 'none',\n borderRadius: '[inherit]'\n })} />\n )}\n </>)}\n </AriaColorSwatchPickerItem>\n );\n}\n"],"names":[],"version":3,"file":"ColorSwatchPicker.cjs.map"}
@@ -1,9 +1,9 @@
1
1
  @layer _.a {
2
- ._Zd {
2
+ ._0d {
3
3
  display: flex;
4
4
  }
5
5
 
6
- ._7a {
6
+ ._8a {
7
7
  flex-wrap: wrap;
8
8
  }
9
9
 
@@ -31,7 +31,7 @@
31
31
  column-gap: .375rem;
32
32
  }
33
33
 
34
- ._La {
34
+ ._Ma {
35
35
  outline-style: none;
36
36
  }
37
37
 
@@ -39,87 +39,87 @@
39
39
  outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
40
40
  }
41
41
 
42
- ._M-3t1z {
42
+ ._N-3t1z {
43
43
  outline-offset: 2px;
44
44
  }
45
45
 
46
- .Uc {
46
+ .Vc {
47
47
  position: relative;
48
48
  }
49
49
 
50
- ._va {
50
+ ._wa {
51
51
  border-start-start-radius: 0;
52
52
  }
53
53
 
54
- ._vb {
54
+ ._wb {
55
55
  border-start-start-radius: .25rem;
56
56
  }
57
57
 
58
- ._vf {
58
+ ._wf {
59
59
  border-start-start-radius: 9999px;
60
60
  }
61
61
 
62
- ._wa {
62
+ ._xa {
63
63
  border-start-end-radius: 0;
64
64
  }
65
65
 
66
- ._wb {
66
+ ._xb {
67
67
  border-start-end-radius: .25rem;
68
68
  }
69
69
 
70
- ._wf {
70
+ ._xf {
71
71
  border-start-end-radius: 9999px;
72
72
  }
73
73
 
74
- ._xa {
74
+ ._ya {
75
75
  border-end-start-radius: 0;
76
76
  }
77
77
 
78
- ._xb {
78
+ ._yb {
79
79
  border-end-start-radius: .25rem;
80
80
  }
81
81
 
82
- ._xf {
82
+ ._yf {
83
83
  border-end-start-radius: 9999px;
84
84
  }
85
85
 
86
- ._ya {
86
+ ._za {
87
87
  border-end-end-radius: 0;
88
88
  }
89
89
 
90
- ._yb {
90
+ ._zb {
91
91
  border-end-end-radius: .25rem;
92
92
  }
93
93
 
94
- ._yf {
94
+ ._zf {
95
95
  border-end-end-radius: 9999px;
96
96
  }
97
97
 
98
- .Ua {
98
+ .Va {
99
99
  position: absolute;
100
100
  }
101
101
 
102
- .__Ba {
102
+ .__Ca {
103
103
  pointer-events: none;
104
104
  }
105
105
 
106
- .Xa {
106
+ .Ya {
107
107
  top: 0;
108
108
  }
109
109
 
110
- .Za {
110
+ ._aa {
111
111
  bottom: 0;
112
112
  }
113
113
 
114
- .Va {
114
+ .Wa {
115
115
  inset-inline-start: 0;
116
116
  }
117
117
 
118
- .Wa {
118
+ .Xa {
119
119
  inset-inline-end: 0;
120
120
  }
121
121
 
122
- .__na {
122
+ .__oa {
123
123
  box-sizing: border-box;
124
124
  }
125
125
 
@@ -151,35 +151,35 @@
151
151
  outline-color: var(--lightningcss-light, #fff) var(--lightningcss-dark, #111);
152
152
  }
153
153
 
154
- ._Lb {
154
+ ._Mb {
155
155
  outline-style: solid;
156
156
  }
157
157
 
158
- ._Nc {
158
+ ._Oc {
159
159
  outline-width: 2px;
160
160
  }
161
161
 
162
- ._M-3hmpy {
162
+ ._N-3hmpy {
163
163
  outline-offset: -4px;
164
164
  }
165
165
 
166
- ._zb {
166
+ ._Ab {
167
167
  forced-color-adjust: none;
168
168
  }
169
169
 
170
- ._v-17zqamw {
170
+ ._w-17zqamw {
171
171
  border-start-start-radius: inherit;
172
172
  }
173
173
 
174
- ._w-17zqamw {
174
+ ._x-17zqamw {
175
175
  border-start-end-radius: inherit;
176
176
  }
177
177
 
178
- ._x-17zqamw {
178
+ ._y-17zqamw {
179
179
  border-end-start-radius: inherit;
180
180
  }
181
181
 
182
- ._y-17zqamw {
182
+ ._z-17zqamw {
183
183
  border-end-end-radius: inherit;
184
184
  }
185
185
  }
@@ -188,7 +188,7 @@
188
188
 
189
189
  @layer _.b.a {
190
190
  @media (forced-colors: active) {
191
- .da_____z {
191
+ .da_____M {
192
192
  outline-color: highlight;
193
193
  }
194
194
  }