@fangxinyan/lumina 0.6.18 → 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 (462) 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-NISJRUWX.css → Image-CZJPPURT.css} +25 -23
  107. package/dist/Image.cjs +10 -7
  108. package/dist/Image.d.cts +5 -24
  109. package/dist/Image.d.ts +5 -24
  110. package/dist/Image.js +6 -3
  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-HSAJUEO7.cjs → chunk-F7WUCOBP.cjs} +150 -86
  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-5VOUUQF5.js → chunk-Y22PTPA7.js} +145 -81
  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 +11 -9
  366. package/dist/index.d.ts +11 -9
  367. package/dist/index.js +56 -53
  368. package/dist/styles.css +1628 -701
  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 +3 -3
  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-FQJY4D3T.cjs +0 -47
  433. package/dist/chunk-GNV6W4BN.js +0 -495
  434. package/dist/chunk-HBO7ZDEQ.js +0 -29
  435. package/dist/chunk-I777JTTG.js +0 -150
  436. package/dist/chunk-IOAOG5L7.js +0 -191
  437. package/dist/chunk-IOUAZYK2.cjs +0 -116
  438. package/dist/chunk-IZHH6CVY.js +0 -123
  439. package/dist/chunk-JFL2WMJZ.js +0 -106
  440. package/dist/chunk-KMPFESEV.js +0 -41
  441. package/dist/chunk-KYV75JPQ.js +0 -147
  442. package/dist/chunk-N7OQNSII.cjs +0 -145
  443. package/dist/chunk-P64NPZBG.js +0 -113
  444. package/dist/chunk-PKNRTFNE.cjs +0 -526
  445. package/dist/chunk-PU7VXDAS.js +0 -64
  446. package/dist/chunk-RFI5R42I.cjs +0 -138
  447. package/dist/chunk-RR2BKV65.js +0 -39
  448. package/dist/chunk-RSSOX4RQ.cjs +0 -240
  449. package/dist/chunk-RZEFKXL3.cjs +0 -104
  450. package/dist/chunk-S7IHWY24.js +0 -81
  451. package/dist/chunk-SOQ56ZI2.cjs +0 -49
  452. package/dist/chunk-TBNPJPYG.cjs +0 -61
  453. package/dist/chunk-TJECLLN4.js +0 -344
  454. package/dist/chunk-ULUD3FED.cjs +0 -138
  455. package/dist/chunk-VA2I7ZAL.cjs +0 -190
  456. package/dist/chunk-VS3I5OKA.cjs +0 -214
  457. package/dist/chunk-WMGMIE2D.js +0 -113
  458. package/dist/chunk-X7XP6GEI.cjs +0 -63
  459. package/dist/chunk-XCXUGHDF.js +0 -91
  460. package/dist/chunk-YAFDVNXT.js +0 -27
  461. package/dist/chunk-ZD3L4V3H.js +0 -54
  462. package/dist/chunk-ZTCRD2FL.js +0 -45
