@fangxinyan/lumina 0.6.18 → 0.8.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 +28 -3
- package/dist/Select.d.ts +28 -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 +18 -12
- package/dist/Splitter.d.ts +18 -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-KB6EEBDJ.css} +105 -53
- package/dist/Table.cjs +14 -10
- package/dist/Table.d.cts +38 -3
- package/dist/Table.d.ts +38 -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-FB2AMBWL.css} +24 -10
- package/dist/Tabs.cjs +4 -2
- package/dist/Tabs.d.cts +8 -2
- package/dist/Tabs.d.ts +8 -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-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-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-2FOC3D6X.js → chunk-63RSKQID.js} +23 -7
- 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-BVQOJKRX.js → chunk-BKW5PXEO.js} +115 -72
- package/dist/chunk-DRDDQCDD.js +322 -0
- package/dist/chunk-DU2DSERH.js +190 -0
- package/dist/chunk-DURKCGEM.js +496 -0
- package/dist/{chunk-PSQ3HNZP.cjs → chunk-E66PSVBU.cjs} +106 -19
- package/dist/chunk-EAUB6FEN.js +262 -0
- package/dist/chunk-EE5KXDRK.cjs +1223 -0
- package/dist/chunk-EE7IJ3MB.js +1 -0
- 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-V5SQOZPF.js → chunk-HQNDVNTQ.js} +38 -20
- 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-IJDM2U3B.js +100 -0
- package/dist/chunk-J5UEQ3ZQ.js +226 -0
- package/dist/chunk-JBS353O4.cjs +248 -0
- package/dist/{chunk-IPSNC5VZ.js → chunk-JHM7MN3G.js} +15 -7
- 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-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-L6GIV5DQ.cjs → chunk-PJFYIXBX.cjs} +40 -22
- package/dist/{chunk-NXBFEIUX.cjs → chunk-PNKNZREC.cjs} +266 -130
- 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-BW76ENTW.cjs → chunk-RERMZNF3.cjs} +10 -9
- package/dist/chunk-RMGFRAZ2.cjs +270 -0
- package/dist/chunk-RPO7657K.js +228 -0
- package/dist/chunk-RR7KWH26.cjs +122 -0
- package/dist/chunk-SF7BPXDJ.cjs +518 -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-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-4ACCOYBY.cjs → chunk-WHBKQZU5.cjs} +24 -8
- package/dist/{chunk-UGAN4BBW.js → chunk-WMISXERU.js} +262 -126
- package/dist/{chunk-MYW7LNB2.cjs → chunk-WROF2PVG.cjs} +40 -21
- 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 +1663 -695
- 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 +27 -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 +48 -2
- package/docs/llms/sidebar.md +24 -0
- package/docs/llms/slider.md +5 -2
- package/docs/llms/splitter.md +17 -3
- package/docs/llms/switch.md +13 -0
- package/docs/llms/table.md +7 -8
- package/docs/llms/tablepro.md +23 -1
- package/docs/llms/tabs.md +21 -0
- 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-E22OIVYP.js +0 -349
- 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-UW57F3UO.cjs +0 -371
- 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,8 +1,11 @@
|
|
|
1
|
-
import { useFloating } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import './
|
|
1
|
+
import { useFloating } from './chunk-3QXP2ZNP.js';
|
|
2
|
+
import { useOverlayLayer } from './chunk-2A4GYSN4.js';
|
|
3
|
+
import { Icon } from './chunk-LQMOYVQF.js';
|
|
4
|
+
import { useComponentPortalTheme, withComponentTheme } from './chunk-DRDDQCDD.js';
|
|
5
|
+
import { usePortalContainer } from './chunk-ULTDRMGN.js';
|
|
6
|
+
import './tokens-CEJVVA3G.css';
|
|
4
7
|
import './shared-NJHRNLRH.css';
|
|
5
|
-
import './Typography-
|
|
8
|
+
import './Typography-CQ2OZXQH.css';
|
|
6
9
|
import * as React from 'react';
|
|
7
10
|
import { createPortal } from 'react-dom';
|
|
8
11
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -41,8 +44,44 @@ function assignRef(ref, value) {
|
|
|
41
44
|
}
|
|
42
45
|
ref.current = value;
|
|
43
46
|
}
|
|
47
|
+
function getNativeTypographyProps(props) {
|
|
48
|
+
const {
|
|
49
|
+
type: _type,
|
|
50
|
+
disabled: _disabled,
|
|
51
|
+
mark: _mark,
|
|
52
|
+
code: _code,
|
|
53
|
+
keyboard: _keyboard,
|
|
54
|
+
underline: _underline,
|
|
55
|
+
delete: _delete,
|
|
56
|
+
strong: _strong,
|
|
57
|
+
italic: _italic,
|
|
58
|
+
copyable: _copyable,
|
|
59
|
+
editable: _editable,
|
|
60
|
+
ellipsis: _ellipsis,
|
|
61
|
+
className: _className,
|
|
62
|
+
style: _style,
|
|
63
|
+
children: _children,
|
|
64
|
+
...nativeProps
|
|
65
|
+
} = props;
|
|
66
|
+
return nativeProps;
|
|
67
|
+
}
|
|
68
|
+
function composeTypographyRef(internalRef, forwardedRef) {
|
|
69
|
+
return (node) => {
|
|
70
|
+
internalRef.current = node;
|
|
71
|
+
assignRef(forwardedRef, node);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
44
74
|
var EllipsisTooltip = React.forwardRef(({ content, children }, forwardedRef) => {
|
|
45
75
|
const [open, setOpen] = React.useState(false);
|
|
76
|
+
const tooltipId = React.useId();
|
|
77
|
+
const portalContainer = usePortalContainer();
|
|
78
|
+
const portalTheme = useComponentPortalTheme([
|
|
79
|
+
"Typography",
|
|
80
|
+
"Title",
|
|
81
|
+
"Text",
|
|
82
|
+
"Paragraph",
|
|
83
|
+
"Link"
|
|
84
|
+
]);
|
|
46
85
|
const openTimerRef = React.useRef();
|
|
47
86
|
const closeTimerRef = React.useRef();
|
|
48
87
|
const childRef = children.ref;
|
|
@@ -50,7 +89,8 @@ var EllipsisTooltip = React.forwardRef(({ content, children }, forwardedRef) =>
|
|
|
50
89
|
triggerRef,
|
|
51
90
|
floatingRef,
|
|
52
91
|
floatingStyle,
|
|
53
|
-
placement
|
|
92
|
+
placement,
|
|
93
|
+
zIndex: tooltipZIndex
|
|
54
94
|
} = useFloating({
|
|
55
95
|
open,
|
|
56
96
|
placement: "top",
|
|
@@ -58,6 +98,13 @@ var EllipsisTooltip = React.forwardRef(({ content, children }, forwardedRef) =>
|
|
|
58
98
|
panelHeight: 96,
|
|
59
99
|
alignCross: "center"
|
|
60
100
|
});
|
|
101
|
+
useOverlayLayer({
|
|
102
|
+
open: open && portalContainer != null,
|
|
103
|
+
containerRef: floatingRef,
|
|
104
|
+
ownerRef: triggerRef,
|
|
105
|
+
zIndex: tooltipZIndex,
|
|
106
|
+
onEscape: () => setOpen(false)
|
|
107
|
+
});
|
|
61
108
|
React.useEffect(() => {
|
|
62
109
|
return () => {
|
|
63
110
|
window.clearTimeout(openTimerRef.current);
|
|
@@ -90,6 +137,7 @@ var EllipsisTooltip = React.forwardRef(({ content, children }, forwardedRef) =>
|
|
|
90
137
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
91
138
|
React.cloneElement(children, {
|
|
92
139
|
ref: setTriggerRef,
|
|
140
|
+
"aria-describedby": open ? [childProps["aria-describedby"], tooltipId].filter(Boolean).join(" ") : childProps["aria-describedby"],
|
|
93
141
|
onMouseEnter: (event) => {
|
|
94
142
|
childProps.onMouseEnter?.(event);
|
|
95
143
|
show();
|
|
@@ -127,13 +175,15 @@ var EllipsisTooltip = React.forwardRef(({ content, children }, forwardedRef) =>
|
|
|
127
175
|
hide();
|
|
128
176
|
}
|
|
129
177
|
}),
|
|
130
|
-
open &&
|
|
178
|
+
open && portalContainer && createPortal(
|
|
131
179
|
/* @__PURE__ */ jsx(
|
|
132
180
|
"div",
|
|
133
181
|
{
|
|
182
|
+
id: tooltipId,
|
|
134
183
|
ref: floatingRef,
|
|
135
184
|
className: `typo-ellipsis-tooltip ${placement}`,
|
|
136
|
-
|
|
185
|
+
...portalTheme.dataAttributes,
|
|
186
|
+
style: { ...floatingStyle, ...portalTheme.style, ...portalTheme.styles.popup },
|
|
137
187
|
role: "tooltip",
|
|
138
188
|
onMouseEnter: show,
|
|
139
189
|
onMouseMove: show,
|
|
@@ -144,58 +194,80 @@ var EllipsisTooltip = React.forwardRef(({ content, children }, forwardedRef) =>
|
|
|
144
194
|
children: content
|
|
145
195
|
}
|
|
146
196
|
),
|
|
147
|
-
|
|
197
|
+
portalContainer
|
|
148
198
|
)
|
|
149
199
|
] });
|
|
150
200
|
});
|
|
151
201
|
EllipsisTooltip.displayName = "Typography.EllipsisTooltip";
|
|
202
|
+
async function writeTypographyClipboard(text, format) {
|
|
203
|
+
if (typeof navigator !== "undefined" && navigator.clipboard) {
|
|
204
|
+
if (format === "text/html" && navigator.clipboard.write && typeof ClipboardItem !== "undefined") {
|
|
205
|
+
await navigator.clipboard.write([
|
|
206
|
+
new ClipboardItem({ "text/html": new Blob([text], { type: "text/html" }) })
|
|
207
|
+
]);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
if (navigator.clipboard.writeText) {
|
|
211
|
+
await navigator.clipboard.writeText(text);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (typeof document === "undefined") throw new Error("Clipboard is unavailable");
|
|
216
|
+
const textarea = document.createElement("textarea");
|
|
217
|
+
textarea.value = text;
|
|
218
|
+
textarea.setAttribute("readonly", "");
|
|
219
|
+
textarea.style.position = "fixed";
|
|
220
|
+
textarea.style.inset = "-9999px auto auto -9999px";
|
|
221
|
+
document.body.appendChild(textarea);
|
|
222
|
+
textarea.select();
|
|
223
|
+
const copied = document.execCommand?.("copy") ?? false;
|
|
224
|
+
textarea.remove();
|
|
225
|
+
if (!copied) throw new Error("Clipboard write failed");
|
|
226
|
+
}
|
|
152
227
|
var CopyAction = ({ config, fallbackText }) => {
|
|
153
|
-
const [
|
|
228
|
+
const [status, setStatus] = React.useState("idle");
|
|
154
229
|
const timerRef = React.useRef(null);
|
|
155
230
|
React.useEffect(() => {
|
|
156
231
|
return () => {
|
|
157
232
|
if (timerRef.current != null) window.clearTimeout(timerRef.current);
|
|
158
233
|
};
|
|
159
234
|
}, []);
|
|
160
|
-
const handleCopy = (event) => {
|
|
235
|
+
const handleCopy = async (event) => {
|
|
161
236
|
event.stopPropagation();
|
|
162
237
|
const text = config.text ?? fallbackText;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
238
|
+
try {
|
|
239
|
+
await writeTypographyClipboard(text, config.format ?? "text/plain");
|
|
240
|
+
config.onCopy?.(event);
|
|
241
|
+
setStatus("copied");
|
|
242
|
+
} catch (error) {
|
|
243
|
+
config.onCopyError?.(error);
|
|
244
|
+
setStatus("error");
|
|
166
245
|
}
|
|
167
|
-
config.onCopy?.(event);
|
|
168
|
-
setCopied(true);
|
|
169
246
|
if (timerRef.current != null) window.clearTimeout(timerRef.current);
|
|
170
|
-
timerRef.current = window.setTimeout(() =>
|
|
247
|
+
timerRef.current = window.setTimeout(() => setStatus("idle"), 2400);
|
|
171
248
|
};
|
|
172
249
|
const [defIcon, doneIcon] = config.icon ?? [
|
|
173
250
|
/* @__PURE__ */ jsx(Icon, { name: "copy", size: 12 }, "def"),
|
|
174
251
|
/* @__PURE__ */ jsx(Icon, { name: "check", size: 12 }, "done")
|
|
175
252
|
];
|
|
176
|
-
const tipText = config.tooltips === false ? void 0 : Array.isArray(config.tooltips) ? copied ? config.tooltips[1] : config.tooltips[0] : copied ? "\u5DF2\u590D\u5236" : "\u590D\u5236";
|
|
253
|
+
const tipText = config.tooltips === false ? void 0 : status === "error" ? "\u590D\u5236\u5931\u8D25" : Array.isArray(config.tooltips) ? status === "copied" ? config.tooltips[1] : config.tooltips[0] : status === "copied" ? "\u5DF2\u590D\u5236" : "\u590D\u5236";
|
|
177
254
|
return /* @__PURE__ */ jsx(
|
|
178
|
-
"
|
|
255
|
+
"button",
|
|
179
256
|
{
|
|
180
|
-
|
|
181
|
-
"aria-label": typeof tipText === "string" ? tipText : "
|
|
182
|
-
tabIndex: 0,
|
|
257
|
+
type: "button",
|
|
258
|
+
"aria-label": typeof tipText === "string" ? tipText : "\u590D\u5236",
|
|
183
259
|
title: typeof tipText === "string" ? tipText : void 0,
|
|
184
|
-
onClick: handleCopy,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
e.preventDefault();
|
|
188
|
-
handleCopy(e);
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
className: `typo-action typo-copy ${copied ? "copied" : ""}`,
|
|
192
|
-
children: copied ? doneIcon : defIcon
|
|
260
|
+
onClick: (event) => void handleCopy(event),
|
|
261
|
+
className: `typo-action typo-copy ${status}`,
|
|
262
|
+
children: status === "copied" ? doneIcon : defIcon
|
|
193
263
|
}
|
|
194
264
|
);
|
|
195
265
|
};
|
|
196
|
-
var EditableEditor = ({ initial, multiline, maxLength, autoSize, onConfirm, onCancel }) => {
|
|
266
|
+
var EditableEditor = ({ initial, multiline, maxLength, autoSize, enterIcon, onConfirm, onCancel }) => {
|
|
197
267
|
const [value, setValue] = React.useState(initial);
|
|
198
268
|
const ref = React.useRef(null);
|
|
269
|
+
const groupRef = React.useRef(null);
|
|
270
|
+
const finishedRef = React.useRef(false);
|
|
199
271
|
React.useEffect(() => {
|
|
200
272
|
const el = ref.current;
|
|
201
273
|
if (el) {
|
|
@@ -204,6 +276,10 @@ var EditableEditor = ({ initial, multiline, maxLength, autoSize, onConfirm, onCa
|
|
|
204
276
|
el.setSelectionRange(len, len);
|
|
205
277
|
}
|
|
206
278
|
}, []);
|
|
279
|
+
React.useEffect(() => {
|
|
280
|
+
setValue(initial);
|
|
281
|
+
finishedRef.current = false;
|
|
282
|
+
}, [initial]);
|
|
207
283
|
const resize = React.useCallback(() => {
|
|
208
284
|
const el = ref.current;
|
|
209
285
|
if (!el || !multiline || !autoSize) return;
|
|
@@ -221,15 +297,38 @@ var EditableEditor = ({ initial, multiline, maxLength, autoSize, onConfirm, onCa
|
|
|
221
297
|
React.useEffect(() => {
|
|
222
298
|
resize();
|
|
223
299
|
}, [value, resize]);
|
|
300
|
+
const confirm = () => {
|
|
301
|
+
if (finishedRef.current) return;
|
|
302
|
+
finishedRef.current = true;
|
|
303
|
+
try {
|
|
304
|
+
onConfirm(value);
|
|
305
|
+
} finally {
|
|
306
|
+
finishedRef.current = false;
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
const cancel = () => {
|
|
310
|
+
if (finishedRef.current) return;
|
|
311
|
+
finishedRef.current = true;
|
|
312
|
+
try {
|
|
313
|
+
onCancel();
|
|
314
|
+
} finally {
|
|
315
|
+
finishedRef.current = false;
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
const handleGroupBlur = (event) => {
|
|
319
|
+
const nextTarget = event.relatedTarget;
|
|
320
|
+
if (nextTarget instanceof Node && groupRef.current?.contains(nextTarget)) return;
|
|
321
|
+
cancel();
|
|
322
|
+
};
|
|
224
323
|
const handleKeyDown = (e) => {
|
|
225
324
|
if (e.key === "Escape") {
|
|
226
325
|
e.preventDefault();
|
|
227
|
-
|
|
326
|
+
cancel();
|
|
228
327
|
return;
|
|
229
328
|
}
|
|
230
329
|
if (e.key === "Enter" && (!multiline || (e.metaKey || e.ctrlKey))) {
|
|
231
330
|
e.preventDefault();
|
|
232
|
-
|
|
331
|
+
confirm();
|
|
233
332
|
}
|
|
234
333
|
};
|
|
235
334
|
const common = {
|
|
@@ -238,10 +337,26 @@ var EditableEditor = ({ initial, multiline, maxLength, autoSize, onConfirm, onCa
|
|
|
238
337
|
maxLength,
|
|
239
338
|
className: "typo-editor",
|
|
240
339
|
onChange: (e) => setValue(e.target.value),
|
|
241
|
-
onBlur: () => onConfirm(value),
|
|
242
340
|
onKeyDown: handleKeyDown
|
|
243
341
|
};
|
|
244
|
-
|
|
342
|
+
const editor = multiline ? /* @__PURE__ */ jsx("textarea", { rows: 1, ...common }) : /* @__PURE__ */ jsx("input", { type: "text", ...common });
|
|
343
|
+
const resolvedEnterIcon = enterIcon === void 0 ? /* @__PURE__ */ jsx(Icon, { name: "check", size: 12 }) : enterIcon;
|
|
344
|
+
const showEnterAction = !multiline && resolvedEnterIcon !== null && resolvedEnterIcon !== false;
|
|
345
|
+
return /* @__PURE__ */ jsxs("span", { ref: groupRef, className: "typo-editor-wrap", onBlur: handleGroupBlur, children: [
|
|
346
|
+
editor,
|
|
347
|
+
showEnterAction && /* @__PURE__ */ jsx(
|
|
348
|
+
"button",
|
|
349
|
+
{
|
|
350
|
+
type: "button",
|
|
351
|
+
className: "typo-action typo-enter",
|
|
352
|
+
"aria-label": "\u786E\u8BA4\u7F16\u8F91",
|
|
353
|
+
title: "\u786E\u8BA4\u7F16\u8F91",
|
|
354
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
355
|
+
onClick: confirm,
|
|
356
|
+
children: resolvedEnterIcon
|
|
357
|
+
}
|
|
358
|
+
)
|
|
359
|
+
] });
|
|
245
360
|
};
|
|
246
361
|
function useTypographyBody(props) {
|
|
247
362
|
const fallbackText = React.useMemo(
|
|
@@ -272,9 +387,29 @@ function useTypographyBody(props) {
|
|
|
272
387
|
};
|
|
273
388
|
const ellipsis = props.ellipsis;
|
|
274
389
|
const ellConf = ellipsis && typeof ellipsis === "object" ? ellipsis : {};
|
|
275
|
-
const rows = ellConf.rows ?? props.ellipsisRows ?? 1;
|
|
390
|
+
const rows = Math.max(1, Math.floor(ellConf.rows ?? props.ellipsisRows ?? 1));
|
|
276
391
|
const wantClamp = !!ellipsis;
|
|
277
392
|
const [expanded, setExpanded] = React.useState(false);
|
|
393
|
+
const [truncated, setTruncated] = React.useState(false);
|
|
394
|
+
const elementRef = React.useRef(null);
|
|
395
|
+
const ellipsisContentRef = React.useRef(null);
|
|
396
|
+
React.useEffect(() => setExpanded(false), [fallbackText, rows, wantClamp]);
|
|
397
|
+
React.useLayoutEffect(() => {
|
|
398
|
+
const element = ellConf.suffix ? ellipsisContentRef.current : elementRef.current;
|
|
399
|
+
if (!element || !wantClamp || expanded) {
|
|
400
|
+
setTruncated(false);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
const measure = () => {
|
|
404
|
+
const next = rows > 1 ? element.scrollHeight > element.clientHeight + 1 : element.scrollWidth > element.clientWidth + 1;
|
|
405
|
+
setTruncated(next);
|
|
406
|
+
};
|
|
407
|
+
measure();
|
|
408
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
409
|
+
const observer = new ResizeObserver(measure);
|
|
410
|
+
observer.observe(element);
|
|
411
|
+
return () => observer.disconnect();
|
|
412
|
+
}, [ellConf.suffix, expanded, fallbackText, rows, wantClamp]);
|
|
278
413
|
let inner = props.children;
|
|
279
414
|
if (props.code) inner = /* @__PURE__ */ jsx("code", { children: inner });
|
|
280
415
|
if (props.keyboard) inner = /* @__PURE__ */ jsx("kbd", { children: inner });
|
|
@@ -284,41 +419,43 @@ function useTypographyBody(props) {
|
|
|
284
419
|
if (props.strong) inner = /* @__PURE__ */ jsx("strong", { children: inner });
|
|
285
420
|
if (props.italic) inner = /* @__PURE__ */ jsx("i", { children: inner });
|
|
286
421
|
let copyNode = null;
|
|
287
|
-
if (props.copyable) {
|
|
422
|
+
if (props.copyable && !props.disabled) {
|
|
288
423
|
const conf = typeof props.copyable === "object" ? props.copyable : {};
|
|
289
424
|
copyNode = /* @__PURE__ */ jsx(CopyAction, { config: conf, fallbackText });
|
|
290
425
|
}
|
|
291
426
|
let editIconNode = null;
|
|
292
|
-
if (editable) {
|
|
427
|
+
if (editable && !props.disabled && triggers.includes("icon")) {
|
|
293
428
|
const tip = editConf.tooltip ?? "\u7F16\u8F91";
|
|
294
429
|
editIconNode = /* @__PURE__ */ jsx(
|
|
295
|
-
"
|
|
430
|
+
"button",
|
|
296
431
|
{
|
|
297
|
-
|
|
298
|
-
"aria-label": typeof tip === "string" ? tip : "
|
|
299
|
-
tabIndex: 0,
|
|
432
|
+
type: "button",
|
|
433
|
+
"aria-label": typeof tip === "string" ? tip : "\u7F16\u8F91",
|
|
300
434
|
title: typeof tip === "string" && tip !== "" ? tip : void 0,
|
|
301
435
|
onClick: (e) => {
|
|
302
436
|
e.stopPropagation();
|
|
303
437
|
startEdit();
|
|
304
438
|
},
|
|
305
|
-
onKeyDown: (e) => {
|
|
306
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
307
|
-
e.preventDefault();
|
|
308
|
-
startEdit();
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
439
|
className: "typo-action typo-edit",
|
|
312
440
|
children: editConf.icon ?? /* @__PURE__ */ jsx(Icon, { name: "edit", size: 12 })
|
|
313
441
|
}
|
|
314
442
|
);
|
|
315
443
|
}
|
|
316
|
-
|
|
444
|
+
const textEditTrigger = !!editable && !props.disabled && triggers.includes("text") && !editing;
|
|
445
|
+
if (textEditTrigger && props.renderTextTrigger !== false) {
|
|
317
446
|
inner = /* @__PURE__ */ jsx(
|
|
318
447
|
"span",
|
|
319
448
|
{
|
|
320
449
|
className: "typo-edit-text-trigger",
|
|
450
|
+
role: "button",
|
|
451
|
+
tabIndex: 0,
|
|
321
452
|
onClick: () => startEdit(),
|
|
453
|
+
onKeyDown: (event) => {
|
|
454
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
455
|
+
event.preventDefault();
|
|
456
|
+
startEdit();
|
|
457
|
+
}
|
|
458
|
+
},
|
|
322
459
|
children: inner
|
|
323
460
|
}
|
|
324
461
|
);
|
|
@@ -326,19 +463,42 @@ function useTypographyBody(props) {
|
|
|
326
463
|
let style = props.style;
|
|
327
464
|
let extraCls;
|
|
328
465
|
if (wantClamp && !expanded) {
|
|
329
|
-
|
|
330
|
-
if (
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
466
|
+
const clampClassName = rows > 1 ? "ellipsis-multi" : "ellipsis";
|
|
467
|
+
if (ellConf.suffix) {
|
|
468
|
+
extraCls = "ellipsis-with-suffix";
|
|
469
|
+
inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
470
|
+
/* @__PURE__ */ jsx(
|
|
471
|
+
"span",
|
|
472
|
+
{
|
|
473
|
+
ref: ellipsisContentRef,
|
|
474
|
+
className: `typo-ellipsis-content ${clampClassName}`,
|
|
475
|
+
style: rows > 1 ? { WebkitLineClamp: rows } : void 0,
|
|
476
|
+
children: inner
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
/* @__PURE__ */ jsx("span", { className: "typo-suffix", children: ellConf.suffix })
|
|
480
|
+
] });
|
|
481
|
+
} else {
|
|
482
|
+
extraCls = clampClassName;
|
|
483
|
+
if (rows > 1) {
|
|
484
|
+
style = {
|
|
485
|
+
...style,
|
|
486
|
+
WebkitLineClamp: rows
|
|
487
|
+
};
|
|
488
|
+
}
|
|
335
489
|
}
|
|
490
|
+
} else if (ellConf.suffix) {
|
|
491
|
+
inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
492
|
+
inner,
|
|
493
|
+
/* @__PURE__ */ jsx("span", { className: "typo-suffix", children: ellConf.suffix })
|
|
494
|
+
] });
|
|
336
495
|
}
|
|
337
496
|
let expandNode = null;
|
|
338
|
-
if (wantClamp && ellConf.expandable && !expanded) {
|
|
497
|
+
if (wantClamp && truncated && ellConf.expandable && !expanded) {
|
|
339
498
|
expandNode = /* @__PURE__ */ jsx(
|
|
340
|
-
"
|
|
499
|
+
"button",
|
|
341
500
|
{
|
|
501
|
+
type: "button",
|
|
342
502
|
className: "typo-expand",
|
|
343
503
|
onClick: (e) => {
|
|
344
504
|
ellConf.onExpand?.(e);
|
|
@@ -348,33 +508,40 @@ function useTypographyBody(props) {
|
|
|
348
508
|
}
|
|
349
509
|
);
|
|
350
510
|
}
|
|
351
|
-
const tooltipContent = wantClamp && !expanded && ellConf.tooltip ? ellConf.tooltip === true ? fallbackText : ellConf.tooltip : void 0;
|
|
511
|
+
const tooltipContent = wantClamp && truncated && !expanded && ellConf.tooltip ? ellConf.tooltip === true ? fallbackText : ellConf.tooltip : void 0;
|
|
352
512
|
return {
|
|
353
513
|
editing,
|
|
354
514
|
editConf,
|
|
355
515
|
fallbackText,
|
|
356
516
|
handleConfirm,
|
|
357
517
|
handleCancel,
|
|
518
|
+
startEdit,
|
|
519
|
+
textEditTrigger,
|
|
358
520
|
inner,
|
|
359
521
|
copyNode,
|
|
360
522
|
editIconNode,
|
|
361
523
|
expandNode,
|
|
362
524
|
style,
|
|
363
525
|
extraCls,
|
|
364
|
-
tooltipContent
|
|
526
|
+
tooltipContent,
|
|
527
|
+
elementRef
|
|
365
528
|
};
|
|
366
529
|
}
|
|
367
|
-
var
|
|
530
|
+
var TitleBase = React.forwardRef((props, ref) => {
|
|
368
531
|
const { level = 1, ...rest } = props;
|
|
369
532
|
const body = useTypographyBody({ ...rest});
|
|
370
533
|
const Tag = `h${level}`;
|
|
534
|
+
const nativeProps = getNativeTypographyProps(rest);
|
|
535
|
+
const composedRef = composeTypographyRef(body.elementRef, ref);
|
|
371
536
|
if (body.editing) {
|
|
372
537
|
return /* @__PURE__ */ jsx(
|
|
373
538
|
Tag,
|
|
374
539
|
{
|
|
375
|
-
|
|
540
|
+
...nativeProps,
|
|
541
|
+
ref: composedRef,
|
|
376
542
|
className: buildClass(rest, `typo typo-title h${level}`, "editing"),
|
|
377
543
|
style: rest.style,
|
|
544
|
+
"aria-disabled": rest.disabled || void 0,
|
|
378
545
|
children: /* @__PURE__ */ jsx(
|
|
379
546
|
EditableEditor,
|
|
380
547
|
{
|
|
@@ -382,6 +549,7 @@ var Title = React.forwardRef((props, ref) => {
|
|
|
382
549
|
multiline: false,
|
|
383
550
|
maxLength: body.editConf.maxLength,
|
|
384
551
|
autoSize: body.editConf.autoSize,
|
|
552
|
+
enterIcon: body.editConf.enterIcon,
|
|
385
553
|
onConfirm: body.handleConfirm,
|
|
386
554
|
onCancel: body.handleCancel
|
|
387
555
|
}
|
|
@@ -392,9 +560,11 @@ var Title = React.forwardRef((props, ref) => {
|
|
|
392
560
|
const element = /* @__PURE__ */ jsxs(
|
|
393
561
|
Tag,
|
|
394
562
|
{
|
|
395
|
-
|
|
563
|
+
...nativeProps,
|
|
564
|
+
ref: composedRef,
|
|
396
565
|
className: buildClass(rest, `typo typo-title h${level}`, body.extraCls),
|
|
397
566
|
style: body.style,
|
|
567
|
+
"aria-disabled": rest.disabled || void 0,
|
|
398
568
|
children: [
|
|
399
569
|
body.inner,
|
|
400
570
|
body.expandNode,
|
|
@@ -403,20 +573,25 @@ var Title = React.forwardRef((props, ref) => {
|
|
|
403
573
|
]
|
|
404
574
|
}
|
|
405
575
|
);
|
|
406
|
-
return body.tooltipContent ? /* @__PURE__ */ jsx(EllipsisTooltip, {
|
|
576
|
+
return body.tooltipContent ? /* @__PURE__ */ jsx(EllipsisTooltip, { content: body.tooltipContent, children: element }) : element;
|
|
407
577
|
});
|
|
408
|
-
|
|
409
|
-
var
|
|
578
|
+
TitleBase.displayName = "Typography.Title";
|
|
579
|
+
var Title = withComponentTheme(TitleBase, "Title", "typography");
|
|
580
|
+
var TextBase = React.forwardRef((props, ref) => {
|
|
410
581
|
const { as = "span", ...rest } = props;
|
|
411
582
|
const body = useTypographyBody({ ...rest});
|
|
412
583
|
const Tag = as;
|
|
584
|
+
const nativeProps = getNativeTypographyProps(rest);
|
|
585
|
+
const composedRef = composeTypographyRef(body.elementRef, ref);
|
|
413
586
|
if (body.editing) {
|
|
414
587
|
return /* @__PURE__ */ jsx(
|
|
415
588
|
Tag,
|
|
416
589
|
{
|
|
417
|
-
|
|
590
|
+
...nativeProps,
|
|
591
|
+
ref: composedRef,
|
|
418
592
|
className: buildClass(rest, "typo typo-text", "editing"),
|
|
419
593
|
style: rest.style,
|
|
594
|
+
"aria-disabled": rest.disabled || void 0,
|
|
420
595
|
children: /* @__PURE__ */ jsx(
|
|
421
596
|
EditableEditor,
|
|
422
597
|
{
|
|
@@ -424,6 +599,7 @@ var Text = React.forwardRef((props, ref) => {
|
|
|
424
599
|
multiline: false,
|
|
425
600
|
maxLength: body.editConf.maxLength,
|
|
426
601
|
autoSize: body.editConf.autoSize,
|
|
602
|
+
enterIcon: body.editConf.enterIcon,
|
|
427
603
|
onConfirm: body.handleConfirm,
|
|
428
604
|
onCancel: body.handleCancel
|
|
429
605
|
}
|
|
@@ -434,9 +610,11 @@ var Text = React.forwardRef((props, ref) => {
|
|
|
434
610
|
const element = /* @__PURE__ */ jsxs(
|
|
435
611
|
Tag,
|
|
436
612
|
{
|
|
437
|
-
|
|
613
|
+
...nativeProps,
|
|
614
|
+
ref: composedRef,
|
|
438
615
|
className: buildClass(rest, "typo typo-text", body.extraCls),
|
|
439
616
|
style: body.style,
|
|
617
|
+
"aria-disabled": rest.disabled || void 0,
|
|
440
618
|
children: [
|
|
441
619
|
body.inner,
|
|
442
620
|
body.expandNode,
|
|
@@ -445,19 +623,24 @@ var Text = React.forwardRef((props, ref) => {
|
|
|
445
623
|
]
|
|
446
624
|
}
|
|
447
625
|
);
|
|
448
|
-
return body.tooltipContent ? /* @__PURE__ */ jsx(EllipsisTooltip, {
|
|
626
|
+
return body.tooltipContent ? /* @__PURE__ */ jsx(EllipsisTooltip, { content: body.tooltipContent, children: element }) : element;
|
|
449
627
|
});
|
|
450
|
-
|
|
451
|
-
var
|
|
628
|
+
TextBase.displayName = "Typography.Text";
|
|
629
|
+
var Text = withComponentTheme(TextBase, "Text", "typography");
|
|
630
|
+
var ParagraphBase = React.forwardRef(
|
|
452
631
|
(props, ref) => {
|
|
453
632
|
const body = useTypographyBody({ ...props});
|
|
633
|
+
const nativeProps = getNativeTypographyProps(props);
|
|
634
|
+
const composedRef = composeTypographyRef(body.elementRef, ref);
|
|
454
635
|
if (body.editing) {
|
|
455
636
|
return /* @__PURE__ */ jsx(
|
|
456
|
-
"
|
|
637
|
+
"p",
|
|
457
638
|
{
|
|
458
|
-
|
|
639
|
+
...nativeProps,
|
|
640
|
+
ref: composedRef,
|
|
459
641
|
className: buildClass(props, "typo typo-paragraph", "editing"),
|
|
460
642
|
style: props.style,
|
|
643
|
+
"aria-disabled": props.disabled || void 0,
|
|
461
644
|
children: /* @__PURE__ */ jsx(
|
|
462
645
|
EditableEditor,
|
|
463
646
|
{
|
|
@@ -475,9 +658,11 @@ var Paragraph = React.forwardRef(
|
|
|
475
658
|
const element = /* @__PURE__ */ jsxs(
|
|
476
659
|
"p",
|
|
477
660
|
{
|
|
478
|
-
|
|
661
|
+
...nativeProps,
|
|
662
|
+
ref: composedRef,
|
|
479
663
|
className: buildClass(props, "typo typo-paragraph", body.extraCls),
|
|
480
664
|
style: body.style,
|
|
665
|
+
"aria-disabled": props.disabled || void 0,
|
|
481
666
|
children: [
|
|
482
667
|
body.inner,
|
|
483
668
|
body.expandNode,
|
|
@@ -486,11 +671,16 @@ var Paragraph = React.forwardRef(
|
|
|
486
671
|
]
|
|
487
672
|
}
|
|
488
673
|
);
|
|
489
|
-
return body.tooltipContent ? /* @__PURE__ */ jsx(EllipsisTooltip, {
|
|
674
|
+
return body.tooltipContent ? /* @__PURE__ */ jsx(EllipsisTooltip, { content: body.tooltipContent, children: element }) : element;
|
|
490
675
|
}
|
|
491
676
|
);
|
|
492
|
-
|
|
493
|
-
var
|
|
677
|
+
ParagraphBase.displayName = "Typography.Paragraph";
|
|
678
|
+
var Paragraph = withComponentTheme(
|
|
679
|
+
ParagraphBase,
|
|
680
|
+
"Paragraph",
|
|
681
|
+
"typography"
|
|
682
|
+
);
|
|
683
|
+
var LinkBase = React.forwardRef(
|
|
494
684
|
(props, ref) => {
|
|
495
685
|
const {
|
|
496
686
|
type,
|
|
@@ -512,9 +702,14 @@ var Link = React.forwardRef(
|
|
|
512
702
|
externalIcon = "arrowRight",
|
|
513
703
|
target,
|
|
514
704
|
rel,
|
|
705
|
+
href,
|
|
706
|
+
tabIndex,
|
|
707
|
+
onClick: anchorOnClick,
|
|
708
|
+
onKeyDown: anchorOnKeyDown,
|
|
515
709
|
...anchorRest
|
|
516
710
|
} = props;
|
|
517
711
|
const body = useTypographyBody({
|
|
712
|
+
disabled,
|
|
518
713
|
mark,
|
|
519
714
|
code,
|
|
520
715
|
keyboard,
|
|
@@ -526,60 +721,115 @@ var Link = React.forwardRef(
|
|
|
526
721
|
editable,
|
|
527
722
|
ellipsis,
|
|
528
723
|
style,
|
|
529
|
-
children
|
|
724
|
+
children,
|
|
725
|
+
renderTextTrigger: false
|
|
530
726
|
});
|
|
531
727
|
const safeRel = target === "_blank" ? rel ?? "noopener noreferrer" : rel;
|
|
728
|
+
const composedRef = composeTypographyRef(body.elementRef, ref);
|
|
532
729
|
if (body.editing) {
|
|
533
|
-
return /* @__PURE__ */
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
730
|
+
return /* @__PURE__ */ jsxs("span", { className: "typo-link-group typo-link-editing-group", children: [
|
|
731
|
+
/* @__PURE__ */ jsx(
|
|
732
|
+
"a",
|
|
733
|
+
{
|
|
734
|
+
...anchorRest,
|
|
735
|
+
ref: composedRef,
|
|
736
|
+
className: [className, "typo-link-editing-anchor"].filter(Boolean).join(" "),
|
|
737
|
+
style,
|
|
738
|
+
tabIndex: -1,
|
|
739
|
+
"aria-hidden": "true",
|
|
740
|
+
"aria-disabled": disabled || void 0,
|
|
741
|
+
onClick: (event) => event.preventDefault()
|
|
742
|
+
}
|
|
743
|
+
),
|
|
744
|
+
/* @__PURE__ */ jsx(
|
|
745
|
+
"span",
|
|
746
|
+
{
|
|
747
|
+
className: buildClass(
|
|
748
|
+
{ ...props, className: "" },
|
|
749
|
+
"typo typo-link",
|
|
750
|
+
"editing typo-link-editor-shell"
|
|
751
|
+
),
|
|
752
|
+
style,
|
|
753
|
+
children: /* @__PURE__ */ jsx(
|
|
754
|
+
EditableEditor,
|
|
755
|
+
{
|
|
756
|
+
initial: body.editConf.text ?? body.fallbackText,
|
|
757
|
+
multiline: false,
|
|
758
|
+
maxLength: body.editConf.maxLength,
|
|
759
|
+
autoSize: body.editConf.autoSize,
|
|
760
|
+
enterIcon: body.editConf.enterIcon,
|
|
761
|
+
onConfirm: body.handleConfirm,
|
|
762
|
+
onCancel: body.handleCancel
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
}
|
|
766
|
+
)
|
|
767
|
+
] });
|
|
551
768
|
}
|
|
769
|
+
const linkExtraClass = [
|
|
770
|
+
body.extraCls,
|
|
771
|
+
body.textEditTrigger && "typo-edit-text-trigger"
|
|
772
|
+
].filter(Boolean).join(" ");
|
|
552
773
|
const element = /* @__PURE__ */ jsxs(
|
|
553
774
|
"a",
|
|
554
775
|
{
|
|
555
|
-
|
|
556
|
-
|
|
776
|
+
...anchorRest,
|
|
777
|
+
ref: composedRef,
|
|
778
|
+
className: buildClass(props, "typo typo-link", linkExtraClass),
|
|
557
779
|
style: body.style,
|
|
558
|
-
|
|
780
|
+
href: disabled ? void 0 : href,
|
|
781
|
+
target: disabled ? void 0 : target,
|
|
559
782
|
rel: safeRel,
|
|
783
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
560
784
|
"aria-disabled": disabled || void 0,
|
|
561
785
|
onClick: (e) => {
|
|
562
786
|
if (disabled) {
|
|
563
787
|
e.preventDefault();
|
|
788
|
+
e.stopPropagation();
|
|
564
789
|
return;
|
|
565
790
|
}
|
|
566
|
-
|
|
791
|
+
if (body.textEditTrigger) {
|
|
792
|
+
e.preventDefault();
|
|
793
|
+
e.stopPropagation();
|
|
794
|
+
body.startEdit();
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
anchorOnClick?.(e);
|
|
798
|
+
},
|
|
799
|
+
onKeyDown: (event) => {
|
|
800
|
+
if (disabled) {
|
|
801
|
+
event.preventDefault();
|
|
802
|
+
event.stopPropagation();
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
anchorOnKeyDown?.(event);
|
|
806
|
+
if (!event.defaultPrevented && body.textEditTrigger && (event.key === "Enter" || event.key === " ")) {
|
|
807
|
+
event.preventDefault();
|
|
808
|
+
event.stopPropagation();
|
|
809
|
+
body.startEdit();
|
|
810
|
+
}
|
|
567
811
|
},
|
|
568
|
-
...anchorRest,
|
|
569
812
|
children: [
|
|
570
813
|
body.inner,
|
|
571
|
-
external && /* @__PURE__ */ jsx("span", { className: "typo-link-ext", "aria-hidden": true, children: /* @__PURE__ */ jsx(Icon, { name: externalIcon, size: 12 }) })
|
|
572
|
-
body.expandNode,
|
|
573
|
-
body.copyNode,
|
|
574
|
-
body.editIconNode
|
|
814
|
+
external && /* @__PURE__ */ jsx("span", { className: "typo-link-ext", "aria-hidden": true, children: /* @__PURE__ */ jsx(Icon, { name: externalIcon, size: 12 }) })
|
|
575
815
|
]
|
|
576
816
|
}
|
|
577
817
|
);
|
|
578
|
-
|
|
818
|
+
const linkedElement = body.tooltipContent ? /* @__PURE__ */ jsx(EllipsisTooltip, { content: body.tooltipContent, children: element }) : element;
|
|
819
|
+
if (!body.expandNode && !body.copyNode && !body.editIconNode) {
|
|
820
|
+
return linkedElement;
|
|
821
|
+
}
|
|
822
|
+
return /* @__PURE__ */ jsxs("span", { className: "typo-link-group", children: [
|
|
823
|
+
linkedElement,
|
|
824
|
+
body.expandNode,
|
|
825
|
+
body.copyNode,
|
|
826
|
+
body.editIconNode
|
|
827
|
+
] });
|
|
579
828
|
}
|
|
580
829
|
);
|
|
581
|
-
|
|
582
|
-
var
|
|
830
|
+
LinkBase.displayName = "Typography.Link";
|
|
831
|
+
var Link = withComponentTheme(LinkBase, "Link", "typography");
|
|
832
|
+
var TypographyRoot = React.forwardRef(
|
|
583
833
|
({ className = "", children, ...rest }, ref) => /* @__PURE__ */ jsx(
|
|
584
834
|
"article",
|
|
585
835
|
{
|
|
@@ -590,11 +840,16 @@ var TypographyBase = React.forwardRef(
|
|
|
590
840
|
}
|
|
591
841
|
)
|
|
592
842
|
);
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
843
|
+
TypographyRoot.displayName = "Typography";
|
|
844
|
+
var ThemedTypography = withComponentTheme(
|
|
845
|
+
TypographyRoot,
|
|
846
|
+
"Typography",
|
|
847
|
+
"typography"
|
|
848
|
+
);
|
|
849
|
+
var Typography = ThemedTypography;
|
|
850
|
+
Typography.Title = Title;
|
|
851
|
+
Typography.Text = Text;
|
|
852
|
+
Typography.Paragraph = Paragraph;
|
|
853
|
+
Typography.Link = Link;
|
|
599
854
|
|
|
600
855
|
export { Link, Paragraph, Text, Title, Typography };
|