@react-spectrum/s2 3.0.0-nightly-63d4359d6-250427 → 3.0.0-nightly-1dd65ffc5-250429

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 (365) hide show
  1. package/dist/Accordion.cjs +4 -5
  2. package/dist/Accordion.cjs.map +1 -1
  3. package/dist/Accordion.css +2 -4
  4. package/dist/Accordion.css.map +1 -1
  5. package/dist/Accordion.mjs +4 -5
  6. package/dist/Accordion.mjs.map +1 -1
  7. package/dist/ActionBar.cjs +72 -63
  8. package/dist/ActionBar.cjs.map +1 -1
  9. package/dist/ActionBar.css +70 -63
  10. package/dist/ActionBar.css.map +1 -1
  11. package/dist/ActionBar.mjs +72 -63
  12. package/dist/ActionBar.mjs.map +1 -1
  13. package/dist/ActionButton.cjs +161 -160
  14. package/dist/ActionButton.cjs.map +1 -1
  15. package/dist/ActionButton.css +174 -168
  16. package/dist/ActionButton.css.map +1 -1
  17. package/dist/ActionButton.mjs +161 -160
  18. package/dist/ActionButton.mjs.map +1 -1
  19. package/dist/ActionButtonGroup.cjs +17 -18
  20. package/dist/ActionButtonGroup.cjs.map +1 -1
  21. package/dist/ActionButtonGroup.css +9 -11
  22. package/dist/ActionButtonGroup.css.map +1 -1
  23. package/dist/ActionButtonGroup.mjs +17 -18
  24. package/dist/ActionButtonGroup.mjs.map +1 -1
  25. package/dist/AlertDialog.cjs +4 -4
  26. package/dist/AlertDialog.css +3 -5
  27. package/dist/AlertDialog.css.map +1 -1
  28. package/dist/AlertDialog.mjs +4 -4
  29. package/dist/Avatar.cjs +21 -21
  30. package/dist/Avatar.css +14 -16
  31. package/dist/Avatar.css.map +1 -1
  32. package/dist/Avatar.mjs +21 -21
  33. package/dist/AvatarGroup.cjs +131 -110
  34. package/dist/AvatarGroup.cjs.map +1 -1
  35. package/dist/AvatarGroup.css +43 -49
  36. package/dist/AvatarGroup.css.map +1 -1
  37. package/dist/AvatarGroup.mjs +131 -110
  38. package/dist/AvatarGroup.mjs.map +1 -1
  39. package/dist/Badge.cjs +150 -149
  40. package/dist/Badge.cjs.map +1 -1
  41. package/dist/Badge.css +140 -134
  42. package/dist/Badge.css.map +1 -1
  43. package/dist/Badge.mjs +150 -149
  44. package/dist/Badge.mjs.map +1 -1
  45. package/dist/Breadcrumbs.cjs +169 -154
  46. package/dist/Breadcrumbs.cjs.map +1 -1
  47. package/dist/Breadcrumbs.css +119 -105
  48. package/dist/Breadcrumbs.css.map +1 -1
  49. package/dist/Breadcrumbs.mjs +169 -154
  50. package/dist/Breadcrumbs.mjs.map +1 -1
  51. package/dist/Button.cjs +321 -275
  52. package/dist/Button.cjs.map +1 -1
  53. package/dist/Button.css +245 -215
  54. package/dist/Button.css.map +1 -1
  55. package/dist/Button.mjs +321 -275
  56. package/dist/Button.mjs.map +1 -1
  57. package/dist/ButtonGroup.cjs +27 -25
  58. package/dist/ButtonGroup.cjs.map +1 -1
  59. package/dist/ButtonGroup.css +15 -17
  60. package/dist/ButtonGroup.css.map +1 -1
  61. package/dist/ButtonGroup.mjs +27 -25
  62. package/dist/ButtonGroup.mjs.map +1 -1
  63. package/dist/Card.cjs +316 -299
  64. package/dist/Card.cjs.map +1 -1
  65. package/dist/Card.css +242 -215
  66. package/dist/Card.css.map +1 -1
  67. package/dist/Card.mjs +316 -299
  68. package/dist/Card.mjs.map +1 -1
  69. package/dist/CardView.cjs +29 -30
  70. package/dist/CardView.cjs.map +1 -1
  71. package/dist/CardView.css +19 -19
  72. package/dist/CardView.mjs +29 -30
  73. package/dist/CardView.mjs.map +1 -1
  74. package/dist/CenterBaseline.cjs +2 -2
  75. package/dist/CenterBaseline.css +3 -5
  76. package/dist/CenterBaseline.css.map +1 -1
  77. package/dist/CenterBaseline.mjs +2 -2
  78. package/dist/Checkbox.cjs +114 -112
  79. package/dist/Checkbox.cjs.map +1 -1
  80. package/dist/Checkbox.css +99 -93
  81. package/dist/Checkbox.css.map +1 -1
  82. package/dist/Checkbox.mjs +114 -112
  83. package/dist/Checkbox.mjs.map +1 -1
  84. package/dist/CheckboxGroup.cjs +54 -54
  85. package/dist/CheckboxGroup.css +42 -42
  86. package/dist/CheckboxGroup.mjs +54 -54
  87. package/dist/ClearButton.cjs +19 -19
  88. package/dist/ClearButton.css +19 -21
  89. package/dist/ClearButton.css.map +1 -1
  90. package/dist/ClearButton.mjs +19 -19
  91. package/dist/CloseButton.cjs +64 -62
  92. package/dist/CloseButton.cjs.map +1 -1
  93. package/dist/CloseButton.css +48 -48
  94. package/dist/CloseButton.mjs +64 -62
  95. package/dist/CloseButton.mjs.map +1 -1
  96. package/dist/ColorArea.cjs +28 -28
  97. package/dist/ColorArea.css +17 -17
  98. package/dist/ColorArea.mjs +28 -28
  99. package/dist/ColorField.cjs +41 -41
  100. package/dist/ColorField.css +33 -33
  101. package/dist/ColorField.mjs +41 -41
  102. package/dist/ColorHandle.cjs +29 -29
  103. package/dist/ColorHandle.css +45 -45
  104. package/dist/ColorHandle.mjs +29 -29
  105. package/dist/ColorSlider.cjs +68 -64
  106. package/dist/ColorSlider.cjs.map +1 -1
  107. package/dist/ColorSlider.css +64 -58
  108. package/dist/ColorSlider.css.map +1 -1
  109. package/dist/ColorSlider.mjs +68 -64
  110. package/dist/ColorSlider.mjs.map +1 -1
  111. package/dist/ColorSwatch.cjs +44 -38
  112. package/dist/ColorSwatch.cjs.map +1 -1
  113. package/dist/ColorSwatch.css +29 -31
  114. package/dist/ColorSwatch.css.map +1 -1
  115. package/dist/ColorSwatch.mjs +44 -38
  116. package/dist/ColorSwatch.mjs.map +1 -1
  117. package/dist/ColorSwatchPicker.cjs +31 -32
  118. package/dist/ColorSwatchPicker.cjs.map +1 -1
  119. package/dist/ColorSwatchPicker.css +48 -48
  120. package/dist/ColorSwatchPicker.css.map +1 -1
  121. package/dist/ColorSwatchPicker.mjs +31 -32
  122. package/dist/ColorSwatchPicker.mjs.map +1 -1
  123. package/dist/ColorWheel.cjs +28 -28
  124. package/dist/ColorWheel.css +18 -18
  125. package/dist/ColorWheel.mjs +28 -28
  126. package/dist/ComboBox.cjs +108 -108
  127. package/dist/ComboBox.css +101 -101
  128. package/dist/ComboBox.mjs +108 -108
  129. package/dist/ContextualHelp.cjs +5 -5
  130. package/dist/ContextualHelp.css +58 -44
  131. package/dist/ContextualHelp.css.map +1 -1
  132. package/dist/ContextualHelp.mjs +5 -5
  133. package/dist/CustomDialog.cjs +38 -38
  134. package/dist/CustomDialog.css +26 -26
  135. package/dist/CustomDialog.mjs +38 -38
  136. package/dist/Dialog.cjs +18 -18
  137. package/dist/Dialog.css +86 -72
  138. package/dist/Dialog.css.map +1 -1
  139. package/dist/Dialog.mjs +18 -18
  140. package/dist/Disclosure.cjs +139 -133
  141. package/dist/Disclosure.cjs.map +1 -1
  142. package/dist/Disclosure.css +144 -120
  143. package/dist/Disclosure.css.map +1 -1
  144. package/dist/Disclosure.mjs +139 -133
  145. package/dist/Disclosure.mjs.map +1 -1
  146. package/dist/Divider.cjs +47 -47
  147. package/dist/Divider.css +26 -26
  148. package/dist/Divider.mjs +47 -47
  149. package/dist/DropZone.cjs +68 -64
  150. package/dist/DropZone.cjs.map +1 -1
  151. package/dist/DropZone.css +66 -60
  152. package/dist/DropZone.css.map +1 -1
  153. package/dist/DropZone.mjs +68 -64
  154. package/dist/DropZone.mjs.map +1 -1
  155. package/dist/Field.cjs +192 -186
  156. package/dist/Field.cjs.map +1 -1
  157. package/dist/Field.css +167 -159
  158. package/dist/Field.css.map +1 -1
  159. package/dist/Field.mjs +192 -186
  160. package/dist/Field.mjs.map +1 -1
  161. package/dist/Form.cjs +11 -12
  162. package/dist/Form.cjs.map +1 -1
  163. package/dist/Form.css +9 -11
  164. package/dist/Form.css.map +1 -1
  165. package/dist/Form.mjs +11 -12
  166. package/dist/Form.mjs.map +1 -1
  167. package/dist/FullscreenDialog.cjs +5 -5
  168. package/dist/FullscreenDialog.css +94 -80
  169. package/dist/FullscreenDialog.css.map +1 -1
  170. package/dist/FullscreenDialog.mjs +5 -5
  171. package/dist/IllustratedMessage.cjs +185 -160
  172. package/dist/IllustratedMessage.cjs.map +1 -1
  173. package/dist/IllustratedMessage.css +93 -91
  174. package/dist/IllustratedMessage.css.map +1 -1
  175. package/dist/IllustratedMessage.mjs +185 -160
  176. package/dist/IllustratedMessage.mjs.map +1 -1
  177. package/dist/Image.cjs +14 -14
  178. package/dist/Image.css +14 -16
  179. package/dist/Image.css.map +1 -1
  180. package/dist/Image.mjs +14 -14
  181. package/dist/InlineAlert.cjs +130 -122
  182. package/dist/InlineAlert.cjs.map +1 -1
  183. package/dist/InlineAlert.css +109 -95
  184. package/dist/InlineAlert.css.map +1 -1
  185. package/dist/InlineAlert.mjs +130 -122
  186. package/dist/InlineAlert.mjs.map +1 -1
  187. package/dist/Link.cjs +57 -47
  188. package/dist/Link.cjs.map +1 -1
  189. package/dist/Link.css +52 -44
  190. package/dist/Link.css.map +1 -1
  191. package/dist/Link.mjs +57 -47
  192. package/dist/Link.mjs.map +1 -1
  193. package/dist/Menu.cjs +353 -325
  194. package/dist/Menu.cjs.map +1 -1
  195. package/dist/Menu.css +189 -189
  196. package/dist/Menu.css.map +1 -1
  197. package/dist/Menu.mjs +353 -325
  198. package/dist/Menu.mjs.map +1 -1
  199. package/dist/Meter.cjs +116 -114
  200. package/dist/Meter.cjs.map +1 -1
  201. package/dist/Meter.css +106 -104
  202. package/dist/Meter.css.map +1 -1
  203. package/dist/Meter.mjs +116 -114
  204. package/dist/Meter.mjs.map +1 -1
  205. package/dist/Modal.cjs +62 -59
  206. package/dist/Modal.cjs.map +1 -1
  207. package/dist/Modal.css +52 -51
  208. package/dist/Modal.css.map +1 -1
  209. package/dist/Modal.mjs +62 -59
  210. package/dist/Modal.mjs.map +1 -1
  211. package/dist/NotificationBadge.cjs +66 -62
  212. package/dist/NotificationBadge.cjs.map +1 -1
  213. package/dist/NotificationBadge.css +78 -72
  214. package/dist/NotificationBadge.css.map +1 -1
  215. package/dist/NotificationBadge.mjs +66 -62
  216. package/dist/NotificationBadge.mjs.map +1 -1
  217. package/dist/NumberField.cjs +133 -133
  218. package/dist/NumberField.css +120 -120
  219. package/dist/NumberField.mjs +133 -133
  220. package/dist/Picker.cjs +209 -207
  221. package/dist/Picker.cjs.map +1 -1
  222. package/dist/Picker.css +179 -173
  223. package/dist/Picker.css.map +1 -1
  224. package/dist/Picker.mjs +209 -207
  225. package/dist/Picker.mjs.map +1 -1
  226. package/dist/Popover.cjs +124 -93
  227. package/dist/Popover.cjs.map +1 -1
  228. package/dist/Popover.css +67 -83
  229. package/dist/Popover.css.map +1 -1
  230. package/dist/Popover.mjs +124 -93
  231. package/dist/Popover.mjs.map +1 -1
  232. package/dist/ProgressBar.cjs +132 -130
  233. package/dist/ProgressBar.cjs.map +1 -1
  234. package/dist/ProgressBar.css +119 -117
  235. package/dist/ProgressBar.css.map +1 -1
  236. package/dist/ProgressBar.mjs +132 -130
  237. package/dist/ProgressBar.mjs.map +1 -1
  238. package/dist/ProgressCircle.cjs +32 -32
  239. package/dist/ProgressCircle.css +20 -20
  240. package/dist/ProgressCircle.css.map +1 -1
  241. package/dist/ProgressCircle.mjs +32 -32
  242. package/dist/Provider.cjs +11 -11
  243. package/dist/Provider.css +9 -11
  244. package/dist/Provider.css.map +1 -1
  245. package/dist/Provider.mjs +11 -11
  246. package/dist/Radio.cjs +101 -99
  247. package/dist/Radio.cjs.map +1 -1
  248. package/dist/Radio.css +101 -95
  249. package/dist/Radio.css.map +1 -1
  250. package/dist/Radio.mjs +101 -99
  251. package/dist/Radio.mjs.map +1 -1
  252. package/dist/RadioGroup.cjs +52 -52
  253. package/dist/RadioGroup.css +42 -42
  254. package/dist/RadioGroup.mjs +52 -52
  255. package/dist/SearchField.cjs +52 -52
  256. package/dist/SearchField.css +54 -54
  257. package/dist/SearchField.mjs +52 -52
  258. package/dist/SegmentedControl.cjs +123 -119
  259. package/dist/SegmentedControl.cjs.map +1 -1
  260. package/dist/SegmentedControl.css +110 -104
  261. package/dist/SegmentedControl.css.map +1 -1
  262. package/dist/SegmentedControl.mjs +123 -119
  263. package/dist/SegmentedControl.mjs.map +1 -1
  264. package/dist/Slider.cjs +251 -248
  265. package/dist/Slider.cjs.map +1 -1
  266. package/dist/Slider.css +166 -157
  267. package/dist/Slider.css.map +1 -1
  268. package/dist/Slider.mjs +251 -248
  269. package/dist/Slider.mjs.map +1 -1
  270. package/dist/StatusLight.cjs +74 -70
  271. package/dist/StatusLight.cjs.map +1 -1
  272. package/dist/StatusLight.css +70 -64
  273. package/dist/StatusLight.css.map +1 -1
  274. package/dist/StatusLight.mjs +74 -70
  275. package/dist/StatusLight.mjs.map +1 -1
  276. package/dist/Switch.cjs +110 -108
  277. package/dist/Switch.cjs.map +1 -1
  278. package/dist/Switch.css +86 -80
  279. package/dist/Switch.css.map +1 -1
  280. package/dist/Switch.mjs +110 -108
  281. package/dist/Switch.mjs.map +1 -1
  282. package/dist/TableView.cjs +334 -329
  283. package/dist/TableView.cjs.map +1 -1
  284. package/dist/TableView.css +193 -193
  285. package/dist/TableView.css.map +1 -1
  286. package/dist/TableView.mjs +334 -329
  287. package/dist/TableView.mjs.map +1 -1
  288. package/dist/Tabs.cjs +153 -149
  289. package/dist/Tabs.cjs.map +1 -1
  290. package/dist/Tabs.css +102 -96
  291. package/dist/Tabs.css.map +1 -1
  292. package/dist/Tabs.mjs +153 -149
  293. package/dist/Tabs.mjs.map +1 -1
  294. package/dist/TabsPicker.cjs +131 -129
  295. package/dist/TabsPicker.cjs.map +1 -1
  296. package/dist/TabsPicker.css +132 -126
  297. package/dist/TabsPicker.css.map +1 -1
  298. package/dist/TabsPicker.mjs +131 -129
  299. package/dist/TabsPicker.mjs.map +1 -1
  300. package/dist/TagGroup.cjs +197 -193
  301. package/dist/TagGroup.cjs.map +1 -1
  302. package/dist/TagGroup.css +164 -158
  303. package/dist/TagGroup.css.map +1 -1
  304. package/dist/TagGroup.mjs +197 -193
  305. package/dist/TagGroup.mjs.map +1 -1
  306. package/dist/TextField.cjs +67 -65
  307. package/dist/TextField.cjs.map +1 -1
  308. package/dist/TextField.css +71 -65
  309. package/dist/TextField.css.map +1 -1
  310. package/dist/TextField.mjs +67 -65
  311. package/dist/TextField.mjs.map +1 -1
  312. package/dist/Toast.cjs +138 -136
  313. package/dist/Toast.cjs.map +1 -1
  314. package/dist/Toast.css +117 -111
  315. package/dist/Toast.css.map +1 -1
  316. package/dist/Toast.mjs +138 -136
  317. package/dist/Toast.mjs.map +1 -1
  318. package/dist/ToggleButton.cjs +3 -3
  319. package/dist/ToggleButton.css +12 -14
  320. package/dist/ToggleButton.css.map +1 -1
  321. package/dist/ToggleButton.mjs +3 -3
  322. package/dist/Tooltip.cjs +99 -72
  323. package/dist/Tooltip.cjs.map +1 -1
  324. package/dist/Tooltip.css +87 -87
  325. package/dist/Tooltip.css.map +1 -1
  326. package/dist/Tooltip.mjs +99 -72
  327. package/dist/Tooltip.mjs.map +1 -1
  328. package/dist/TreeView.cjs +169 -157
  329. package/dist/TreeView.cjs.map +1 -1
  330. package/dist/TreeView.css +155 -153
  331. package/dist/TreeView.css.map +1 -1
  332. package/dist/TreeView.mjs +169 -157
  333. package/dist/TreeView.mjs.map +1 -1
  334. package/dist/types.d.ts +1 -1
  335. package/dist/types.d.ts.map +1 -1
  336. package/icons/Skeleton.cjs +3 -3
  337. package/icons/Skeleton.cjs.map +1 -1
  338. package/icons/Skeleton.css +8 -10
  339. package/icons/Skeleton.css.map +1 -1
  340. package/icons/Skeleton.mjs +3 -3
  341. package/icons/Skeleton.mjs.map +1 -1
  342. package/package.json +22 -22
  343. package/src/Card.tsx +3 -3
  344. package/src/Disclosure.tsx +3 -3
  345. package/src/TableView.tsx +1 -4
  346. package/src/style-utils.ts +0 -2
  347. package/style/__tests__/style-macro.test.js +323 -27
  348. package/style/dist/properties.cjs +4 -0
  349. package/style/dist/properties.cjs.map +1 -0
  350. package/style/dist/properties.mjs +6 -0
  351. package/style/dist/properties.mjs.map +1 -0
  352. package/style/dist/spectrum-theme.cjs +123 -124
  353. package/style/dist/spectrum-theme.cjs.map +1 -1
  354. package/style/dist/spectrum-theme.mjs +124 -125
  355. package/style/dist/spectrum-theme.mjs.map +1 -1
  356. package/style/dist/style-macro.cjs +244 -263
  357. package/style/dist/style-macro.cjs.map +1 -1
  358. package/style/dist/style-macro.mjs +240 -259
  359. package/style/dist/style-macro.mjs.map +1 -1
  360. package/style/dist/types.d.ts +84 -80
  361. package/style/dist/types.d.ts.map +1 -1
  362. package/style/properties.json +2422 -0
  363. package/style/spectrum-theme.ts +101 -110
  364. package/style/style-macro.ts +319 -220
  365. package/style/types.ts +8 -4