@@ -0,0 +1,143 @@
1
+ import { Icon } from './chunk-LQMOYVQF.js';
2
+ import { useComponentThemeRootRef, ComponentThemeBoundary, mergeComponentRootStyleWithInstanceStyle } from './chunk-DRDDQCDD.js';
3
+ import './tokens-CEJVVA3G.css';
4
+ import './shared-NJHRNLRH.css';
5
+ import './Textarea-ZGHBZNLX.css';
6
+ import * as React from 'react';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+
9
+ // src/utils/inputEvents.ts
10
+ function createValueOverrideTarget(element, value) {
11
+ if (!element) return { value };
12
+ return new Proxy(element, {
13
+ get(target, property) {
14
+ if (property === "value") return value;
15
+ const result = Reflect.get(target, property, target);
16
+ return typeof result === "function" ? result.bind(target) : result;
17
+ }
18
+ });
19
+ }
20
+ var TextareaBase = React.forwardRef(
21
+ ({
22
+ value,
23
+ defaultValue,
24
+ onChange,
25
+ onValueChange,
26
+ invalid,
27
+ allowClear,
28
+ maxLength,
29
+ showCount,
30
+ className = "",
31
+ theme,
32
+ style,
33
+ ...rest
34
+ }, ref) => {
35
+ const [inner, setInner] = React.useState(defaultValue ?? "");
36
+ const [themeRootElement, themeRootRef] = useComponentThemeRootRef(
37
+ void 0,
38
+ { component: "Textarea", theme }
39
+ );
40
+ const textareaRef = React.useRef(null);
41
+ const isControlled = value !== void 0;
42
+ const currentValue = isControlled ? value : inner;
43
+ const disabled = rest.disabled;
44
+ const handleChange = (e) => {
45
+ if (!isControlled) setInner(e.target.value);
46
+ onChange?.(e);
47
+ onValueChange?.(e.target.value, e);
48
+ };
49
+ const setTextareaRef = React.useCallback((node) => {
50
+ textareaRef.current = node;
51
+ if (typeof ref === "function") ref(node);
52
+ else if (ref) ref.current = node;
53
+ }, [ref]);
54
+ const handleClear = (e) => {
55
+ e.stopPropagation();
56
+ if (disabled) return;
57
+ if (!isControlled) setInner("");
58
+ if (!isControlled && textareaRef.current) textareaRef.current.value = "";
59
+ const clearedTarget = createValueOverrideTarget(textareaRef.current, "");
60
+ const synthetic = {
61
+ ...e,
62
+ type: "change",
63
+ target: clearedTarget,
64
+ currentTarget: clearedTarget
65
+ };
66
+ onChange?.(synthetic);
67
+ onValueChange?.("", synthetic);
68
+ };
69
+ const cls = ["textarea", invalid && "invalid", className].filter(Boolean).join(" ");
70
+ const showClear = !!allowClear && !!currentValue && !disabled;
71
+ const count = currentValue ? currentValue.length : 0;
72
+ return /* @__PURE__ */ jsx(
73
+ ComponentThemeBoundary,
74
+ {
75
+ component: "Textarea",
76
+ cssPrefix: "textarea",
77
+ theme,
78
+ rootElement: themeRootElement,
79
+ children: (themeState) => {
80
+ const mergedRootStyle = mergeComponentRootStyleWithInstanceStyle(
81
+ themeState.rootStyle,
82
+ style
83
+ );
84
+ const field = /* @__PURE__ */ jsxs(
85
+ "div",
86
+ {
87
+ ref: showCount ? void 0 : themeRootRef,
88
+ className: "textarea-wrap",
89
+ ...!showCount ? themeState.rootDataAttributes : null,
90
+ style: showCount ? themeState.styles.control : mergedRootStyle,
91
+ children: [
92
+ /* @__PURE__ */ jsx(
93
+ "textarea",
94
+ {
95
+ ref: setTextareaRef,
96
+ className: cls,
97
+ value: isControlled ? value : void 0,
98
+ defaultValue: isControlled ? void 0 : defaultValue,
99
+ onChange: handleChange,
100
+ maxLength,
101
+ ...rest,
102
+ style: { ...themeState.styles.input, ...style }
103
+ }
104
+ ),
105
+ showClear && /* @__PURE__ */ jsx(
106
+ "button",
107
+ {
108
+ type: "button",
109
+ className: "textarea-clear",
110
+ role: "button",
111
+ "aria-label": "Clear",
112
+ onMouseDown: (e) => e.preventDefault(),
113
+ onClick: handleClear,
114
+ children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 12 })
115
+ }
116
+ )
117
+ ]
118
+ }
119
+ );
120
+ if (!showCount) return field;
121
+ return /* @__PURE__ */ jsxs(
122
+ "div",
123
+ {
124
+ ref: themeRootRef,
125
+ className: "textarea-shell",
126
+ ...themeState.rootDataAttributes,
127
+ style: mergedRootStyle,
128
+ children: [
129
+ field,
130
+ /* @__PURE__ */ jsx("div", { className: "textarea-count", style: themeState.styles.count, children: maxLength != null ? `${count} / ${maxLength}` : `${count}` })
131
+ ]
132
+ }
133
+ );
134
+ }
135
+ }
136
+ );
137
+ }
138
+ );
139
+ TextareaBase.displayName = "Textarea";
140
+ var Textarea = TextareaBase;
141
+ var TextArea = Textarea;
142
+
143
+ export { TextArea, Textarea, createValueOverrideTarget };
@@ -0,0 +1,269 @@
1
+ import { useOverlayZIndex, useOverlayLayer } from './chunk-2A4GYSN4.js';
2
+ import { useComponentPortalTheme, withComponentTheme } from './chunk-DRDDQCDD.js';
3
+ import { usePortalContainer } from './chunk-ULTDRMGN.js';
4
+ import './tokens-CEJVVA3G.css';
5
+ import './shared-NJHRNLRH.css';
6
+ import './ContextMenu-NG524Y2P.css';
7
+ import * as React from 'react';
8
+ import ReactDOM from 'react-dom';
9
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
+
11
+ var ESTIMATED_ITEM_H = 32;
12
+ var MARGIN = 8;
13
+ var KEYBOARD_TRIGGER_SELECTOR = [
14
+ "a[href]",
15
+ "button:not([disabled])",
16
+ "input:not([disabled])",
17
+ "select:not([disabled])",
18
+ "textarea:not([disabled])",
19
+ "[tabindex]:not([tabindex='-1'])",
20
+ "[contenteditable='true']"
21
+ ].join(",");
22
+ var ContextMenuBase = React.forwardRef((props, ref) => {
23
+ const hasExplicitMinWidth = props.minWidth !== void 0;
24
+ const {
25
+ items,
26
+ children,
27
+ disabled,
28
+ minWidth = 180,
29
+ className = "",
30
+ style,
31
+ onContextMenu,
32
+ onKeyDown,
33
+ tabIndex,
34
+ ...rest
35
+ } = props;
36
+ const portalContainer = usePortalContainer();
37
+ const portalTheme = useComponentPortalTheme("ContextMenu");
38
+ const [open, setOpen] = React.useState(false);
39
+ const [pos, setPos] = React.useState({ top: 0, left: 0 });
40
+ const [active, setActive] = React.useState(-1);
41
+ const [useWrapperKeyboardFallback, setUseWrapperKeyboardFallback] = React.useState(false);
42
+ const menuRef = React.useRef(null);
43
+ const triggerRef = React.useRef(null);
44
+ const returnFocusRef = React.useRef(null);
45
+ const overlayZIndex = useOverlayZIndex(open);
46
+ const isSelectable = React.useCallback(
47
+ (i) => i.type !== "divider" && !i.disabled,
48
+ []
49
+ );
50
+ const close = React.useCallback(() => setOpen(false), []);
51
+ const closeAndRestoreFocus = React.useCallback(() => {
52
+ close();
53
+ window.requestAnimationFrame(() => {
54
+ if (returnFocusRef.current?.isConnected) returnFocusRef.current.focus();
55
+ });
56
+ }, [close]);
57
+ React.useEffect(() => {
58
+ if (disabled && open) closeAndRestoreFocus();
59
+ }, [closeAndRestoreFocus, disabled, open]);
60
+ useOverlayLayer({
61
+ open: open && portalContainer != null,
62
+ containerRef: menuRef,
63
+ ownerRef: triggerRef,
64
+ zIndex: overlayZIndex,
65
+ onEscape: closeAndRestoreFocus
66
+ });
67
+ React.useLayoutEffect(() => {
68
+ const wrapper = triggerRef.current;
69
+ if (!wrapper || disabled) {
70
+ setUseWrapperKeyboardFallback(false);
71
+ return;
72
+ }
73
+ if (wrapper.querySelector(KEYBOARD_TRIGGER_SELECTOR)) {
74
+ setUseWrapperKeyboardFallback(false);
75
+ return;
76
+ }
77
+ const HTMLElementConstructor = wrapper.ownerDocument.defaultView?.HTMLElement;
78
+ const candidate = Array.from(wrapper.children).find(
79
+ (child) => !!HTMLElementConstructor && child instanceof HTMLElementConstructor && !child.hasAttribute("tabindex") && !child.matches("button:disabled,input:disabled,select:disabled,textarea:disabled")
80
+ );
81
+ if (!candidate) {
82
+ setUseWrapperKeyboardFallback(true);
83
+ return;
84
+ }
85
+ setUseWrapperKeyboardFallback(false);
86
+ candidate.setAttribute("tabindex", "0");
87
+ return () => {
88
+ if (candidate.getAttribute("tabindex") === "0") candidate.removeAttribute("tabindex");
89
+ };
90
+ }, [children, disabled]);
91
+ const openAt = (clientX, clientY) => {
92
+ returnFocusRef.current = document.activeElement;
93
+ const vw = window.innerWidth;
94
+ const vh = window.innerHeight;
95
+ const estH = Math.min(items.length * ESTIMATED_ITEM_H + 16, vh - MARGIN * 2);
96
+ const estW = minWidth;
97
+ const left = Math.min(clientX, vw - estW - MARGIN);
98
+ const top = Math.min(clientY, vh - estH - MARGIN);
99
+ setPos({ top: Math.max(MARGIN, top), left: Math.max(MARGIN, left) });
100
+ const firstIdx = items.findIndex(isSelectable);
101
+ setActive(firstIdx);
102
+ setOpen(true);
103
+ };
104
+ React.useEffect(() => {
105
+ if (!open) return;
106
+ const onOutside = (e) => {
107
+ if (!menuRef.current?.contains(e.target)) close();
108
+ };
109
+ const onBlur = () => close();
110
+ window.addEventListener("mousedown", onOutside);
111
+ window.addEventListener("scroll", close, true);
112
+ window.addEventListener("resize", close);
113
+ window.addEventListener("blur", onBlur);
114
+ return () => {
115
+ window.removeEventListener("mousedown", onOutside);
116
+ window.removeEventListener("scroll", close, true);
117
+ window.removeEventListener("resize", close);
118
+ window.removeEventListener("blur", onBlur);
119
+ };
120
+ }, [open, close]);
121
+ React.useEffect(() => {
122
+ if (!open || active < 0) return;
123
+ const frame = window.requestAnimationFrame(() => {
124
+ menuRef.current?.querySelector(`[data-context-index="${active}"]`)?.focus();
125
+ });
126
+ return () => window.cancelAnimationFrame(frame);
127
+ }, [open, active]);
128
+ React.useLayoutEffect(() => {
129
+ if (!open || !menuRef.current) return;
130
+ const rect = menuRef.current.getBoundingClientRect();
131
+ const vw = window.innerWidth;
132
+ const vh = window.innerHeight;
133
+ setPos((p) => ({
134
+ top: Math.min(p.top, Math.max(MARGIN, vh - rect.height - MARGIN)),
135
+ left: Math.min(p.left, Math.max(MARGIN, vw - rect.width - MARGIN))
136
+ }));
137
+ }, [open]);
138
+ const handleTriggerContextMenu = (e) => {
139
+ if (disabled || e.defaultPrevented) return;
140
+ e.preventDefault();
141
+ openAt(e.clientX, e.clientY);
142
+ };
143
+ const handleMenuKeyDown = (e) => {
144
+ if (e.key === "Tab") {
145
+ close();
146
+ return;
147
+ }
148
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
149
+ e.preventDefault();
150
+ setActive((current) => {
151
+ const direction = e.key === "ArrowDown" ? 1 : -1;
152
+ let index = current;
153
+ for (let count = 0; count < items.length; count += 1) {
154
+ index = (index + direction + items.length) % items.length;
155
+ if (isSelectable(items[index])) return index;
156
+ }
157
+ return current;
158
+ });
159
+ return;
160
+ }
161
+ if (e.key === "Home" || e.key === "End") {
162
+ e.preventDefault();
163
+ const indexes = items.map((item, index) => ({ item, index })).filter(({ item }) => isSelectable(item));
164
+ const target = e.key === "Home" ? indexes[0] : indexes[indexes.length - 1];
165
+ if (target) setActive(target.index);
166
+ return;
167
+ }
168
+ if (e.key === "Enter") {
169
+ const item = items[active];
170
+ if (!disabled && item && isSelectable(item)) {
171
+ e.preventDefault();
172
+ item.onSelect?.();
173
+ closeAndRestoreFocus();
174
+ }
175
+ }
176
+ };
177
+ const trigger = /* @__PURE__ */ jsx(
178
+ "span",
179
+ {
180
+ ref: (node) => {
181
+ triggerRef.current = node;
182
+ if (typeof ref === "function") ref(node);
183
+ else if (ref) ref.current = node;
184
+ },
185
+ className,
186
+ tabIndex: tabIndex ?? (useWrapperKeyboardFallback && !disabled ? 0 : void 0),
187
+ style: { display: useWrapperKeyboardFallback || tabIndex != null ? "inline-block" : "contents", ...style },
188
+ onContextMenu: (e) => {
189
+ onContextMenu?.(e);
190
+ handleTriggerContextMenu(e);
191
+ },
192
+ onKeyDown: (e) => {
193
+ onKeyDown?.(e);
194
+ if (e.defaultPrevented) return;
195
+ if (e.key === "ContextMenu" || e.shiftKey && e.key === "F10") {
196
+ e.preventDefault();
197
+ const target = e.target;
198
+ const rect = target.getBoundingClientRect();
199
+ openAt(rect.left + Math.min(12, rect.width / 2), rect.bottom);
200
+ }
201
+ },
202
+ ...rest,
203
+ children
204
+ }
205
+ );
206
+ const panel = open && portalContainer ? ReactDOM.createPortal(
207
+ /* @__PURE__ */ jsx(
208
+ "div",
209
+ {
210
+ ref: menuRef,
211
+ className: "context-menu",
212
+ role: "menu",
213
+ "aria-label": "\u4E0A\u4E0B\u6587\u83DC\u5355",
214
+ tabIndex: -1,
215
+ onKeyDown: handleMenuKeyDown,
216
+ ...portalTheme.dataAttributes,
217
+ style: {
218
+ position: "fixed",
219
+ top: pos.top,
220
+ left: pos.left,
221
+ ...portalTheme.style,
222
+ minWidth,
223
+ ...portalTheme.styles.popup,
224
+ ...hasExplicitMinWidth ? { minWidth } : null,
225
+ zIndex: overlayZIndex
226
+ },
227
+ onContextMenu: (e) => e.preventDefault(),
228
+ children: items.map(
229
+ (it, i) => it.type === "divider" ? /* @__PURE__ */ jsx("div", { className: "context-menu-divider", role: "separator" }, it.key) : /* @__PURE__ */ jsxs(
230
+ "button",
231
+ {
232
+ type: "button",
233
+ role: "menuitem",
234
+ "data-context-index": i,
235
+ tabIndex: active === i ? 0 : -1,
236
+ disabled: it.disabled,
237
+ className: `context-menu-item ${active === i ? "active" : ""} ${it.danger ? "danger" : ""}`,
238
+ onMouseEnter: () => isSelectable(it) && setActive(i),
239
+ onClick: () => {
240
+ if (disabled || !isSelectable(it)) return;
241
+ it.onSelect?.();
242
+ closeAndRestoreFocus();
243
+ },
244
+ children: [
245
+ /* @__PURE__ */ jsx("span", { className: "context-menu-icon", children: it.icon }),
246
+ /* @__PURE__ */ jsx("span", { className: "context-menu-label", children: it.label }),
247
+ it.shortcut && /* @__PURE__ */ jsx("span", { className: "context-menu-shortcut", children: it.shortcut })
248
+ ]
249
+ },
250
+ it.key
251
+ )
252
+ )
253
+ }
254
+ ),
255
+ portalContainer
256
+ ) : null;
257
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
258
+ trigger,
259
+ panel
260
+ ] });
261
+ });
262
+ ContextMenuBase.displayName = "ContextMenu";
263
+ var ContextMenu = withComponentTheme(
264
+ ContextMenuBase,
265
+ "ContextMenu",
266
+ "context-menu"
267
+ );
268
+
269
+ export { ContextMenu };
@@ -1,6 +1,7 @@
1
+ import { useOverlayZIndex } from './chunk-2A4GYSN4.js';
1
2
  import * as React from 'react';
