@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
@@ -40,22 +40,26 @@ describe('style-macro', () => {
40
40
  "@layer _.a, _.b, _.c;
41
41
 
42
42
  @layer _.b {
43
- .Jbs12:first-child {
43
+ .Jbs1:first-child {
44
44
  margin-top: 0.25rem;
45
45
  }
46
46
  }
47
47
 
48
48
  @layer _.c.p {
49
49
  @media (min-width: 64rem) {
50
- .Jbpv12:first-child {
50
+ .Jbpv1:first-child {
51
51
  margin-top: 0.5rem;
52
52
  }
53
53
  }
54
54
  }
55
55
 
56
+ .-macro-static-E8tar {
57
+ --macro-data-E8tar: {"style":{"marginTop":{":first-child":{"default":4,"lg":8}}},"loc":"undefined:undefined:undefined"};
58
+ }
59
+
56
60
  "
57
61
  `);
58
- expect(js).toMatchInlineSnapshot('" Jbs12 Jbpv12"');
62
+ expect(js).toMatchInlineSnapshot('" Jbs1 Jbpv1 -macro-static-E8tar"');
59
63
  });
60
64
 
61
65
  it('should support self references', () => {
@@ -69,55 +73,59 @@ describe('style-macro', () => {
69
73
  "@layer _.a;
70
74
 
71
75
  @layer _.a {
72
- ._kc12 {
76
+ ._kc1 {
73
77
  border-top-width: 2px;
74
78
  }
75
79
 
76
80
 
77
- .hc12 {
81
+ .hc1 {
78
82
  border-bottom-width: 2px;
79
83
  }
80
84
 
81
85
 
82
- .mCPFGYc12 {
86
+ .mCPFGYc1 {
83
87
  border-inline-start-width: var(--m);
84
88
  }
85
89
 
86
90
 
87
- .lc12 {
91
+ .lc1 {
88
92
  border-inline-end-width: 2px;
89
93
  }
90
94
 
91
95
 
92
- .SMBFGYc12 {
96
+ .SMBFGYc1 {
93
97
  padding-inline-start: var(--S);
94
98
  }
95
99
 
96
100
 
97
- .Rv12 {
101
+ .Rv1 {
98
102
  padding-inline-end: calc(var(--F, var(--M)) * 3 / 8);
99
103
  }
100
104
 
101
105
 
102
- .ZjUQgKd12 {
106
+ .ZjUQgKd1 {
103
107
  width: calc(200px - var(--m) - var(--S));
104
108
  }
105
109
 
106
110
 
107
- .-m_-mc12 {
111
+ .-m_-mc1 {
108
112
  --m: 2px;
109
113
  }
110
114
 
111
115
 
112
- .-S_-Sv12 {
116
+ .-S_-Sv1 {
113
117
  --S: calc(var(--F, var(--M)) * 3 / 8);
114
118
  }
115
119
  }
116
120
 
121
+ .-macro-static-ootVze {
122
+ --macro-data-ootVze: {"style":{"borderWidth":2,"paddingX":"edge-to-text","width":"calc(200px - self(borderStartWidth) - self(paddingStart))"},"loc":"undefined:undefined:undefined"};
123
+ }
124
+
117
125
  "
118
126
  `);
119
127
 
120
- expect(js).toMatchInlineSnapshot('" _kc12 hc12 mCPFGYc12 lc12 SMBFGYc12 Rv12 ZjUQgKd12 -m_-mc12 -S_-Sv12"');
128
+ expect(js).toMatchInlineSnapshot('" _kc1 hc1 mCPFGYc1 lc1 SMBFGYc1 Rv1 ZjUQgKd1 -m_-mc1 -S_-Sv1 -macro-static-ootVze"');
121
129
  });
122
130
 
123
131
  it('should support allowed overrides', () => {
@@ -134,9 +142,9 @@ describe('style-macro', () => {
134
142
  color: 'green-400'
135
143
  });
136
144
 
137
- expect(js()).toMatchInlineSnapshot('" gw12 pg12"');
138
- expect(overrides).toMatchInlineSnapshot('" g8tmWqb12 pHJ3AUd12"');
139
- expect(js({}, overrides)).toMatchInlineSnapshot('" g8tmWqb12 pg12"');
145
+ expect(js()).toMatchInlineSnapshot('" gw1 pg1 -macro-dynamic-1g1t5qe"');
146
+ expect(overrides).toMatchInlineSnapshot('" g8tmWqb1 pHJ3AUd1 -macro-static-YWkqh"');
147
+ expect(js({}, overrides)).toMatchInlineSnapshot('" g8tmWqb1 pg1 -macro-dynamic-w1re4y"');
140
148
  });
141
149
 
142
150
  it('should support allowed overrides for properties that expand into multiple', () => {
@@ -151,9 +159,9 @@ describe('style-macro', () => {
151
159
  translateX: 40
152
160
  });
153
161
 
154
- expect(js()).toMatchInlineSnapshot('" -_7PloMd-B12 __Ya12"');
155
- expect(overrides).toMatchInlineSnapshot('" -_7PloMd-D12 __Ya12"');
156
- expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-D12 __Ya12"');
162
+ expect(js()).toMatchInlineSnapshot('" -_7PloMd-B1 __Ya1 -macro-dynamic-1g21iuv"');
163
+ expect(overrides).toMatchInlineSnapshot('" -_7PloMd-D1 __Ya1 -macro-static-JbY0Pb"');
164
+ expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-D1 __Ya1 -macro-dynamic-7es7uh"');
157
165
  });
158
166
 
159
167
  it('should support allowed overrides for shorthands', () => {
@@ -168,9 +176,9 @@ describe('style-macro', () => {
168
176
  padding: 40
169
177
  });
170
178
 
171
- expect(js()).toMatchInlineSnapshot('" Tk12 Qk12 Sk12 Rk12"');
172
- expect(overrides).toMatchInlineSnapshot('" Tm12 Qm12 Sm12 Rm12"');
173
- expect(js({}, overrides)).toMatchInlineSnapshot('" Tm12 Qm12 Sm12 Rm12"');
179
+ expect(js()).toMatchInlineSnapshot('" Tk1 Qk1 Sk1 Rk1 -macro-dynamic-ov9j7t"');
180
+ expect(overrides).toMatchInlineSnapshot('" Tm1 Qm1 Sm1 Rm1 -macro-static-JNxqEe"');
181
+ expect(js({}, overrides)).toMatchInlineSnapshot('" Tm1 Qm1 Sm1 Rm1 -macro-dynamic-x7v9g1"');
174
182
  });
175
183
 
176
184
  it('should support allowed overrides for fontSize', () => {
@@ -185,9 +193,9 @@ describe('style-macro', () => {
185
193
  fontSize: 'ui-xs'
186
194
  });
187
195
 
188
- expect(js()).toMatchInlineSnapshot('" -_6BNtrc-woabcc12 vx12"');
189
- expect(overrides).toMatchInlineSnapshot('" -_6BNtrc-a12 vx12"');
190
- expect(js({}, overrides)).toMatchInlineSnapshot('" -_6BNtrc-a12 vx12"');
196
+ expect(js()).toMatchInlineSnapshot('" -_6BNtrc-woabcc1 vx1 -macro-dynamic-4vhxg6"');
197
+ expect(overrides).toMatchInlineSnapshot('" -_6BNtrc-a1 vx1 -macro-static-mgSTCe"');
198
+ expect(js({}, overrides)).toMatchInlineSnapshot('" -_6BNtrc-a1 vx1 -macro-dynamic-wufo3s"');
191
199
  });
192
200
 
193
201
  it("should support allowed overrides for values that aren't defined", () => {
@@ -202,9 +210,9 @@ describe('style-macro', () => {
202
210
  minWidth: 32
203
211
  });
204
212
 
205
- expect(js()).toMatchInlineSnapshot('" gE12"');
206
- expect(overrides).toMatchInlineSnapshot('" Nk12"');
207
- expect(js({}, overrides)).toMatchInlineSnapshot('" Nk12 gE12"');
213
+ expect(js()).toMatchInlineSnapshot('" gE1 -macro-dynamic-6mjybw"');
214
+ expect(overrides).toMatchInlineSnapshot('" Nk1 -macro-static-TMcWFd"');
215
+ expect(js({}, overrides)).toMatchInlineSnapshot('" Nk1 gE1 -macro-dynamic-1255f06"');
208
216
  });
209
217
 
210
218
  it('should support runtime conditions', () => {
@@ -225,32 +233,32 @@ describe('style-macro', () => {
225
233
  "@layer _.a;
226
234
 
227
235
  @layer _.a {
228
- .gH12 {
236
+ .gH1 {
229
237
  background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
230
238
  }
231
239
 
232
240
 
233
- .gF12 {
241
+ .gF1 {
234
242
  background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
235
243
  }
236
244
 
237
245
 
238
- .gE12 {
246
+ .gE1 {
239
247
  background-color: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
240
248
  }
241
249
 
242
250
 
243
- .pt12 {
251
+ .pt1 {
244
252
  color: light-dark(rgb(41, 41, 41), rgb(219, 219, 219));
245
253
  }
246
254
 
247
255
 
248
- .po12 {
256
+ .po1 {
249
257
  color: light-dark(rgb(19, 19, 19), rgb(242, 242, 242));
250
258
  }
251
259
 
252
260
 
253
- .pm12 {
261
+ .pm1 {
254
262
  color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));
255
263
  }
256
264
  }
@@ -258,9 +266,9 @@ describe('style-macro', () => {
258
266
  "
259
267
  `);
260
268
 
261
- expect(js({})).toMatchInlineSnapshot('" gH12 pt12"');
262
- expect(js({isHovered: true})).toMatchInlineSnapshot('" gF12 po12"');
263
- expect(js({isPressed: true})).toMatchInlineSnapshot('" gE12 pm12"');
269
+ expect(js({})).toMatchInlineSnapshot('" gH1 pt1 -macro-dynamic-1e9ks2s"');
270
+ expect(js({isHovered: true})).toMatchInlineSnapshot('" gF1 po1 -macro-dynamic-fs3pp9"');
271
+ expect(js({isPressed: true})).toMatchInlineSnapshot('" gE1 pm1 -macro-dynamic-qy1zq2"');
264
272
  });
265
273
 
266
274
  it('should support nested runtime conditions', () => {
@@ -279,32 +287,32 @@ describe('style-macro', () => {
279
287
  "@layer _.a;
280
288
 
281
289
  @layer _.a {
282
- .gH12 {
290
+ .gH1 {
283
291
  background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
284
292
  }
285
293
 
286
294
 
287
- .gF12 {
295
+ .gF1 {
288
296
  background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
289
297
  }
290
298
 
291
299
 
292
- .g_h12 {
300
+ .g_h1 {
293
301
  background-color: light-dark(rgb(75, 117, 255), rgb(64, 105, 253));
294
302
  }
295
303
 
296
304
 
297
- .g312 {
305
+ .g31 {
298
306
  background-color: light-dark(rgb(59, 99, 251), rgb(86, 129, 255));
299
307
  }
300
308
  }
301
309
 
302
310
  "
303
311
  `);
304
- expect(js({})).toMatchInlineSnapshot('" gH12"');
305
- expect(js({isHovered: true})).toMatchInlineSnapshot('" gF12"');
306
- expect(js({isSelected: true})).toMatchInlineSnapshot('" g_h12"');
307
- expect(js({isSelected: true, isHovered: true})).toMatchInlineSnapshot('" g312"');
312
+ expect(js({})).toMatchInlineSnapshot('" gH1 -macro-dynamic-z0gpn3"');
313
+ expect(js({isHovered: true})).toMatchInlineSnapshot('" gF1 -macro-dynamic-1rfxkr1"');
314
+ expect(js({isSelected: true})).toMatchInlineSnapshot('" g_h1 -macro-dynamic-tk9x4e"');
315
+ expect(js({isSelected: true, isHovered: true})).toMatchInlineSnapshot('" g31 -macro-dynamic-1defke2"');
308
316
  });
309
317
 
310
318
  it('should support variant runtime conditions', () => {
@@ -318,9 +326,9 @@ describe('style-macro', () => {
318
326
  }
319
327
  });
320
328
 
321
- expect(js({variant: 'accent'})).toMatchInlineSnapshot('" gY12"');
322
- expect(js({variant: 'primary'})).toMatchInlineSnapshot('" gjQquMe12"');
323
- expect(js({variant: 'secondary'})).toMatchInlineSnapshot('" gw12"');
329
+ expect(js({variant: 'accent'})).toMatchInlineSnapshot('" gY1 -macro-dynamic-6gbj4w"');
330
+ expect(js({variant: 'primary'})).toMatchInlineSnapshot('" gjQquMe1 -macro-dynamic-aqv4wq"');
331
+ expect(js({variant: 'secondary'})).toMatchInlineSnapshot('" gw1 -macro-dynamic-66ywce"');
324
332
  });
325
333
 
326
334
  it('supports runtime conditions nested inside css conditions', () => {
@@ -338,14 +346,14 @@ describe('style-macro', () => {
338
346
 
339
347
  @layer _.b.l {
340
348
  @media (forced-colors: active) {
341
- .plb12 {
349
+ .plb1 {
342
350
  color: ButtonText;
343
351
  }
344
352
  }
345
353
 
346
354
 
347
355
  @media (forced-colors: active) {
348
- .ple12 {
356
+ .ple1 {
349
357
  color: HighlightText;
350
358
  }
351
359
  }
@@ -354,8 +362,8 @@ describe('style-macro', () => {
354
362
  "
355
363
  `);
356
364
 
357
- expect(js({})).toMatchInlineSnapshot('" plb12"');
358
- expect(js({isSelected: true})).toMatchInlineSnapshot('" ple12"');
365
+ expect(js({})).toMatchInlineSnapshot('" plb1 -macro-dynamic-qa0mhq"');
366
+ expect(js({isSelected: true})).toMatchInlineSnapshot('" ple1 -macro-dynamic-1inxdsx"');
359
367
  });
360
368
 
361
369
  it('should expand shorthand properties to longhands', () => {
@@ -363,31 +371,35 @@ describe('style-macro', () => {
363
371
  padding: 24
364
372
  });
365
373
 
366
- expect(js).toMatchInlineSnapshot('" Th12 Qh12 Sh12 Rh12"');
374
+ expect(js).toMatchInlineSnapshot('" Th1 Qh1 Sh1 Rh1 -macro-static-tfFFV"');
367
375
  expect(css).toMatchInlineSnapshot(`
368
376
  "@layer _.a;
369
377
 
370
378
  @layer _.a {
371
- .Th12 {
379
+ .Th1 {
372
380
  padding-top: 24px;
373
381
  }
374
382
 
375
383
 
376
- .Qh12 {
384
+ .Qh1 {
377
385
  padding-bottom: 24px;
378
386
  }
379
387
 
380
388
 
381
- .Sh12 {
389
+ .Sh1 {
382
390
  padding-inline-start: 24px;
383
391
  }
384
392
 
385
393
 
386
- .Rh12 {
394
+ .Rh1 {
387
395
  padding-inline-end: 24px;
388
396
  }
389
397
  }
390
398
 
399
+ .-macro-static-tfFFV {
400
+ --macro-data-tfFFV: {"style":{"padding":24},"loc":"undefined:undefined:undefined"};
401
+ }
402
+
391
403
  "
392
404
  `);
393
405
  });
@@ -401,11 +413,15 @@ describe('style-macro', () => {
401
413
  "@layer _.a;
402
414
 
403
415
  @layer _.a {
404
- .gpQzfVb12 {
416
+ .gpQzfVb1 {
405
417
  background-color: rgb(from light-dark(rgb(39, 77, 234), rgb(105, 149, 254)) r g b / 50%);
406
418
  }
407
419
  }
408
420
 
421
+ .-macro-static-S2MtWd {
422
+ --macro-data-S2MtWd: {"style":{"backgroundColor":"blue-1000/50"},"loc":"undefined:undefined:undefined"};
423
+ }
424
+
409
425
  "
410
426
  `);
411
427
  });
@@ -422,11 +438,15 @@ describe('style-macro', () => {
422
438
  "@layer _.a;
423
439
 
424
440
  @layer _.a {
425
- .-FUeYm-gE12 {
441
+ .-FUeYm-gE1 {
426
442
  --foo: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
427
443
  }
428
444
  }
429
445
 
446
+ .-macro-static-sFmj5 {
447
+ --macro-data-sFmj5: {"style":{"--foo":{"type":"backgroundColor","value":"gray-300"}},"loc":"undefined:undefined:undefined"};
448
+ }
449
+
430
450
  "
431
451
  `);
432
452
  });
@@ -152,6 +152,7 @@ function $cf0b57705fca33e1$var$classNamePrefix(property, cssProperty) {
152
152
  if (className && !property.startsWith('--')) return className;
153
153
  return '-' + $cf0b57705fca33e1$var$generateArbitraryValueSelector(property, true) + '-';
154
154
  }
155
+ let $cf0b57705fca33e1$var$isCompilingDependencies = false;
155
156
  function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
156
157
  let properties = new Map(Object.entries(theme.properties).map(([k, v])=>{
157
158
  if (!Array.isArray(v) && v.cssProperties) return [
@@ -170,7 +171,6 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
170
171
  // We also check if this is globalThis, which happens in non-strict mode bundles.
171
172
  // Also allow style to be called as a normal function in tests.
172
173
  // @ts-ignore
173
- // eslint-disable-next-line
174
174
  if ((this == null || this === globalThis) && process.env.NODE_ENV !== 'test') throw new Error('The style macro must be imported with {type: "macro"}.');
175
175
  // Generate rules for each property.
176
176
  let rules = new Map();
@@ -216,8 +216,11 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
216
216
  let prop = properties.get(dep);
217
217
  let name = `--${$cf0b57705fca33e1$var$shortCSSPropertyName(prop.cssProperties[0])}`;
218
218
  // Could potentially use @property to prevent the var from inheriting in children.
219
+ $cf0b57705fca33e1$var$isCompilingDependencies = dep;
219
220
  setRules(name, compileValue(name, dep, value));
221
+ $cf0b57705fca33e1$var$isCompilingDependencies = null;
220
222
  setRules(dep, compileValue(dep, dep, name));
223
+ $cf0b57705fca33e1$var$isCompilingDependencies = false;
221
224
  }
222
225
  }
223
226
  dependencies.clear();
@@ -235,7 +238,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
235
238
  // Also generate a variable for each overridable property that overlaps with the style definition. If those are defined,
236
239
  // the defaults from the style definition are omitted.
237
240
  let allowedOverridesSet = new Set();
238
- let js = 'let rules = " ";\n';
241
+ let js = process.env.NODE_ENV !== 'production' ? 'let rules = " ", currentRules = {};\n' : 'let rules = " ";\n';
239
242
  if (allowedOverrides?.length) {
240
243
  for (let property of allowedOverrides){
241
244
  let shorthand = theme.shorthands[property];
@@ -269,16 +272,17 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
269
272
  loop += ` if (p[1] === ${JSON.stringify(selector)}) ${p} = true;\n`;
270
273
  }
271
274
  }
275
+ let macroPart = process.env.NODE_ENV !== 'production' ? '|-macro\\$' : '';
272
276
  let regex = `/(?:^|\\s)(${[
273
277
  ...allowedOverridesSet
274
- ].map((p)=>$cf0b57705fca33e1$var$classNamePrefix(p, p)).join('|')})[^\\s]+/g`;
278
+ ].map((p)=>$cf0b57705fca33e1$var$classNamePrefix(p, p)).join('|')}${macroPart})[^\\s]+/g`;
275
279
  if (loop) {
276
- js += `let matches = (overrides || '').matchAll(${regex});\n`;
280
+ js += `let matches = String(overrides || '').matchAll(${regex});\n`;
277
281
  js += 'for (let p of matches) {\n';
278
282
  js += loop;
279
283
  js += ' rules += p[0];\n';
280
284
  js += '}\n';
281
- } else js += `rules += ((overrides || '').match(${regex}) || []).join('')\n`;
285
+ } else js += `rules += (String(overrides || '').match(${regex}) || []).join('')\n`;
282
286
  }
283
287
  // Generate JS and CSS for each rule.
284
288
  let isStatic = !(hasConditions || allowedOverrides);
@@ -295,11 +299,29 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
295
299
  css += rules.join('\n\n');
296
300
  css += '}\n\n';
297
301
  }
302
+ // @ts-expect-error
303
+ let loc = this?.loc?.filePath + ':' + this?.loc?.line + ':' + this?.loc?.col;
304
+ if (isStatic && process.env.NODE_ENV !== 'production') {
305
+ let id = $cf0b57705fca33e1$var$toBase62($cf0b57705fca33e1$var$hash(className + loc));
306
+ css += `.-macro-static-${id} {
307
+ --macro-data-${id}: ${JSON.stringify({
308
+ style: style,
309
+ loc: loc
310
+ })};
311
+ }\n\n`;
312
+ className += ` -macro-static-${id}`;
313
+ }
298
314
  if (this && typeof this.addAsset === 'function') this.addAsset({
299
315
  type: 'css',
300
316
  content: css
301
317
  });
302
318
  if (isStatic) return className;
319
+ if (process.env.NODE_ENV !== 'production') {
320
+ js += `let targetRules = rules + ${JSON.stringify(loc)};\n`;
321
+ js += 'let hash = 5381;for (let i = 0; i < targetRules.length; i++) { hash = ((hash << 5) + hash) + targetRules.charCodeAt(i) >>> 0; }\n';
322
+ js += 'rules += " -macro-dynamic-" + hash.toString(36);\n';
323
+ js += `typeof window !== 'undefined' && window?.postMessage?.({action: 'stylemacro-update-macros', hash: hash.toString(36), loc: ${JSON.stringify(loc)}, style: currentRules}, "*");\n`;
324
+ }
303
325
  js += 'return rules;';
304
326
  if (allowedOverrides) return new Function('props', 'overrides', js);
305
327
  return new Function('props', js);
@@ -384,7 +406,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
384
406
  // Top level layer is based on the priority of the rule, not the condition.
385
407
  // Also group in a sub-layer based on the condition so that lightningcss can more effectively deduplicate rules.
386
408
  let layer = `${$cf0b57705fca33e1$var$generateName(priority, true)}.${$09b3dbf96fabdf23$exports.conditions[prelude] || $cf0b57705fca33e1$var$generateArbitraryValueSelector(condition, true)}`;
387
- return new $cf0b57705fca33e1$var$AtRule(rules, prelude, layer);
409
+ return new $cf0b57705fca33e1$var$AtRule(rules, prelude, layer, condition);
388
410
  });
389
411
  }
390
412
  hasConditions = true;
@@ -396,6 +418,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
396
418
  let propertyFunction = properties.get(themeProperty);
397
419
  if (propertyFunction) {
398
420
  // Expand value to conditional CSS values, and then to rules.
421
+ let propertyValue = value;
399
422
  let arbitrary = $cf0b57705fca33e1$export$22a8270399010c94(value);
400
423
  let cssValue = arbitrary ? arbitrary : propertyFunction.toCSSValue(value);
401
424
  let cssProperties = propertyFunction.toCSSProperties(property.startsWith('--') ? property : null, cssValue);
@@ -429,7 +452,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
429
452
  if (cssProperty !== key) className += $cf0b57705fca33e1$var$shortCSSPropertyName(cssProperty);
430
453
  className += $09b3dbf96fabdf23$exports.values[cssProperty]?.[String(value)] ?? $cf0b57705fca33e1$var$generateArbitraryValueSelector(String(value));
431
454
  className += $cf0b57705fca33e1$var$POSTFIX;
432
- rules.push(new $cf0b57705fca33e1$var$StyleRule(className, key, String(value)));
455
+ rules.push(new $cf0b57705fca33e1$var$StyleRule(className, key, String(value), $cf0b57705fca33e1$var$isCompilingDependencies ? themeProperty : property, propertyValue));
433
456
  }
434
457
  return [
435
458
  0,
@@ -484,15 +507,20 @@ function $cf0b57705fca33e1$var$layerName(name) {
484
507
  // the unsafe overrides layer always comes after.
485
508
  return `_.${name}`;
486
509
  }
510
+ let $cf0b57705fca33e1$var$conditionStack = [];
487
511
  /** A CSS style rule. */ class $cf0b57705fca33e1$var$StyleRule {
488
- constructor(className, property, value){
512
+ constructor(className, property, value, themeProperty, themeValue){
489
513
  this.className = className;
490
514
  this.pseudos = '';
491
515
  this.property = property;
492
516
  this.value = value;
517
+ if (process.env.NODE_ENV !== 'production' && $cf0b57705fca33e1$var$isCompilingDependencies !== null) {
518
+ this.themeProperty = themeProperty;
519
+ this.themeValue = themeValue;
520
+ }
493
521
  }
494
522
  copy() {
495
- let rule = new $cf0b57705fca33e1$var$StyleRule(this.className, this.property, this.value);
523
+ let rule = new $cf0b57705fca33e1$var$StyleRule(this.className, this.property, this.value, this.themeProperty, this.themeValue);
496
524
  rule.pseudos = this.pseudos;
497
525
  return rule;
498
526
  }
@@ -527,6 +555,21 @@ function $cf0b57705fca33e1$var$layerName(name) {
527
555
  let res = '';
528
556
  if (allowedOverridesSet.has(this.property)) res += `${indent}if (!${this.property.replace('--', '__')}) `;
529
557
  res += `${indent}rules += ' ${this.className}';`;
558
+ if (process.env.NODE_ENV !== 'production' && this.themeProperty) {
559
+ let name = this.themeProperty;
560
+ if (this.pseudos) $cf0b57705fca33e1$var$conditionStack.push(this.pseudos);
561
+ let propertyName = JSON.stringify(name);
562
+ let valueJson = JSON.stringify(this.themeValue);
563
+ if ($cf0b57705fca33e1$var$conditionStack.length) {
564
+ // name += ` (${conditionStack.join(', ')})`;
565
+ let conditionKey = JSON.stringify($cf0b57705fca33e1$var$conditionStack.join(' && '));
566
+ // Ensure currentRules[name] is an object, converting from simple value if needed
567
+ res += ` currentRules[${propertyName}] = typeof currentRules[${propertyName}] === 'object' ? currentRules[${propertyName}] : {"default": currentRules[${propertyName}]};`;
568
+ // Set the value for this specific condition
569
+ res += ` currentRules[${propertyName}][${conditionKey}] = ${valueJson};`;
570
+ } else res += ` currentRules[${propertyName}] = ${valueJson};`;
571
+ if (this.pseudos) $cf0b57705fca33e1$var$conditionStack.pop();
572
+ }
530
573
  return res;
531
574
  }
532
575
  }
@@ -559,18 +602,25 @@ function $cf0b57705fca33e1$var$layerName(name) {
559
602
  }
560
603
  }
561
604
  /** A rule that applies conditionally in CSS (e.g. @media). */ class $cf0b57705fca33e1$var$AtRule extends $cf0b57705fca33e1$var$GroupRule {
562
- constructor(rules, prelude, layer){
605
+ constructor(rules, prelude, layer, themeCondition){
563
606
  super(rules, layer);
564
607
  this.prelude = prelude;
608
+ this.themeCondition = themeCondition;
565
609
  }
566
610
  copy() {
567
- return new $cf0b57705fca33e1$var$AtRule(this.rules.map((rule)=>rule.copy()), this.prelude, this.layer);
611
+ return new $cf0b57705fca33e1$var$AtRule(this.rules.map((rule)=>rule.copy()), this.prelude, this.layer, this.themeCondition);
568
612
  }
569
613
  toCSS(rulesByLayer, preludes = [], layer) {
570
614
  preludes.push(this.prelude);
571
615
  super.toCSS(rulesByLayer, preludes, layer);
572
616
  preludes?.pop();
573
617
  }
618
+ toJS(allowedOverridesSet, indent) {
619
+ $cf0b57705fca33e1$var$conditionStack.push(this.themeCondition || this.prelude);
620
+ let res = super.toJS(allowedOverridesSet, indent);
621
+ $cf0b57705fca33e1$var$conditionStack.pop();
622
+ return res;
623
+ }
574
624
  }
575
625
  /** A rule that applies conditionally at runtime. */ class $cf0b57705fca33e1$var$ConditionalRule extends $cf0b57705fca33e1$var$GroupRule {
576
626
  constructor(rules, condition){
@@ -584,7 +634,10 @@ function $cf0b57705fca33e1$var$layerName(name) {
584
634
  throw new Error('Conditional rules cannot be compiled to a static class name. This is a bug.');
585
635
  }
586
636
  toJS(allowedOverridesSet, indent = '') {
587
- return `${indent}if (props.${this.condition}) {\n${super.toJS(allowedOverridesSet, indent + ' ')}\n${indent}}`;
637
+ $cf0b57705fca33e1$var$conditionStack.push(this.condition);
638
+ let res = `${indent}if (props.${this.condition}) {\n${super.toJS(allowedOverridesSet, indent + ' ')}\n${indent}}`;
639
+ $cf0b57705fca33e1$var$conditionStack.pop();
640
+ return res;
588
641
  }
589
642
  }
590
643
  function $cf0b57705fca33e1$export$1776c186c69df29e(css, layer = '_.a') {
@@ -592,7 +645,6 @@ function $cf0b57705fca33e1$export$1776c186c69df29e(css, layer = '_.a') {
592
645
  // We also check if this is globalThis, which happens in non-strict mode bundles.
593
646
  // Also allow style to be called as a normal function in tests.
594
647
  // @ts-ignore
595
- // eslint-disable-next-line
596
648
  if ((this == null || this === globalThis) && process.env.NODE_ENV !== 'test') throw new Error('The raw macro must be imported with {type: "macro"}.');
597
649
  let className = $cf0b57705fca33e1$var$generateArbitraryValueSelector(css, true);
598
650
  css = `@layer ${layer} {
@@ -613,7 +665,6 @@ function $cf0b57705fca33e1$export$d25ddfdf17c3ad3e(css) {
613
665
  // We also check if this is globalThis, which happens in non-strict mode bundles.
614
666
  // Also allow style to be called as a normal function in tests.
615
667
  // @ts-ignore
616
- // eslint-disable-next-line
617
668
  if ((this == null || this === globalThis) && process.env.NODE_ENV !== 'test') throw new Error('The keyframes macro must be imported with {type: "macro"}.');
618
669
  let name = $cf0b57705fca33e1$var$generateArbitraryValueSelector(css, true);
619
670
  css = `@keyframes ${name} {