@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
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkEE5KXDRK_cjs = require('./chunk-EE5KXDRK.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
|
+
|
|
27
|
+
var useIsomorphicLayoutEffect = typeof window === "undefined" ? React__namespace.useEffect : React__namespace.useLayoutEffect;
|
|
28
|
+
var ACCENT_KEYS = /* @__PURE__ */ new Set([
|
|
29
|
+
"sky",
|
|
30
|
+
"coral",
|
|
31
|
+
"mint",
|
|
32
|
+
"violet",
|
|
33
|
+
"amber",
|
|
34
|
+
"rose"
|
|
35
|
+
]);
|
|
36
|
+
var InternalComponentThemePartContext = React__namespace.createContext([]);
|
|
37
|
+
function InternalComponentThemePart({
|
|
38
|
+
components,
|
|
39
|
+
children
|
|
40
|
+
}) {
|
|
41
|
+
const inherited = React__namespace.useContext(InternalComponentThemePartContext);
|
|
42
|
+
const value = React__namespace.useMemo(() => {
|
|
43
|
+
const next = Array.isArray(components) ? components : [components];
|
|
44
|
+
return [...inherited, ...next];
|
|
45
|
+
}, [components, inherited]);
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InternalComponentThemePartContext.Provider, { value, children });
|
|
47
|
+
}
|
|
48
|
+
var THEME_COLOR_VARIABLES = {
|
|
49
|
+
bg: "--bg",
|
|
50
|
+
bgRaised: "--bg-raised",
|
|
51
|
+
bgSunken: "--bg-sunken",
|
|
52
|
+
fg: "--fg",
|
|
53
|
+
fgMuted: "--fg-muted",
|
|
54
|
+
fgSubtle: "--fg-subtle",
|
|
55
|
+
border: "--border",
|
|
56
|
+
divider: "--divider",
|
|
57
|
+
shadowDark: "--shadow-dark",
|
|
58
|
+
shadowLight: "--shadow-light",
|
|
59
|
+
accent: "--accent",
|
|
60
|
+
accentInk: "--accent-ink",
|
|
61
|
+
accentSoft: "--accent-soft",
|
|
62
|
+
accentGlow: "--accent-glow",
|
|
63
|
+
info: "--info",
|
|
64
|
+
success: "--success",
|
|
65
|
+
warning: "--warning",
|
|
66
|
+
danger: "--danger"
|
|
67
|
+
};
|
|
68
|
+
function normalizeComponentThemeInput(theme) {
|
|
69
|
+
if (theme === void 0) return void 0;
|
|
70
|
+
if (typeof theme === "string") {
|
|
71
|
+
return ACCENT_KEYS.has(theme) ? { accent: theme } : { baseColor: theme };
|
|
72
|
+
}
|
|
73
|
+
return theme;
|
|
74
|
+
}
|
|
75
|
+
function mergeComponentTheme(inherited, own) {
|
|
76
|
+
if (!inherited && !own) return void 0;
|
|
77
|
+
return {
|
|
78
|
+
...inherited,
|
|
79
|
+
...own,
|
|
80
|
+
colors: { ...inherited?.colors ?? {}, ...own?.colors ?? {} },
|
|
81
|
+
tokens: { ...inherited?.tokens ?? {}, ...own?.tokens ?? {} },
|
|
82
|
+
components: own?.components
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function hasExplicitIconForeground(config) {
|
|
86
|
+
if (!config) return false;
|
|
87
|
+
return config.baseColor !== void 0 || config.colorScheme !== void 0 || config.colors?.fg !== void 0 || config.tokens?.fg !== void 0 || config.tokens?.["--fg"] !== void 0 || config.tokens?.["--lmn-icon-fg"] !== void 0;
|
|
88
|
+
}
|
|
89
|
+
function getStaticColorScheme(rootElement) {
|
|
90
|
+
if (typeof document === "undefined") return "light";
|
|
91
|
+
const inheritedElement = rootElement?.parentElement ?? document.documentElement;
|
|
92
|
+
const themeScope = inheritedElement.closest("[data-theme]");
|
|
93
|
+
return themeScope?.dataset.theme === "dark" ? "dark" : "light";
|
|
94
|
+
}
|
|
95
|
+
function hasLocalStaticThemeScope(rootElement) {
|
|
96
|
+
if (!rootElement || typeof document === "undefined") return false;
|
|
97
|
+
const themeScope = rootElement.parentElement?.closest("[data-theme]");
|
|
98
|
+
return themeScope != null && themeScope !== document.documentElement && themeScope !== document.body;
|
|
99
|
+
}
|
|
100
|
+
function getFallbackSnapshot(rootElement) {
|
|
101
|
+
const colorScheme = getStaticColorScheme(rootElement);
|
|
102
|
+
return {
|
|
103
|
+
colorScheme,
|
|
104
|
+
intensity: 5,
|
|
105
|
+
colors: { ...chunkEE5KXDRK_cjs.DEFAULT_THEME_COLORS[colorScheme] }
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function getDefaultSnapshot(rootElement) {
|
|
109
|
+
const fallback = getFallbackSnapshot(rootElement);
|
|
110
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
111
|
+
return fallback;
|
|
112
|
+
}
|
|
113
|
+
const inheritedElement = rootElement?.parentElement ?? document.documentElement;
|
|
114
|
+
const computed = window.getComputedStyle(inheritedElement);
|
|
115
|
+
const colors = { ...fallback.colors };
|
|
116
|
+
for (const key of Object.keys(THEME_COLOR_VARIABLES)) {
|
|
117
|
+
const value = computed.getPropertyValue(THEME_COLOR_VARIABLES[key]).trim();
|
|
118
|
+
if (value) colors[key] = value;
|
|
119
|
+
}
|
|
120
|
+
const shadowDepth = Number.parseFloat(computed.getPropertyValue("--d"));
|
|
121
|
+
const intensity = Number.isFinite(shadowDepth) ? (shadowDepth - 0.4) / 0.12 : fallback.intensity;
|
|
122
|
+
return { ...fallback, intensity, colors };
|
|
123
|
+
}
|
|
124
|
+
function createInheritedTokenResetStyle(ownerStyle, cssPrefixes) {
|
|
125
|
+
const variablePrefixes = cssPrefixes.map((prefix) => `--lmn-${prefix}-`);
|
|
126
|
+
const style = {};
|
|
127
|
+
for (const property of Object.keys(ownerStyle)) {
|
|
128
|
+
if (variablePrefixes.some((prefix) => property.startsWith(prefix))) {
|
|
129
|
+
style[property] = "initial";
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return style;
|
|
133
|
+
}
|
|
134
|
+
function useComponentThemeRootRef(forwardedRef, { component, theme }) {
|
|
135
|
+
const inheritedVisualTheme = chunkEE5KXDRK_cjs.useVisualThemeSnapshot();
|
|
136
|
+
const inheritedOverrides = chunkEE5KXDRK_cjs.useComponentOverrides();
|
|
137
|
+
const [rootState, setRootState] = React__namespace.useState({
|
|
138
|
+
element: null,
|
|
139
|
+
revision: 0
|
|
140
|
+
});
|
|
141
|
+
const mountedRootRef = React__namespace.useRef(null);
|
|
142
|
+
const tracksRootElement = React__namespace.useRef(false);
|
|
143
|
+
const shouldTrackConfiguredTheme = inheritedVisualTheme === null && (theme !== void 0 || inheritedOverrides[component] !== void 0);
|
|
144
|
+
const shouldDetectLocalStaticTheme = inheritedVisualTheme === null;
|
|
145
|
+
const rootRef = React__namespace.useCallback((node) => {
|
|
146
|
+
mountedRootRef.current = node;
|
|
147
|
+
const shouldTrackNode = node !== null && (shouldTrackConfiguredTheme || shouldDetectLocalStaticTheme && hasLocalStaticThemeScope(node));
|
|
148
|
+
if (shouldTrackNode) {
|
|
149
|
+
tracksRootElement.current = true;
|
|
150
|
+
setRootState((current) => current.element === node ? current : { element: node, revision: current.revision + 1 });
|
|
151
|
+
} else if (node !== null) {
|
|
152
|
+
tracksRootElement.current = false;
|
|
153
|
+
setRootState((current) => current.element === null ? current : { element: null, revision: current.revision + 1 });
|
|
154
|
+
} else {
|
|
155
|
+
tracksRootElement.current = false;
|
|
156
|
+
}
|
|
157
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
158
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
159
|
+
}, [forwardedRef, shouldDetectLocalStaticTheme, shouldTrackConfiguredTheme]);
|
|
160
|
+
useIsomorphicLayoutEffect(() => {
|
|
161
|
+
if (!shouldDetectLocalStaticTheme) return;
|
|
162
|
+
return chunkEE5KXDRK_cjs.subscribeImperativeThemeChange((target) => {
|
|
163
|
+
const node = mountedRootRef.current;
|
|
164
|
+
if (!node || !target.contains(node)) return;
|
|
165
|
+
const shouldTrackNode = shouldTrackConfiguredTheme || hasLocalStaticThemeScope(node);
|
|
166
|
+
if (!shouldTrackNode && !tracksRootElement.current) return;
|
|
167
|
+
tracksRootElement.current = shouldTrackNode;
|
|
168
|
+
setRootState((current) => ({
|
|
169
|
+
element: shouldTrackNode ? node : null,
|
|
170
|
+
revision: current.revision + 1
|
|
171
|
+
}));
|
|
172
|
+
});
|
|
173
|
+
}, [shouldDetectLocalStaticTheme, shouldTrackConfiguredTheme]);
|
|
174
|
+
return [rootState.element, rootRef];
|
|
175
|
+
}
|
|
176
|
+
function ComponentThemeBoundary({
|
|
177
|
+
component,
|
|
178
|
+
cssPrefix,
|
|
179
|
+
theme,
|
|
180
|
+
rootElement,
|
|
181
|
+
children
|
|
182
|
+
}) {
|
|
183
|
+
const inheritedVisualTheme = chunkEE5KXDRK_cjs.useVisualThemeSnapshot();
|
|
184
|
+
const inheritedOwner = chunkEE5KXDRK_cjs.useOwnerPortalTheme();
|
|
185
|
+
const inheritedOverrides = chunkEE5KXDRK_cjs.useComponentOverrides();
|
|
186
|
+
const internalComponents = React__namespace.useContext(InternalComponentThemePartContext);
|
|
187
|
+
const own = normalizeComponentThemeInput(theme);
|
|
188
|
+
const override = inheritedOverrides[component];
|
|
189
|
+
const config = mergeComponentTheme(override, own);
|
|
190
|
+
const active = config !== void 0;
|
|
191
|
+
const scope = own?.scope ?? "self";
|
|
192
|
+
const cssPrefixes = Array.isArray(cssPrefix) ? cssPrefix : [cssPrefix];
|
|
193
|
+
const isOwnedInternalPart = internalComponents.includes(component);
|
|
194
|
+
const matchesInheritedCssPrefix = cssPrefixes.some(
|
|
195
|
+
(prefix) => inheritedOwner?.cssPrefixes.includes(prefix)
|
|
196
|
+
);
|
|
197
|
+
const shouldResetSelfTheme = !active && inheritedOwner !== null && !isOwnedInternalPart && (inheritedOwner?.component === component || matchesInheritedCssPrefix) && !inheritedOwner.subtree;
|
|
198
|
+
const hasLocalStaticTheme = inheritedVisualTheme === null && hasLocalStaticThemeScope(rootElement);
|
|
199
|
+
const inheritedSnapshot = inheritedVisualTheme ?? (shouldResetSelfTheme && inheritedOwner ? inheritedOwner.inheritedSnapshot : active || hasLocalStaticTheme ? getDefaultSnapshot(rootElement) : getFallbackSnapshot(rootElement));
|
|
200
|
+
const snapshot = active ? chunkEE5KXDRK_cjs.resolveVisualThemeSnapshot(config, inheritedSnapshot) : inheritedSnapshot;
|
|
201
|
+
const inheritedTokenResetStyle = shouldResetSelfTheme && inheritedOwner ? createInheritedTokenResetStyle(inheritedOwner.style, cssPrefixes) : {};
|
|
202
|
+
const prefixedStyle = active || shouldResetSelfTheme ? cssPrefixes.reduce((result, currentPrefix) => {
|
|
203
|
+
const prefix = `lmn-${currentPrefix}-`;
|
|
204
|
+
return {
|
|
205
|
+
...result,
|
|
206
|
+
...chunkEE5KXDRK_cjs.visualThemeToStyle(snapshot, prefix),
|
|
207
|
+
...active ? chunkEE5KXDRK_cjs.componentTokensToStyle(config.tokens, prefix) : null
|
|
208
|
+
};
|
|
209
|
+
}, inheritedTokenResetStyle) : {};
|
|
210
|
+
const subtreeStyle = active && scope === "subtree" ? chunkEE5KXDRK_cjs.visualThemeToStyle(snapshot) : {};
|
|
211
|
+
const styles = override?.styles ?? {};
|
|
212
|
+
const rootStyle = {
|
|
213
|
+
...styles.root ?? {},
|
|
214
|
+
...prefixedStyle,
|
|
215
|
+
...subtreeStyle
|
|
216
|
+
};
|
|
217
|
+
const rootDataAttributes = active || shouldResetSelfTheme ? active && scope === "subtree" ? {
|
|
218
|
+
"data-theme": snapshot.colorScheme,
|
|
219
|
+
"data-lumina-color-scheme": snapshot.colorScheme
|
|
220
|
+
} : { "data-lumina-color-scheme": snapshot.colorScheme } : {};
|
|
221
|
+
if (component === "Icon" && active && hasExplicitIconForeground(config)) {
|
|
222
|
+
rootDataAttributes["data-lumina-icon-color"] = "";
|
|
223
|
+
}
|
|
224
|
+
const shouldApplyPortalTheme = active || inheritedVisualTheme !== null || hasLocalStaticTheme;
|
|
225
|
+
const portalStyle = shouldApplyPortalTheme ? {
|
|
226
|
+
...chunkEE5KXDRK_cjs.visualThemeToStyle(inheritedSnapshot),
|
|
227
|
+
...prefixedStyle,
|
|
228
|
+
...scope === "subtree" ? subtreeStyle : {}
|
|
229
|
+
} : {};
|
|
230
|
+
const portalDataAttributes = shouldApplyPortalTheme ? {
|
|
231
|
+
"data-theme": scope === "subtree" ? snapshot.colorScheme : inheritedSnapshot.colorScheme,
|
|
232
|
+
"data-lumina-color-scheme": snapshot.colorScheme
|
|
233
|
+
} : {};
|
|
234
|
+
const state = {
|
|
235
|
+
active,
|
|
236
|
+
scope,
|
|
237
|
+
snapshot,
|
|
238
|
+
rootStyle,
|
|
239
|
+
rootDataAttributes,
|
|
240
|
+
portalStyle,
|
|
241
|
+
portalDataAttributes,
|
|
242
|
+
styles
|
|
243
|
+
};
|
|
244
|
+
const consumedIndex = internalComponents.indexOf(component);
|
|
245
|
+
const remainingInternalComponents = isOwnedInternalPart ? [
|
|
246
|
+
...internalComponents.slice(0, consumedIndex),
|
|
247
|
+
...internalComponents.slice(consumedIndex + 1)
|
|
248
|
+
] : internalComponents;
|
|
249
|
+
const ownerPortalTheme = active ? {
|
|
250
|
+
component,
|
|
251
|
+
cssPrefixes,
|
|
252
|
+
style: portalStyle,
|
|
253
|
+
colorScheme: snapshot.colorScheme,
|
|
254
|
+
inheritedColorScheme: inheritedSnapshot.colorScheme,
|
|
255
|
+
inheritedSnapshot,
|
|
256
|
+
subtree: scope === "subtree",
|
|
257
|
+
styles
|
|
258
|
+
} : shouldResetSelfTheme ? null : inheritedOwner;
|
|
259
|
+
const providedVisualTheme = active && scope === "subtree" ? snapshot : !active && hasLocalStaticTheme ? inheritedSnapshot : null;
|
|
260
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkEE5KXDRK_cjs.VisualThemeProvider, { value: providedVisualTheme ?? inheritedVisualTheme, children: /* @__PURE__ */ jsxRuntime.jsx(chunkEE5KXDRK_cjs.ComponentOverridesProvider, { value: own?.components, children: /* @__PURE__ */ jsxRuntime.jsx(chunkEE5KXDRK_cjs.OwnerPortalThemeProvider, { value: ownerPortalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(InternalComponentThemePartContext.Provider, { value: remainingInternalComponents, children: children(state) }) }) }) });
|
|
261
|
+
}
|
|
262
|
+
function mergeComponentRootStyleWithInstanceStyle(rootStyle, instanceStyle) {
|
|
263
|
+
if (!instanceStyle) return rootStyle;
|
|
264
|
+
const overrides = {};
|
|
265
|
+
const instanceRecord = instanceStyle;
|
|
266
|
+
for (const property of Object.keys(rootStyle)) {
|
|
267
|
+
if (Object.prototype.hasOwnProperty.call(instanceRecord, property)) {
|
|
268
|
+
overrides[property] = instanceRecord[property];
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return { ...rootStyle, ...overrides };
|
|
272
|
+
}
|
|
273
|
+
function withInternalComponentThemePart(Component, components) {
|
|
274
|
+
const Wrapped = React__namespace.forwardRef(
|
|
275
|
+
(props, ref) => /* @__PURE__ */ jsxRuntime.jsx(InternalComponentThemePart, { components, children: React__namespace.createElement(Component, { ...props, ref }) })
|
|
276
|
+
);
|
|
277
|
+
Wrapped.displayName = `InternalThemePart(${typeof Component === "string" ? Component : Component.displayName ?? Component.name ?? "Component"})`;
|
|
278
|
+
return Wrapped;
|
|
279
|
+
}
|
|
280
|
+
function useComponentPortalTheme(component) {
|
|
281
|
+
const owner = chunkEE5KXDRK_cjs.useOwnerPortalTheme();
|
|
282
|
+
const inherited = chunkEE5KXDRK_cjs.useVisualThemeSnapshot();
|
|
283
|
+
const matchesOwner = owner && (Array.isArray(component) ? component.includes(owner.component) : owner.component === component);
|
|
284
|
+
if (matchesOwner && owner) {
|
|
285
|
+
return {
|
|
286
|
+
style: owner.style,
|
|
287
|
+
dataAttributes: {
|
|
288
|
+
"data-theme": owner.subtree ? owner.colorScheme : owner.inheritedColorScheme,
|
|
289
|
+
"data-lumina-color-scheme": owner.colorScheme
|
|
290
|
+
},
|
|
291
|
+
styles: owner.styles
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
if (!inherited) {
|
|
295
|
+
return { style: {}, dataAttributes: {}, styles: {} };
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
style: chunkEE5KXDRK_cjs.visualThemeToStyle(inherited),
|
|
299
|
+
dataAttributes: {
|
|
300
|
+
"data-theme": inherited.colorScheme,
|
|
301
|
+
"data-lumina-color-scheme": inherited.colorScheme
|
|
302
|
+
},
|
|
303
|
+
styles: {}
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function withComponentTheme(Component, component, cssPrefix = component.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), options = {}) {
|
|
307
|
+
const Wrapped = React__namespace.forwardRef((props, ref) => {
|
|
308
|
+
const { theme, style, ...rest } = props;
|
|
309
|
+
const [rootElement, rootRef] = useComponentThemeRootRef(
|
|
310
|
+
options.portalOnly ? void 0 : ref,
|
|
311
|
+
{ component, theme }
|
|
312
|
+
);
|
|
313
|
+
const themedNode = /* @__PURE__ */ jsxRuntime.jsx(
|
|
314
|
+
ComponentThemeBoundary,
|
|
315
|
+
{
|
|
316
|
+
component,
|
|
317
|
+
cssPrefix,
|
|
318
|
+
theme,
|
|
319
|
+
rootElement,
|
|
320
|
+
children: (state) => React__namespace.createElement(Component, {
|
|
321
|
+
...rest,
|
|
322
|
+
...state.rootDataAttributes,
|
|
323
|
+
ref: options.portalOnly ? ref : rootRef,
|
|
324
|
+
style: { ...state.rootStyle, ...style }
|
|
325
|
+
})
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
if (!options.portalOnly) return themedNode;
|
|
329
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
330
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
331
|
+
"template",
|
|
332
|
+
{
|
|
333
|
+
ref: rootRef,
|
|
334
|
+
"data-lumina-theme-anchor": component
|
|
335
|
+
}
|
|
336
|
+
),
|
|
337
|
+
themedNode
|
|
338
|
+
] });
|
|
339
|
+
});
|
|
340
|
+
Wrapped.displayName = Component.displayName ?? component;
|
|
341
|
+
return Wrapped;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
exports.ComponentThemeBoundary = ComponentThemeBoundary;
|
|
345
|
+
exports.InternalComponentThemePart = InternalComponentThemePart;
|
|
346
|
+
exports.mergeComponentRootStyleWithInstanceStyle = mergeComponentRootStyleWithInstanceStyle;
|
|
347
|
+
exports.normalizeComponentThemeInput = normalizeComponentThemeInput;
|
|
348
|
+
exports.useComponentPortalTheme = useComponentPortalTheme;
|
|
349
|
+
exports.useComponentThemeRootRef = useComponentThemeRootRef;
|
|
350
|
+
exports.withComponentTheme = withComponentTheme;
|
|
351
|
+
exports.withInternalComponentThemePart = withInternalComponentThemePart;
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { useFloating } from './chunk-3QXP2ZNP.js';
|
|
2
|
+
import { Input } from './chunk-UE4HFGJ6.js';
|
|
3
|
+
import { useOverlayLayer } from './chunk-2A4GYSN4.js';
|
|
4
|
+
import { Icon, renderIconSlot } from './chunk-LQMOYVQF.js';
|
|
5
|
+
import { useComponentPortalTheme, InternalComponentThemePart, withComponentTheme } from './chunk-DRDDQCDD.js';
|
|
6
|
+
import { usePortalContainer } from './chunk-ULTDRMGN.js';
|
|
7
|
+
import './tokens-CEJVVA3G.css';
|
|
8
|
+
import './shared-NJHRNLRH.css';
|
|
9
|
+
import './Cascader-YBVDK6DC.css';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
import { createPortal } from 'react-dom';
|
|
12
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var collectPaths = (options, prefix = []) => options.flatMap((option) => {
|
|
15
|
+
const next = [...prefix, option];
|
|
16
|
+
if (option.children?.length) return collectPaths(option.children, next);
|
|
17
|
+
return [next];
|
|
18
|
+
});
|
|
19
|
+
var defaultSearchFilter = (inputValue, path) => {
|
|
20
|
+
const q = inputValue.trim().toLowerCase();
|
|
21
|
+
if (!q) return true;
|
|
22
|
+
return path.map(getCascaderOptionText).join(" / ").toLowerCase().includes(q);
|
|
23
|
+
};
|
|
24
|
+
function getCascaderOptionText(option) {
|
|
25
|
+
if (option.text) return option.text;
|
|
26
|
+
if (typeof option.label === "string" || typeof option.label === "number") {
|
|
27
|
+
return String(option.label);
|
|
28
|
+
}
|
|
29
|
+
return option.value;
|
|
30
|
+
}
|
|
31
|
+
function getCascaderPathAriaLabel(path) {
|
|
32
|
+
return path.map((option) => option.ariaLabel ?? getCascaderOptionText(option)).join(" / ");
|
|
33
|
+
}
|
|
34
|
+
var CascaderBase = React.forwardRef(({
|
|
35
|
+
options,
|
|
36
|
+
value,
|
|
37
|
+
defaultValue = [],
|
|
38
|
+
onChange,
|
|
39
|
+
placeholder = "\u8BF7\u9009\u62E9",
|
|
40
|
+
disabled,
|
|
41
|
+
allowClear,
|
|
42
|
+
onClear,
|
|
43
|
+
changeOnSelect,
|
|
44
|
+
showSearch,
|
|
45
|
+
optionRender,
|
|
46
|
+
selectedRender,
|
|
47
|
+
listHeight = 280,
|
|
48
|
+
popupStyle,
|
|
49
|
+
popupClassName = "",
|
|
50
|
+
dropdownClassName = "",
|
|
51
|
+
className = "",
|
|
52
|
+
id: fieldId,
|
|
53
|
+
"aria-invalid": ariaInvalid,
|
|
54
|
+
"aria-describedby": ariaDescribedBy,
|
|
55
|
+
"aria-labelledby": ariaLabelledBy,
|
|
56
|
+
"aria-required": ariaRequired,
|
|
57
|
+
"aria-label": ariaLabel,
|
|
58
|
+
...rest
|
|
59
|
+
}, ref) => {
|
|
60
|
+
const [inner, setInner] = React.useState(() => Array.isArray(defaultValue) ? defaultValue : []);
|
|
61
|
+
const isControlled = value !== void 0;
|
|
62
|
+
const cur = isControlled ? Array.isArray(value) ? value : [] : inner;
|
|
63
|
+
const [innerOpen, setInnerOpen] = React.useState(false);
|
|
64
|
+
const open = innerOpen && !disabled;
|
|
65
|
+
const [path, setPath] = React.useState(cur);
|
|
66
|
+
const [query, setQuery] = React.useState("");
|
|
67
|
+
const searchRef = React.useRef(null);
|
|
68
|
+
const portalContainer = usePortalContainer();
|
|
69
|
+
const portalTheme = useComponentPortalTheme("Cascader");
|
|
70
|
+
const panelId = React.useId();
|
|
71
|
+
const searchConfig = typeof showSearch === "object" ? showSearch : {};
|
|
72
|
+
const searchable = !!showSearch;
|
|
73
|
+
const mergedListHeight = Number.isFinite(listHeight) && listHeight > 0 ? listHeight : 280;
|
|
74
|
+
const { triggerRef, floatingRef: panelRef, floatingStyle, zIndex: panelZIndex } = useFloating({
|
|
75
|
+
open,
|
|
76
|
+
placement: "bottom",
|
|
77
|
+
panelWidth: 520,
|
|
78
|
+
panelHeight: mergedListHeight + (searchable ? 58 : 12)
|
|
79
|
+
});
|
|
80
|
+
useOverlayLayer({
|
|
81
|
+
open: open && portalContainer != null,
|
|
82
|
+
containerRef: panelRef,
|
|
83
|
+
ownerRef: triggerRef,
|
|
84
|
+
zIndex: panelZIndex,
|
|
85
|
+
onEscape: () => setInnerOpen(false),
|
|
86
|
+
restoreFocus: true
|
|
87
|
+
});
|
|
88
|
+
const setTriggerRef = React.useCallback(
|
|
89
|
+
(node) => {
|
|
90
|
+
triggerRef.current = node;
|
|
91
|
+
if (typeof ref === "function") ref(node);
|
|
92
|
+
else if (ref) ref.current = node;
|
|
93
|
+
},
|
|
94
|
+
[ref, triggerRef]
|
|
95
|
+
);
|
|
96
|
+
React.useEffect(() => {
|
|
97
|
+
if (disabled) setInnerOpen(false);
|
|
98
|
+
}, [disabled]);
|
|
99
|
+
React.useEffect(() => {
|
|
100
|
+
const h = (e) => {
|
|
101
|
+
const t = e.target;
|
|
102
|
+
if (triggerRef.current?.contains(t)) return;
|
|
103
|
+
if (panelRef.current?.contains(t)) return;
|
|
104
|
+
setInnerOpen(false);
|
|
105
|
+
};
|
|
106
|
+
document.addEventListener("mousedown", h);
|
|
107
|
+
return () => document.removeEventListener("mousedown", h);
|
|
108
|
+
}, []);
|
|
109
|
+
React.useEffect(() => {
|
|
110
|
+
if (open) setPath(cur);
|
|
111
|
+
if (!open) setQuery("");
|
|
112
|
+
}, [open, cur]);
|
|
113
|
+
React.useEffect(() => {
|
|
114
|
+
if (!open || !searchable) return;
|
|
115
|
+
requestAnimationFrame(() => searchRef.current?.focus());
|
|
116
|
+
}, [open, searchable]);
|
|
117
|
+
const columns = [options];
|
|
118
|
+
let cursor = options;
|
|
119
|
+
for (const v of path) {
|
|
120
|
+
const match = cursor.find((o) => o.value === v);
|
|
121
|
+
if (match && match.children) {
|
|
122
|
+
cursor = match.children;
|
|
123
|
+
columns.push(cursor);
|
|
124
|
+
} else break;
|
|
125
|
+
}
|
|
126
|
+
const selectedOptionsForPath = (nextPath) => {
|
|
127
|
+
const selected = [];
|
|
128
|
+
let list = options;
|
|
129
|
+
for (const item of nextPath) {
|
|
130
|
+
const match = list.find((option) => option.value === item);
|
|
131
|
+
if (!match) break;
|
|
132
|
+
selected.push(match);
|
|
133
|
+
list = match.children ?? [];
|
|
134
|
+
}
|
|
135
|
+
return selected;
|
|
136
|
+
};
|
|
137
|
+
const commit = (nextPath, closeAfterSelect) => {
|
|
138
|
+
if (disabled) return;
|
|
139
|
+
const selectedOptions2 = selectedOptionsForPath(nextPath);
|
|
140
|
+
if (nextPath.length > 0 && (selectedOptions2.length !== nextPath.length || selectedOptions2.some((option) => option.disabled))) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (!isControlled) setInner(nextPath);
|
|
144
|
+
onChange?.(nextPath, selectedOptions2);
|
|
145
|
+
if (closeAfterSelect) setInnerOpen(false);
|
|
146
|
+
};
|
|
147
|
+
const pick = (depth, val, hasChildren) => {
|
|
148
|
+
if (disabled) return;
|
|
149
|
+
const np = [...path.slice(0, depth), val];
|
|
150
|
+
setPath(np);
|
|
151
|
+
if (!hasChildren || changeOnSelect) commit(np, !hasChildren);
|
|
152
|
+
};
|
|
153
|
+
const clear = (e) => {
|
|
154
|
+
e.stopPropagation();
|
|
155
|
+
if (disabled) return;
|
|
156
|
+
setPath([]);
|
|
157
|
+
if (!isControlled) setInner([]);
|
|
158
|
+
onChange?.([], []);
|
|
159
|
+
onClear?.();
|
|
160
|
+
};
|
|
161
|
+
const selectedOptions = selectedOptionsForPath(cur);
|
|
162
|
+
const labels = selectedOptions.map((option) => option.label);
|
|
163
|
+
const allPaths = React.useMemo(() => collectPaths(options), [options]);
|
|
164
|
+
const matchedPaths = React.useMemo(() => {
|
|
165
|
+
if (!query.trim()) return [];
|
|
166
|
+
const filter = searchConfig.filter ?? defaultSearchFilter;
|
|
167
|
+
const result = allPaths.filter(
|
|
168
|
+
(itemPath) => itemPath.every((option) => !option.disabled) && filter(query, itemPath)
|
|
169
|
+
);
|
|
170
|
+
const limit = searchConfig.limit === false ? result.length : searchConfig.limit ?? 50;
|
|
171
|
+
return result.slice(0, limit);
|
|
172
|
+
}, [allPaths, query, searchConfig.filter, searchConfig.limit]);
|
|
173
|
+
const panelClassName = [
|
|
174
|
+
"cascader-panel",
|
|
175
|
+
searchable && "with-search",
|
|
176
|
+
optionRender && "custom-options",
|
|
177
|
+
popupClassName,
|
|
178
|
+
dropdownClassName
|
|
179
|
+
].filter(Boolean).join(" ");
|
|
180
|
+
const panelStyle = {
|
|
181
|
+
...floatingStyle,
|
|
182
|
+
...portalTheme.style,
|
|
183
|
+
...portalTheme.styles.popup,
|
|
184
|
+
["--cascader-list-height"]: `${mergedListHeight}px`,
|
|
185
|
+
...popupStyle
|
|
186
|
+
};
|
|
187
|
+
return /* @__PURE__ */ jsxs("div", { ref: setTriggerRef, className: `cascader ${open ? "open" : ""} ${className}`, ...rest, children: [
|
|
188
|
+
/* @__PURE__ */ jsxs(
|
|
189
|
+
"button",
|
|
190
|
+
{
|
|
191
|
+
type: "button",
|
|
192
|
+
className: `cascader-trigger ${labels.length === 0 ? "placeholder" : ""}`,
|
|
193
|
+
disabled,
|
|
194
|
+
onClick: () => !disabled && setInnerOpen((current) => !current),
|
|
195
|
+
onKeyDown: (event) => {
|
|
196
|
+
if (event.key === "Escape" && open) {
|
|
197
|
+
event.preventDefault();
|
|
198
|
+
setInnerOpen(false);
|
|
199
|
+
} else if (event.key === "ArrowDown" && !open) {
|
|
200
|
+
event.preventDefault();
|
|
201
|
+
setInnerOpen(true);
|
|
202
|
+
} else if ((event.key === "Delete" || event.key === "Backspace") && allowClear && labels.length) {
|
|
203
|
+
event.preventDefault();
|
|
204
|
+
clear(event);
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"aria-haspopup": "dialog",
|
|
208
|
+
id: fieldId,
|
|
209
|
+
"aria-label": ariaLabel,
|
|
210
|
+
"aria-labelledby": ariaLabelledBy,
|
|
211
|
+
"aria-invalid": ariaInvalid,
|
|
212
|
+
"aria-required": ariaRequired,
|
|
213
|
+
"aria-describedby": ariaDescribedBy,
|
|
214
|
+
"aria-expanded": open,
|
|
215
|
+
"aria-controls": open ? panelId : void 0,
|
|
216
|
+
children: [
|
|
217
|
+
/* @__PURE__ */ jsx("span", { className: "cascader-value", children: labels.length ? selectedRender?.(selectedOptions, cur) ?? labels.map((label, index) => /* @__PURE__ */ jsxs("span", { children: [
|
|
218
|
+
index > 0 && " / ",
|
|
219
|
+
label
|
|
220
|
+
] }, index)) : placeholder }),
|
|
221
|
+
!!allowClear && labels.length > 0 && !disabled && /* @__PURE__ */ jsx(
|
|
222
|
+
"span",
|
|
223
|
+
{
|
|
224
|
+
className: "cascader-clear",
|
|
225
|
+
"aria-label": "Clear",
|
|
226
|
+
"aria-hidden": "true",
|
|
227
|
+
onClick: clear,
|
|
228
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 12 })
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
/* @__PURE__ */ jsx("span", { style: { position: "absolute", right: 12, color: "var(--lmn-cascader-fg-subtle, var(--fg-subtle))" }, children: /* @__PURE__ */ jsx(Icon, { name: "chevDown", size: 14 }) })
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
open && portalContainer && createPortal(
|
|
236
|
+
/* @__PURE__ */ jsxs(
|
|
237
|
+
"div",
|
|
238
|
+
{
|
|
239
|
+
ref: panelRef,
|
|
240
|
+
id: panelId,
|
|
241
|
+
role: "dialog",
|
|
242
|
+
"aria-label": "\u7EA7\u8054\u9009\u62E9",
|
|
243
|
+
className: panelClassName,
|
|
244
|
+
...portalTheme.dataAttributes,
|
|
245
|
+
style: panelStyle,
|
|
246
|
+
children: [
|
|
247
|
+
searchable && /* @__PURE__ */ jsx("div", { className: "cascader-search", children: /* @__PURE__ */ jsx(InternalComponentThemePart, { components: "Input", children: /* @__PURE__ */ jsx(
|
|
248
|
+
Input,
|
|
249
|
+
{
|
|
250
|
+
ref: searchRef,
|
|
251
|
+
size: "sm",
|
|
252
|
+
leadingIcon: "search",
|
|
253
|
+
value: query,
|
|
254
|
+
onValueChange: setQuery,
|
|
255
|
+
placeholder: "\u641C\u7D22...",
|
|
256
|
+
"aria-label": "\u641C\u7D22\u7EA7\u8054\u9009\u9879"
|
|
257
|
+
}
|
|
258
|
+
) }) }),
|
|
259
|
+
searchable && query.trim() ? /* @__PURE__ */ jsx("div", { className: "cascader-search-list", role: "listbox", children: matchedPaths.length === 0 ? /* @__PURE__ */ jsx("div", { className: "cascader-empty", children: "\u6682\u65E0\u5339\u914D\u9879" }) : matchedPaths.map((itemPath) => /* @__PURE__ */ jsx(
|
|
260
|
+
"button",
|
|
261
|
+
{
|
|
262
|
+
type: "button",
|
|
263
|
+
role: "option",
|
|
264
|
+
"aria-label": getCascaderPathAriaLabel(itemPath),
|
|
265
|
+
className: "cascader-search-item",
|
|
266
|
+
onClick: () => commit(itemPath.map((item) => item.value), true),
|
|
267
|
+
children: searchConfig.render ? searchConfig.render(query, itemPath) : itemPath.map((item) => item.label).map((label, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
268
|
+
index > 0 && /* @__PURE__ */ jsx("span", { className: "cascader-path-sep", children: "/" }),
|
|
269
|
+
/* @__PURE__ */ jsx("span", { children: label })
|
|
270
|
+
] }, index))
|
|
271
|
+
},
|
|
272
|
+
itemPath.map((item) => item.value).join("__")
|
|
273
|
+
)) }) : /* @__PURE__ */ jsx("div", { className: "cascader-columns", children: columns.map((col, depth) => /* @__PURE__ */ jsx("div", { className: "cascader-col", role: "listbox", "aria-label": `\u7B2C ${depth + 1} \u7EA7`, children: col.map((o) => {
|
|
274
|
+
const isActive = path[depth] === o.value;
|
|
275
|
+
const hasChildren = !!(o.children && o.children.length);
|
|
276
|
+
return /* @__PURE__ */ jsxs(
|
|
277
|
+
"button",
|
|
278
|
+
{
|
|
279
|
+
type: "button",
|
|
280
|
+
role: "option",
|
|
281
|
+
"aria-selected": isActive,
|
|
282
|
+
"aria-label": o.ariaLabel ?? getCascaderOptionText(o),
|
|
283
|
+
className: `cascader-item ${isActive ? "active" : ""}`,
|
|
284
|
+
disabled: o.disabled,
|
|
285
|
+
onClick: () => pick(depth, o.value, hasChildren),
|
|
286
|
+
children: [
|
|
287
|
+
optionRender ? /* @__PURE__ */ jsx("span", { className: "cascader-item-custom", children: optionRender(o, { depth, selected: isActive, hasChildren }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
288
|
+
renderIconSlot(o.icon, { size: 13, className: "cascader-icon" }),
|
|
289
|
+
/* @__PURE__ */ jsx("span", { className: "cascader-item-label", children: o.label })
|
|
290
|
+
] }),
|
|
291
|
+
hasChildren && /* @__PURE__ */ jsx("span", { className: "chev", children: /* @__PURE__ */ jsx(Icon, { name: "chevRight", size: 12 }) })
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
o.value
|
|
295
|
+
);
|
|
296
|
+
}) }, depth)) })
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
),
|
|
300
|
+
portalContainer
|
|
301
|
+
)
|
|
302
|
+
] });
|
|
303
|
+
});
|
|
304
|
+
CascaderBase.displayName = "Cascader";
|
|
305
|
+
var Cascader = withComponentTheme(
|
|
306
|
+
CascaderBase,
|
|
307
|
+
"Cascader",
|
|
308
|
+
["cascader", "input"]
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
export { Cascader };
|