@yahoo/uds-v5-wip 0.0.1

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 (674) hide show
  1. package/dist/components/accordion.config.d.ts +2 -0
  2. package/dist/components/accordion.config.js +2 -0
  3. package/dist/components/accordion.d.ts +2 -0
  4. package/dist/components/accordion.js +2 -0
  5. package/dist/components/alert.config.d.ts +2 -0
  6. package/dist/components/alert.config.js +2 -0
  7. package/dist/components/alert.d.ts +2 -0
  8. package/dist/components/alert.js +2 -0
  9. package/dist/components/anchor.config.d.ts +2 -0
  10. package/dist/components/anchor.config.js +2 -0
  11. package/dist/components/anchor.d.ts +2 -0
  12. package/dist/components/anchor.js +2 -0
  13. package/dist/components/article.d.ts +2 -0
  14. package/dist/components/article.js +2 -0
  15. package/dist/components/aside.d.ts +2 -0
  16. package/dist/components/aside.js +2 -0
  17. package/dist/components/avatar-group.config.d.ts +2 -0
  18. package/dist/components/avatar-group.config.js +2 -0
  19. package/dist/components/avatar-group.d.ts +2 -0
  20. package/dist/components/avatar-group.js +2 -0
  21. package/dist/components/avatar.config.d.ts +2 -0
  22. package/dist/components/avatar.config.js +2 -0
  23. package/dist/components/avatar.d.ts +2 -0
  24. package/dist/components/avatar.js +2 -0
  25. package/dist/components/badge.config.d.ts +2 -0
  26. package/dist/components/badge.config.js +2 -0
  27. package/dist/components/badge.d.ts +2 -0
  28. package/dist/components/badge.js +2 -0
  29. package/dist/components/box.d.ts +2 -0
  30. package/dist/components/box.js +2 -0
  31. package/dist/components/breadcrumb.config.d.ts +2 -0
  32. package/dist/components/breadcrumb.config.js +2 -0
  33. package/dist/components/breadcrumb.d.ts +2 -0
  34. package/dist/components/breadcrumb.js +2 -0
  35. package/dist/components/button.config.d.ts +2 -0
  36. package/dist/components/button.config.js +2 -0
  37. package/dist/components/button.d.ts +2 -0
  38. package/dist/components/button.js +2 -0
  39. package/dist/components/card.config.d.ts +2 -0
  40. package/dist/components/card.config.js +2 -0
  41. package/dist/components/card.d.ts +2 -0
  42. package/dist/components/card.js +2 -0
  43. package/dist/components/collapsible.config.d.ts +2 -0
  44. package/dist/components/collapsible.config.js +2 -0
  45. package/dist/components/collapsible.d.ts +2 -0
  46. package/dist/components/collapsible.js +2 -0
  47. package/dist/components/command.config.d.ts +2 -0
  48. package/dist/components/command.config.js +2 -0
  49. package/dist/components/command.d.ts +2 -0
  50. package/dist/components/command.js +2 -0
  51. package/dist/components/control-color.config.d.ts +2 -0
  52. package/dist/components/control-color.config.js +2 -0
  53. package/dist/components/control-color.d.ts +2 -0
  54. package/dist/components/control-color.js +2 -0
  55. package/dist/components/control-curve.config.d.ts +2 -0
  56. package/dist/components/control-curve.config.js +2 -0
  57. package/dist/components/control-curve.d.ts +2 -0
  58. package/dist/components/control-curve.js +2 -0
  59. package/dist/components/control-folder.config.d.ts +2 -0
  60. package/dist/components/control-folder.config.js +2 -0
  61. package/dist/components/control-folder.d.ts +2 -0
  62. package/dist/components/control-folder.js +2 -0
  63. package/dist/components/control-group.config.d.ts +2 -0
  64. package/dist/components/control-group.config.js +2 -0
  65. package/dist/components/control-group.d.ts +2 -0
  66. package/dist/components/control-group.js +2 -0
  67. package/dist/components/control-knob.config.d.ts +2 -0
  68. package/dist/components/control-knob.config.js +2 -0
  69. package/dist/components/control-knob.d.ts +2 -0
  70. package/dist/components/control-knob.js +2 -0
  71. package/dist/components/control-panel.config.d.ts +2 -0
  72. package/dist/components/control-panel.config.js +2 -0
  73. package/dist/components/control-panel.d.ts +2 -0
  74. package/dist/components/control-panel.js +2 -0
  75. package/dist/components/control-select.config.d.ts +2 -0
  76. package/dist/components/control-select.config.js +2 -0
  77. package/dist/components/control-select.d.ts +2 -0
  78. package/dist/components/control-select.js +2 -0
  79. package/dist/components/control-slider.config.d.ts +2 -0
  80. package/dist/components/control-slider.config.js +2 -0
  81. package/dist/components/control-slider.d.ts +2 -0
  82. package/dist/components/control-slider.js +2 -0
  83. package/dist/components/control-spring.config.d.ts +2 -0
  84. package/dist/components/control-spring.config.js +2 -0
  85. package/dist/components/control-spring.d.ts +2 -0
  86. package/dist/components/control-spring.js +2 -0
  87. package/dist/components/control-stepper.config.d.ts +2 -0
  88. package/dist/components/control-stepper.config.js +2 -0
  89. package/dist/components/control-stepper.d.ts +2 -0
  90. package/dist/components/control-stepper.js +2 -0
  91. package/dist/components/control-toggle.config.d.ts +2 -0
  92. package/dist/components/control-toggle.config.js +2 -0
  93. package/dist/components/control-toggle.d.ts +2 -0
  94. package/dist/components/control-toggle.js +2 -0
  95. package/dist/components/dist/_slots.js +8 -0
  96. package/dist/components/dist/accordion.config.d.ts +432 -0
  97. package/dist/components/dist/accordion.config.js +81 -0
  98. package/dist/components/dist/accordion.d.ts +454 -0
  99. package/dist/components/dist/accordion.js +60 -0
  100. package/dist/components/dist/alert.config.d.ts +220 -0
  101. package/dist/components/dist/alert.config.js +54 -0
  102. package/dist/components/dist/alert.d.ts +231 -0
  103. package/dist/components/dist/alert.js +16 -0
  104. package/dist/components/dist/anchor.config.d.ts +251 -0
  105. package/dist/components/dist/anchor.config.js +22 -0
  106. package/dist/components/dist/anchor.d.ts +262 -0
  107. package/dist/components/dist/anchor.js +9 -0
  108. package/dist/components/dist/article.d.ts +12 -0
  109. package/dist/components/dist/article.js +9 -0
  110. package/dist/components/dist/aside.d.ts +12 -0
  111. package/dist/components/dist/aside.js +9 -0
  112. package/dist/components/dist/avatar-group.config.d.ts +316 -0
  113. package/dist/components/dist/avatar-group.config.js +33 -0
  114. package/dist/components/dist/avatar-group.d.ts +330 -0
  115. package/dist/components/dist/avatar-group.js +39 -0
  116. package/dist/components/dist/avatar.config.d.ts +198 -0
  117. package/dist/components/dist/avatar.config.js +49 -0
  118. package/dist/components/dist/avatar.d.ts +212 -0
  119. package/dist/components/dist/avatar.js +20 -0
  120. package/dist/components/dist/badge.config.d.ts +478 -0
  121. package/dist/components/dist/badge.config.js +99 -0
  122. package/dist/components/dist/badge.d.ts +490 -0
  123. package/dist/components/dist/badge.js +16 -0
  124. package/dist/components/dist/box.d.ts +15 -0
  125. package/dist/components/dist/box.js +9 -0
  126. package/dist/components/dist/breadcrumb.config.d.ts +391 -0
  127. package/dist/components/dist/breadcrumb.config.js +43 -0
  128. package/dist/components/dist/breadcrumb.d.ts +421 -0
  129. package/dist/components/dist/breadcrumb.js +119 -0
  130. package/dist/components/dist/button.config.d.ts +382 -0
  131. package/dist/components/dist/button.config.js +91 -0
  132. package/dist/components/dist/button.d.ts +404 -0
  133. package/dist/components/dist/button.js +35 -0
  134. package/dist/components/dist/card.config.d.ts +337 -0
  135. package/dist/components/dist/card.config.js +33 -0
  136. package/dist/components/dist/card.d.ts +353 -0
  137. package/dist/components/dist/card.js +27 -0
  138. package/dist/components/dist/collapsible.config.d.ts +46 -0
  139. package/dist/components/dist/collapsible.config.js +46 -0
  140. package/dist/components/dist/collapsible.d.ts +62 -0
  141. package/dist/components/dist/collapsible.js +38 -0
  142. package/dist/components/dist/command.config.d.ts +1614 -0
  143. package/dist/components/dist/command.config.js +170 -0
  144. package/dist/components/dist/command.d.ts +1723 -0
  145. package/dist/components/dist/command.js +341 -0
  146. package/dist/components/dist/control-color.config.d.ts +980 -0
  147. package/dist/components/dist/control-color.config.js +81 -0
  148. package/dist/components/dist/control-color.d.ts +996 -0
  149. package/dist/components/dist/control-color.js +64 -0
  150. package/dist/components/dist/control-curve.config.d.ts +19 -0
  151. package/dist/components/dist/control-curve.config.js +14 -0
  152. package/dist/components/dist/control-curve.d.ts +36 -0
  153. package/dist/components/dist/control-curve.js +81 -0
  154. package/dist/components/dist/control-folder.config.d.ts +178 -0
  155. package/dist/components/dist/control-folder.config.js +47 -0
  156. package/dist/components/dist/control-folder.d.ts +195 -0
  157. package/dist/components/dist/control-folder.js +41 -0
  158. package/dist/components/dist/control-group.config.d.ts +860 -0
  159. package/dist/components/dist/control-group.config.js +80 -0
  160. package/dist/components/dist/control-group.d.ts +882 -0
  161. package/dist/components/dist/control-group.js +89 -0
  162. package/dist/components/dist/control-knob.config.d.ts +793 -0
  163. package/dist/components/dist/control-knob.config.js +67 -0
  164. package/dist/components/dist/control-knob.d.ts +820 -0
  165. package/dist/components/dist/control-knob.js +148 -0
  166. package/dist/components/dist/control-panel.config.d.ts +403 -0
  167. package/dist/components/dist/control-panel.config.js +38 -0
  168. package/dist/components/dist/control-panel.d.ts +416 -0
  169. package/dist/components/dist/control-panel.js +22 -0
  170. package/dist/components/dist/control-select.config.d.ts +1177 -0
  171. package/dist/components/dist/control-select.config.js +102 -0
  172. package/dist/components/dist/control-select.d.ts +1201 -0
  173. package/dist/components/dist/control-select.js +63 -0
  174. package/dist/components/dist/control-slider.config.d.ts +105 -0
  175. package/dist/components/dist/control-slider.config.js +98 -0
  176. package/dist/components/dist/control-slider.d.ts +128 -0
  177. package/dist/components/dist/control-slider.js +87 -0
  178. package/dist/components/dist/control-spring.config.d.ts +418 -0
  179. package/dist/components/dist/control-spring.config.js +36 -0
  180. package/dist/components/dist/control-spring.d.ts +440 -0
  181. package/dist/components/dist/control-spring.js +136 -0
  182. package/dist/components/dist/control-stepper.config.d.ts +1085 -0
  183. package/dist/components/dist/control-stepper.config.js +108 -0
  184. package/dist/components/dist/control-stepper.d.ts +1105 -0
  185. package/dist/components/dist/control-stepper.js +109 -0
  186. package/dist/components/dist/control-toggle.config.d.ts +408 -0
  187. package/dist/components/dist/control-toggle.config.js +26 -0
  188. package/dist/components/dist/control-toggle.d.ts +421 -0
  189. package/dist/components/dist/control-toggle.js +36 -0
  190. package/dist/components/dist/createSlot.d.ts +9 -0
  191. package/dist/components/dist/createSlot.js +89 -0
  192. package/dist/components/dist/dropdown.config.d.ts +921 -0
  193. package/dist/components/dist/dropdown.config.js +107 -0
  194. package/dist/components/dist/dropdown.d.ts +951 -0
  195. package/dist/components/dist/dropdown.js +92 -0
  196. package/dist/components/dist/empty-state.config.d.ts +397 -0
  197. package/dist/components/dist/empty-state.config.js +53 -0
  198. package/dist/components/dist/empty-state.d.ts +417 -0
  199. package/dist/components/dist/empty-state.js +33 -0
  200. package/dist/components/dist/footer.d.ts +12 -0
  201. package/dist/components/dist/footer.js +9 -0
  202. package/dist/components/dist/grid.d.ts +42 -0
  203. package/dist/components/dist/grid.js +34 -0
  204. package/dist/components/dist/header.d.ts +12 -0
  205. package/dist/components/dist/header.js +9 -0
  206. package/dist/components/dist/hstack.d.ts +16 -0
  207. package/dist/components/dist/hstack.js +21 -0
  208. package/dist/components/dist/image.d.ts +20 -0
  209. package/dist/components/dist/image.js +9 -0
  210. package/dist/components/dist/input.config.d.ts +59 -0
  211. package/dist/components/dist/input.config.js +42 -0
  212. package/dist/components/dist/input.d.ts +68 -0
  213. package/dist/components/dist/input.js +14 -0
  214. package/dist/components/dist/item.config.d.ts +352 -0
  215. package/dist/components/dist/item.config.js +83 -0
  216. package/dist/components/dist/item.d.ts +375 -0
  217. package/dist/components/dist/item.js +51 -0
  218. package/dist/components/dist/list.d.ts +20 -0
  219. package/dist/components/dist/list.js +21 -0
  220. package/dist/components/dist/main.d.ts +12 -0
  221. package/dist/components/dist/main.js +9 -0
  222. package/dist/components/dist/modal.config.d.ts +398 -0
  223. package/dist/components/dist/modal.config.js +92 -0
  224. package/dist/components/dist/modal.d.ts +434 -0
  225. package/dist/components/dist/modal.js +125 -0
  226. package/dist/components/dist/nav-header.config.d.ts +159 -0
  227. package/dist/components/dist/nav-header.config.js +26 -0
  228. package/dist/components/dist/nav-header.d.ts +174 -0
  229. package/dist/components/dist/nav-header.js +23 -0
  230. package/dist/components/dist/nav.d.ts +12 -0
  231. package/dist/components/dist/nav.js +9 -0
  232. package/dist/components/dist/preset-bar.config.d.ts +193 -0
  233. package/dist/components/dist/preset-bar.config.js +39 -0
  234. package/dist/components/dist/preset-bar.d.ts +216 -0
  235. package/dist/components/dist/preset-bar.js +71 -0
  236. package/dist/components/dist/presets/index.d.ts +17675 -0
  237. package/dist/components/dist/presets/index.js +97 -0
  238. package/dist/components/dist/pressable.d.ts +12 -0
  239. package/dist/components/dist/pressable.js +9 -0
  240. package/dist/components/dist/progress.config.d.ts +297 -0
  241. package/dist/components/dist/progress.config.js +35 -0
  242. package/dist/components/dist/progress.d.ts +312 -0
  243. package/dist/components/dist/progress.js +43 -0
  244. package/dist/components/dist/section.d.ts +12 -0
  245. package/dist/components/dist/section.js +9 -0
  246. package/dist/components/dist/select.config.d.ts +32 -0
  247. package/dist/components/dist/select.config.js +25 -0
  248. package/dist/components/dist/select.d.ts +46 -0
  249. package/dist/components/dist/select.js +13 -0
  250. package/dist/components/dist/sheet.config.d.ts +246 -0
  251. package/dist/components/dist/sheet.config.js +99 -0
  252. package/dist/components/dist/sheet.d.ts +268 -0
  253. package/dist/components/dist/sheet.js +53 -0
  254. package/dist/components/dist/sidebar.config.d.ts +1652 -0
  255. package/dist/components/dist/sidebar.config.js +217 -0
  256. package/dist/components/dist/sidebar.d.ts +1826 -0
  257. package/dist/components/dist/sidebar.js +496 -0
  258. package/dist/components/dist/skeleton.config.d.ts +17 -0
  259. package/dist/components/dist/skeleton.config.js +10 -0
  260. package/dist/components/dist/skeleton.d.ts +28 -0
  261. package/dist/components/dist/skeleton.js +16 -0
  262. package/dist/components/dist/slider.config.d.ts +45 -0
  263. package/dist/components/dist/slider.config.js +40 -0
  264. package/dist/components/dist/slider.d.ts +71 -0
  265. package/dist/components/dist/slider.js +247 -0
  266. package/dist/components/dist/spinner.config.d.ts +35 -0
  267. package/dist/components/dist/spinner.config.js +24 -0
  268. package/dist/components/dist/spinner.d.ts +43 -0
  269. package/dist/components/dist/spinner.js +29 -0
  270. package/dist/components/dist/svg.d.ts +22 -0
  271. package/dist/components/dist/svg.js +17 -0
  272. package/dist/components/dist/switch.config.d.ts +354 -0
  273. package/dist/components/dist/switch.config.js +47 -0
  274. package/dist/components/dist/switch.d.ts +371 -0
  275. package/dist/components/dist/switch.js +32 -0
  276. package/dist/components/dist/table.d.ts +37 -0
  277. package/dist/components/dist/table.js +29 -0
  278. package/dist/components/dist/tabs.config.d.ts +612 -0
  279. package/dist/components/dist/tabs.config.js +56 -0
  280. package/dist/components/dist/tabs.d.ts +633 -0
  281. package/dist/components/dist/tabs.js +77 -0
  282. package/dist/components/dist/text.config.d.ts +307 -0
  283. package/dist/components/dist/text.config.js +149 -0
  284. package/dist/components/dist/text.d.ts +206 -0
  285. package/dist/components/dist/text.js +12 -0
  286. package/dist/components/dist/textarea.config.d.ts +353 -0
  287. package/dist/components/dist/textarea.config.js +57 -0
  288. package/dist/components/dist/textarea.d.ts +363 -0
  289. package/dist/components/dist/textarea.js +9 -0
  290. package/dist/components/dist/toast.config.d.ts +336 -0
  291. package/dist/components/dist/toast.config.js +145 -0
  292. package/dist/components/dist/toast.d.ts +427 -0
  293. package/dist/components/dist/toast.js +159 -0
  294. package/dist/components/dist/tooltip.config.d.ts +194 -0
  295. package/dist/components/dist/tooltip.config.js +40 -0
  296. package/dist/components/dist/tooltip.d.ts +207 -0
  297. package/dist/components/dist/tooltip.js +28 -0
  298. package/dist/components/dist/vstack.d.ts +16 -0
  299. package/dist/components/dist/vstack.js +20 -0
  300. package/dist/components/dropdown.config.d.ts +2 -0
  301. package/dist/components/dropdown.config.js +2 -0
  302. package/dist/components/dropdown.d.ts +2 -0
  303. package/dist/components/dropdown.js +2 -0
  304. package/dist/components/empty-state.config.d.ts +2 -0
  305. package/dist/components/empty-state.config.js +2 -0
  306. package/dist/components/empty-state.d.ts +2 -0
  307. package/dist/components/empty-state.js +2 -0
  308. package/dist/components/footer.d.ts +2 -0
  309. package/dist/components/footer.js +2 -0
  310. package/dist/components/grid.d.ts +2 -0
  311. package/dist/components/grid.js +2 -0
  312. package/dist/components/header.d.ts +2 -0
  313. package/dist/components/header.js +2 -0
  314. package/dist/components/hstack.d.ts +2 -0
  315. package/dist/components/hstack.js +2 -0
  316. package/dist/components/image.d.ts +2 -0
  317. package/dist/components/image.js +2 -0
  318. package/dist/components/input.config.d.ts +2 -0
  319. package/dist/components/input.config.js +2 -0
  320. package/dist/components/input.d.ts +2 -0
  321. package/dist/components/input.js +2 -0
  322. package/dist/components/item.config.d.ts +2 -0
  323. package/dist/components/item.config.js +2 -0
  324. package/dist/components/item.d.ts +2 -0
  325. package/dist/components/item.js +2 -0
  326. package/dist/components/list.d.ts +2 -0
  327. package/dist/components/list.js +2 -0
  328. package/dist/components/main.d.ts +2 -0
  329. package/dist/components/main.js +2 -0
  330. package/dist/components/modal.config.d.ts +2 -0
  331. package/dist/components/modal.config.js +2 -0
  332. package/dist/components/modal.d.ts +2 -0
  333. package/dist/components/modal.js +2 -0
  334. package/dist/components/nav-header.config.d.ts +2 -0
  335. package/dist/components/nav-header.config.js +2 -0
  336. package/dist/components/nav-header.d.ts +2 -0
  337. package/dist/components/nav-header.js +2 -0
  338. package/dist/components/nav.d.ts +2 -0
  339. package/dist/components/nav.js +2 -0
  340. package/dist/components/preset-bar.config.d.ts +2 -0
  341. package/dist/components/preset-bar.config.js +2 -0
  342. package/dist/components/preset-bar.d.ts +2 -0
  343. package/dist/components/preset-bar.js +2 -0
  344. package/dist/components/presets/index.d.ts +44 -0
  345. package/dist/components/presets/index.js +44 -0
  346. package/dist/components/pressable.d.ts +2 -0
  347. package/dist/components/pressable.js +2 -0
  348. package/dist/components/progress.config.d.ts +2 -0
  349. package/dist/components/progress.config.js +2 -0
  350. package/dist/components/progress.d.ts +2 -0
  351. package/dist/components/progress.js +2 -0
  352. package/dist/components/section.d.ts +2 -0
  353. package/dist/components/section.js +2 -0
  354. package/dist/components/select.config.d.ts +2 -0
  355. package/dist/components/select.config.js +2 -0
  356. package/dist/components/select.d.ts +2 -0
  357. package/dist/components/select.js +2 -0
  358. package/dist/components/sheet.config.d.ts +2 -0
  359. package/dist/components/sheet.config.js +2 -0
  360. package/dist/components/sheet.d.ts +2 -0
  361. package/dist/components/sheet.js +2 -0
  362. package/dist/components/sidebar.config.d.ts +2 -0
  363. package/dist/components/sidebar.config.js +2 -0
  364. package/dist/components/sidebar.d.ts +2 -0
  365. package/dist/components/sidebar.js +2 -0
  366. package/dist/components/skeleton.config.d.ts +2 -0
  367. package/dist/components/skeleton.config.js +2 -0
  368. package/dist/components/skeleton.d.ts +2 -0
  369. package/dist/components/skeleton.js +2 -0
  370. package/dist/components/slider.config.d.ts +2 -0
  371. package/dist/components/slider.config.js +2 -0
  372. package/dist/components/slider.d.ts +2 -0
  373. package/dist/components/slider.js +2 -0
  374. package/dist/components/spinner.config.d.ts +2 -0
  375. package/dist/components/spinner.config.js +2 -0
  376. package/dist/components/spinner.d.ts +2 -0
  377. package/dist/components/spinner.js +2 -0
  378. package/dist/components/svg.d.ts +2 -0
  379. package/dist/components/svg.js +2 -0
  380. package/dist/components/switch.config.d.ts +2 -0
  381. package/dist/components/switch.config.js +2 -0
  382. package/dist/components/switch.d.ts +2 -0
  383. package/dist/components/switch.js +2 -0
  384. package/dist/components/table.d.ts +2 -0
  385. package/dist/components/table.js +2 -0
  386. package/dist/components/tabs.config.d.ts +2 -0
  387. package/dist/components/tabs.config.js +2 -0
  388. package/dist/components/tabs.d.ts +2 -0
  389. package/dist/components/tabs.js +2 -0
  390. package/dist/components/text.config.d.ts +2 -0
  391. package/dist/components/text.config.js +2 -0
  392. package/dist/components/text.d.ts +2 -0
  393. package/dist/components/text.js +2 -0
  394. package/dist/components/textarea.config.d.ts +2 -0
  395. package/dist/components/textarea.config.js +2 -0
  396. package/dist/components/textarea.d.ts +2 -0
  397. package/dist/components/textarea.js +2 -0
  398. package/dist/components/toast.config.d.ts +2 -0
  399. package/dist/components/toast.config.js +2 -0
  400. package/dist/components/toast.d.ts +2 -0
  401. package/dist/components/toast.js +2 -0
  402. package/dist/components/tooltip.config.d.ts +2 -0
  403. package/dist/components/tooltip.config.js +2 -0
  404. package/dist/components/tooltip.d.ts +2 -0
  405. package/dist/components/tooltip.js +2 -0
  406. package/dist/components/vstack.d.ts +2 -0
  407. package/dist/components/vstack.js +2 -0
  408. package/dist/config/dist/component-resolution.d.ts +1 -0
  409. package/dist/config/dist/component-resolution.js +78 -0
  410. package/dist/config/dist/consts/defaultColors.d.ts +253 -0
  411. package/dist/config/dist/consts/defaultColors.js +252 -0
  412. package/dist/config/dist/createConfig.d.ts +214 -0
  413. package/dist/config/dist/createConfig.js +454 -0
  414. package/dist/config/dist/index.d.ts +5 -0
  415. package/dist/config/dist/index.js +4 -0
  416. package/dist/config/dist/preset-merge.js +165 -0
  417. package/dist/config/dist/serialize.d.ts +57 -0
  418. package/dist/config/dist/serialize.js +153 -0
  419. package/dist/config-utils/dist/componentConfig.d.ts +10 -0
  420. package/dist/config-utils/dist/componentConfig.js +11 -0
  421. package/dist/config-utils.d.ts +2 -0
  422. package/dist/config-utils.js +2 -0
  423. package/dist/config.d.ts +3512 -0
  424. package/dist/config.js +22 -0
  425. package/dist/core/dist/createComponent.boundaries.js +192 -0
  426. package/dist/core/dist/createComponent.d.ts +57 -0
  427. package/dist/core/dist/createComponent.js +67 -0
  428. package/dist/core/dist/createComponentExample.d.ts +42 -0
  429. package/dist/core/dist/createComponentExample.js +27 -0
  430. package/dist/core/dist/createProvider.d.ts +13 -0
  431. package/dist/core/dist/createProvider.js +24 -0
  432. package/dist/core/dist/generated/stylePropsTwMap.d.ts +1701 -0
  433. package/dist/core/dist/generated/stylePropsTwMap.js +570 -0
  434. package/dist/core/dist/getComponentStyles.d.ts +50 -0
  435. package/dist/core/dist/getComponentStyles.js +85 -0
  436. package/dist/core/dist/getStyles.d.ts +43 -0
  437. package/dist/core/dist/getStyles.js +305 -0
  438. package/dist/core/dist/index.d.ts +11 -0
  439. package/dist/core/dist/index.js +11 -0
  440. package/dist/core/dist/macros.d.ts +22 -0
  441. package/dist/core/dist/macros.js +49 -0
  442. package/dist/core/dist/propMappings.d.ts +77 -0
  443. package/dist/core/dist/propMappings.js +1404 -0
  444. package/dist/core/dist/resolveMotionState.d.ts +5 -0
  445. package/dist/core/dist/resolveMotionState.js +17 -0
  446. package/dist/core/dist/resolveProps.boundaries.js +130 -0
  447. package/dist/core/dist/transformPreset.d.ts +18 -0
  448. package/dist/core/dist/transformPreset.js +28 -0
  449. package/dist/core/dist/withDefaultStyleProps.d.ts +44 -0
  450. package/dist/core/dist/withDefaultStyleProps.js +18 -0
  451. package/dist/core.d.ts +12 -0
  452. package/dist/core.js +13 -0
  453. package/dist/createSlot.d.ts +2 -0
  454. package/dist/createSlot.js +2 -0
  455. package/dist/devtools.d.ts +2 -0
  456. package/dist/devtools.js +3 -0
  457. package/dist/fixtures.d.ts +2 -0
  458. package/dist/fixtures.js +3 -0
  459. package/dist/foundational-presets/dist/boldVibrant.d.ts +3575 -0
  460. package/dist/foundational-presets/dist/boldVibrant.js +326 -0
  461. package/dist/foundational-presets/dist/brutalist.d.ts +3575 -0
  462. package/dist/foundational-presets/dist/brutalist.js +326 -0
  463. package/dist/foundational-presets/dist/candy.d.ts +3575 -0
  464. package/dist/foundational-presets/dist/candy.js +326 -0
  465. package/dist/foundational-presets/dist/cleanMinimalist.d.ts +3575 -0
  466. package/dist/foundational-presets/dist/cleanMinimalist.js +326 -0
  467. package/dist/foundational-presets/dist/corporate.d.ts +3575 -0
  468. package/dist/foundational-presets/dist/corporate.js +326 -0
  469. package/dist/foundational-presets/dist/darkMoody.d.ts +3575 -0
  470. package/dist/foundational-presets/dist/darkMoody.js +326 -0
  471. package/dist/foundational-presets/dist/defaultPreset.d.ts +3509 -0
  472. package/dist/foundational-presets/dist/defaultPreset.js +1784 -0
  473. package/dist/foundational-presets/dist/forest.d.ts +3575 -0
  474. package/dist/foundational-presets/dist/forest.js +326 -0
  475. package/dist/foundational-presets/dist/highContrast.d.ts +3575 -0
  476. package/dist/foundational-presets/dist/highContrast.js +326 -0
  477. package/dist/foundational-presets/dist/index.d.ts +19 -0
  478. package/dist/foundational-presets/dist/index.js +19 -0
  479. package/dist/foundational-presets/dist/lavender.d.ts +3575 -0
  480. package/dist/foundational-presets/dist/lavender.js +326 -0
  481. package/dist/foundational-presets/dist/luxury.d.ts +3575 -0
  482. package/dist/foundational-presets/dist/luxury.js +326 -0
  483. package/dist/foundational-presets/dist/monochrome.d.ts +3575 -0
  484. package/dist/foundational-presets/dist/monochrome.js +326 -0
  485. package/dist/foundational-presets/dist/motion.d.ts +13 -0
  486. package/dist/foundational-presets/dist/motion.js +10 -0
  487. package/dist/foundational-presets/dist/neonCyber.d.ts +3575 -0
  488. package/dist/foundational-presets/dist/neonCyber.js +326 -0
  489. package/dist/foundational-presets/dist/newspaper.d.ts +3575 -0
  490. package/dist/foundational-presets/dist/newspaper.js +326 -0
  491. package/dist/foundational-presets/dist/ocean.d.ts +3575 -0
  492. package/dist/foundational-presets/dist/ocean.js +326 -0
  493. package/dist/foundational-presets/dist/slate.d.ts +3575 -0
  494. package/dist/foundational-presets/dist/slate.js +326 -0
  495. package/dist/foundational-presets/dist/sunset.d.ts +3575 -0
  496. package/dist/foundational-presets/dist/sunset.js +326 -0
  497. package/dist/foundational-presets/dist/terminal.d.ts +3575 -0
  498. package/dist/foundational-presets/dist/terminal.js +326 -0
  499. package/dist/foundational-presets/dist/warmOrganic.d.ts +3575 -0
  500. package/dist/foundational-presets/dist/warmOrganic.js +326 -0
  501. package/dist/loader/dist/_virtual/_rolldown/runtime.js +6 -0
  502. package/dist/loader/dist/loader/artifacts.js +43 -0
  503. package/dist/loader/dist/loader/babel-utils.js +29 -0
  504. package/dist/loader/dist/loader/create-component-data.js +33 -0
  505. package/dist/loader/dist/loader/create-component-lowering.js +454 -0
  506. package/dist/loader/dist/loader/data-attr-transform.js +191 -0
  507. package/dist/loader/dist/loader/dynamic-style-codegen.js +96 -0
  508. package/dist/loader/dist/loader/internal-meta.js +22 -0
  509. package/dist/loader/dist/loader/motion-transform.js +717 -0
  510. package/dist/loader/dist/loader/style-transform.js +670 -0
  511. package/dist/loader/dist/loader.d.ts +8 -0
  512. package/dist/loader/dist/loader.js +357 -0
  513. package/dist/loader/dist/next.d.ts +17 -0
  514. package/dist/loader/dist/next.js +77 -0
  515. package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.development.js +203 -0
  516. package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.production.js +25 -0
  517. package/dist/loader/dist/node_modules/react/cjs/react.development.js +762 -0
  518. package/dist/loader/dist/node_modules/react/cjs/react.production.js +351 -0
  519. package/dist/loader/dist/node_modules/react/index.js +10 -0
  520. package/dist/loader/dist/node_modules/react/jsx-runtime.js +10 -0
  521. package/dist/loader/dist/packages/core/dist/createComponent.js +6 -0
  522. package/dist/loader/dist/packages/core/dist/createProvider.js +7 -0
  523. package/dist/loader/dist/packages/core/dist/generated/stylePropsTwMap.js +570 -0
  524. package/dist/loader/dist/packages/core/dist/getComponentStyles.js +2 -0
  525. package/dist/loader/dist/packages/core/dist/getStyles.js +58 -0
  526. package/dist/loader/dist/packages/core/dist/index.js +6 -0
  527. package/dist/loader/dist/packages/core/dist/macros.js +41 -0
  528. package/dist/loader/dist/packages/core/dist/propMappings.js +1347 -0
  529. package/dist/loader/dist/packages/core/dist/withDefaultStyleProps.js +1 -0
  530. package/dist/loader.d.ts +2 -0
  531. package/dist/loader.js +2 -0
  532. package/dist/next.d.ts +2 -0
  533. package/dist/next.js +2 -0
  534. package/dist/plugin.d.ts +2 -0
  535. package/dist/plugin.js +2 -0
  536. package/dist/presets/dist/boldVibrant.d.ts +6 -0
  537. package/dist/presets/dist/boldVibrant.js +7 -0
  538. package/dist/presets/dist/brutalist.d.ts +6 -0
  539. package/dist/presets/dist/brutalist.js +7 -0
  540. package/dist/presets/dist/candy.d.ts +6 -0
  541. package/dist/presets/dist/candy.js +7 -0
  542. package/dist/presets/dist/cleanMinimalist.d.ts +6 -0
  543. package/dist/presets/dist/cleanMinimalist.js +7 -0
  544. package/dist/presets/dist/corporate.d.ts +6 -0
  545. package/dist/presets/dist/corporate.js +7 -0
  546. package/dist/presets/dist/darkMoody.d.ts +6 -0
  547. package/dist/presets/dist/darkMoody.js +7 -0
  548. package/dist/presets/dist/defaultPreset.d.ts +6 -0
  549. package/dist/presets/dist/defaultPreset.js +68 -0
  550. package/dist/presets/dist/forest.d.ts +6 -0
  551. package/dist/presets/dist/forest.js +7 -0
  552. package/dist/presets/dist/highContrast.d.ts +6 -0
  553. package/dist/presets/dist/highContrast.js +7 -0
  554. package/dist/presets/dist/index.d.ts +19 -0
  555. package/dist/presets/dist/index.js +19 -0
  556. package/dist/presets/dist/lavender.d.ts +6 -0
  557. package/dist/presets/dist/lavender.js +7 -0
  558. package/dist/presets/dist/luxury.d.ts +6 -0
  559. package/dist/presets/dist/luxury.js +7 -0
  560. package/dist/presets/dist/monochrome.d.ts +6 -0
  561. package/dist/presets/dist/monochrome.js +7 -0
  562. package/dist/presets/dist/neonCyber.d.ts +6 -0
  563. package/dist/presets/dist/neonCyber.js +7 -0
  564. package/dist/presets/dist/newspaper.d.ts +6 -0
  565. package/dist/presets/dist/newspaper.js +7 -0
  566. package/dist/presets/dist/ocean.d.ts +6 -0
  567. package/dist/presets/dist/ocean.js +7 -0
  568. package/dist/presets/dist/slate.d.ts +6 -0
  569. package/dist/presets/dist/slate.js +7 -0
  570. package/dist/presets/dist/sunset.d.ts +6 -0
  571. package/dist/presets/dist/sunset.js +7 -0
  572. package/dist/presets/dist/terminal.d.ts +6 -0
  573. package/dist/presets/dist/terminal.js +7 -0
  574. package/dist/presets/dist/warmOrganic.d.ts +6 -0
  575. package/dist/presets/dist/warmOrganic.js +7 -0
  576. package/dist/presets/motion.d.ts +2 -0
  577. package/dist/presets/motion.js +2 -0
  578. package/dist/presets.d.ts +20 -0
  579. package/dist/presets.js +21 -0
  580. package/dist/remotion/dist/components/image-slide.config.js +43 -0
  581. package/dist/remotion/dist/components/image-slide.d.ts +20 -0
  582. package/dist/remotion/dist/components/image-slide.js +24 -0
  583. package/dist/remotion/dist/components/index.js +16 -0
  584. package/dist/remotion/dist/components/lower-third.config.js +54 -0
  585. package/dist/remotion/dist/components/lower-third.d.ts +21 -0
  586. package/dist/remotion/dist/components/lower-third.js +26 -0
  587. package/dist/remotion/dist/components/quote-card.config.js +85 -0
  588. package/dist/remotion/dist/components/quote-card.d.ts +21 -0
  589. package/dist/remotion/dist/components/quote-card.js +27 -0
  590. package/dist/remotion/dist/components/split-screen.config.js +90 -0
  591. package/dist/remotion/dist/components/split-screen.d.ts +25 -0
  592. package/dist/remotion/dist/components/split-screen.js +35 -0
  593. package/dist/remotion/dist/components/stat-card.config.js +55 -0
  594. package/dist/remotion/dist/components/stat-card.d.ts +19 -0
  595. package/dist/remotion/dist/components/stat-card.js +23 -0
  596. package/dist/remotion/dist/components/text-overlay.config.js +46 -0
  597. package/dist/remotion/dist/components/text-overlay.d.ts +17 -0
  598. package/dist/remotion/dist/components/text-overlay.js +16 -0
  599. package/dist/remotion/dist/components/title-card.config.js +56 -0
  600. package/dist/remotion/dist/components/title-card.d.ts +19 -0
  601. package/dist/remotion/dist/components/title-card.js +23 -0
  602. package/dist/remotion/dist/components/typing-text.config.js +57 -0
  603. package/dist/remotion/dist/components/typing-text.d.ts +21 -0
  604. package/dist/remotion/dist/components/typing-text.js +23 -0
  605. package/dist/remotion/dist/index.d.ts +8 -0
  606. package/dist/remotion/dist/index.js +8 -0
  607. package/dist/remotion/dist/transitions/fade.js +19 -0
  608. package/dist/remotion/dist/transitions/index.js +7 -0
  609. package/dist/remotion/dist/transitions/slide-down.js +21 -0
  610. package/dist/remotion/dist/transitions/slide-left.js +21 -0
  611. package/dist/remotion/dist/transitions/slide-right.js +21 -0
  612. package/dist/remotion/dist/transitions/slide-up.js +21 -0
  613. package/dist/remotion/dist/transitions/wipe.js +21 -0
  614. package/dist/remotion/dist/transitions/zoom.js +19 -0
  615. package/dist/remotion.d.ts +9 -0
  616. package/dist/remotion.js +10 -0
  617. package/dist/styles.d.ts +4 -0
  618. package/dist/styles.js +5 -0
  619. package/dist/transformPreset.d.ts +2 -0
  620. package/dist/transformPreset.js +3 -0
  621. package/dist/tsconfig.tsbuildinfo +1 -0
  622. package/dist/types.d.ts +1 -0
  623. package/dist/types.js +1 -0
  624. package/dist/utils/dist/array-utils/closestItem.d.ts +5 -0
  625. package/dist/utils/dist/array-utils/closestItem.js +9 -0
  626. package/dist/utils/dist/array-utils/removeItem.d.ts +5 -0
  627. package/dist/utils/dist/array-utils/removeItem.js +8 -0
  628. package/dist/utils/dist/component-style-defaults.d.ts +6 -0
  629. package/dist/utils/dist/component-style-defaults.js +68 -0
  630. package/dist/utils/dist/index.js +23 -0
  631. package/dist/utils/dist/math-utils/clamp.d.ts +13 -0
  632. package/dist/utils/dist/math-utils/clamp.js +14 -0
  633. package/dist/utils/dist/motion-utils/interpolate.d.ts +11 -0
  634. package/dist/utils/dist/motion-utils/interpolate.js +25 -0
  635. package/dist/utils/dist/object-utils/entries.d.ts +5 -0
  636. package/dist/utils/dist/object-utils/entries.js +6 -0
  637. package/dist/utils/dist/object-utils/flattenObj.d.ts +13 -0
  638. package/dist/utils/dist/object-utils/flattenObj.js +21 -0
  639. package/dist/utils/dist/object-utils/fromEntries.d.ts +5 -0
  640. package/dist/utils/dist/object-utils/fromEntries.js +6 -0
  641. package/dist/utils/dist/object-utils/keys.d.ts +5 -0
  642. package/dist/utils/dist/object-utils/keys.js +6 -0
  643. package/dist/utils/dist/object-utils/mapKeys.d.ts +6 -0
  644. package/dist/utils/dist/object-utils/mapKeys.js +10 -0
  645. package/dist/utils/dist/object-utils/mapValues.d.ts +6 -0
  646. package/dist/utils/dist/object-utils/mapValues.js +9 -0
  647. package/dist/utils/dist/string-utils/arrayToUnion.d.ts +5 -0
  648. package/dist/utils/dist/string-utils/arrayToUnion.js +6 -0
  649. package/dist/utils/dist/string-utils/capitalize.d.ts +5 -0
  650. package/dist/utils/dist/string-utils/capitalize.js +6 -0
  651. package/dist/utils/dist/string-utils/componentClassName.d.ts +26 -0
  652. package/dist/utils/dist/string-utils/componentClassName.js +33 -0
  653. package/dist/utils/dist/string-utils/createTemplate.d.ts +17 -0
  654. package/dist/utils/dist/string-utils/createTemplate.js +142 -0
  655. package/dist/utils/dist/string-utils/cssVar.d.ts +54 -0
  656. package/dist/utils/dist/string-utils/cssVar.js +61 -0
  657. package/dist/utils/dist/string-utils/cssVars.d.ts +82 -0
  658. package/dist/utils/dist/string-utils/cssVars.js +108 -0
  659. package/dist/utils/dist/string-utils/dedent.d.ts +48 -0
  660. package/dist/utils/dist/string-utils/dedent.js +68 -0
  661. package/dist/utils/dist/string-utils/indent.d.ts +5 -0
  662. package/dist/utils/dist/string-utils/indent.js +6 -0
  663. package/dist/utils/dist/string-utils/join.d.ts +6 -0
  664. package/dist/utils/dist/string-utils/join.js +6 -0
  665. package/dist/utils/dist/string-utils/kebabCase.d.ts +14 -0
  666. package/dist/utils/dist/string-utils/kebabCase.js +14 -0
  667. package/dist/utils/dist/string-utils/objectToInterface.js +6 -0
  668. package/dist/utils/dist/string-utils/split.d.ts +11 -0
  669. package/dist/utils/dist/string-utils/split.js +12 -0
  670. package/dist/utils/dist/string-utils/tsProperties.d.ts +30 -0
  671. package/dist/utils/dist/string-utils/tsProperties.js +60 -0
  672. package/dist/utils.d.ts +24 -0
  673. package/dist/utils.js +25 -0
  674. package/package.json +185 -0
