@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.
- package/dist/{Alert-HVPI6L4V.css → Alert-DJ3K7N7L.css} +9 -9
- package/dist/Alert.cjs +5 -3
- package/dist/Alert.d.cts +2 -2
- package/dist/Alert.d.ts +2 -2
- package/dist/Alert.js +4 -2
- package/dist/{AppShell-FZCD4C56.css → AppShell-OWJRJ4ZD.css} +57 -22
- package/dist/AppShell.cjs +8 -5
- package/dist/AppShell.d.cts +19 -16
- package/dist/AppShell.d.ts +19 -16
- package/dist/AppShell.js +4 -1
- package/dist/{AutoComplete-4YZBMW4E.css → AutoComplete-PNCYHU2T.css} +8 -8
- package/dist/AutoComplete.cjs +9 -6
- package/dist/AutoComplete.d.cts +2 -1
- package/dist/AutoComplete.d.ts +2 -1
- package/dist/AutoComplete.js +8 -5
- package/dist/Avatar-YBU2YZTW.css +48 -0
- package/dist/Avatar.cjs +4 -2
- package/dist/Avatar.d.cts +6 -2
- package/dist/Avatar.d.ts +6 -2
- package/dist/Avatar.js +3 -1
- package/dist/Badge-DBWJEV4C.css +22 -0
- package/dist/Badge.cjs +4 -2
- package/dist/Badge.d.cts +6 -2
- package/dist/Badge.d.ts +6 -2
- package/dist/Badge.js +3 -1
- package/dist/{Button-TUMZUQLI.css → Button-ILNZUX2N.css} +28 -21
- package/dist/Button.cjs +6 -4
- package/dist/Button.d.cts +2 -14
- package/dist/Button.d.ts +2 -14
- package/dist/Button.js +4 -2
- package/dist/{Calendar-I6NHCXIB.css → Calendar-QJ5HWEJQ.css} +26 -26
- package/dist/Calendar.cjs +5 -3
- package/dist/Calendar.d.cts +8 -4
- package/dist/Calendar.d.ts +8 -4
- package/dist/Calendar.js +4 -2
- package/dist/Card-VPMTWAWZ.css +98 -0
- package/dist/Card.cjs +7 -3
- package/dist/Card.d.cts +8 -4
- package/dist/Card.d.ts +8 -4
- package/dist/Card.js +6 -2
- package/dist/Cascader-YBVDK6DC.css +168 -0
- package/dist/Cascader.cjs +9 -6
- package/dist/Cascader.d.cts +21 -3
- package/dist/Cascader.d.ts +21 -3
- package/dist/Cascader.js +8 -5
- package/dist/Checkbox-IHFML4FV.css +50 -0
- package/dist/Checkbox.cjs +5 -3
- package/dist/Checkbox.d.cts +10 -2
- package/dist/Checkbox.d.ts +10 -2
- package/dist/Checkbox.js +4 -2
- package/dist/{Collapse-UNBHEPYP.css → Collapse-BTSBHBSY.css} +12 -7
- package/dist/Collapse.cjs +5 -3
- package/dist/Collapse.d.cts +2 -2
- package/dist/Collapse.d.ts +2 -2
- package/dist/Collapse.js +4 -2
- package/dist/{ColorPicker-LPG6QPYF.css → ColorPicker-GRZOKR5O.css} +17 -32
- package/dist/ColorPicker.cjs +9 -3
- package/dist/ColorPicker.d.cts +7 -11
- package/dist/ColorPicker.d.ts +7 -11
- package/dist/ColorPicker.js +8 -2
- package/dist/{CommandPalette-RTKWNH2D.css → CommandPalette-GHTX7AAA.css} +22 -23
- package/dist/CommandPalette.cjs +8 -5
- package/dist/CommandPalette.d.cts +5 -28
- package/dist/CommandPalette.d.ts +5 -28
- package/dist/CommandPalette.js +7 -4
- package/dist/{ContextMenu-WRR2SSWL.css → ContextMenu-NG524Y2P.css} +17 -17
- package/dist/ContextMenu.cjs +5 -2
- package/dist/ContextMenu.d.cts +2 -19
- package/dist/ContextMenu.d.ts +2 -19
- package/dist/ContextMenu.js +4 -1
- package/dist/{DatePicker-VDVSIARF.css → DatePicker-ZSFDXAYD.css} +4 -4
- package/dist/DatePicker.cjs +11 -8
- package/dist/DatePicker.d.cts +4 -7
- package/dist/DatePicker.d.ts +4 -7
- package/dist/DatePicker.js +10 -7
- package/dist/{DateTimePicker-DRX7XA74.css → DateTimePicker-EWSISVIF.css} +17 -17
- package/dist/DateTimePicker.cjs +11 -8
- package/dist/DateTimePicker.d.cts +4 -8
- package/dist/DateTimePicker.d.ts +4 -8
- package/dist/DateTimePicker.js +10 -7
- package/dist/{Divider-RPQCVH3J.css → Divider-OI2BXPBU.css} +10 -10
- package/dist/Divider.cjs +4 -2
- package/dist/Divider.d.cts +2 -2
- package/dist/Divider.d.ts +2 -2
- package/dist/Divider.js +3 -1
- package/dist/{Drawer-7KICRM4L.css → Drawer-VCXAXWV6.css} +30 -17
- package/dist/Drawer.cjs +6 -3
- package/dist/Drawer.d.cts +25 -3
- package/dist/Drawer.d.ts +25 -3
- package/dist/Drawer.js +5 -2
- package/dist/{Empty-CZTRZMZQ.css → Empty-U5CBLCAL.css} +5 -5
- package/dist/Empty.cjs +4 -2
- package/dist/Empty.d.cts +2 -2
- package/dist/Empty.d.ts +2 -2
- package/dist/Empty.js +3 -1
- package/dist/{Form-NGCQWTMZ.css → Form-DNEDZRJA.css} +7 -7
- package/dist/Form.cjs +7 -4
- package/dist/Form.d.cts +4 -3
- package/dist/Form.d.ts +4 -3
- package/dist/Form.js +4 -1
- package/dist/Icon-HJSUVW4O.css +12 -0
- package/dist/Icon.cjs +51 -49
- package/dist/Icon.d.cts +8 -8
- package/dist/Icon.d.ts +8 -8
- package/dist/Icon.js +3 -1
- package/dist/{Image-NISJRUWX.css → Image-CZJPPURT.css} +25 -23
- package/dist/Image.cjs +10 -7
- package/dist/Image.d.cts +5 -24
- package/dist/Image.d.ts +5 -24
- package/dist/Image.js +6 -3
- package/dist/{Input-7GDPGP3E.css → Input-ZUASNDXM.css} +15 -15
- package/dist/Input.cjs +7 -5
- package/dist/Input.d.cts +2 -1
- package/dist/Input.d.ts +2 -1
- package/dist/Input.js +5 -3
- package/dist/{InputNumber-VXQIWLQC.css → InputNumber-6NHBMRT4.css} +7 -7
- package/dist/InputNumber.cjs +7 -5
- package/dist/InputNumber.d.cts +2 -1
- package/dist/InputNumber.d.ts +2 -1
- package/dist/InputNumber.js +6 -4
- package/dist/List-6BQIFAIT.css +42 -0
- package/dist/List.cjs +4 -2
- package/dist/List.d.cts +2 -2
- package/dist/List.d.ts +2 -2
- package/dist/List.js +3 -1
- package/dist/{Message-H222YGR6.css → Message-OTZWQTQ5.css} +13 -13
- package/dist/Message.cjs +9 -6
- package/dist/Message.d.cts +18 -2
- package/dist/Message.d.ts +18 -2
- package/dist/Message.js +5 -2
- package/dist/{Modal-ZFWNFEA5.css → Modal-UI2FXNDR.css} +29 -18
- package/dist/Modal.cjs +7 -4
- package/dist/Modal.d.cts +13 -2
- package/dist/Modal.d.ts +13 -2
- package/dist/Modal.js +6 -3
- package/dist/Pagination-POJTWMYR.css +70 -0
- package/dist/Pagination.cjs +11 -8
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.ts +2 -2
- package/dist/Pagination.js +10 -7
- package/dist/{Popover-Y3LDCJPW.css → Popover-LCXLR3EU.css} +13 -14
- package/dist/Popover.cjs +6 -3
- package/dist/Popover.d.cts +3 -10
- package/dist/Popover.d.ts +3 -10
- package/dist/Popover.js +5 -2
- package/dist/Progress-33WE2NI7.css +90 -0
- package/dist/Progress.cjs +4 -2
- package/dist/Progress.d.cts +4 -2
- package/dist/Progress.d.ts +4 -2
- package/dist/Progress.js +3 -1
- package/dist/{Radio-IQKASYDF.css → Radio-RL7232MZ.css} +21 -13
- package/dist/Radio.cjs +5 -3
- package/dist/Radio.d.cts +18 -5
- package/dist/Radio.d.ts +18 -5
- package/dist/Radio.js +3 -1
- package/dist/{Select-YZ2NUJSX.css → Select-TU37MAHZ.css} +64 -40
- package/dist/Select.cjs +10 -7
- package/dist/Select.d.cts +24 -3
- package/dist/Select.d.ts +24 -3
- package/dist/Select.js +9 -6
- package/dist/{Skeleton-CVWH2VWN.css → Skeleton-FMFE3BRI.css} +9 -4
- package/dist/Skeleton.cjs +4 -2
- package/dist/Skeleton.d.cts +2 -4
- package/dist/Skeleton.d.ts +2 -4
- package/dist/Skeleton.js +3 -1
- package/dist/Slider-FZ5MI4X2.css +145 -0
- package/dist/Slider.cjs +4 -2
- package/dist/Slider.d.cts +6 -5
- package/dist/Slider.d.ts +6 -5
- package/dist/Slider.js +3 -1
- package/dist/{Spin-GONGPV4Q.css → Spin-F5YIEENO.css} +15 -9
- package/dist/Spin.cjs +4 -2
- package/dist/Spin.d.cts +2 -2
- package/dist/Spin.d.ts +2 -2
- package/dist/Spin.js +3 -1
- package/dist/{Splitter-DHNOY4NC.css → Splitter-IQ3PFIKK.css} +4 -4
- package/dist/Splitter.cjs +4 -2
- package/dist/Splitter.d.cts +8 -12
- package/dist/Splitter.d.ts +8 -12
- package/dist/Splitter.js +3 -1
- package/dist/{StatusBar-FJKEEPXU.css → StatusBar-TCGR3LXP.css} +23 -9
- package/dist/StatusBar.cjs +5 -3
- package/dist/StatusBar.d.cts +5 -17
- package/dist/StatusBar.d.ts +5 -17
- package/dist/StatusBar.js +3 -1
- package/dist/{Surface-UDDN3DGL.css → Surface-CTN775GD.css} +10 -10
- package/dist/Surface.cjs +6 -5
- package/dist/Surface.d.cts +10 -1
- package/dist/Surface.d.ts +10 -1
- package/dist/Surface.js +4 -3
- package/dist/{Switch-COAQIOMH.css → Switch-TATU3LPB.css} +16 -8
- package/dist/Switch.cjs +4 -2
- package/dist/Switch.d.cts +10 -4
- package/dist/Switch.d.ts +10 -4
- package/dist/Switch.js +3 -1
- package/dist/{Table-IWHIIGRJ.css → Table-W4HPZ7MZ.css} +78 -53
- package/dist/Table.cjs +14 -10
- package/dist/Table.d.cts +32 -3
- package/dist/Table.d.ts +32 -3
- package/dist/Table.js +13 -9
- package/dist/{TablePro-3NGWERWT.css → TablePro-WYE6TXWJ.css} +5 -5
- package/dist/TablePro.cjs +15 -11
- package/dist/TablePro.d.cts +1 -0
- package/dist/TablePro.d.ts +1 -0
- package/dist/TablePro.js +14 -10
- package/dist/{Tabs-X5U5PCPV.css → Tabs-A3IG6UZ6.css} +10 -10
- package/dist/Tabs.cjs +4 -2
- package/dist/Tabs.d.cts +2 -2
- package/dist/Tabs.d.ts +2 -2
- package/dist/Tabs.js +3 -1
- package/dist/Tag-5GIZLRAH.css +42 -0
- package/dist/Tag.cjs +5 -3
- package/dist/Tag.d.cts +2 -2
- package/dist/Tag.d.ts +2 -2
- package/dist/Tag.js +4 -2
- package/dist/{Textarea-YHWKHIFE.css → Textarea-ZGHBZNLX.css} +10 -10
- package/dist/Textarea.cjs +6 -4
- package/dist/Textarea.d.cts +2 -4
- package/dist/Textarea.d.ts +2 -4
- package/dist/Textarea.js +4 -2
- package/dist/Theme-CLedeJ_C.d.ts +193 -0
- package/dist/Theme-uQq2B0Yk.d.cts +193 -0
- package/dist/Theme.cjs +57 -11
- package/dist/Theme.d.cts +26 -145
- package/dist/Theme.d.ts +26 -145
- package/dist/Theme.js +3 -1
- package/dist/{ThemePanel-TEHB2JCQ.css → ThemePanel-EHNAS4RN.css} +52 -52
- package/dist/ThemePanel.cjs +17 -15
- package/dist/ThemePanel.d.cts +3 -13
- package/dist/ThemePanel.d.ts +3 -13
- package/dist/ThemePanel.js +14 -12
- package/dist/{TimePicker-ZBJOXH3U.css → TimePicker-WJ3FSK6A.css} +17 -17
- package/dist/TimePicker.cjs +10 -7
- package/dist/TimePicker.d.cts +2 -8
- package/dist/TimePicker.d.ts +2 -8
- package/dist/TimePicker.js +9 -6
- package/dist/{Timeline-CRFZ3I2W.css → Timeline-FUFO2UGY.css} +28 -13
- package/dist/Timeline.cjs +5 -3
- package/dist/Timeline.d.cts +2 -7
- package/dist/Timeline.d.ts +2 -7
- package/dist/Timeline.js +4 -2
- package/dist/{Tooltip-5FSPJWLX.css → Tooltip-2EUNTOTW.css} +3 -3
- package/dist/Tooltip.cjs +6 -3
- package/dist/Tooltip.d.cts +2 -2
- package/dist/Tooltip.d.ts +2 -2
- package/dist/Tooltip.js +5 -2
- package/dist/{Typography-32QQLD4F.css → Typography-CQ2OZXQH.css} +105 -42
- package/dist/Typography.cjs +11 -8
- package/dist/Typography.d.cts +12 -36
- package/dist/Typography.d.ts +12 -36
- package/dist/Typography.js +6 -3
- package/dist/chunk-2A4GYSN4.js +294 -0
- package/dist/{chunk-QMX67CVT.cjs → chunk-2AUXUZ3Z.cjs} +56 -31
- package/dist/chunk-2BIOTRQC.js +40 -0
- package/dist/{chunk-A6O25EP2.js → chunk-2HIN5NFM.js} +14 -6
- package/dist/{chunk-I7TOBKJO.js → chunk-3DKFS44V.js} +84 -23
- package/dist/{chunk-E22OIVYP.js → chunk-3EHJ5QI3.js} +202 -69
- package/dist/{chunk-X5MYHDEQ.cjs → chunk-3EMWDDWK.cjs} +372 -117
- package/dist/chunk-3F424R5P.js +143 -0
- package/dist/chunk-3IZZBM56.js +269 -0
- package/dist/{chunk-DUFRASGO.js → chunk-3QXP2ZNP.js} +18 -23
- package/dist/{chunk-5QEI7GGA.cjs → chunk-434Y2JVW.cjs} +60 -27
- package/dist/{chunk-SOCYOUGM.js → chunk-4SKHRPDH.js} +168 -64
- package/dist/{chunk-L6GIV5DQ.cjs → chunk-56I6ZKGU.cjs} +40 -22
- package/dist/{chunk-R3DTXVP2.js → chunk-5AXNUX3J.js} +8 -5
- package/dist/chunk-5CZA33BK.cjs +229 -0
- package/dist/{chunk-6K5YI4ZE.js → chunk-62VV5COT.js} +16 -6
- package/dist/chunk-6DKPJ5LV.cjs +294 -0
- package/dist/{chunk-OTSDPQPV.js → chunk-6RQJXSWN.js} +50 -30
- package/dist/{chunk-V5KUC5VH.cjs → chunk-77HU7JWK.cjs} +40 -13
- package/dist/chunk-7QAVPVMW.js +180 -0
- package/dist/chunk-7VLAHOA7.cjs +191 -0
- package/dist/chunk-ALAG4ZUH.js +72 -0
- package/dist/chunk-ARUN2DMD.js +39 -0
- package/dist/chunk-AUO2YYHB.js +248 -0
- package/dist/{chunk-6MEOLYNQ.js → chunk-AURYNA6G.js} +6 -5
- package/dist/chunk-BIPOXOHP.cjs +287 -0
- package/dist/{chunk-V5SQOZPF.js → chunk-BJDQVVCG.js} +38 -20
- package/dist/{chunk-BVQOJKRX.js → chunk-BKW5PXEO.js} +115 -72
- package/dist/{chunk-UW57F3UO.cjs → chunk-D7YSY5RZ.cjs} +208 -75
- package/dist/chunk-DRDDQCDD.js +322 -0
- package/dist/chunk-DU2DSERH.js +190 -0
- package/dist/{chunk-PSQ3HNZP.cjs → chunk-E66PSVBU.cjs} +106 -19
- package/dist/{chunk-UGAN4BBW.js → chunk-EA3NZBCZ.js} +251 -125
- package/dist/chunk-EAUB6FEN.js +262 -0
- package/dist/chunk-EE5KXDRK.cjs +1223 -0
- package/dist/chunk-EE7IJ3MB.js +1 -0
- package/dist/{chunk-NXBFEIUX.cjs → chunk-ENFLP7SN.cjs} +255 -129
- package/dist/chunk-EUTK2ZRJ.cjs +61 -0
- package/dist/{chunk-HSAJUEO7.cjs → chunk-F7WUCOBP.cjs} +150 -86
- package/dist/{chunk-YB3IWIOJ.cjs → chunk-FJB3243S.cjs} +18 -23
- package/dist/chunk-FKCPSVC4.cjs +188 -0
- package/dist/chunk-FMUHLIHB.cjs +94 -0
- package/dist/chunk-FY73C7JK.js +520 -0
- package/dist/{chunk-6EOSMK34.cjs → chunk-G5LCOBOT.cjs} +20 -1
- package/dist/{chunk-5ERD3W24.cjs → chunk-GFKWSDD6.cjs} +18 -8
- package/dist/{chunk-T2O4DTDE.cjs → chunk-GTFP7HA3.cjs} +58 -32
- package/dist/chunk-HQFKXTX6.js +60 -0
- package/dist/chunk-HSDMJUB6.cjs +319 -0
- package/dist/chunk-HVPUGYBY.js +166 -0
- package/dist/chunk-HYHBCHFM.cjs +167 -0
- package/dist/chunk-HYJSMFZA.cjs +2 -0
- package/dist/chunk-I4YPBAQ5.js +163 -0
- package/dist/{chunk-IPSNC5VZ.js → chunk-JHM7MN3G.js} +15 -7
- package/dist/{chunk-4ACCOYBY.cjs → chunk-JINKQT6H.cjs} +20 -8
- package/dist/{chunk-6Q76VLCE.cjs → chunk-JKUXA3U6.cjs} +50 -30
- package/dist/{chunk-D7GK6H6V.js → chunk-K5HGHOG7.js} +50 -21
- package/dist/chunk-KATJAJUU.js +78 -0
- package/dist/chunk-KCDOC3HS.cjs +100 -0
- package/dist/{chunk-M4NJTJKV.cjs → chunk-LDX6Q6RK.cjs} +8 -5
- package/dist/chunk-LEDESWNL.js +83 -0
- package/dist/chunk-LG62MPMU.cjs +213 -0
- package/dist/{chunk-7NTTRKNT.js → chunk-LJVQQEME.js} +54 -28
- package/dist/chunk-LOWTSOWT.js +199 -0
- package/dist/{chunk-FDZG27IG.js → chunk-LQMOYVQF.js} +57 -32
- package/dist/{chunk-P2OQTJZP.cjs → chunk-MCDW3VKZ.cjs} +17 -6
- package/dist/{chunk-BT2RXFT4.cjs → chunk-MUZQWIMR.cjs} +121 -78
- package/dist/chunk-NRJXZPZR.cjs +351 -0
- package/dist/chunk-O6G3F5L4.js +311 -0
- package/dist/{chunk-3VSHGM54.js → chunk-OLYSSZHP.js} +126 -68
- package/dist/{chunk-A4Z7PLHV.cjs → chunk-PIJV2FHO.cjs} +135 -77
- package/dist/{chunk-FYSXJXNW.js → chunk-PQOBBASY.js} +10 -9
- package/dist/chunk-Q565GDVK.cjs +205 -0
- package/dist/{chunk-FDUQPAQE.cjs → chunk-Q5HLC56A.cjs} +122 -28
- package/dist/chunk-QDCPVI3S.cjs +333 -0
- package/dist/{chunk-ZR4IMROK.js → chunk-QDMFXRPI.js} +122 -28
- package/dist/chunk-QDY56GGO.js +234 -0
- package/dist/{chunk-4KDABJSY.cjs → chunk-QNQSNVCU.cjs} +86 -25
- package/dist/chunk-QYPA77OI.cjs +55 -0
- package/dist/chunk-RAK6CENJ.js +83 -0
- package/dist/{chunk-BW76ENTW.cjs → chunk-RERMZNF3.cjs} +10 -9
- package/dist/chunk-RMGFRAZ2.cjs +270 -0
- package/dist/chunk-RPO7657K.js +228 -0
- package/dist/chunk-STQDKMS5.cjs +288 -0
- package/dist/{chunk-HG6YS4I7.js → chunk-SXLRWYQQ.js} +71 -24
- package/dist/{chunk-SW2HMNCA.cjs → chunk-T4RR6NVU.cjs} +17 -9
- package/dist/{chunk-6SPMHY54.js → chunk-TSL3F2K3.js} +20 -2
- package/dist/{chunk-BNY2NVTL.cjs → chunk-TYZ6L7E6.cjs} +48 -28
- package/dist/{chunk-MOZ52KN6.js → chunk-U3SG2YT2.js} +39 -12
- package/dist/{chunk-POU3W5J3.cjs → chunk-U5YYOOLC.cjs} +13 -6
- package/dist/chunk-U7VEPMCX.cjs +221 -0
- package/dist/chunk-UE4HFGJ6.js +264 -0
- package/dist/chunk-ULTDRMGN.js +1175 -0
- package/dist/{chunk-6HF6UF73.js → chunk-UQI4R32R.js} +368 -113
- package/dist/{chunk-MWEHU7YO.cjs → chunk-VA3JWOAB.cjs} +172 -68
- package/dist/chunk-VQEMMJHC.js +33 -0
- package/dist/{chunk-S2ZGXBUH.cjs → chunk-VVRXNGYL.cjs} +218 -42
- package/dist/{chunk-JMFHL7GN.cjs → chunk-VX6MZO4K.cjs} +100 -22
- package/dist/{chunk-2FOC3D6X.js → chunk-WMZV7PNO.js} +19 -7
- package/dist/{chunk-MYW7LNB2.cjs → chunk-WROF2PVG.cjs} +40 -21
- package/dist/chunk-XZXY3XCL.cjs +105 -0
- package/dist/{chunk-5VOUUQF5.js → chunk-Y22PTPA7.js} +145 -81
- package/dist/chunk-Y2MT6PI6.js +207 -0
- package/dist/chunk-YAYSXZZZ.cjs +82 -0
- package/dist/{chunk-6LN4VVX7.js → chunk-YBGMTQ2V.js} +48 -28
- package/dist/{chunk-TYLDISRK.js → chunk-YKHIIC7M.js} +13 -6
- package/dist/{chunk-3VXGZ3SJ.js → chunk-YPMQC5HX.js} +57 -24
- package/dist/{chunk-UWL6DRZW.cjs → chunk-YUJ7Z6N2.cjs} +74 -27
- package/dist/{chunk-LEMMFFEY.cjs → chunk-ZEYK37VW.cjs} +15 -7
- package/dist/{chunk-ES7AWMNH.cjs → chunk-ZHVR4YPB.cjs} +6 -5
- package/dist/{chunk-MPOO5VPW.cjs → chunk-ZYIE3BH7.cjs} +50 -21
- package/dist/componentThemeTypes-Jt4B5aU8.d.cts +77 -0
- package/dist/componentThemeTypes-Jt4B5aU8.d.ts +77 -0
- package/dist/index.cjs +253 -206
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +56 -53
- package/dist/styles.css +1628 -701
- package/dist/{tokens-RYJ3DFTU.css → tokens-CEJVVA3G.css} +10 -0
- package/dist/tokens.css +10 -0
- package/docs/llms/appshell.md +9 -6
- package/docs/llms/autocomplete.md +8 -2
- package/docs/llms/avatar.md +2 -0
- package/docs/llms/badge.md +2 -0
- package/docs/llms/calendar.md +7 -2
- package/docs/llms/card.md +20 -1
- package/docs/llms/cascader.md +27 -5
- package/docs/llms/checkbox.md +13 -0
- package/docs/llms/collapse.md +13 -5
- package/docs/llms/colorpicker.md +4 -3
- package/docs/llms/commandpalette.md +10 -2
- package/docs/llms/contextmenu.md +14 -2
- package/docs/llms/datepicker.md +7 -0
- package/docs/llms/datetimepicker.md +7 -0
- package/docs/llms/drawer.md +20 -4
- package/docs/llms/form.md +5 -2
- package/docs/llms/icon.md +25 -1
- package/docs/llms/image.md +3 -3
- package/docs/llms/list.md +11 -0
- package/docs/llms/message.md +31 -8
- package/docs/llms/modal.md +20 -8
- package/docs/llms/pagination.md +12 -4
- package/docs/llms/popover.md +11 -1
- package/docs/llms/progress.md +1 -0
- package/docs/llms/radio.md +13 -0
- package/docs/llms/select.md +29 -2
- package/docs/llms/sidebar.md +24 -0
- package/docs/llms/slider.md +5 -2
- package/docs/llms/splitter.md +5 -2
- package/docs/llms/switch.md +13 -0
- package/docs/llms/table.md +7 -8
- package/docs/llms/theme.md +83 -28
- package/docs/llms/themepanel.md +1 -0
- package/docs/llms/titlebar.md +1 -0
- package/docs/llms/tooltip.md +7 -2
- package/docs/llms/typography.md +27 -3
- package/docs/llms/windowcontrols.md +11 -3
- package/docs/llms.md +2 -2
- package/package.json +212 -2
- package/dist/Avatar-TNPOHVY5.css +0 -40
- package/dist/Badge-DPGLV3D3.css +0 -22
- package/dist/Card-W3ATFUJW.css +0 -77
- package/dist/Cascader-ANEQUPMI.css +0 -150
- package/dist/Checkbox-EDNPZRIP.css +0 -42
- package/dist/List-LSMU5QAC.css +0 -26
- package/dist/Pagination-YSZSNFHG.css +0 -68
- package/dist/Progress-CZNXCYGW.css +0 -80
- package/dist/Slider-UM2IZZBH.css +0 -127
- package/dist/Tag-G2XWAL7A.css +0 -42
- package/dist/chunk-262ED6WQ.cjs +0 -88
- package/dist/chunk-4HJBF4GY.js +0 -218
- package/dist/chunk-4TTRHEGM.cjs +0 -217
- package/dist/chunk-5A6KSYWA.cjs +0 -67
- package/dist/chunk-5MOYKVB7.js +0 -192
- package/dist/chunk-7IO3EOHN.cjs +0 -200
- package/dist/chunk-7QXP6DXC.cjs +0 -129
- package/dist/chunk-AAPZLBHQ.js +0 -165
- package/dist/chunk-ARUPS7JH.js +0 -66
- package/dist/chunk-ATUPFAPZ.cjs +0 -76
- package/dist/chunk-CFZVWY5N.js +0 -178
- package/dist/chunk-DSLYWX4O.js +0 -25
- package/dist/chunk-FQJY4D3T.cjs +0 -47
- package/dist/chunk-GNV6W4BN.js +0 -495
- package/dist/chunk-HBO7ZDEQ.js +0 -29
- package/dist/chunk-I777JTTG.js +0 -150
- package/dist/chunk-IOAOG5L7.js +0 -191
- package/dist/chunk-IOUAZYK2.cjs +0 -116
- package/dist/chunk-IZHH6CVY.js +0 -123
- package/dist/chunk-JFL2WMJZ.js +0 -106
- package/dist/chunk-KMPFESEV.js +0 -41
- package/dist/chunk-KYV75JPQ.js +0 -147
- package/dist/chunk-N7OQNSII.cjs +0 -145
- package/dist/chunk-P64NPZBG.js +0 -113
- package/dist/chunk-PKNRTFNE.cjs +0 -526
- package/dist/chunk-PU7VXDAS.js +0 -64
- package/dist/chunk-RFI5R42I.cjs +0 -138
- package/dist/chunk-RR2BKV65.js +0 -39
- package/dist/chunk-RSSOX4RQ.cjs +0 -240
- package/dist/chunk-RZEFKXL3.cjs +0 -104
- package/dist/chunk-S7IHWY24.js +0 -81
- package/dist/chunk-SOQ56ZI2.cjs +0 -49
- package/dist/chunk-TBNPJPYG.cjs +0 -61
- package/dist/chunk-TJECLLN4.js +0 -344
- package/dist/chunk-ULUD3FED.cjs +0 -138
- package/dist/chunk-VA2I7ZAL.cjs +0 -190
- package/dist/chunk-VS3I5OKA.cjs +0 -214
- package/dist/chunk-WMGMIE2D.js +0 -113
- package/dist/chunk-X7XP6GEI.cjs +0 -63
- package/dist/chunk-XCXUGHDF.js +0 -91
- package/dist/chunk-YAFDVNXT.js +0 -27
- package/dist/chunk-ZD3L4V3H.js +0 -54
- package/dist/chunk-ZTCRD2FL.js +0 -45
|
@@ -1,14 +1,36 @@
|
|
|
1
|
-
import { Pagination } from './chunk-
|
|
2
|
-
import { Checkbox } from './chunk-
|
|
3
|
-
import { useFloating } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import './
|
|
1
|
+
import { Pagination } from './chunk-BJDQVVCG.js';
|
|
2
|
+
import { Checkbox } from './chunk-KATJAJUU.js';
|
|
3
|
+
import { useFloating } from './chunk-3QXP2ZNP.js';
|
|
4
|
+
import { useOverlayLayer } from './chunk-2A4GYSN4.js';
|
|
5
|
+
import { Button, IconButton } from './chunk-JHM7MN3G.js';
|
|
6
|
+
import { Icon } from './chunk-LQMOYVQF.js';
|
|
7
|
+
import { withComponentTheme, InternalComponentThemePart, useComponentPortalTheme } from './chunk-DRDDQCDD.js';
|
|
8
|
+
import { usePortalContainer } from './chunk-ULTDRMGN.js';
|
|
9
|
+
import './tokens-CEJVVA3G.css';
|
|
6
10
|
import './shared-NJHRNLRH.css';
|
|
7
|
-
import './Table-
|
|
11
|
+
import './Table-W4HPZ7MZ.css';
|
|
8
12
|
import * as React from 'react';
|
|
9
13
|
import { createPortal } from 'react-dom';
|
|
10
14
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
15
|
|
|
16
|
+
function filterTableEntries(entries, filters, columnMap) {
|
|
17
|
+
const activeEntries = Object.entries(filters);
|
|
18
|
+
if (activeEntries.length === 0) return entries;
|
|
19
|
+
return entries.filter(({ row }) => {
|
|
20
|
+
for (const [columnKey, values] of activeEntries) {
|
|
21
|
+
const column = columnMap.get(columnKey);
|
|
22
|
+
if (!column) continue;
|
|
23
|
+
const matches = values.some((value) => {
|
|
24
|
+
if (column.onFilter) return column.onFilter(value, row);
|
|
25
|
+
if (column.dataIndex == null) return false;
|
|
26
|
+
const cell = row[column.dataIndex];
|
|
27
|
+
return cell === value || String(cell) === String(value);
|
|
28
|
+
});
|
|
29
|
+
if (!matches) return false;
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
12
34
|
var TableInner = ({
|
|
13
35
|
columns,
|
|
14
36
|
data,
|
|
@@ -19,6 +41,7 @@ var TableInner = ({
|
|
|
19
41
|
sortKey,
|
|
20
42
|
sortDir = "asc",
|
|
21
43
|
onSort,
|
|
44
|
+
onChange,
|
|
22
45
|
rowSelection,
|
|
23
46
|
selectable,
|
|
24
47
|
selected = [],
|
|
@@ -26,19 +49,27 @@ var TableInner = ({
|
|
|
26
49
|
expandable,
|
|
27
50
|
pagination,
|
|
28
51
|
scroll,
|
|
52
|
+
tableProps,
|
|
53
|
+
caption,
|
|
29
54
|
onRowClick,
|
|
30
55
|
empty = "\u6682\u65E0\u6570\u636E",
|
|
31
56
|
className = "",
|
|
32
57
|
style,
|
|
33
58
|
...rest
|
|
34
59
|
}, ref) => {
|
|
35
|
-
const
|
|
36
|
-
(row,
|
|
37
|
-
|
|
38
|
-
if (rowKey)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
60
|
+
const sourceEntries = React.useMemo(
|
|
61
|
+
() => data.map((row, sourceIndex) => {
|
|
62
|
+
let key;
|
|
63
|
+
if (typeof rowKey === "function") key = rowKey(row);
|
|
64
|
+
else if (rowKey) key = row[rowKey];
|
|
65
|
+
else key = sourceIndex;
|
|
66
|
+
return { row, key, sourceIndex };
|
|
67
|
+
}),
|
|
68
|
+
[data, rowKey]
|
|
69
|
+
);
|
|
70
|
+
const columnMap = React.useMemo(
|
|
71
|
+
() => new Map(columns.map((column) => [column.key, column])),
|
|
72
|
+
[columns]
|
|
42
73
|
);
|
|
43
74
|
const selectionMode = rowSelection ? "new" : selectable ? "legacy" : "off";
|
|
44
75
|
const selectionType = rowSelection?.type ?? "checkbox";
|
|
@@ -78,47 +109,33 @@ var TableInner = ({
|
|
|
78
109
|
}
|
|
79
110
|
return out;
|
|
80
111
|
}, [columns, innerFilters]);
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
90
|
-
const filteredData = React.useMemo(() => {
|
|
91
|
-
const entries = Object.entries(activeFilters);
|
|
92
|
-
if (entries.length === 0) return data;
|
|
93
|
-
return data.filter((row) => {
|
|
94
|
-
for (const [colKey, vals] of entries) {
|
|
95
|
-
const col = columns.find((c) => c.key === colKey);
|
|
96
|
-
if (!col) continue;
|
|
97
|
-
const match = vals.some((v2) => {
|
|
98
|
-
if (col.onFilter) return col.onFilter(v2, row);
|
|
99
|
-
if (col.dataIndex != null) {
|
|
100
|
-
const cell = row[col.dataIndex];
|
|
101
|
-
return cell === v2 || String(cell) === String(v2);
|
|
102
|
-
}
|
|
103
|
-
return false;
|
|
104
|
-
});
|
|
105
|
-
if (!match) return false;
|
|
106
|
-
}
|
|
107
|
-
return true;
|
|
108
|
-
});
|
|
109
|
-
}, [data, columns, activeFilters]);
|
|
112
|
+
const filteredEntries = React.useMemo(
|
|
113
|
+
() => filterTableEntries(sourceEntries, activeFilters, columnMap),
|
|
114
|
+
[activeFilters, columnMap, sourceEntries]
|
|
115
|
+
);
|
|
116
|
+
const filteredData = React.useMemo(
|
|
117
|
+
() => filteredEntries.map(({ row }) => row),
|
|
118
|
+
[filteredEntries]
|
|
119
|
+
);
|
|
110
120
|
const pagEnabled = pagination !== false && pagination !== void 0;
|
|
111
121
|
const pagCfg = pagEnabled ? pagination : {};
|
|
112
122
|
const [innerPage, setInnerPage] = React.useState(
|
|
113
|
-
pagCfg.defaultCurrent
|
|
123
|
+
Number.isFinite(pagCfg.defaultCurrent) ? Math.max(1, Math.trunc(pagCfg.defaultCurrent)) : 1
|
|
114
124
|
);
|
|
115
125
|
const [innerPageSize, setInnerPageSize] = React.useState(
|
|
116
|
-
|
|
126
|
+
(() => {
|
|
127
|
+
const initial = pagCfg.defaultPageSize ?? pagCfg.pageSize ?? 10;
|
|
128
|
+
return Number.isFinite(initial) && initial > 0 ? Math.max(1, Math.trunc(initial)) : 10;
|
|
129
|
+
})()
|
|
117
130
|
);
|
|
118
131
|
const pageControlled = pagCfg.current !== void 0;
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
const
|
|
132
|
+
const requestedPage = pageControlled ? pagCfg.current : innerPage;
|
|
133
|
+
const curPage = Number.isFinite(requestedPage) ? Math.max(1, Math.trunc(requestedPage)) : 1;
|
|
134
|
+
const requestedPageSize = pagCfg.pageSize ?? innerPageSize;
|
|
135
|
+
const curPageSize = Number.isFinite(requestedPageSize) && requestedPageSize > 0 ? Math.max(1, Math.trunc(requestedPageSize)) : 10;
|
|
136
|
+
const requestedTotal = pagCfg.total ?? filteredData.length;
|
|
137
|
+
const totalCount = Number.isFinite(requestedTotal) ? Math.max(0, Math.trunc(requestedTotal)) : filteredData.length;
|
|
138
|
+
const remotePagination = pagCfg.mode === "remote" || pagCfg.mode === void 0 && pagCfg.total !== void 0 && pageControlled;
|
|
122
139
|
React.useEffect(() => {
|
|
123
140
|
if (pagCfg.pageSize !== void 0 && pagCfg.pageSize !== innerPageSize) {
|
|
124
141
|
setInnerPageSize(pagCfg.pageSize);
|
|
@@ -126,17 +143,44 @@ var TableInner = ({
|
|
|
126
143
|
}, [pagCfg.pageSize]);
|
|
127
144
|
React.useEffect(() => {
|
|
128
145
|
if (!pagEnabled) return;
|
|
129
|
-
const pages = Math.max(1, Math.ceil(
|
|
146
|
+
const pages = Math.max(1, Math.ceil(totalCount / curPageSize));
|
|
130
147
|
if (!pageControlled && curPage > pages) setInnerPage(pages);
|
|
131
|
-
}, [
|
|
132
|
-
const
|
|
133
|
-
if (!pagEnabled) return
|
|
134
|
-
if (pagCfg.total !== void 0 && pageControlled) {
|
|
135
|
-
return filteredData;
|
|
136
|
-
}
|
|
148
|
+
}, [curPage, curPageSize, pagEnabled, pageControlled, totalCount]);
|
|
149
|
+
const pagedEntries = React.useMemo(() => {
|
|
150
|
+
if (!pagEnabled || remotePagination) return filteredEntries;
|
|
137
151
|
const start = (curPage - 1) * curPageSize;
|
|
138
|
-
return
|
|
139
|
-
}, [
|
|
152
|
+
return filteredEntries.slice(start, start + curPageSize);
|
|
153
|
+
}, [curPage, curPageSize, filteredEntries, pagEnabled, remotePagination]);
|
|
154
|
+
const emitChange = React.useCallback((action, overrides = {}) => {
|
|
155
|
+
const nextCurrent = overrides.current ?? curPage;
|
|
156
|
+
const nextPageSize = overrides.pageSize ?? curPageSize;
|
|
157
|
+
onChange?.({
|
|
158
|
+
action,
|
|
159
|
+
pagination: pagEnabled ? { current: nextCurrent, pageSize: nextPageSize, total: totalCount } : void 0,
|
|
160
|
+
filters: overrides.filters ?? activeFilters,
|
|
161
|
+
sorter: overrides.sorter ?? { key: sortKey, direction: sortKey ? sortDir : void 0 },
|
|
162
|
+
currentData: overrides.currentData ?? filteredData
|
|
163
|
+
});
|
|
164
|
+
}, [activeFilters, curPage, curPageSize, filteredData, onChange, pagEnabled, sortDir, sortKey, totalCount]);
|
|
165
|
+
const setColumnFilter = React.useCallback((column, values) => {
|
|
166
|
+
const nextFilters = { ...activeFilters };
|
|
167
|
+
if (values.length === 0) delete nextFilters[column.key];
|
|
168
|
+
else nextFilters[column.key] = values;
|
|
169
|
+
if (column.filteredValue === void 0) {
|
|
170
|
+
setInnerFilters((previous) => {
|
|
171
|
+
const next = { ...previous };
|
|
172
|
+
if (values.length === 0) delete next[column.key];
|
|
173
|
+
else next[column.key] = values;
|
|
174
|
+
return next;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
if (pagEnabled) {
|
|
178
|
+
if (!pageControlled) setInnerPage(1);
|
|
179
|
+
pagCfg.onChange?.(1, curPageSize);
|
|
180
|
+
}
|
|
181
|
+
const nextData = filterTableEntries(sourceEntries, nextFilters, columnMap).map(({ row }) => row);
|
|
182
|
+
emitChange("filter", { current: 1, filters: nextFilters, currentData: nextData });
|
|
183
|
+
}, [activeFilters, columnMap, curPageSize, emitChange, pagCfg, pagEnabled, pageControlled, sourceEntries]);
|
|
140
184
|
const skipNextPaginationChangeRef = React.useRef(false);
|
|
141
185
|
const onPageChange = (p) => {
|
|
142
186
|
if (skipNextPaginationChangeRef.current) {
|
|
@@ -145,34 +189,38 @@ var TableInner = ({
|
|
|
145
189
|
}
|
|
146
190
|
if (!pageControlled) setInnerPage(p);
|
|
147
191
|
pagCfg.onChange?.(p, curPageSize);
|
|
192
|
+
emitChange("paginate", { current: p });
|
|
148
193
|
};
|
|
149
194
|
const onPageSizeChange = (_current, size) => {
|
|
150
195
|
skipNextPaginationChangeRef.current = true;
|
|
151
196
|
if (!pageControlled) setInnerPage(1);
|
|
152
197
|
if (pagCfg.pageSize === void 0) setInnerPageSize(size);
|
|
153
198
|
pagCfg.onChange?.(1, size);
|
|
199
|
+
emitChange("paginate", { current: 1, pageSize: size });
|
|
154
200
|
};
|
|
155
201
|
const [innerExpanded, setInnerExpanded] = React.useState(
|
|
156
202
|
expandable?.defaultExpandedRowKeys ?? []
|
|
157
203
|
);
|
|
158
204
|
const expandControlled = expandable?.expandedRowKeys !== void 0;
|
|
159
205
|
const expandedKeys = expandControlled ? expandable.expandedRowKeys : innerExpanded;
|
|
206
|
+
const expandedKeySet = React.useMemo(() => new Set(expandedKeys), [expandedKeys]);
|
|
207
|
+
const selectedKeySet = React.useMemo(() => new Set(selectedKeys), [selectedKeys]);
|
|
160
208
|
const hasExpandable = !!expandable?.expandedRowRender;
|
|
161
209
|
const toggleExpand = (row, k) => {
|
|
162
|
-
const isOpen =
|
|
210
|
+
const isOpen = expandedKeySet.has(k);
|
|
163
211
|
const next = isOpen ? expandedKeys.filter((x) => x !== k) : [...expandedKeys, k];
|
|
164
212
|
if (!expandControlled) setInnerExpanded(next);
|
|
165
213
|
expandable?.onExpand?.(!isOpen, row);
|
|
166
214
|
};
|
|
167
215
|
const v = variant ?? (striped ? "striped" : "default");
|
|
168
|
-
const rowsToRender =
|
|
169
|
-
const selectableKeysOnPage = rowsToRender.map((
|
|
216
|
+
const rowsToRender = pagedEntries;
|
|
217
|
+
const selectableKeysOnPage = rowsToRender.map(({ row, key }) => ({ row, k: key })).filter(({ row }) => {
|
|
170
218
|
if (selectionMode !== "new") return true;
|
|
171
219
|
const props = rowSelection?.getCheckboxProps?.(row);
|
|
172
220
|
return !props?.disabled;
|
|
173
221
|
});
|
|
174
|
-
const allSelectedOnPage = selectionMode !== "off" && selectableKeysOnPage.length > 0 && selectableKeysOnPage.every(({ k }) =>
|
|
175
|
-
const someSelectedOnPage = selectionMode !== "off" && selectableKeysOnPage.some(({ k }) =>
|
|
222
|
+
const allSelectedOnPage = selectionMode !== "off" && selectableKeysOnPage.length > 0 && selectableKeysOnPage.every(({ k }) => selectedKeySet.has(k));
|
|
223
|
+
const someSelectedOnPage = selectionMode !== "off" && selectableKeysOnPage.some(({ k }) => selectedKeySet.has(k)) && !allSelectedOnPage;
|
|
176
224
|
const toggleRow = (row, k) => {
|
|
177
225
|
if (selectionMode === "new") {
|
|
178
226
|
const props = rowSelection?.getCheckboxProps?.(row);
|
|
@@ -181,12 +229,13 @@ var TableInner = ({
|
|
|
181
229
|
if (selectionType === "radio") {
|
|
182
230
|
next = [k];
|
|
183
231
|
} else {
|
|
184
|
-
next =
|
|
232
|
+
next = selectedKeySet.has(k) ? selectedKeys.filter((x) => x !== k) : [...selectedKeys, k];
|
|
185
233
|
}
|
|
186
|
-
const
|
|
234
|
+
const nextSet = new Set(next);
|
|
235
|
+
const nextRows = sourceEntries.filter(({ key }) => nextSet.has(key)).map(({ row: item }) => item);
|
|
187
236
|
commitSelected(next, nextRows);
|
|
188
237
|
} else if (selectionMode === "legacy") {
|
|
189
|
-
const next =
|
|
238
|
+
const next = selectedKeySet.has(k) ? selectedKeys.filter((x) => x !== k) : [...selectedKeys, k];
|
|
190
239
|
commitSelected(next, []);
|
|
191
240
|
}
|
|
192
241
|
};
|
|
@@ -196,13 +245,15 @@ var TableInner = ({
|
|
|
196
245
|
if (allSelectedOnPage) {
|
|
197
246
|
const pageKeys = new Set(selectableKeysOnPage.map(({ k }) => k));
|
|
198
247
|
const next = selectedKeys.filter((k) => !pageKeys.has(k));
|
|
199
|
-
const
|
|
248
|
+
const nextSet = new Set(next);
|
|
249
|
+
const nextRows = sourceEntries.filter(({ key }) => nextSet.has(key)).map(({ row }) => row);
|
|
200
250
|
commitSelected(next, nextRows);
|
|
201
251
|
} else {
|
|
202
252
|
const set = new Set(selectedKeys);
|
|
203
253
|
selectableKeysOnPage.forEach(({ k }) => set.add(k));
|
|
204
254
|
const next = Array.from(set);
|
|
205
|
-
const
|
|
255
|
+
const nextSet = new Set(next);
|
|
256
|
+
const nextRows = sourceEntries.filter(({ key }) => nextSet.has(key)).map(({ row }) => row);
|
|
206
257
|
commitSelected(next, nextRows);
|
|
207
258
|
}
|
|
208
259
|
};
|
|
@@ -210,6 +261,18 @@ var TableInner = ({
|
|
|
210
261
|
const showExpandCol = hasExpandable;
|
|
211
262
|
const extraColCount = (showSelCol ? 1 : 0) + (showExpandCol ? 1 : 0);
|
|
212
263
|
const totalColCount = columns.length + extraColCount;
|
|
264
|
+
const handleSort = React.useCallback((columnKey) => {
|
|
265
|
+
const nextDirection = sortKey === columnKey && sortDir === "asc" ? "desc" : "asc";
|
|
266
|
+
onSort?.(columnKey);
|
|
267
|
+
if (pagEnabled) {
|
|
268
|
+
if (!pageControlled) setInnerPage(1);
|
|
269
|
+
pagCfg.onChange?.(1, curPageSize);
|
|
270
|
+
}
|
|
271
|
+
emitChange("sort", {
|
|
272
|
+
current: 1,
|
|
273
|
+
sorter: { key: columnKey, direction: nextDirection }
|
|
274
|
+
});
|
|
275
|
+
}, [curPageSize, emitChange, onSort, pagCfg, pagEnabled, pageControlled, sortDir, sortKey]);
|
|
213
276
|
const wrapStyle = {};
|
|
214
277
|
const innerTableStyle = {};
|
|
215
278
|
let wrapClass = "table-wrap";
|
|
@@ -223,6 +286,11 @@ var TableInner = ({
|
|
|
223
286
|
innerTableStyle.minWidth = scroll.x;
|
|
224
287
|
wrapClass += " scroll-x";
|
|
225
288
|
}
|
|
289
|
+
const {
|
|
290
|
+
className: nativeTableClassName = "",
|
|
291
|
+
style: nativeTableStyle,
|
|
292
|
+
...nativeTableProps
|
|
293
|
+
} = tableProps ?? {};
|
|
226
294
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
227
295
|
/* @__PURE__ */ jsx(
|
|
228
296
|
"div",
|
|
@@ -234,19 +302,22 @@ var TableInner = ({
|
|
|
234
302
|
children: /* @__PURE__ */ jsxs(
|
|
235
303
|
"table",
|
|
236
304
|
{
|
|
237
|
-
|
|
238
|
-
|
|
305
|
+
...nativeTableProps,
|
|
306
|
+
className: `table ${v} ${hoverable ? "hoverable" : ""} ${scroll?.y != null ? "sticky-head" : ""} ${nativeTableClassName}`,
|
|
307
|
+
style: { ...innerTableStyle, ...nativeTableStyle },
|
|
239
308
|
children: [
|
|
309
|
+
caption != null && /* @__PURE__ */ jsx("caption", { children: caption }),
|
|
240
310
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
241
|
-
showExpandCol && /* @__PURE__ */ jsx("th", { className: "row-expand", style: { width: 40 } }),
|
|
242
|
-
showSelCol && /* @__PURE__ */ jsx("th", { className: "row-check", style: { width: 44 }, children: selectionType === "checkbox" && /* @__PURE__ */ jsx(
|
|
311
|
+
showExpandCol && /* @__PURE__ */ jsx("th", { scope: "col", className: "row-expand", style: { width: 40 } }),
|
|
312
|
+
showSelCol && /* @__PURE__ */ jsx("th", { scope: "col", className: "row-check", style: { width: 44 }, children: selectionType === "checkbox" && /* @__PURE__ */ jsx(InternalComponentThemePart, { components: "Checkbox", children: /* @__PURE__ */ jsx(
|
|
243
313
|
Checkbox,
|
|
244
314
|
{
|
|
245
315
|
checked: allSelectedOnPage,
|
|
246
316
|
indeterminate: someSelectedOnPage,
|
|
247
|
-
onChange: toggleAll
|
|
317
|
+
onChange: toggleAll,
|
|
318
|
+
label: /* @__PURE__ */ jsx("span", { className: "table-sr-only", children: "\u9009\u62E9\u5F53\u524D\u9875" })
|
|
248
319
|
}
|
|
249
|
-
) }),
|
|
320
|
+
) }) }),
|
|
250
321
|
columns.map((c) => {
|
|
251
322
|
const sorted = sortKey === c.key;
|
|
252
323
|
const hasFilters = !!c.filters?.length;
|
|
@@ -256,16 +327,29 @@ var TableInner = ({
|
|
|
256
327
|
{
|
|
257
328
|
className: `${c.sortable ? "sortable" : ""} ${sorted ? "sorted" : ""} ${hasFilters ? "filterable" : ""}`,
|
|
258
329
|
style: { width: c.width, textAlign: c.align ?? "left" },
|
|
259
|
-
|
|
330
|
+
scope: "col",
|
|
331
|
+
"aria-sort": c.sortable ? sorted ? sortDir === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
260
332
|
children: [
|
|
261
|
-
/* @__PURE__ */ jsx(
|
|
262
|
-
|
|
263
|
-
Icon,
|
|
333
|
+
c.sortable ? /* @__PURE__ */ jsx(InternalComponentThemePart, { components: "Button", children: /* @__PURE__ */ jsxs(
|
|
334
|
+
Button,
|
|
264
335
|
{
|
|
265
|
-
|
|
266
|
-
size:
|
|
336
|
+
type: "button",
|
|
337
|
+
size: "sm",
|
|
338
|
+
variant: "ghost",
|
|
339
|
+
className: "table-sort-trigger",
|
|
340
|
+
onClick: () => handleSort(c.key),
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ jsx("span", { className: "th-label", children: c.title }),
|
|
343
|
+
/* @__PURE__ */ jsx("span", { className: "sort-ind", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
344
|
+
Icon,
|
|
345
|
+
{
|
|
346
|
+
name: sorted ? sortDir === "asc" ? "chevUp" : "chevDown" : "chevDown",
|
|
347
|
+
size: 10
|
|
348
|
+
}
|
|
349
|
+
) })
|
|
350
|
+
]
|
|
267
351
|
}
|
|
268
|
-
) }),
|
|
352
|
+
) }) : /* @__PURE__ */ jsx("span", { className: "th-label", children: c.title }),
|
|
269
353
|
hasFilters && /* @__PURE__ */ jsx(
|
|
270
354
|
ColumnFilterButton,
|
|
271
355
|
{
|
|
@@ -281,12 +365,11 @@ var TableInner = ({
|
|
|
281
365
|
);
|
|
282
366
|
})
|
|
283
367
|
] }) }),
|
|
284
|
-
/* @__PURE__ */ jsx("tbody", { children: rowsToRender.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: totalColCount, className: "table-empty", children: empty }) }) : rowsToRender.map((row, i) => {
|
|
285
|
-
const
|
|
286
|
-
const isSel = selectedKeys.includes(k);
|
|
368
|
+
/* @__PURE__ */ jsx("tbody", { children: rowsToRender.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: totalColCount, className: "table-empty", children: empty }) }) : rowsToRender.map(({ row, key: k }, i) => {
|
|
369
|
+
const isSel = selectedKeySet.has(k);
|
|
287
370
|
const selProps = rowSelection?.getCheckboxProps?.(row);
|
|
288
371
|
const canExpand = hasExpandable && (expandable?.rowExpandable?.(row) ?? true);
|
|
289
|
-
const isExpanded = canExpand &&
|
|
372
|
+
const isExpanded = canExpand && expandedKeySet.has(k);
|
|
290
373
|
const cardSurfaceTarget = showExpandCol ? "__expand" : showSelCol ? "__select" : columns[0]?.key;
|
|
291
374
|
const cardRowSurface = v === "cards" ? /* @__PURE__ */ jsx("span", { className: "card-row-surface", "aria-hidden": "true" }) : null;
|
|
292
375
|
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
@@ -295,6 +378,15 @@ var TableInner = ({
|
|
|
295
378
|
{
|
|
296
379
|
className: `${onRowClick ? "clickable" : ""} ${isSel ? "selected" : ""}`,
|
|
297
380
|
onClick: onRowClick ? () => onRowClick(row, i) : void 0,
|
|
381
|
+
tabIndex: onRowClick ? 0 : void 0,
|
|
382
|
+
"aria-selected": selectionMode !== "off" ? isSel : void 0,
|
|
383
|
+
onKeyDown: onRowClick ? (event) => {
|
|
384
|
+
if (event.currentTarget !== event.target) return;
|
|
385
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
386
|
+
event.preventDefault();
|
|
387
|
+
onRowClick(row, i);
|
|
388
|
+
}
|
|
389
|
+
} : void 0,
|
|
298
390
|
children: [
|
|
299
391
|
showExpandCol && /* @__PURE__ */ jsxs(
|
|
300
392
|
"td",
|
|
@@ -327,10 +419,7 @@ var TableInner = ({
|
|
|
327
419
|
"td",
|
|
328
420
|
{
|
|
329
421
|
className: "row-check",
|
|
330
|
-
onClick: (
|
|
331
|
-
e.stopPropagation();
|
|
332
|
-
toggleRow(row, k);
|
|
333
|
-
},
|
|
422
|
+
onClick: (event) => event.stopPropagation(),
|
|
334
423
|
children: [
|
|
335
424
|
cardSurfaceTarget === "__select" && cardRowSurface,
|
|
336
425
|
selectionType === "radio" ? /* @__PURE__ */ jsx(
|
|
@@ -339,6 +428,7 @@ var TableInner = ({
|
|
|
339
428
|
type: "button",
|
|
340
429
|
role: "radio",
|
|
341
430
|
"aria-checked": isSel,
|
|
431
|
+
"aria-label": `\u9009\u62E9\u7B2C ${i + 1} \u884C`,
|
|
342
432
|
disabled: selProps?.disabled,
|
|
343
433
|
className: `radio-dot ${isSel ? "checked" : ""}`,
|
|
344
434
|
onClick: (e) => {
|
|
@@ -346,14 +436,19 @@ var TableInner = ({
|
|
|
346
436
|
toggleRow(row, k);
|
|
347
437
|
}
|
|
348
438
|
}
|
|
349
|
-
) : /* @__PURE__ */ jsx(
|
|
439
|
+
) : /* @__PURE__ */ jsx(InternalComponentThemePart, { components: "Checkbox", children: /* @__PURE__ */ jsx(
|
|
350
440
|
Checkbox,
|
|
351
441
|
{
|
|
352
442
|
checked: isSel,
|
|
353
443
|
disabled: selProps?.disabled,
|
|
354
|
-
onChange: () => toggleRow(row, k)
|
|
444
|
+
onChange: () => toggleRow(row, k),
|
|
445
|
+
label: /* @__PURE__ */ jsxs("span", { className: "table-sr-only", children: [
|
|
446
|
+
"\u9009\u62E9\u7B2C ",
|
|
447
|
+
i + 1,
|
|
448
|
+
" \u884C"
|
|
449
|
+
] })
|
|
355
450
|
}
|
|
356
|
-
)
|
|
451
|
+
) })
|
|
357
452
|
]
|
|
358
453
|
}
|
|
359
454
|
),
|
|
@@ -375,7 +470,7 @@ var TableInner = ({
|
|
|
375
470
|
)
|
|
376
471
|
}
|
|
377
472
|
),
|
|
378
|
-
pagEnabled && /* @__PURE__ */ jsx("div", { className: "table-pagination", children: /* @__PURE__ */ jsx(
|
|
473
|
+
pagEnabled && /* @__PURE__ */ jsx("div", { className: "table-pagination", children: /* @__PURE__ */ jsx(InternalComponentThemePart, { components: "Pagination", children: /* @__PURE__ */ jsx(
|
|
379
474
|
Pagination,
|
|
380
475
|
{
|
|
381
476
|
total: totalCount,
|
|
@@ -387,11 +482,16 @@ var TableInner = ({
|
|
|
387
482
|
pageSizeOptions: pagCfg.pageSizeOptions,
|
|
388
483
|
onShowSizeChange: onPageSizeChange
|
|
389
484
|
}
|
|
390
|
-
) })
|
|
485
|
+
) }) })
|
|
391
486
|
] });
|
|
392
487
|
};
|
|
393
|
-
var
|
|
394
|
-
|
|
488
|
+
var TableBase = React.forwardRef(TableInner);
|
|
489
|
+
TableBase.displayName = "Table";
|
|
490
|
+
var Table = withComponentTheme(
|
|
491
|
+
TableBase,
|
|
492
|
+
"Table",
|
|
493
|
+
["table", "button", "checkbox", "pagination", "select", "input"]
|
|
494
|
+
);
|
|
395
495
|
function ColumnFilterButton({
|
|
396
496
|
column,
|
|
397
497
|
activeValues,
|
|
@@ -400,16 +500,32 @@ function ColumnFilterButton({
|
|
|
400
500
|
}) {
|
|
401
501
|
const [open, setOpen] = React.useState(false);
|
|
402
502
|
const [draft, setDraft] = React.useState(activeValues);
|
|
403
|
-
const
|
|
404
|
-
const
|
|
503
|
+
const portalContainer = usePortalContainer();
|
|
504
|
+
const portalTheme = useComponentPortalTheme(["Table", "TablePro"]);
|
|
505
|
+
const panelId = React.useId();
|
|
506
|
+
const { triggerRef, floatingRef: panelRef, floatingStyle, zIndex: panelZIndex } = useFloating({
|
|
405
507
|
open,
|
|
406
508
|
placement: "bottom",
|
|
407
509
|
panelWidth: 200,
|
|
408
510
|
panelHeight: Math.min(260, (column.filters?.length ?? 0) * 32 + 80),
|
|
409
511
|
alignCross: "end"
|
|
410
512
|
});
|
|
513
|
+
const closeFromEscape = React.useCallback(() => {
|
|
514
|
+
setOpen(false);
|
|
515
|
+
window.requestAnimationFrame(() => triggerRef.current?.focus());
|
|
516
|
+
}, [triggerRef]);
|
|
517
|
+
useOverlayLayer({
|
|
518
|
+
open: open && portalContainer != null,
|
|
519
|
+
containerRef: panelRef,
|
|
520
|
+
ownerRef: triggerRef,
|
|
521
|
+
zIndex: panelZIndex,
|
|
522
|
+
onEscape: closeFromEscape
|
|
523
|
+
});
|
|
411
524
|
React.useEffect(() => {
|
|
412
|
-
if (open)
|
|
525
|
+
if (open) {
|
|
526
|
+
setDraft(activeValues);
|
|
527
|
+
window.requestAnimationFrame(() => panelRef.current?.focus());
|
|
528
|
+
}
|
|
413
529
|
}, [open, activeValues]);
|
|
414
530
|
React.useEffect(() => {
|
|
415
531
|
if (!open) return;
|
|
@@ -424,45 +540,54 @@ function ColumnFilterButton({
|
|
|
424
540
|
}, [open]);
|
|
425
541
|
const toggle = (v) => setDraft((d) => d.includes(v) ? d.filter((x) => x !== v) : [...d, v]);
|
|
426
542
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
427
|
-
/* @__PURE__ */ jsx(
|
|
428
|
-
|
|
543
|
+
/* @__PURE__ */ jsx(InternalComponentThemePart, { components: "IconButton", children: /* @__PURE__ */ jsx(
|
|
544
|
+
IconButton,
|
|
429
545
|
{
|
|
430
546
|
ref: triggerRef,
|
|
431
|
-
|
|
547
|
+
icon: "filter",
|
|
548
|
+
size: "sm",
|
|
549
|
+
variant: "ghost",
|
|
432
550
|
className: `filter-ind ${active ? "active" : ""}`,
|
|
433
|
-
|
|
551
|
+
tip: "\u7B5B\u9009\u5217",
|
|
552
|
+
"aria-expanded": open,
|
|
553
|
+
"aria-controls": open ? panelId : void 0,
|
|
554
|
+
"aria-haspopup": "dialog",
|
|
434
555
|
onClick: (e) => {
|
|
435
556
|
e.stopPropagation();
|
|
436
557
|
setOpen((o) => !o);
|
|
437
|
-
}
|
|
438
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "filter", size: 10 })
|
|
558
|
+
}
|
|
439
559
|
}
|
|
440
|
-
),
|
|
441
|
-
open &&
|
|
560
|
+
) }),
|
|
561
|
+
open && portalContainer && createPortal(
|
|
442
562
|
/* @__PURE__ */ jsxs(
|
|
443
563
|
"div",
|
|
444
564
|
{
|
|
565
|
+
id: panelId,
|
|
445
566
|
ref: panelRef,
|
|
446
567
|
className: "table-filter-panel",
|
|
447
|
-
|
|
568
|
+
...portalTheme.dataAttributes,
|
|
569
|
+
style: { ...floatingStyle, ...portalTheme.style, ...portalTheme.styles.popup },
|
|
570
|
+
role: "dialog",
|
|
571
|
+
"aria-label": "\u5217\u7B5B\u9009",
|
|
572
|
+
tabIndex: -1,
|
|
448
573
|
onClick: (e) => e.stopPropagation(),
|
|
449
574
|
children: [
|
|
450
|
-
/* @__PURE__ */ jsx("div", { className: "table-filter-options", children: (column.filters ?? []).map((f) => /* @__PURE__ */
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
/* @__PURE__ */ jsxs("div", { className: "table-filter-actions", children: [
|
|
575
|
+
/* @__PURE__ */ jsx("div", { className: "table-filter-options", children: (column.filters ?? []).map((f) => /* @__PURE__ */ jsx(InternalComponentThemePart, { components: "Checkbox", children: /* @__PURE__ */ jsx(
|
|
576
|
+
Checkbox,
|
|
577
|
+
{
|
|
578
|
+
className: "table-filter-item",
|
|
579
|
+
label: f.text,
|
|
580
|
+
checked: draft.includes(f.value),
|
|
581
|
+
onChange: () => toggle(f.value)
|
|
582
|
+
}
|
|
583
|
+
) }, String(f.value))) }),
|
|
584
|
+
/* @__PURE__ */ jsx("div", { className: "table-filter-actions", children: /* @__PURE__ */ jsxs(InternalComponentThemePart, { components: "Button", children: [
|
|
461
585
|
/* @__PURE__ */ jsx(
|
|
462
|
-
|
|
586
|
+
Button,
|
|
463
587
|
{
|
|
464
|
-
|
|
465
|
-
|
|
588
|
+
size: "sm",
|
|
589
|
+
variant: "ghost",
|
|
590
|
+
className: "tf-btn",
|
|
466
591
|
onClick: () => {
|
|
467
592
|
setDraft([]);
|
|
468
593
|
onApply([]);
|
|
@@ -472,10 +597,11 @@ function ColumnFilterButton({
|
|
|
472
597
|
}
|
|
473
598
|
),
|
|
474
599
|
/* @__PURE__ */ jsx(
|
|
475
|
-
|
|
600
|
+
Button,
|
|
476
601
|
{
|
|
477
|
-
|
|
478
|
-
|
|
602
|
+
size: "sm",
|
|
603
|
+
variant: "primary",
|
|
604
|
+
className: "tf-btn",
|
|
479
605
|
onClick: () => {
|
|
480
606
|
onApply(draft);
|
|
481
607
|
setOpen(false);
|
|
@@ -483,11 +609,11 @@ function ColumnFilterButton({
|
|
|
483
609
|
children: "\u786E\u5B9A"
|
|
484
610
|
}
|
|
485
611
|
)
|
|
486
|
-
] })
|
|
612
|
+
] }) })
|
|
487
613
|
]
|
|
488
614
|
}
|
|
489
615
|
),
|
|
490
|
-
|
|
616
|
+
portalContainer
|
|
491
617
|
)
|
|
492
618
|
] });
|
|
493
619
|
}
|