@@ -1 +1 @@
1
- {"mappings":"AC+DyB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAiPQ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAGb;;;;EAAA;;;;EAIA;;;;EAAA;;;;EAAA;;;;EAMA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AA9PK;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["2931924df01dc677","packages/@react-spectrum/s2/src/ActionButton.tsx"],"sourcesContent":["@import \"3cf237010a171787\";\n@import \"c38bef69f8745925\";\n@import \"3059048d79d64c86\";\n@import \"9bc41819d7d08688\";\n@import \"013b65d3da939c1f\";\n@import \"972afc4b5ba1159d\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {AvatarContext} from './Avatar';\nimport {baseColor, focusRing, fontRelative, style} from '../style' with { type: 'macro' };\nimport {ButtonProps, ButtonRenderProps, ContextValue, OverlayTriggerStateContext, Provider, Button as RACButton, useSlottedContext} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with { type: 'macro' };\nimport {IconContext} from './Icon';\nimport {NotificationBadgeContext} from './NotificationBadge';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonStyleProps {\n /**\n * The size of the ActionButton.\n *\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the ActionButton appears over a color background. */\n staticColor?: 'black' | 'white' | 'auto',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean\n}\n\ninterface ToggleButtonStyleProps {\n /** Whether the ActionButton should be selected (controlled). */\n isSelected?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\ninterface ActionGroupItemStyleProps {\n density?: 'regular' | 'compact',\n orientation?: 'horizontal' | 'vertical',\n isJustified?: boolean\n}\n\nexport interface ActionButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'isPending' | 'onClick'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the ActionButton. */\n children: ReactNode\n}\n\n// These styles handle both ActionButton and ToggleButton\nconst iconOnly = ':has([slot=icon], [slot=avatar]):not(:has([data-rsp-slot=text]))';\nconst textOnly = ':has([data-rsp-slot=text]):not(:has([slot=icon], [slot=avatar]))';\nexport const btnStyles = style<ButtonRenderProps & ActionButtonStyleProps & ToggleButtonStyleProps & ActionGroupItemStyleProps & {isInGroup: boolean, isStaticColor: boolean}>({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n columnGap: 'text-to-visual',\n flexShrink: {\n default: 1,\n isInGroup: 0\n },\n flexGrow: {\n isJustified: 1\n },\n flexBasis: {\n isJustified: 0\n },\n font: 'control',\n fontWeight: 'medium',\n userSelect: 'none',\n height: 'control',\n minWidth: 'control',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: {\n ...baseColor('gray-100'),\n default: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isSelected: {\n default: 'neutral',\n isEmphasized: 'accent',\n isDisabled: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isStaticColor: {\n ...baseColor('transparent-overlay-100'),\n default: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n },\n isSelected: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n }\n }\n },\n forcedColors: {\n default: 'ButtonFace',\n isSelected: {\n default: 'Highlight',\n isDisabled: 'ButtonFace'\n }\n }\n },\n color: {\n default: 'neutral',\n isSelected: {\n default: 'gray-25',\n isEmphasized: 'white'\n },\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isSelected: 'auto',\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isSelected: 'HighlightText',\n isDisabled: {\n default: 'GrayText'\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n },\n borderStyle: 'none',\n paddingX: {\n default: 'edge-to-text',\n [iconOnly]: 0\n },\n paddingY: 0,\n borderTopStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':first-child': 'control'\n }\n }\n },\n borderTopEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':last-child': 'control'\n },\n vertical: {\n ':first-child': 'control'\n }\n }\n }\n }\n },\n borderBottomStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':first-child': 'control'\n },\n vertical: {\n ':last-child': 'control'\n }\n }\n }\n }\n },\n borderBottomEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':last-child': 'control'\n }\n }\n },\n '--iconMargin': {\n type: 'marginTop',\n value: {\n default: fontRelative(-2),\n [iconOnly]: 0\n }\n },\n zIndex: {\n isFocusVisible: 2\n },\n disableTapHighlight: true,\n '--badgeTop': {\n type: 'top',\n value: {\n default: '[calc(self(height)/2 - var(--iconWidth)/2)]',\n [textOnly]: 0\n }\n },\n '--buttonPaddingX': {\n type: 'paddingStart',\n value: {\n default: 'edge-to-text',\n [iconOnly]: 0\n }\n },\n '--iconWidth': {\n type: 'width',\n value: fontRelative(20)\n },\n '--badgePosition': {\n type: 'width',\n value: {\n default: '[calc(var(--buttonPaddingX) + var(--iconWidth))]',\n [iconOnly]: '[calc(self(minWidth)/2 + var(--iconWidth)/2)]',\n [textOnly]: 'full'\n }\n }\n}, getAllowedOverrides());\n\n// Matching icon sizes. TBD.\nconst avatarSize = {\n XS: 14,\n S: 16,\n M: 20,\n L: 22,\n X: 26\n} as const;\n\nexport const ActionButtonContext = createContext<ContextValue<Partial<ActionButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionButtons allow users to perform an action.\n * They're used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren't meant to draw a lot of attention.\n */\nexport const ActionButton = forwardRef(function ActionButton(props: ActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n let ctx = useSlottedContext(ActionButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n\n return (\n <RACButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }],\n [AvatarContext, {\n size: avatarSize[size],\n styles: style({marginStart: '--iconMargin', flexShrink: 0, order: 0})\n }],\n [NotificationBadgeContext, {\n staticColor: staticColor,\n size: props.size === 'XS' ? undefined : props.size,\n isDisabled: props.isDisabled,\n styles: style({position: 'absolute', top: '--badgeTop', insetStart: '[var(--badgePosition)]', marginTop: '[calc((self(height) * -1)/2)]', marginStart: '[calc((self(height) * -1)/2)]'})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACButton>\n );\n});\n"],"names":[],"version":3,"file":"ActionButton.css.map"}
1
+ {"mappings":"AC+DyB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAiPQ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAGb;;;;EAAA;;;;EAIA;;;;EAAA;;;;EAAA;;;;EAMA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AA9PK;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["2931924df01dc677","packages/@react-spectrum/s2/src/ActionButton.tsx"],"sourcesContent":["@import \"3cf237010a171787\";\n@import \"c38bef69f8745925\";\n@import \"3059048d79d64c86\";\n@import \"9bc41819d7d08688\";\n@import \"013b65d3da939c1f\";\n@import \"972afc4b5ba1159d\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {AvatarContext} from './Avatar';\nimport {baseColor, focusRing, fontRelative, style} from '../style' with { type: 'macro' };\nimport {ButtonProps, ButtonRenderProps, ContextValue, OverlayTriggerStateContext, Provider, Button as RACButton, useSlottedContext} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with { type: 'macro' };\nimport {IconContext} from './Icon';\nimport {NotificationBadgeContext} from './NotificationBadge';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonStyleProps {\n /**\n * The size of the ActionButton.\n *\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the ActionButton appears over a color background. */\n staticColor?: 'black' | 'white' | 'auto',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean\n}\n\ninterface ToggleButtonStyleProps {\n /** Whether the ActionButton should be selected (controlled). */\n isSelected?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\ninterface ActionGroupItemStyleProps {\n density?: 'regular' | 'compact',\n orientation?: 'horizontal' | 'vertical',\n isJustified?: boolean\n}\n\nexport interface ActionButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'isPending' | 'onClick'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the ActionButton. */\n children: ReactNode\n}\n\n// These styles handle both ActionButton and ToggleButton\nconst iconOnly = ':has([slot=icon], [slot=avatar]):not(:has([data-rsp-slot=text]))';\nconst textOnly = ':has([data-rsp-slot=text]):not(:has([slot=icon], [slot=avatar]))';\nexport const btnStyles = style<ButtonRenderProps & ActionButtonStyleProps & ToggleButtonStyleProps & ActionGroupItemStyleProps & {isInGroup: boolean, isStaticColor: boolean}>({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n columnGap: 'text-to-visual',\n flexShrink: {\n default: 1,\n isInGroup: 0\n },\n flexGrow: {\n isJustified: 1\n },\n flexBasis: {\n isJustified: 0\n },\n font: 'control',\n fontWeight: 'medium',\n userSelect: 'none',\n height: 'control',\n minWidth: 'control',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: {\n ...baseColor('gray-100'),\n default: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isSelected: {\n default: 'neutral',\n isEmphasized: 'accent',\n isDisabled: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isStaticColor: {\n ...baseColor('transparent-overlay-100'),\n default: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n },\n isSelected: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n }\n }\n },\n forcedColors: {\n default: 'ButtonFace',\n isSelected: {\n default: 'Highlight',\n isDisabled: 'ButtonFace'\n }\n }\n },\n color: {\n default: 'neutral',\n isSelected: {\n default: 'gray-25',\n isEmphasized: 'white'\n },\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isSelected: 'auto',\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isSelected: 'HighlightText',\n isDisabled: {\n default: 'GrayText'\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n },\n borderStyle: 'none',\n paddingX: {\n default: 'edge-to-text',\n [iconOnly]: 0\n },\n paddingY: 0,\n borderTopStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':first-child': 'control'\n }\n }\n },\n borderTopEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':last-child': 'control'\n },\n vertical: {\n ':first-child': 'control'\n }\n }\n }\n }\n },\n borderBottomStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':first-child': 'control'\n },\n vertical: {\n ':last-child': 'control'\n }\n }\n }\n }\n },\n borderBottomEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':last-child': 'control'\n }\n }\n },\n '--iconMargin': {\n type: 'marginTop',\n value: {\n default: fontRelative(-2),\n [iconOnly]: 0\n }\n },\n zIndex: {\n isFocusVisible: 2\n },\n disableTapHighlight: true,\n '--badgeTop': {\n type: 'top',\n value: {\n default: '[calc(self(height)/2 - var(--iconWidth)/2)]',\n [textOnly]: 0\n }\n },\n '--buttonPaddingX': {\n type: 'paddingStart',\n value: {\n default: 'edge-to-text',\n [iconOnly]: 0\n }\n },\n '--iconWidth': {\n type: 'width',\n value: fontRelative(20)\n },\n '--badgePosition': {\n type: 'width',\n value: {\n default: '[calc(var(--buttonPaddingX) + var(--iconWidth))]',\n [iconOnly]: '[calc(self(minWidth)/2 + var(--iconWidth)/2)]',\n [textOnly]: 'full'\n }\n }\n}, getAllowedOverrides());\n\n// Matching icon sizes. TBD.\nconst avatarSize = {\n XS: 14,\n S: 16,\n M: 20,\n L: 22,\n X: 26\n} as const;\n\nexport const ActionButtonContext = createContext<ContextValue<Partial<ActionButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionButtons allow users to perform an action.\n * They're used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren't meant to draw a lot of attention.\n */\nexport const ActionButton = forwardRef(function ActionButton(props: ActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n let ctx = useSlottedContext(ActionButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n\n return (\n <RACButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }],\n [AvatarContext, {\n size: avatarSize[size],\n styles: style({marginStart: '--iconMargin', flexShrink: 0, order: 0})\n }],\n [NotificationBadgeContext, {\n staticColor: staticColor,\n size: props.size === 'XS' ? undefined : props.size,\n isDisabled: props.isDisabled,\n styles: style({position: 'absolute', top: '--badgeTop', insetStart: '[var(--badgePosition)]', marginTop: '[calc((self(height) * -1)/2)]', marginStart: '[calc((self(height) * -1)/2)]'})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACButton>\n );\n});\n"],"names":[],"version":3,"file":"ActionButton.css.map"}
@@ -42,194 +42,195 @@ import {useFocusableRef as $hl1Zj$useFocusableRef} from "@react-spectrum/utils";
42
42
  const $da878a05ab4a403e$var$iconOnly = ':has([slot=icon], [slot=avatar]):not(:has([data-rsp-slot=text]))';
