@fangxinyan/lumina 0.6.17 → 0.7.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 (464) hide show
  1. package/dist/{Alert-HVPI6L4V.css → Alert-DJ3K7N7L.css} +9 -9
  2. package/dist/Alert.cjs +5 -3
  3. package/dist/Alert.d.cts +2 -2
  4. package/dist/Alert.d.ts +2 -2
  5. package/dist/Alert.js +4 -2
  6. package/dist/{AppShell-FZCD4C56.css → AppShell-OWJRJ4ZD.css} +57 -22
  7. package/dist/AppShell.cjs +8 -5
  8. package/dist/AppShell.d.cts +19 -16
  9. package/dist/AppShell.d.ts +19 -16
  10. package/dist/AppShell.js +4 -1
  11. package/dist/{AutoComplete-4YZBMW4E.css → AutoComplete-PNCYHU2T.css} +8 -8
  12. package/dist/AutoComplete.cjs +9 -6
  13. package/dist/AutoComplete.d.cts +2 -1
  14. package/dist/AutoComplete.d.ts +2 -1
  15. package/dist/AutoComplete.js +8 -5
  16. package/dist/Avatar-YBU2YZTW.css +48 -0
  17. package/dist/Avatar.cjs +4 -2
  18. package/dist/Avatar.d.cts +6 -2
  19. package/dist/Avatar.d.ts +6 -2
  20. package/dist/Avatar.js +3 -1
  21. package/dist/Badge-DBWJEV4C.css +22 -0
  22. package/dist/Badge.cjs +4 -2
  23. package/dist/Badge.d.cts +6 -2
  24. package/dist/Badge.d.ts +6 -2
  25. package/dist/Badge.js +3 -1
  26. package/dist/{Button-TUMZUQLI.css → Button-ILNZUX2N.css} +28 -21
  27. package/dist/Button.cjs +6 -4
  28. package/dist/Button.d.cts +2 -14
  29. package/dist/Button.d.ts +2 -14
  30. package/dist/Button.js +4 -2
  31. package/dist/{Calendar-I6NHCXIB.css → Calendar-QJ5HWEJQ.css} +26 -26
  32. package/dist/Calendar.cjs +5 -3
  33. package/dist/Calendar.d.cts +8 -4
  34. package/dist/Calendar.d.ts +8 -4
  35. package/dist/Calendar.js +4 -2
  36. package/dist/Card-VPMTWAWZ.css +98 -0
  37. package/dist/Card.cjs +7 -3
  38. package/dist/Card.d.cts +8 -4
  39. package/dist/Card.d.ts +8 -4
  40. package/dist/Card.js +6 -2
  41. package/dist/Cascader-YBVDK6DC.css +168 -0
  42. package/dist/Cascader.cjs +9 -6
  43. package/dist/Cascader.d.cts +21 -3
  44. package/dist/Cascader.d.ts +21 -3
  45. package/dist/Cascader.js +8 -5
  46. package/dist/Checkbox-IHFML4FV.css +50 -0
  47. package/dist/Checkbox.cjs +5 -3
  48. package/dist/Checkbox.d.cts +10 -2
  49. package/dist/Checkbox.d.ts +10 -2
  50. package/dist/Checkbox.js +4 -2
  51. package/dist/{Collapse-UNBHEPYP.css → Collapse-BTSBHBSY.css} +12 -7
  52. package/dist/Collapse.cjs +5 -3
  53. package/dist/Collapse.d.cts +2 -2
  54. package/dist/Collapse.d.ts +2 -2
  55. package/dist/Collapse.js +4 -2
  56. package/dist/{ColorPicker-LPG6QPYF.css → ColorPicker-GRZOKR5O.css} +17 -32
  57. package/dist/ColorPicker.cjs +9 -3
  58. package/dist/ColorPicker.d.cts +7 -11
  59. package/dist/ColorPicker.d.ts +7 -11
  60. package/dist/ColorPicker.js +8 -2
  61. package/dist/{CommandPalette-RTKWNH2D.css → CommandPalette-GHTX7AAA.css} +22 -23
  62. package/dist/CommandPalette.cjs +8 -5
  63. package/dist/CommandPalette.d.cts +5 -28
  64. package/dist/CommandPalette.d.ts +5 -28
  65. package/dist/CommandPalette.js +7 -4
  66. package/dist/{ContextMenu-WRR2SSWL.css → ContextMenu-NG524Y2P.css} +17 -17
  67. package/dist/ContextMenu.cjs +5 -2
  68. package/dist/ContextMenu.d.cts +2 -19
  69. package/dist/ContextMenu.d.ts +2 -19
  70. package/dist/ContextMenu.js +4 -1
  71. package/dist/{DatePicker-VDVSIARF.css → DatePicker-ZSFDXAYD.css} +4 -4
  72. package/dist/DatePicker.cjs +11 -8
  73. package/dist/DatePicker.d.cts +4 -7
  74. package/dist/DatePicker.d.ts +4 -7
  75. package/dist/DatePicker.js +10 -7
  76. package/dist/{DateTimePicker-DRX7XA74.css → DateTimePicker-EWSISVIF.css} +17 -17
  77. package/dist/DateTimePicker.cjs +11 -8
  78. package/dist/DateTimePicker.d.cts +4 -8
  79. package/dist/DateTimePicker.d.ts +4 -8
  80. package/dist/DateTimePicker.js +10 -7
  81. package/dist/{Divider-RPQCVH3J.css → Divider-OI2BXPBU.css} +10 -10
  82. package/dist/Divider.cjs +4 -2
  83. package/dist/Divider.d.cts +2 -2
  84. package/dist/Divider.d.ts +2 -2
  85. package/dist/Divider.js +3 -1
  86. package/dist/{Drawer-7KICRM4L.css → Drawer-VCXAXWV6.css} +30 -17
  87. package/dist/Drawer.cjs +6 -3
  88. package/dist/Drawer.d.cts +25 -3
  89. package/dist/Drawer.d.ts +25 -3
  90. package/dist/Drawer.js +5 -2
  91. package/dist/{Empty-CZTRZMZQ.css → Empty-U5CBLCAL.css} +5 -5
  92. package/dist/Empty.cjs +4 -2
  93. package/dist/Empty.d.cts +2 -2
  94. package/dist/Empty.d.ts +2 -2
  95. package/dist/Empty.js +3 -1
  96. package/dist/{Form-NGCQWTMZ.css → Form-DNEDZRJA.css} +7 -7
  97. package/dist/Form.cjs +7 -4
  98. package/dist/Form.d.cts +4 -3
  99. package/dist/Form.d.ts +4 -3
  100. package/dist/Form.js +4 -1
  101. package/dist/Icon-HJSUVW4O.css +12 -0
  102. package/dist/Icon.cjs +51 -49
  103. package/dist/Icon.d.cts +8 -8
  104. package/dist/Icon.d.ts +8 -8
  105. package/dist/Icon.js +3 -1
  106. package/dist/{Image-TDCXJISG.css → Image-CZJPPURT.css} +95 -14
  107. package/dist/Image.cjs +10 -6
  108. package/dist/Image.d.cts +23 -25
  109. package/dist/Image.d.ts +23 -25
  110. package/dist/Image.js +6 -2
  111. package/dist/{Input-7GDPGP3E.css → Input-ZUASNDXM.css} +15 -15
  112. package/dist/Input.cjs +7 -5
  113. package/dist/Input.d.cts +2 -1
  114. package/dist/Input.d.ts +2 -1
  115. package/dist/Input.js +5 -3
  116. package/dist/{InputNumber-VXQIWLQC.css → InputNumber-6NHBMRT4.css} +7 -7
  117. package/dist/InputNumber.cjs +7 -5
  118. package/dist/InputNumber.d.cts +2 -1
  119. package/dist/InputNumber.d.ts +2 -1
  120. package/dist/InputNumber.js +6 -4
  121. package/dist/List-6BQIFAIT.css +42 -0
  122. package/dist/List.cjs +4 -2
  123. package/dist/List.d.cts +2 -2
  124. package/dist/List.d.ts +2 -2
  125. package/dist/List.js +3 -1
  126. package/dist/{Message-H222YGR6.css → Message-OTZWQTQ5.css} +13 -13
  127. package/dist/Message.cjs +9 -6
  128. package/dist/Message.d.cts +18 -2
  129. package/dist/Message.d.ts +18 -2
  130. package/dist/Message.js +5 -2
  131. package/dist/{Modal-ZFWNFEA5.css → Modal-UI2FXNDR.css} +29 -18
  132. package/dist/Modal.cjs +7 -4
  133. package/dist/Modal.d.cts +13 -2
  134. package/dist/Modal.d.ts +13 -2
  135. package/dist/Modal.js +6 -3
  136. package/dist/Pagination-POJTWMYR.css +70 -0
  137. package/dist/Pagination.cjs +11 -8
  138. package/dist/Pagination.d.cts +2 -2
  139. package/dist/Pagination.d.ts +2 -2
  140. package/dist/Pagination.js +10 -7
  141. package/dist/{Popover-Y3LDCJPW.css → Popover-LCXLR3EU.css} +13 -14
  142. package/dist/Popover.cjs +6 -3
  143. package/dist/Popover.d.cts +3 -10
  144. package/dist/Popover.d.ts +3 -10
  145. package/dist/Popover.js +5 -2
  146. package/dist/Progress-33WE2NI7.css +90 -0
  147. package/dist/Progress.cjs +4 -2
  148. package/dist/Progress.d.cts +4 -2
  149. package/dist/Progress.d.ts +4 -2
  150. package/dist/Progress.js +3 -1
  151. package/dist/{Radio-IQKASYDF.css → Radio-RL7232MZ.css} +21 -13
  152. package/dist/Radio.cjs +5 -3
  153. package/dist/Radio.d.cts +18 -5
  154. package/dist/Radio.d.ts +18 -5
  155. package/dist/Radio.js +3 -1
  156. package/dist/{Select-YZ2NUJSX.css → Select-TU37MAHZ.css} +64 -40
  157. package/dist/Select.cjs +10 -7
  158. package/dist/Select.d.cts +24 -3
  159. package/dist/Select.d.ts +24 -3
  160. package/dist/Select.js +9 -6
  161. package/dist/{Skeleton-CVWH2VWN.css → Skeleton-FMFE3BRI.css} +9 -4
  162. package/dist/Skeleton.cjs +4 -2
  163. package/dist/Skeleton.d.cts +2 -4
  164. package/dist/Skeleton.d.ts +2 -4
  165. package/dist/Skeleton.js +3 -1
  166. package/dist/Slider-FZ5MI4X2.css +145 -0
  167. package/dist/Slider.cjs +4 -2
  168. package/dist/Slider.d.cts +6 -5
  169. package/dist/Slider.d.ts +6 -5
  170. package/dist/Slider.js +3 -1
  171. package/dist/{Spin-GONGPV4Q.css → Spin-F5YIEENO.css} +15 -9
  172. package/dist/Spin.cjs +4 -2
  173. package/dist/Spin.d.cts +2 -2
  174. package/dist/Spin.d.ts +2 -2
  175. package/dist/Spin.js +3 -1
  176. package/dist/{Splitter-DHNOY4NC.css → Splitter-IQ3PFIKK.css} +4 -4
  177. package/dist/Splitter.cjs +4 -2
  178. package/dist/Splitter.d.cts +8 -12
  179. package/dist/Splitter.d.ts +8 -12
  180. package/dist/Splitter.js +3 -1
  181. package/dist/{StatusBar-FJKEEPXU.css → StatusBar-TCGR3LXP.css} +23 -9
  182. package/dist/StatusBar.cjs +5 -3
  183. package/dist/StatusBar.d.cts +5 -17
  184. package/dist/StatusBar.d.ts +5 -17
  185. package/dist/StatusBar.js +3 -1
  186. package/dist/{Surface-UDDN3DGL.css → Surface-CTN775GD.css} +10 -10
  187. package/dist/Surface.cjs +6 -5
  188. package/dist/Surface.d.cts +10 -1
  189. package/dist/Surface.d.ts +10 -1
  190. package/dist/Surface.js +4 -3
  191. package/dist/{Switch-COAQIOMH.css → Switch-TATU3LPB.css} +16 -8
  192. package/dist/Switch.cjs +4 -2
  193. package/dist/Switch.d.cts +10 -4
  194. package/dist/Switch.d.ts +10 -4
  195. package/dist/Switch.js +3 -1
  196. package/dist/{Table-IWHIIGRJ.css → Table-W4HPZ7MZ.css} +78 -53
  197. package/dist/Table.cjs +14 -10
  198. package/dist/Table.d.cts +32 -3
  199. package/dist/Table.d.ts +32 -3
  200. package/dist/Table.js +13 -9
  201. package/dist/{TablePro-3NGWERWT.css → TablePro-WYE6TXWJ.css} +5 -5
  202. package/dist/TablePro.cjs +15 -11
  203. package/dist/TablePro.d.cts +1 -0
  204. package/dist/TablePro.d.ts +1 -0
  205. package/dist/TablePro.js +14 -10
  206. package/dist/{Tabs-X5U5PCPV.css → Tabs-A3IG6UZ6.css} +10 -10
  207. package/dist/Tabs.cjs +4 -2
  208. package/dist/Tabs.d.cts +2 -2
  209. package/dist/Tabs.d.ts +2 -2
  210. package/dist/Tabs.js +3 -1
  211. package/dist/Tag-5GIZLRAH.css +42 -0
  212. package/dist/Tag.cjs +5 -3
  213. package/dist/Tag.d.cts +2 -2
  214. package/dist/Tag.d.ts +2 -2
  215. package/dist/Tag.js +4 -2
  216. package/dist/{Textarea-YHWKHIFE.css → Textarea-ZGHBZNLX.css} +10 -10
  217. package/dist/Textarea.cjs +6 -4
  218. package/dist/Textarea.d.cts +2 -4
  219. package/dist/Textarea.d.ts +2 -4
  220. package/dist/Textarea.js +4 -2
  221. package/dist/Theme-CLedeJ_C.d.ts +193 -0
  222. package/dist/Theme-uQq2B0Yk.d.cts +193 -0
  223. package/dist/Theme.cjs +57 -11
  224. package/dist/Theme.d.cts +26 -145
  225. package/dist/Theme.d.ts +26 -145
  226. package/dist/Theme.js +3 -1
  227. package/dist/{ThemePanel-TEHB2JCQ.css → ThemePanel-EHNAS4RN.css} +52 -52
  228. package/dist/ThemePanel.cjs +17 -15
  229. package/dist/ThemePanel.d.cts +3 -13
  230. package/dist/ThemePanel.d.ts +3 -13
  231. package/dist/ThemePanel.js +14 -12
  232. package/dist/{TimePicker-ZBJOXH3U.css → TimePicker-WJ3FSK6A.css} +17 -17
  233. package/dist/TimePicker.cjs +10 -7
  234. package/dist/TimePicker.d.cts +2 -8
  235. package/dist/TimePicker.d.ts +2 -8
  236. package/dist/TimePicker.js +9 -6
  237. package/dist/{Timeline-CRFZ3I2W.css → Timeline-FUFO2UGY.css} +28 -13
  238. package/dist/Timeline.cjs +5 -3
  239. package/dist/Timeline.d.cts +2 -7
  240. package/dist/Timeline.d.ts +2 -7
  241. package/dist/Timeline.js +4 -2
  242. package/dist/{Tooltip-5FSPJWLX.css → Tooltip-2EUNTOTW.css} +3 -3
  243. package/dist/Tooltip.cjs +6 -3
  244. package/dist/Tooltip.d.cts +2 -2
  245. package/dist/Tooltip.d.ts +2 -2
  246. package/dist/Tooltip.js +5 -2
  247. package/dist/{Typography-32QQLD4F.css → Typography-CQ2OZXQH.css} +105 -42
  248. package/dist/Typography.cjs +11 -8
  249. package/dist/Typography.d.cts +12 -36
  250. package/dist/Typography.d.ts +12 -36
  251. package/dist/Typography.js +6 -3
  252. package/dist/chunk-2A4GYSN4.js +294 -0
  253. package/dist/{chunk-QMX67CVT.cjs → chunk-2AUXUZ3Z.cjs} +56 -31
  254. package/dist/chunk-2BIOTRQC.js +40 -0
  255. package/dist/{chunk-A6O25EP2.js → chunk-2HIN5NFM.js} +14 -6
  256. package/dist/{chunk-I7TOBKJO.js → chunk-3DKFS44V.js} +84 -23
  257. package/dist/{chunk-E22OIVYP.js → chunk-3EHJ5QI3.js} +202 -69
  258. package/dist/{chunk-X5MYHDEQ.cjs → chunk-3EMWDDWK.cjs} +372 -117
  259. package/dist/chunk-3F424R5P.js +143 -0
  260. package/dist/chunk-3IZZBM56.js +269 -0
  261. package/dist/{chunk-DUFRASGO.js → chunk-3QXP2ZNP.js} +18 -23
  262. package/dist/{chunk-5QEI7GGA.cjs → chunk-434Y2JVW.cjs} +60 -27
  263. package/dist/{chunk-SOCYOUGM.js → chunk-4SKHRPDH.js} +168 -64
  264. package/dist/{chunk-L6GIV5DQ.cjs → chunk-56I6ZKGU.cjs} +40 -22
  265. package/dist/{chunk-R3DTXVP2.js → chunk-5AXNUX3J.js} +8 -5
  266. package/dist/chunk-5CZA33BK.cjs +229 -0
  267. package/dist/{chunk-6K5YI4ZE.js → chunk-62VV5COT.js} +16 -6
  268. package/dist/chunk-6DKPJ5LV.cjs +294 -0
  269. package/dist/{chunk-OTSDPQPV.js → chunk-6RQJXSWN.js} +50 -30
  270. package/dist/{chunk-V5KUC5VH.cjs → chunk-77HU7JWK.cjs} +40 -13
  271. package/dist/chunk-7QAVPVMW.js +180 -0
  272. package/dist/chunk-7VLAHOA7.cjs +191 -0
  273. package/dist/chunk-ALAG4ZUH.js +72 -0
  274. package/dist/chunk-ARUN2DMD.js +39 -0
  275. package/dist/chunk-AUO2YYHB.js +248 -0
  276. package/dist/{chunk-6MEOLYNQ.js → chunk-AURYNA6G.js} +6 -5
  277. package/dist/chunk-BIPOXOHP.cjs +287 -0
  278. package/dist/{chunk-V5SQOZPF.js → chunk-BJDQVVCG.js} +38 -20
  279. package/dist/{chunk-BVQOJKRX.js → chunk-BKW5PXEO.js} +115 -72
  280. package/dist/{chunk-UW57F3UO.cjs → chunk-D7YSY5RZ.cjs} +208 -75
  281. package/dist/chunk-DRDDQCDD.js +322 -0
  282. package/dist/chunk-DU2DSERH.js +190 -0
  283. package/dist/{chunk-PSQ3HNZP.cjs → chunk-E66PSVBU.cjs} +106 -19
  284. package/dist/{chunk-UGAN4BBW.js → chunk-EA3NZBCZ.js} +251 -125
  285. package/dist/chunk-EAUB6FEN.js +262 -0
  286. package/dist/chunk-EE5KXDRK.cjs +1223 -0
  287. package/dist/chunk-EE7IJ3MB.js +1 -0
  288. package/dist/{chunk-NXBFEIUX.cjs → chunk-ENFLP7SN.cjs} +255 -129
  289. package/dist/chunk-EUTK2ZRJ.cjs +61 -0
  290. package/dist/chunk-F7WUCOBP.cjs +828 -0
  291. package/dist/{chunk-YB3IWIOJ.cjs → chunk-FJB3243S.cjs} +18 -23
  292. package/dist/chunk-FKCPSVC4.cjs +188 -0
  293. package/dist/chunk-FMUHLIHB.cjs +94 -0
  294. package/dist/chunk-FY73C7JK.js +520 -0
  295. package/dist/{chunk-6EOSMK34.cjs → chunk-G5LCOBOT.cjs} +20 -1
  296. package/dist/{chunk-5ERD3W24.cjs → chunk-GFKWSDD6.cjs} +18 -8
  297. package/dist/{chunk-T2O4DTDE.cjs → chunk-GTFP7HA3.cjs} +58 -32
  298. package/dist/chunk-HQFKXTX6.js +60 -0
  299. package/dist/chunk-HSDMJUB6.cjs +319 -0
  300. package/dist/chunk-HVPUGYBY.js +166 -0
  301. package/dist/chunk-HYHBCHFM.cjs +167 -0
  302. package/dist/chunk-HYJSMFZA.cjs +2 -0
  303. package/dist/chunk-I4YPBAQ5.js +163 -0
  304. package/dist/{chunk-IPSNC5VZ.js → chunk-JHM7MN3G.js} +15 -7
  305. package/dist/{chunk-4ACCOYBY.cjs → chunk-JINKQT6H.cjs} +20 -8
  306. package/dist/{chunk-6Q76VLCE.cjs → chunk-JKUXA3U6.cjs} +50 -30
  307. package/dist/{chunk-D7GK6H6V.js → chunk-K5HGHOG7.js} +50 -21
  308. package/dist/chunk-KATJAJUU.js +78 -0
  309. package/dist/chunk-KCDOC3HS.cjs +100 -0
  310. package/dist/{chunk-M4NJTJKV.cjs → chunk-LDX6Q6RK.cjs} +8 -5
  311. package/dist/chunk-LEDESWNL.js +83 -0
  312. package/dist/chunk-LG62MPMU.cjs +213 -0
  313. package/dist/{chunk-7NTTRKNT.js → chunk-LJVQQEME.js} +54 -28
  314. package/dist/chunk-LOWTSOWT.js +199 -0
  315. package/dist/{chunk-FDZG27IG.js → chunk-LQMOYVQF.js} +57 -32
  316. package/dist/{chunk-P2OQTJZP.cjs → chunk-MCDW3VKZ.cjs} +17 -6
  317. package/dist/{chunk-BT2RXFT4.cjs → chunk-MUZQWIMR.cjs} +121 -78
  318. package/dist/chunk-NRJXZPZR.cjs +351 -0
  319. package/dist/chunk-O6G3F5L4.js +311 -0
  320. package/dist/{chunk-3VSHGM54.js → chunk-OLYSSZHP.js} +126 -68
  321. package/dist/{chunk-A4Z7PLHV.cjs → chunk-PIJV2FHO.cjs} +135 -77
  322. package/dist/{chunk-FYSXJXNW.js → chunk-PQOBBASY.js} +10 -9
  323. package/dist/chunk-Q565GDVK.cjs +205 -0
  324. package/dist/{chunk-FDUQPAQE.cjs → chunk-Q5HLC56A.cjs} +122 -28
  325. package/dist/chunk-QDCPVI3S.cjs +333 -0
  326. package/dist/{chunk-ZR4IMROK.js → chunk-QDMFXRPI.js} +122 -28
  327. package/dist/chunk-QDY56GGO.js +234 -0
  328. package/dist/{chunk-4KDABJSY.cjs → chunk-QNQSNVCU.cjs} +86 -25
  329. package/dist/chunk-QYPA77OI.cjs +55 -0
  330. package/dist/chunk-RAK6CENJ.js +83 -0
  331. package/dist/{chunk-BW76ENTW.cjs → chunk-RERMZNF3.cjs} +10 -9
  332. package/dist/chunk-RMGFRAZ2.cjs +270 -0
  333. package/dist/chunk-RPO7657K.js +228 -0
  334. package/dist/chunk-STQDKMS5.cjs +288 -0
  335. package/dist/{chunk-HG6YS4I7.js → chunk-SXLRWYQQ.js} +71 -24
  336. package/dist/{chunk-SW2HMNCA.cjs → chunk-T4RR6NVU.cjs} +17 -9
  337. package/dist/{chunk-6SPMHY54.js → chunk-TSL3F2K3.js} +20 -2
  338. package/dist/{chunk-BNY2NVTL.cjs → chunk-TYZ6L7E6.cjs} +48 -28
  339. package/dist/{chunk-MOZ52KN6.js → chunk-U3SG2YT2.js} +39 -12
  340. package/dist/{chunk-POU3W5J3.cjs → chunk-U5YYOOLC.cjs} +13 -6
  341. package/dist/chunk-U7VEPMCX.cjs +221 -0
  342. package/dist/chunk-UE4HFGJ6.js +264 -0
  343. package/dist/chunk-ULTDRMGN.js +1175 -0
  344. package/dist/{chunk-6HF6UF73.js → chunk-UQI4R32R.js} +368 -113
  345. package/dist/{chunk-MWEHU7YO.cjs → chunk-VA3JWOAB.cjs} +172 -68
  346. package/dist/chunk-VQEMMJHC.js +33 -0
  347. package/dist/{chunk-S2ZGXBUH.cjs → chunk-VVRXNGYL.cjs} +218 -42
  348. package/dist/{chunk-JMFHL7GN.cjs → chunk-VX6MZO4K.cjs} +100 -22
  349. package/dist/{chunk-2FOC3D6X.js → chunk-WMZV7PNO.js} +19 -7
  350. package/dist/{chunk-MYW7LNB2.cjs → chunk-WROF2PVG.cjs} +40 -21
  351. package/dist/chunk-XZXY3XCL.cjs +105 -0
  352. package/dist/chunk-Y22PTPA7.js +800 -0
  353. package/dist/chunk-Y2MT6PI6.js +207 -0
  354. package/dist/chunk-YAYSXZZZ.cjs +82 -0
  355. package/dist/{chunk-6LN4VVX7.js → chunk-YBGMTQ2V.js} +48 -28
  356. package/dist/{chunk-TYLDISRK.js → chunk-YKHIIC7M.js} +13 -6
  357. package/dist/{chunk-3VXGZ3SJ.js → chunk-YPMQC5HX.js} +57 -24
  358. package/dist/{chunk-UWL6DRZW.cjs → chunk-YUJ7Z6N2.cjs} +74 -27
  359. package/dist/{chunk-LEMMFFEY.cjs → chunk-ZEYK37VW.cjs} +15 -7
  360. package/dist/{chunk-ES7AWMNH.cjs → chunk-ZHVR4YPB.cjs} +6 -5
  361. package/dist/{chunk-MPOO5VPW.cjs → chunk-ZYIE3BH7.cjs} +50 -21
  362. package/dist/componentThemeTypes-Jt4B5aU8.d.cts +77 -0
  363. package/dist/componentThemeTypes-Jt4B5aU8.d.ts +77 -0
  364. package/dist/index.cjs +253 -206
  365. package/dist/index.d.cts +12 -10
  366. package/dist/index.d.ts +12 -10
  367. package/dist/index.js +56 -53
  368. package/dist/styles.css +1697 -692
  369. package/dist/{tokens-RYJ3DFTU.css → tokens-CEJVVA3G.css} +10 -0
  370. package/dist/tokens.css +10 -0
  371. package/docs/llms/appshell.md +9 -6
  372. package/docs/llms/autocomplete.md +8 -2
  373. package/docs/llms/avatar.md +2 -0
  374. package/docs/llms/badge.md +2 -0
  375. package/docs/llms/calendar.md +7 -2
  376. package/docs/llms/card.md +20 -1
  377. package/docs/llms/cascader.md +27 -5
  378. package/docs/llms/checkbox.md +13 -0
  379. package/docs/llms/collapse.md +13 -5
  380. package/docs/llms/colorpicker.md +4 -3
  381. package/docs/llms/commandpalette.md +10 -2
  382. package/docs/llms/contextmenu.md +14 -2
  383. package/docs/llms/datepicker.md +7 -0
  384. package/docs/llms/datetimepicker.md +7 -0
  385. package/docs/llms/drawer.md +20 -4
  386. package/docs/llms/form.md +5 -2
  387. package/docs/llms/icon.md +25 -1
  388. package/docs/llms/image.md +22 -1
  389. package/docs/llms/list.md +11 -0
  390. package/docs/llms/message.md +31 -8
  391. package/docs/llms/modal.md +20 -8
  392. package/docs/llms/pagination.md +12 -4
  393. package/docs/llms/popover.md +11 -1
  394. package/docs/llms/progress.md +1 -0
  395. package/docs/llms/radio.md +13 -0
  396. package/docs/llms/select.md +29 -2
  397. package/docs/llms/sidebar.md +24 -0
  398. package/docs/llms/slider.md +5 -2
  399. package/docs/llms/splitter.md +5 -2
  400. package/docs/llms/switch.md +13 -0
  401. package/docs/llms/table.md +7 -8
  402. package/docs/llms/theme.md +83 -28
  403. package/docs/llms/themepanel.md +1 -0
  404. package/docs/llms/titlebar.md +1 -0
  405. package/docs/llms/tooltip.md +7 -2
  406. package/docs/llms/typography.md +27 -3
  407. package/docs/llms/windowcontrols.md +11 -3
  408. package/docs/llms.md +2 -2
  409. package/package.json +212 -2
  410. package/dist/Avatar-TNPOHVY5.css +0 -40
  411. package/dist/Badge-DPGLV3D3.css +0 -22
  412. package/dist/Card-W3ATFUJW.css +0 -77
  413. package/dist/Cascader-ANEQUPMI.css +0 -150
  414. package/dist/Checkbox-EDNPZRIP.css +0 -42
  415. package/dist/List-LSMU5QAC.css +0 -26
  416. package/dist/Pagination-YSZSNFHG.css +0 -68
  417. package/dist/Progress-CZNXCYGW.css +0 -80
  418. package/dist/Slider-UM2IZZBH.css +0 -127
  419. package/dist/Tag-G2XWAL7A.css +0 -42
  420. package/dist/chunk-262ED6WQ.cjs +0 -88
  421. package/dist/chunk-4HJBF4GY.js +0 -218
  422. package/dist/chunk-4TTRHEGM.cjs +0 -217
  423. package/dist/chunk-5A6KSYWA.cjs +0 -67
  424. package/dist/chunk-5MOYKVB7.js +0 -192
  425. package/dist/chunk-7IO3EOHN.cjs +0 -200
  426. package/dist/chunk-7QXP6DXC.cjs +0 -129
  427. package/dist/chunk-AAPZLBHQ.js +0 -165
  428. package/dist/chunk-ARUPS7JH.js +0 -66
  429. package/dist/chunk-ATUPFAPZ.cjs +0 -76
  430. package/dist/chunk-CFZVWY5N.js +0 -178
  431. package/dist/chunk-DSLYWX4O.js +0 -25
  432. package/dist/chunk-EQ4FPOQQ.js +0 -253
  433. package/dist/chunk-FQJY4D3T.cjs +0 -47
  434. package/dist/chunk-GNV6W4BN.js +0 -495
  435. package/dist/chunk-HBO7ZDEQ.js +0 -29
  436. package/dist/chunk-I777JTTG.js +0 -150
  437. package/dist/chunk-IOAOG5L7.js +0 -191
  438. package/dist/chunk-IOUAZYK2.cjs +0 -116
  439. package/dist/chunk-IZHH6CVY.js +0 -123
  440. package/dist/chunk-JFL2WMJZ.js +0 -106
  441. package/dist/chunk-KMPFESEV.js +0 -41
  442. package/dist/chunk-KYV75JPQ.js +0 -147
  443. package/dist/chunk-N7OQNSII.cjs +0 -145
  444. package/dist/chunk-P64NPZBG.js +0 -113
  445. package/dist/chunk-PKNRTFNE.cjs +0 -526
  446. package/dist/chunk-PU7VXDAS.js +0 -64
  447. package/dist/chunk-RFI5R42I.cjs +0 -138
  448. package/dist/chunk-RMFSX7DO.cjs +0 -281
  449. package/dist/chunk-RR2BKV65.js +0 -39
  450. package/dist/chunk-RSSOX4RQ.cjs +0 -240
  451. package/dist/chunk-RZEFKXL3.cjs +0 -104
  452. package/dist/chunk-S7IHWY24.js +0 -81
  453. package/dist/chunk-SOQ56ZI2.cjs +0 -49
  454. package/dist/chunk-TBNPJPYG.cjs +0 -61
  455. package/dist/chunk-TJECLLN4.js +0 -344
  456. package/dist/chunk-ULUD3FED.cjs +0 -138
  457. package/dist/chunk-VA2I7ZAL.cjs +0 -190
  458. package/dist/chunk-VS3I5OKA.cjs +0 -214
  459. package/dist/chunk-WMGMIE2D.js +0 -113
  460. package/dist/chunk-X7XP6GEI.cjs +0 -63
  461. package/dist/chunk-XCXUGHDF.js +0 -91
  462. package/dist/chunk-YAFDVNXT.js +0 -27
  463. package/dist/chunk-ZD3L4V3H.js +0 -54
  464. package/dist/chunk-ZTCRD2FL.js +0 -45
