@expcat/tigercat-react 0.4.3 → 1.0.4
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/chunk-24RUEJWB.js +293 -0
- package/dist/{chunk-WGRYO5HX.mjs → chunk-2UQC3WOI.mjs} +63 -49
- package/dist/{chunk-V5NIFF2F.mjs → chunk-2WBPUW75.mjs} +7 -7
- package/dist/{chunk-QL6UEG3U.js → chunk-2XOFRGY6.js} +16 -3
- package/dist/chunk-32PAZTVF.mjs +123 -0
- package/dist/{chunk-IGE44BIS.mjs → chunk-34DLDOGP.mjs} +105 -19
- package/dist/chunk-34VGG7AK.mjs +40 -0
- package/dist/chunk-3EB42WFR.mjs +35 -0
- package/dist/{chunk-Z7SXK2KO.js → chunk-3JGOTJZM.js} +10 -7
- package/dist/{chunk-ENSLMM3L.mjs → chunk-3KMKMAE3.mjs} +15 -10
- package/dist/{chunk-SFALTVPS.js → chunk-3USEV7EV.js} +2 -2
- package/dist/chunk-45H3JEI3.js +155 -0
- package/dist/chunk-4APNERYR.js +212 -0
- package/dist/chunk-4GV7UQJJ.js +96 -0
- package/dist/chunk-4MKMM2OI.js +112 -0
- package/dist/{chunk-XKDWDANG.js → chunk-4Q4GADHJ.js} +7 -7
- package/dist/{chunk-QM4GOQDT.js → chunk-4QJZT6QK.js} +44 -6
- package/dist/chunk-4QQZ5H4V.mjs +213 -0
- package/dist/chunk-5CGXFQND.mjs +100 -0
- package/dist/chunk-5EVHVZG5.js +119 -0
- package/dist/{chunk-LXX2ZDJN.js → chunk-5MALB34H.js} +9 -9
- package/dist/chunk-5ZYZQXEM.mjs +167 -0
- package/dist/{chunk-PEGJ2KHC.js → chunk-65VXCN5N.js} +50 -68
- package/dist/{chunk-6PXNWGR5.mjs → chunk-6744DTEB.mjs} +9 -4
- package/dist/chunk-6E7FPBRR.mjs +192 -0
- package/dist/{chunk-NQFHS4W2.mjs → chunk-6KKUJT6B.mjs} +1 -1
- package/dist/{chunk-OXT5RN55.mjs → chunk-6P3JIUSI.mjs} +3 -3
- package/dist/chunk-73BP3WQN.mjs +210 -0
- package/dist/{chunk-77PE7OFK.mjs → chunk-7MASYF4S.mjs} +1 -1
- package/dist/{chunk-VCNZEQEB.mjs → chunk-7QZ4XT2P.mjs} +6 -5
- package/dist/chunk-7YLVAZJQ.mjs +47 -0
- package/dist/{chunk-NV3JUZ3N.js → chunk-AGR3FM3V.js} +4 -4
- package/dist/{chunk-EHYSER2Z.js → chunk-AHF6JE43.js} +7 -7
- package/dist/{chunk-MWH6FCSE.js → chunk-AJQPGAYL.js} +8 -8
- package/dist/{chunk-3PV2MDST.mjs → chunk-AMOH5AMN.mjs} +8 -8
- package/dist/chunk-AOZLBASY.mjs +38 -0
- package/dist/chunk-ASALMHFI.js +34 -0
- package/dist/chunk-AUW7DCXL.js +61 -0
- package/dist/{chunk-QFYS5QIZ.mjs → chunk-AYDTXJOR.mjs} +4 -4
- package/dist/{chunk-LLHUBM6E.mjs → chunk-B3MNIAM5.mjs} +4 -4
- package/dist/chunk-B53R2U2R.mjs +86 -0
- package/dist/chunk-BALJCZ62.mjs +147 -0
- package/dist/{chunk-F24IF2QL.js → chunk-BCNKTT5C.js} +14 -9
- package/dist/{chunk-JNLX47UL.mjs → chunk-BJ2GUKPU.mjs} +74 -36
- package/dist/chunk-BKYE77F2.js +171 -0
- package/dist/chunk-BR5OSUZT.mjs +55 -0
- package/dist/chunk-BZ3AXFLG.js +149 -0
- package/dist/{chunk-SOC74QA2.js → chunk-C6WJ4GQW.js} +8 -8
- package/dist/{chunk-LXQOQJMU.js → chunk-CDT3P2ZN.js} +5 -12
- package/dist/chunk-CHH7DWIO.js +121 -0
- package/dist/{chunk-3T7L3MHX.js → chunk-CKFE2B36.js} +76 -38
- package/dist/{chunk-QNRAM3CM.js → chunk-CMGI5WHZ.js} +3 -2
- package/dist/chunk-CQGAZ5JQ.js +61 -0
- package/dist/chunk-CRSMECWE.mjs +33 -0
- package/dist/{chunk-KAWE5LQZ.js → chunk-D6BHFGTN.js} +29 -0
- package/dist/chunk-DAR2BMMV.js +150 -0
- package/dist/{chunk-OCVQ3LOT.mjs → chunk-DKT2EYVM.mjs} +3 -5
- package/dist/chunk-DZGDCRBH.mjs +30 -0
- package/dist/{chunk-S4GNTA7V.mjs → chunk-EBLAM3YP.mjs} +2 -2
- package/dist/chunk-EEF26RBA.mjs +48 -0
- package/dist/{chunk-PJCY45UP.mjs → chunk-EHU3J4B2.mjs} +1 -1
- package/dist/{chunk-RKB2VUQO.js → chunk-EOYJLBFD.js} +24 -21
- package/dist/{chunk-DTQZPZSJ.mjs → chunk-EPN7QWP6.mjs} +16 -2
- package/dist/{chunk-M46L73HR.js → chunk-ET5YJELZ.js} +14 -14
- package/dist/{chunk-NTODO3Q3.mjs → chunk-EV6KRX6F.mjs} +38 -8
- package/dist/{chunk-GB5G2CJY.js → chunk-F2OF6XZ6.js} +36 -6
- package/dist/chunk-F6KHZNRS.js +32 -0
- package/dist/{chunk-URM7QDHH.js → chunk-F7H4ALKN.js} +2 -2
- package/dist/chunk-FHE4D56E.js +188 -0
- package/dist/chunk-FNK4ZATV.js +94 -0
- package/dist/{chunk-RGFSY3S2.mjs → chunk-FPURO6QB.mjs} +16 -3
- package/dist/chunk-GBTKAKUD.mjs +300 -0
- package/dist/chunk-GOUMB34F.mjs +168 -0
- package/dist/chunk-H3NLKNR4.mjs +192 -0
- package/dist/{chunk-6W6CRBBG.mjs → chunk-HCZA4LV6.mjs} +8 -5
- package/dist/{chunk-5CLXOFRZ.mjs → chunk-HLJQZUIY.mjs} +11 -10
- package/dist/chunk-HLS4CHWX.mjs +29 -0
- package/dist/{chunk-MTL2QUM3.mjs → chunk-HSHVLIEL.mjs} +2 -2
- package/dist/{chunk-XWNVBCJA.js → chunk-HU3VDVH6.js} +14 -15
- package/dist/{chunk-SW4I4X6E.mjs → chunk-HUCBHFSL.mjs} +24 -21
- package/dist/{chunk-Q57BYUUW.js → chunk-HWWNBCFB.js} +39 -8
- package/dist/{chunk-MDZDPGRK.mjs → chunk-HZ5Z5Y2J.mjs} +29 -10
- package/dist/chunk-HZHFFVP7.mjs +63 -0
- package/dist/chunk-I3CDTF4U.js +45 -0
- package/dist/chunk-I4SKKEU3.js +151 -0
- package/dist/{chunk-RCNTRSUA.mjs → chunk-INBSKSZG.mjs} +51 -69
- package/dist/chunk-IOHPB4CF.js +148 -0
- package/dist/{chunk-QIJG42YQ.mjs → chunk-IPLK4AIE.mjs} +3 -3
- package/dist/{chunk-XWRJVNB6.js → chunk-IWP22YTF.js} +104 -18
- package/dist/chunk-J3N24I7A.mjs +58 -0
- package/dist/chunk-JB33A4S6.js +125 -0
- package/dist/{chunk-DQNA57CA.js → chunk-JLM4LBUS.js} +5 -12
- package/dist/{chunk-TJFS44SH.js → chunk-JLRRXRZO.js} +2 -4
- package/dist/{chunk-GNMOOYHG.js → chunk-KNBNE74O.js} +11 -10
- package/dist/chunk-LODDAS62.js +173 -0
- package/dist/{chunk-LL6B4BHF.mjs → chunk-LPNHBHS2.mjs} +4 -4
- package/dist/{chunk-KBTFBEPE.mjs → chunk-MB7CJ32C.mjs} +153 -16
- package/dist/{chunk-IP3MAJSH.mjs → chunk-MQ5ZP5RW.mjs} +5 -12
- package/dist/{chunk-KMTERPME.mjs → chunk-MSHCPJIJ.mjs} +1 -1
- package/dist/chunk-N66WEQ6M.js +240 -0
- package/dist/{chunk-TDRINUMH.js → chunk-NZNSUKPT.js} +29 -10
- package/dist/{chunk-EFLIFXZH.js → chunk-P3XVLJYD.js} +15 -1
- package/dist/chunk-P6E3DILH.mjs +51 -0
- package/dist/{chunk-HPXLUJFJ.mjs → chunk-PN33UCWB.mjs} +3 -5
- package/dist/chunk-PNAWOJ32.js +54 -0
- package/dist/{chunk-72MWKUBC.js → chunk-PUYT62KC.js} +17 -4
- package/dist/chunk-Q4JMAQXJ.js +41 -0
- package/dist/chunk-QBZODEIG.js +49 -0
- package/dist/chunk-QHG7KJH6.js +302 -0
- package/dist/chunk-QIXQYLH5.js +44 -0
- package/dist/chunk-QO3GGQAV.mjs +148 -0
- package/dist/{chunk-RGZYYVQF.mjs → chunk-QPGL4YEO.mjs} +39 -11
- package/dist/{chunk-6IH5QPTR.mjs → chunk-QPOH6SOO.mjs} +44 -6
- package/dist/chunk-QVZTZHCJ.mjs +148 -0
- package/dist/{chunk-C7UKFKVY.js → chunk-QYGBT4NL.js} +40 -12
- package/dist/chunk-QYLNPHKG.mjs +87 -0
- package/dist/chunk-R3QWJ7GT.mjs +186 -0
- package/dist/chunk-R5P72RIT.js +180 -0
- package/dist/chunk-R5XY4EQL.js +56 -0
- package/dist/chunk-RRJTIKU6.mjs +238 -0
- package/dist/{chunk-ZFHTSHXS.mjs → chunk-RUROWRB5.mjs} +30 -1
- package/dist/{chunk-SAZ6V6DX.js → chunk-RVCUNEBU.js} +2 -4
- package/dist/chunk-RWZIWKZR.js +188 -0
- package/dist/{chunk-HB2UYJBY.js → chunk-RYW4CV7U.js} +61 -47
- package/dist/chunk-S5Y6UHAK.mjs +116 -0
- package/dist/{chunk-YV6Y7C43.js → chunk-SDWJSALH.js} +8 -3
- package/dist/chunk-SQK2CPSV.mjs +59 -0
- package/dist/{chunk-NJCKTIWB.mjs → chunk-SWF7GJYT.mjs} +6 -7
- package/dist/chunk-T5FAKJ6C.mjs +49 -0
- package/dist/chunk-TFPIRBHL.js +103 -0
- package/dist/chunk-TKZO5UBH.js +65 -0
- package/dist/chunk-TMQA74FM.js +215 -0
- package/dist/chunk-TQEIMVJD.mjs +94 -0
- package/dist/chunk-TYCRDHE6.mjs +143 -0
- package/dist/chunk-TZNTHABR.js +58 -0
- package/dist/chunk-UBKOITHT.mjs +142 -0
- package/dist/{chunk-RDIEZKV2.js → chunk-UEJHVPE2.js} +2 -2
- package/dist/chunk-UF3DXKCI.js +35 -0
- package/dist/chunk-UIO6O4MI.js +57 -0
- package/dist/chunk-UKGQ7256.js +13 -0
- package/dist/chunk-UPQGB5NQ.mjs +38 -0
- package/dist/chunk-UQMPEMY7.mjs +11 -0
- package/dist/chunk-V3P4ZAGL.mjs +110 -0
- package/dist/{chunk-TGPQ4KET.mjs → chunk-VAQDUVBP.mjs} +29 -2
- package/dist/chunk-VHHEP5G7.js +123 -0
- package/dist/{chunk-J3HKED4B.js → chunk-VHWTMNQN.js} +8 -8
- package/dist/{chunk-56KTCMRE.mjs → chunk-VONFSF4S.mjs} +5 -12
- package/dist/{chunk-JWFEJ4XG.js → chunk-WGPUGPYE.js} +2 -2
- package/dist/chunk-WIWTY74F.mjs +44 -0
- package/dist/chunk-WNLUUD5N.mjs +179 -0
- package/dist/{chunk-VCOBBJLP.js → chunk-WVVXZKNI.js} +5 -4
- package/dist/chunk-XEYP62CR.js +194 -0
- package/dist/chunk-XFJ5Q5PF.mjs +30 -0
- package/dist/{chunk-ZBVFM3GJ.js → chunk-XO6NSGV3.js} +152 -15
- package/dist/{chunk-FMF2G6BJ.js → chunk-XR6B2URW.js} +3 -3
- package/dist/chunk-Y3NDP56G.mjs +174 -0
- package/dist/chunk-YHFBPSMF.js +198 -0
- package/dist/chunk-YID7J6ZK.js +37 -0
- package/dist/chunk-YJ4W6DMX.mjs +186 -0
- package/dist/chunk-YLZEOXFS.mjs +116 -0
- package/dist/chunk-YPHOVEVU.mjs +118 -0
- package/dist/chunk-YXWRSEP5.mjs +286 -0
- package/dist/chunk-Z6CRXABX.js +88 -0
- package/dist/{chunk-24U2DQRP.mjs → chunk-ZD4BVRYG.mjs} +2 -1
- package/dist/chunk-ZRHDNGWO.js +46 -0
- package/dist/chunk-ZYJTHGQW.js +181 -0
- package/dist/components/ActivityFeed.js +5 -5
- package/dist/components/ActivityFeed.mjs +3 -3
- package/dist/components/Affix.d.mts +11 -0
- package/dist/components/Affix.d.ts +11 -0
- package/dist/components/Affix.js +10 -0
- package/dist/components/Affix.mjs +1 -0
- package/dist/components/Alert.js +2 -2
- package/dist/components/Alert.mjs +1 -1
- package/dist/components/AreaChart.js +5 -5
- package/dist/components/AreaChart.mjs +3 -3
- package/dist/components/AutoComplete.d.mts +16 -0
- package/dist/components/AutoComplete.d.ts +16 -0
- package/dist/components/AutoComplete.js +10 -0
- package/dist/components/AutoComplete.mjs +1 -0
- package/dist/components/AvatarGroup.d.mts +14 -0
- package/dist/components/AvatarGroup.d.ts +14 -0
- package/dist/components/AvatarGroup.js +14 -0
- package/dist/components/AvatarGroup.mjs +1 -0
- package/dist/components/Badge.js +2 -2
- package/dist/components/Badge.mjs +1 -1
- package/dist/components/BarChart.js +5 -5
- package/dist/components/BarChart.mjs +3 -3
- package/dist/components/Button.d.mts +2 -1
- package/dist/components/Button.d.ts +2 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/Button.mjs +1 -1
- package/dist/components/ButtonGroup.d.mts +15 -0
- package/dist/components/ButtonGroup.d.ts +15 -0
- package/dist/components/ButtonGroup.js +18 -0
- package/dist/components/ButtonGroup.mjs +1 -0
- package/dist/components/Calendar.d.mts +15 -0
- package/dist/components/Calendar.d.ts +15 -0
- package/dist/components/Calendar.js +16 -0
- package/dist/components/Calendar.mjs +1 -0
- package/dist/components/Card.js +2 -2
- package/dist/components/Card.mjs +1 -1
- package/dist/components/Cascader.d.mts +15 -0
- package/dist/components/Cascader.d.ts +15 -0
- package/dist/components/Cascader.js +10 -0
- package/dist/components/Cascader.mjs +1 -0
- package/dist/components/ChatWindow.js +7 -6
- package/dist/components/ChatWindow.mjs +5 -4
- package/dist/components/Checkbox.js +4 -3
- package/dist/components/Checkbox.mjs +3 -2
- package/dist/components/CheckboxGroup.js +4 -3
- package/dist/components/CheckboxGroup.mjs +2 -1
- package/dist/components/CodeEditor.d.mts +11 -0
- package/dist/components/CodeEditor.d.ts +11 -0
- package/dist/components/CodeEditor.js +16 -0
- package/dist/components/CodeEditor.mjs +1 -0
- package/dist/components/ColorPicker.d.mts +12 -0
- package/dist/components/ColorPicker.d.ts +12 -0
- package/dist/components/ColorPicker.js +10 -0
- package/dist/components/ColorPicker.mjs +1 -0
- package/dist/components/CommentThread.js +7 -6
- package/dist/components/CommentThread.mjs +5 -4
- package/dist/components/ConfigProvider.d.mts +5 -1
- package/dist/components/ConfigProvider.d.ts +5 -1
- package/dist/components/ConfigProvider.js +3 -3
- package/dist/components/ConfigProvider.mjs +1 -1
- package/dist/components/CropUpload.js +4 -4
- package/dist/components/CropUpload.mjs +3 -3
- package/dist/components/DataTableWithToolbar.js +7 -7
- package/dist/components/DataTableWithToolbar.mjs +5 -5
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/Descriptions.d.mts +3 -3
- package/dist/components/Descriptions.d.ts +3 -3
- package/dist/components/Descriptions.js +3 -3
- package/dist/components/Descriptions.mjs +1 -1
- package/dist/components/Divider.js +2 -2
- package/dist/components/Divider.mjs +1 -1
- package/dist/components/DonutChart.js +5 -5
- package/dist/components/DonutChart.mjs +3 -3
- package/dist/components/Drawer.js +2 -2
- package/dist/components/Drawer.mjs +1 -1
- package/dist/components/Dropdown.d.mts +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown.js +3 -3
- package/dist/components/Dropdown.mjs +1 -1
- package/dist/components/DropdownItem.js +3 -3
- package/dist/components/DropdownItem.mjs +2 -2
- package/dist/components/Empty.d.mts +14 -0
- package/dist/components/Empty.d.ts +14 -0
- package/dist/components/Empty.js +10 -0
- package/dist/components/Empty.mjs +1 -0
- package/dist/components/FileManager.d.mts +29 -0
- package/dist/components/FileManager.d.ts +29 -0
- package/dist/components/FileManager.js +16 -0
- package/dist/components/FileManager.mjs +1 -0
- package/dist/components/FloatButton.d.mts +21 -0
- package/dist/components/FloatButton.d.ts +21 -0
- package/dist/components/FloatButton.js +14 -0
- package/dist/components/FloatButton.mjs +1 -0
- package/dist/components/Form.d.mts +24 -0
- package/dist/components/Form.d.ts +24 -0
- package/dist/components/Form.js +3 -3
- package/dist/components/Form.mjs +1 -1
- package/dist/components/FormItem.js +3 -3
- package/dist/components/FormItem.mjs +2 -2
- package/dist/components/FormWizard.d.mts +1 -1
- package/dist/components/FormWizard.d.ts +1 -1
- package/dist/components/FormWizard.js +5 -5
- package/dist/components/FormWizard.mjs +3 -3
- package/dist/components/FunnelChart.d.mts +15 -0
- package/dist/components/FunnelChart.d.ts +15 -0
- package/dist/components/FunnelChart.js +14 -0
- package/dist/components/FunnelChart.mjs +5 -0
- package/dist/components/GaugeChart.d.mts +9 -0
- package/dist/components/GaugeChart.d.ts +9 -0
- package/dist/components/GaugeChart.js +11 -0
- package/dist/components/GaugeChart.mjs +2 -0
- package/dist/components/HeatmapChart.d.mts +13 -0
- package/dist/components/HeatmapChart.d.ts +13 -0
- package/dist/components/HeatmapChart.js +13 -0
- package/dist/components/HeatmapChart.mjs +4 -0
- package/dist/components/Image.d.mts +4 -0
- package/dist/components/Image.d.ts +4 -0
- package/dist/components/Image.js +4 -4
- package/dist/components/Image.mjs +3 -3
- package/dist/components/ImageGroup.js +4 -4
- package/dist/components/ImageGroup.mjs +2 -2
- package/dist/components/ImagePreview.d.mts +3 -2
- package/dist/components/ImagePreview.d.ts +3 -2
- package/dist/components/ImagePreview.js +2 -2
- package/dist/components/ImagePreview.mjs +1 -1
- package/dist/components/ImageViewer.d.mts +20 -0
- package/dist/components/ImageViewer.d.ts +20 -0
- package/dist/components/ImageViewer.js +10 -0
- package/dist/components/ImageViewer.mjs +1 -0
- package/dist/components/InfiniteScroll.d.mts +20 -0
- package/dist/components/InfiniteScroll.d.ts +20 -0
- package/dist/components/InfiniteScroll.js +16 -0
- package/dist/components/InfiniteScroll.mjs +1 -0
- package/dist/components/Input.d.mts +5 -0
- package/dist/components/Input.d.ts +5 -0
- package/dist/components/Input.js +2 -2
- package/dist/components/Input.mjs +1 -1
- package/dist/components/InputGroup.d.mts +20 -0
- package/dist/components/InputGroup.d.ts +20 -0
- package/dist/components/InputGroup.js +22 -0
- package/dist/components/InputGroup.mjs +1 -0
- package/dist/components/InputNumber.js +2 -2
- package/dist/components/InputNumber.mjs +1 -1
- package/dist/components/Kanban.d.mts +46 -0
- package/dist/components/Kanban.d.ts +46 -0
- package/dist/components/Kanban.js +17 -0
- package/dist/components/Kanban.mjs +2 -0
- package/dist/components/LineChart.js +5 -5
- package/dist/components/LineChart.mjs +3 -3
- package/dist/components/List.d.mts +9 -1
- package/dist/components/List.d.ts +9 -1
- package/dist/components/List.js +2 -2
- package/dist/components/List.mjs +1 -1
- package/dist/components/Mentions.d.mts +18 -0
- package/dist/components/Mentions.d.ts +18 -0
- package/dist/components/Mentions.js +16 -0
- package/dist/components/Mentions.mjs +1 -0
- package/dist/components/Modal.d.mts +2 -2
- package/dist/components/Modal.d.ts +2 -2
- package/dist/components/Modal.js +3 -3
- package/dist/components/Modal.mjs +2 -2
- package/dist/components/NotificationCenter.js +8 -8
- package/dist/components/NotificationCenter.mjs +6 -6
- package/dist/components/PieChart.js +4 -4
- package/dist/components/PieChart.mjs +2 -2
- package/dist/components/Popconfirm.d.mts +1 -1
- package/dist/components/Popconfirm.d.ts +1 -1
- package/dist/components/Popconfirm.js +3 -3
- package/dist/components/Popconfirm.mjs +2 -2
- package/dist/components/Popover.d.mts +1 -1
- package/dist/components/Popover.d.ts +1 -1
- package/dist/components/Popover.js +3 -3
- package/dist/components/Popover.mjs +2 -2
- package/dist/components/PrintLayout.d.mts +22 -0
- package/dist/components/PrintLayout.d.ts +22 -0
- package/dist/components/PrintLayout.js +14 -0
- package/dist/components/PrintLayout.mjs +1 -0
- package/dist/components/Progress.js +2 -2
- package/dist/components/Progress.mjs +1 -1
- package/dist/components/QRCode.d.mts +16 -0
- package/dist/components/QRCode.d.ts +16 -0
- package/dist/components/QRCode.js +16 -0
- package/dist/components/QRCode.mjs +1 -0
- package/dist/components/RadarChart.js +4 -4
- package/dist/components/RadarChart.mjs +2 -2
- package/dist/components/Radio.js +4 -3
- package/dist/components/Radio.mjs +3 -2
- package/dist/components/RadioGroup.js +4 -3
- package/dist/components/RadioGroup.mjs +2 -1
- package/dist/components/Rate.d.mts +14 -0
- package/dist/components/Rate.d.ts +14 -0
- package/dist/components/Rate.js +10 -0
- package/dist/components/Rate.mjs +1 -0
- package/dist/components/Resizable.d.mts +13 -0
- package/dist/components/Resizable.d.ts +13 -0
- package/dist/components/Resizable.js +16 -0
- package/dist/components/Resizable.mjs +1 -0
- package/dist/components/Result.d.mts +14 -0
- package/dist/components/Result.d.ts +14 -0
- package/dist/components/Result.js +11 -0
- package/dist/components/Result.mjs +2 -0
- package/dist/components/RichTextEditor.d.mts +26 -0
- package/dist/components/RichTextEditor.d.ts +26 -0
- package/dist/components/RichTextEditor.js +17 -0
- package/dist/components/RichTextEditor.mjs +2 -0
- package/dist/components/ScatterChart.js +5 -5
- package/dist/components/ScatterChart.mjs +3 -3
- package/dist/components/Segmented.d.mts +12 -0
- package/dist/components/Segmented.d.ts +12 -0
- package/dist/components/Segmented.js +10 -0
- package/dist/components/Segmented.mjs +1 -0
- package/dist/components/Select.js +2 -2
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Splitter.d.mts +18 -0
- package/dist/components/Splitter.d.ts +18 -0
- package/dist/components/Splitter.js +16 -0
- package/dist/components/Splitter.mjs +1 -0
- package/dist/components/Statistic.d.mts +8 -0
- package/dist/components/Statistic.d.ts +8 -0
- package/dist/components/Statistic.js +10 -0
- package/dist/components/Statistic.mjs +1 -0
- package/dist/components/Stepper.d.mts +12 -0
- package/dist/components/Stepper.d.ts +12 -0
- package/dist/components/Stepper.js +10 -0
- package/dist/components/Stepper.mjs +1 -0
- package/dist/components/SunburstChart.d.mts +15 -0
- package/dist/components/SunburstChart.d.ts +15 -0
- package/dist/components/SunburstChart.js +14 -0
- package/dist/components/SunburstChart.mjs +5 -0
- package/dist/components/TabPane.js +2 -2
- package/dist/components/TabPane.mjs +1 -1
- package/dist/components/Table.d.mts +13 -1
- package/dist/components/Table.d.ts +13 -1
- package/dist/components/Table.js +2 -2
- package/dist/components/Table.mjs +1 -1
- package/dist/components/Tabs.d.mts +7 -0
- package/dist/components/Tabs.d.ts +7 -0
- package/dist/components/Tabs.js +3 -3
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/TaskBoard.js +4 -4
- package/dist/components/TaskBoard.mjs +2 -2
- package/dist/components/Text.js +2 -2
- package/dist/components/Text.mjs +1 -1
- package/dist/components/Textarea.js +3 -2
- package/dist/components/Textarea.mjs +2 -1
- package/dist/components/Tooltip.d.mts +1 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/Tooltip.mjs +2 -2
- package/dist/components/Tour.d.mts +14 -0
- package/dist/components/Tour.d.ts +14 -0
- package/dist/components/Tour.js +11 -0
- package/dist/components/Tour.mjs +2 -0
- package/dist/components/Transfer.d.mts +12 -0
- package/dist/components/Transfer.d.ts +12 -0
- package/dist/components/Transfer.js +10 -0
- package/dist/components/Transfer.mjs +1 -0
- package/dist/components/Tree.d.mts +18 -0
- package/dist/components/Tree.d.ts +18 -0
- package/dist/components/Tree.js +3 -3
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/TreeMapChart.d.mts +15 -0
- package/dist/components/TreeMapChart.d.ts +15 -0
- package/dist/components/TreeMapChart.js +14 -0
- package/dist/components/TreeMapChart.mjs +5 -0
- package/dist/components/TreeSelect.d.mts +12 -0
- package/dist/components/TreeSelect.d.ts +12 -0
- package/dist/components/TreeSelect.js +10 -0
- package/dist/components/TreeSelect.mjs +1 -0
- package/dist/components/Upload.js +3 -3
- package/dist/components/Upload.mjs +2 -2
- package/dist/components/VirtualList.d.mts +14 -0
- package/dist/components/VirtualList.d.ts +14 -0
- package/dist/components/VirtualList.js +10 -0
- package/dist/components/VirtualList.mjs +1 -0
- package/dist/components/VirtualTable.d.mts +26 -0
- package/dist/components/VirtualTable.d.ts +26 -0
- package/dist/components/VirtualTable.js +16 -0
- package/dist/components/VirtualTable.mjs +1 -0
- package/dist/components/Watermark.d.mts +9 -0
- package/dist/components/Watermark.d.ts +9 -0
- package/dist/components/Watermark.js +10 -0
- package/dist/components/Watermark.mjs +1 -0
- package/dist/index.d.mts +85 -2
- package/dist/index.d.ts +85 -2
- package/dist/index.js +504 -181
- package/dist/index.mjs +223 -64
- package/package.json +2 -2
- package/dist/chunk-3M2IG6IN.mjs +0 -34
- package/dist/chunk-4Y7YH32A.mjs +0 -157
- package/dist/chunk-FPNT7FV5.mjs +0 -44
- package/dist/chunk-FSDZJD7M.js +0 -159
- package/dist/chunk-I5TCE5E7.js +0 -32
- package/dist/chunk-LIV33O73.mjs +0 -26
- package/dist/chunk-O3W3OZ6V.js +0 -37
- package/dist/chunk-OYCMGKQ7.js +0 -111
- package/dist/chunk-RPTLVIBF.mjs +0 -109
- package/dist/chunk-RYWGELJ7.js +0 -46
- package/dist/chunk-SSQOCZ6O.js +0 -36
- package/dist/chunk-UZ7SBFQV.mjs +0 -35
- package/dist/chunk-VEGBO77D.mjs +0 -20
- package/dist/{chunk-2DW3WFZI.mjs → chunk-2LUDQBVY.mjs} +2 -2
- package/dist/{chunk-JQNKI2ZZ.js → chunk-C443YA4U.js} +2 -2
- package/dist/{chunk-QGCQAJGL.mjs → chunk-DEQWHJLQ.mjs} +2 -2
- package/dist/{chunk-N4EMXCRQ.mjs → chunk-FXX3GD35.mjs} +1 -1
- package/dist/{chunk-GASFXURT.js → chunk-KQJYSG23.js} +2 -2
- package/dist/{chunk-NEP3CS6S.js → chunk-OE6WTZES.js} +2 -2
- package/dist/{chunk-SH6O6LDJ.mjs → chunk-QQDKQLHJ.mjs} +1 -1
- package/dist/{chunk-F4Q5QMX2.js → chunk-TVJZB7ZC.js} +1 -1
- package/dist/{chunk-SM7RDJFB.js → chunk-VILZFNR7.js} +2 -2
- package/dist/{chunk-W4TFISRK.js → chunk-WK5QJO57.js} +1 -1
- package/dist/{chunk-CYZLGYY4.mjs → chunk-XNMSECO4.mjs} +2 -2
- package/dist/{chunk-763M6U5U.mjs → chunk-ZDL3GE3Q.mjs} +2 -2
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKQZ4F7FZ_js = require('./chunk-KQZ4F7FZ.js');
|
|
4
|
+
var chunk6PBNFLM7_js = require('./chunk-6PBNFLM7.js');
|
|
5
|
+
var chunkM375I56K_js = require('./chunk-M375I56K.js');
|
|
6
|
+
var chunkDUWAV47E_js = require('./chunk-DUWAV47E.js');
|
|
7
|
+
var react = require('react');
|
|
8
|
+
var tigercatCore = require('@expcat/tigercat-core');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
var FunnelChart = ({
|
|
12
|
+
width = 320,
|
|
13
|
+
height = 300,
|
|
14
|
+
padding = 24,
|
|
15
|
+
data,
|
|
16
|
+
direction: _direction = "vertical",
|
|
17
|
+
gap = 2,
|
|
18
|
+
pinch = false,
|
|
19
|
+
colors,
|
|
20
|
+
hoverable = false,
|
|
21
|
+
hoveredIndex: hoveredIndexProp,
|
|
22
|
+
activeOpacity = 1,
|
|
23
|
+
inactiveOpacity = 0.25,
|
|
24
|
+
selectable = false,
|
|
25
|
+
selectedIndex: selectedIndexProp,
|
|
26
|
+
showLegend = false,
|
|
27
|
+
legendPosition = "bottom",
|
|
28
|
+
legendMarkerSize = 10,
|
|
29
|
+
legendGap = 8,
|
|
30
|
+
showTooltip = true,
|
|
31
|
+
tooltipFormatter,
|
|
32
|
+
title,
|
|
33
|
+
desc,
|
|
34
|
+
className,
|
|
35
|
+
onHoveredIndexChange,
|
|
36
|
+
onSelectedIndexChange,
|
|
37
|
+
onSegmentClick,
|
|
38
|
+
onSegmentHover
|
|
39
|
+
}) => {
|
|
40
|
+
const {
|
|
41
|
+
tooltipPosition,
|
|
42
|
+
resolvedHoveredIndex,
|
|
43
|
+
activeIndex,
|
|
44
|
+
handleMouseEnter,
|
|
45
|
+
handleMouseMove,
|
|
46
|
+
handleMouseLeave,
|
|
47
|
+
handleClick,
|
|
48
|
+
handleKeyDown,
|
|
49
|
+
handleLegendClick,
|
|
50
|
+
handleLegendHover,
|
|
51
|
+
handleLegendLeave,
|
|
52
|
+
wrapperClasses
|
|
53
|
+
} = chunkKQZ4F7FZ_js.useChartInteraction({
|
|
54
|
+
hoverable,
|
|
55
|
+
hoveredIndexProp,
|
|
56
|
+
selectable,
|
|
57
|
+
selectedIndexProp,
|
|
58
|
+
activeOpacity,
|
|
59
|
+
inactiveOpacity,
|
|
60
|
+
legendPosition,
|
|
61
|
+
getData: (index) => data[index],
|
|
62
|
+
onHoveredIndexChange: (index) => {
|
|
63
|
+
onHoveredIndexChange?.(index);
|
|
64
|
+
onSegmentHover?.(index, index !== null ? data[index] : null);
|
|
65
|
+
},
|
|
66
|
+
onSelectedIndexChange,
|
|
67
|
+
callbacks: { onClick: onSegmentClick }
|
|
68
|
+
});
|
|
69
|
+
const innerRect = react.useMemo(
|
|
70
|
+
() => tigercatCore.getChartInnerRect(width, height, padding),
|
|
71
|
+
[width, height, padding]
|
|
72
|
+
);
|
|
73
|
+
const palette = react.useMemo(() => tigercatCore.resolveChartPalette(colors), [colors]);
|
|
74
|
+
const segments = react.useMemo(
|
|
75
|
+
() => tigercatCore.computeFunnelSegments(data, {
|
|
76
|
+
width: innerRect.width,
|
|
77
|
+
height: innerRect.height,
|
|
78
|
+
gap,
|
|
79
|
+
pinch,
|
|
80
|
+
colors: palette
|
|
81
|
+
}),
|
|
82
|
+
[data, innerRect.width, innerRect.height, gap, pinch, palette]
|
|
83
|
+
);
|
|
84
|
+
const total = react.useMemo(() => data.reduce((s, d) => s + d.value, 0), [data]);
|
|
85
|
+
const legendItems = react.useMemo(
|
|
86
|
+
() => tigercatCore.buildChartLegendItems({
|
|
87
|
+
data,
|
|
88
|
+
palette,
|
|
89
|
+
activeIndex,
|
|
90
|
+
getLabel: (d, i) => d.label ?? `Stage ${i + 1}`,
|
|
91
|
+
getColor: (d, i) => d.color ?? palette[i % palette.length]
|
|
92
|
+
}),
|
|
93
|
+
[data, palette, activeIndex]
|
|
94
|
+
);
|
|
95
|
+
const tooltipContent = react.useMemo(
|
|
96
|
+
() => tigercatCore.resolveChartTooltipContent(resolvedHoveredIndex, data, tooltipFormatter, (datum, index) => {
|
|
97
|
+
const pct = total > 0 ? (datum.value / total * 100).toFixed(1) : "0";
|
|
98
|
+
const label = datum.label ?? `Stage ${index + 1}`;
|
|
99
|
+
return `${label}: ${datum.value} (${pct}%)`;
|
|
100
|
+
}),
|
|
101
|
+
[resolvedHoveredIndex, data, tooltipFormatter, total]
|
|
102
|
+
);
|
|
103
|
+
const interactive = hoverable || selectable;
|
|
104
|
+
const chart = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
105
|
+
chunkDUWAV47E_js.ChartCanvas,
|
|
106
|
+
{
|
|
107
|
+
width,
|
|
108
|
+
height,
|
|
109
|
+
padding,
|
|
110
|
+
title,
|
|
111
|
+
desc,
|
|
112
|
+
className: tigercatCore.classNames(className),
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { "data-series-type": "funnel", children: segments.map((seg) => {
|
|
115
|
+
const opacity = tigercatCore.getChartElementOpacity(seg.index, activeIndex, {
|
|
116
|
+
activeOpacity,
|
|
117
|
+
inactiveOpacity
|
|
118
|
+
});
|
|
119
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
120
|
+
"path",
|
|
121
|
+
{
|
|
122
|
+
d: seg.path,
|
|
123
|
+
fill: seg.color,
|
|
124
|
+
opacity,
|
|
125
|
+
className: tigercatCore.classNames(interactive && "cursor-pointer"),
|
|
126
|
+
style: { transition: "opacity 0.2s ease-out" },
|
|
127
|
+
tabIndex: selectable ? 0 : void 0,
|
|
128
|
+
role: selectable ? "button" : "img",
|
|
129
|
+
"aria-label": seg.label,
|
|
130
|
+
onMouseEnter: (e) => handleMouseEnter(seg.index, e),
|
|
131
|
+
onMouseMove: handleMouseMove,
|
|
132
|
+
onMouseLeave: handleMouseLeave,
|
|
133
|
+
onClick: () => handleClick(seg.index),
|
|
134
|
+
onKeyDown: (e) => handleKeyDown(e, seg.index)
|
|
135
|
+
},
|
|
136
|
+
`seg-${seg.index}`
|
|
137
|
+
);
|
|
138
|
+
}) }),
|
|
139
|
+
segments.map((seg) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
140
|
+
"text",
|
|
141
|
+
{
|
|
142
|
+
x: seg.cx,
|
|
143
|
+
y: seg.cy,
|
|
144
|
+
className: tigercatCore.chartAxisTickTextClasses,
|
|
145
|
+
textAnchor: "middle",
|
|
146
|
+
dominantBaseline: "middle",
|
|
147
|
+
children: seg.label
|
|
148
|
+
},
|
|
149
|
+
`label-${seg.index}`
|
|
150
|
+
))
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
const tooltip = showTooltip && hoverable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
155
|
+
chunkM375I56K_js.ChartTooltip,
|
|
156
|
+
{
|
|
157
|
+
content: tooltipContent,
|
|
158
|
+
visible: resolvedHoveredIndex !== null && tooltipContent !== "",
|
|
159
|
+
x: tooltipPosition.x,
|
|
160
|
+
y: tooltipPosition.y
|
|
161
|
+
}
|
|
162
|
+
) : null;
|
|
163
|
+
if (!showLegend) {
|
|
164
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-block relative", children: [
|
|
165
|
+
chart,
|
|
166
|
+
tooltip
|
|
167
|
+
] });
|
|
168
|
+
}
|
|
169
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: wrapperClasses, children: [
|
|
170
|
+
chart,
|
|
171
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
172
|
+
chunk6PBNFLM7_js.ChartLegend,
|
|
173
|
+
{
|
|
174
|
+
items: legendItems,
|
|
175
|
+
position: legendPosition,
|
|
176
|
+
markerSize: legendMarkerSize,
|
|
177
|
+
gap: legendGap,
|
|
178
|
+
interactive,
|
|
179
|
+
onItemClick: handleLegendClick,
|
|
180
|
+
onItemHover: handleLegendHover,
|
|
181
|
+
onItemLeave: handleLegendLeave
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
tooltip
|
|
185
|
+
] });
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
exports.FunnelChart = FunnelChart;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
var ReactDOM = require('react-dom');
|
|
5
|
+
var tigercatCore = require('@expcat/tigercat-core');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
11
|
+
|
|
12
|
+
// src/components/FloatButton.tsx
|
|
13
|
+
var FloatButton = ({
|
|
14
|
+
shape = "circle",
|
|
15
|
+
size = "md",
|
|
16
|
+
type = "primary",
|
|
17
|
+
tooltip,
|
|
18
|
+
disabled = false,
|
|
19
|
+
ariaLabel,
|
|
20
|
+
className,
|
|
21
|
+
children,
|
|
22
|
+
onClick,
|
|
23
|
+
...props
|
|
24
|
+
}) => {
|
|
25
|
+
const classes = react.useMemo(
|
|
26
|
+
() => tigercatCore.classNames(
|
|
27
|
+
tigercatCore.floatButtonBaseClasses,
|
|
28
|
+
tigercatCore.floatButtonShapeClasses[shape],
|
|
29
|
+
tigercatCore.floatButtonSizeClasses[size],
|
|
30
|
+
tigercatCore.floatButtonTypeClasses[type],
|
|
31
|
+
disabled && tigercatCore.floatButtonDisabledClasses,
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
[shape, size, type, disabled, className]
|
|
35
|
+
);
|
|
36
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37
|
+
"button",
|
|
38
|
+
{
|
|
39
|
+
className: classes,
|
|
40
|
+
type: "button",
|
|
41
|
+
disabled,
|
|
42
|
+
"aria-label": ariaLabel ?? tooltip,
|
|
43
|
+
title: tooltip,
|
|
44
|
+
onClick: disabled ? void 0 : onClick,
|
|
45
|
+
...props,
|
|
46
|
+
children
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
var FloatButtonGroup = ({
|
|
51
|
+
shape: _shape = "circle",
|
|
52
|
+
trigger = "click",
|
|
53
|
+
open: controlledOpen,
|
|
54
|
+
triggerNode,
|
|
55
|
+
children,
|
|
56
|
+
className,
|
|
57
|
+
onOpenChange,
|
|
58
|
+
...props
|
|
59
|
+
}) => {
|
|
60
|
+
const [internalOpen, setInternalOpen] = react.useState(false);
|
|
61
|
+
const isOpen = controlledOpen ?? internalOpen;
|
|
62
|
+
const toggle = react.useCallback(() => {
|
|
63
|
+
const next = !isOpen;
|
|
64
|
+
setInternalOpen(next);
|
|
65
|
+
onOpenChange?.(next);
|
|
66
|
+
}, [isOpen, onOpenChange]);
|
|
67
|
+
const handleMouseEnter = react.useCallback(() => {
|
|
68
|
+
setInternalOpen(true);
|
|
69
|
+
onOpenChange?.(true);
|
|
70
|
+
}, [onOpenChange]);
|
|
71
|
+
const handleMouseLeave = react.useCallback(() => {
|
|
72
|
+
setInternalOpen(false);
|
|
73
|
+
onOpenChange?.(false);
|
|
74
|
+
}, [onOpenChange]);
|
|
75
|
+
const groupClasses = react.useMemo(() => tigercatCore.classNames(tigercatCore.floatButtonGroupClasses, className), [className]);
|
|
76
|
+
if (typeof document === "undefined") return null;
|
|
77
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: groupClasses,
|
|
81
|
+
onMouseEnter: trigger === "hover" ? handleMouseEnter : void 0,
|
|
82
|
+
onMouseLeave: trigger === "hover" ? handleMouseLeave : void 0,
|
|
83
|
+
...props,
|
|
84
|
+
children: [
|
|
85
|
+
triggerNode && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: trigger === "click" ? toggle : void 0, children: triggerNode }),
|
|
86
|
+
isOpen && children
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
return ReactDOM__default.default.createPortal(content, document.body);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
exports.FloatButton = FloatButton;
|
|
94
|
+
exports.FloatButtonGroup = FloatButtonGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useFormContext } from './chunk-
|
|
1
|
+
import { useFormContext } from './chunk-34DLDOGP.mjs';
|
|
2
2
|
import React, { useState, useRef, useId, useMemo, useEffect, useCallback } from 'react';
|
|
3
3
|
import { getFormItemFieldClasses, getFormItemAsteriskClasses, getFieldError, classNames, getFormItemClasses, getFormItemLabelClasses, getFormItemErrorClasses, getFormItemContentClasses } from '@expcat/tigercat-core';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -26,6 +26,7 @@ var FormItem = ({
|
|
|
26
26
|
rules,
|
|
27
27
|
error: controlledError,
|
|
28
28
|
showMessage = true,
|
|
29
|
+
errorDisplayMode = "inline",
|
|
29
30
|
size,
|
|
30
31
|
children,
|
|
31
32
|
className
|
|
@@ -188,7 +189,13 @@ var FormItem = ({
|
|
|
188
189
|
() => classNames(getFormItemErrorClasses(actualSize), hasError && "opacity-100"),
|
|
189
190
|
[actualSize, hasError]
|
|
190
191
|
);
|
|
191
|
-
const contentClasses = useMemo(
|
|
192
|
+
const contentClasses = useMemo(
|
|
193
|
+
() => classNames(
|
|
194
|
+
getFormItemContentClasses(labelPosition),
|
|
195
|
+
errorDisplayMode === "popup" && "relative"
|
|
196
|
+
),
|
|
197
|
+
[labelPosition, errorDisplayMode]
|
|
198
|
+
);
|
|
192
199
|
return /* @__PURE__ */ jsxs("div", { className: formItemClasses, children: [
|
|
193
200
|
label && /* @__PURE__ */ jsxs(
|
|
194
201
|
"label",
|
|
@@ -223,7 +230,13 @@ var FormItem = ({
|
|
|
223
230
|
{
|
|
224
231
|
id: hasError ? errorId : void 0,
|
|
225
232
|
role: hasError ? "alert" : void 0,
|
|
226
|
-
className:
|
|
233
|
+
className: errorDisplayMode === "block" ? classNames(
|
|
234
|
+
"mt-1 p-2 rounded bg-red-50 border border-red-200 text-red-600 text-sm",
|
|
235
|
+
!hasError && "hidden"
|
|
236
|
+
) : errorDisplayMode === "popup" ? classNames(
|
|
237
|
+
"absolute z-10 mt-1 px-2 py-1 rounded bg-red-600 text-white text-xs shadow-lg",
|
|
238
|
+
!hasError && "hidden"
|
|
239
|
+
) : errorClasses,
|
|
227
240
|
"aria-hidden": hasError ? void 0 : true,
|
|
228
241
|
children: hasError ? errorMessage : ""
|
|
229
242
|
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { useId, useState, useRef, useMemo, useEffect, useCallback } from 'react';
|
|
2
|
+
import { getCascaderDisplayLabel, getCascaderColumns, flattenCascaderOptions, filterCascaderOptions, classNames, getCascaderTriggerClasses, isCascaderOptionExpandable, cascaderBaseClasses, icon20ViewBox, closeSolidIcon20PathD, chevronDownSolidIcon20PathD, cascaderSearchInputClasses, cascaderEmptyStateClasses, cascaderSearchResultClasses, cascaderColumnClasses, getCascaderOptionClasses, cascaderDropdownClasses } from '@expcat/tigercat-core';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/components/Cascader.tsx
|
|
6
|
+
var CASCADER_KEYS = /* @__PURE__ */ new Set([
|
|
7
|
+
"options",
|
|
8
|
+
"value",
|
|
9
|
+
"onChange",
|
|
10
|
+
"placeholder",
|
|
11
|
+
"size",
|
|
12
|
+
"disabled",
|
|
13
|
+
"clearable",
|
|
14
|
+
"showSearch",
|
|
15
|
+
"expandTrigger",
|
|
16
|
+
"changeOnSelect",
|
|
17
|
+
"separator",
|
|
18
|
+
"notFoundText",
|
|
19
|
+
"className"
|
|
20
|
+
]);
|
|
21
|
+
var Cascader = (props) => {
|
|
22
|
+
const {
|
|
23
|
+
options = [],
|
|
24
|
+
value = [],
|
|
25
|
+
onChange,
|
|
26
|
+
placeholder = "Please select",
|
|
27
|
+
size = "md",
|
|
28
|
+
disabled = false,
|
|
29
|
+
clearable = true,
|
|
30
|
+
showSearch = false,
|
|
31
|
+
expandTrigger = "click",
|
|
32
|
+
changeOnSelect = false,
|
|
33
|
+
separator = " / ",
|
|
34
|
+
notFoundText = "No results found",
|
|
35
|
+
className
|
|
36
|
+
} = props;
|
|
37
|
+
const divProps = {};
|
|
38
|
+
for (const [k, v] of Object.entries(props)) {
|
|
39
|
+
if (!CASCADER_KEYS.has(k)) divProps[k] = v;
|
|
40
|
+
}
|
|
41
|
+
const instanceId = useId();
|
|
42
|
+
const listboxId = `tiger-cascader-listbox-${instanceId}`;
|
|
43
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
44
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
45
|
+
const [activePath, setActivePath] = useState([]);
|
|
46
|
+
const triggerRef = useRef(null);
|
|
47
|
+
const dropdownRef = useRef(null);
|
|
48
|
+
const displayLabel = useMemo(
|
|
49
|
+
() => getCascaderDisplayLabel(options, value, separator),
|
|
50
|
+
[options, value, separator]
|
|
51
|
+
);
|
|
52
|
+
const columns = useMemo(() => getCascaderColumns(options, activePath), [options, activePath]);
|
|
53
|
+
const isSearchMode = showSearch && searchQuery.length > 0;
|
|
54
|
+
const flattenedOptions = useMemo(() => {
|
|
55
|
+
if (!showSearch) return [];
|
|
56
|
+
return flattenCascaderOptions(options);
|
|
57
|
+
}, [showSearch, options]);
|
|
58
|
+
const searchResults = useMemo(() => {
|
|
59
|
+
if (!isSearchMode) return [];
|
|
60
|
+
return filterCascaderOptions(flattenedOptions, searchQuery, showSearch);
|
|
61
|
+
}, [isSearchMode, flattenedOptions, searchQuery, showSearch]);
|
|
62
|
+
const triggerClasses = useMemo(
|
|
63
|
+
() => classNames(getCascaderTriggerClasses(size, disabled, isOpen), className),
|
|
64
|
+
[size, disabled, isOpen, className]
|
|
65
|
+
);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (isOpen) {
|
|
68
|
+
setActivePath(value ? [...value] : []);
|
|
69
|
+
setSearchQuery("");
|
|
70
|
+
}
|
|
71
|
+
}, [isOpen]);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
if (!isOpen) return;
|
|
74
|
+
function handleClick(e) {
|
|
75
|
+
const target = e.target;
|
|
76
|
+
if (triggerRef.current && !triggerRef.current.contains(target) && dropdownRef.current && !dropdownRef.current.contains(target)) {
|
|
77
|
+
setIsOpen(false);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
document.addEventListener("click", handleClick, true);
|
|
81
|
+
return () => document.removeEventListener("click", handleClick, true);
|
|
82
|
+
}, [isOpen]);
|
|
83
|
+
const toggleOpen = useCallback(() => {
|
|
84
|
+
if (disabled) return;
|
|
85
|
+
setIsOpen((prev) => !prev);
|
|
86
|
+
}, [disabled]);
|
|
87
|
+
const handleOptionClick = useCallback(
|
|
88
|
+
(option, level) => {
|
|
89
|
+
if (option.disabled) return;
|
|
90
|
+
const newPath = activePath.slice(0, level);
|
|
91
|
+
newPath.push(option.value);
|
|
92
|
+
setActivePath(newPath);
|
|
93
|
+
const hasChildren = isCascaderOptionExpandable(option);
|
|
94
|
+
if (!hasChildren) {
|
|
95
|
+
onChange?.(newPath);
|
|
96
|
+
setIsOpen(false);
|
|
97
|
+
} else if (changeOnSelect) {
|
|
98
|
+
onChange?.(newPath);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
[activePath, onChange, changeOnSelect]
|
|
102
|
+
);
|
|
103
|
+
const handleOptionHover = useCallback(
|
|
104
|
+
(option, level) => {
|
|
105
|
+
if (expandTrigger !== "hover" || option.disabled) return;
|
|
106
|
+
const newPath = activePath.slice(0, level);
|
|
107
|
+
newPath.push(option.value);
|
|
108
|
+
setActivePath(newPath);
|
|
109
|
+
},
|
|
110
|
+
[expandTrigger, activePath]
|
|
111
|
+
);
|
|
112
|
+
const handleSearchResultClick = useCallback(
|
|
113
|
+
(valuePath, itemDisabled) => {
|
|
114
|
+
if (itemDisabled) return;
|
|
115
|
+
onChange?.(valuePath);
|
|
116
|
+
setIsOpen(false);
|
|
117
|
+
},
|
|
118
|
+
[onChange]
|
|
119
|
+
);
|
|
120
|
+
const handleClear = useCallback(
|
|
121
|
+
(e) => {
|
|
122
|
+
e.stopPropagation();
|
|
123
|
+
onChange?.([]);
|
|
124
|
+
},
|
|
125
|
+
[onChange]
|
|
126
|
+
);
|
|
127
|
+
const handleTriggerKeyDown = useCallback(
|
|
128
|
+
(e) => {
|
|
129
|
+
switch (e.key) {
|
|
130
|
+
case "Enter":
|
|
131
|
+
case " ":
|
|
132
|
+
e.preventDefault();
|
|
133
|
+
toggleOpen();
|
|
134
|
+
break;
|
|
135
|
+
case "Escape":
|
|
136
|
+
e.preventDefault();
|
|
137
|
+
setIsOpen(false);
|
|
138
|
+
break;
|
|
139
|
+
case "ArrowDown":
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
if (!isOpen) setIsOpen(true);
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
[toggleOpen, isOpen]
|
|
146
|
+
);
|
|
147
|
+
const hasValue = value && value.length > 0;
|
|
148
|
+
const showClearBtn = clearable && hasValue && !disabled;
|
|
149
|
+
return /* @__PURE__ */ jsxs("div", { className: cascaderBaseClasses, "data-testid": "cascader", ...divProps, children: [
|
|
150
|
+
/* @__PURE__ */ jsxs(
|
|
151
|
+
"button",
|
|
152
|
+
{
|
|
153
|
+
ref: triggerRef,
|
|
154
|
+
type: "button",
|
|
155
|
+
className: triggerClasses,
|
|
156
|
+
disabled,
|
|
157
|
+
role: "combobox",
|
|
158
|
+
"aria-expanded": isOpen,
|
|
159
|
+
"aria-haspopup": "listbox",
|
|
160
|
+
"aria-controls": isOpen ? listboxId : void 0,
|
|
161
|
+
onClick: toggleOpen,
|
|
162
|
+
onKeyDown: handleTriggerKeyDown,
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ jsx(
|
|
165
|
+
"span",
|
|
166
|
+
{
|
|
167
|
+
className: classNames(
|
|
168
|
+
"flex-1 text-left truncate",
|
|
169
|
+
!hasValue && "text-[var(--tiger-cascader-placeholder,var(--tiger-text-muted,#9ca3af))]"
|
|
170
|
+
),
|
|
171
|
+
children: hasValue ? displayLabel : placeholder
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
|
|
175
|
+
showClearBtn && /* @__PURE__ */ jsx(
|
|
176
|
+
"span",
|
|
177
|
+
{
|
|
178
|
+
className: "flex items-center",
|
|
179
|
+
role: "button",
|
|
180
|
+
"aria-label": "Clear selection",
|
|
181
|
+
onClick: handleClear,
|
|
182
|
+
children: /* @__PURE__ */ jsx(
|
|
183
|
+
"svg",
|
|
184
|
+
{
|
|
185
|
+
className: "w-4 h-4 text-[var(--tiger-cascader-icon,var(--tiger-text-muted,#9ca3af))] hover:text-[var(--tiger-cascader-icon-hover,var(--tiger-text-muted,#6b7280))]",
|
|
186
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
187
|
+
viewBox: icon20ViewBox,
|
|
188
|
+
fill: "currentColor",
|
|
189
|
+
children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: closeSolidIcon20PathD, clipRule: "evenodd" })
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
/* @__PURE__ */ jsx(
|
|
195
|
+
"svg",
|
|
196
|
+
{
|
|
197
|
+
className: classNames(
|
|
198
|
+
"w-5 h-5 text-[var(--tiger-cascader-icon,var(--tiger-text-muted,#9ca3af))] transition-transform",
|
|
199
|
+
isOpen && "rotate-180"
|
|
200
|
+
),
|
|
201
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
202
|
+
viewBox: icon20ViewBox,
|
|
203
|
+
fill: "currentColor",
|
|
204
|
+
children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: chevronDownSolidIcon20PathD, clipRule: "evenodd" })
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
] })
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
isOpen && /* @__PURE__ */ jsxs(
|
|
212
|
+
"div",
|
|
213
|
+
{
|
|
214
|
+
ref: dropdownRef,
|
|
215
|
+
className: classNames(cascaderDropdownClasses, isSearchMode && "flex-col"),
|
|
216
|
+
children: [
|
|
217
|
+
showSearch && /* @__PURE__ */ jsx(
|
|
218
|
+
"input",
|
|
219
|
+
{
|
|
220
|
+
type: "text",
|
|
221
|
+
className: cascaderSearchInputClasses,
|
|
222
|
+
placeholder: "Search...",
|
|
223
|
+
value: searchQuery,
|
|
224
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
225
|
+
"aria-label": "Search options"
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
isSearchMode ? (
|
|
229
|
+
// Search results
|
|
230
|
+
searchResults.length === 0 ? /* @__PURE__ */ jsx("div", { className: cascaderEmptyStateClasses, children: notFoundText }) : /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-auto", role: "listbox", id: listboxId, children: searchResults.map((item) => /* @__PURE__ */ jsx(
|
|
231
|
+
"div",
|
|
232
|
+
{
|
|
233
|
+
className: classNames(
|
|
234
|
+
cascaderSearchResultClasses,
|
|
235
|
+
item.disabled && "opacity-50 cursor-not-allowed"
|
|
236
|
+
),
|
|
237
|
+
role: "option",
|
|
238
|
+
"aria-selected": value?.join(",") === item.valuePath.join(","),
|
|
239
|
+
"aria-disabled": item.disabled,
|
|
240
|
+
onClick: () => handleSearchResultClick(item.valuePath, item.disabled),
|
|
241
|
+
children: item.label
|
|
242
|
+
},
|
|
243
|
+
item.valuePath.join(",")
|
|
244
|
+
)) })
|
|
245
|
+
) : (
|
|
246
|
+
// Cascading columns
|
|
247
|
+
/* @__PURE__ */ jsx("div", { className: "flex", children: columns.map((col, colIndex) => /* @__PURE__ */ jsx(
|
|
248
|
+
"div",
|
|
249
|
+
{
|
|
250
|
+
className: cascaderColumnClasses,
|
|
251
|
+
role: "listbox",
|
|
252
|
+
id: colIndex === 0 ? listboxId : void 0,
|
|
253
|
+
"aria-label": `Level ${colIndex + 1}`,
|
|
254
|
+
children: col.options.map((option) => {
|
|
255
|
+
const isSelected = col.selectedValue === option.value;
|
|
256
|
+
const hasChildren = isCascaderOptionExpandable(option);
|
|
257
|
+
return /* @__PURE__ */ jsxs(
|
|
258
|
+
"div",
|
|
259
|
+
{
|
|
260
|
+
className: getCascaderOptionClasses(isSelected, !!option.disabled, size),
|
|
261
|
+
role: "option",
|
|
262
|
+
"aria-selected": isSelected,
|
|
263
|
+
"aria-disabled": option.disabled,
|
|
264
|
+
onClick: () => handleOptionClick(option, colIndex),
|
|
265
|
+
onMouseEnter: () => handleOptionHover(option, colIndex),
|
|
266
|
+
children: [
|
|
267
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: option.label }),
|
|
268
|
+
hasChildren && /* @__PURE__ */ jsx(
|
|
269
|
+
"svg",
|
|
270
|
+
{
|
|
271
|
+
className: "w-4 h-4 text-[var(--tiger-text-muted,#9ca3af)]",
|
|
272
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
273
|
+
viewBox: "0 0 20 20",
|
|
274
|
+
fill: "currentColor",
|
|
275
|
+
children: /* @__PURE__ */ jsx(
|
|
276
|
+
"path",
|
|
277
|
+
{
|
|
278
|
+
fillRule: "evenodd",
|
|
279
|
+
d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",
|
|
280
|
+
clipRule: "evenodd"
|
|
281
|
+
}
|
|
282
|
+
)
|
|
283
|
+
}
|
|
284
|
+
)
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
option.value
|
|
288
|
+
);
|
|
289
|
+
})
|
|
290
|
+
},
|
|
291
|
+
colIndex
|
|
292
|
+
)) })
|
|
293
|
+
)
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
)
|
|
297
|
+
] });
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
export { Cascader };
|