43
43
  const $da878a05ab4a403e$var$textOnly = ':has([data-rsp-slot=text]):not(:has([slot=icon], [slot=avatar]))';
44
44
  const $da878a05ab4a403e$export$446543cff2a0f496 = function anonymous(props, overrides) {
45
- let rules = " .";
46
- 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) || [];
47
- rules += matches.join('');
48
- let $_9 = false;
49
- let $__a = false;
50
- let $h = false;
51
- let $q = false;
52
- let $__R = false;
45
+ let rules = " ";
46
+ let flexShrink = false;
47
+ let flexGrow = false;
48
+ let flexBasis = false;
49
+ let minWidth = false;
50
+ let zIndex = false;
51
+ let matches = (overrides || '').matchAll(/(?:^|\s)(j|l|h|i|_H|_r|M|__f|_X|_M|L|N|_f|_d|K|__B|H|G|J|I|f|u|_l)[^\s]+/g);
53
52
  for (let p of matches){
54
- if (/^\s*_9/.test(p)) $_9 = true;
55
- if (/^\s*__a/.test(p)) $__a = true;
56
- if (/^\s*h/.test(p)) $h = true;
57
- if (/^\s*q/.test(p)) $q = true;
58
- if (/^\s*__R/.test(p)) $__R = true;
53
+ if (p[1] === "_r") flexShrink = true;
54
+ if (p[1] === "_H") flexGrow = true;
55
+ if (p[1] === "M") flexBasis = true;
56
+ if (p[1] === "u") minWidth = true;
57
+ if (p[1] === "__B") zIndex = true;
58
+ rules += p[0];
59
59
  }
