@expcat/tigercat-react 0.3.0 → 0.3.69
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-IAF24RKI.mjs → chunk-24U2DQRP.mjs} +1 -1
- package/dist/{chunk-IL2Y5RCX.mjs → chunk-2DW3WFZI.mjs} +95 -45
- package/dist/{chunk-6MGEGOYJ.js → chunk-2GKTVAAB.js} +24 -18
- package/dist/{chunk-HGTF6A46.mjs → chunk-3577FW3I.mjs} +58 -92
- package/dist/{chunk-GY6D4XS3.js → chunk-3GW3UAKB.js} +40 -98
- package/dist/{chunk-VD3IK5XT.mjs → chunk-3M2IG6IN.mjs} +2 -3
- package/dist/{chunk-T3GSXTDU.js → chunk-3NE6VZRY.js} +2 -3
- package/dist/chunk-3PV2MDST.mjs +95 -0
- package/dist/{chunk-36RRHNZD.js → chunk-3T7L3MHX.js} +33 -15
- package/dist/{chunk-IY4LEJYF.js → chunk-4PPTEEDI.js} +29 -30
- package/dist/{chunk-Z4Z3I74Q.mjs → chunk-4Y7YH32A.mjs} +37 -46
- package/dist/chunk-56KTCMRE.mjs +77 -0
- package/dist/chunk-5P5M656V.mjs +75 -0
- package/dist/{chunk-Z6G4HABF.js → chunk-67FVBKBC.js} +58 -95
- package/dist/{chunk-KAEHFMTQ.mjs → chunk-6IH5QPTR.mjs} +121 -144
- package/dist/{chunk-C52ZCGYG.mjs → chunk-6PXNWGR5.mjs} +49 -65
- package/dist/{chunk-MQTHGPHF.js → chunk-72MWKUBC.js} +49 -42
- package/dist/{chunk-PT4WLSTJ.mjs → chunk-763M6U5U.mjs} +105 -65
- package/dist/{chunk-RTQNWZN4.mjs → chunk-77PE7OFK.mjs} +3 -5
- package/dist/{chunk-KPZTGRNA.js → chunk-7Z64GEMN.js} +51 -55
- package/dist/{chunk-3WPKVV4N.js → chunk-A3PYG3D6.js} +6 -39
- package/dist/chunk-AQ72JVUG.js +41 -0
- package/dist/{chunk-P4EFJIXU.mjs → chunk-AUP3PMDD.mjs} +18 -41
- package/dist/{chunk-PUDU34R4.mjs → chunk-AVUXDQYO.mjs} +26 -20
- package/dist/{chunk-HUZVBDHV.js → chunk-AY5Z3NIW.js} +15 -20
- package/dist/{chunk-67EK62HG.mjs → chunk-B3LRUKXM.mjs} +1 -1
- package/dist/{chunk-JAVDNFJD.js → chunk-C7UKFKVY.js} +26 -33
- package/dist/{chunk-TZ26HQAW.js → chunk-CI2WHAT2.js} +18 -38
- package/dist/{chunk-WYTHTJN3.mjs → chunk-CYZLGYY4.mjs} +112 -59
- package/dist/{chunk-NSGDRTSQ.mjs → chunk-D5KYIQWB.mjs} +6 -39
- package/dist/chunk-DQNA57CA.js +57 -0
- package/dist/{chunk-6575DOCV.mjs → chunk-DTQZPZSJ.mjs} +3 -3
- package/dist/{chunk-7P6PHSFM.js → chunk-DXXYPVJJ.js} +32 -35
- package/dist/{chunk-UFAXJVMD.js → chunk-EFLIFXZH.js} +3 -3
- package/dist/{chunk-JI7SFMUT.mjs → chunk-EIMAQHCQ.mjs} +29 -80
- package/dist/chunk-ENSLMM3L.mjs +68 -0
- package/dist/chunk-F24IF2QL.js +74 -0
- package/dist/{chunk-ZUUG3WOL.js → chunk-F4Q5QMX2.js} +171 -94
- package/dist/{chunk-V2HVHLBY.mjs → chunk-FE7PEZTI.mjs} +19 -39
- package/dist/chunk-FLYJVZED.mjs +30 -0
- package/dist/chunk-FMF2G6BJ.js +179 -0
- package/dist/{chunk-YIF5VX7K.mjs → chunk-FNDPGSEW.mjs} +14 -13
- package/dist/{chunk-HQLZL3XQ.mjs → chunk-FPNT7FV5.mjs} +3 -7
- package/dist/{chunk-YE2M2HNM.js → chunk-FSDZJD7M.js} +36 -45
- package/dist/{chunk-4PTI6ZUK.js → chunk-GASFXURT.js} +93 -43
- package/dist/chunk-GB5G2CJY.js +96 -0
- package/dist/{chunk-LXA2YBAO.js → chunk-GJEWBALW.js} +2 -2
- package/dist/{chunk-GXTBCX3M.js → chunk-H5MZ54PM.js} +16 -39
- package/dist/{chunk-4TWHENPT.js → chunk-HB2UYJBY.js} +32 -17
- package/dist/{chunk-5HUYCSA4.mjs → chunk-HPXLUJFJ.mjs} +22 -19
- package/dist/chunk-HQ3QOT7H.js +33 -0
- package/dist/chunk-I5TCE5E7.js +32 -0
- package/dist/{chunk-QFVE7GKD.js → chunk-IBYIPXIO.js} +5 -26
- package/dist/{chunk-3XXXM4OB.mjs → chunk-IGE44BIS.mjs} +67 -23
- package/dist/{chunk-XRFK2IXM.js → chunk-IHH2O7YK.js} +6 -7
- package/dist/chunk-IP3MAJSH.mjs +55 -0
- package/dist/{chunk-OVWCTDAL.js → chunk-IRH2ZVD3.js} +37 -49
- package/dist/chunk-IVGKPD2L.mjs +39 -0
- package/dist/{chunk-CJJ56NVL.mjs → chunk-IXJMMM26.mjs} +16 -60
- package/dist/{chunk-4IO2M3ZJ.js → chunk-J3HKED4B.js} +17 -17
- package/dist/{chunk-MF3H7WWW.mjs → chunk-JNLX47UL.mjs} +33 -15
- package/dist/{chunk-L63N3LCG.js → chunk-JQNKI2ZZ.js} +79 -31
- package/dist/{chunk-X4F6NSI5.mjs → chunk-JUWFVIDP.mjs} +2 -2
- package/dist/{chunk-LADCWARG.mjs → chunk-JVTAKNRO.mjs} +17 -15
- package/dist/{chunk-2Y327ZU4.js → chunk-KAWE5LQZ.js} +80 -83
- package/dist/{chunk-TR246HQP.mjs → chunk-KMTERPME.mjs} +14 -18
- package/dist/chunk-LIV33O73.mjs +26 -0
- package/dist/{chunk-PVOQUXIB.mjs → chunk-LL6B4BHF.mjs} +4 -4
- package/dist/chunk-LXQOQJMU.js +79 -0
- package/dist/{chunk-HT2BXCEM.js → chunk-M46L73HR.js} +19 -19
- package/dist/{chunk-NMDNLB3C.mjs → chunk-MDZDPGRK.mjs} +30 -27
- package/dist/{chunk-WKGCUR7O.mjs → chunk-MTL2QUM3.mjs} +7 -7
- package/dist/chunk-MWH6FCSE.js +97 -0
- package/dist/{chunk-YER7IQF4.mjs → chunk-N4EMXCRQ.mjs} +172 -95
- package/dist/{chunk-SIB4EHB6.js → chunk-NEP3CS6S.js} +111 -58
- package/dist/{chunk-FAZQT7YP.mjs → chunk-NJCKTIWB.mjs} +6 -6
- package/dist/{chunk-IIVRVCCP.mjs → chunk-NKKIJQMV.mjs} +53 -57
- package/dist/{chunk-MQXBU5YX.mjs → chunk-NQFHS4W2.mjs} +29 -21
- package/dist/chunk-NTODO3Q3.mjs +94 -0
- package/dist/{chunk-NDOYQK2R.mjs → chunk-NZLOLMT2.mjs} +41 -99
- package/dist/chunk-O3W3OZ6V.js +37 -0
- package/dist/{chunk-IFY46RWU.js → chunk-OESNOOOT.js} +1 -2
- package/dist/{chunk-IWENGARY.mjs → chunk-OFBK35TK.mjs} +1 -1
- package/dist/{chunk-R7TOQU3U.js → chunk-OIUIR5ZR.js} +15 -59
- package/dist/{chunk-QEAC4MIG.mjs → chunk-OUAZM7NY.mjs} +12 -59
- package/dist/{chunk-R67R3TVA.mjs → chunk-OXT5RN55.mjs} +5 -5
- package/dist/{chunk-CIL2AC3F.js → chunk-OYCMGKQ7.js} +15 -23
- package/dist/{chunk-IQINYCU6.js → chunk-PR3PQUKM.js} +17 -15
- package/dist/chunk-PTEDJ6MA.js +29 -0
- package/dist/{chunk-D3I2SY7X.js → chunk-PWZB45Z7.js} +13 -60
- package/dist/{chunk-GZPMLPRW.js → chunk-PXPUPQRO.js} +2 -2
- package/dist/{chunk-OZLGNWET.js → chunk-Q57BYUUW.js} +12 -28
- package/dist/chunk-QAO5KANE.mjs +36 -0
- package/dist/{chunk-AITVDDCE.mjs → chunk-QGCQAJGL.mjs} +81 -33
- package/dist/{chunk-JOHKSMJM.mjs → chunk-QLHFXYWA.mjs} +59 -96
- package/dist/{chunk-C5EFBJBR.js → chunk-QM4GOQDT.js} +119 -142
- package/dist/{chunk-PBJ2J2B3.js → chunk-QNRAM3CM.js} +2 -2
- package/dist/{chunk-Z5DDULTA.js → chunk-RARHRSPQ.js} +2 -2
- package/dist/{chunk-5QKMQRCW.js → chunk-RDIEZKV2.js} +28 -20
- package/dist/{chunk-OZLAGTZW.mjs → chunk-RGFSY3S2.mjs} +50 -43
- package/dist/{chunk-IYFSM2GA.mjs → chunk-RGZYYVQF.mjs} +26 -33
- package/dist/{chunk-3GD3LOII.mjs → chunk-RITTIFCJ.mjs} +1 -2
- package/dist/{chunk-Y2JOJ4D6.js → chunk-RKB2VUQO.js} +8 -10
- package/dist/{chunk-7SLNHUGJ.js → chunk-RNEL4XIO.js} +28 -79
- package/dist/{chunk-6ZTCBQJ7.mjs → chunk-RPTLVIBF.mjs} +17 -25
- package/dist/{chunk-5ZVSFIZD.js → chunk-RYWGELJ7.js} +2 -6
- package/dist/chunk-S4GNTA7V.mjs +176 -0
- package/dist/{chunk-VSF4DF7N.js → chunk-SAZ6V6DX.js} +21 -18
- package/dist/{chunk-Q3DPJHNM.js → chunk-SFALTVPS.js} +3 -5
- package/dist/{chunk-LZNG2HGC.mjs → chunk-SH6O6LDJ.mjs} +72 -30
- package/dist/{chunk-6E5UKM6O.js → chunk-SM7RDJFB.js} +104 -64
- package/dist/{chunk-DGBYGBLR.js → chunk-SOC74QA2.js} +32 -52
- package/dist/{chunk-KOLLAGRK.mjs → chunk-SQ7OL2X5.mjs} +2 -3
- package/dist/{chunk-VO4WDK4K.js → chunk-SSQOCZ6O.js} +1 -2
- package/dist/{chunk-KV4LLPAY.mjs → chunk-SW4I4X6E.mjs} +8 -10
- package/dist/{chunk-GQMYCYZ4.js → chunk-TDRINUMH.js} +31 -28
- package/dist/{chunk-DIZNY6N4.mjs → chunk-TGKNEMD4.mjs} +8 -8
- package/dist/{chunk-BAPR7UUR.mjs → chunk-TGPQ4KET.mjs} +13 -29
- package/dist/{chunk-3XKBDV2Q.mjs → chunk-TUA5PDRX.mjs} +7 -8
- package/dist/{chunk-CES6LGQ7.mjs → chunk-UE234MW4.mjs} +34 -37
- package/dist/{chunk-U4ZVEPYD.js → chunk-URM7QDHH.js} +14 -18
- package/dist/chunk-UZ7SBFQV.mjs +35 -0
- package/dist/{chunk-HGF2EL25.mjs → chunk-V5NIFF2F.mjs} +34 -54
- package/dist/{chunk-672SCJWZ.mjs → chunk-VCNZEQEB.mjs} +10 -10
- package/dist/{chunk-R7MS42PL.js → chunk-VCOBBJLP.js} +9 -9
- package/dist/{chunk-2TS6X5RA.js → chunk-VCULFIZ5.js} +7 -7
- package/dist/{chunk-N32MAX4A.js → chunk-W4TFISRK.js} +70 -28
- package/dist/{chunk-4MMT4EJJ.mjs → chunk-WAIXKROS.mjs} +17 -22
- package/dist/{chunk-YGOTPK2W.mjs → chunk-WGRYO5HX.mjs} +34 -19
- package/dist/{chunk-ZPWDDAFE.js → chunk-XID6T65A.js} +14 -13
- package/dist/chunk-XJ7U2W7S.mjs +27 -0
- package/dist/{chunk-ZN2BZCTI.js → chunk-XKDWDANG.js} +8 -8
- package/dist/{chunk-EI2GHMQS.js → chunk-XLVEI7GS.js} +15 -13
- package/dist/{chunk-6YKZAWNX.js → chunk-XWNVBCJA.js} +14 -14
- package/dist/{chunk-JW64IJP2.js → chunk-XWRJVNB6.js} +67 -23
- package/dist/{chunk-HDDBBZQH.js → chunk-YV6Y7C43.js} +48 -64
- package/dist/{chunk-XS5JP2KO.mjs → chunk-ZFHTSHXS.mjs} +82 -85
- package/dist/{chunk-73DMQ2SR.mjs → chunk-ZGQOYCQT.mjs} +32 -44
- package/dist/{chunk-WDAMDVLU.mjs → chunk-ZIUOENTL.mjs} +6 -27
- package/dist/{chunk-GJKT2B56.js → chunk-ZTVATZB6.js} +58 -92
- package/dist/components/ActivityFeed.js +10 -10
- package/dist/components/ActivityFeed.mjs +8 -8
- package/dist/components/Alert.js +3 -2
- package/dist/components/Alert.mjs +2 -1
- package/dist/components/Anchor.js +4 -4
- package/dist/components/Anchor.mjs +1 -1
- package/dist/components/AnchorLink.js +4 -4
- package/dist/components/AnchorLink.mjs +2 -2
- package/dist/components/AreaChart.d.mts +3 -0
- package/dist/components/AreaChart.d.ts +3 -0
- package/dist/components/AreaChart.js +3 -3
- package/dist/components/AreaChart.mjs +1 -1
- package/dist/components/Avatar.d.mts +1 -1
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Avatar.js +2 -2
- package/dist/components/Avatar.mjs +1 -1
- package/dist/components/BackTop.js +3 -3
- package/dist/components/BackTop.mjs +1 -1
- package/dist/components/Badge.d.mts +0 -3
- package/dist/components/Badge.d.ts +0 -3
- package/dist/components/Badge.js +2 -2
- package/dist/components/Badge.mjs +1 -1
- package/dist/components/BarChart.js +3 -3
- package/dist/components/BarChart.mjs +1 -1
- package/dist/components/Breadcrumb.d.mts +0 -1
- package/dist/components/Breadcrumb.d.ts +0 -1
- package/dist/components/BreadcrumbItem.js +2 -2
- package/dist/components/BreadcrumbItem.mjs +1 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/Button.mjs +1 -1
- package/dist/components/Card.js +2 -2
- package/dist/components/Card.mjs +1 -1
- package/dist/components/Carousel.js +2 -2
- package/dist/components/Carousel.mjs +1 -1
- package/dist/components/ChatWindow.js +7 -7
- package/dist/components/ChatWindow.mjs +5 -5
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/Checkbox.mjs +1 -1
- package/dist/components/Col.js +3 -3
- package/dist/components/Col.mjs +2 -2
- package/dist/components/CollapsePanel.js +3 -3
- package/dist/components/CollapsePanel.mjs +1 -1
- package/dist/components/CommentThread.js +8 -8
- package/dist/components/CommentThread.mjs +6 -6
- package/dist/components/DataTableWithToolbar.js +8 -11
- package/dist/components/DataTableWithToolbar.mjs +6 -9
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/Descriptions.js +3 -3
- package/dist/components/Descriptions.mjs +1 -1
- package/dist/components/Divider.d.mts +1 -3
- package/dist/components/Divider.d.ts +1 -3
- package/dist/components/Divider.js +2 -2
- package/dist/components/Divider.mjs +1 -1
- package/dist/components/DonutChart.d.mts +6 -0
- package/dist/components/DonutChart.d.ts +6 -0
- package/dist/components/DonutChart.js +4 -4
- package/dist/components/DonutChart.mjs +2 -2
- package/dist/components/Drawer.js +2 -2
- package/dist/components/Drawer.mjs +1 -1
- package/dist/components/Dropdown.d.mts +1 -15
- package/dist/components/Dropdown.d.ts +1 -15
- 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/Form.d.mts +1 -0
- package/dist/components/Form.d.ts +1 -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.js +6 -6
- package/dist/components/FormWizard.mjs +4 -4
- package/dist/components/Icon.js +2 -2
- package/dist/components/Icon.mjs +1 -1
- package/dist/components/Input.d.mts +4 -7
- package/dist/components/Input.d.ts +4 -7
- package/dist/components/Input.js +2 -2
- package/dist/components/Input.mjs +1 -1
- package/dist/components/LineChart.js +3 -3
- package/dist/components/LineChart.mjs +1 -1
- package/dist/components/Link.js +2 -2
- package/dist/components/Link.mjs +1 -1
- package/dist/components/List.js +2 -4
- package/dist/components/List.mjs +1 -3
- package/dist/components/Loading.js +2 -2
- package/dist/components/Loading.mjs +1 -1
- package/dist/components/Menu.js +3 -3
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/MenuItem.js +3 -3
- package/dist/components/MenuItem.mjs +2 -2
- package/dist/components/MenuItemGroup.js +4 -4
- package/dist/components/MenuItemGroup.mjs +3 -3
- package/dist/components/Message.d.mts +0 -18
- package/dist/components/Message.d.ts +0 -18
- package/dist/components/Message.js +5 -4
- package/dist/components/Message.mjs +2 -1
- package/dist/components/Modal.d.mts +15 -0
- package/dist/components/Modal.d.ts +15 -0
- package/dist/components/Modal.js +3 -2
- package/dist/components/Modal.mjs +2 -1
- package/dist/components/Notification.d.mts +0 -15
- package/dist/components/Notification.d.ts +0 -15
- package/dist/components/Notification.js +5 -4
- package/dist/components/Notification.mjs +2 -1
- package/dist/components/NotificationCenter.js +9 -10
- package/dist/components/NotificationCenter.mjs +7 -8
- package/dist/components/Pagination.js +3 -3
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/PieChart.js +3 -3
- package/dist/components/PieChart.mjs +1 -1
- package/dist/components/Popconfirm.d.mts +0 -26
- package/dist/components/Popconfirm.d.ts +0 -26
- package/dist/components/Popconfirm.js +3 -2
- package/dist/components/Popconfirm.mjs +2 -1
- package/dist/components/Popover.d.mts +0 -8
- package/dist/components/Popover.d.ts +0 -8
- package/dist/components/Popover.js +3 -2
- package/dist/components/Popover.mjs +2 -1
- package/dist/components/Progress.js +2 -2
- package/dist/components/Progress.mjs +1 -1
- package/dist/components/RadarChart.d.mts +8 -0
- package/dist/components/RadarChart.d.ts +8 -0
- package/dist/components/RadarChart.js +4 -3
- package/dist/components/RadarChart.mjs +2 -1
- package/dist/components/Radio.js +3 -3
- package/dist/components/Radio.mjs +2 -2
- package/dist/components/RadioGroup.js +3 -3
- package/dist/components/RadioGroup.mjs +1 -1
- package/dist/components/Row.js +3 -3
- package/dist/components/Row.mjs +1 -1
- package/dist/components/ScatterChart.js +3 -3
- package/dist/components/ScatterChart.mjs +1 -1
- package/dist/components/Select.js +2 -2
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Sidebar.js +2 -2
- package/dist/components/Sidebar.mjs +1 -1
- package/dist/components/Skeleton.js +2 -2
- package/dist/components/Skeleton.mjs +1 -1
- package/dist/components/Slider.js +2 -2
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Space.js +2 -2
- package/dist/components/Space.mjs +1 -1
- package/dist/components/Steps.js +3 -3
- package/dist/components/Steps.mjs +1 -1
- package/dist/components/StepsItem.js +2 -2
- package/dist/components/StepsItem.mjs +1 -1
- package/dist/components/SubMenu.js +5 -5
- package/dist/components/SubMenu.mjs +4 -4
- package/dist/components/TabPane.d.mts +18 -3
- package/dist/components/TabPane.d.ts +18 -3
- package/dist/components/TabPane.js +2 -2
- package/dist/components/TabPane.mjs +1 -1
- package/dist/components/Table.js +2 -2
- package/dist/components/Table.mjs +1 -1
- package/dist/components/Tabs.d.mts +44 -2
- package/dist/components/Tabs.d.ts +44 -2
- package/dist/components/Tabs.js +3 -3
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/Tag.js +2 -2
- package/dist/components/Tag.mjs +1 -1
- package/dist/components/Text.js +2 -2
- package/dist/components/Text.mjs +1 -1
- package/dist/components/Textarea.js +2 -2
- package/dist/components/Textarea.mjs +1 -1
- package/dist/components/TimePicker.js +2 -2
- package/dist/components/TimePicker.mjs +1 -1
- package/dist/components/Timeline.js +2 -2
- package/dist/components/Timeline.mjs +1 -1
- package/dist/components/Tooltip.d.mts +1 -11
- package/dist/components/Tooltip.d.ts +1 -11
- package/dist/components/Tooltip.js +3 -2
- package/dist/components/Tooltip.mjs +2 -1
- package/dist/components/Tree.js +3 -3
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/Upload.js +2 -2
- package/dist/components/Upload.mjs +1 -1
- package/dist/index.js +152 -150
- package/dist/index.mjs +71 -69
- package/package.json +2 -2
- package/dist/chunk-3OF7XPIQ.js +0 -90
- package/dist/chunk-427CM2U6.mjs +0 -76
- package/dist/chunk-6DYS4PJT.mjs +0 -99
- package/dist/chunk-6YDIBMCM.mjs +0 -33
- package/dist/chunk-A3DJSVTE.js +0 -68
- package/dist/chunk-AGUPZEUL.mjs +0 -35
- package/dist/chunk-CKUSQR2H.mjs +0 -41
- package/dist/chunk-CR4QK2AB.mjs +0 -88
- package/dist/chunk-EB6EDLJZ.mjs +0 -50
- package/dist/chunk-GW4EWT2K.mjs +0 -125
- package/dist/chunk-KELLYJZY.mjs +0 -148
- package/dist/chunk-KUCFT2OA.js +0 -43
- package/dist/chunk-QY6I7LU5.js +0 -127
- package/dist/chunk-STEIWBMF.mjs +0 -66
- package/dist/chunk-T4TJJMLM.mjs +0 -34
- package/dist/chunk-UG3I4PCY.js +0 -102
- package/dist/chunk-YESS6YKC.js +0 -37
- package/dist/chunk-YYGTJKP5.js +0 -39
- package/dist/chunk-ZPFZMXA6.js +0 -150
- package/dist/chunk-ZREFCRX3.js +0 -52
- package/dist/{chunk-MKWXJZ3T.js → chunk-QYYAXM5F.js} +1 -1
- package/dist/{chunk-WSJO2PIE.mjs → chunk-XZVQ3PJS.mjs} +1 -1
|
@@ -145,6 +145,10 @@ var Tree = ({
|
|
|
145
145
|
}
|
|
146
146
|
return internalCheckedState;
|
|
147
147
|
}, [controlledCheckedKeys, internalCheckedState, treeData, checkStrictly]);
|
|
148
|
+
const checkedSets = react.useMemo(
|
|
149
|
+
() => tigercatCore.checkedSetsFromState(computedCheckedState),
|
|
150
|
+
[computedCheckedState]
|
|
151
|
+
);
|
|
148
152
|
react.useEffect(() => {
|
|
149
153
|
if (filterValue) {
|
|
150
154
|
const matched = tigercatCore.filterTreeNodes(treeData, filterValue, filterFn);
|
|
@@ -269,6 +273,20 @@ var Tree = ({
|
|
|
269
273
|
},
|
|
270
274
|
[treeData, computedCheckedState, checkStrictly, checkStrategy, controlledCheckedKeys, onCheck]
|
|
271
275
|
);
|
|
276
|
+
const getFirstChildKey = react.useCallback(
|
|
277
|
+
(nodeKey) => {
|
|
278
|
+
const index = visibleItems.findIndex((i) => i.key === nodeKey);
|
|
279
|
+
if (index < 0) return void 0;
|
|
280
|
+
const base = visibleItems[index];
|
|
281
|
+
for (let i = index + 1; i < visibleItems.length; i++) {
|
|
282
|
+
const item = visibleItems[i];
|
|
283
|
+
if (item.level <= base.level) break;
|
|
284
|
+
if (item.parentKey === nodeKey && !item.node.disabled) return item.key;
|
|
285
|
+
}
|
|
286
|
+
return void 0;
|
|
287
|
+
},
|
|
288
|
+
[visibleItems]
|
|
289
|
+
);
|
|
272
290
|
const handleKeyDown = react.useCallback(
|
|
273
291
|
(e, node, isExpanded, isChecked) => {
|
|
274
292
|
if (node.disabled) return;
|
|
@@ -277,18 +295,6 @@ var Tree = ({
|
|
|
277
295
|
const isExpandable = !!(node.children && node.children.length > 0) || !!(loadData && !node.isLeaf);
|
|
278
296
|
const parents = tigercatCore.getParentKeys(treeData, node.key);
|
|
279
297
|
const parentKey = parents[parents.length - 1];
|
|
280
|
-
const getFirstChildKey = () => {
|
|
281
|
-
const list = visibleItems;
|
|
282
|
-
const index = list.findIndex((i) => i.key === node.key);
|
|
283
|
-
if (index < 0) return void 0;
|
|
284
|
-
const base = list[index];
|
|
285
|
-
for (let i = index + 1; i < list.length; i++) {
|
|
286
|
-
const item = list[i];
|
|
287
|
-
if (item.level <= base.level) break;
|
|
288
|
-
if (item.parentKey === node.key && !item.node.disabled) return item.key;
|
|
289
|
-
}
|
|
290
|
-
return void 0;
|
|
291
|
-
};
|
|
292
298
|
if (e.key === "ArrowDown") {
|
|
293
299
|
e.preventDefault();
|
|
294
300
|
setActiveKey(focusableKeys[currentIndex + 1] ?? currentKey);
|
|
@@ -316,7 +322,7 @@ var Tree = ({
|
|
|
316
322
|
return;
|
|
317
323
|
}
|
|
318
324
|
if (isExpandable && isExpanded) {
|
|
319
|
-
setActiveKey(getFirstChildKey() ?? currentKey);
|
|
325
|
+
setActiveKey(getFirstChildKey(node.key) ?? currentKey);
|
|
320
326
|
}
|
|
321
327
|
return;
|
|
322
328
|
}
|
|
@@ -371,147 +377,118 @@ var Tree = ({
|
|
|
371
377
|
activeKey,
|
|
372
378
|
defaultActiveKey,
|
|
373
379
|
focusableKeys,
|
|
374
|
-
visibleItems,
|
|
375
380
|
treeData,
|
|
376
381
|
loadData,
|
|
377
382
|
checkable,
|
|
378
383
|
computedExpandedKeys,
|
|
379
384
|
effectiveSelectable,
|
|
385
|
+
getFirstChildKey,
|
|
380
386
|
handleExpand,
|
|
381
387
|
handleSelect,
|
|
382
388
|
handleCheck
|
|
383
389
|
]
|
|
384
390
|
);
|
|
385
|
-
const
|
|
386
|
-
(node
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
(node
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
indent,
|
|
414
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
415
|
-
"span",
|
|
416
|
-
{
|
|
417
|
-
className: isExpandable ? "cursor-pointer" : "",
|
|
418
|
-
onClick: (e) => {
|
|
419
|
-
e.stopPropagation();
|
|
420
|
-
if (isExpandable) {
|
|
421
|
-
setActiveKey(node.key);
|
|
422
|
-
handleExpand(node.key);
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, { expanded: isExpanded, hasChildren: isExpandable })
|
|
426
|
-
}
|
|
427
|
-
),
|
|
428
|
-
checkable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
429
|
-
"input",
|
|
430
|
-
{
|
|
431
|
-
type: "checkbox",
|
|
432
|
-
"aria-label": `Select ${node.label}`,
|
|
433
|
-
className: tigercatCore.treeNodeCheckboxClasses,
|
|
434
|
-
checked: isChecked,
|
|
435
|
-
ref: (input) => {
|
|
436
|
-
if (input) {
|
|
437
|
-
input.indeterminate = isHalfChecked;
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
disabled: node.disabled,
|
|
441
|
-
onClick: (e) => {
|
|
442
|
-
e.stopPropagation();
|
|
443
|
-
},
|
|
444
|
-
onChange: (e) => {
|
|
445
|
-
handleCheck(node.key, e.target.checked);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
),
|
|
449
|
-
showIcon && node.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: tigercatCore.treeNodeIconClasses, children: node.icon }),
|
|
450
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
451
|
-
"span",
|
|
452
|
-
{
|
|
453
|
-
className: tigercatCore.classNames(
|
|
454
|
-
tigercatCore.treeNodeLabelClasses,
|
|
455
|
-
isFiltered && isMatched ? "font-semibold text-[var(--tiger-primary,#2563eb)]" : ""
|
|
456
|
-
),
|
|
457
|
-
children: node.label
|
|
458
|
-
}
|
|
459
|
-
),
|
|
460
|
-
isLoading && /* @__PURE__ */ jsxRuntime.jsx(LoadingSpinner, {})
|
|
461
|
-
] });
|
|
462
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.treeNodeWrapperClasses, children: [
|
|
463
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
464
|
-
"div",
|
|
465
|
-
{
|
|
466
|
-
className: tigercatCore.getTreeNodeClasses(isSelected, !!node.disabled, blockNode),
|
|
467
|
-
ref: (el) => {
|
|
468
|
-
itemRefs.current.set(node.key, el);
|
|
469
|
-
},
|
|
470
|
-
role: "treeitem",
|
|
471
|
-
"aria-level": level + 1,
|
|
472
|
-
"aria-disabled": node.disabled || void 0,
|
|
473
|
-
"aria-selected": effectiveSelectable ? isSelected : void 0,
|
|
474
|
-
"aria-expanded": isExpandable ? isExpanded : void 0,
|
|
475
|
-
"aria-checked": checkable ? isHalfChecked ? "mixed" : isChecked : void 0,
|
|
476
|
-
tabIndex: isFocusable ? 0 : -1,
|
|
477
|
-
onFocus: () => {
|
|
478
|
-
if (!node.disabled) setActiveKey(node.key);
|
|
479
|
-
},
|
|
480
|
-
onKeyDown: (e) => handleKeyDown(e, node, isExpanded, isChecked),
|
|
481
|
-
onClick: (e) => {
|
|
391
|
+
const renderTreeNode = (node, level) => {
|
|
392
|
+
const hasChildren = !!(node.children && node.children.length > 0);
|
|
393
|
+
const isExpanded = computedExpandedKeys.has(node.key);
|
|
394
|
+
const isSelected = computedSelectedKeys.has(node.key);
|
|
395
|
+
const isChecked = checkedSets.checkedSet.has(node.key);
|
|
396
|
+
const isHalfChecked = checkedSets.halfCheckedSet.has(node.key);
|
|
397
|
+
const isLoading = loadingNodes.has(node.key);
|
|
398
|
+
const isFiltered = filteredNodeKeys.size > 0;
|
|
399
|
+
const isMatched = filteredNodeKeys.has(node.key);
|
|
400
|
+
const isVisible = !isFiltered || isMatched;
|
|
401
|
+
const isExpandable = hasChildren || !!(loadData && !node.isLeaf);
|
|
402
|
+
const isFocusable = !node.disabled && node.key === (activeKey ?? defaultActiveKey);
|
|
403
|
+
if (!isVisible) {
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
const indent = [];
|
|
407
|
+
for (let i = 0; i < level; i++) {
|
|
408
|
+
indent.push(/* @__PURE__ */ jsxRuntime.jsx("span", { className: tigercatCore.treeNodeIndentClasses }, i));
|
|
409
|
+
}
|
|
410
|
+
const nodeContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
411
|
+
indent,
|
|
412
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
413
|
+
"span",
|
|
414
|
+
{
|
|
415
|
+
className: isExpandable ? "cursor-pointer" : "",
|
|
416
|
+
onClick: (e) => {
|
|
417
|
+
e.stopPropagation();
|
|
418
|
+
if (isExpandable) {
|
|
482
419
|
setActiveKey(node.key);
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
420
|
+
handleExpand(node.key);
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, { expanded: isExpanded, hasChildren: isExpandable })
|
|
424
|
+
}
|
|
425
|
+
),
|
|
426
|
+
checkable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
427
|
+
"input",
|
|
428
|
+
{
|
|
429
|
+
type: "checkbox",
|
|
430
|
+
"aria-label": `Select ${node.label}`,
|
|
431
|
+
className: tigercatCore.treeNodeCheckboxClasses,
|
|
432
|
+
checked: isChecked,
|
|
433
|
+
ref: (input) => {
|
|
434
|
+
if (input) {
|
|
435
|
+
input.indeterminate = isHalfChecked;
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
disabled: node.disabled,
|
|
439
|
+
onClick: (e) => {
|
|
440
|
+
e.stopPropagation();
|
|
441
|
+
},
|
|
442
|
+
onChange: (e) => {
|
|
443
|
+
handleCheck(node.key, e.target.checked);
|
|
489
444
|
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
showIcon && node.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: tigercatCore.treeNodeIconClasses, children: node.icon }),
|
|
448
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
449
|
+
"span",
|
|
450
|
+
{
|
|
451
|
+
className: tigercatCore.classNames(
|
|
452
|
+
tigercatCore.treeNodeLabelClasses,
|
|
453
|
+
isFiltered && isMatched ? "font-semibold text-[var(--tiger-primary,#2563eb)]" : ""
|
|
454
|
+
),
|
|
455
|
+
children: node.label
|
|
456
|
+
}
|
|
457
|
+
),
|
|
458
|
+
isLoading && /* @__PURE__ */ jsxRuntime.jsx(LoadingSpinner, {})
|
|
459
|
+
] });
|
|
460
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.treeNodeWrapperClasses, children: [
|
|
461
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
462
|
+
"div",
|
|
463
|
+
{
|
|
464
|
+
className: tigercatCore.getTreeNodeClasses(isSelected, !!node.disabled, blockNode),
|
|
465
|
+
ref: (el) => {
|
|
466
|
+
itemRefs.current.set(node.key, el);
|
|
467
|
+
},
|
|
468
|
+
role: "treeitem",
|
|
469
|
+
"aria-level": level + 1,
|
|
470
|
+
"aria-disabled": node.disabled || void 0,
|
|
471
|
+
"aria-selected": effectiveSelectable ? isSelected : void 0,
|
|
472
|
+
"aria-expanded": isExpandable ? isExpanded : void 0,
|
|
473
|
+
"aria-checked": checkable ? isHalfChecked ? "mixed" : isChecked : void 0,
|
|
474
|
+
tabIndex: isFocusable ? 0 : -1,
|
|
475
|
+
onFocus: () => {
|
|
476
|
+
if (!node.disabled) setActiveKey(node.key);
|
|
477
|
+
},
|
|
478
|
+
onKeyDown: (e) => handleKeyDown(e, node, isExpanded, isChecked),
|
|
479
|
+
onClick: (e) => {
|
|
480
|
+
setActiveKey(node.key);
|
|
481
|
+
if (!node.disabled) onNodeClick?.(node, e);
|
|
482
|
+
if (effectiveSelectable && !node.disabled) {
|
|
483
|
+
handleSelect(node.key, e);
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
children: nodeContent
|
|
487
|
+
}
|
|
488
|
+
),
|
|
489
|
+
hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: tigercatCore.classNames(tigercatCore.treeNodeChildrenClasses, showLine && tigercatCore.treeLineClasses), children: node.children.map((child) => renderTreeNode(child, level + 1)) })
|
|
490
|
+
] }, node.key);
|
|
491
|
+
};
|
|
515
492
|
if (!treeData || treeData.length === 0) {
|
|
516
493
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
517
494
|
"div",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHB2UYJBY_js = require('./chunk-HB2UYJBY.js');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var tigercatCore = require('@expcat/tigercat-core');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -13,7 +13,7 @@ var DropdownItem = ({
|
|
|
13
13
|
children,
|
|
14
14
|
...buttonProps
|
|
15
15
|
}) => {
|
|
16
|
-
const context = react.useContext(
|
|
16
|
+
const context = react.useContext(chunkHB2UYJBY_js.DropdownContext);
|
|
17
17
|
const handleClick = (event) => {
|
|
18
18
|
if (disabled) {
|
|
19
19
|
event.preventDefault();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXID6T65A_js = require('./chunk-XID6T65A.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var tigercatCore = require('@expcat/tigercat-core');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -17,7 +17,7 @@ var AnchorLink = ({
|
|
|
17
17
|
children,
|
|
18
18
|
...props
|
|
19
19
|
}) => {
|
|
20
|
-
const anchorContext =
|
|
20
|
+
const anchorContext = chunkXID6T65A_js.useAnchorContext();
|
|
21
21
|
React.useEffect(() => {
|
|
22
22
|
anchorContext?.registerLink(href);
|
|
23
23
|
return () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkSAZ6V6DX_js = require('./chunk-SAZ6V6DX.js');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var tigercatCore = require('@expcat/tigercat-core');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -18,7 +18,7 @@ var Radio = ({
|
|
|
18
18
|
style,
|
|
19
19
|
...props
|
|
20
20
|
}) => {
|
|
21
|
-
const groupContext = react.useContext(
|
|
21
|
+
const groupContext = react.useContext(chunkSAZ6V6DX_js.RadioGroupContext);
|
|
22
22
|
const [internalChecked, setInternalChecked] = react.useState(defaultChecked);
|
|
23
23
|
const isCheckedControlled = checked !== void 0;
|
|
24
24
|
const isInGroup = !!groupContext;
|
|
@@ -26,23 +26,31 @@ var Radio = ({
|
|
|
26
26
|
const actualDisabled = disabled !== void 0 ? disabled : groupContext?.disabled || false;
|
|
27
27
|
const actualName = name || groupContext?.name || "";
|
|
28
28
|
const isChecked = checked !== void 0 ? checked : groupContext?.value !== void 0 ? groupContext.value === value : internalChecked;
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
const radioClasses = react.useMemo(
|
|
30
|
+
() => tigercatCore.getRadioVisualClasses({
|
|
31
|
+
size: actualSize,
|
|
32
|
+
checked: isChecked,
|
|
33
|
+
disabled: actualDisabled,
|
|
34
|
+
colors: tigercatCore.defaultRadioColors
|
|
35
|
+
}),
|
|
36
|
+
[actualSize, isChecked, actualDisabled]
|
|
37
|
+
);
|
|
38
|
+
const dotClasses = react.useMemo(
|
|
39
|
+
() => tigercatCore.getRadioDotClasses({
|
|
40
|
+
size: actualSize,
|
|
41
|
+
checked: isChecked,
|
|
42
|
+
colors: tigercatCore.defaultRadioColors
|
|
43
|
+
}),
|
|
44
|
+
[actualSize, isChecked]
|
|
45
|
+
);
|
|
46
|
+
const labelClasses = react.useMemo(
|
|
47
|
+
() => tigercatCore.getRadioLabelClasses({
|
|
48
|
+
size: actualSize,
|
|
49
|
+
disabled: actualDisabled,
|
|
50
|
+
colors: tigercatCore.defaultRadioColors
|
|
51
|
+
}),
|
|
52
|
+
[actualSize, actualDisabled]
|
|
53
|
+
);
|
|
46
54
|
const handleChange = (event) => {
|
|
47
55
|
if (actualDisabled) {
|
|
48
56
|
event.preventDefault();
|
|
@@ -66,7 +74,7 @@ var Radio = ({
|
|
|
66
74
|
if (!input.checked) input.click();
|
|
67
75
|
}
|
|
68
76
|
};
|
|
69
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: tigercatCore.classNames(
|
|
77
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: tigercatCore.classNames(tigercatCore.radioRootBaseClasses, className), style, children: [
|
|
70
78
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
71
79
|
"input",
|
|
72
80
|
{
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
import { useFormContext } from './chunk-
|
|
2
|
-
import React, { useState, useId, useMemo,
|
|
3
|
-
import { getFieldError, classNames, getFormItemClasses, getFormItemLabelClasses, getFormItemErrorClasses, getFormItemContentClasses
|
|
1
|
+
import { useFormContext } from './chunk-IGE44BIS.mjs';
|
|
2
|
+
import React, { useState, useRef, useId, useMemo, useEffect, useCallback } from 'react';
|
|
3
|
+
import { getFormItemFieldClasses, getFormItemAsteriskClasses, getFieldError, classNames, getFormItemClasses, getFormItemLabelClasses, getFormItemErrorClasses, getFormItemContentClasses } from '@expcat/tigercat-core';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
+
function hasRequiredRule(maybeRules) {
|
|
7
|
+
if (!maybeRules) return false;
|
|
8
|
+
const ruleArr = Array.isArray(maybeRules) ? maybeRules : [maybeRules];
|
|
9
|
+
return ruleArr.some((rule) => !!rule && typeof rule === "object" && !!rule.required);
|
|
10
|
+
}
|
|
11
|
+
function mergeAriaDescribedBy(existing, next) {
|
|
12
|
+
if (!existing) return next;
|
|
13
|
+
if (!next) return existing;
|
|
14
|
+
const parts = new Set(
|
|
15
|
+
`${existing} ${next}`.split(" ").map((s) => s.trim()).filter(Boolean)
|
|
16
|
+
);
|
|
17
|
+
return Array.from(parts).join(" ");
|
|
18
|
+
}
|
|
19
|
+
var FIELD_CLASSES = getFormItemFieldClasses();
|
|
20
|
+
var ASTERISK_CLASSES = getFormItemAsteriskClasses();
|
|
6
21
|
var FormItem = ({
|
|
7
22
|
name,
|
|
8
23
|
label,
|
|
@@ -17,26 +32,13 @@ var FormItem = ({
|
|
|
17
32
|
}) => {
|
|
18
33
|
const formContext = useFormContext();
|
|
19
34
|
const [errorMessage, setErrorMessage] = useState("");
|
|
35
|
+
const [shakeTrigger, setShakeTrigger] = useState(0);
|
|
36
|
+
const prevFormErrorRef = useRef("");
|
|
20
37
|
const reactId = useId();
|
|
21
|
-
const baseId =
|
|
38
|
+
const baseId = `tiger-form-item-${reactId}`;
|
|
22
39
|
const labelId = `${baseId}-label`;
|
|
23
40
|
const fieldId = `${baseId}-field`;
|
|
24
41
|
const errorId = `${baseId}-error`;
|
|
25
|
-
const mergeAriaDescribedBy = useCallback(
|
|
26
|
-
(existing, next) => {
|
|
27
|
-
if (!existing) {
|
|
28
|
-
return next;
|
|
29
|
-
}
|
|
30
|
-
if (!next) {
|
|
31
|
-
return existing;
|
|
32
|
-
}
|
|
33
|
-
const parts = new Set(
|
|
34
|
-
`${existing} ${next}`.split(" ").map((s) => s.trim()).filter(Boolean)
|
|
35
|
-
);
|
|
36
|
-
return Array.from(parts).join(" ");
|
|
37
|
-
},
|
|
38
|
-
[]
|
|
39
|
-
);
|
|
40
42
|
const actualSize = size || formContext?.size || "md";
|
|
41
43
|
const labelPosition = formContext?.labelPosition || "right";
|
|
42
44
|
const labelAlign = formContext?.labelAlign || "right";
|
|
@@ -47,18 +49,6 @@ var FormItem = ({
|
|
|
47
49
|
}
|
|
48
50
|
return width;
|
|
49
51
|
}, [labelWidth, formContext?.labelWidth]);
|
|
50
|
-
const hasRequiredRule = useCallback((maybeRules) => {
|
|
51
|
-
if (!maybeRules) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
const rules2 = Array.isArray(maybeRules) ? maybeRules : [maybeRules];
|
|
55
|
-
return rules2.some((rule) => {
|
|
56
|
-
if (!rule || typeof rule !== "object") {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
return !!rule.required;
|
|
60
|
-
});
|
|
61
|
-
}, []);
|
|
62
52
|
const showRequiredAsterisk = useMemo(() => {
|
|
63
53
|
if (required !== void 0) {
|
|
64
54
|
return required;
|
|
@@ -73,15 +63,19 @@ var FormItem = ({
|
|
|
73
63
|
}
|
|
74
64
|
}
|
|
75
65
|
return false;
|
|
76
|
-
}, [required, rules, name, formContext?.rules
|
|
66
|
+
}, [required, rules, name, formContext?.rules]);
|
|
77
67
|
const isRequired = useMemo(
|
|
78
68
|
() => showRequiredAsterisk && (formContext?.showRequiredAsterisk ?? true),
|
|
79
69
|
[showRequiredAsterisk, formContext?.showRequiredAsterisk]
|
|
80
70
|
);
|
|
81
71
|
useEffect(() => {
|
|
82
72
|
if (name && formContext?.errors) {
|
|
83
|
-
const error = getFieldError(name, formContext.errors);
|
|
84
|
-
setErrorMessage(error
|
|
73
|
+
const error = getFieldError(name, formContext.errors) || "";
|
|
74
|
+
setErrorMessage(error);
|
|
75
|
+
if (error && error !== prevFormErrorRef.current) {
|
|
76
|
+
setShakeTrigger((prev) => prev + 1);
|
|
77
|
+
}
|
|
78
|
+
prevFormErrorRef.current = error;
|
|
85
79
|
}
|
|
86
80
|
}, [name, formContext?.errors]);
|
|
87
81
|
useEffect(() => {
|
|
@@ -110,7 +104,7 @@ var FormItem = ({
|
|
|
110
104
|
formContext.validateField(name, rules, "change");
|
|
111
105
|
}
|
|
112
106
|
}, [name, formContext, rules]);
|
|
113
|
-
const hasError =
|
|
107
|
+
const hasError = !!errorMessage;
|
|
114
108
|
const describedById = useMemo(
|
|
115
109
|
() => showMessage && hasError ? errorId : void 0,
|
|
116
110
|
[showMessage, hasError, errorId]
|
|
@@ -123,6 +117,7 @@ var FormItem = ({
|
|
|
123
117
|
return React.Children.toArray(children)[0] ?? null;
|
|
124
118
|
}, [children]);
|
|
125
119
|
const isClonableChild = React.isValidElement(onlyChild);
|
|
120
|
+
const isNativeElement = isClonableChild && typeof onlyChild.type === "string";
|
|
126
121
|
const childId = isClonableChild ? onlyChild.props.id : void 0;
|
|
127
122
|
const effectiveFieldId = childId ?? fieldId;
|
|
128
123
|
const enhancedChild = useMemo(() => {
|
|
@@ -131,6 +126,9 @@ var FormItem = ({
|
|
|
131
126
|
}
|
|
132
127
|
const nextProps = {
|
|
133
128
|
id: effectiveFieldId,
|
|
129
|
+
status: !isNativeElement && hasError ? "error" : onlyChild.props.status,
|
|
130
|
+
errorMessage: !isNativeElement && hasError && !showMessage ? errorMessage : onlyChild.props.errorMessage,
|
|
131
|
+
_shakeTrigger: !isNativeElement && hasError ? shakeTrigger : void 0,
|
|
134
132
|
"aria-invalid": hasError ? true : onlyChild.props["aria-invalid"],
|
|
135
133
|
"aria-required": isRequired ? true : onlyChild.props["aria-required"],
|
|
136
134
|
"aria-describedby": mergeAriaDescribedBy(onlyChild.props["aria-describedby"], describedById),
|
|
@@ -150,8 +148,11 @@ var FormItem = ({
|
|
|
150
148
|
onlyChild,
|
|
151
149
|
effectiveFieldId,
|
|
152
150
|
hasError,
|
|
151
|
+
errorMessage,
|
|
152
|
+
showMessage,
|
|
153
|
+
shakeTrigger,
|
|
153
154
|
isRequired,
|
|
154
|
-
|
|
155
|
+
isNativeElement,
|
|
155
156
|
describedById,
|
|
156
157
|
handleBlur,
|
|
157
158
|
handleChange
|
|
@@ -184,13 +185,10 @@ var FormItem = ({
|
|
|
184
185
|
return actualLabelWidth ? { width: actualLabelWidth } : {};
|
|
185
186
|
}, [labelPosition, actualLabelWidth]);
|
|
186
187
|
const errorClasses = useMemo(
|
|
187
|
-
() => classNames(getFormItemErrorClasses(actualSize), hasError && "
|
|
188
|
+
() => classNames(getFormItemErrorClasses(actualSize), hasError && "opacity-100"),
|
|
188
189
|
[actualSize, hasError]
|
|
189
190
|
);
|
|
190
191
|
const contentClasses = useMemo(() => getFormItemContentClasses(labelPosition), [labelPosition]);
|
|
191
|
-
const fieldClasses = useMemo(() => getFormItemFieldClasses(), []);
|
|
192
|
-
const asteriskClasses = useMemo(() => getFormItemAsteriskClasses(), []);
|
|
193
|
-
const asteriskStyle = useMemo(() => getFormItemAsteriskStyle(), []);
|
|
194
192
|
return /* @__PURE__ */ jsxs("div", { className: formItemClasses, children: [
|
|
195
193
|
label && /* @__PURE__ */ jsxs(
|
|
196
194
|
"label",
|
|
@@ -200,7 +198,7 @@ var FormItem = ({
|
|
|
200
198
|
style: labelStyles,
|
|
201
199
|
htmlFor: isClonableChild ? effectiveFieldId : void 0,
|
|
202
200
|
children: [
|
|
203
|
-
isRequired && /* @__PURE__ */ jsx("span", { className:
|
|
201
|
+
isRequired && /* @__PURE__ */ jsx("span", { className: ASTERISK_CLASSES, children: "*" }),
|
|
204
202
|
label
|
|
205
203
|
]
|
|
206
204
|
}
|
|
@@ -209,7 +207,7 @@ var FormItem = ({
|
|
|
209
207
|
/* @__PURE__ */ jsx(
|
|
210
208
|
"div",
|
|
211
209
|
{
|
|
212
|
-
className:
|
|
210
|
+
className: FIELD_CLASSES,
|
|
213
211
|
role: "group",
|
|
214
212
|
"aria-labelledby": label ? labelId : void 0,
|
|
215
213
|
"aria-describedby": describedById,
|
|
@@ -220,7 +218,16 @@ var FormItem = ({
|
|
|
220
218
|
children: enhancedChild
|
|
221
219
|
}
|
|
222
220
|
),
|
|
223
|
-
showMessage &&
|
|
221
|
+
showMessage && /* @__PURE__ */ jsx(
|
|
222
|
+
"div",
|
|
223
|
+
{
|
|
224
|
+
id: hasError ? errorId : void 0,
|
|
225
|
+
role: hasError ? "alert" : void 0,
|
|
226
|
+
className: errorClasses,
|
|
227
|
+
"aria-hidden": hasError ? void 0 : true,
|
|
228
|
+
children: hasError ? errorMessage : ""
|
|
229
|
+
}
|
|
230
|
+
)
|
|
224
231
|
] })
|
|
225
232
|
] });
|
|
226
233
|
};
|