@@ -0,0 +1,322 @@
1
+ import { useVisualThemeSnapshot, useComponentOverrides, subscribeImperativeThemeChange, useOwnerPortalTheme, resolveVisualThemeSnapshot, componentTokensToStyle, visualThemeToStyle, VisualThemeProvider, ComponentOverridesProvider, OwnerPortalThemeProvider, DEFAULT_THEME_COLORS } from './chunk-ULTDRMGN.js';
2
+ import * as React from 'react';
3
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
+
5
+ var useIsomorphicLayoutEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
6
+ var ACCENT_KEYS = /* @__PURE__ */ new Set([
7
+ "sky",
8
+ "coral",
9
+ "mint",
10
+ "violet",
11
+ "amber",
12
+ "rose"
13
+ ]);
14
+ var InternalComponentThemePartContext = React.createContext([]);
15
+ function InternalComponentThemePart({
16
+ components,
17
+ children
18
+ }) {
19
+ const inherited = React.useContext(InternalComponentThemePartContext);
20
+ const value = React.useMemo(() => {
21
+ const next = Array.isArray(components) ? components : [components];
22
+ return [...inherited, ...next];
23
+ }, [components, inherited]);
24
+ return /* @__PURE__ */ jsx(InternalComponentThemePartContext.Provider, { value, children });
25
+ }
26
+ var THEME_COLOR_VARIABLES = {
27
+ bg: "--bg",
28
+ bgRaised: "--bg-raised",
29
+ bgSunken: "--bg-sunken",
30
+ fg: "--fg",
31
+ fgMuted: "--fg-muted",
32
+ fgSubtle: "--fg-subtle",
33
+ border: "--border",
34
+ divider: "--divider",
35
+ shadowDark: "--shadow-dark",
36
+ shadowLight: "--shadow-light",
37
+ accent: "--accent",
38
+ accentInk: "--accent-ink",
39
+ accentSoft: "--accent-soft",
40
+ accentGlow: "--accent-glow",
41
+ info: "--info",
42
+ success: "--success",
43
+ warning: "--warning",
44
+ danger: "--danger"
45
+ };
46
+ function normalizeComponentThemeInput(theme) {
47
+ if (theme === void 0) return void 0;
48
+ if (typeof theme === "string") {
49
+ return ACCENT_KEYS.has(theme) ? { accent: theme } : { baseColor: theme };
50
+ }
51
+ return theme;
52
+ }
53
+ function mergeComponentTheme(inherited, own) {
54
+ if (!inherited && !own) return void 0;
55
+ return {
56
+ ...inherited,
57
+ ...own,
58
+ colors: { ...inherited?.colors ?? {}, ...own?.colors ?? {} },
59
+ tokens: { ...inherited?.tokens ?? {}, ...own?.tokens ?? {} },
60
+ components: own?.components
61
+ };
62
+ }
63
+ function hasExplicitIconForeground(config) {
64
+ if (!config) return false;
65
+ return config.baseColor !== void 0 || config.colorScheme !== void 0 || config.colors?.fg !== void 0 || config.tokens?.fg !== void 0 || config.tokens?.["--fg"] !== void 0 || config.tokens?.["--lmn-icon-fg"] !== void 0;
66
+ }
67
+ function getStaticColorScheme(rootElement) {
68
+ if (typeof document === "undefined") return "light";
69
+ const inheritedElement = rootElement?.parentElement ?? document.documentElement;
70
+ const themeScope = inheritedElement.closest("[data-theme]");
71
+ return themeScope?.dataset.theme === "dark" ? "dark" : "light";
72
+ }
73
+ function hasLocalStaticThemeScope(rootElement) {
74
+ if (!rootElement || typeof document === "undefined") return false;
75
+ const themeScope = rootElement.parentElement?.closest("[data-theme]");
76
+ return themeScope != null && themeScope !== document.documentElement && themeScope !== document.body;
77
+ }
78
+ function getFallbackSnapshot(rootElement) {
79
+ const colorScheme = getStaticColorScheme(rootElement);
80
+ return {
81
+ colorScheme,
82
+ intensity: 5,
83
+ colors: { ...DEFAULT_THEME_COLORS[colorScheme] }
84
+ };
85
+ }
86
+ function getDefaultSnapshot(rootElement) {
87
+ const fallback = getFallbackSnapshot(rootElement);
88
+ if (typeof window === "undefined" || typeof document === "undefined") {
89
+ return fallback;
90
+ }
91
+ const inheritedElement = rootElement?.parentElement ?? document.documentElement;
92
+ const computed = window.getComputedStyle(inheritedElement);
93
+ const colors = { ...fallback.colors };
94
+ for (const key of Object.keys(THEME_COLOR_VARIABLES)) {
95
+ const value = computed.getPropertyValue(THEME_COLOR_VARIABLES[key]).trim();
96
+ if (value) colors[key] = value;
97
+ }
98
+ const shadowDepth = Number.parseFloat(computed.getPropertyValue("--d"));
99
+ const intensity = Number.isFinite(shadowDepth) ? (shadowDepth - 0.4) / 0.12 : fallback.intensity;
100
+ return { ...fallback, intensity, colors };
101
+ }
102
+ function createInheritedTokenResetStyle(ownerStyle, cssPrefixes) {
103
+ const variablePrefixes = cssPrefixes.map((prefix) => `--lmn-${prefix}-`);
104
+ const style = {};
105
+ for (const property of Object.keys(ownerStyle)) {
106
+ if (variablePrefixes.some((prefix) => property.startsWith(prefix))) {
107
+ style[property] = "initial";
108
+ }
109
+ }
110
+ return style;
111
+ }
112
+ function useComponentThemeRootRef(forwardedRef, { component, theme }) {
113
+ const inheritedVisualTheme = useVisualThemeSnapshot();
114
+ const inheritedOverrides = useComponentOverrides();
115
+ const [rootState, setRootState] = React.useState({
116
+ element: null,
117
+ revision: 0
118
+ });
119
+ const mountedRootRef = React.useRef(null);
120
+ const tracksRootElement = React.useRef(false);
121
+ const shouldTrackConfiguredTheme = inheritedVisualTheme === null && (theme !== void 0 || inheritedOverrides[component] !== void 0);
122
+ const shouldDetectLocalStaticTheme = inheritedVisualTheme === null;
123
+ const rootRef = React.useCallback((node) => {
124
+ mountedRootRef.current = node;
125
+ const shouldTrackNode = node !== null && (shouldTrackConfiguredTheme || shouldDetectLocalStaticTheme && hasLocalStaticThemeScope(node));
126
+ if (shouldTrackNode) {
127
+ tracksRootElement.current = true;
128
+ setRootState((current) => current.element === node ? current : { element: node, revision: current.revision + 1 });
129
+ } else if (node !== null) {
130
+ tracksRootElement.current = false;
131
+ setRootState((current) => current.element === null ? current : { element: null, revision: current.revision + 1 });
132
+ } else {
133
+ tracksRootElement.current = false;
134
+ }
135
+ if (typeof forwardedRef === "function") forwardedRef(node);
136
+ else if (forwardedRef) forwardedRef.current = node;
137
+ }, [forwardedRef, shouldDetectLocalStaticTheme, shouldTrackConfiguredTheme]);
138
+ useIsomorphicLayoutEffect(() => {
139
+ if (!shouldDetectLocalStaticTheme) return;
140
+ return subscribeImperativeThemeChange((target) => {
141
+ const node = mountedRootRef.current;
142
+ if (!node || !target.contains(node)) return;
143
+ const shouldTrackNode = shouldTrackConfiguredTheme || hasLocalStaticThemeScope(node);
144
+ if (!shouldTrackNode && !tracksRootElement.current) return;
145
+ tracksRootElement.current = shouldTrackNode;
146
+ setRootState((current) => ({
147
+ element: shouldTrackNode ? node : null,
148
+ revision: current.revision + 1
149
+ }));
150
+ });
151
+ }, [shouldDetectLocalStaticTheme, shouldTrackConfiguredTheme]);
152
+ return [rootState.element, rootRef];
153
+ }
154
+ function ComponentThemeBoundary({
155
+ component,
156
+ cssPrefix,
157
+ theme,
158
+ rootElement,
159
+ children
160
+ }) {
161
+ const inheritedVisualTheme = useVisualThemeSnapshot();
162
+ const inheritedOwner = useOwnerPortalTheme();
163
+ const inheritedOverrides = useComponentOverrides();
164
+ const internalComponents = React.useContext(InternalComponentThemePartContext);
165
+ const own = normalizeComponentThemeInput(theme);
166
+ const override = inheritedOverrides[component];
167
+ const config = mergeComponentTheme(override, own);
168
+ const active = config !== void 0;
169
+ const scope = own?.scope ?? "self";
170
+ const cssPrefixes = Array.isArray(cssPrefix) ? cssPrefix : [cssPrefix];
171
+ const isOwnedInternalPart = internalComponents.includes(component);
172
+ const matchesInheritedCssPrefix = cssPrefixes.some(
173
+ (prefix) => inheritedOwner?.cssPrefixes.includes(prefix)
174
+ );
175
+ const shouldResetSelfTheme = !active && inheritedOwner !== null && !isOwnedInternalPart && (inheritedOwner?.component === component || matchesInheritedCssPrefix) && !inheritedOwner.subtree;
176
+ const hasLocalStaticTheme = inheritedVisualTheme === null && hasLocalStaticThemeScope(rootElement);
177
+ const inheritedSnapshot = inheritedVisualTheme ?? (shouldResetSelfTheme && inheritedOwner ? inheritedOwner.inheritedSnapshot : active || hasLocalStaticTheme ? getDefaultSnapshot(rootElement) : getFallbackSnapshot(rootElement));
178
+ const snapshot = active ? resolveVisualThemeSnapshot(config, inheritedSnapshot) : inheritedSnapshot;
179
+ const inheritedTokenResetStyle = shouldResetSelfTheme && inheritedOwner ? createInheritedTokenResetStyle(inheritedOwner.style, cssPrefixes) : {};
180
+ const prefixedStyle = active || shouldResetSelfTheme ? cssPrefixes.reduce((result, currentPrefix) => {
181
+ const prefix = `lmn-${currentPrefix}-`;
182
+ return {
183
+ ...result,
184
+ ...visualThemeToStyle(snapshot, prefix),
185
+ ...active ? componentTokensToStyle(config.tokens, prefix) : null
186
+ };
187
+ }, inheritedTokenResetStyle) : {};
188
+ const subtreeStyle = active && scope === "subtree" ? visualThemeToStyle(snapshot) : {};
189
+ const styles = override?.styles ?? {};
190
+ const rootStyle = {
191
+ ...styles.root ?? {},
192
+ ...prefixedStyle,
193
+ ...subtreeStyle
194
+ };
195
+ const rootDataAttributes = active || shouldResetSelfTheme ? active && scope === "subtree" ? {
196
+ "data-theme": snapshot.colorScheme,
197
+ "data-lumina-color-scheme": snapshot.colorScheme
198
+ } : { "data-lumina-color-scheme": snapshot.colorScheme } : {};
199
+ if (component === "Icon" && active && hasExplicitIconForeground(config)) {
200
+ rootDataAttributes["data-lumina-icon-color"] = "";
201
+ }
202
+ const shouldApplyPortalTheme = active || inheritedVisualTheme !== null || hasLocalStaticTheme;
203
+ const portalStyle = shouldApplyPortalTheme ? {
204
+ ...visualThemeToStyle(inheritedSnapshot),
205
+ ...prefixedStyle,
206
+ ...scope === "subtree" ? subtreeStyle : {}
207
+ } : {};
208
+ const portalDataAttributes = shouldApplyPortalTheme ? {
209
+ "data-theme": scope === "subtree" ? snapshot.colorScheme : inheritedSnapshot.colorScheme,
210
+ "data-lumina-color-scheme": snapshot.colorScheme
211
+ } : {};
212
+ const state = {
213
+ active,
214
+ scope,
215
+ snapshot,
216
+ rootStyle,
217
+ rootDataAttributes,
218
+ portalStyle,
219
+ portalDataAttributes,
220
+ styles
221
+ };
222
+ const consumedIndex = internalComponents.indexOf(component);
223
+ const remainingInternalComponents = isOwnedInternalPart ? [
224
+ ...internalComponents.slice(0, consumedIndex),
225
+ ...internalComponents.slice(consumedIndex + 1)
226
+ ] : internalComponents;
227
+ const ownerPortalTheme = active ? {
228
+ component,
229
+ cssPrefixes,
230
+ style: portalStyle,
231
+ colorScheme: snapshot.colorScheme,
232
+ inheritedColorScheme: inheritedSnapshot.colorScheme,
233
+ inheritedSnapshot,
234
+ subtree: scope === "subtree",
235
+ styles
236
+ } : shouldResetSelfTheme ? null : inheritedOwner;
237
+ const providedVisualTheme = active && scope === "subtree" ? snapshot : !active && hasLocalStaticTheme ? inheritedSnapshot : null;
238
+ return /* @__PURE__ */ jsx(VisualThemeProvider, { value: providedVisualTheme ?? inheritedVisualTheme, children: /* @__PURE__ */ jsx(ComponentOverridesProvider, { value: own?.components, children: /* @__PURE__ */ jsx(OwnerPortalThemeProvider, { value: ownerPortalTheme, children: /* @__PURE__ */ jsx(InternalComponentThemePartContext.Provider, { value: remainingInternalComponents, children: children(state) }) }) }) });
239
+ }
240
+ function mergeComponentRootStyleWithInstanceStyle(rootStyle, instanceStyle) {
241
+ if (!instanceStyle) return rootStyle;
242
+ const overrides = {};
243
+ const instanceRecord = instanceStyle;
244
+ for (const property of Object.keys(rootStyle)) {
245
+ if (Object.prototype.hasOwnProperty.call(instanceRecord, property)) {
246
+ overrides[property] = instanceRecord[property];
247
+ }
248
+ }
249
+ return { ...rootStyle, ...overrides };
250
+ }
251
+ function withInternalComponentThemePart(Component, components) {
252
+ const Wrapped = React.forwardRef(
253
+ (props, ref) => /* @__PURE__ */ jsx(InternalComponentThemePart, { components, children: React.createElement(Component, { ...props, ref }) })
254
+ );
255
+ Wrapped.displayName = `InternalThemePart(${typeof Component === "string" ? Component : Component.displayName ?? Component.name ?? "Component"})`;
256
+ return Wrapped;
257
+ }
258
+ function useComponentPortalTheme(component) {
259
+ const owner = useOwnerPortalTheme();
260
+ const inherited = useVisualThemeSnapshot();
261
+ const matchesOwner = owner && (Array.isArray(component) ? component.includes(owner.component) : owner.component === component);
262
+ if (matchesOwner && owner) {
263
+ return {
264
+ style: owner.style,
265
+ dataAttributes: {
266
+ "data-theme": owner.subtree ? owner.colorScheme : owner.inheritedColorScheme,
267
+ "data-lumina-color-scheme": owner.colorScheme
268
+ },
269
+ styles: owner.styles
270
+ };
271
+ }
272
+ if (!inherited) {
273
+ return { style: {}, dataAttributes: {}, styles: {} };
274
+ }
275
+ return {
276
+ style: visualThemeToStyle(inherited),
277
+ dataAttributes: {
278
+ "data-theme": inherited.colorScheme,
279
+ "data-lumina-color-scheme": inherited.colorScheme
280
+ },
281
+ styles: {}
282
+ };
283
+ }
284
+ function withComponentTheme(Component, component, cssPrefix = component.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), options = {}) {
285
+ const Wrapped = React.forwardRef((props, ref) => {
286
+ const { theme, style, ...rest } = props;
287
+ const [rootElement, rootRef] = useComponentThemeRootRef(
288
+ options.portalOnly ? void 0 : ref,
289
+ { component, theme }
290
+ );
291
+ const themedNode = /* @__PURE__ */ jsx(
292
+ ComponentThemeBoundary,
293
+ {
294
+ component,
295
+ cssPrefix,
296
+ theme,
297
+ rootElement,
298
+ children: (state) => React.createElement(Component, {
299
+ ...rest,
300
+ ...state.rootDataAttributes,
301
+ ref: options.portalOnly ? ref : rootRef,
302
+ style: { ...state.rootStyle, ...style }
303
+ })
304
+ }
305
+ );
306
+ if (!options.portalOnly) return themedNode;
307
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
308
+ /* @__PURE__ */ jsx(
309
+ "template",
310
+ {
311
+ ref: rootRef,
312
+ "data-lumina-theme-anchor": component
313
+ }
314
+ ),
315
+ themedNode
316
+ ] });
317
+ });
318
+ Wrapped.displayName = Component.displayName ?? component;
319
+ return Wrapped;
320
+ }
321
+
322
+ export { ComponentThemeBoundary, InternalComponentThemePart, mergeComponentRootStyleWithInstanceStyle, normalizeComponentThemeInput, useComponentPortalTheme, useComponentThemeRootRef, withComponentTheme, withInternalComponentThemePart };
@@ -0,0 +1,190 @@
1
+ import { cloneLuminaThemePreset } from './chunk-TSL3F2K3.js';
2
+ import { normalizeComponentThemeInput, useComponentThemeRootRef, ComponentThemeBoundary } from './chunk-DRDDQCDD.js';
3
+ import { useThemeOptional, mergeComponentThemeOverrides, ComponentOverridesProvider, ThemeProvider } from './chunk-ULTDRMGN.js';
4
+ import './tokens-CEJVVA3G.css';
5
+ import './shared-NJHRNLRH.css';
6
+ import './Surface-CTN775GD.css';
7
+ import * as React from 'react';
8
+ import { jsx } from 'react/jsx-runtime';
9
+
10
+ function createSurfaceThemePreset(key) {
11
+ const preset = cloneLuminaThemePreset(key);
12
+ delete preset.density;
13
+ delete preset.font;
14
+ delete preset.label;
15
+ delete preset.description;
16
+ return preset;
17
+ }
18
+ var SURFACE_THEME_PRESETS = {
19
+ mist: createSurfaceThemePreset("light"),
20
+ porcelain: createSurfaceThemePreset("porcelain"),
21
+ graphite: createSurfaceThemePreset("graphite"),
22
+ ember: createSurfaceThemePreset("ember")
23
+ };
24
+ var surfacePresetMap = SURFACE_THEME_PRESETS;
25
+ var isDefined = (value) => value !== void 0;
26
+ var Surface = React.forwardRef(
27
+ ({
28
+ preset = "inherit",
29
+ tone = "base",
30
+ variant = "plain",
31
+ padding = "md",
32
+ radius = "lg",
33
+ height = "content",
34
+ bordered,
35
+ scrollable,
36
+ mode,
37
+ colorScheme,
38
+ accent,
39
+ baseColor,
40
+ density,
41
+ intensity,
42
+ themeRadius,
43
+ font,
44
+ tokens,
45
+ colors,
46
+ components,
47
+ theme,
48
+ themes,
49
+ className = "",
50
+ children,
51
+ style,
52
+ ...rest
53
+ }, ref) => {
54
+ const inherited = useThemeOptional();
55
+ const normalizedTheme = normalizeComponentThemeInput(theme);
56
+ const presetConfig = preset === "inherit" ? void 0 : surfacePresetMap[preset];
57
+ const effectiveSurfaceMode = mode ?? colorScheme ?? normalizedTheme?.colorScheme ?? presetConfig?.base ?? inherited?.mode ?? "light";
58
+ const [systemDark, setSystemDark] = React.useState(
59
+ () => typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches
60
+ );
61
+ React.useEffect(() => {
62
+ if (effectiveSurfaceMode !== "system" || typeof window === "undefined") return;
63
+ const media = window.matchMedia("(prefers-color-scheme: dark)");
64
+ setSystemDark(media.matches);
65
+ const handleChange = (event) => setSystemDark(event.matches);
66
+ media.addEventListener?.("change", handleChange);
67
+ return () => media.removeEventListener?.("change", handleChange);
68
+ }, [effectiveSurfaceMode]);
69
+ const registeredModePreset = effectiveSurfaceMode != null && effectiveSurfaceMode !== "light" && effectiveSurfaceMode !== "dark" && effectiveSurfaceMode !== "system" ? themes?.[effectiveSurfaceMode] ?? inherited?.themes[effectiveSurfaceMode] : void 0;
70
+ const localComponents = mergeComponentThemeOverrides(
71
+ normalizedTheme?.components,
72
+ components
73
+ );
74
+ const hasLocalComponentPalette = normalizedTheme != null && [
75
+ normalizedTheme.baseColor,
76
+ normalizedTheme.colorScheme,
77
+ normalizedTheme.accent,
78
+ normalizedTheme.intensity,
79
+ normalizedTheme.colors,
80
+ normalizedTheme.tokens
81
+ ].some(isDefined);
82
+ const usesLocalTheme = preset !== "inherit" || isDefined(mode) || isDefined(colorScheme) || isDefined(accent) || isDefined(baseColor) || isDefined(density) || isDefined(intensity) || isDefined(themeRadius) || isDefined(font) || isDefined(tokens) || isDefined(colors) || hasLocalComponentPalette || isDefined(themes);
83
+ const modeBaseColorScheme = effectiveSurfaceMode === "light" || effectiveSurfaceMode === "dark" ? effectiveSurfaceMode : effectiveSurfaceMode === "system" ? systemDark ? "dark" : "light" : void 0;
84
+ const localSurfaceColorScheme = modeBaseColorScheme ?? colorScheme ?? normalizedTheme?.colorScheme ?? presetConfig?.base ?? registeredModePreset?.base;
85
+ const hasLocalSurfacePalette = presetConfig != null || registeredModePreset != null || mode === "light" || mode === "dark" || [
86
+ colorScheme,
87
+ accent,
88
+ baseColor,
89
+ intensity,
90
+ tokens,
91
+ colors
92
+ ].some(isDefined) || hasLocalComponentPalette;
93
+ const localSurfaceTheme = hasLocalSurfacePalette ? {
94
+ colorScheme: localSurfaceColorScheme,
95
+ baseColor: baseColor ?? normalizedTheme?.baseColor ?? presetConfig?.baseColor ?? registeredModePreset?.baseColor,
96
+ accent: accent ?? normalizedTheme?.accent ?? presetConfig?.accent ?? registeredModePreset?.accent,
97
+ intensity: intensity ?? normalizedTheme?.intensity ?? presetConfig?.intensity ?? registeredModePreset?.intensity,
98
+ tokens: {
99
+ ...registeredModePreset?.tokens ?? {},
100
+ ...presetConfig?.tokens ?? {},
101
+ ...normalizedTheme?.tokens ?? {},
102
+ ...tokens ?? {}
103
+ },
104
+ colors: {
105
+ ...registeredModePreset?.colors ?? {},
106
+ ...presetConfig?.colors ?? {},
107
+ ...normalizedTheme?.colors ?? {},
108
+ ...colors ?? {}
109
+ },
110
+ scope: "self"
111
+ } : void 0;
112
+ const [themeRootElement, themeRootRef] = useComponentThemeRootRef(
113
+ ref,
114
+ { component: "Surface", theme: localSurfaceTheme }
115
+ );
116
+ const cls = [
117
+ "surface",
118
+ `tone-${tone}`,
119
+ variant,
120
+ `pad-${padding}`,
121
+ `radius-${radius}`,
122
+ `height-${height}`,
123
+ bordered && "bordered",
124
+ scrollable && "scrollable",
125
+ className
126
+ ].filter(Boolean).join(" ");
127
+ return /* @__PURE__ */ jsx(
128
+ ComponentThemeBoundary,
129
+ {
130
+ component: "Surface",
131
+ cssPrefix: "surface",
132
+ theme: localSurfaceTheme,
133
+ rootElement: themeRootElement,
134
+ children: (themeState) => {
135
+ const surfaceNode = /* @__PURE__ */ jsx(
136
+ "div",
137
+ {
138
+ ref: themeRootRef,
139
+ className: cls,
140
+ "data-surface-preset": preset === "inherit" ? void 0 : preset,
141
+ "data-surface-tone": tone,
142
+ ...themeState.rootDataAttributes,
143
+ ...rest,
144
+ style: { ...themeState.rootStyle, ...style },
145
+ children
146
+ }
147
+ );
148
+ return /* @__PURE__ */ jsx(ComponentOverridesProvider, { value: localComponents, children: /* @__PURE__ */ jsx(
149
+ ThemeProvider,
150
+ {
151
+ enabled: usesLocalTheme,
152
+ target: "scope",
153
+ asChild: true,
154
+ mode: effectiveSurfaceMode,
155
+ colorScheme: localSurfaceColorScheme ?? inherited?.colorScheme ?? "light",
156
+ baseColor: baseColor ?? normalizedTheme?.baseColor ?? presetConfig?.baseColor,
157
+ accent: accent ?? normalizedTheme?.accent ?? presetConfig?.accent,
158
+ density: density ?? presetConfig?.density ?? registeredModePreset?.density ?? inherited?.density ?? "comfortable",
159
+ intensity: intensity ?? normalizedTheme?.intensity ?? presetConfig?.intensity ?? registeredModePreset?.intensity ?? inherited?.intensity ?? 5,
160
+ radius: themeRadius ?? presetConfig?.radius ?? registeredModePreset?.radius ?? inherited?.radius ?? 20,
161
+ font: font ?? presetConfig?.font ?? registeredModePreset?.font ?? inherited?.font ?? "sf",
162
+ tokens: {
163
+ ...presetConfig?.tokens ?? {},
164
+ ...normalizedTheme?.tokens ?? {},
165
+ ...tokens ?? {}
166
+ },
167
+ colors: {
168
+ ...presetConfig?.colors ?? {},
169
+ ...normalizedTheme?.colors ?? {},
170
+ ...colors ?? {}
171
+ },
172
+ components: mergeComponentThemeOverrides(
173
+ presetConfig?.components,
174
+ localComponents
175
+ ),
176
+ themes: {
177
+ ...inherited?.themes ?? {},
178
+ ...themes ?? {}
179
+ },
180
+ children: surfaceNode
181
+ }
182
+ ) });
183
+ }
184
+ }
185
+ );
186
+ }
187
+ );
188
+ Surface.displayName = "Surface";
189
+
190
+ export { SURFACE_THEME_PRESETS, Surface };