@react-spectrum/s2 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (477) hide show
  1. package/dist/Accordion.cjs +3 -3
  2. package/dist/Accordion.cjs.map +1 -1
  3. package/dist/Accordion.css +2 -2
  4. package/dist/Accordion.css.map +1 -1
  5. package/dist/Accordion.mjs +3 -3
  6. package/dist/Accordion.mjs.map +1 -1
  7. package/dist/ActionBar.cjs +62 -61
  8. package/dist/ActionBar.cjs.map +1 -1
  9. package/dist/ActionBar.css +58 -58
  10. package/dist/ActionBar.css.map +1 -1
  11. package/dist/ActionBar.mjs +62 -61
  12. package/dist/ActionBar.mjs.map +1 -1
  13. package/dist/ActionButton.cjs +234 -234
  14. package/dist/ActionButton.cjs.map +1 -1
  15. package/dist/ActionButton.css +160 -160
  16. package/dist/ActionButton.css.map +1 -1
  17. package/dist/ActionButton.mjs +234 -234
  18. package/dist/ActionButton.mjs.map +1 -1
  19. package/dist/ActionButtonGroup.cjs +16 -16
  20. package/dist/ActionButtonGroup.css +9 -9
  21. package/dist/ActionButtonGroup.mjs +16 -16
  22. package/dist/Add.cjs +10 -10
  23. package/dist/Add.css +6 -6
  24. package/dist/Add.mjs +10 -10
  25. package/dist/AlertDialog.cjs +3 -3
  26. package/dist/AlertDialog.css +3 -3
  27. package/dist/AlertDialog.mjs +3 -3
  28. package/dist/Asterisk.cjs +6 -6
  29. package/dist/Asterisk.css +4 -4
  30. package/dist/Asterisk.mjs +6 -6
  31. package/dist/Avatar.cjs +17 -17
  32. package/dist/Avatar.css +16 -16
  33. package/dist/Avatar.mjs +17 -17
  34. package/dist/AvatarGroup.cjs +121 -121
  35. package/dist/AvatarGroup.css +31 -31
  36. package/dist/AvatarGroup.mjs +121 -121
  37. package/dist/Badge.cjs +197 -197
  38. package/dist/Badge.css +125 -125
  39. package/dist/Badge.mjs +197 -197
  40. package/dist/Breadcrumbs.cjs +235 -235
  41. package/dist/Breadcrumbs.cjs.map +1 -1
  42. package/dist/Breadcrumbs.css +100 -100
  43. package/dist/Breadcrumbs.css.map +1 -1
  44. package/dist/Breadcrumbs.mjs +235 -235
  45. package/dist/Breadcrumbs.mjs.map +1 -1
  46. package/dist/Button.cjs +333 -333
  47. package/dist/Button.cjs.map +1 -1
  48. package/dist/Button.css +174 -174
  49. package/dist/Button.css.map +1 -1
  50. package/dist/Button.mjs +333 -333
  51. package/dist/Button.mjs.map +1 -1
  52. package/dist/ButtonGroup.cjs +21 -21
  53. package/dist/ButtonGroup.css +15 -15
  54. package/dist/ButtonGroup.mjs +21 -21
  55. package/dist/Calendar.cjs +169 -169
  56. package/dist/Calendar.cjs.map +1 -1
  57. package/dist/Calendar.css +134 -134
  58. package/dist/Calendar.css.map +1 -1
  59. package/dist/Calendar.mjs +169 -169
  60. package/dist/Calendar.mjs.map +1 -1
  61. package/dist/Card.cjs +310 -310
  62. package/dist/Card.cjs.map +1 -1
  63. package/dist/Card.css +206 -206
  64. package/dist/Card.css.map +1 -1
  65. package/dist/Card.mjs +310 -310
  66. package/dist/Card.mjs.map +1 -1
  67. package/dist/CardView.cjs +19 -19
  68. package/dist/CardView.cjs.map +1 -1
  69. package/dist/CardView.css +17 -17
  70. package/dist/CardView.css.map +1 -1
  71. package/dist/CardView.mjs +19 -19
  72. package/dist/CardView.mjs.map +1 -1
  73. package/dist/CenterBaseline.cjs +1 -1
  74. package/dist/CenterBaseline.css +2 -2
  75. package/dist/CenterBaseline.mjs +1 -1
  76. package/dist/Checkbox.cjs +162 -162
  77. package/dist/Checkbox.cjs.map +1 -1
  78. package/dist/Checkbox.css +95 -91
  79. package/dist/Checkbox.css.map +1 -1
  80. package/dist/Checkbox.mjs +162 -162
  81. package/dist/Checkbox.mjs.map +1 -1
  82. package/dist/CheckboxGroup.cjs +44 -44
  83. package/dist/CheckboxGroup.cjs.map +1 -1
  84. package/dist/CheckboxGroup.css +37 -37
  85. package/dist/CheckboxGroup.css.map +1 -1
  86. package/dist/CheckboxGroup.mjs +44 -44
  87. package/dist/CheckboxGroup.mjs.map +1 -1
  88. package/dist/Checkmark.cjs +12 -12
  89. package/dist/Checkmark.css +8 -8
  90. package/dist/Checkmark.mjs +12 -12
  91. package/dist/Chevron.cjs +12 -12
  92. package/dist/Chevron.css +10 -10
  93. package/dist/Chevron.mjs +12 -12
  94. package/dist/ClearButton.cjs +30 -30
  95. package/dist/ClearButton.css +30 -30
  96. package/dist/ClearButton.mjs +30 -30
  97. package/dist/CloseButton.cjs +56 -56
  98. package/dist/CloseButton.css +47 -47
  99. package/dist/CloseButton.mjs +56 -56
  100. package/dist/ColorArea.cjs +17 -17
  101. package/dist/ColorArea.cjs.map +1 -1
  102. package/dist/ColorArea.css +16 -16
  103. package/dist/ColorArea.css.map +1 -1
  104. package/dist/ColorArea.mjs +17 -17
  105. package/dist/ColorArea.mjs.map +1 -1
  106. package/dist/ColorField.cjs +32 -32
  107. package/dist/ColorField.cjs.map +1 -1
  108. package/dist/ColorField.css +27 -27
  109. package/dist/ColorField.css.map +1 -1
  110. package/dist/ColorField.mjs +32 -32
  111. package/dist/ColorField.mjs.map +1 -1
  112. package/dist/ColorHandle.cjs +27 -27
  113. package/dist/ColorHandle.css +42 -42
  114. package/dist/ColorHandle.mjs +27 -27
  115. package/dist/ColorSlider.cjs +109 -109
  116. package/dist/ColorSlider.cjs.map +1 -1
  117. package/dist/ColorSlider.css +52 -52
  118. package/dist/ColorSlider.css.map +1 -1
  119. package/dist/ColorSlider.mjs +109 -109
  120. package/dist/ColorSlider.mjs.map +1 -1
  121. package/dist/ColorSwatch.cjs +30 -30
  122. package/dist/ColorSwatch.cjs.map +1 -1
  123. package/dist/ColorSwatch.css +29 -29
  124. package/dist/ColorSwatch.css.map +1 -1
  125. package/dist/ColorSwatch.mjs +30 -30
  126. package/dist/ColorSwatch.mjs.map +1 -1
  127. package/dist/ColorSwatchPicker.cjs +30 -30
  128. package/dist/ColorSwatchPicker.css +48 -48
  129. package/dist/ColorSwatchPicker.mjs +30 -30
  130. package/dist/ColorWheel.cjs +31 -27
  131. package/dist/ColorWheel.cjs.map +1 -1
  132. package/dist/ColorWheel.css +17 -17
  133. package/dist/ColorWheel.css.map +1 -1
  134. package/dist/ColorWheel.mjs +31 -27
  135. package/dist/ColorWheel.mjs.map +1 -1
  136. package/dist/ComboBox.cjs +383 -383
  137. package/dist/ComboBox.cjs.map +1 -1
  138. package/dist/ComboBox.css +187 -187
  139. package/dist/ComboBox.css.map +1 -1
  140. package/dist/ComboBox.mjs +383 -383
  141. package/dist/ComboBox.mjs.map +1 -1
  142. package/dist/ContextualHelp.cjs +5 -5
  143. package/dist/ContextualHelp.css +50 -50
  144. package/dist/ContextualHelp.mjs +5 -5
  145. package/dist/Cross.cjs +14 -14
  146. package/dist/Cross.css +10 -10
  147. package/dist/Cross.mjs +14 -14
  148. package/dist/CustomDialog.cjs +26 -26
  149. package/dist/CustomDialog.cjs.map +1 -1
  150. package/dist/CustomDialog.css +25 -25
  151. package/dist/CustomDialog.css.map +1 -1
  152. package/dist/CustomDialog.mjs +26 -26
  153. package/dist/CustomDialog.mjs.map +1 -1
  154. package/dist/Dash.cjs +10 -10
  155. package/dist/Dash.css +6 -6
  156. package/dist/Dash.mjs +10 -10
  157. package/dist/DateField.cjs +74 -74
  158. package/dist/DateField.cjs.map +1 -1
  159. package/dist/DateField.css +77 -77
  160. package/dist/DateField.css.map +1 -1
  161. package/dist/DateField.mjs +74 -74
  162. package/dist/DateField.mjs.map +1 -1
  163. package/dist/DatePicker.cjs +173 -173
  164. package/dist/DatePicker.cjs.map +1 -1
  165. package/dist/DatePicker.css +128 -128
  166. package/dist/DatePicker.css.map +1 -1
  167. package/dist/DatePicker.mjs +173 -173
  168. package/dist/DatePicker.mjs.map +1 -1
  169. package/dist/DateRangePicker.cjs +56 -56
  170. package/dist/DateRangePicker.cjs.map +1 -1
  171. package/dist/DateRangePicker.css +59 -59
  172. package/dist/DateRangePicker.css.map +1 -1
  173. package/dist/DateRangePicker.mjs +56 -56
  174. package/dist/DateRangePicker.mjs.map +1 -1
  175. package/dist/Dialog.cjs +17 -17
  176. package/dist/Dialog.cjs.map +1 -1
  177. package/dist/Dialog.css +70 -70
  178. package/dist/Dialog.css.map +1 -1
  179. package/dist/Dialog.mjs +17 -17
  180. package/dist/Dialog.mjs.map +1 -1
  181. package/dist/Disclosure.cjs +120 -120
  182. package/dist/Disclosure.cjs.map +1 -1
  183. package/dist/Disclosure.css +112 -112
  184. package/dist/Disclosure.css.map +1 -1
  185. package/dist/Disclosure.mjs +120 -120
  186. package/dist/Disclosure.mjs.map +1 -1
  187. package/dist/Divider.cjs +26 -26
  188. package/dist/Divider.cjs.map +1 -1
  189. package/dist/Divider.css +25 -25
  190. package/dist/Divider.css.map +1 -1
  191. package/dist/Divider.mjs +26 -26
  192. package/dist/Divider.mjs.map +1 -1
  193. package/dist/DropZone.cjs +62 -62
  194. package/dist/DropZone.cjs.map +1 -1
  195. package/dist/DropZone.css +57 -57
  196. package/dist/DropZone.css.map +1 -1
  197. package/dist/DropZone.mjs +62 -62
  198. package/dist/DropZone.mjs.map +1 -1
  199. package/dist/Field.cjs +348 -348
  200. package/dist/Field.cjs.map +1 -1
  201. package/dist/Field.css +147 -147
  202. package/dist/Field.css.map +1 -1
  203. package/dist/Field.mjs +348 -348
  204. package/dist/Field.mjs.map +1 -1
  205. package/dist/Form.cjs +10 -10
  206. package/dist/Form.cjs.map +1 -1
  207. package/dist/Form.css +9 -9
  208. package/dist/Form.css.map +1 -1
  209. package/dist/Form.mjs +10 -10
  210. package/dist/Form.mjs.map +1 -1
  211. package/dist/FullscreenDialog.cjs +5 -5
  212. package/dist/FullscreenDialog.cjs.map +1 -1
  213. package/dist/FullscreenDialog.css +78 -78
  214. package/dist/FullscreenDialog.css.map +1 -1
  215. package/dist/FullscreenDialog.mjs +5 -5
  216. package/dist/FullscreenDialog.mjs.map +1 -1
  217. package/dist/IllustratedMessage.cjs +229 -229
  218. package/dist/IllustratedMessage.css +72 -72
  219. package/dist/IllustratedMessage.mjs +229 -229
  220. package/dist/Image.cjs +14 -14
  221. package/dist/Image.css +14 -14
  222. package/dist/Image.mjs +14 -14
  223. package/dist/InlineAlert.cjs +101 -101
  224. package/dist/InlineAlert.css +76 -76
  225. package/dist/InlineAlert.mjs +101 -101
  226. package/dist/Link.cjs +50 -50
  227. package/dist/Link.cjs.map +1 -1
  228. package/dist/Link.css +41 -41
  229. package/dist/Link.css.map +1 -1
  230. package/dist/Link.mjs +50 -50
  231. package/dist/Link.mjs.map +1 -1
  232. package/dist/LinkOut.cjs +8 -8
  233. package/dist/LinkOut.css +8 -8
  234. package/dist/LinkOut.mjs +8 -8
  235. package/dist/Menu.cjs +446 -443
  236. package/dist/Menu.cjs.map +1 -1
  237. package/dist/Menu.css +184 -184
  238. package/dist/Menu.css.map +1 -1
  239. package/dist/Menu.mjs +446 -443
  240. package/dist/Menu.mjs.map +1 -1
  241. package/dist/Meter.cjs +154 -154
  242. package/dist/Meter.cjs.map +1 -1
  243. package/dist/Meter.css +91 -91
  244. package/dist/Meter.css.map +1 -1
  245. package/dist/Meter.mjs +154 -154
  246. package/dist/Meter.mjs.map +1 -1
  247. package/dist/Modal.cjs +66 -66
  248. package/dist/Modal.cjs.map +1 -1
  249. package/dist/Modal.css +54 -54
  250. package/dist/Modal.css.map +1 -1
  251. package/dist/Modal.mjs +66 -66
  252. package/dist/Modal.mjs.map +1 -1
  253. package/dist/NotificationBadge.cjs +57 -57
  254. package/dist/NotificationBadge.css +49 -49
  255. package/dist/NotificationBadge.mjs +57 -57
  256. package/dist/NumberField.cjs +115 -115
  257. package/dist/NumberField.cjs.map +1 -1
  258. package/dist/NumberField.css +99 -99
  259. package/dist/NumberField.css.map +1 -1
  260. package/dist/NumberField.mjs +115 -115
  261. package/dist/NumberField.mjs.map +1 -1
  262. package/dist/Picker.cjs +275 -275
  263. package/dist/Picker.cjs.map +1 -1
  264. package/dist/Picker.css +173 -173
  265. package/dist/Picker.css.map +1 -1
  266. package/dist/Picker.mjs +275 -275
  267. package/dist/Picker.mjs.map +1 -1
  268. package/dist/Popover.cjs +89 -89
  269. package/dist/Popover.cjs.map +1 -1
  270. package/dist/Popover.css +70 -70
  271. package/dist/Popover.css.map +1 -1
  272. package/dist/Popover.mjs +89 -89
  273. package/dist/Popover.mjs.map +1 -1
  274. package/dist/ProgressBar.cjs +164 -164
  275. package/dist/ProgressBar.cjs.map +1 -1
  276. package/dist/ProgressBar.css +99 -99
  277. package/dist/ProgressBar.css.map +1 -1
  278. package/dist/ProgressBar.mjs +164 -164
  279. package/dist/ProgressBar.mjs.map +1 -1
  280. package/dist/ProgressCircle.cjs +32 -32
  281. package/dist/ProgressCircle.cjs.map +1 -1
  282. package/dist/ProgressCircle.css +24 -24
  283. package/dist/ProgressCircle.css.map +1 -1
  284. package/dist/ProgressCircle.mjs +32 -32
  285. package/dist/ProgressCircle.mjs.map +1 -1
  286. package/dist/Provider.cjs +11 -11
  287. package/dist/Provider.css +10 -10
  288. package/dist/Provider.mjs +11 -11
  289. package/dist/Radio.cjs +146 -146
  290. package/dist/Radio.cjs.map +1 -1
  291. package/dist/Radio.css +78 -78
  292. package/dist/Radio.css.map +1 -1
  293. package/dist/Radio.mjs +146 -146
  294. package/dist/Radio.mjs.map +1 -1
  295. package/dist/RadioGroup.cjs +42 -42
  296. package/dist/RadioGroup.cjs.map +1 -1
  297. package/dist/RadioGroup.css +37 -37
  298. package/dist/RadioGroup.css.map +1 -1
  299. package/dist/RadioGroup.mjs +42 -42
  300. package/dist/RadioGroup.mjs.map +1 -1
  301. package/dist/RangeCalendar.cjs +8 -8
  302. package/dist/RangeCalendar.cjs.map +1 -1
  303. package/dist/RangeCalendar.css +10 -10
  304. package/dist/RangeCalendar.css.map +1 -1
  305. package/dist/RangeCalendar.mjs +8 -8
  306. package/dist/RangeCalendar.mjs.map +1 -1
  307. package/dist/SearchField.cjs +42 -42
  308. package/dist/SearchField.cjs.map +1 -1
  309. package/dist/SearchField.css +45 -45
  310. package/dist/SearchField.css.map +1 -1
  311. package/dist/SearchField.mjs +42 -42
  312. package/dist/SearchField.mjs.map +1 -1
  313. package/dist/SegmentedControl.cjs +180 -180
  314. package/dist/SegmentedControl.css +123 -123
  315. package/dist/SegmentedControl.mjs +180 -180
  316. package/dist/SelectBoxGroup.cjs +144 -144
  317. package/dist/SelectBoxGroup.cjs.map +1 -1
  318. package/dist/SelectBoxGroup.css +120 -120
  319. package/dist/SelectBoxGroup.css.map +1 -1
  320. package/dist/SelectBoxGroup.mjs +144 -144
  321. package/dist/SelectBoxGroup.mjs.map +1 -1
  322. package/dist/Slider.cjs +295 -295
  323. package/dist/Slider.cjs.map +1 -1
  324. package/dist/Slider.css +154 -154
  325. package/dist/Slider.css.map +1 -1
  326. package/dist/Slider.mjs +295 -295
  327. package/dist/Slider.mjs.map +1 -1
  328. package/dist/StatusLight.cjs +116 -116
  329. package/dist/StatusLight.css +59 -59
  330. package/dist/StatusLight.mjs +116 -116
  331. package/dist/Switch.cjs +155 -155
  332. package/dist/Switch.cjs.map +1 -1
  333. package/dist/Switch.css +74 -74
  334. package/dist/Switch.css.map +1 -1
  335. package/dist/Switch.mjs +155 -155
  336. package/dist/Switch.mjs.map +1 -1
  337. package/dist/TableView.cjs +415 -415
  338. package/dist/TableView.cjs.map +1 -1
  339. package/dist/TableView.css +199 -199
  340. package/dist/TableView.css.map +1 -1
  341. package/dist/TableView.mjs +416 -416
  342. package/dist/TableView.mjs.map +1 -1
  343. package/dist/Tabs.cjs +127 -127
  344. package/dist/Tabs.cjs.map +1 -1
  345. package/dist/Tabs.css +105 -105
  346. package/dist/Tabs.css.map +1 -1
  347. package/dist/Tabs.mjs +127 -127
  348. package/dist/Tabs.mjs.map +1 -1
  349. package/dist/TabsPicker.cjs +127 -127
  350. package/dist/TabsPicker.cjs.map +1 -1
  351. package/dist/TabsPicker.css +108 -108
  352. package/dist/TabsPicker.css.map +1 -1
  353. package/dist/TabsPicker.mjs +127 -127
  354. package/dist/TabsPicker.mjs.map +1 -1
  355. package/dist/TagGroup.cjs +204 -204
  356. package/dist/TagGroup.cjs.map +1 -1
  357. package/dist/TagGroup.css +146 -146
  358. package/dist/TagGroup.css.map +1 -1
  359. package/dist/TagGroup.mjs +204 -204
  360. package/dist/TagGroup.mjs.map +1 -1
  361. package/dist/TextField.cjs +59 -59
  362. package/dist/TextField.cjs.map +1 -1
  363. package/dist/TextField.css +54 -54
  364. package/dist/TextField.css.map +1 -1
  365. package/dist/TextField.mjs +59 -59
  366. package/dist/TextField.mjs.map +1 -1
  367. package/dist/TimeField.cjs +52 -52
  368. package/dist/TimeField.cjs.map +1 -1
  369. package/dist/TimeField.css +47 -47
  370. package/dist/TimeField.css.map +1 -1
  371. package/dist/TimeField.mjs +52 -52
  372. package/dist/TimeField.mjs.map +1 -1
  373. package/dist/Toast.cjs +120 -120
  374. package/dist/Toast.cjs.map +1 -1
  375. package/dist/Toast.css +110 -110
  376. package/dist/Toast.css.map +1 -1
  377. package/dist/Toast.mjs +120 -120
  378. package/dist/Toast.mjs.map +1 -1
  379. package/dist/ToggleButton.cjs +3 -3
  380. package/dist/ToggleButton.cjs.map +1 -1
  381. package/dist/ToggleButton.css +12 -12
  382. package/dist/ToggleButton.css.map +1 -1
  383. package/dist/ToggleButton.mjs +3 -3
  384. package/dist/ToggleButton.mjs.map +1 -1
  385. package/dist/ToggleButtonGroup.cjs.map +1 -1
  386. package/dist/ToggleButtonGroup.mjs.map +1 -1
  387. package/dist/Tooltip.cjs +78 -78
  388. package/dist/Tooltip.cjs.map +1 -1
  389. package/dist/Tooltip.css +65 -65
  390. package/dist/Tooltip.css.map +1 -1
  391. package/dist/Tooltip.mjs +78 -78
  392. package/dist/Tooltip.mjs.map +1 -1
  393. package/dist/TreeView.cjs +144 -128
  394. package/dist/TreeView.cjs.map +1 -1
  395. package/dist/TreeView.css +131 -127
  396. package/dist/TreeView.css.map +1 -1
  397. package/dist/TreeView.mjs +144 -128
  398. package/dist/TreeView.mjs.map +1 -1
  399. package/dist/types.d.ts +68 -72
  400. package/dist/types.d.ts.map +1 -1
  401. package/icons/Icon.cjs +12 -12
  402. package/icons/Icon.css +9 -9
  403. package/icons/Icon.mjs +12 -12
  404. package/icons/Skeleton.cjs +2 -2
  405. package/icons/Skeleton.cjs.map +1 -1
  406. package/icons/Skeleton.css +6 -6
  407. package/icons/Skeleton.mjs +2 -2
  408. package/icons/Skeleton.mjs.map +1 -1
  409. package/icons/runtime.cjs +16 -3
  410. package/icons/runtime.cjs.map +1 -1
  411. package/icons/runtime.mjs +16 -3
  412. package/icons/runtime.mjs.map +1 -1
  413. package/package.json +21 -21
  414. package/src/Accordion.tsx +1 -1
  415. package/src/ActionBar.tsx +2 -2
  416. package/src/ActionButton.tsx +1 -1
  417. package/src/Breadcrumbs.tsx +2 -2
  418. package/src/Button.tsx +2 -2
  419. package/src/Calendar.tsx +1 -1
  420. package/src/Card.tsx +1 -1
  421. package/src/CardView.tsx +1 -1
  422. package/src/Checkbox.tsx +2 -1
  423. package/src/CheckboxGroup.tsx +1 -1
  424. package/src/CoachMark.tsx +1 -1
  425. package/src/ColorArea.tsx +1 -1
  426. package/src/ColorField.tsx +1 -1
  427. package/src/ColorSlider.tsx +1 -1
  428. package/src/ColorSwatch.tsx +1 -1
  429. package/src/ColorWheel.tsx +2 -2
  430. package/src/ComboBox.tsx +2 -2
  431. package/src/CustomDialog.tsx +1 -1
  432. package/src/DateField.tsx +1 -1
  433. package/src/DatePicker.tsx +1 -1
  434. package/src/DateRangePicker.tsx +1 -1
  435. package/src/Dialog.tsx +1 -1
  436. package/src/Disclosure.tsx +2 -2
  437. package/src/Divider.tsx +1 -1
  438. package/src/DropZone.tsx +1 -1
  439. package/src/Field.tsx +3 -3
  440. package/src/Form.tsx +1 -1
  441. package/src/FullscreenDialog.tsx +1 -1
  442. package/src/Link.tsx +1 -1
  443. package/src/Menu.tsx +11 -13
  444. package/src/Meter.tsx +1 -1
  445. package/src/Modal.tsx +1 -1
  446. package/src/NumberField.tsx +1 -1
  447. package/src/Picker.tsx +3 -3
  448. package/src/Popover.tsx +2 -1
  449. package/src/ProgressBar.tsx +1 -1
  450. package/src/ProgressCircle.tsx +1 -1
  451. package/src/Radio.tsx +1 -1
  452. package/src/RadioGroup.tsx +1 -1
  453. package/src/RangeCalendar.tsx +1 -1
  454. package/src/SearchField.tsx +1 -1
  455. package/src/SelectBoxGroup.tsx +1 -1
  456. package/src/Slider.tsx +1 -1
  457. package/src/Switch.tsx +1 -1
  458. package/src/TableView.tsx +9 -9
  459. package/src/Tabs.tsx +4 -4
  460. package/src/TabsPicker.tsx +2 -2
  461. package/src/TagGroup.tsx +2 -2
  462. package/src/TextField.tsx +1 -1
  463. package/src/TimeField.tsx +1 -1
  464. package/src/Toast.tsx +1 -1
  465. package/src/ToggleButton.tsx +1 -1
  466. package/src/ToggleButtonGroup.tsx +1 -1
  467. package/src/Tooltip.tsx +1 -1
  468. package/src/TreeView.tsx +10 -6
  469. package/style/__tests__/mergeStyles.test.ts +68 -0
  470. package/style/__tests__/style-macro.test.js +79 -59
  471. package/style/dist/style-macro.cjs +65 -14
  472. package/style/dist/style-macro.cjs.map +1 -1
  473. package/style/dist/style-macro.mjs +65 -14
  474. package/style/dist/style-macro.mjs.map +1 -1
  475. package/style/runtime.ts +21 -5
  476. package/style/style-macro.ts +81 -16
  477. package/style/__tests__/mergeStyles.test.js +0 -32
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUM,SAAS,0CAAoB,WAAoB;IACtD,IAAI,eAAe,CAAA,GAAA,aAAK,EAAoB;IAC5C,IAAI,eAAe,CAAA,GAAA,oBAAY,EAAE;IACjC,OAAO,CAAA,GAAA,kBAAU,EAAE,CAAC;QAClB,IAAI,eAAe,CAAC,aAAa,OAAO,IAAI,WAAW,CAAC,gBAAgB,OAAO,QAAQ,OAAO,KAAK,YAAY;YAC7G,iEAAiE;YACjE,2EAA2E;YAC3E,aAAa,OAAO,GAAG,QAAQ,OAAO,CACpC;gBACE;oBAAC,oBAAoB;gBAAM;gBAC3B;oBAAC,oBAAoB;gBAAI;aAC1B,EACD;gBACE,UAAU;gBACV,YAAY;gBACZ,QAAQ;YACV;YAEF,aAAa,OAAO,CAAC,SAAS,GAAG;QACnC,OAAO,IAAI,CAAC,eAAe,aAAa,OAAO,EAAE;YAC/C,aAAa,OAAO,CAAC,MAAM;YAC3B,aAAa,OAAO,GAAG;QACzB;IACF,GAAG;QAAC;QAAa;KAAa;AAChC;AASO,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAkB;AACtD,SAAS;IACd,OAAO,CAAA,GAAA,iBAAS,EAAE,8CAAoB;AACxC;AAUO,SAAS,0CAAS,YAAC,QAAQ,aAAE,SAAS,EAAgB;IAC3D,iDAAiD;IACjD,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B;;AAGP;AAEO,MAAM,sDAMJ,qEAAqE;AAEvE,SAAS,0CAAgB,QAAmB,EAAE,KAAgC;IACnF,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YAAY;QACd,yBAAW,gBAAC;sBAAc;;QAC1B,QAAQ;YACN,GAAG,KAAK;YACR,8DAA8D;YAC9D,2EAA2E;YAC3E,qBAAqB;QACvB;IACF;IACA,OAAO;QAAC;QAAU;KAAM;AAC1B;AAGO,SAAS,0CAAa,YAAC,QAAQ,EAAwB;IAC5D,qBACE,gBAAC;QACC,6CAA6C;QAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QAClB,KAAK,0CAAoB;QACzB,WAAW;kBAKV;;AAGP;AAGO,SAAS,0CAAgB,YAAC,QAAQ,EAA8B;IACrE,IAAI,YAAY,CAAA,GAAA,iBAAS,EAAE;IAC3B,IAAI,YAAY,0CAAoB,aAAa;IACjD,IAAI,aAAa,MACf,OAAO;IAGT,IAAI,WAAW,SAAS,YAAY,CAAC,OAAO,wBAAwB,CAAC,UAAU,QAAQ,MAAM,SAAS,GAAG,GAAU,SAAS,KAAK,CAAC,GAAG;IACrI,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B,0BAAY,CAAA,GAAA,mBAAW,EAAE,UAAU;YAClC,KAAK,CAAA,GAAA,gBAAQ,EAAE,UAAU;YACzB,WAAW,AAAC,CAAA,SAAS,KAAK,CAAC,SAAS,IAAI,EAAC,IAAK,MAAM;YACpD,6CAA6C;YAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QACpB,KAAK;;AAGX;AAGO,SAAS,0CAAgB,MAAmB;IACjD,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YACF,OAAO,CAAA,GAAA,yCAAU,sBAA+B;IAElD,OAAO,UAAU;AACnB","sources":["packages/@react-spectrum/s2/src/Skeleton.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 {cloneElement, createContext, CSSProperties, ReactElement, ReactNode, Ref, useCallback, useContext, useRef} from 'react';\nimport {color, style} from '../style' with {type: 'macro'};\nimport {inertValue, mergeRefs} from '@react-aria/utils';\nimport {mergeStyles} from '../style/runtime';\nimport {raw} from '../style/style-macro' with {type: 'macro'};\nimport {StyleString} from '../style/types';\nimport {useMediaQuery} from '@react-spectrum/utils';\n\nexport function useLoadingAnimation(isAnimating: boolean): (element: HTMLElement | null) => void {\n let animationRef = useRef<Animation | null>(null);\n let reduceMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n return useCallback((element: HTMLElement | null) => {\n if (isAnimating && !animationRef.current && element && !reduceMotion && typeof element.animate === 'function') {\n // Use web animation API instead of CSS animations so that we can\n // synchronize it between all loading elements on the page (via startTime).\n animationRef.current = element.animate(\n [\n {backgroundPosition: '100%'},\n {backgroundPosition: '0%'}\n ],\n {\n duration: 2000,\n iterations: Infinity,\n easing: 'ease-in-out'\n }\n );\n animationRef.current.startTime = 0;\n } else if (!isAnimating && animationRef.current) {\n animationRef.current.cancel();\n animationRef.current = null;\n }\n }, [isAnimating, reduceMotion]);\n}\n\nexport type SkeletonElement = ReactElement<{\n children: ReactNode,\n className?: string,\n ref?: Ref<HTMLElement>,\n inert?: boolean | 'true'\n}>;\n\nexport const SkeletonContext = createContext<boolean | null>(null);\nexport function useIsSkeleton(): boolean {\n return useContext(SkeletonContext) || false;\n}\n\nexport interface SkeletonProps {\n children: ReactNode,\n isLoading: boolean\n}\n\n/**\n * A Skeleton wraps around content to render it as a placeholder.\n */\nexport function Skeleton({children, isLoading}: SkeletonProps): ReactNode {\n // Disable all form components inside a skeleton.\n return (\n <SkeletonContext.Provider value={isLoading}>\n {children}\n </SkeletonContext.Provider>\n );\n}\n\nexport const loadingStyle = raw(`\n background-image: linear-gradient(to right, ${color('gray-100')} 33%, light-dark(${color('gray-25')}, ${color('gray-300')}), ${color('gray-100')} 66%);\n background-size: 300%;\n * {\n visibility: hidden;\n }\n`, 'L'); // add to a separate layer so it overrides default style macro styles\n\nexport function useSkeletonText(children: ReactNode, style: CSSProperties | undefined): [ReactNode, CSSProperties | undefined] {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n children = <SkeletonText>{children}</SkeletonText>;\n style = {\n ...style,\n // This ensures the ellipsis on truncated text is also hidden.\n // -webkit-text-fill-color overrides any `color` property that is also set.\n WebkitTextFillColor: 'transparent'\n };\n }\n return [children, style];\n}\n\n// Rendered inside <Text> to create skeleton line boxes via box-decoration-break.\nexport function SkeletonText({children}: {children: ReactNode}): ReactNode {\n return (\n <span\n // @ts-ignore - compatibility with React < 19\n inert={inertValue(true)}\n ref={useLoadingAnimation(true)}\n className={loadingStyle + style({\n color: 'transparent',\n boxDecorationBreak: 'clone',\n borderRadius: 'sm'\n })}>\n {children}\n </span>\n );\n}\n\n// Clones the child element and displays it with skeleton styling.\nexport function SkeletonWrapper({children}: {children: SkeletonElement}): ReactNode {\n let isLoading = useContext(SkeletonContext);\n let animation = useLoadingAnimation(isLoading || false);\n if (isLoading == null) {\n return children;\n }\n\n let childRef = 'ref' in children && !Object.getOwnPropertyDescriptor(children, 'ref')?.get ? children.ref as any : children.props.ref;\n return (\n <SkeletonContext.Provider value={null}>\n {isLoading ? cloneElement(children, {\n ref: mergeRefs(childRef, animation),\n className: (children.props.className || '') + ' ' + loadingStyle,\n // @ts-ignore - compatibility with React < 19\n inert: inertValue(true)\n }) : children}\n </SkeletonContext.Provider>\n );\n}\n\n// Adds default border radius around icons when displayed in a skeleton.\nexport function useSkeletonIcon(styles: StyleString): StyleString {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n return mergeStyles(style({borderRadius: 'sm'}), styles);\n }\n return styles || '' as StyleString;\n}\n"],"names":[],"version":3,"file":"Skeleton.mjs.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUM,SAAS,0CAAoB,WAAoB;IACtD,IAAI,eAAe,CAAA,GAAA,aAAK,EAAoB;IAC5C,IAAI,eAAe,CAAA,GAAA,oBAAY,EAAE;IACjC,OAAO,CAAA,GAAA,kBAAU,EAAE,CAAC;QAClB,IAAI,eAAe,CAAC,aAAa,OAAO,IAAI,WAAW,CAAC,gBAAgB,OAAO,QAAQ,OAAO,KAAK,YAAY;YAC7G,iEAAiE;YACjE,2EAA2E;YAC3E,aAAa,OAAO,GAAG,QAAQ,OAAO,CACpC;gBACE;oBAAC,oBAAoB;gBAAM;gBAC3B;oBAAC,oBAAoB;gBAAI;aAC1B,EACD;gBACE,UAAU;gBACV,YAAY;gBACZ,QAAQ;YACV;YAEF,aAAa,OAAO,CAAC,SAAS,GAAG;QACnC,OAAO,IAAI,CAAC,eAAe,aAAa,OAAO,EAAE;YAC/C,aAAa,OAAO,CAAC,MAAM;YAC3B,aAAa,OAAO,GAAG;QACzB;IACF,GAAG;QAAC;QAAa;KAAa;AAChC;AASO,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAkB;AACtD,SAAS;IACd,OAAO,CAAA,GAAA,iBAAS,EAAE,8CAAoB;AACxC;AAUO,SAAS,0CAAS,YAAC,QAAQ,aAAE,SAAS,EAAgB;IAC3D,iDAAiD;IACjD,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B;;AAGP;AAEO,MAAM,sDAMJ,qEAAqE;AAEvE,SAAS,0CAAgB,QAAmB,EAAE,KAAgC;IACnF,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YAAY;QACd,yBAAW,gBAAC;sBAAc;;QAC1B,QAAQ;YACN,GAAG,KAAK;YACR,8DAA8D;YAC9D,2EAA2E;YAC3E,qBAAqB;QACvB;IACF;IACA,OAAO;QAAC;QAAU;KAAM;AAC1B;AAGO,SAAS,0CAAa,YAAC,QAAQ,EAAwB;IAC5D,qBACE,gBAAC;QACC,6CAA6C;QAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QAClB,KAAK,0CAAoB;QACzB,WAAW;kBAKV;;AAGP;AAGO,SAAS,0CAAgB,YAAC,QAAQ,EAA8B;IACrE,IAAI,YAAY,CAAA,GAAA,iBAAS,EAAE;IAC3B,IAAI,YAAY,0CAAoB,aAAa;IACjD,IAAI,aAAa,MACf,OAAO;IAGT,IAAI,WAAW,SAAS,YAAY,CAAC,OAAO,wBAAwB,CAAC,UAAU,QAAQ,MAAM,SAAS,GAAG,GAAU,SAAS,KAAK,CAAC,GAAG;IACrI,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B,0BAAY,CAAA,GAAA,mBAAW,EAAE,UAAU;YAClC,KAAK,CAAA,GAAA,gBAAQ,EAAE,UAAU;YACzB,WAAW,AAAC,CAAA,SAAS,KAAK,CAAC,SAAS,IAAI,EAAC,IAAK,MAAM;YACpD,6CAA6C;YAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QACpB,KAAK;;AAGX;AAGO,SAAS,0CAAgB,MAAmB;IACjD,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YACF,OAAO,CAAA,GAAA,yCAAU,0BAA+B;IAElD,OAAO,UAAU;AACnB","sources":["packages/@react-spectrum/s2/src/Skeleton.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 {cloneElement, createContext, CSSProperties, ReactElement, ReactNode, Ref, useCallback, useContext, useRef} from 'react';\nimport {color, style} from '../style' with {type: 'macro'};\nimport {inertValue, mergeRefs} from '@react-aria/utils';\nimport {mergeStyles} from '../style/runtime';\nimport {raw} from '../style/style-macro' with {type: 'macro'};\nimport {StyleString} from '../style/types';\nimport {useMediaQuery} from '@react-spectrum/utils';\n\nexport function useLoadingAnimation(isAnimating: boolean): (element: HTMLElement | null) => void {\n let animationRef = useRef<Animation | null>(null);\n let reduceMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n return useCallback((element: HTMLElement | null) => {\n if (isAnimating && !animationRef.current && element && !reduceMotion && typeof element.animate === 'function') {\n // Use web animation API instead of CSS animations so that we can\n // synchronize it between all loading elements on the page (via startTime).\n animationRef.current = element.animate(\n [\n {backgroundPosition: '100%'},\n {backgroundPosition: '0%'}\n ],\n {\n duration: 2000,\n iterations: Infinity,\n easing: 'ease-in-out'\n }\n );\n animationRef.current.startTime = 0;\n } else if (!isAnimating && animationRef.current) {\n animationRef.current.cancel();\n animationRef.current = null;\n }\n }, [isAnimating, reduceMotion]);\n}\n\nexport type SkeletonElement = ReactElement<{\n children: ReactNode,\n className?: string,\n ref?: Ref<HTMLElement>,\n inert?: boolean | 'true'\n}>;\n\nexport const SkeletonContext = createContext<boolean | null>(null);\nexport function useIsSkeleton(): boolean {\n return useContext(SkeletonContext) || false;\n}\n\nexport interface SkeletonProps {\n children: ReactNode,\n isLoading: boolean\n}\n\n/**\n * A Skeleton wraps around content to render it as a placeholder.\n */\nexport function Skeleton({children, isLoading}: SkeletonProps): ReactNode {\n // Disable all form components inside a skeleton.\n return (\n <SkeletonContext.Provider value={isLoading}>\n {children}\n </SkeletonContext.Provider>\n );\n}\n\nexport const loadingStyle = raw(`\n background-image: linear-gradient(to right, ${color('gray-100')} 33%, light-dark(${color('gray-25')}, ${color('gray-300')}), ${color('gray-100')} 66%);\n background-size: 300%;\n * {\n visibility: hidden;\n }\n`, 'L'); // add to a separate layer so it overrides default style macro styles\n\nexport function useSkeletonText(children: ReactNode, style: CSSProperties | undefined): [ReactNode, CSSProperties | undefined] {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n children = <SkeletonText>{children}</SkeletonText>;\n style = {\n ...style,\n // This ensures the ellipsis on truncated text is also hidden.\n // -webkit-text-fill-color overrides any `color` property that is also set.\n WebkitTextFillColor: 'transparent'\n };\n }\n return [children, style];\n}\n\n// Rendered inside <Text> to create skeleton line boxes via box-decoration-break.\nexport function SkeletonText({children}: {children: ReactNode}): ReactNode {\n return (\n <span\n // @ts-ignore - compatibility with React < 19\n inert={inertValue(true)}\n ref={useLoadingAnimation(true)}\n className={loadingStyle + style({\n color: 'transparent',\n boxDecorationBreak: 'clone',\n borderRadius: 'sm'\n })}>\n {children}\n </span>\n );\n}\n\n// Clones the child element and displays it with skeleton styling.\nexport function SkeletonWrapper({children}: {children: SkeletonElement}): ReactNode {\n let isLoading = useContext(SkeletonContext);\n let animation = useLoadingAnimation(isLoading || false);\n if (isLoading == null) {\n return children;\n }\n\n let childRef = 'ref' in children && !Object.getOwnPropertyDescriptor(children, 'ref')?.get ? children.ref as any : children.props.ref;\n return (\n <SkeletonContext.Provider value={null}>\n {isLoading ? cloneElement(children, {\n ref: mergeRefs(childRef, animation),\n className: (children.props.className || '') + ' ' + loadingStyle,\n // @ts-ignore - compatibility with React < 19\n inert: inertValue(true)\n }) : children}\n </SkeletonContext.Provider>\n );\n}\n\n// Adds default border radius around icons when displayed in a skeleton.\nexport function useSkeletonIcon(styles: StyleString): StyleString {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n return mergeStyles(style({borderRadius: 'sm'}), styles);\n }\n return styles || '' as StyleString;\n}\n"],"names":[],"version":3,"file":"Skeleton.mjs.map"}
package/icons/runtime.cjs CHANGED
@@ -16,9 +16,19 @@ $parcel$export(module.exports, "mergeStyles", () => $308b180f49d82d28$export$e61
16
16
  * governing permissions and limitations under the License.
17
17
  */ function $308b180f49d82d28$export$e618dc39ac9ad607(...styles) {
18
18
  let definedStyles = styles.filter(Boolean);
19
- if (definedStyles.length === 1) return definedStyles[0];
19
+ if (definedStyles.length === 1) {
20
+ let first = definedStyles[0];
21
+ if (typeof first !== 'string') // static macro has a toString method so that we generate the style macro map for the entry
22
+ // it's automatically called in other places, but for our merging, we have to call it ourselves
23
+ return first.toString();
24
+ return first;
25
+ }
20
26
  let map = new Map();
21
- for (let style of definedStyles)for (let [k, v] of $308b180f49d82d28$var$parse(style))map.set(k, v);
27
+ for (let style of definedStyles){
28
+ // must call toString here for the static macro
29
+ let str = style.toString();
30
+ for (let [k, v] of $308b180f49d82d28$var$parse(str))map.set(k, v);
31
+ }
22
32
  let res = '';
23
33
  for (let value of map.values())res += value;
24
34
  return res;
@@ -34,7 +44,10 @@ function $308b180f49d82d28$var$parse(s) {
34
44
  let condition = i;
35
45
  while(i < s.length && s[i] !== ' ')readValue();
36
46
  let property = s.slice(start, condition);
37
- properties.set(property, (properties.get(property) || '') + ' ' + s.slice(start, i));
47
+ if (process.env.NODE_ENV !== 'production' && property.startsWith('-macro-')) {
48
+ let value = s.slice(start, i);
49
+ properties.set(value, ' ' + value);
50
+ } else properties.set(property, (properties.get(property) || '') + ' ' + s.slice(start, i));
38
51
  }
39
52
  function readValue() {
40
53
  if (s[i] === '-') // the beginning and end of arbitrary values are marked with -
@@ -1 +1 @@
1
- {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GA4BM,SAAS,0CAAY,GAAG,MAA0C;IACvE,IAAI,gBAAgB,OAAO,MAAM,CAAC;IAClC,IAAI,cAAc,MAAM,KAAK,GAC3B,OAAO,aAAa,CAAC,EAAE;IAGzB,IAAI,MAAM,IAAI;IACd,KAAK,IAAI,SAAS,cAChB,KAAK,IAAI,CAAC,GAAG,EAAE,IAAI,4BAAM,OACvB,IAAI,GAAG,CAAC,GAAG;IAIf,IAAI,MAAM;IACV,KAAK,IAAI,SAAS,IAAI,MAAM,GAC1B,OAAO;IAET,OAAO;AACT;AAEA,SAAS,4BAAM,CAAS;IACtB,IAAI,aAAa,IAAI;IACrB,IAAI,IAAI;IACR,MAAO,IAAI,EAAE,MAAM,CAAE;QACnB,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAC9B;QAGF,IAAI,QAAQ;QACZ,aAAa,iBAAiB;QAE9B,2CAA2C;QAC3C,IAAI,YAAY;QAChB,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAC9B;QAGF,IAAI,WAAW,EAAE,KAAK,CAAC,OAAO;QAC9B,WAAW,GAAG,CAAC,UAAU,AAAC,CAAA,WAAW,GAAG,CAAC,aAAa,EAAC,IAAK,MAAM,EAAE,KAAK,CAAC,OAAO;IACnF;IAEA,SAAS;QACP,IAAI,CAAC,CAAC,EAAE,KAAK,KACX,8DAA8D;QAC9D,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAAK;YACnC;YACA,IAAI,CAAC,CAAC,EAAE,KAAK,KAAK;gBAChB;gBACA;YACF;QACF;aACK;YACL,MAAO,IAAI,EAAE,MAAM,CACjB,IAAI,CAAC,CAAC,EAAE,KAAK,KACX;iBACK;gBACL;gBACA;YACF;QAEJ;IACF;IAEA,OAAO;AACT","sources":["packages/@react-spectrum/s2/style/runtime.ts"],"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 {StyleString} from './types';\n// import {RuntimeStyleFunction, RenderProps} from './types';\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\n// type ArgTypes<T> = T extends (props: infer V) => any ? NullToObject<V> : never;\n// type NullToObject<T> = T extends (null | undefined) ? {} : T;\n// type BoxedTupleTypes<T extends any[]> = { [P in keyof T]: [ArgTypes<T[P]>] }[Exclude<keyof T, keyof any[]>];\n// type BoxedReturnTypes<T extends any[]> = { [P in keyof T]: [InferReturn<T[P]>] }[Exclude<keyof T, keyof any[]>];\n// type UnboxIntersection<T> = T extends { 0: infer U } ? U : never;\n// type Arg<X, R> = RuntimeStyleFunction<X, R> | null | undefined;\n// type NoInfer<T> = [T, void][T extends any ? 0 : 1];\n// type InferReturn<T> = T extends (props: any) => infer R ? NullToObject<R> : never;\n// type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n// type InferReturnType<T extends any[]> = UnboxIntersection<UnionToIntersection<BoxedReturnTypes<T>>>;\n\n// Two overloads:\n// 1. If a render props type is expected based on the return type, forward that type to all arguments.\n// 2. Otherwise, infer the return type based on the arguments.\n// export function merge<R extends RenderProps<string> = never, X = {}>(...args: Arg<NoInfer<X>, NoInfer<R>>[]): RuntimeStyleFunction<X, R>;\n// export function merge<T extends Arg<any, any>[]>(...args: T): RuntimeStyleFunction<InferReturnType<T>, UnboxIntersection<UnionToIntersection<BoxedTupleTypes<T>>>>;\n// export function merge(...args: any[]): RuntimeStyleFunction<any, any> {\n// return (props) => {\n// return mergeStyles(...args.map(f => typeof f === 'function' ? f(props) : null));\n// };\n// }\n\nexport function mergeStyles(...styles: (StyleString | null | undefined)[]): StyleString {\n let definedStyles = styles.filter(Boolean) as StyleString[];\n if (definedStyles.length === 1) {\n return definedStyles[0];\n }\n\n let map = new Map();\n for (let style of definedStyles) {\n for (let [k, v] of parse(style)) {\n map.set(k, v);\n }\n }\n \n let res = '';\n for (let value of map.values()) {\n res += value;\n }\n return res as StyleString;\n}\n\nfunction parse(s: string) {\n let properties = new Map<string, string>();\n let i = 0;\n while (i < s.length) {\n while (i < s.length && s[i] === ' ') {\n i++;\n }\n\n let start = i;\n readValue(); // property index\n\n // read conditions (up to the last segment)\n let condition = i;\n while (i < s.length && s[i] !== ' ') {\n readValue();\n }\n\n let property = s.slice(start, condition);\n properties.set(property, (properties.get(property) || '') + ' ' + s.slice(start, i));\n }\n\n function readValue() {\n if (s[i] === '-') {\n // the beginning and end of arbitrary values are marked with -\n while (i < s.length && s[i] !== ' ') {\n i++;\n if (s[i] === '-') {\n i++;\n break;\n }\n }\n } else {\n while (i < s.length) {\n if (s[i] === '_') {\n i++;\n } else {\n i++;\n break;\n }\n }\n }\n }\n\n return properties;\n}\n"],"names":[],"version":3,"file":"runtime.cjs.map"}
1
+ {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GA4BM,SAAS,0CAAY,GAAG,MAA0C;IACvE,IAAI,gBAAgB,OAAO,MAAM,CAAC;IAClC,IAAI,cAAc,MAAM,KAAK,GAAG;QAC9B,IAAI,QAAQ,aAAa,CAAC,EAAE;QAC5B,IAAI,OAAO,UAAU,UACnB,2FAA2F;QAC3F,+FAA+F;QAC/F,OAAO,AAAC,MAAsB,QAAQ;QAExC,OAAO;IACT;IAEA,IAAI,MAAM,IAAI;IAEd,KAAK,IAAI,SAAS,cAAe;QAC/B,+CAA+C;QAC/C,IAAI,MAAM,MAAM,QAAQ;QAExB,KAAK,IAAI,CAAC,GAAG,EAAE,IAAI,4BAAM,KACvB,IAAI,GAAG,CAAC,GAAG;IAEf;IAEA,IAAI,MAAM;IACV,KAAK,IAAI,SAAS,IAAI,MAAM,GAC1B,OAAO;IAGT,OAAO;AACT;AAEA,SAAS,4BAAM,CAAS;IACtB,IAAI,aAAa,IAAI;IACrB,IAAI,IAAI;IACR,MAAO,IAAI,EAAE,MAAM,CAAE;QACnB,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAC9B;QAGF,IAAI,QAAQ;QACZ,aAAa,iBAAiB;QAE9B,2CAA2C;QAC3C,IAAI,YAAY;QAChB,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAC9B;QAGF,IAAI,WAAW,EAAE,KAAK,CAAC,OAAO;QAC9B,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,gBAAgB,SAAS,UAAU,CAAC,YAAY;YAC3E,IAAI,QAAQ,EAAE,KAAK,CAAC,OAAO;YAC3B,WAAW,GAAG,CAAC,OAAO,MAAM;QAC9B,OACE,WAAW,GAAG,CAAC,UAAU,AAAC,CAAA,WAAW,GAAG,CAAC,aAAa,EAAC,IAAK,MAAM,EAAE,KAAK,CAAC,OAAO;IAErF;IAEA,SAAS;QACP,IAAI,CAAC,CAAC,EAAE,KAAK,KACX,8DAA8D;QAC9D,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAAK;YACnC;YACA,IAAI,CAAC,CAAC,EAAE,KAAK,KAAK;gBAChB;gBACA;YACF;QACF;aACK;YACL,MAAO,IAAI,EAAE,MAAM,CACjB,IAAI,CAAC,CAAC,EAAE,KAAK,KACX;iBACK;gBACL;gBACA;YACF;QAEJ;IACF;IAEA,OAAO;AACT","sources":["packages/@react-spectrum/s2/style/runtime.ts"],"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 {StyleString} from './types';\n// import {RuntimeStyleFunction, RenderProps} from './types';\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\n// type ArgTypes<T> = T extends (props: infer V) => any ? NullToObject<V> : never;\n// type NullToObject<T> = T extends (null | undefined) ? {} : T;\n// type BoxedTupleTypes<T extends any[]> = { [P in keyof T]: [ArgTypes<T[P]>] }[Exclude<keyof T, keyof any[]>];\n// type BoxedReturnTypes<T extends any[]> = { [P in keyof T]: [InferReturn<T[P]>] }[Exclude<keyof T, keyof any[]>];\n// type UnboxIntersection<T> = T extends { 0: infer U } ? U : never;\n// type Arg<X, R> = RuntimeStyleFunction<X, R> | null | undefined;\n// type NoInfer<T> = [T, void][T extends any ? 0 : 1];\n// type InferReturn<T> = T extends (props: any) => infer R ? NullToObject<R> : never;\n// type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n// type InferReturnType<T extends any[]> = UnboxIntersection<UnionToIntersection<BoxedReturnTypes<T>>>;\n\n// Two overloads:\n// 1. If a render props type is expected based on the return type, forward that type to all arguments.\n// 2. Otherwise, infer the return type based on the arguments.\n// export function merge<R extends RenderProps<string> = never, X = {}>(...args: Arg<NoInfer<X>, NoInfer<R>>[]): RuntimeStyleFunction<X, R>;\n// export function merge<T extends Arg<any, any>[]>(...args: T): RuntimeStyleFunction<InferReturnType<T>, UnboxIntersection<UnionToIntersection<BoxedTupleTypes<T>>>>;\n// export function merge(...args: any[]): RuntimeStyleFunction<any, any> {\n// return (props) => {\n// return mergeStyles(...args.map(f => typeof f === 'function' ? f(props) : null));\n// };\n// }\n\nexport function mergeStyles(...styles: (StyleString | null | undefined)[]): StyleString {\n let definedStyles = styles.filter(Boolean) as StyleString[];\n if (definedStyles.length === 1) {\n let first = definedStyles[0];\n if (typeof first !== 'string') {\n // static macro has a toString method so that we generate the style macro map for the entry\n // it's automatically called in other places, but for our merging, we have to call it ourselves\n return (first as StyleString).toString() as StyleString;\n }\n return first;\n }\n\n let map = new Map<string, string>();\n\n for (let style of definedStyles) {\n // must call toString here for the static macro\n let str = style.toString();\n\n for (let [k, v] of parse(str)) {\n map.set(k, v);\n }\n }\n\n let res = '';\n for (let value of map.values()) {\n res += value;\n }\n\n return res as StyleString;\n}\n\nfunction parse(s: string) {\n let properties = new Map<string, string>();\n let i = 0;\n while (i < s.length) {\n while (i < s.length && s[i] === ' ') {\n i++;\n }\n\n let start = i;\n readValue(); // property index\n\n // read conditions (up to the last segment)\n let condition = i;\n while (i < s.length && s[i] !== ' ') {\n readValue();\n }\n\n let property = s.slice(start, condition);\n if (process.env.NODE_ENV !== 'production' && property.startsWith('-macro-')) {\n let value = s.slice(start, i);\n properties.set(value, ' ' + value);\n } else {\n properties.set(property, (properties.get(property) || '') + ' ' + s.slice(start, i));\n }\n }\n\n function readValue() {\n if (s[i] === '-') {\n // the beginning and end of arbitrary values are marked with -\n while (i < s.length && s[i] !== ' ') {\n i++;\n if (s[i] === '-') {\n i++;\n break;\n }\n }\n } else {\n while (i < s.length) {\n if (s[i] === '_') {\n i++;\n } else {\n i++;\n break;\n }\n }\n }\n }\n\n return properties;\n}\n"],"names":[],"version":3,"file":"runtime.cjs.map"}
package/icons/runtime.mjs CHANGED
@@ -10,9 +10,19 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */ function $feb886035e0d4633$export$e618dc39ac9ad607(...styles) {
12
12
  let definedStyles = styles.filter(Boolean);
13
- if (definedStyles.length === 1) return definedStyles[0];
13
+ if (definedStyles.length === 1) {
14
+ let first = definedStyles[0];
15
+ if (typeof first !== 'string') // static macro has a toString method so that we generate the style macro map for the entry
16
+ // it's automatically called in other places, but for our merging, we have to call it ourselves
17
+ return first.toString();
18
+ return first;
19
+ }
14
20
  let map = new Map();
15
- for (let style of definedStyles)for (let [k, v] of $feb886035e0d4633$var$parse(style))map.set(k, v);
21
+ for (let style of definedStyles){
22
+ // must call toString here for the static macro
23
+ let str = style.toString();
24
+ for (let [k, v] of $feb886035e0d4633$var$parse(str))map.set(k, v);
25
+ }
16
26
  let res = '';
17
27
  for (let value of map.values())res += value;
18
28
  return res;
@@ -28,7 +38,10 @@ function $feb886035e0d4633$var$parse(s) {
28
38
  let condition = i;
29
39
  while(i < s.length && s[i] !== ' ')readValue();
30
40
  let property = s.slice(start, condition);
31
- properties.set(property, (properties.get(property) || '') + ' ' + s.slice(start, i));
41
+ if (process.env.NODE_ENV !== 'production' && property.startsWith('-macro-')) {
42
+ let value = s.slice(start, i);
43
+ properties.set(value, ' ' + value);
44
+ } else properties.set(property, (properties.get(property) || '') + ' ' + s.slice(start, i));
32
45
  }
33
46
  function readValue() {
34
47
  if (s[i] === '-') // the beginning and end of arbitrary values are marked with -
@@ -1 +1 @@
1
- {"mappings":"AAAA;;;;;;;;;;CAUC,GA4BM,SAAS,0CAAY,GAAG,MAA0C;IACvE,IAAI,gBAAgB,OAAO,MAAM,CAAC;IAClC,IAAI,cAAc,MAAM,KAAK,GAC3B,OAAO,aAAa,CAAC,EAAE;IAGzB,IAAI,MAAM,IAAI;IACd,KAAK,IAAI,SAAS,cAChB,KAAK,IAAI,CAAC,GAAG,EAAE,IAAI,4BAAM,OACvB,IAAI,GAAG,CAAC,GAAG;IAIf,IAAI,MAAM;IACV,KAAK,IAAI,SAAS,IAAI,MAAM,GAC1B,OAAO;IAET,OAAO;AACT;AAEA,SAAS,4BAAM,CAAS;IACtB,IAAI,aAAa,IAAI;IACrB,IAAI,IAAI;IACR,MAAO,IAAI,EAAE,MAAM,CAAE;QACnB,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAC9B;QAGF,IAAI,QAAQ;QACZ,aAAa,iBAAiB;QAE9B,2CAA2C;QAC3C,IAAI,YAAY;QAChB,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAC9B;QAGF,IAAI,WAAW,EAAE,KAAK,CAAC,OAAO;QAC9B,WAAW,GAAG,CAAC,UAAU,AAAC,CAAA,WAAW,GAAG,CAAC,aAAa,EAAC,IAAK,MAAM,EAAE,KAAK,CAAC,OAAO;IACnF;IAEA,SAAS;QACP,IAAI,CAAC,CAAC,EAAE,KAAK,KACX,8DAA8D;QAC9D,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAAK;YACnC;YACA,IAAI,CAAC,CAAC,EAAE,KAAK,KAAK;gBAChB;gBACA;YACF;QACF;aACK;YACL,MAAO,IAAI,EAAE,MAAM,CACjB,IAAI,CAAC,CAAC,EAAE,KAAK,KACX;iBACK;gBACL;gBACA;YACF;QAEJ;IACF;IAEA,OAAO;AACT","sources":["packages/@react-spectrum/s2/style/runtime.ts"],"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 {StyleString} from './types';\n// import {RuntimeStyleFunction, RenderProps} from './types';\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\n// type ArgTypes<T> = T extends (props: infer V) => any ? NullToObject<V> : never;\n// type NullToObject<T> = T extends (null | undefined) ? {} : T;\n// type BoxedTupleTypes<T extends any[]> = { [P in keyof T]: [ArgTypes<T[P]>] }[Exclude<keyof T, keyof any[]>];\n// type BoxedReturnTypes<T extends any[]> = { [P in keyof T]: [InferReturn<T[P]>] }[Exclude<keyof T, keyof any[]>];\n// type UnboxIntersection<T> = T extends { 0: infer U } ? U : never;\n// type Arg<X, R> = RuntimeStyleFunction<X, R> | null | undefined;\n// type NoInfer<T> = [T, void][T extends any ? 0 : 1];\n// type InferReturn<T> = T extends (props: any) => infer R ? NullToObject<R> : never;\n// type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n// type InferReturnType<T extends any[]> = UnboxIntersection<UnionToIntersection<BoxedReturnTypes<T>>>;\n\n// Two overloads:\n// 1. If a render props type is expected based on the return type, forward that type to all arguments.\n// 2. Otherwise, infer the return type based on the arguments.\n// export function merge<R extends RenderProps<string> = never, X = {}>(...args: Arg<NoInfer<X>, NoInfer<R>>[]): RuntimeStyleFunction<X, R>;\n// export function merge<T extends Arg<any, any>[]>(...args: T): RuntimeStyleFunction<InferReturnType<T>, UnboxIntersection<UnionToIntersection<BoxedTupleTypes<T>>>>;\n// export function merge(...args: any[]): RuntimeStyleFunction<any, any> {\n// return (props) => {\n// return mergeStyles(...args.map(f => typeof f === 'function' ? f(props) : null));\n// };\n// }\n\nexport function mergeStyles(...styles: (StyleString | null | undefined)[]): StyleString {\n let definedStyles = styles.filter(Boolean) as StyleString[];\n if (definedStyles.length === 1) {\n return definedStyles[0];\n }\n\n let map = new Map();\n for (let style of definedStyles) {\n for (let [k, v] of parse(style)) {\n map.set(k, v);\n }\n }\n \n let res = '';\n for (let value of map.values()) {\n res += value;\n }\n return res as StyleString;\n}\n\nfunction parse(s: string) {\n let properties = new Map<string, string>();\n let i = 0;\n while (i < s.length) {\n while (i < s.length && s[i] === ' ') {\n i++;\n }\n\n let start = i;\n readValue(); // property index\n\n // read conditions (up to the last segment)\n let condition = i;\n while (i < s.length && s[i] !== ' ') {\n readValue();\n }\n\n let property = s.slice(start, condition);\n properties.set(property, (properties.get(property) || '') + ' ' + s.slice(start, i));\n }\n\n function readValue() {\n if (s[i] === '-') {\n // the beginning and end of arbitrary values are marked with -\n while (i < s.length && s[i] !== ' ') {\n i++;\n if (s[i] === '-') {\n i++;\n break;\n }\n }\n } else {\n while (i < s.length) {\n if (s[i] === '_') {\n i++;\n } else {\n i++;\n break;\n }\n }\n }\n }\n\n return properties;\n}\n"],"names":[],"version":3,"file":"runtime.mjs.map"}
1
+ {"mappings":"AAAA;;;;;;;;;;CAUC,GA4BM,SAAS,0CAAY,GAAG,MAA0C;IACvE,IAAI,gBAAgB,OAAO,MAAM,CAAC;IAClC,IAAI,cAAc,MAAM,KAAK,GAAG;QAC9B,IAAI,QAAQ,aAAa,CAAC,EAAE;QAC5B,IAAI,OAAO,UAAU,UACnB,2FAA2F;QAC3F,+FAA+F;QAC/F,OAAO,AAAC,MAAsB,QAAQ;QAExC,OAAO;IACT;IAEA,IAAI,MAAM,IAAI;IAEd,KAAK,IAAI,SAAS,cAAe;QAC/B,+CAA+C;QAC/C,IAAI,MAAM,MAAM,QAAQ;QAExB,KAAK,IAAI,CAAC,GAAG,EAAE,IAAI,4BAAM,KACvB,IAAI,GAAG,CAAC,GAAG;IAEf;IAEA,IAAI,MAAM;IACV,KAAK,IAAI,SAAS,IAAI,MAAM,GAC1B,OAAO;IAGT,OAAO;AACT;AAEA,SAAS,4BAAM,CAAS;IACtB,IAAI,aAAa,IAAI;IACrB,IAAI,IAAI;IACR,MAAO,IAAI,EAAE,MAAM,CAAE;QACnB,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAC9B;QAGF,IAAI,QAAQ;QACZ,aAAa,iBAAiB;QAE9B,2CAA2C;QAC3C,IAAI,YAAY;QAChB,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAC9B;QAGF,IAAI,WAAW,EAAE,KAAK,CAAC,OAAO;QAC9B,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,gBAAgB,SAAS,UAAU,CAAC,YAAY;YAC3E,IAAI,QAAQ,EAAE,KAAK,CAAC,OAAO;YAC3B,WAAW,GAAG,CAAC,OAAO,MAAM;QAC9B,OACE,WAAW,GAAG,CAAC,UAAU,AAAC,CAAA,WAAW,GAAG,CAAC,aAAa,EAAC,IAAK,MAAM,EAAE,KAAK,CAAC,OAAO;IAErF;IAEA,SAAS;QACP,IAAI,CAAC,CAAC,EAAE,KAAK,KACX,8DAA8D;QAC9D,MAAO,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,IAAK;YACnC;YACA,IAAI,CAAC,CAAC,EAAE,KAAK,KAAK;gBAChB;gBACA;YACF;QACF;aACK;YACL,MAAO,IAAI,EAAE,MAAM,CACjB,IAAI,CAAC,CAAC,EAAE,KAAK,KACX;iBACK;gBACL;gBACA;YACF;QAEJ;IACF;IAEA,OAAO;AACT","sources":["packages/@react-spectrum/s2/style/runtime.ts"],"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 {StyleString} from './types';\n// import {RuntimeStyleFunction, RenderProps} from './types';\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\n// type ArgTypes<T> = T extends (props: infer V) => any ? NullToObject<V> : never;\n// type NullToObject<T> = T extends (null | undefined) ? {} : T;\n// type BoxedTupleTypes<T extends any[]> = { [P in keyof T]: [ArgTypes<T[P]>] }[Exclude<keyof T, keyof any[]>];\n// type BoxedReturnTypes<T extends any[]> = { [P in keyof T]: [InferReturn<T[P]>] }[Exclude<keyof T, keyof any[]>];\n// type UnboxIntersection<T> = T extends { 0: infer U } ? U : never;\n// type Arg<X, R> = RuntimeStyleFunction<X, R> | null | undefined;\n// type NoInfer<T> = [T, void][T extends any ? 0 : 1];\n// type InferReturn<T> = T extends (props: any) => infer R ? NullToObject<R> : never;\n// type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n// type InferReturnType<T extends any[]> = UnboxIntersection<UnionToIntersection<BoxedReturnTypes<T>>>;\n\n// Two overloads:\n// 1. If a render props type is expected based on the return type, forward that type to all arguments.\n// 2. Otherwise, infer the return type based on the arguments.\n// export function merge<R extends RenderProps<string> = never, X = {}>(...args: Arg<NoInfer<X>, NoInfer<R>>[]): RuntimeStyleFunction<X, R>;\n// export function merge<T extends Arg<any, any>[]>(...args: T): RuntimeStyleFunction<InferReturnType<T>, UnboxIntersection<UnionToIntersection<BoxedTupleTypes<T>>>>;\n// export function merge(...args: any[]): RuntimeStyleFunction<any, any> {\n// return (props) => {\n// return mergeStyles(...args.map(f => typeof f === 'function' ? f(props) : null));\n// };\n// }\n\nexport function mergeStyles(...styles: (StyleString | null | undefined)[]): StyleString {\n let definedStyles = styles.filter(Boolean) as StyleString[];\n if (definedStyles.length === 1) {\n let first = definedStyles[0];\n if (typeof first !== 'string') {\n // static macro has a toString method so that we generate the style macro map for the entry\n // it's automatically called in other places, but for our merging, we have to call it ourselves\n return (first as StyleString).toString() as StyleString;\n }\n return first;\n }\n\n let map = new Map<string, string>();\n\n for (let style of definedStyles) {\n // must call toString here for the static macro\n let str = style.toString();\n\n for (let [k, v] of parse(str)) {\n map.set(k, v);\n }\n }\n\n let res = '';\n for (let value of map.values()) {\n res += value;\n }\n\n return res as StyleString;\n}\n\nfunction parse(s: string) {\n let properties = new Map<string, string>();\n let i = 0;\n while (i < s.length) {\n while (i < s.length && s[i] === ' ') {\n i++;\n }\n\n let start = i;\n readValue(); // property index\n\n // read conditions (up to the last segment)\n let condition = i;\n while (i < s.length && s[i] !== ' ') {\n readValue();\n }\n\n let property = s.slice(start, condition);\n if (process.env.NODE_ENV !== 'production' && property.startsWith('-macro-')) {\n let value = s.slice(start, i);\n properties.set(value, ' ' + value);\n } else {\n properties.set(property, (properties.get(property) || '') + ' ' + s.slice(start, i));\n }\n }\n\n function readValue() {\n if (s[i] === '-') {\n // the beginning and end of arbitrary values are marked with -\n while (i < s.length && s[i] !== ' ') {\n i++;\n if (s[i] === '-') {\n i++;\n break;\n }\n }\n } else {\n while (i < s.length) {\n if (s[i] === '_') {\n i++;\n } else {\n i++;\n break;\n }\n }\n }\n }\n\n return properties;\n}\n"],"names":[],"version":3,"file":"runtime.mjs.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/s2",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Spectrum 2 UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -77,30 +77,30 @@
77
77
  "src"
78
78
  ],
79
79
  "dependencies": {
80
- "@internationalized/date": "^3.10.1",
80
+ "@internationalized/date": "^3.11.0",
81
81
  "@internationalized/number": "^3.6.5",
82
82
  "@parcel/macros": "^2.16.3",
83
- "@react-aria/calendar": "^3.9.3",
84
- "@react-aria/collections": "^3.0.1",
85
- "@react-aria/focus": "^3.21.3",
86
- "@react-aria/i18n": "^3.12.14",
87
- "@react-aria/interactions": "^3.26.0",
83
+ "@react-aria/calendar": "^3.9.4",
84
+ "@react-aria/collections": "^3.0.2",
85
+ "@react-aria/focus": "^3.21.4",
86
+ "@react-aria/i18n": "^3.12.15",
87
+ "@react-aria/interactions": "^3.27.0",
88
88
  "@react-aria/live-announcer": "^3.4.4",
89
- "@react-aria/utils": "^3.32.0",
90
- "@react-spectrum/utils": "^3.12.10",
91
- "@react-stately/layout": "^4.5.2",
89
+ "@react-aria/utils": "^3.33.0",
90
+ "@react-spectrum/utils": "^3.12.11",
91
+ "@react-stately/layout": "^4.5.3",
92
92
  "@react-stately/utils": "^3.11.0",
93
- "@react-types/dialog": "^3.5.22",
94
- "@react-types/grid": "^3.3.6",
95
- "@react-types/overlays": "^3.9.2",
96
- "@react-types/provider": "^3.8.13",
97
- "@react-types/shared": "^3.32.1",
98
- "@react-types/table": "^3.13.4",
99
- "@react-types/textfield": "^3.12.6",
93
+ "@react-types/dialog": "^3.5.23",
94
+ "@react-types/grid": "^3.3.7",
95
+ "@react-types/overlays": "^3.9.3",
96
+ "@react-types/provider": "^3.8.14",
97
+ "@react-types/shared": "^3.33.0",
98
+ "@react-types/table": "^3.13.5",
99
+ "@react-types/textfield": "^3.12.7",
100
100
  "csstype": "^3.0.2",
101
- "react-aria": "^3.45.0",
102
- "react-aria-components": "^1.14.0",
103
- "react-stately": "^3.43.0"
101
+ "react-aria": "^3.46.0",
102
+ "react-aria-components": "^1.15.0",
103
+ "react-stately": "^3.44.0"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "react": "^19.0.0-rc.1",
@@ -109,5 +109,5 @@
109
109
  "publishConfig": {
110
110
  "access": "public"
111
111
  },
112
- "gitHead": "4d838da5bfe36abb35aed166995a9ef63825370f"
112
+ "gitHead": "66e51757606b43a89ed02c574ca24517323a2ab9"
113
113
  }
package/src/Accordion.tsx CHANGED
@@ -122,7 +122,7 @@ export interface AccordionItemRenderProps {
122
122
  state: AccordionItemState
123
123
  }
124
124
 
125
- export interface AccordionItemProps extends Omit<RenderProps<AccordionItemRenderProps>, 'className' | 'style'>, SlotProps, StyleProps {
125
+ export interface AccordionItemProps extends Omit<RenderProps<AccordionItemRenderProps>, 'className' | 'style' | 'render'>, SlotProps, StyleProps {
126
126
  /**
127
127
  * The size of the accordion item.
128
128
  * @default 'M'
package/src/ActionBar.tsx CHANGED
@@ -161,8 +161,8 @@ const ActionBarInner = forwardRef(function ActionBarInner(props: ActionBarProps
161
161
  ref={objectRef}
162
162
  {...otherProps}
163
163
  {...keyboardProps}
164
- className={actionBarStyles({isEmphasized, isInContainer: !!scrollRef, isEntering, isExiting})}
165
- style={{insetInlineEnd: `calc(var(--insetEnd) + ${scrollbarWidth}px)`}}>
164
+ className={(props.UNSAFE_className || '') + actionBarStyles({isEmphasized, isInContainer: !!scrollRef, isEntering, isExiting})}
165
+ style={{insetInlineEnd: `calc(var(--insetEnd) + ${scrollbarWidth}px)`, ...props.UNSAFE_style}}>
166
166
  <div className={style({order: 1, marginStart: 'auto'})}>
167
167
  <ActionButtonGroup
168
168
  staticColor={isEmphasized ? 'auto' : undefined}
@@ -59,7 +59,7 @@ interface ActionGroupItemStyleProps {
59
59
  isJustified?: boolean
60
60
  }
61
61
 
62
- export interface ActionButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, ActionButtonStyleProps {
62
+ export interface ActionButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'render' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, ActionButtonStyleProps {
63
63
  /** The content to display in the ActionButton. */
64
64
  children: ReactNode
65
65
  }
@@ -63,7 +63,7 @@ interface BreadcrumbsStyleProps {
63
63
  // TODO: showRoot?: boolean,
64
64
  }
65
65
 
66
- export interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps<T>, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes>, BreadcrumbsStyleProps, StyleProps {
66
+ export interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps<T>, 'children' | 'style' | 'className' | 'render' | keyof GlobalDOMAttributes>, BreadcrumbsStyleProps, StyleProps {
67
67
  /** The children of the Breadcrumbs. */
68
68
  children: ReactNode | ((item: T) => ReactNode)
69
69
  }
@@ -296,7 +296,7 @@ const heading = style({
296
296
  fontWeight: 'extra-bold'
297
297
  });
298
298
 
299
- export interface BreadcrumbProps extends Omit<AriaBreadcrumbItemProps, 'children' | 'style' | 'className' | 'autoFocus' | 'onClick' | keyof GlobalDOMAttributes>, LinkDOMProps {
299
+ export interface BreadcrumbProps extends Omit<AriaBreadcrumbItemProps, 'children' | 'style' | 'className' | 'render' | 'autoFocus' | 'onClick' | keyof GlobalDOMAttributes>, LinkDOMProps {
300
300
  /** The children of the breadcrumb item. */
301
301
  children: ReactNode
302
302
  }
package/src/Button.tsx CHANGED
@@ -52,12 +52,12 @@ interface ButtonStyleProps {
52
52
  staticColor?: 'white' | 'black' | 'auto'
53
53
  }
54
54
 
55
- export interface ButtonProps extends Omit<RACButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, ButtonStyleProps {
55
+ export interface ButtonProps extends Omit<RACButtonProps, 'className' | 'style' | 'render' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, ButtonStyleProps {
56
56
  /** The content to display in the Button. */
57
57
  children: ReactNode
58
58
  }
59
59
 
60
- export interface LinkButtonProps extends Omit<LinkProps, 'className' | 'style' | 'children' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, ButtonStyleProps {
60
+ export interface LinkButtonProps extends Omit<LinkProps, 'className' | 'style' | 'render' | 'children' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, ButtonStyleProps {
61
61
  /** The content to display in the Button. */
62
62
  children: ReactNode
63
63
  }
package/src/Calendar.tsx CHANGED
@@ -55,7 +55,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
55
55
 
56
56
 
57
57
  export interface CalendarProps<T extends DateValue>
58
- extends Omit<AriaCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'styles' | 'children' | keyof GlobalDOMAttributes>,
58
+ extends Omit<AriaCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'render' | 'styles' | 'children' | keyof GlobalDOMAttributes>,
59
59
  StyleProps {
60
60
  /**
61
61
  * The error message to display when the calendar is invalid.
package/src/Card.tsx CHANGED
@@ -36,7 +36,7 @@ interface CardRenderProps {
36
36
  size: 'XS' | 'S' | 'M' | 'L' | 'XL'
37
37
  }
38
38
 
39
- export interface CardProps extends Omit<GridListItemProps, 'className' | 'style' | 'children' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
39
+ export interface CardProps extends Omit<GridListItemProps, 'className' | 'style' | 'render' | 'children' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
40
40
  /** The children of the Card. */
41
41
  children: ReactNode | ((renderProps: CardRenderProps) => ReactNode),
42
42
  /**
package/src/CardView.tsx CHANGED
@@ -34,7 +34,7 @@ import {useDOMRef} from '@react-spectrum/utils';
34
34
  import {useEffectEvent, useLayoutEffect, useResizeObserver} from '@react-aria/utils';
35
35
  import {useSpectrumContextProps} from './useSpectrumContextProps';
36
36
 
37
- export interface CardViewProps<T> extends Omit<GridListProps<T>, 'layout' | 'keyboardNavigationBehavior' | 'selectionBehavior' | 'className' | 'style' | 'isLoading' | keyof GlobalDOMAttributes>, UnsafeStyles {
37
+ export interface CardViewProps<T> extends Omit<GridListProps<T>, 'layout' | 'keyboardNavigationBehavior' | 'selectionBehavior' | 'className' | 'style' | 'render' | 'isLoading' | keyof GlobalDOMAttributes>, UnsafeStyles {
38
38
  /**
39
39
  * The layout of the cards.
40
40
  * @default 'grid'
package/src/Checkbox.tsx CHANGED
@@ -36,7 +36,7 @@ interface CheckboxStyleProps {
36
36
 
37
37
  interface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {}
38
38
 
39
- export interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, CheckboxStyleProps {
39
+ export interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'render' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, CheckboxStyleProps {
40
40
  /** The label for the element. */
41
41
  children?: ReactNode
42
42
  }
@@ -110,6 +110,7 @@ export const box = style<RenderProps>({
110
110
  });
111
111
 
112
112
  export const iconStyles = style({
113
+ pointerEvents: 'none',
113
114
  '--iconPrimary': {
114
115
  type: 'fill',
115
116
  value: {
@@ -25,7 +25,7 @@ import {style} from '../style' with {type: 'macro'};
25
25
  import {useDOMRef} from '@react-spectrum/utils';
26
26
  import {useSpectrumContextProps} from './useSpectrumContextProps';
27
27
 
28
- export interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps {
28
+ export interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'render' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps {
29
29
  /**
30
30
  * The size of the Checkboxes in the CheckboxGroup.
31
31
  *
package/src/CoachMark.tsx CHANGED
@@ -320,7 +320,7 @@ const actionButtonSize = {
320
320
  XL: 'L'
321
321
  } as const;
322
322
 
323
- export const CoachMarkContext = createContext<ContextValue<CoachMarkProps, HTMLElement>>({});
323
+ export const CoachMarkContext = createContext<ContextValue<Partial<CoachMarkProps>, HTMLElement>>({});
324
324
 
325
325
  export const CoachMark = forwardRef((props: CoachMarkProps, ref: ForwardedRef<HTMLElement>) => {
326
326
  let colorScheme = useContext(ColorSchemeContext);
package/src/ColorArea.tsx CHANGED
@@ -24,7 +24,7 @@ import {style} from '../style' with {type: 'macro'};
24
24
  import {useDOMRef} from '@react-spectrum/utils';
25
25
  import {useSpectrumContextProps} from './useSpectrumContextProps';
26
26
 
27
- export interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps {}
27
+ export interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps {}
28
28
 
29
29
  export const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);
30
30
 
@@ -26,7 +26,7 @@ import {style} from '../style' with {type: 'macro'};
26
26
  import {TextFieldRef} from '@react-types/textfield';
27
27
  import {useSpectrumContextProps} from './useSpectrumContextProps';
28
28
 
29
- export interface ColorFieldProps extends Omit<AriaColorFieldProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps, Pick<InputProps, 'placeholder'> {
29
+ export interface ColorFieldProps extends Omit<AriaColorFieldProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps, Pick<InputProps, 'placeholder'> {
30
30
  /**
31
31
  * The size of the color field.
32
32
  *
@@ -27,7 +27,7 @@ import {style} from '../style' with {type: 'macro'};
27
27
  import {useDOMRef} from '@react-spectrum/utils';
28
28
  import {useSpectrumContextProps} from './useSpectrumContextProps';
29
29
 
30
- export interface ColorSliderProps extends Omit<AriaColorSliderProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, Pick<SpectrumLabelableProps, 'contextualHelp'>, StyleProps {
30
+ export interface ColorSliderProps extends Omit<AriaColorSliderProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, Pick<SpectrumLabelableProps, 'contextualHelp'>, StyleProps {
31
31
  label?: string
32
32
  }
33
33
 
@@ -24,7 +24,7 @@ import {style} from '../style' with {type: 'macro'};
24
24
  import {useDOMRef} from '@react-spectrum/utils';
25
25
  import {useSpectrumContextProps} from './useSpectrumContextProps';
26
26
 
27
- export interface ColorSwatchProps extends Omit<AriaColorSwatchProps, 'className' | 'style' | keyof GlobalDOMAttributes>, UnsafeStyles {
27
+ export interface ColorSwatchProps extends Omit<AriaColorSwatchProps, 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, UnsafeStyles {
28
28
  /**
29
29
  * The size of the ColorSwatch.
30
30
  * @default 'M'
@@ -24,7 +24,7 @@ import {StyleProps} from './style-utils';
24
24
  import {useDOMRef} from '@react-spectrum/utils';
25
25
  import {useSpectrumContextProps} from './useSpectrumContextProps';
26
26
 
27
- export interface ColorWheelProps extends Omit<AriaColorWheelProps, 'children' | 'className' | 'style' | 'outerRadius' | 'innerRadius' | keyof GlobalDOMAttributes>, StyleProps {
27
+ export interface ColorWheelProps extends Omit<AriaColorWheelProps, 'children' | 'className' | 'style' | 'render' | 'outerRadius' | 'innerRadius' | keyof GlobalDOMAttributes>, StyleProps {
28
28
  /**
29
29
  * @default 192
30
30
  */
@@ -51,7 +51,7 @@ export const ColorWheel = forwardRef(function ColorWheel(props: ColorWheelProps,
51
51
  outerRadius={outerRadius}
52
52
  innerRadius={innerRadius}
53
53
  ref={containerRef}
54
- style={UNSAFE_style}
54
+ style={{...UNSAFE_style, width: outerRadius * 2, height: outerRadius * 2}}
55
55
  className={UNSAFE_className + styles}>
56
56
  {({isDisabled, state}) => (<>
57
57
  <ColorWheelTrack
package/src/ComboBox.tsx CHANGED
@@ -79,7 +79,7 @@ export interface ComboboxStyleProps {
79
79
  size?: 'S' | 'M' | 'L' | 'XL'
80
80
  }
81
81
  export interface ComboBoxProps<T extends object> extends
82
- Omit<AriaComboBoxProps<T>, 'children' | 'style' | 'className' | 'defaultFilter' | 'allowsEmptyCollection' | keyof GlobalDOMAttributes>,
82
+ Omit<AriaComboBoxProps<T>, 'children' | 'style' | 'className' | 'render' | 'defaultFilter' | 'allowsEmptyCollection' | keyof GlobalDOMAttributes>,
83
83
  ComboboxStyleProps,
84
84
  StyleProps,
85
85
  SpectrumLabelableProps,
@@ -368,7 +368,7 @@ export const ComboBox = /*#__PURE__*/ (forwardRef as forwardRefType)(function Co
368
368
  );
369
369
  });
370
370
 
371
- export interface ComboBoxItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
371
+ export interface ComboBoxItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | 'render' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
372
372
  children: ReactNode
373
373
  }
374
374
 
@@ -18,7 +18,7 @@ import {Modal} from './Modal';
18
18
  import {style} from '../style' with {type: 'macro'};
19
19
  import {useDOMRef} from '@react-spectrum/utils';
20
20
 
21
- export interface CustomDialogProps extends Omit<RACDialogProps, 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps {
21
+ export interface CustomDialogProps extends Omit<RACDialogProps, 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps {
22
22
  /**
23
23
  * The size of the Dialog.
24
24
  */
package/src/DateField.tsx CHANGED
@@ -30,7 +30,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
30
30
 
31
31
 
32
32
  export interface DateFieldProps<T extends DateValue> extends
33
- Omit<AriaDateFieldProps<T>, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>,
33
+ Omit<AriaDateFieldProps<T>, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>,
34
34
  StyleProps,
35
35
  SpectrumLabelableProps,
36
36
  HelpTextProps {
@@ -41,7 +41,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
41
41
 
42
42
 
43
43
  export interface DatePickerProps<T extends DateValue> extends
44
- Omit<AriaDatePickerProps<T>, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>,
44
+ Omit<AriaDatePickerProps<T>, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>,
45
45
  Pick<CalendarProps<T>, 'createCalendar' | 'pageBehavior' | 'firstDayOfWeek' | 'isDateUnavailable'>,
46
46
  Pick<PopoverProps, 'shouldFlip'>,
47
47
  StyleProps,
@@ -33,7 +33,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
33
33
 
34
34
 
35
35
  export interface DateRangePickerProps<T extends DateValue> extends
36
- Omit<AriaDateRangePickerProps<T>, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>,
36
+ Omit<AriaDateRangePickerProps<T>, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>,
37
37
  Pick<RangeCalendarProps<T>, 'createCalendar' | 'pageBehavior' | 'firstDayOfWeek' | 'isDateUnavailable'>,
38
38
  Pick<PopoverProps, 'shouldFlip'>,
39
39
  StyleProps,
package/src/Dialog.tsx CHANGED
@@ -23,7 +23,7 @@ import {StyleProps} from './style-utils';
23
23
  import {useDOMRef} from '@react-spectrum/utils';
24
24
 
25
25
  // TODO: what style overrides should be allowed?
26
- export interface DialogProps extends Omit<RACDialogProps, 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps {
26
+ export interface DialogProps extends Omit<RACDialogProps, 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps {
27
27
  /**
28
28
  * Whether the Dialog is dismissible.
29
29
  */
@@ -22,7 +22,7 @@ import React, {createContext, forwardRef, ReactNode, useContext} from 'react';
22
22
  import {useDOMRef} from '@react-spectrum/utils';
23
23
  import {useSpectrumContextProps} from './useSpectrumContextProps';
24
24
 
25
- export interface DisclosureProps extends Omit<RACDisclosureProps, 'className' | 'style' | 'children' | keyof GlobalDOMAttributes>, StyleProps {
25
+ export interface DisclosureProps extends Omit<RACDisclosureProps, 'className' | 'style' | 'render' | 'children' | keyof GlobalDOMAttributes>, StyleProps {
26
26
  /**
27
27
  * The size of the disclosure.
28
28
  * @default 'M'
@@ -295,7 +295,7 @@ export const DisclosureTitle = forwardRef(function DisclosureTitle(props: Disclo
295
295
  );
296
296
  });
297
297
 
298
- export interface DisclosurePanelProps extends Omit<RACDisclosurePanelProps, 'className' | 'style' | 'children'>, UnsafeStyles, DOMProps, AriaLabelingProps {
298
+ export interface DisclosurePanelProps extends Omit<RACDisclosurePanelProps, 'className' | 'style' | 'render' | 'children'>, UnsafeStyles, DOMProps, AriaLabelingProps {
299
299
  children: React.ReactNode
300
300
  }
301
301
 
package/src/Divider.tsx CHANGED
@@ -38,7 +38,7 @@ interface DividerSpectrumProps {
38
38
  }
39
39
 
40
40
  // TODO: allow overriding height (only when orientation is vertical)??
41
- export interface DividerProps extends DividerSpectrumProps, Omit<RACSeparatorProps, 'className' | 'style' | 'elementType' | keyof GlobalDOMAttributes>, StyleProps {}
41
+ export interface DividerProps extends DividerSpectrumProps, Omit<RACSeparatorProps, 'className' | 'style' | 'render' | 'elementType' | keyof GlobalDOMAttributes>, StyleProps {}
42
42
 
43
43
  export const DividerContext = createContext<ContextValue<Partial<DividerProps>, DOMRefValue>>(null);
44
44
 
package/src/DropZone.tsx CHANGED
@@ -22,7 +22,7 @@ import {useDOMRef} from '@react-spectrum/utils';
22
22
  import {useLocalizedStringFormatter} from '@react-aria/i18n';
23
23
  import {useSpectrumContextProps} from './useSpectrumContextProps';
24
24
 
25
- export interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | keyof GlobalDOMAttributes>, UnsafeStyles, DOMProps {
25
+ export interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'render' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | keyof GlobalDOMAttributes>, UnsafeStyles, DOMProps {
26
26
  /** Spectrum-defined styles, returned by the `style()` macro. */
27
27
  styles?: StylesPropWithHeight,
28
28
  /** The content to display in the drop zone. */
package/src/Field.tsx CHANGED
@@ -28,7 +28,7 @@ import {useDOMRef} from '@react-spectrum/utils';
28
28
  import {useId} from '@react-aria/utils';
29
29
  import {useLocalizedStringFormatter} from '@react-aria/i18n';
30
30
 
31
- interface FieldLabelProps extends Omit<LabelProps, 'className' | 'style' | 'children'>, StyleProps {
31
+ interface FieldLabelProps extends Omit<LabelProps, 'className' | 'style' | 'render' | 'children'>, StyleProps {
32
32
  isDisabled?: boolean,
33
33
  isRequired?: boolean,
34
34
  size?: 'S' | 'M' | 'L' | 'XL',
@@ -150,7 +150,7 @@ export const FieldLabel = forwardRef(function FieldLabel(props: FieldLabelProps,
150
150
  );
151
151
  });
152
152
 
153
- interface FieldGroupProps extends Omit<GroupProps, 'className' | 'style' | 'children'>, UnsafeStyles {
153
+ interface FieldGroupProps extends Omit<GroupProps, 'className' | 'style' | 'render' | 'children'>, UnsafeStyles {
154
154
  size?: 'S' | 'M' | 'L' | 'XL',
155
155
  children: ReactNode,
156
156
  styles?: StyleString,
@@ -232,7 +232,7 @@ export const FieldGroup = forwardRef(function FieldGroup(props: FieldGroupProps,
232
232
  );
233
233
  });
234
234
 
235
- export interface InputProps extends Omit<RACInputProps, 'className' | 'style'>, StyleProps {}
235
+ export interface InputProps extends Omit<RACInputProps, 'className' | 'style' | 'render'>, StyleProps {}
236
236
 
237
237
  export const Input = forwardRef(function Input(props: InputProps, ref: ForwardedRef<HTMLInputElement>) {
238
238
  let {UNSAFE_className = '', UNSAFE_style, styles, ...otherProps} = props;
package/src/Form.tsx CHANGED
@@ -30,7 +30,7 @@ interface FormStyleProps extends Omit<SpectrumLabelableProps, 'label' | 'context
30
30
  isEmphasized?: boolean
31
31
  }
32
32
 
33
- export interface FormProps extends FormStyleProps, Omit<RACFormProps, 'className' | 'style' | 'children' | keyof GlobalDOMAttributes>, StyleProps {
33
+ export interface FormProps extends FormStyleProps, Omit<RACFormProps, 'className' | 'style' | 'render' | 'children' | keyof GlobalDOMAttributes>, StyleProps {
34
34
  children: ReactNode
35
35
  }
36
36
 
@@ -21,7 +21,7 @@ import {StyleProps} from './style-utils';
21
21
  import {useDOMRef} from '@react-spectrum/utils';
22
22
 
23
23
  // TODO: what style overrides should be allowed?
24
- export interface FullscreenDialogProps extends Omit<RACDialogProps, 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps {
24
+ export interface FullscreenDialogProps extends Omit<RACDialogProps, 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps {
25
25
  /**
26
26
  * The variant of fullscreen dialog to display.
27
27
  * @default "fullscreen"