60
- if (props.isFocusVisible) rules += ' _Mb';
61
- else rules += ' _Ma';
62
- rules += ' da_____M';
63
- if (props.isStaticColor) rules += ' d_____G';
64
- else rules += ' dx';
65
- rules += ' _Oc';
66
- rules += ' _N-3t1z';
67
- if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
68
- else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
69
- rules += ' _0d';
70
- rules += ' _2c';
71
- rules += ' _3d';
72
- rules += ' jbH';
73
- rules += ' jG';
74
- if (!$_9) {
75
- if (props.isInGroup) rules += ' _9-3t1x';
76
- else rules += ' _9-3t1y';
77
- }
78
- if (!$__a) {
79
- if (props.isJustified) rules += ' __a-3t1y';
60
+ if (props.isFocusVisible) rules += ' tb';
61
+ else rules += ' ta';
62
+ if (props.isStaticColor) rules += ' Bd';
63
+ else rules += ' Bb';
64
+ rules += ' Bba';
65
+ rules += ' _ga';
66
+ rules += ' _ya';
67
+ if (props.staticColor === "white") rules += ' -Ovbhqd-cr';
68
+ else if (props.staticColor === "black") rules += ' -Ovbhqd-cs';
69
+ rules += ' ma';
70
+ rules += ' Fa';
71
+ rules += ' _pa';
72
+ rules += ' kb';
73
+ rules += ' kac';
74
+ if (props.isInGroup) {
75
+ if (!flexShrink) rules += ' _ra';
76
+ } else if (!flexShrink) rules += ' _rb';
77
+ if (props.isJustified) {
78
+ if (!flexGrow) rules += ' _Ha';
80
79
  }
81
- if (!$h) {
82
- if (props.isJustified) rules += ' ha';
80
+ if (props.isJustified) {
81
+ if (!flexBasis) rules += ' Ma';
83
82
  }
84
- rules += ' _d-bc1l9oh';
85
- rules += ' _d-1uotwbwg';
86
- rules += ' _d-eo0c6sf';
87
- rules += ' _d-enzzrge';
88
- rules += ' _d-enzykdd';
89
- rules += ' _d-enzwzjc';
90
- rules += ' _d-enzrfpb';
91
- rules += ' _da';
83
+ rules += ' bh';
84
+ rules += ' bdf';
85
+ rules += ' beg';
86
+ rules += ' bfa';
87
+ rules += ' bgb';
88
+ rules += ' bhd';
89
+ rules += ' bje';
90
+ rules += ' bic';
92
91
  if (props.size === "XL") {
93
- rules += ' _ebj';
94
- rules += ' _ei';
92
+ rules += ' ah';
93
+ rules += ' aac';
95
94
  } else if (props.size === "L") {
96
- rules += ' _ebh';
97
- rules += ' _eg';
95
+ rules += ' ae';
96
+ rules += ' aad';
98
97
  } else if (props.size === "S") {
99
- rules += ' _ebd';
100
- rules += ' _ec';
98
+ rules += ' af';
99
+ rules += ' aag';
101
100
  } else if (props.size === "XS") {
102
- rules += ' _ebb';
103
- rules += ' _ea';
101
+ rules += ' ai';
102
+ rules += ' aaj';
104
103
  } else {
105
- rules += ' _ebf';
106
- rules += ' _ee';
104
+ rules += ' aa';
105
+ rules += ' aab';
107
106
  }
108
- rules += ' _fc';
109
- rules += ' _g-1x99dlob';
110
- rules += ' _ga';
111
- if (props.isDisabled) rules += ' aa_____O';
112
- else if (props.isSelected) rules += ' aa_____N';
113
- else rules += ' aa_____K';
107
+ rules += ' Dd';
108
+ rules += ' Ed';
109
+ rules += ' Ca';
110
+ rules += ' gb';
111
+ rules += ' gca';
114
112
  if (props.isStaticColor) {
115
- if (props.isDisabled) rules += ' a_____A';
116
- else if (props.isSelected) rules += ' a_____R';
113
+ if (props.isDisabled) rules += ' ds';
114
+ else if (props.isSelected) rules += ' dr';
117
115
  else {
118
- if (props.isPressed) rules += ' a_____F';
119
- else if (props.isFocusVisible) rules += ' a_____F';
120
- else if (props.isHovered) rules += ' a_____F';
121
- else rules += ' a_____E';
116
+ if (props.isPressed) rules += ' dh';
117
+ else if (props.isFocusVisible) rules += ' dh';
118
+ else if (props.isHovered) rules += ' dh';
119
+ else rules += ' dn';
122
120
  }
123
- } else if (props.isDisabled) rules += ' aj';
121
+ } else if (props.isDisabled) rules += ' dc';
124
122
  else if (props.isSelected) {
125
- if (props.isEmphasized) rules += ' ac';
126
- else rules += ' ad';
123
+ if (props.isEmphasized) rules += ' dd';
124
+ else rules += ' dl';
127
125
  } else {
128
- if (props.isPressed) rules += ' ao';
129
- else if (props.isFocusVisible) rules += ' ao';
130
- else if (props.isHovered) rules += ' ao';
131
- else rules += ' an';
126
+ if (props.isPressed) rules += ' db';
127
+ else if (props.isFocusVisible) rules += ' db';
128
+ else if (props.isHovered) rules += ' db';
129
+ else rules += ' da';
132
130
  }
133
- rules += ' __Ea';
134
- rules += ' k-375toq';
135
- if (!$q) rules += ' q-375tow';
136
- rules += ' _Pa';
137
- rules += ' _R-375x7f';
138
- rules += ' _Sa';
139
- rules += ' _Ab';
140
- rules += ' b-375toh';
141
- rules += ' -rwx0fg_e-b';
142
- rules += ' wf';
143
- rules += ' C-1imc51ya';
144
- rules += ' CI';
145
- rules += ' D-1imc51ya';
146
- rules += ' DI';
147
- rules += ' Ea';
148
- rules += ' Fa';
131
+ if (props.isDisabled) rules += ' dbe';
132
+ else if (props.isSelected) rules += ' dbm';
133
+ else rules += ' dbf';
134
+ rules += ' _Qa';
135
+ rules += ' emLFGYc';
136
+ if (!minWidth) rules += ' uSTFGYc';
137
+ rules += ' _ia';
138
+ rules += ' _ka';
139
+ rules += ' _ea';
140
+ rules += ' _0a';
141
+ rules += ' ciKFGYc';
142
+ rules += ' -_8sjo0b-Oa';
143
+ rules += ' Rb';
144
+ rules += ' ob';
145
+ rules += ' oy5UFLda';
146
+ rules += ' nb';
147
+ rules += ' ny5UFLda';
148
+ rules += ' ra';
149
+ rules += ' va';
149
150
  if (props.density === "compact") {
150
- rules += ' _w-13alit4h';
151
- rules += ' _wa';
152
- } else rules += ' _wh';
151
+ rules += ' zf';
152
+ rules += ' zne';
153
+ } else rules += ' ze';
153
154
  if (props.density === "compact") {
154
- if (props.orientation === "vertical") rules += ' _x-13alit4h';
155
- else if (props.orientation === "horizontal") rules += ' _x-uamghwh';
156
- else rules += ' _xa';
157
- } else rules += ' _xh';
155
+ if (props.orientation === "vertical") rules += ' xnd';
156
+ else if (props.orientation === "horizontal") rules += ' xld';
157
+ else rules += ' xf';
158
+ } else rules += ' xd';
158
159
  if (props.density === "compact") {
159
- if (props.orientation === "vertical") rules += ' _y-uamghwh';
160
- else if (props.orientation === "horizontal") rules += ' _y-13alit4h';
161
- else rules += ' _ya';
162
- } else rules += ' _yh';
160
+ if (props.orientation === "vertical") rules += ' wld';
161
+ else if (props.orientation === "horizontal") rules += ' wnd';
162
+ else rules += ' wf';
163
+ } else rules += ' wd';
163
164
  if (props.density === "compact") {
164
- rules += ' _z-uamghwh';
165
- rules += ' _za';
166
- } else rules += ' _zh';
167
- rules += ' -oelgqu_A--1imc51ya';
168
- rules += ' -oelgqu_A--177861o';
169
- if (!$__R) {
170
- if (props.isFocusVisible) rules += ' __R-3t1z';
165
+ rules += ' yf';
166
+ rules += ' yle';
167
+ } else rules += ' ye';
168
+ rules += ' -Qg41Lb-jAxCW0c';
169
+ rules += ' -Qg41Lb-y5UFLdja';
170
+ if (props.isFocusVisible) {
171
+ if (!zIndex) rules += ' __Ba';
171
172
  }