2
3
 
3
- // src/utils/useFloating.ts
4
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
4
5
  function useFloating(opts) {
5
6
  const triggerRef = React.useRef(null);
6
7
  const floatingRef = React.useRef(null);
@@ -13,8 +14,9 @@ function useFloating(opts) {
13
14
  const matchW = !!opts.matchTriggerWidth;
14
15
  const align = opts.alignCross ?? "start";
15
16
  const open = opts.open;
17
+ const zIndex = useOverlayZIndex(open);
16
18
  const [state, setState] = React.useState({ top: 0, left: 0, placement: preferred });
17
- React.useLayoutEffect(() => {
19
+ useIsomorphicLayoutEffect(() => {
18
20
  if (!open) return;
19
21
  const update = () => {
20
22
  const el = triggerRef.current;
@@ -64,18 +66,16 @@ function useFloating(opts) {
64
66
  coords = altCoords;
65
67
  }
66
68
  }
67
- if (align !== "start") {
68
- if (resolved === "top" || resolved === "bottom") {
69
- coords.left = align === "center" ? rect.left + rect.width / 2 : rect.right;
70
- } else {
71
- coords.top = align === "center" ? rect.top + rect.height / 2 : rect.bottom;
72
- }
73
- } else if (doShift) {
74
- if (resolved === "bottom" || resolved === "top") {
75
- coords.left = Math.max(MARGIN, Math.min(coords.left, vw - w - MARGIN));
76
- } else {
77
- coords.top = Math.max(MARGIN, Math.min(coords.top, vh - h - MARGIN));
78
- }
69
+ if (resolved === "top" || resolved === "bottom") {
70
+ if (align === "center") coords.left = rect.left + (rect.width - w) / 2;
71
+ if (align === "end") coords.left = rect.right - w;
72
+ } else {
73
+ if (align === "center") coords.top = rect.top + (rect.height - h) / 2;
74
+ if (align === "end") coords.top = rect.bottom - h;
75
+ }
76
+ if (doShift) {
77
+ coords.left = Math.max(MARGIN, Math.min(coords.left, Math.max(MARGIN, vw - w - MARGIN)));
78
+ coords.top = Math.max(MARGIN, Math.min(coords.top, Math.max(MARGIN, vh - h - MARGIN)));
79
79
  }
80
80
  setState({
81
81
  top: coords.top,
@@ -98,24 +98,19 @@ function useFloating(opts) {
98
98
  ro?.disconnect();
99
99
  };
100
100
  }, [open, preferred, gap, panelW, panelH, doShift, doFlip, matchW, align]);
101
- let transform;
102
- if (align !== "start") {
103
- const cross = state.placement === "top" || state.placement === "bottom" ? "X" : "Y";
104
- const percent = align === "center" ? "-50%" : "-100%";
105
- transform = `translate${cross}(${percent})`;
106
- }
107
101
  const floatingStyle = {
108
102
  position: "fixed",
109
103
  top: state.top,
110
104
  left: state.left,
111
- ...state.width != null ? { width: state.width } : {},
112
- ...transform ? { transform } : {}
105
+ zIndex,
106
+ ...state.width != null ? { width: state.width } : {}
113
107
  };
114
108
  return {
115
109
  triggerRef,
116
110
  floatingRef,
117
111
  floatingStyle,
118
- placement: state.placement
112
+ placement: state.placement,
113
+ zIndex
119
114
  };
120
115
  }
121
116
 
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkVS3I5OKA_cjs = require('./chunk-VS3I5OKA.cjs');
4
- var chunkQMX67CVT_cjs = require('./chunk-QMX67CVT.cjs');
5
- require('./tokens-RYJ3DFTU.css');
3
+ var chunkSTQDKMS5_cjs = require('./chunk-STQDKMS5.cjs');
4
+ var chunk2AUXUZ3Z_cjs = require('./chunk-2AUXUZ3Z.cjs');
5
+ require('./tokens-CEJVVA3G.css');
6
6
  require('./shared-NJHRNLRH.css');
7
- require('./InputNumber-VXQIWLQC.css');
7
+ require('./InputNumber-6NHBMRT4.css');
8
8
  var React = require('react');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
 
@@ -28,6 +28,11 @@ function _interopNamespace(e) {
28
28
 
29
29
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
30
 
31
+ var normalizeNumber = (value, min, max, precision) => {
32
+ const clamped = Math.max(min, Math.min(max, value));
33
+ return precision != null ? Number(clamped.toFixed(precision)) : clamped;
34
+ };
35
+ var normalizePrecision = (precision) => precision != null && Number.isFinite(precision) ? Math.max(0, Math.min(100, Math.trunc(precision))) : void 0;
31
36
  var InputNumber = React__namespace.forwardRef(
32
37
  ({
33
38
  value,
@@ -35,6 +40,8 @@ var InputNumber = React__namespace.forwardRef(
35
40
  onChange,
36
41
  onBlur,
37
42
  onFocus,
43
+ onWheel,
44
+ onKeyDown,
38
45
  onPressEnter,
39
46
  min = -Infinity,
40
47
  max = Infinity,
@@ -51,22 +58,31 @@ var InputNumber = React__namespace.forwardRef(
51
58
  suffix,
52
59
  autoFocus,
53
60
  id,
54
- name
61
+ name,
62
+ theme,
63
+ ...rest
55
64
  }, ref) => {
56
- const [inner, setInner] = React__namespace.useState(defaultValue ?? null);
65
+ const normalizedMin = Number.isFinite(min) ? min : -Infinity;
66
+ const normalizedMaxCandidate = Number.isFinite(max) ? max : Infinity;
67
+ const normalizedMax = Math.max(normalizedMin, normalizedMaxCandidate);
68
+ const normalizedStep = Number.isFinite(step) && step > 0 ? step : 1;
69
+ const normalizedPrecision = normalizePrecision(precision);
70
+ const [inner, setInner] = React__namespace.useState(
71
+ () => defaultValue == null || !Number.isFinite(defaultValue) ? null : normalizeNumber(defaultValue, normalizedMin, normalizedMax, normalizedPrecision)
72
+ );
57
73
  const isControlled = value !== void 0;
58
- const current = isControlled ? value : inner;
74
+ const current = isControlled ? typeof value === "number" && Number.isFinite(value) ? normalizeNumber(value, normalizedMin, normalizedMax, normalizedPrecision) : null : inner;
59
75
  const [text, setText] = React__namespace.useState(current == null ? "" : String(current));
60
76
  React__namespace.useEffect(() => {
61
- if (isControlled) setText(value == null ? "" : String(value));
62
- }, [value, isControlled]);
77
+ if (isControlled) setText(current == null ? "" : String(current));
78
+ }, [current, isControlled]);
63
79
  const clamp = React__namespace.useCallback(
64
- (n) => Math.max(min, Math.min(max, n)),
65
- [min, max]
80
+ (n) => Math.max(normalizedMin, Math.min(normalizedMax, n)),
81
+ [normalizedMax, normalizedMin]
66
82
  );
67
83
  const round = React__namespace.useCallback(
68
- (n) => precision != null ? Number(n.toFixed(precision)) : n,
69
- [precision]
84
+ (n) => normalizedPrecision != null ? Number(n.toFixed(normalizedPrecision)) : n,
85
+ [normalizedPrecision]
70
86
  );
71
87
  const commit = (next) => {
72
88
  if (!isControlled) setInner(next);
@@ -79,7 +95,7 @@ var InputNumber = React__namespace.forwardRef(
79
95
  return;
80
96
  }
81
97
  const parsed = Number(v);
82
- if (!Number.isNaN(parsed)) commit(clamp(round(parsed)));
98
+ if (Number.isFinite(parsed)) commit(clamp(round(parsed)));
83
99
  };
84
100
  const handleBlur = (e) => {
85
101
  if (current == null) setText("");
@@ -95,19 +111,27 @@ var InputNumber = React__namespace.forwardRef(
95
111
  onChange?.(next);
96
112
  };
97
113
  const handleKeyDown = (e) => {
114
+ onKeyDown?.(e);
115
+ if (e.defaultPrevented) return;
98
116
  if (e.key === "ArrowUp") {
99
117
  e.preventDefault();
100
- increment(step);
118
+ increment(normalizedStep);
101
119
  }
102
120
  if (e.key === "ArrowDown") {
103
121
  e.preventDefault();
104
- increment(-step);
122
+ increment(-normalizedStep);
105
123
  }
106
124
  if (e.key === "Enter") onPressEnter?.(e);
107
125
  };
108
- const upDisabled = disabled || readOnly || current != null && current >= max;
109
- const downDisabled = disabled || readOnly || current != null && current <= min;
110
- const stepperSuffix = controls ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ipn-steppers", "aria-hidden": true, children: [
126
+ const handleWheel = (event) => {
127
+ onWheel?.(event);
128
+ if (event.defaultPrevented || document.activeElement !== event.currentTarget || disabled || readOnly) return;
129
+ event.preventDefault();
130
+ increment(event.deltaY < 0 ? normalizedStep : -normalizedStep);
131
+ };
132
+ const upDisabled = disabled || readOnly || current != null && current >= normalizedMax;
133
+ const downDisabled = disabled || readOnly || current != null && current <= normalizedMin;
134
+ const stepperSuffix = controls ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ipn-steppers", children: [
111
135
  /* @__PURE__ */ jsxRuntime.jsx(
112
136
  "button",
113
137
  {
@@ -116,8 +140,9 @@ var InputNumber = React__namespace.forwardRef(
116
140
  tabIndex: -1,
117
141
  disabled: upDisabled,
118
142
  onMouseDown: (e) => e.preventDefault(),
119
- onClick: () => increment(step),
120
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "chevUp", size: 10, stroke: 2.5 })
143
+ onClick: () => increment(normalizedStep),
144
+ "aria-label": "\u589E\u52A0\u6570\u503C",
145
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunk2AUXUZ3Z_cjs.Icon, { name: "chevUp", size: 10, stroke: 2.5 })
121
146
  }
122
147
  ),
123
148
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -128,8 +153,9 @@ var InputNumber = React__namespace.forwardRef(
128
153
  tabIndex: -1,
129
154
  disabled: downDisabled,
130
155
  onMouseDown: (e) => e.preventDefault(),
131
- onClick: () => increment(-step),
132
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "chevDown", size: 10, stroke: 2.5 })
156
+ onClick: () => increment(-normalizedStep),
157
+ "aria-label": "\u51CF\u5C11\u6570\u503C",
158
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunk2AUXUZ3Z_cjs.Icon, { name: "chevDown", size: 10, stroke: 2.5 })
133
159
  }
134
160
  )
135
161
  ] }) : null;
@@ -137,10 +163,11 @@ var InputNumber = React__namespace.forwardRef(
137
163
  suffix,
138
164
  stepperSuffix
139
165
  ] }) : stepperSuffix ?? suffix;