@@ -0,0 +1,670 @@
1
+ import { applyComponentStyleDefaults } from "../../../utils/dist/component-style-defaults.js";
2
+ import { kebabCase } from "../../../utils/dist/string-utils/kebabCase.js";
3
+ import { componentVariantClass } from "../../../utils/dist/string-utils/componentClassName.js";
4
+ import "../../../utils/dist/index.js";
5
+ import { expandMacros } from "../packages/core/dist/macros.js";
6
+ import { colorPropToOpacityProp, propMappings } from "../packages/core/dist/propMappings.js";
7
+ import { toCamelCase } from "../packages/core/dist/getStyles.js";
8
+ import "../packages/core/dist/index.js";
9
+ import { buildDynamicClassExpression, parseHandlerString } from "./dynamic-style-codegen.js";
10
+ import * as t from "@babel/types";
11
+ //#region ../loader/dist/loader/style-transform.js
12
+ const parseClassToken = (prefix, value) => {
13
+ if (value === "") return prefix;
14
+ return (prefix === value ? String(value) : `${prefix}-${value}`).replace(/[./]/g, "_");
15
+ };
16
+ function parseStaticExpression(expression) {
17
+ if (t.isStringLiteral(expression)) return expression.value;
18
+ if (t.isNumericLiteral(expression)) return expression.value;
19
+ if (t.isBooleanLiteral(expression)) return expression.value;
20
+ if (t.isNullLiteral(expression)) return null;
21
+ if (t.isTemplateLiteral(expression) && expression.expressions.length === 0 && expression.quasis.length === 1) return expression.quasis[0]?.value.cooked ?? "";
22
+ if (t.isUnaryExpression(expression) && expression.operator === "-" && t.isNumericLiteral(expression.argument)) return -expression.argument.value;
23
+ if (t.isObjectExpression(expression)) {
24
+ const result = {};
25
+ for (const property of expression.properties) {
26
+ if (!t.isObjectProperty(property) || property.computed) return;
27
+ const key = t.isIdentifier(property.key) ? property.key.name : t.isStringLiteral(property.key) ? property.key.value : void 0;
28
+ if (!key || !t.isExpression(property.value)) return;
29
+ const parsedValue = parseStaticExpression(property.value);
30
+ if (parsedValue === void 0) return void 0;
31
+ result[key] = parsedValue;
32
+ }
33
+ return result;
34
+ }
35
+ }
36
+ function parseStaticJsxAttributeValue(attribute) {
37
+ if (!attribute.value) return true;
38
+ if (t.isStringLiteral(attribute.value)) return attribute.value.value;
39
+ if (t.isJSXExpressionContainer(attribute.value) && !t.isJSXEmptyExpression(attribute.value.expression)) return parseStaticExpression(attribute.value.expression);
40
+ }
41
+ /**
42
+ * Extract the dynamic expression from a JSX attribute value.
43
+ * Returns null if the attribute is static (handled by parseStaticJsxAttributeValue).
44
+ */
45
+ function getDynamicJsxAttributeExpression(attribute) {
46
+ if (!attribute.value) return null;
47
+ if (t.isStringLiteral(attribute.value)) return null;
48
+ if (t.isJSXExpressionContainer(attribute.value) && !t.isJSXEmptyExpression(attribute.value.expression)) {
49
+ const expr = attribute.value.expression;
50
+ if (parseStaticExpression(expr) !== void 0) return null;
51
+ return expr;
52
+ }
53
+ return null;
54
+ }
55
+ /**
56
+ * Try to compile a conditional/logical expression where all branches are
57
+ * statically resolvable. Returns a clean ternary/logical with pre-compiled
58
+ * class names, or null if not all branches are static.
59
+ *
60
+ * e.g. `color={isActive ? 'on-primary' : 'on-secondary'}`
61
+ * → `isActive ? 'color-on-primary' : 'color-on-secondary'`
62
+ */
63
+ function tryCompileStaticBranchExpression(expr, handler, modifierPrefix) {
64
+ if (t.isConditionalExpression(expr)) {
65
+ const consequentValue = parseStaticExpression(expr.consequent);
66
+ const alternateValue = parseStaticExpression(expr.alternate);
67
+ if (consequentValue !== void 0 && alternateValue !== void 0) {
68
+ const consequentClass = String(handler(consequentValue));
69
+ const alternateClass = String(handler(alternateValue));
70
+ const fullConsequent = modifierPrefix ? `${modifierPrefix}${consequentClass}` : consequentClass;
71
+ const fullAlternate = modifierPrefix ? `${modifierPrefix}${alternateClass}` : alternateClass;
72
+ return t.conditionalExpression(t.cloneNode(expr.test), t.stringLiteral(fullConsequent), t.stringLiteral(fullAlternate));
73
+ }
74
+ const compiledConsequent = consequentValue !== void 0 ? t.stringLiteral(modifierPrefix ? `${modifierPrefix}${String(handler(consequentValue))}` : String(handler(consequentValue))) : tryCompileStaticBranchExpression(expr.consequent, handler, modifierPrefix);
75
+ const compiledAlternate = alternateValue !== void 0 ? t.stringLiteral(modifierPrefix ? `${modifierPrefix}${String(handler(alternateValue))}` : String(handler(alternateValue))) : tryCompileStaticBranchExpression(expr.alternate, handler, modifierPrefix);
76
+ if (compiledConsequent && compiledAlternate) return t.conditionalExpression(t.cloneNode(expr.test), compiledConsequent, compiledAlternate);
77
+ }
78
+ if (t.isLogicalExpression(expr) && expr.operator === "&&") {
79
+ const rightValue = parseStaticExpression(expr.right);
80
+ if (rightValue !== void 0) {
81
+ const rightClass = String(handler(rightValue));
82
+ const fullRight = modifierPrefix ? `${modifierPrefix}${rightClass}` : rightClass;
83
+ return t.logicalExpression("&&", t.cloneNode(expr.left), t.stringLiteral(fullRight));
84
+ }
85
+ }
86
+ return null;
87
+ }
88
+ function buildClassJoinExpression(parts) {
89
+ return t.callExpression(t.memberExpression(t.callExpression(t.memberExpression(t.arrayExpression(parts), t.identifier("filter")), [t.identifier("Boolean")]), t.identifier("join")), [t.stringLiteral(" ")]);
90
+ }
91
+ function getStaticMemberKey(node) {
92
+ if (!node.computed) {
93
+ if (t.isIdentifier(node.property)) return node.property.name;
94
+ if (t.isStringLiteral(node.property)) return node.property.value;
95
+ return null;
96
+ }
97
+ if (t.isStringLiteral(node.property)) return node.property.value;
98
+ if (t.isNumericLiteral(node.property)) return String(node.property.value);
99
+ if (t.isTemplateLiteral(node.property) && node.property.expressions.length === 0 && node.property.quasis.length === 1) return node.property.quasis[0]?.value.cooked ?? "";
100
+ return null;
101
+ }
102
+ function getStaticObjectPropertyKey(property) {
103
+ if (property.computed) return null;
104
+ if (t.isIdentifier(property.key)) return property.key.name;
105
+ if (t.isStringLiteral(property.key)) return property.key.value;
106
+ return null;
107
+ }
108
+ function upsertClassNameAttribute(attributes, classExpression) {
109
+ const classAttr = attributes.find((attr) => t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name) && attr.name.name === "className");
110
+ if (!classAttr) {
111
+ attributes.push(t.jsxAttribute(t.jsxIdentifier("className"), t.jsxExpressionContainer(classExpression)));
112
+ return;
113
+ }
114
+ let existingExpression = null;
115
+ if (!classAttr.value) existingExpression = t.booleanLiteral(true);
116
+ else if (t.isStringLiteral(classAttr.value)) existingExpression = t.stringLiteral(classAttr.value.value);
117
+ else if (t.isJSXExpressionContainer(classAttr.value) && !t.isJSXEmptyExpression(classAttr.value.expression)) existingExpression = classAttr.value.expression;
118
+ const nextExpression = existingExpression ? buildClassJoinExpression([existingExpression, classExpression]) : classExpression;
119
+ classAttr.value = t.jsxExpressionContainer(nextExpression);
120
+ }
121
+ function createStyleTransformRuntime(transformData, manifest) {
122
+ const manifestAllComponents = manifest ? Object.keys(manifest.components) : [];
123
+ const manifestPrimitiveComponents = manifest ? Object.entries(manifest.components).filter(([, entry]) => entry.type === "primitive").map(([name]) => name) : [];
124
+ const allComponents = new Set([...transformData?.allComponents ?? [], ...manifestAllComponents]);
125
+ const primitiveComponents = new Set([...transformData?.primitiveComponents ?? [], ...manifestPrimitiveComponents]);
126
+ const componentTagPatterns = [...allComponents].flatMap((name) => [`<${name}`, `(${name},`]);
127
+ const safeStyleProps = transformData?.safeStyleProps ?? transformData?.styleAndModifierProps ?? [];
128
+ const styleAndModifierPropSet = new Set(safeStyleProps);
129
+ const classnamesMap = transformData?.classnamesMap ?? {};
130
+ const modifiersTwMap = transformData?.modifiersTwMap ?? {};
131
+ const stylePropHandlerMap = {};
132
+ const parsedHandlerCache = /* @__PURE__ */ new Map();
133
+ for (const [key, fnBody] of Object.entries(classnamesMap)) stylePropHandlerMap[key] = new Function("parse", `return ${fnBody}`)(parseClassToken);
134
+ function getParsedHandler(propName) {
135
+ if (parsedHandlerCache.has(propName)) return parsedHandlerCache.get(propName) ?? null;
136
+ const handlerStr = classnamesMap[propName];
137
+ if (!handlerStr) {
138
+ parsedHandlerCache.set(propName, null);
139
+ return null;
140
+ }
141
+ const parsed = parseHandlerString(handlerStr);
142
+ parsedHandlerCache.set(propName, parsed);
143
+ return parsed;
144
+ }
145
+ const componentClassDataMap = transformData?.componentClassData;
146
+ function getComponentVariantData(componentName) {
147
+ const data = componentClassDataMap?.[componentName];
148
+ if (!data) return null;
149
+ const hasVariants = data.variantClassNames && Object.keys(data.variantClassNames).length > 0;
150
+ const hasDefaults = data.defaultVariants && Object.keys(data.defaultVariants).length > 0;
151
+ if (!hasVariants && !hasDefaults) return null;
152
+ return data;
153
+ }
154
+ function isStyleLikeProp(propName) {
155
+ return styleAndModifierPropSet.has(propName) || propName.startsWith("_");
156
+ }
157
+ function compileStyleClassName(styleProps, modifierPrefix = "") {
158
+ const macroConf = transformData?.macroConfig ?? {};
159
+ let effectiveProps = styleProps;
160
+ if (Object.keys(macroConf).length > 0 && !modifierPrefix) {
161
+ const { expanded, markerClasses } = expandMacros(styleProps, macroConf);
162
+ effectiveProps = expanded;
163
+ if (markerClasses.length > 0) effectiveProps.__macroMarkers = markerClasses;
164
+ }
165
+ for (const [colorProp, opacityPropName] of Object.entries(colorPropToOpacityProp)) if (effectiveProps[opacityPropName] !== void 0 && effectiveProps[colorProp] !== void 0) {
166
+ effectiveProps[colorProp] = `${effectiveProps[colorProp]}/${effectiveProps[opacityPropName]}`;
167
+ delete effectiveProps[opacityPropName];
168
+ }
169
+ const classParts = [];
170
+ if (Array.isArray(effectiveProps.__macroMarkers)) {
171
+ classParts.push(...effectiveProps.__macroMarkers);
172
+ delete effectiveProps.__macroMarkers;
173
+ }
174
+ for (const key in effectiveProps) {
175
+ if (!Object.hasOwn(effectiveProps, key)) continue;
176
+ const value = effectiveProps[key];
177
+ if (value === void 0) continue;
178
+ const builtInModifier = modifiersTwMap[key];
179
+ if (builtInModifier) {
180
+ if (value && typeof value === "object" && !Array.isArray(value)) {
181
+ const nested = compileStyleClassName(value, `${modifierPrefix}${builtInModifier}`);
182
+ if (nested) classParts.push(nested);
183
+ }
184
+ continue;
185
+ }
186
+ if (key.startsWith("_")) {
187
+ if (value && typeof value === "object" && !Array.isArray(value)) {
188
+ const nested = compileStyleClassName(value, `${modifierPrefix}${key.slice(1)}:`);
189
+ if (nested) classParts.push(nested);
190
+ }
191
+ continue;
192
+ }
193
+ const handler = stylePropHandlerMap[key];
194
+ if (!handler) continue;
195
+ const token = String(handler(value));
196
+ if (!token) continue;
197
+ classParts.push(modifierPrefix ? `${modifierPrefix}${token}` : token);
198
+ }
199
+ return classParts.join(" ");
200
+ }
201
+ function extractVariantClassMapFromCreateVariantsCall(callExpression) {
202
+ const firstArg = callExpression.arguments[0];
203
+ if (!firstArg || !t.isObjectExpression(firstArg)) return null;
204
+ const result = {};
205
+ for (const property of firstArg.properties) {
206
+ if (!t.isObjectProperty(property) || property.computed) return null;
207
+ const key = t.isIdentifier(property.key) ? property.key.name : t.isStringLiteral(property.key) ? property.key.value : null;
208
+ if (!key || !t.isExpression(property.value)) return null;
209
+ const parsedStyleProps = parseStaticExpression(property.value);
210
+ if (!parsedStyleProps || typeof parsedStyleProps !== "object" || Array.isArray(parsedStyleProps)) return null;
211
+ result[key] = compileStyleClassName(parsedStyleProps);
212
+ }
213
+ return result;
214
+ }
215
+ /**
216
+ * Build a dynamic class expression for a modifier object with mixed
217
+ * static/dynamic values. For example: `_hover={{ bg: someVar, color: 'red' }}`
218
+ *
219
+ * Static properties are compiled normally. Dynamic properties get inline
220
+ * expressions via the codegen module.
221
+ */
222
+ function buildMixedModifierObjectExpression(objectExpr, modifierPrefix) {
223
+ const staticProps = {};
224
+ const dynamicExpressions = [];
225
+ let hasDynamic = false;
226
+ for (const property of objectExpr.properties) {
227
+ if (!t.isObjectProperty(property) || property.computed) return null;
228
+ const key = t.isIdentifier(property.key) ? property.key.name : t.isStringLiteral(property.key) ? property.key.value : null;
229
+ if (!key || !t.isExpression(property.value)) return null;
230
+ const nestedModifier = modifiersTwMap[key];
231
+ if (nestedModifier) {
232
+ const nestedPrefix = `${modifierPrefix}${nestedModifier}`;
233
+ if (t.isObjectExpression(property.value)) {
234
+ const nested = buildMixedModifierObjectExpression(property.value, nestedPrefix);
235
+ if (nested) {
236
+ Object.assign(staticProps, nested.staticProps);
237
+ dynamicExpressions.push(...nested.dynamicExpressions);
238
+ if (nested.dynamicExpressions.length > 0) hasDynamic = true;
239
+ }
240
+ }
241
+ continue;
242
+ }
243
+ if (key.startsWith("_")) {
244
+ const customModifierPrefix = `${modifierPrefix}${key.slice(1)}:`;
245
+ if (t.isObjectExpression(property.value)) {
246
+ const nested = buildMixedModifierObjectExpression(property.value, customModifierPrefix);
247
+ if (nested) {
248
+ Object.assign(staticProps, nested.staticProps);
249
+ dynamicExpressions.push(...nested.dynamicExpressions);
250
+ if (nested.dynamicExpressions.length > 0) hasDynamic = true;
251
+ }
252
+ }
253
+ continue;
254
+ }
255
+ if (!isStyleLikeProp(key)) continue;
256
+ const parsedValue = parseStaticExpression(property.value);
257
+ if (parsedValue !== void 0) {
258
+ const handler = stylePropHandlerMap[key];
259
+ if (handler) {
260
+ const token = String(handler(parsedValue));
261
+ if (token) {
262
+ const fullToken = modifierPrefix ? `${modifierPrefix}${token}` : token;
263
+ staticProps[`__compiled_${modifierPrefix}${key}`] = fullToken;
264
+ }
265
+ }
266
+ } else {
267
+ const handler = stylePropHandlerMap[key];
268
+ if (handler) {
269
+ const staticBranchExpr = tryCompileStaticBranchExpression(property.value, handler, modifierPrefix);
270
+ if (staticBranchExpr) {
271
+ dynamicExpressions.push(staticBranchExpr);
272
+ hasDynamic = true;
273
+ continue;
274
+ }
275
+ }
276
+ const parsedHandler = getParsedHandler(key);
277
+ if (parsedHandler) {
278
+ dynamicExpressions.push(buildDynamicClassExpression(parsedHandler, property.value, modifierPrefix));
279
+ hasDynamic = true;
280
+ }
281
+ }
282
+ }
283
+ return hasDynamic || Object.keys(staticProps).length > 0 ? {
284
+ staticProps,
285
+ dynamicExpressions
286
+ } : null;
287
+ }
288
+ /**
289
+ * Build a className expression for a non-root slot with dynamic variant lookups.
290
+ * Produces a template literal like `${lookupA[expr] || ""} ${lookupB[expr] || ""}`.
291
+ * If a static prefix is provided, it is prepended.
292
+ */
293
+ function buildSlotDynamicClassName(dynamicExprs, staticPrefix) {
294
+ if (dynamicExprs.length === 1 && !staticPrefix) return dynamicExprs[0];
295
+ const quasis = [];
296
+ const expressions = [];
297
+ const prefix = staticPrefix ? `${staticPrefix} ` : "";
298
+ quasis.push(t.templateElement({
299
+ raw: prefix,
300
+ cooked: prefix
301
+ }, false));
302
+ for (let i = 0; i < dynamicExprs.length; i++) {
303
+ expressions.push(dynamicExprs[i]);
304
+ const isLast = i === dynamicExprs.length - 1;
305
+ const suffix = isLast ? "" : " ";
306
+ quasis.push(t.templateElement({
307
+ raw: suffix,
308
+ cooked: suffix
309
+ }, isLast));
310
+ }
311
+ return t.templateLiteral(quasis, expressions);
312
+ }
313
+ /**
314
+ * Collect variant classes for all slots from a slot map.
315
+ * Root classes go to classExpressionParts; non-root go to slotVariantClasses.
316
+ */
317
+ function collectAllSlotVariantClasses(ctx, slotMap) {
318
+ for (const [slot, className] of Object.entries(slotMap)) if (slot === "root") ctx.classExpressionParts.push(t.stringLiteral(className));
319
+ else {
320
+ ctx.slotVariantClasses[slot] ??= [];
321
+ ctx.slotVariantClasses[slot].push(className);
322
+ }
323
+ }
324
+ /**
325
+ * Derive the set of slots that participate in a variant axis by inspecting
326
+ * the existing variant class name map. Falls back to just 'root' when the
327
+ * axis has no known values yet (e.g. entirely new axis).
328
+ */
329
+ function deriveSlotsFromAxis(variantClassMap) {
330
+ const slots = /* @__PURE__ */ new Set();
331
+ for (const slotMap of Object.values(variantClassMap)) for (const slot of Object.keys(slotMap)) slots.add(slot);
332
+ return slots.size > 0 ? [...slots] : ["root"];
333
+ }
334
+ /**
335
+ * Process a single prop (variant or style) and accumulate results into ctx.
336
+ * Returns true if the prop was consumed and should be removed.
337
+ */
338
+ function processComponentProp(ctx, key, staticValue, dynamicExpr, modifierObjectExpr) {
339
+ if (ctx.variantAxes?.has(key)) {
340
+ const variantClassMap = ctx.variantData?.variantClassNames[key];
341
+ if (staticValue !== void 0 && typeof staticValue === "string" && variantClassMap) {
342
+ const slotMap = variantClassMap[staticValue];
343
+ if (slotMap) collectAllSlotVariantClasses(ctx, slotMap);
344
+ else {
345
+ const slotsForAxis = deriveSlotsFromAxis(variantClassMap);
346
+ for (const slot of slotsForAxis) {
347
+ const className = componentVariantClass(ctx.componentName, slot, key, staticValue);
348
+ if (slot === "root") ctx.classExpressionParts.push(t.stringLiteral(className));
349
+ else {
350
+ ctx.slotVariantClasses[slot] ??= [];
351
+ ctx.slotVariantClasses[slot].push(className);
352
+ }
353
+ }
354
+ }
355
+ ctx.resolvedVariantAxes.add(key);
356
+ return true;
357
+ }
358
+ if (variantClassMap && dynamicExpr && ctx.hoistedVariantClassMapNames && ctx.hoistedVariantClassMaps) {
359
+ const slotLookups = {};
360
+ for (const [value, slotMap] of Object.entries(variantClassMap)) for (const [slot, className] of Object.entries(slotMap)) {
361
+ slotLookups[slot] ??= {};
362
+ slotLookups[slot][value] = className;
363
+ }
364
+ if (Object.keys(slotLookups).length > 0) {
365
+ for (const [slot, lookup] of Object.entries(slotLookups)) {
366
+ const lookupKey = `__uds_${ctx.componentName}_${key}_${slot}`;
367
+ let hoistedName = ctx.hoistedVariantClassMapNames.get(lookupKey);
368
+ if (!hoistedName) {
369
+ hoistedName = lookupKey;
370
+ ctx.hoistedVariantClassMapNames.set(lookupKey, hoistedName);
371
+ ctx.hoistedVariantClassMaps.set(hoistedName, lookup);
372
+ }
373
+ const classPrefix = `${kebabCase(ctx.componentName)}-${slot}--${key}-`;
374
+ const fallbackExpr = t.templateLiteral([t.templateElement({
375
+ raw: classPrefix,
376
+ cooked: classPrefix
377
+ }, false), t.templateElement({
378
+ raw: "",
379
+ cooked: ""
380
+ }, true)], [t.cloneNode(dynamicExpr)]);
381
+ const lookupExpr = t.logicalExpression("||", t.memberExpression(t.identifier(hoistedName), t.cloneNode(dynamicExpr), true), fallbackExpr);
382
+ if (slot === "root") ctx.classExpressionParts.push(lookupExpr);
383
+ else {
384
+ ctx.dynamicSlotExprs[slot] ??= [];
385
+ ctx.dynamicSlotExprs[slot].push(lookupExpr);
386
+ }
387
+ }
388
+ ctx.resolvedVariantAxes.add(key);
389
+ return true;
390
+ }
391
+ }
392
+ }
393
+ if (!isStyleLikeProp(key)) return false;
394
+ if (staticValue !== void 0) {
395
+ if (typeof staticValue === "string" && /^\[.+\](?:\/\d+)?$/.test(staticValue)) {
396
+ const mapping = propMappings[key];
397
+ if (mapping) {
398
+ const rawValue = staticValue.slice(1, staticValue.lastIndexOf("]"));
399
+ if (mapping.arbitraryValueTemplate) {
400
+ const { cssProperty, valueTemplate } = mapping.arbitraryValueTemplate;
401
+ ctx.arbitraryInlineStyleProps[toCamelCase(cssProperty)] = valueTemplate.replace("%s", rawValue);
402
+ return true;
403
+ }
404
+ if (mapping.cssProperty) {
405
+ ctx.arbitraryInlineStyleProps[toCamelCase(mapping.cssProperty)] = rawValue;
406
+ return true;
407
+ }
408
+ }
409
+ }
410
+ ctx.staticStyleProps[key] = staticValue;
411
+ return true;
412
+ }
413
+ if (!key.startsWith("_") && dynamicExpr) {
414
+ const handler = stylePropHandlerMap[key];
415
+ if (handler) {
416
+ const staticBranchExpr = tryCompileStaticBranchExpression(dynamicExpr, handler);
417
+ if (staticBranchExpr) {
418
+ ctx.classExpressionParts.push(staticBranchExpr);
419
+ return true;
420
+ }
421
+ }
422
+ const parsedHandler = getParsedHandler(key);
423
+ if (parsedHandler) {
424
+ ctx.classExpressionParts.push(buildDynamicClassExpression(parsedHandler, dynamicExpr));
425
+ return true;
426
+ }
427
+ }
428
+ if (key.startsWith("_") && modifierObjectExpr) {
429
+ const result = buildMixedModifierObjectExpression(modifierObjectExpr, modifiersTwMap[key] || `${key.slice(1)}:`);
430
+ if (result) {
431
+ for (const value of Object.values(result.staticProps)) if (typeof value === "string") ctx.classExpressionParts.push(t.stringLiteral(value));
432
+ ctx.classExpressionParts.push(...result.dynamicExpressions);
433
+ return true;
434
+ }
435
+ }
436
+ return false;
437
+ }
438
+ /**
439
+ * Apply default variant classes and compile static style props into the
440
+ * final class expression. Returns null if no classes were generated.
441
+ */
442
+ function finalizeStyleClassParts(ctx) {
443
+ if (ctx.variantData?.defaultVariants && ctx.variantData.variantClassNames) for (const [axis, defaultValue] of Object.entries(ctx.variantData.defaultVariants)) {
444
+ if (ctx.resolvedVariantAxes.has(axis)) continue;
445
+ const variantClassMap = ctx.variantData.variantClassNames[axis];
446
+ if (!variantClassMap) continue;
447
+ const slotMap = variantClassMap[defaultValue];
448
+ if (slotMap) collectAllSlotVariantClasses(ctx, slotMap);
449
+ }
450
+ const staticClassName = compileStyleClassName(applyComponentStyleDefaults(ctx.componentName, ctx.staticStyleProps));
451
+ if (staticClassName) ctx.classExpressionParts.unshift(t.stringLiteral(staticClassName));
452
+ if (ctx.classExpressionParts.length === 0) return null;
453
+ return ctx.classExpressionParts.length === 1 ? ctx.classExpressionParts[0] : buildClassJoinExpression(ctx.classExpressionParts);
454
+ }
455
+ function transformUdsComponentStyleProps(nodePath, createVariantsClassMaps, hoistedVariantClassMapNames, hoistedVariantClassMaps) {
456
+ const openingElement = nodePath.node;
457
+ if (!t.isJSXIdentifier(openingElement.name)) return false;
458
+ const componentName = openingElement.name.name;
459
+ if (!allComponents.has(componentName)) return false;
460
+ const attributes = openingElement.attributes;
461
+ const removeIndices = [];
462
+ const variantData = getComponentVariantData(componentName);
463
+ const ctx = {
464
+ componentName,
465
+ variantData,
466
+ variantAxes: variantData?.variantClassNames ? new Set(Object.keys(variantData.variantClassNames)) : null,
467
+ resolvedVariantAxes: /* @__PURE__ */ new Set(),
468
+ staticStyleProps: {},
469
+ classExpressionParts: [],
470
+ slotVariantClasses: {},
471
+ dynamicSlotExprs: {},
472
+ arbitraryInlineStyleProps: {},
473
+ hoistedVariantClassMapNames,
474
+ hoistedVariantClassMaps
475
+ };
476
+ for (const [index, attribute] of attributes.entries()) {
477
+ if (t.isJSXAttribute(attribute) && t.isJSXIdentifier(attribute.name)) {
478
+ const attrName = attribute.name.name;
479
+ if (attrName === "className") continue;
480
+ const staticValue = parseStaticJsxAttributeValue(attribute);
481
+ const dynamicExpr = getDynamicJsxAttributeExpression(attribute);
482
+ let modifierObjectExpr = null;
483
+ if (attribute.value && t.isJSXExpressionContainer(attribute.value) && !t.isJSXEmptyExpression(attribute.value.expression) && t.isObjectExpression(attribute.value.expression)) modifierObjectExpr = attribute.value.expression;
484
+ if (processComponentProp(ctx, attrName, staticValue, dynamicExpr, modifierObjectExpr)) removeIndices.push(index);
485
+ continue;
486
+ }
487
+ if (t.isJSXSpreadAttribute(attribute) && t.isMemberExpression(attribute.argument) && t.isIdentifier(attribute.argument.object)) {
488
+ const variantVarName = attribute.argument.object.name;
489
+ const classMap = createVariantsClassMaps.get(variantVarName);
490
+ if (!classMap) continue;
491
+ removeIndices.push(index);
492
+ const staticKey = getStaticMemberKey(attribute.argument);
493
+ if (staticKey !== null) {
494
+ const staticClassName = classMap[staticKey];
495
+ if (staticClassName) ctx.classExpressionParts.push(t.stringLiteral(staticClassName));
496
+ continue;
497
+ }
498
+ const keyExpression = attribute.argument.computed ? attribute.argument.property : t.stringLiteral(t.isIdentifier(attribute.argument.property) ? attribute.argument.property.name : "");
499
+ let hoistedName = hoistedVariantClassMapNames.get(variantVarName);
500
+ if (!hoistedName) {
501
+ hoistedName = `__uds_${variantVarName}_classMap`;
502
+ hoistedVariantClassMapNames.set(variantVarName, hoistedName);
503
+ hoistedVariantClassMaps.set(hoistedName, classMap);
504
+ }
505
+ ctx.classExpressionParts.push(t.logicalExpression("||", t.memberExpression(t.identifier(hoistedName), keyExpression, true), t.stringLiteral("")));
506
+ continue;
507
+ }
508
+ if (t.isJSXSpreadAttribute(attribute) && t.isObjectExpression(attribute.argument)) {
509
+ const remainingProperties = [];
510
+ let consumedStyleProps = false;
511
+ for (const property of attribute.argument.properties) {
512
+ if (!t.isObjectProperty(property)) {
513
+ remainingProperties.push(property);
514
+ continue;
515
+ }
516
+ const key = getStaticObjectPropertyKey(property);
517
+ if (!key || !isStyleLikeProp(key) || !t.isExpression(property.value)) {
518
+ remainingProperties.push(property);
519
+ continue;
520
+ }
521
+ const parsedValue = parseStaticExpression(property.value);
522
+ if (parsedValue === void 0) {
523
+ remainingProperties.push(property);
524
+ continue;
525
+ }
526
+ ctx.staticStyleProps[key] = parsedValue;
527
+ consumedStyleProps = true;
528
+ }
529
+ if (!consumedStyleProps) continue;
530
+ if (remainingProperties.length === 0) removeIndices.push(index);
531
+ else if (remainingProperties.every((p) => t.isObjectProperty(p) && !p.computed && (t.isIdentifier(p.key) || t.isStringLiteral(p.key)))) {
532
+ const flatAttrs = remainingProperties.map((p) => {
533
+ const key = t.isIdentifier(p.key) ? p.key.name : p.key.value;
534
+ const value = t.isExpression(p.value) ? t.isStringLiteral(p.value) ? t.stringLiteral(p.value.value) : t.jsxExpressionContainer(t.cloneNode(p.value, true, true)) : null;
535
+ return t.jsxAttribute(t.jsxIdentifier(key), value);
536
+ });
537
+ attributes.splice(index, 1, ...flatAttrs);
538
+ } else attributes[index] = t.jsxSpreadAttribute(t.objectExpression(remainingProperties));
539
+ }
540
+ }
541
+ const mergedExpression = finalizeStyleClassParts(ctx);
542
+ const hasSlotClasses = Object.keys(ctx.slotVariantClasses).length > 0;
543
+ const hasDynamicSlotExprs = Object.keys(ctx.dynamicSlotExprs).length > 0;
544
+ const hasArbitraryInlineStyles = Object.keys(ctx.arbitraryInlineStyleProps).length > 0;
545
+ if (!mergedExpression && !hasSlotClasses && !hasDynamicSlotExprs && !hasArbitraryInlineStyles) return false;
546
+ removeIndices.sort((a, b) => b - a).forEach((index) => {
547
+ attributes.splice(index, 1);
548
+ });
549
+ if (mergedExpression) upsertClassNameAttribute(attributes, mergedExpression);
550
+ const allSlots = new Set([...Object.keys(ctx.slotVariantClasses), ...Object.keys(ctx.dynamicSlotExprs)]);
551
+ if (allSlots.size > 0) for (const slot of allSlots) {
552
+ const staticClasses = ctx.slotVariantClasses[slot];
553
+ const dynamicExprs = ctx.dynamicSlotExprs[slot];
554
+ let classNameExpr;
555
+ if (staticClasses && !dynamicExprs) classNameExpr = t.stringLiteral(staticClasses.join(" "));
556
+ else if (!staticClasses && dynamicExprs) classNameExpr = buildSlotDynamicClassName(dynamicExprs);
557
+ else if (staticClasses && dynamicExprs) classNameExpr = buildSlotDynamicClassName(dynamicExprs, staticClasses.join(" "));
558
+ else continue;
559
+ attributes.push(t.jsxAttribute(t.jsxIdentifier(`_${slot}`), t.jsxExpressionContainer(t.objectExpression([t.objectProperty(t.identifier("className"), classNameExpr)]))));
560
+ }
561
+ if (hasArbitraryInlineStyles) {
562
+ const inlineStyleProperties = Object.entries(ctx.arbitraryInlineStyleProps).map(([cssProp, cssVal]) => t.objectProperty(t.identifier(cssProp), t.stringLiteral(cssVal)));
563
+ const existingStyleAttr = attributes.find((attr) => t.isJSXAttribute(attr) && t.isJSXIdentifier(attr.name) && attr.name.name === "style");
564
+ if (existingStyleAttr) {
565
+ let existingStyleExpr = null;
566
+ if (t.isJSXExpressionContainer(existingStyleAttr.value) && !t.isJSXEmptyExpression(existingStyleAttr.value.expression)) existingStyleExpr = existingStyleAttr.value.expression;
567
+ const mergedStyleExpr = existingStyleExpr ? t.objectExpression([t.spreadElement(existingStyleExpr), ...inlineStyleProperties]) : t.objectExpression(inlineStyleProperties);
568
+ existingStyleAttr.value = t.jsxExpressionContainer(mergedStyleExpr);
569
+ } else attributes.push(t.jsxAttribute(t.jsxIdentifier("style"), t.jsxExpressionContainer(t.objectExpression(inlineStyleProperties))));
570
+ }
571
+ return true;
572
+ }
573
+ /**
574
+ * Transform style props in compiled JSX calls like:
575
+ * _jsx(Box, { display: "flex", flexDirection: "col", ...rest, children })
576
+ *
577
+ * Extracts style props from the ObjectExpression, compiles them to className,
578
+ * and removes them from the props object.
579
+ */
580
+ function transformCompiledJsxStyleProps(callExpression, hoistedVariantClassMapNames, hoistedVariantClassMaps) {
581
+ const callee = callExpression.callee;
582
+ if (!t.isIdentifier(callee)) return false;
583
+ if (callee.name !== "jsx" && callee.name !== "jsxs" && callee.name !== "jsxDEV" && callee.name !== "_jsx" && callee.name !== "_jsxs" && callee.name !== "_jsxDEV") return false;
584
+ const args = callExpression.arguments;
585
+ if (!args || args.length < 2) return false;
586
+ const firstArg = args[0];
587
+ if (!t.isIdentifier(firstArg)) return false;
588
+ if (!allComponents.has(firstArg.name)) return false;
589
+ const propsArg = args[1];
590
+ if (!t.isObjectExpression(propsArg)) return false;
591
+ const componentName = firstArg.name;
592
+ const removeIndices = [];
593
+ const variantData = getComponentVariantData(componentName);
594
+ const ctx = {
595
+ componentName,
596
+ variantData,
597
+ variantAxes: variantData?.variantClassNames ? new Set(Object.keys(variantData.variantClassNames)) : null,
598
+ resolvedVariantAxes: /* @__PURE__ */ new Set(),
599
+ staticStyleProps: {},
600
+ classExpressionParts: [],
601
+ slotVariantClasses: {},
602
+ dynamicSlotExprs: {},
603
+ arbitraryInlineStyleProps: {},
604
+ hoistedVariantClassMapNames,
605
+ hoistedVariantClassMaps
606
+ };
607
+ for (const [index, property] of propsArg.properties.entries()) {
608
+ if (!t.isObjectProperty(property)) continue;
609
+ if (property.computed) continue;
610
+ const key = t.isIdentifier(property.key) ? property.key.name : t.isStringLiteral(property.key) ? property.key.value : null;
611
+ if (!key) continue;
612
+ if (key === "className" || key === "children") continue;
613
+ if (!t.isExpression(property.value)) continue;
614
+ const staticValue = parseStaticExpression(property.value);
615
+ if (processComponentProp(ctx, key, staticValue, staticValue !== void 0 ? null : property.value, t.isObjectExpression(property.value) ? property.value : null)) removeIndices.push(index);
616
+ }
617
+ const mergedExpression = finalizeStyleClassParts(ctx);
618
+ const hasSlotClasses = Object.keys(ctx.slotVariantClasses).length > 0;
619
+ const hasDynSlotExprs = Object.keys(ctx.dynamicSlotExprs).length > 0;
620
+ const hasArbitraryInlineStyles = Object.keys(ctx.arbitraryInlineStyleProps).length > 0;
621
+ if (!mergedExpression && !hasSlotClasses && !hasDynSlotExprs && !hasArbitraryInlineStyles) return false;
622
+ removeIndices.sort((a, b) => b - a).forEach((index) => {
623
+ propsArg.properties.splice(index, 1);
624
+ });
625
+ if (mergedExpression) {
626
+ const existingClassNameIndex = propsArg.properties.findIndex((prop) => t.isObjectProperty(prop) && !prop.computed && (t.isIdentifier(prop.key) && prop.key.name === "className" || t.isStringLiteral(prop.key) && prop.key.value === "className"));
627
+ if (existingClassNameIndex === -1) {
628
+ const spreadClassNameExprs = [];
629
+ for (const prop of propsArg.properties) if (t.isSpreadElement(prop) && t.isIdentifier(prop.argument)) spreadClassNameExprs.push(t.optionalMemberExpression(t.identifier(prop.argument.name), t.identifier("className"), false, true));
630
+ const finalExpression = spreadClassNameExprs.length > 0 ? buildClassJoinExpression([...spreadClassNameExprs, mergedExpression]) : mergedExpression;
631
+ propsArg.properties.push(t.objectProperty(t.identifier("className"), finalExpression));
632
+ } else {
633
+ const existingProp = propsArg.properties[existingClassNameIndex];
634
+ const existingValue = existingProp.value;
635
+ existingProp.value = buildClassJoinExpression([existingValue, mergedExpression]);
636
+ }
637
+ }
638
+ const allCompiledSlots = new Set([...Object.keys(ctx.slotVariantClasses), ...Object.keys(ctx.dynamicSlotExprs)]);
639
+ if (allCompiledSlots.size > 0) for (const slot of allCompiledSlots) {
640
+ const staticClasses = ctx.slotVariantClasses[slot];
641
+ const dynamicExprs = ctx.dynamicSlotExprs[slot];
642
+ let classNameExpr;
643
+ if (staticClasses && !dynamicExprs) classNameExpr = t.stringLiteral(staticClasses.join(" "));
644
+ else if (!staticClasses && dynamicExprs) classNameExpr = buildSlotDynamicClassName(dynamicExprs);
645
+ else if (staticClasses && dynamicExprs) classNameExpr = buildSlotDynamicClassName(dynamicExprs, staticClasses.join(" "));
646
+ else continue;
647
+ propsArg.properties.push(t.objectProperty(t.stringLiteral(`_${slot}`), t.objectExpression([t.objectProperty(t.identifier("className"), classNameExpr)])));
648
+ }
649
+ if (hasArbitraryInlineStyles) {
650
+ const inlineStyleProperties = Object.entries(ctx.arbitraryInlineStyleProps).map(([cssProp, cssVal]) => t.objectProperty(t.identifier(cssProp), t.stringLiteral(cssVal)));
651
+ const existingStyleIndex = propsArg.properties.findIndex((prop) => t.isObjectProperty(prop) && !prop.computed && (t.isIdentifier(prop.key) && prop.key.name === "style" || t.isStringLiteral(prop.key) && prop.key.value === "style"));
652
+ if (existingStyleIndex !== -1) {
653
+ const existingStyleProp = propsArg.properties[existingStyleIndex];
654
+ const existingStyleValue = existingStyleProp.value;
655
+ existingStyleProp.value = t.objectExpression([t.spreadElement(existingStyleValue), ...inlineStyleProperties]);
656
+ } else propsArg.properties.push(t.objectProperty(t.identifier("style"), t.objectExpression(inlineStyleProperties)));
657
+ }
658
+ return true;
659
+ }
660
+ return {
661
+ allComponents,
662
+ primitiveComponents,
663
+ componentTagPatterns,
664
+ extractVariantClassMapFromCreateVariantsCall,
665
+ transformUdsComponentStyleProps,
666
+ transformCompiledJsxStyleProps
667
+ };
668
+ }
669
+ //#endregion
670
+ export { createStyleTransformRuntime };
@@ -0,0 +1,8 @@
1
+ import { LoaderDefinitionFunction } from "webpack";
2
+
3
+ //#region ../loader/dist/loader.d.ts
4
+ //#region src/loader.d.ts
5
+ declare const transformLoader: LoaderDefinitionFunction;
6
+ declare const normal: LoaderDefinitionFunction<{}, {}>; //#endregion
7
+ //#endregion
8
+ export { normal, transformLoader };