172
- rules += ' __S-yksgrp';
173
- rules += ' -_1v78fj9_Y--17ppb3qa';
174
- rules += ' -_1v78fj9_Y--5w6sh5';
175
- rules += ' -_1rtgbwq_C--1imc51ya';
176
- rules += ' -_1rtgbwq_C-I';
177
- rules += ' -_17zm1mw_l--1sthc3k';
178
- rules += ' -_17brfqf_l--17ppb3qb';
179
- rules += ' -_17brfqf_l--1imc51y-pgyx2q';
180
- rules += ' -_17brfqf_l--2loc28';
181
- if (props.isSelected) {
182
- if (props.isDisabled) rules += ' -_375toh_b-a_____J';
183
- else rules += ' -_375toh_b-a_____M';
184
- } else rules += ' -_375toh_b-a_____J';
173
+ rules += ' _Ga';
174
+ rules += ' -B5H9Ae-H43Fjt';
175
+ rules += ' -B5H9Ae-wAP22cHa';
176
+ rules += ' -_6Gsjne-ob';
177
+ rules += ' -_6Gsjne-y5UFLdoa';
178
+ rules += ' -SqFa4c-fuUmpre';
179
+ rules += ' -dcAs1c-fGolOk';
180
+ rules += ' -dcAs1c-y5UFLdfmA3dWb';
181
+ rules += ' -dcAs1c-wAP22cfa';
185
182
  if (props.isStaticColor) {
186
183
  if (props.isSelected) {
187
184
  if (props.isDisabled) {
188
- if (props.isQuiet) rules += ' -_375toh_b-a';
189
- else rules += ' -_375toh_b-_____x';
185
+ if (props.isQuiet) rules += ' -c_-cd';
186
+ else rules += ' -c_-cf';
190
187
  } else {
191
- if (props.isPressed) rules += ' -_375toh_b-_____F';
192
- else if (props.isFocusVisible) rules += ' -_375toh_b-_____F';
193
- else if (props.isHovered) rules += ' -_375toh_b-_____F';
194
- else rules += ' -_375toh_b-_____E';
188
+ if (props.isPressed) rules += ' -c_-ck';
189
+ else if (props.isFocusVisible) rules += ' -c_-ck';
190
+ else if (props.isHovered) rules += ' -c_-ck';
191
+ else rules += ' -c_-cy';
195
192
  }
196
- } else if (props.isPressed) rules += ' -_375toh_b-_____y';
197
- else if (props.isFocusVisible) rules += ' -_375toh_b-_____y';
198
- else if (props.isHovered) rules += ' -_375toh_b-_____y';
199
- else if (props.isQuiet) rules += ' -_375toh_b-a';
200
- else rules += ' -_375toh_b-_____x';
193
+ } else if (props.isPressed) rules += ' -c_-ch';
194
+ else if (props.isFocusVisible) rules += ' -c_-ch';
195
+ else if (props.isHovered) rules += ' -c_-ch';
196
+ else if (props.isQuiet) rules += ' -c_-cd';
197
+ else rules += ' -c_-cf';
201
198
  } else if (props.isSelected) {
202
199
  if (props.isDisabled) {
203
- if (props.isQuiet) rules += ' -_375toh_b-a';
204
- else rules += ' -_375toh_b-g';
200
+ if (props.isQuiet) rules += ' -c_-cd';
201
+ else rules += ' -c_-ca';
205
202
  } else if (props.isEmphasized) {
206
- if (props.isPressed) rules += ' -_375toh_b-_____S';
207
- else if (props.isFocusVisible) rules += ' -_375toh_b-_____S';
208
- else if (props.isHovered) rules += ' -_375toh_b-_____S';
209
- else rules += ' -_375toh_b-_____R';
203
+ if (props.isPressed) rules += ' -c_-cb';
204
+ else if (props.isFocusVisible) rules += ' -c_-cb';
205
+ else if (props.isHovered) rules += ' -c_-cb';
206
+ else rules += ' -c_-cl';
210
207
  } else {
211
- if (props.isPressed) rules += ' -_375toh_b-o';
212
- else if (props.isFocusVisible) rules += ' -_375toh_b-o';
213
- else if (props.isHovered) rules += ' -_375toh_b-o';
214
- else rules += ' -_375toh_b-n';
208
+ if (props.isPressed) rules += ' -c_-cc';
209
+ else if (props.isFocusVisible) rules += ' -c_-cc';
210
+ else if (props.isHovered) rules += ' -c_-cc';
211
+ else rules += ' -c_-cm';
215
212
  }
216
213
  } else {
217
- if (props.isPressed) rules += ' -_375toh_b-h';
218
- else if (props.isFocusVisible) rules += ' -_375toh_b-h';
219
- else if (props.isHovered) rules += ' -_375toh_b-h';
220
- else if (props.isQuiet) rules += ' -_375toh_b-a';
221
- else rules += ' -_375toh_b-g';
214
+ if (props.isPressed) rules += ' -c_-ce';
215
+ else if (props.isFocusVisible) rules += ' -c_-ce';
216
+ else if (props.isHovered) rules += ' -c_-ce';
217
+ else if (props.isQuiet) rules += ' -c_-cd';
218
+ else rules += ' -c_-ca';
222
219
  }