140
- return /* @__PURE__ */ jsxRuntime.jsx(
141
- chunkVS3I5OKA_cjs.Input,
166
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkSTQDKMS5_cjs.InputThemeIdentityProvider, { value: { component: "InputNumber", cssPrefix: "input" }, children: /* @__PURE__ */ jsxRuntime.jsx(
167
+ chunkSTQDKMS5_cjs.Input,
142
168
  {
143
169
  ref,
170
+ ...rest,
144
171
  id,
145
172
  name,
146
173
  size,
@@ -154,12 +181,18 @@ var InputNumber = React__namespace.forwardRef(
154
181
  suffix: finalSuffix,
155
182
  className: `input-number ${className}`,
156
183
  inputMode: "decimal",
184
+ role: "spinbutton",
185
+ "aria-valuemin": Number.isFinite(normalizedMin) ? normalizedMin : void 0,
186
+ "aria-valuemax": Number.isFinite(normalizedMax) ? normalizedMax : void 0,
187
+ "aria-valuenow": current ?? void 0,
157
188
  onValueChange: handleInput,
158
189
  onKeyDown: handleKeyDown,
190
+ onWheel: handleWheel,
159
191
  onBlur: handleBlur,
160
- onFocus
192
+ onFocus,
193
+ theme
161
194
  }
162
- );
195
+ ) });
163
196
  }
164
197
  );
165
198
  InputNumber.displayName = "InputNumber";