223
- if (props.size === "XL") rules += ' -_375toq_k-j';
224
- else if (props.size === "L") rules += ' -_375toq_k-i';
225
- else if (props.size === "S") rules += ' -_375toq_k-h';
226
- else if (props.size === "XS") rules += ' -_375toq_k-g';
227
- else rules += ' -_375toq_k-f';
228
- if (props.size === "XL") rules += ' -_375tow_q-j';
229
- else if (props.size === "L") rules += ' -_375tow_q-i';
230
- else if (props.size === "S") rules += ' -_375tow_q-h';
231
- else if (props.size === "XS") rules += ' -_375tow_q-g';
232
- else rules += ' -_375tow_q-f';
220
+ if (props.isSelected) {
221
+ if (props.isDisabled) rules += ' -c_-bcn';
222
+ else rules += ' -c_-bcg';
223
+ } else rules += ' -c_-bcn';
224
+ if (props.size === "XL") rules += ' -e_-ee';
225
+ else if (props.size === "L") rules += ' -e_-ed';
226
+ else if (props.size === "S") rules += ' -e_-eb';
227
+ else if (props.size === "XS") rules += ' -e_-ea';
228
+ else rules += ' -e_-ec';
229
+ if (props.size === "XL") rules += ' -u_-ub';
230
+ else if (props.size === "L") rules += ' -u_-ud';
231
+ else if (props.size === "S") rules += ' -u_-uc';
232
+ else if (props.size === "XS") rules += ' -u_-ua';
233
+ else rules += ' -u_-ue';
233
234
  return rules;
234
235
  };
235
236
  // Matching icon sizes. TBD.
@@ -276,7 +277,7 @@ const $da878a05ab4a403e$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $hl1Zj$forwa
276
277
  [
277
278
  (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
278
279
  {
279
- styles: " E-1gogtue F-1gogtue __B-3t1y __wb __xb _na _qb"
280
+ styles: " rAzEcG vAzEcG _Mb _oa _ha _Ta _za"
280
281
  }
281
282
  ],
282
283
  [
@@ -284,16 +285,16 @@ const $da878a05ab4a403e$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $hl1Zj$forwa
284
285
  {
285
286
  render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
286
287
  slot: 'icon',
287
- styles: " __B-3t1x"
288
+ styles: " _Ma"
288
289
  }),
289
- styles: " l-1sthc3k k-1sthc3k y-oelgqu _9-3t1x"
290
+ styles: " fuUmpre euUmpre h67logd _ra"
290
291
  }
291
292
  ],
292
293
  [
293
294
  (0, $3ffa2cd930156220$export$a20dad690e1279e2),
294
295
  {
295
296
  size: $da878a05ab4a403e$var$avatarSize[size],
296
- styles: " y-oelgqu _9-3t1x __B-3t1x"
297
+ styles: " h67logd _ra _Ma"
297
298
  }
298
299
  ],
299
300
  [
@@ -302,7 +303,7 @@ const $da878a05ab4a403e$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $hl1Zj$forwa
302
303
  staticColor: staticColor,
303
304
  size: props.size === 'XS' ? undefined : props.size,
304
305
  isDisabled: props.isDisabled,
305
- styles: " Va Y-1v78fj9 W-8959nl A-1q7bl7b y-1q7bl7b"
306
+ styles: " Kb HtedXZc J1IiWH jOIQSzc hOIQSzc"
306
307
  }
307
308
  ]
308
309
  ],
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAkDD,yDAAyD;AACzD,MAAM,iCAAW;AACjB,MAAM,iCAAW;AACV,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0Lb,4BAA4B;AAC5B,MAAM,mCAAa;IACjB,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;AACL;AAEO,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAkF;AAM1H,MAAM,0DAAe,CAAA,GAAA,iBAAS,EAAE,SAAS,aAAa,KAAwB,EAAE,GAAoC;IACzH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,sBAAsB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,iCAAyB;IAC9D,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,CAAA,GAAA,yCAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,QACvB,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAGZ,qBACE,gBAAC,CAAA,GAAA,aAAQ;QACN,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,0CAAU;gBACnE,GAAG,WAAW;gBACd,+CAA+C;gBAC/C,WAAW,YAAY,SAAS,IAAI,qBAAqB,UAAU;6BACnE;gBACA,eAAe,CAAC,CAAC;sBACjB;yBACA;yBACA;6BACA;6BACA;2BACA;YACF,GAAG,MAAM,MAAM;kBACf,cAAA,gBAAC,CAAA,GAAA,eAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBAAC,MAAM;oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,yCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;gBACF;oBAAC,CAAA,GAAA,yCAAY;oBAAG;wBACd,MAAM,gCAAU,CAAC,KAAK;wBACtB,MAAM;oBACR;iBAAE;gBACF;oBAAC,CAAA,GAAA,yCAAuB;oBAAG;wBACzB,aAAa;wBACb,MAAM,MAAM,IAAI,KAAK,OAAO,YAAY,MAAM,IAAI;wBAClD,YAAY,MAAM,UAAU;wBAC5B,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gBAAC,CAAA,GAAA,yCAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/ActionButton.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 {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {AvatarContext} from './Avatar';\nimport {baseColor, focusRing, fontRelative, style} from '../style' with { type: 'macro' };\nimport {ButtonProps, ButtonRenderProps, ContextValue, OverlayTriggerStateContext, Provider, Button as RACButton, useSlottedContext} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with { type: 'macro' };\nimport {IconContext} from './Icon';\nimport {NotificationBadgeContext} from './NotificationBadge';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonStyleProps {\n /**\n * The size of the ActionButton.\n *\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the ActionButton appears over a color background. */\n staticColor?: 'black' | 'white' | 'auto',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean\n}\n\ninterface ToggleButtonStyleProps {\n /** Whether the ActionButton should be selected (controlled). */\n isSelected?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\ninterface ActionGroupItemStyleProps {\n density?: 'regular' | 'compact',\n orientation?: 'horizontal' | 'vertical',\n isJustified?: boolean\n}\n\nexport interface ActionButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'isPending' | 'onClick'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the ActionButton. */\n children: ReactNode\n}\n\n// These styles handle both ActionButton and ToggleButton\nconst iconOnly = ':has([slot=icon], [slot=avatar]):not(:has([data-rsp-slot=text]))';\nconst textOnly = ':has([data-rsp-slot=text]):not(:has([slot=icon], [slot=avatar]))';\nexport const btnStyles = style<ButtonRenderProps & ActionButtonStyleProps & ToggleButtonStyleProps & ActionGroupItemStyleProps & {isInGroup: boolean, isStaticColor: boolean}>({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n columnGap: 'text-to-visual',\n flexShrink: {\n default: 1,\n isInGroup: 0\n },\n flexGrow: {\n isJustified: 1\n },\n flexBasis: {\n isJustified: 0\n },\n font: 'control',\n fontWeight: 'medium',\n userSelect: 'none',\n height: 'control',\n minWidth: 'control',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: {\n ...baseColor('gray-100'),\n default: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isSelected: {\n default: 'neutral',\n isEmphasized: 'accent',\n isDisabled: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isStaticColor: {\n ...baseColor('transparent-overlay-100'),\n default: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n },\n isSelected: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n }\n }\n },\n forcedColors: {\n default: 'ButtonFace',\n isSelected: {\n default: 'Highlight',\n isDisabled: 'ButtonFace'\n }\n }\n },\n color: {\n default: 'neutral',\n isSelected: {\n default: 'gray-25',\n isEmphasized: 'white'\n },\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isSelected: 'auto',\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isSelected: 'HighlightText',\n isDisabled: {\n default: 'GrayText'\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n },\n borderStyle: 'none',\n paddingX: {\n default: 'edge-to-text',\n [iconOnly]: 0\n },\n paddingY: 0,\n borderTopStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':first-child': 'control'\n }\n }\n },\n borderTopEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':last-child': 'control'\n },\n vertical: {\n ':first-child': 'control'\n }\n }\n }\n }\n },\n borderBottomStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':first-child': 'control'\n },\n vertical: {\n ':last-child': 'control'\n }\n }\n }\n }\n },\n borderBottomEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':last-child': 'control'\n }\n }\n },\n '--iconMargin': {\n type: 'marginTop',\n value: {\n default: fontRelative(-2),\n [iconOnly]: 0\n }\n },\n zIndex: {\n isFocusVisible: 2\n },\n disableTapHighlight: true,\n '--badgeTop': {\n type: 'top',\n value: {\n default: '[calc(self(height)/2 - var(--iconWidth)/2)]',\n [textOnly]: 0\n }\n },\n '--buttonPaddingX': {\n type: 'paddingStart',\n value: {\n default: 'edge-to-text',\n [iconOnly]: 0\n }\n },\n '--iconWidth': {\n type: 'width',\n value: fontRelative(20)\n },\n '--badgePosition': {\n type: 'width',\n value: {\n default: '[calc(var(--buttonPaddingX) + var(--iconWidth))]',\n [iconOnly]: '[calc(self(minWidth)/2 + var(--iconWidth)/2)]',\n [textOnly]: 'full'\n }\n }\n}, getAllowedOverrides());\n\n// Matching icon sizes. TBD.\nconst avatarSize = {\n XS: 14,\n S: 16,\n M: 20,\n L: 22,\n X: 26\n} as const;\n\nexport const ActionButtonContext = createContext<ContextValue<Partial<ActionButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionButtons allow users to perform an action.\n * They're used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren't meant to draw a lot of attention.\n */\nexport const ActionButton = forwardRef(function ActionButton(props: ActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n let ctx = useSlottedContext(ActionButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n\n return (\n <RACButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }],\n [AvatarContext, {\n size: avatarSize[size],\n styles: style({marginStart: '--iconMargin', flexShrink: 0, order: 0})\n }],\n [NotificationBadgeContext, {\n staticColor: staticColor,\n size: props.size === 'XS' ? undefined : props.size,\n isDisabled: props.isDisabled,\n styles: style({position: 'absolute', top: '--badgeTop', insetStart: '[var(--badgePosition)]', marginTop: '[calc((self(height) * -1)/2)]', marginStart: '[calc((self(height) * -1)/2)]'})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACButton>\n );\n});\n"],"names":[],"version":3,"file":"ActionButton.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAkDD,yDAAyD;AACzD,MAAM,iCAAW;AACjB,MAAM,iCAAW;AACV,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0Lb,4BAA4B;AAC5B,MAAM,mCAAa;IACjB,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;AACL;AAEO,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAkF;AAM1H,MAAM,0DAAe,CAAA,GAAA,iBAAS,EAAE,SAAS,aAAa,KAAwB,EAAE,GAAoC;IACzH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,sBAAsB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,iCAAyB;IAC9D,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,CAAA,GAAA,yCAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,QACvB,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAGZ,qBACE,gBAAC,CAAA,GAAA,aAAQ;QACN,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,0CAAU;gBACnE,GAAG,WAAW;gBACd,+CAA+C;gBAC/C,WAAW,YAAY,SAAS,IAAI,qBAAqB,UAAU;6BACnE;gBACA,eAAe,CAAC,CAAC;sBACjB;yBACA;yBACA;6BACA;6BACA;2BACA;YACF,GAAG,MAAM,MAAM;kBACf,cAAA,gBAAC,CAAA,GAAA,eAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBAAC,MAAM;oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,yCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;gBACF;oBAAC,CAAA,GAAA,yCAAY;oBAAG;wBACd,MAAM,gCAAU,CAAC,KAAK;wBACtB,MAAM;oBACR;iBAAE;gBACF;oBAAC,CAAA,GAAA,yCAAuB;oBAAG;wBACzB,aAAa;wBACb,MAAM,MAAM,IAAI,KAAK,OAAO,YAAY,MAAM,IAAI;wBAClD,YAAY,MAAM,UAAU;wBAC5B,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gBAAC,CAAA,GAAA,yCAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/ActionButton.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 {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {AvatarContext} from './Avatar';\nimport {baseColor, focusRing, fontRelative, style} from '../style' with { type: 'macro' };\nimport {ButtonProps, ButtonRenderProps, ContextValue, OverlayTriggerStateContext, Provider, Button as RACButton, useSlottedContext} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with { type: 'macro' };\nimport {IconContext} from './Icon';\nimport {NotificationBadgeContext} from './NotificationBadge';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonStyleProps {\n /**\n * The size of the ActionButton.\n *\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the ActionButton appears over a color background. */\n staticColor?: 'black' | 'white' | 'auto',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean\n}\n\ninterface ToggleButtonStyleProps {\n /** Whether the ActionButton should be selected (controlled). */\n isSelected?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\ninterface ActionGroupItemStyleProps {\n density?: 'regular' | 'compact',\n orientation?: 'horizontal' | 'vertical',\n isJustified?: boolean\n}\n\nexport interface ActionButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'isPending' | 'onClick'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the ActionButton. */\n children: ReactNode\n}\n\n// These styles handle both ActionButton and ToggleButton\nconst iconOnly = ':has([slot=icon], [slot=avatar]):not(:has([data-rsp-slot=text]))';\nconst textOnly = ':has([data-rsp-slot=text]):not(:has([slot=icon], [slot=avatar]))';\nexport const btnStyles = style<ButtonRenderProps & ActionButtonStyleProps & ToggleButtonStyleProps & ActionGroupItemStyleProps & {isInGroup: boolean, isStaticColor: boolean}>({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n columnGap: 'text-to-visual',\n flexShrink: {\n default: 1,\n isInGroup: 0\n },\n flexGrow: {\n isJustified: 1\n },\n flexBasis: {\n isJustified: 0\n },\n font: 'control',\n fontWeight: 'medium',\n userSelect: 'none',\n height: 'control',\n minWidth: 'control',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: {\n ...baseColor('gray-100'),\n default: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isSelected: {\n default: 'neutral',\n isEmphasized: 'accent',\n isDisabled: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isStaticColor: {\n ...baseColor('transparent-overlay-100'),\n default: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n },\n isSelected: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n }\n }\n },\n forcedColors: {\n default: 'ButtonFace',\n isSelected: {\n default: 'Highlight',\n isDisabled: 'ButtonFace'\n }\n }\n },\n color: {\n default: 'neutral',\n isSelected: {\n default: 'gray-25',\n isEmphasized: 'white'\n },\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isSelected: 'auto',\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isSelected: 'HighlightText',\n isDisabled: {\n default: 'GrayText'\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n },\n borderStyle: 'none',\n paddingX: {\n default: 'edge-to-text',\n [iconOnly]: 0\n },\n paddingY: 0,\n borderTopStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':first-child': 'control'\n }\n }\n },\n borderTopEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':last-child': 'control'\n },\n vertical: {\n ':first-child': 'control'\n }\n }\n }\n }\n },\n borderBottomStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':first-child': 'control'\n },\n vertical: {\n ':last-child': 'control'\n }\n }\n }\n }\n },\n borderBottomEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':last-child': 'control'\n }\n }\n },\n '--iconMargin': {\n type: 'marginTop',\n value: {\n default: fontRelative(-2),\n [iconOnly]: 0\n }\n },\n zIndex: {\n isFocusVisible: 2\n },\n disableTapHighlight: true,\n '--badgeTop': {\n type: 'top',\n value: {\n default: '[calc(self(height)/2 - var(--iconWidth)/2)]',\n [textOnly]: 0\n }\n },\n '--buttonPaddingX': {\n type: 'paddingStart',\n value: {\n default: 'edge-to-text',\n [iconOnly]: 0\n }\n },\n '--iconWidth': {\n type: 'width',\n value: fontRelative(20)\n },\n '--badgePosition': {\n type: 'width',\n value: {\n default: '[calc(var(--buttonPaddingX) + var(--iconWidth))]',\n [iconOnly]: '[calc(self(minWidth)/2 + var(--iconWidth)/2)]',\n [textOnly]: 'full'\n }\n }\n}, getAllowedOverrides());\n\n// Matching icon sizes. TBD.\nconst avatarSize = {\n XS: 14,\n S: 16,\n M: 20,\n L: 22,\n X: 26\n} as const;\n\nexport const ActionButtonContext = createContext<ContextValue<Partial<ActionButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionButtons allow users to perform an action.\n * They're used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren't meant to draw a lot of attention.\n */\nexport const ActionButton = forwardRef(function ActionButton(props: ActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n let ctx = useSlottedContext(ActionButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n\n return (\n <RACButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }],\n [AvatarContext, {\n size: avatarSize[size],\n styles: style({marginStart: '--iconMargin', flexShrink: 0, order: 0})\n }],\n [NotificationBadgeContext, {\n staticColor: staticColor,\n size: props.size === 'XS' ? undefined : props.size,\n isDisabled: props.isDisabled,\n styles: style({position: 'absolute', top: '--badgeTop', insetStart: '[var(--badgePosition)]', marginTop: '[calc((self(height) * -1)/2)]', marginStart: '[calc((self(height) * -1)/2)]'})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACButton>\n );\n});\n"],"names":[],"version":3,"file":"ActionButton.mjs.map"}
@@ -27,26 +27,25 @@ $parcel$export(module.exports, "ActionButtonGroup", () => $7a26131f6144af2b$expo
27
27
 
28
28
 
29
29
  const $7a26131f6144af2b$export$641cbcd1f6f6802f = function anonymous(props, overrides) {
30
- let rules = " .";
31
- 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) || [];
32
- rules += matches.join('');
33
- rules += ' _0d';
34
- if (props.orientation === "vertical") rules += ' _7b';
35
- else if (props.orientation === "horizontal") rules += ' _7a';
30
+ let rules = " ";
31
+ rules += ((overrides || '').match(/(?:^|\s)(j|l|h|i|_H|_r|M|__f|_X|_M|L|N|_f|_d|K|__B|H|G|J|I|f|u|_l|e|s|_w)[^\s]+/g) || []).join('');
32
+ rules += ' ma';
33
+ if (props.orientation === "vertical") rules += ' _Ba';
34
+ else if (props.orientation === "horizontal") rules += ' _Bb';
36
35
  if (props.density === "regular") {
37
- if (props.size === "XL") rules += ' id';
38
- else if (props.size === "L") rules += ' id';
39
- else if (props.size === "M") rules += ' id';
40
- else if (props.size === "S") rules += ' ic';
41
- else if (props.size === "XS") rules += ' ic';
42
- } else if (props.density === "compact") rules += ' ib';
36
+ if (props.size === "XL") rules += ' pa';
37
+ else if (props.size === "L") rules += ' pa';
38
+ else if (props.size === "M") rules += ' pa';
39
+ else if (props.size === "S") rules += ' pb';
40
+ else if (props.size === "XS") rules += ' pb';
41
+ } else if (props.density === "compact") rules += ' pg';
43
42
  if (props.density === "regular") {
44
- if (props.size === "XL") rules += ' jd';
45
- else if (props.size === "L") rules += ' jd';
46
- else if (props.size === "M") rules += ' jd';
47
- else if (props.size === "S") rules += ' jc';
48
- else if (props.size === "XS") rules += ' jc';
49
- } else if (props.density === "compact") rules += ' jb';
43
+ if (props.size === "XL") rules += ' kd';
44
+ else if (props.size === "L") rules += ' kd';
45
+ else if (props.size === "M") rules += ' kd';
46
+ else if (props.size === "S") rules += ' ke';
47
+ else if (props.size === "XS") rules += ' ke';
48
+ } else if (props.density === "compact") rules += ' ki';
50
49
  return rules;
51
50
  };
52
51
  const $7a26131f6144af2b$export$33f5f2f2cb85d743 = /*#__PURE__*/ (0, $jGK4W$react.createContext)(null);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAuCM,MAAM;;;;;;;;;;;;;;;;;;;;;;;AAyBN,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAAiE;AAK9G,MAAM,0DAAoB,CAAA,GAAA,uBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,WACF,UAAU,iBACV,OAAO,kBACP,cAAc,2BACd,WAAW,YACX,QAAQ,oBACR,mBAAmB,kBACnB,YAAY,UACZ,MAAM,EACP,GAAG;IAEJ,qBACE,gCAAC,CAAA,GAAA,kCAAM;QACJ,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB,0CAAiB;kBAAC;qBAAM;yBAAS;yBAAa;QAAW,GAAG;kBAC1F,cAAA,gCAAC,0CAAyB,QAAQ;YAAC,OAAO;sBACvC;;;AAIT","sources":["packages/@react-spectrum/s2/src/ActionButtonGroup.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 {AriaLabelingProps} from '@react-types/shared';\nimport {ContextValue, SlotProps, Toolbar} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonGroupProps extends AriaLabelingProps, UnsafeStyles, SlotProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The children of the group. */\n children: ReactNode,\n /**\n * Size of the buttons.\n * @default \"M\"\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /**\n * Spacing between the buttons.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean,\n /** Whether the buttons should divide the container width equally. */\n isJustified?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n staticColor?: 'white' | 'black' | 'auto',\n /**\n * The axis the group should align with.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** Whether the group is disabled. */\n isDisabled?: boolean\n}\n\nexport const actionGroupStyle = style({\n display: 'flex',\n flexDirection: {\n orientation: {\n horizontal: 'row',\n vertical: 'column'\n }\n },\n gap: {\n density: {\n compact: 2,\n regular: {\n size: {\n XS: 4,\n S: 4,\n M: 8,\n L: 8,\n XL: 8\n }\n }\n }\n }\n}, getAllowedOverrides({height: true}));\n\n\nexport const ActionButtonGroupContext = createContext<ContextValue<Partial<ActionButtonGroupProps>, HTMLDivElement>>(null);\n\n/**\n * An ActionButtonGroup is a grouping of related ActionButtons.\n */\nexport const ActionButtonGroup = forwardRef(function ActionButtonGroup(props: ActionButtonGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonGroupContext);\n let {\n density = 'regular',\n size = 'M',\n orientation = 'horizontal',\n isJustified,\n children,\n UNSAFE_className = '',\n UNSAFE_style,\n styles\n } = props;\n\n return (\n <Toolbar\n {...props}\n ref={ref}\n style={UNSAFE_style}\n className={UNSAFE_className + actionGroupStyle({size, density, orientation, isJustified}, styles)}>\n <ActionButtonGroupContext.Provider value={props}>\n {children}\n </ActionButtonGroupContext.Provider>\n </Toolbar>\n );\n});\n"],"names":[],"version":3,"file":"ActionButtonGroup.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAuCM,MAAM;;;;;;;;;;;;;;;;;;;;;;AAyBN,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAAiE;AAK9G,MAAM,0DAAoB,CAAA,GAAA,uBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,WACF,UAAU,iBACV,OAAO,kBACP,cAAc,2BACd,WAAW,YACX,QAAQ,oBACR,mBAAmB,kBACnB,YAAY,UACZ,MAAM,EACP,GAAG;IAEJ,qBACE,gCAAC,CAAA,GAAA,kCAAM;QACJ,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB,0CAAiB;kBAAC;qBAAM;yBAAS;yBAAa;QAAW,GAAG;kBAC1F,cAAA,gCAAC,0CAAyB,QAAQ;YAAC,OAAO;sBACvC;;;AAIT","sources":["packages/@react-spectrum/s2/src/ActionButtonGroup.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 {AriaLabelingProps} from '@react-types/shared';\nimport {ContextValue, SlotProps, Toolbar} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonGroupProps extends AriaLabelingProps, UnsafeStyles, SlotProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The children of the group. */\n children: ReactNode,\n /**\n * Size of the buttons.\n * @default \"M\"\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /**\n * Spacing between the buttons.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean,\n /** Whether the buttons should divide the container width equally. */\n isJustified?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n staticColor?: 'white' | 'black' | 'auto',\n /**\n * The axis the group should align with.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** Whether the group is disabled. */\n isDisabled?: boolean\n}\n\nexport const actionGroupStyle = style({\n display: 'flex',\n flexDirection: {\n orientation: {\n horizontal: 'row',\n vertical: 'column'\n }\n },\n gap: {\n density: {\n compact: 2,\n regular: {\n size: {\n XS: 4,\n S: 4,\n M: 8,\n L: 8,\n XL: 8\n }\n }\n }\n }\n}, getAllowedOverrides({height: true}));\n\n\nexport const ActionButtonGroupContext = createContext<ContextValue<Partial<ActionButtonGroupProps>, HTMLDivElement>>(null);\n\n/**\n * An ActionButtonGroup is a grouping of related ActionButtons.\n */\nexport const ActionButtonGroup = forwardRef(function ActionButtonGroup(props: ActionButtonGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonGroupContext);\n let {\n density = 'regular',\n size = 'M',\n orientation = 'horizontal',\n isJustified,\n children,\n UNSAFE_className = '',\n UNSAFE_style,\n styles\n } = props;\n\n return (\n <Toolbar\n {...props}\n ref={ref}\n style={UNSAFE_style}\n className={UNSAFE_className + actionGroupStyle({size, density, orientation, isJustified}, styles)}>\n <ActionButtonGroupContext.Provider value={props}>\n {children}\n </ActionButtonGroupContext.Provider>\n </Toolbar>\n );\n});\n"],"names":[],"version":3,"file":"ActionButtonGroup.cjs.map"}