@expcat/tigercat-react 1.3.4 → 1.5.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/{chunk-WV5XHYW6.js → chunk-23XPDNCA.js} +6 -4
- package/dist/{chunk-CY5GRTAX.js → chunk-24NDLFPK.js} +46 -33
- package/dist/{chunk-3SV6J7I5.mjs → chunk-2L7QEOFD.mjs} +34 -25
- package/dist/{chunk-NMKFR435.js → chunk-2LKX6CE7.js} +7 -4
- package/dist/{chunk-MB6U72CI.js → chunk-2PV3F47T.js} +2 -2
- package/dist/{chunk-ANN5P7TJ.js → chunk-2ZA4MUO2.js} +72 -29
- package/dist/{chunk-H4AR4GXH.js → chunk-3NVMKDMH.js} +1 -8
- package/dist/{chunk-NPTXXUXF.mjs → chunk-3RBRWBUG.mjs} +9 -7
- package/dist/{chunk-SIY6FDKJ.js → chunk-3RQ3FHJ7.js} +341 -316
- package/dist/{chunk-ELRZ2ZHM.mjs → chunk-4DRJA5ZK.mjs} +15 -17
- package/dist/{chunk-J3N24I7A.mjs → chunk-4F3UTDFE.mjs} +24 -6
- package/dist/{chunk-3CJFNG54.mjs → chunk-4HMMH4XS.mjs} +24 -11
- package/dist/{chunk-IG75YSX3.mjs → chunk-4MONGWU5.mjs} +4 -6
- package/dist/{chunk-CHBUNQIJ.mjs → chunk-4MREOFVE.mjs} +26 -9
- package/dist/{chunk-EEF26RBA.mjs → chunk-4SU6D2E7.mjs} +15 -3
- package/dist/{chunk-ZZAR4IDS.js → chunk-4TPRBVW7.js} +19 -2
- package/dist/{chunk-NSEO2B74.mjs → chunk-4V5RL25M.mjs} +8 -5
- package/dist/{chunk-TMON4MPO.js → chunk-5ALMTE35.js} +9 -7
- package/dist/{chunk-AUW7DCXL.js → chunk-5JYVN65W.js} +24 -6
- package/dist/{chunk-3MRP3XYI.js → chunk-5QLSTNA3.js} +13 -2
- package/dist/chunk-5SX2M3LU.mjs +319 -0
- package/dist/{chunk-FI53LYZ6.js → chunk-5UREMEDS.js} +24 -8
- package/dist/{chunk-MSHCPJIJ.mjs → chunk-6BOSSZM3.mjs} +8 -9
- package/dist/chunk-6LGCAGNG.js +312 -0
- package/dist/{chunk-A42OLED6.mjs → chunk-6REMGSLS.mjs} +35 -13
- package/dist/{chunk-PNAWOJ32.js → chunk-6S5QOTXZ.js} +14 -2
- package/dist/{chunk-PUZDW7NR.js → chunk-6SG2N4WF.js} +135 -21
- package/dist/{chunk-5XE5VBDS.mjs → chunk-6UIVNRAR.mjs} +15 -2
- package/dist/{chunk-F6IXIH6B.mjs → chunk-7RI5W465.mjs} +43 -30
- package/dist/{chunk-DCKBVRLI.js → chunk-7UZ7O7KX.js} +63 -16
- package/dist/{chunk-ONTRGV5T.js → chunk-7YI5TAPT.js} +8 -19
- package/dist/chunk-AI4V7L6K.mjs +230 -0
- package/dist/chunk-AQOXANET.mjs +222 -0
- package/dist/{chunk-YOAYDEWW.mjs → chunk-ATSI3UKS.mjs} +5 -21
- package/dist/{chunk-ZRHDNGWO.js → chunk-BR3WLDH7.js} +16 -2
- package/dist/{chunk-2Y5NIPHB.mjs → chunk-BRPOEVRT.mjs} +32 -3
- package/dist/{chunk-LRPPXU74.mjs → chunk-CR4QBH46.mjs} +47 -8
- package/dist/{chunk-7U6VWD4H.mjs → chunk-CSJGNEHR.mjs} +2 -2
- package/dist/{chunk-OZD75CLT.js → chunk-CXXOZLP4.js} +34 -24
- package/dist/{chunk-7QZ4XT2P.mjs → chunk-D4X3NBAI.mjs} +11 -11
- package/dist/{chunk-RQXY2MGX.mjs → chunk-D7UR526A.mjs} +231 -184
- package/dist/{chunk-CBYJXDW4.js → chunk-DBMC6FPU.js} +16 -4
- package/dist/{chunk-WQ4FOHOU.mjs → chunk-DEIVWO2D.mjs} +3 -5
- package/dist/{chunk-WNLUUD5N.mjs → chunk-DEQZZKY5.mjs} +20 -19
- package/dist/{chunk-ITRYKHQJ.js → chunk-DH4B2COV.js} +121 -47
- package/dist/{chunk-BONUUJU3.mjs → chunk-DJOFM2VO.mjs} +1 -8
- package/dist/chunk-DO3MVZZN.mjs +698 -0
- package/dist/{chunk-6GIJ7NFV.mjs → chunk-E355NVP7.mjs} +38 -19
- package/dist/{chunk-KQ5I7PRM.js → chunk-ENJMHEQU.js} +48 -9
- package/dist/{chunk-UHFHOTNI.js → chunk-FBIBHTBG.js} +8 -9
- package/dist/{chunk-P36GX65N.js → chunk-FCCHM2B4.js} +40 -4
- package/dist/{chunk-4LIDROT4.js → chunk-FFDK6PEP.js} +7 -4
- package/dist/{chunk-KYP7U6FK.js → chunk-FZHBVHQ6.js} +34 -25
- package/dist/{chunk-R2KUNFDN.mjs → chunk-GA4YOE57.mjs} +2 -2
- package/dist/{chunk-3E76U2RG.js → chunk-GADCSCH2.js} +33 -5
- package/dist/{chunk-JOB47R6Q.mjs → chunk-GCOA4AO6.mjs} +72 -29
- package/dist/{chunk-GN3TSQWW.mjs → chunk-GOUSXJEY.mjs} +2 -2
- package/dist/{chunk-WVVXZKNI.js → chunk-GPAY5F7D.js} +14 -14
- package/dist/{chunk-KGSDDVRC.mjs → chunk-GQPKHMHA.mjs} +4 -4
- package/dist/{chunk-NKSYX4R7.mjs → chunk-GTDLZF7K.mjs} +2 -2
- package/dist/{chunk-2GQCFTD7.mjs → chunk-H4MPPCTB.mjs} +23 -4
- package/dist/{chunk-3ZNZLGQO.mjs → chunk-H7D7UBDC.mjs} +8 -9
- package/dist/{chunk-BBLVRLXT.js → chunk-HFGTJEQW.js} +301 -164
- package/dist/{chunk-GQFVVAEF.js → chunk-HVAG26CK.js} +5 -5
- package/dist/{chunk-L5AMVEQL.mjs → chunk-HWZSMV2M.mjs} +61 -19
- package/dist/{chunk-TC6JLEGZ.js → chunk-I5UB4FN3.js} +27 -10
- package/dist/{chunk-4U5HSR2H.js → chunk-I6VHGILW.js} +24 -13
- package/dist/{chunk-EOU6WZTS.js → chunk-I7OSNH5T.js} +34 -5
- package/dist/{chunk-M73NMNZX.js → chunk-IFB3OECJ.js} +18 -5
- package/dist/{chunk-Y5RQN5BO.mjs → chunk-IXAPFTTD.mjs} +7 -6
- package/dist/{chunk-EHIXCFD7.js → chunk-JHRFG5PG.js} +57 -12
- package/dist/{chunk-3EB42WFR.mjs → chunk-KCPGFO5R.mjs} +2 -2
- package/dist/{chunk-G3PBQ4B4.mjs → chunk-KQ4ZKXXN.mjs} +52 -2
- package/dist/{chunk-I373B74W.js → chunk-KSXGH3FO.js} +105 -44
- package/dist/{chunk-X7JAYXPY.js → chunk-KVWSVDAJ.js} +4 -4
- package/dist/chunk-L3WPA2RP.js +25 -0
- package/dist/{chunk-NVEIVIAW.mjs → chunk-LACDTZTE.mjs} +134 -20
- package/dist/{chunk-WI4N5DD3.mjs → chunk-LAKPYMBZ.mjs} +17 -4
- package/dist/{chunk-6GU5NH5F.mjs → chunk-LBXNMCXN.mjs} +33 -5
- package/dist/{chunk-4LX5UGPQ.js → chunk-LJRCEB7F.js} +168 -121
- package/dist/{chunk-BJQIYELW.mjs → chunk-LOM6NNQK.mjs} +34 -21
- package/dist/{chunk-KXNWY2Q7.mjs → chunk-LUABLBKS.mjs} +308 -171
- package/dist/{chunk-F7H4ALKN.js → chunk-LZG24TDB.js} +8 -9
- package/dist/{chunk-K2TXT5HQ.js → chunk-M577W3TS.js} +101 -85
- package/dist/{chunk-UXUYCWQC.js → chunk-MOYZF62V.js} +34 -21
- package/dist/{chunk-6TR7JB6C.js → chunk-MQIVMK24.js} +4 -4
- package/dist/{chunk-DKT2EYVM.mjs → chunk-MV2JQ6XQ.mjs} +3 -6
- package/dist/{chunk-WMPCN7OF.mjs → chunk-MZCGQED3.mjs} +15 -3
- package/dist/{chunk-IGAMV6ML.mjs → chunk-MZPKFMQC.mjs} +1 -1
- package/dist/{chunk-AG4HRAW2.mjs → chunk-NEHSCSQP.mjs} +2 -2
- package/dist/chunk-NG3OBMKV.js +319 -0
- package/dist/{chunk-RFHPG4KN.js → chunk-NGSJGXUZ.js} +15 -17
- package/dist/{chunk-WIWTY74F.mjs → chunk-NJHZQBA7.mjs} +16 -2
- package/dist/{chunk-EQD2U4KM.js → chunk-O2N7ITWQ.js} +63 -16
- package/dist/{chunk-NASC6XHN.mjs → chunk-O6YIPNXX.mjs} +24 -15
- package/dist/{chunk-VHGCWZ6V.mjs → chunk-OTRPN5ZG.mjs} +58 -13
- package/dist/{chunk-QIKR5EFI.js → chunk-OVJO5NYW.js} +4 -4
- package/dist/{chunk-6GYT3EZD.mjs → chunk-P2WQIVXD.mjs} +25 -14
- package/dist/{chunk-NMEVQPOD.js → chunk-PHAJXRGE.js} +2 -4
- package/dist/{chunk-WG3YS2QV.js → chunk-PQF5VLNX.js} +35 -13
- package/dist/chunk-PQOUWJAT.mjs +211 -0
- package/dist/{chunk-AW5M3EL4.js → chunk-PSCPLUGP.js} +63 -21
- package/dist/{chunk-ITVLIR7T.mjs → chunk-PZB24FST.mjs} +23 -25
- package/dist/{chunk-BO45CU4Q.js → chunk-PZWI4YNN.js} +6 -4
- package/dist/{chunk-PFYK2V3E.js → chunk-Q2OXQNWU.js} +73 -9
- package/dist/{chunk-VM4ZQHT5.mjs → chunk-QANWBRNU.mjs} +59 -12
- package/dist/{chunk-XBM76P27.mjs → chunk-QFUIGOOM.mjs} +4 -2
- package/dist/{chunk-5OHVTGHS.mjs → chunk-QKNORS26.mjs} +385 -319
- package/dist/{chunk-ZFMMAYSX.js → chunk-QLATA4UB.js} +4 -6
- package/dist/{chunk-LROHXQWX.js → chunk-R4PMBWU3.js} +2 -2
- package/dist/chunk-R56UOY6C.js +222 -0
- package/dist/chunk-RNHC7BON.js +230 -0
- package/dist/{chunk-RF2BA2N6.js → chunk-RRO752KE.js} +11 -10
- package/dist/{chunk-2TZ3SBMU.mjs → chunk-S4NGDDAM.mjs} +120 -46
- package/dist/{chunk-EF5ZTNHX.js → chunk-SA3N2LUB.js} +37 -20
- package/dist/{chunk-M7HBWFQO.js → chunk-SFBSI3J7.js} +14 -1
- package/dist/{chunk-G5USITWF.js → chunk-SH4BZYXO.js} +27 -8
- package/dist/{chunk-RVO6R37N.mjs → chunk-SHDQJ5BJ.mjs} +1 -1
- package/dist/{chunk-N2JYU4JI.js → chunk-SHU7L4NM.js} +52 -2
- package/dist/{chunk-I2AUOICV.mjs → chunk-SI3P3V75.mjs} +19 -9
- package/dist/{chunk-UVMQJOTX.js → chunk-SK7PXSVE.js} +23 -14
- package/dist/{chunk-U356F7GU.js → chunk-SO2ADQTB.js} +52 -11
- package/dist/{chunk-NKKIJQMV.mjs → chunk-SPIPFOGD.mjs} +4 -2
- package/dist/{chunk-JLRRXRZO.js → chunk-SQONS5PH.js} +4 -7
- package/dist/{chunk-NQNHM4OL.mjs → chunk-SRC7JHME.mjs} +1 -1
- package/dist/{chunk-EEWHWEYO.js → chunk-SXTMVZ4W.js} +25 -12
- package/dist/{chunk-LMTUM3J3.js → chunk-SYJJKI7U.js} +37 -18
- package/dist/{chunk-3QPCQH62.mjs → chunk-SYVMCKPR.mjs} +1 -1
- package/dist/{chunk-SY23FAXK.mjs → chunk-T6HNFCOW.mjs} +24 -8
- package/dist/{chunk-ZITBUGBH.mjs → chunk-TBMDIAZI.mjs} +59 -12
- package/dist/{chunk-TSJYAEFZ.js → chunk-TIDVBSXR.js} +371 -305
- package/dist/{chunk-ZJI2VLIL.js → chunk-TLDTBCT6.js} +15 -3
- package/dist/{chunk-XFPJYKBQ.js → chunk-TN7GMDME.js} +13 -9
- package/dist/{chunk-ZYJTHGQW.js → chunk-TO4SSBAJ.js} +26 -25
- package/dist/{chunk-N4PP3ENO.js → chunk-TPU6S7G7.js} +2 -2
- package/dist/{chunk-PU7KEYLP.mjs → chunk-TRXNHYWB.mjs} +9 -9
- package/dist/{chunk-H6NC6SBX.js → chunk-TVEO2CFD.js} +2 -2
- package/dist/{chunk-6QQBMZQ6.mjs → chunk-U2ZXZ2KQ.mjs} +74 -10
- package/dist/{chunk-FB34UWF7.mjs → chunk-U337RHJB.mjs} +103 -42
- package/dist/{chunk-XRNKHQTL.js → chunk-UEAXYZSE.js} +3 -2
- package/dist/{chunk-7ISEWLA3.js → chunk-UKQMF3JV.js} +21 -6
- package/dist/chunk-UQZ4RLTI.js +698 -0
- package/dist/{chunk-PXO2F2CS.mjs → chunk-V23KR23W.mjs} +47 -4
- package/dist/{chunk-6I6X255M.js → chunk-V3QEV3TL.js} +12 -12
- package/dist/{chunk-M5GSLKUX.mjs → chunk-VAIWWELW.mjs} +15 -3
- package/dist/{chunk-GG72T6JK.js → chunk-VOSN3IQC.js} +47 -4
- package/dist/{chunk-J4OQ2VRH.mjs → chunk-W6T3CG7U.mjs} +45 -4
- package/dist/{chunk-OTEM4FVX.mjs → chunk-WGKNAOW7.mjs} +11 -7
- package/dist/chunk-WHYHLUXG.mjs +25 -0
- package/dist/chunk-WLFLQB4R.mjs +312 -0
- package/dist/{chunk-W6AWN7BC.js → chunk-WLORVPTR.js} +4 -4
- package/dist/{chunk-J5N5OQWB.mjs → chunk-WOEX4S6J.mjs} +5 -2
- package/dist/{chunk-SDZOVRVR.mjs → chunk-WT72F56O.mjs} +351 -326
- package/dist/{chunk-7Z64GEMN.js → chunk-WTASPL6V.js} +3 -1
- package/dist/{chunk-FNJDBFKM.mjs → chunk-WTIEJCRV.mjs} +12 -1
- package/dist/{chunk-V4JIZN3E.mjs → chunk-WYPTAUCX.mjs} +6 -17
- package/dist/{chunk-BFAZZUD6.js → chunk-XKMZ5AMS.js} +7 -23
- package/dist/{chunk-SKMZTW3K.js → chunk-XMD7CQQ2.js} +24 -26
- package/dist/{chunk-7DUHHRAU.mjs → chunk-Y5X3G2LD.mjs} +41 -5
- package/dist/{chunk-XATXFVKR.mjs → chunk-Y7K27DVV.mjs} +4 -3
- package/dist/{chunk-ZA5EFHET.mjs → chunk-Z6BDNV3S.mjs} +18 -1
- package/dist/{chunk-UBP7HZSU.mjs → chunk-ZG2W4HS5.mjs} +6 -4
- package/dist/{chunk-UIIOZEUP.js → chunk-ZLCVJXGL.js} +4 -4
- package/dist/{chunk-LQT6ZGME.mjs → chunk-ZLP4XEAO.mjs} +36 -19
- package/dist/{chunk-QQFLRNI3.mjs → chunk-ZRZB3C5J.mjs} +18 -3
- package/dist/{chunk-YID7J6ZK.js → chunk-ZXVLZKLT.js} +1 -1
- package/dist/components/ActivityFeed.js +6 -5
- package/dist/components/ActivityFeed.mjs +5 -4
- package/dist/components/AreaChart.js +4 -4
- package/dist/components/AreaChart.mjs +3 -3
- package/dist/components/AutoComplete.js +3 -2
- package/dist/components/AutoComplete.mjs +2 -1
- package/dist/components/BackTop.js +2 -2
- package/dist/components/BackTop.mjs +1 -1
- package/dist/components/Badge.js +3 -2
- package/dist/components/Badge.mjs +2 -1
- package/dist/components/BarChart.js +4 -4
- package/dist/components/BarChart.mjs +3 -3
- package/dist/components/Breadcrumb.d.mts +1 -1
- package/dist/components/Breadcrumb.d.ts +1 -1
- package/dist/components/Calendar.d.mts +2 -10
- package/dist/components/Calendar.d.ts +2 -10
- package/dist/components/Calendar.js +3 -2
- package/dist/components/Calendar.mjs +2 -1
- package/dist/components/Cascader.d.mts +3 -1
- package/dist/components/Cascader.d.ts +3 -1
- package/dist/components/Cascader.js +3 -2
- package/dist/components/Cascader.mjs +2 -1
- package/dist/components/ChartAxis.d.mts +1 -2
- package/dist/components/ChartAxis.d.ts +1 -2
- package/dist/components/ChartGrid.d.mts +1 -2
- package/dist/components/ChartGrid.d.ts +1 -2
- package/dist/components/ChartLegend.js +2 -2
- package/dist/components/ChartLegend.mjs +1 -1
- package/dist/components/ChartSeries.d.mts +1 -2
- package/dist/components/ChartSeries.d.ts +1 -2
- package/dist/components/ChartTooltip.js +2 -2
- package/dist/components/ChartTooltip.mjs +1 -1
- package/dist/components/ChatWindow.js +9 -7
- package/dist/components/ChatWindow.mjs +8 -6
- package/dist/components/Checkbox.js +4 -4
- package/dist/components/Checkbox.mjs +3 -3
- package/dist/components/CheckboxGroup.js +3 -3
- package/dist/components/CheckboxGroup.mjs +2 -2
- package/dist/components/CodeEditor.js +2 -2
- package/dist/components/CodeEditor.mjs +1 -1
- package/dist/components/CommentThread.js +7 -5
- package/dist/components/CommentThread.mjs +6 -4
- package/dist/components/CropUpload.d.mts +6 -2
- package/dist/components/CropUpload.d.ts +6 -2
- package/dist/components/CropUpload.js +5 -5
- package/dist/components/CropUpload.mjs +4 -4
- package/dist/components/DataTableWithToolbar.d.mts +2 -3
- package/dist/components/DataTableWithToolbar.d.ts +2 -3
- package/dist/components/DataTableWithToolbar.js +13 -12
- package/dist/components/DataTableWithToolbar.mjs +12 -11
- package/dist/components/DatePicker.d.mts +1 -0
- package/dist/components/DatePicker.d.ts +1 -0
- package/dist/components/DatePicker.js +4 -2
- package/dist/components/DatePicker.mjs +3 -1
- package/dist/components/DonutChart.js +5 -5
- package/dist/components/DonutChart.mjs +4 -4
- package/dist/components/Drawer.js +3 -3
- package/dist/components/Drawer.mjs +2 -2
- package/dist/components/Empty.js +3 -2
- package/dist/components/Empty.mjs +2 -1
- package/dist/components/FileManager.d.mts +3 -22
- package/dist/components/FileManager.d.ts +3 -22
- package/dist/components/FileManager.js +3 -2
- package/dist/components/FileManager.mjs +2 -1
- package/dist/components/FloatButton.js +2 -2
- package/dist/components/FloatButton.mjs +1 -1
- package/dist/components/Form.js +3 -2
- package/dist/components/Form.mjs +2 -1
- package/dist/components/FormItem.js +4 -3
- package/dist/components/FormItem.mjs +3 -2
- package/dist/components/FormWizard.js +4 -4
- package/dist/components/FormWizard.mjs +3 -3
- package/dist/components/FunnelChart.js +4 -4
- package/dist/components/FunnelChart.mjs +3 -3
- package/dist/components/GaugeChart.js +3 -2
- package/dist/components/GaugeChart.mjs +2 -1
- package/dist/components/HeatmapChart.js +3 -3
- package/dist/components/HeatmapChart.mjs +2 -2
- package/dist/components/Image.js +5 -4
- package/dist/components/Image.mjs +4 -3
- package/dist/components/ImageAnnotation.d.mts +1 -1
- package/dist/components/ImageAnnotation.d.ts +1 -1
- package/dist/components/ImageAnnotation.js +3 -2
- package/dist/components/ImageAnnotation.mjs +2 -1
- package/dist/components/ImageCropper.js +3 -2
- package/dist/components/ImageCropper.mjs +2 -1
- package/dist/components/ImageGroup.js +4 -3
- package/dist/components/ImageGroup.mjs +3 -2
- package/dist/components/ImagePreview.js +3 -2
- package/dist/components/ImagePreview.mjs +2 -1
- package/dist/components/ImageViewer.d.mts +3 -1
- package/dist/components/ImageViewer.d.ts +3 -1
- package/dist/components/ImageViewer.js +3 -2
- package/dist/components/ImageViewer.mjs +2 -1
- package/dist/components/InfiniteScroll.d.mts +2 -0
- package/dist/components/InfiniteScroll.d.ts +2 -0
- package/dist/components/InfiniteScroll.js +3 -2
- package/dist/components/InfiniteScroll.mjs +2 -1
- package/dist/components/Input.js +4 -2
- package/dist/components/Input.mjs +3 -1
- package/dist/components/InputNumber.js +4 -2
- package/dist/components/InputNumber.mjs +3 -1
- package/dist/components/Kanban.d.mts +5 -1
- package/dist/components/Kanban.d.ts +5 -1
- package/dist/components/Kanban.js +3 -3
- package/dist/components/Kanban.mjs +2 -2
- package/dist/components/LineChart.js +4 -4
- package/dist/components/LineChart.mjs +3 -3
- package/dist/components/List.d.mts +6 -3
- package/dist/components/List.d.ts +6 -3
- package/dist/components/List.js +4 -3
- package/dist/components/List.mjs +3 -2
- package/dist/components/Loading.js +3 -2
- package/dist/components/Loading.mjs +2 -1
- package/dist/components/MarkdownEditor.js +3 -3
- package/dist/components/MarkdownEditor.mjs +2 -2
- package/dist/components/Mentions.js +2 -2
- package/dist/components/Mentions.mjs +1 -1
- package/dist/components/Menu.d.mts +8 -80
- package/dist/components/Menu.d.ts +8 -80
- package/dist/components/Menu.js +2 -2
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/MenuItem.d.mts +6 -2
- package/dist/components/MenuItem.d.ts +6 -2
- package/dist/components/MenuItem.js +2 -2
- package/dist/components/MenuItem.mjs +1 -1
- package/dist/components/MenuItemGroup.d.mts +6 -2
- package/dist/components/MenuItemGroup.d.ts +6 -2
- package/dist/components/MenuItemGroup.js +2 -2
- package/dist/components/MenuItemGroup.mjs +1 -1
- package/dist/components/Message.d.mts +2 -1
- package/dist/components/Message.d.ts +2 -1
- package/dist/components/Message.js +2 -2
- package/dist/components/Message.mjs +1 -1
- package/dist/components/Modal.js +3 -3
- package/dist/components/Modal.mjs +2 -2
- package/dist/components/Notification.js +2 -2
- package/dist/components/Notification.mjs +1 -1
- package/dist/components/NotificationCenter.js +7 -6
- package/dist/components/NotificationCenter.mjs +6 -5
- package/dist/components/NumberKeyboard.js +3 -2
- package/dist/components/NumberKeyboard.mjs +2 -1
- package/dist/components/PieChart.js +4 -4
- package/dist/components/PieChart.mjs +3 -3
- package/dist/components/QRCode.d.mts +2 -1
- package/dist/components/QRCode.d.ts +2 -1
- package/dist/components/QRCode.js +3 -2
- package/dist/components/QRCode.mjs +2 -1
- package/dist/components/RadarChart.js +4 -4
- package/dist/components/RadarChart.mjs +3 -3
- package/dist/components/Radio.js +4 -4
- package/dist/components/Radio.mjs +3 -3
- package/dist/components/RadioGroup.js +3 -3
- package/dist/components/RadioGroup.mjs +2 -2
- package/dist/components/Rate.js +2 -2
- package/dist/components/Rate.mjs +1 -1
- package/dist/components/Resizable.js +2 -2
- package/dist/components/Resizable.mjs +1 -1
- package/dist/components/Result.js +2 -2
- package/dist/components/Result.mjs +1 -1
- package/dist/components/RichTextEditor.js +3 -3
- package/dist/components/RichTextEditor.mjs +2 -2
- package/dist/components/ScatterChart.js +4 -4
- package/dist/components/ScatterChart.mjs +3 -3
- package/dist/components/Segmented.d.mts +1 -1
- package/dist/components/Segmented.d.ts +1 -1
- package/dist/components/Segmented.js +2 -2
- package/dist/components/Segmented.mjs +1 -1
- package/dist/components/Select.d.mts +3 -1
- package/dist/components/Select.d.ts +3 -1
- package/dist/components/Select.js +3 -2
- package/dist/components/Select.mjs +2 -1
- package/dist/components/Signature.d.mts +1 -0
- package/dist/components/Signature.d.ts +1 -0
- package/dist/components/Signature.js +3 -2
- package/dist/components/Signature.mjs +2 -1
- package/dist/components/Slider.js +2 -2
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Splitter.js +2 -2
- package/dist/components/Splitter.mjs +1 -1
- package/dist/components/Spotlight.js +4 -2
- package/dist/components/Spotlight.mjs +3 -1
- package/dist/components/Steps.js +2 -2
- 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.d.mts +6 -2
- package/dist/components/SubMenu.d.ts +6 -2
- package/dist/components/SubMenu.js +2 -2
- package/dist/components/SubMenu.mjs +1 -1
- package/dist/components/SunburstChart.js +4 -4
- package/dist/components/SunburstChart.mjs +3 -3
- package/dist/components/TabPane.js +2 -2
- package/dist/components/TabPane.mjs +1 -1
- package/dist/components/Table.d.mts +3 -3
- package/dist/components/Table.d.ts +3 -3
- package/dist/components/Table.js +9 -9
- package/dist/components/Table.mjs +8 -8
- package/dist/components/Tabs.d.mts +0 -4
- package/dist/components/Tabs.d.ts +0 -4
- package/dist/components/Tabs.js +2 -2
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/Tag.js +3 -2
- package/dist/components/Tag.mjs +2 -1
- package/dist/components/TaskBoard.d.mts +3 -1
- package/dist/components/TaskBoard.d.ts +3 -1
- package/dist/components/TaskBoard.js +2 -2
- package/dist/components/TaskBoard.mjs +1 -1
- package/dist/components/Textarea.js +4 -3
- package/dist/components/Textarea.mjs +3 -2
- package/dist/components/TimePicker.d.mts +1 -0
- package/dist/components/TimePicker.d.ts +1 -0
- package/dist/components/TimePicker.js +4 -2
- package/dist/components/TimePicker.mjs +3 -1
- package/dist/components/Timeline.d.mts +5 -1
- package/dist/components/Timeline.d.ts +5 -1
- package/dist/components/Timeline.js +3 -2
- package/dist/components/Timeline.mjs +2 -1
- package/dist/components/Tour.js +4 -2
- package/dist/components/Tour.mjs +3 -1
- package/dist/components/Transfer.d.mts +3 -1
- package/dist/components/Transfer.d.ts +3 -1
- package/dist/components/Transfer.js +3 -2
- package/dist/components/Transfer.mjs +2 -1
- package/dist/components/Tree.d.mts +3 -1
- package/dist/components/Tree.d.ts +3 -1
- package/dist/components/Tree.js +4 -3
- package/dist/components/Tree.mjs +3 -2
- package/dist/components/TreeMapChart.js +4 -4
- package/dist/components/TreeMapChart.mjs +3 -3
- package/dist/components/TreeSelect.d.mts +3 -1
- package/dist/components/TreeSelect.d.ts +3 -1
- package/dist/components/TreeSelect.js +3 -2
- package/dist/components/TreeSelect.mjs +2 -1
- package/dist/components/Upload.js +3 -2
- package/dist/components/Upload.mjs +2 -1
- package/dist/components/VirtualList.js +2 -2
- package/dist/components/VirtualList.mjs +1 -1
- package/dist/components/VirtualTable.d.mts +9 -3
- package/dist/components/VirtualTable.d.ts +9 -3
- package/dist/components/VirtualTable.js +3 -2
- package/dist/components/VirtualTable.mjs +2 -1
- package/dist/index.d.mts +81 -56
- package/dist/index.d.ts +81 -56
- package/dist/index.js +92 -92
- package/dist/index.mjs +93 -93
- package/dist/{types-CHmCMNEM.d.ts → types-0oVwMXtR.d.mts} +1 -1
- package/dist/{types-CHmCMNEM.d.mts → types-0oVwMXtR.d.ts} +1 -1
- package/dist/types-CcgZY0mv.d.mts +80 -0
- package/dist/types-CcgZY0mv.d.ts +80 -0
- package/package.json +6 -6
- package/dist/chunk-4GITZKAH.mjs +0 -153
- package/dist/chunk-4SO4LANY.js +0 -626
- package/dist/chunk-5EVHVZG5.js +0 -131
- package/dist/chunk-5HFHHFQS.mjs +0 -168
- package/dist/chunk-CDRQSKXT.mjs +0 -195
- package/dist/chunk-DLKUDB2R.js +0 -153
- package/dist/chunk-GYQ2DN6Z.mjs +0 -174
- package/dist/chunk-HR5GBE3P.js +0 -168
- package/dist/chunk-S5Y6UHAK.mjs +0 -131
- package/dist/chunk-T7KO6EVK.js +0 -174
- package/dist/chunk-UKGQ7256.js +0 -12
- package/dist/chunk-UQMPEMY7.mjs +0 -12
- package/dist/chunk-VNVGSPBI.mjs +0 -626
- package/dist/{chunk-UMZ3PMUJ.js → chunk-SXHCMZ6U.js} +2 -2
- package/dist/{chunk-BWDQZSAB.mjs → chunk-WTSG7QXK.mjs} +3 -3
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useControlledState
|
|
3
|
+
} from "./chunk-WHYHLUXG.mjs";
|
|
4
|
+
import {
|
|
5
|
+
useTigerConfig
|
|
6
|
+
} from "./chunk-QAIBQHIO.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/TimePicker.tsx
|
|
9
|
+
import {
|
|
10
|
+
timePickerInputWrapperClasses,
|
|
11
|
+
timePickerClearButtonClasses,
|
|
12
|
+
timePickerPanelClasses,
|
|
13
|
+
timePickerRangeHeaderClasses,
|
|
14
|
+
getTimePickerRangeTabButtonClasses,
|
|
15
|
+
timePickerFooterClasses,
|
|
16
|
+
timePickerFooterButtonClasses,
|
|
17
|
+
ClockIconPath,
|
|
18
|
+
TimePickerCloseIconPath
|
|
19
|
+
} from "@expcat/tigercat-core";
|
|
20
|
+
|
|
21
|
+
// src/components/TimePicker/state.ts
|
|
22
|
+
import { useState, useMemo, useRef, useEffect, useCallback } from "react";
|
|
23
|
+
import {
|
|
24
|
+
classNames,
|
|
25
|
+
parseTime,
|
|
26
|
+
formatTime,
|
|
27
|
+
formatTimeDisplayWithLocale,
|
|
28
|
+
getTimePeriodLabels,
|
|
29
|
+
getTimePickerLabels,
|
|
30
|
+
mergeTigerLocale,
|
|
31
|
+
to12HourFormat,
|
|
32
|
+
to24HourFormat,
|
|
33
|
+
isTimeInRange,
|
|
34
|
+
generateHours,
|
|
35
|
+
generateMinutes,
|
|
36
|
+
generateSeconds,
|
|
37
|
+
getCurrentTime,
|
|
38
|
+
timePickerBaseClasses,
|
|
39
|
+
getTimePickerInputClasses,
|
|
40
|
+
getTimePickerIconButtonClasses,
|
|
41
|
+
focusTimePickerOption
|
|
42
|
+
} from "@expcat/tigercat-core";
|
|
43
|
+
function useTimePickerState(allProps) {
|
|
44
|
+
const config = useTigerConfig();
|
|
45
|
+
const {
|
|
46
|
+
size = "md",
|
|
47
|
+
format = "24",
|
|
48
|
+
showSeconds = false,
|
|
49
|
+
hourStep = 1,
|
|
50
|
+
minuteStep = 1,
|
|
51
|
+
secondStep = 1,
|
|
52
|
+
disabled = false,
|
|
53
|
+
readonly = false,
|
|
54
|
+
required = false,
|
|
55
|
+
minTime,
|
|
56
|
+
maxTime,
|
|
57
|
+
clearable = true,
|
|
58
|
+
name,
|
|
59
|
+
id,
|
|
60
|
+
className,
|
|
61
|
+
onClear,
|
|
62
|
+
locale,
|
|
63
|
+
labels: labelsOverrides,
|
|
64
|
+
value,
|
|
65
|
+
defaultValue,
|
|
66
|
+
range,
|
|
67
|
+
...restProps
|
|
68
|
+
} = allProps;
|
|
69
|
+
const divProps = (({ onChange: _omitOnChange, ...rest }) => rest)(restProps);
|
|
70
|
+
const isRangeMode = range === true;
|
|
71
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
72
|
+
const normalizeRangeValue = (input) => {
|
|
73
|
+
if (Array.isArray(input)) return [input[0] ?? null, input[1] ?? null];
|
|
74
|
+
return [null, null];
|
|
75
|
+
};
|
|
76
|
+
const singleControlled = !isRangeMode && value !== void 0 && (typeof value === "string" || value === null) ? value : void 0;
|
|
77
|
+
const singleDefault = (() => {
|
|
78
|
+
const dv = defaultValue;
|
|
79
|
+
if (typeof dv === "string" || dv === null || dv === void 0) return dv ?? null;
|
|
80
|
+
return null;
|
|
81
|
+
})();
|
|
82
|
+
const [singleValue, setSingleValue] = useControlledState(
|
|
83
|
+
singleControlled,
|
|
84
|
+
singleDefault,
|
|
85
|
+
allProps.onChange
|
|
86
|
+
);
|
|
87
|
+
const [rangeValue, setRangeValue] = useControlledState(
|
|
88
|
+
isRangeMode && value !== void 0 ? normalizeRangeValue(value) : void 0,
|
|
89
|
+
normalizeRangeValue(defaultValue),
|
|
90
|
+
allProps.onChange
|
|
91
|
+
);
|
|
92
|
+
const [activePart, setActivePart] = useState("start");
|
|
93
|
+
const panelRef = useRef(null);
|
|
94
|
+
const inputWrapperRef = useRef(null);
|
|
95
|
+
const inputRef = useRef(null);
|
|
96
|
+
const currentSingleValue = isRangeMode ? null : singleValue;
|
|
97
|
+
const currentRangeValue = isRangeMode ? rangeValue : [null, null];
|
|
98
|
+
const activeValue = isRangeMode ? currentRangeValue[activePart === "start" ? 0 : 1] : currentSingleValue;
|
|
99
|
+
const parsedTime = parseTime(activeValue);
|
|
100
|
+
const [selectedHours, setSelectedHours] = useState(parsedTime?.hours ?? 0);
|
|
101
|
+
const [selectedMinutes, setSelectedMinutes] = useState(parsedTime?.minutes ?? 0);
|
|
102
|
+
const [selectedSeconds, setSelectedSeconds] = useState(parsedTime?.seconds ?? 0);
|
|
103
|
+
const [selectedPeriod, setSelectedPeriod] = useState("AM");
|
|
104
|
+
const localeOverride = useMemo(() => typeof locale === "string" ? { locale } : locale, [locale]);
|
|
105
|
+
const mergedLocale = useMemo(
|
|
106
|
+
() => mergeTigerLocale(config.locale, localeOverride),
|
|
107
|
+
[config.locale, localeOverride]
|
|
108
|
+
);
|
|
109
|
+
const localeCode = mergedLocale?.locale;
|
|
110
|
+
const syncFromActiveValue = useCallback(() => {
|
|
111
|
+
const parsed = parseTime(activeValue);
|
|
112
|
+
if (!parsed) return;
|
|
113
|
+
setSelectedHours(parsed.hours);
|
|
114
|
+
setSelectedMinutes(parsed.minutes);
|
|
115
|
+
setSelectedSeconds(parsed.seconds);
|
|
116
|
+
if (format === "12") {
|
|
117
|
+
const { period } = to12HourFormat(parsed.hours);
|
|
118
|
+
setSelectedPeriod(period);
|
|
119
|
+
}
|
|
120
|
+
}, [activeValue, format]);
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
syncFromActiveValue();
|
|
123
|
+
}, [syncFromActiveValue]);
|
|
124
|
+
const labels = useMemo(
|
|
125
|
+
() => getTimePickerLabels(mergedLocale, labelsOverrides),
|
|
126
|
+
[mergedLocale, labelsOverrides]
|
|
127
|
+
);
|
|
128
|
+
const placeholder = allProps.placeholder ?? (isRangeMode ? labels.selectTimeRange : labels.selectTime);
|
|
129
|
+
const periodLabels = useMemo(() => getTimePeriodLabels(localeCode), [localeCode]);
|
|
130
|
+
const displayValue = (() => {
|
|
131
|
+
if (!isRangeMode) {
|
|
132
|
+
return parsedTime ? formatTimeDisplayWithLocale(
|
|
133
|
+
parsedTime.hours,
|
|
134
|
+
parsedTime.minutes,
|
|
135
|
+
parsedTime.seconds,
|
|
136
|
+
format,
|
|
137
|
+
showSeconds,
|
|
138
|
+
localeCode
|
|
139
|
+
) : "";
|
|
140
|
+
}
|
|
141
|
+
const toDisplay = (timeStr) => {
|
|
142
|
+
const parsed = parseTime(timeStr);
|
|
143
|
+
if (!parsed) return "";
|
|
144
|
+
return formatTimeDisplayWithLocale(
|
|
145
|
+
parsed.hours,
|
|
146
|
+
parsed.minutes,
|
|
147
|
+
parsed.seconds,
|
|
148
|
+
format,
|
|
149
|
+
showSeconds,
|
|
150
|
+
localeCode
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
const start = toDisplay(currentRangeValue[0]);
|
|
154
|
+
const end = toDisplay(currentRangeValue[1]);
|
|
155
|
+
if (!start && !end) return "";
|
|
156
|
+
return `${start} - ${end}`;
|
|
157
|
+
})();
|
|
158
|
+
const showClearButton = (() => {
|
|
159
|
+
if (!clearable || disabled || readonly) return false;
|
|
160
|
+
if (!isRangeMode) return currentSingleValue !== null;
|
|
161
|
+
return currentRangeValue[0] !== null || currentRangeValue[1] !== null;
|
|
162
|
+
})();
|
|
163
|
+
const hoursList = useMemo(() => generateHours(hourStep, format), [hourStep, format]);
|
|
164
|
+
const minutesList = useMemo(() => generateMinutes(minuteStep), [minuteStep]);
|
|
165
|
+
const secondsList = useMemo(() => generateSeconds(secondStep), [secondStep]);
|
|
166
|
+
const togglePanel = () => {
|
|
167
|
+
if (!disabled && !readonly) {
|
|
168
|
+
if (isOpen) {
|
|
169
|
+
closePanel();
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
setIsOpen(true);
|
|
173
|
+
syncFromActiveValue();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
const closePanel = () => {
|
|
177
|
+
setIsOpen(false);
|
|
178
|
+
inputRef.current?.focus();
|
|
179
|
+
};
|
|
180
|
+
const focusOptionInUnit = (unit, action) => {
|
|
181
|
+
focusTimePickerOption(panelRef.current, unit, action);
|
|
182
|
+
};
|
|
183
|
+
const handlePanelKeyDown = (event) => {
|
|
184
|
+
if (event.key === "Escape") {
|
|
185
|
+
event.preventDefault();
|
|
186
|
+
closePanel();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const active = document.activeElement;
|
|
190
|
+
const unit = active?.getAttribute("data-tiger-timepicker-unit");
|
|
191
|
+
if (!unit) return;
|
|
192
|
+
if (event.key === "ArrowUp") {
|
|
193
|
+
event.preventDefault();
|
|
194
|
+
focusOptionInUnit(unit, "prev");
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (event.key === "ArrowDown") {
|
|
198
|
+
event.preventDefault();
|
|
199
|
+
focusOptionInUnit(unit, "next");
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (event.key === "Home") {
|
|
203
|
+
event.preventDefault();
|
|
204
|
+
focusOptionInUnit(unit, "first");
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (event.key === "End") {
|
|
208
|
+
event.preventDefault();
|
|
209
|
+
focusOptionInUnit(unit, "last");
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
213
|
+
const el = document.activeElement;
|
|
214
|
+
if (el && el.tagName === "BUTTON" && !el.disabled) {
|
|
215
|
+
event.preventDefault();
|
|
216
|
+
el.click();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
const selectHour = (hour) => {
|
|
221
|
+
const hours24 = format === "12" ? to24HourFormat(hour, selectedPeriod) : hour;
|
|
222
|
+
setSelectedHours(hours24);
|
|
223
|
+
updateTime(hours24, selectedMinutes, selectedSeconds);
|
|
224
|
+
};
|
|
225
|
+
const selectMinute = (minute) => {
|
|
226
|
+
setSelectedMinutes(minute);
|
|
227
|
+
updateTime(selectedHours, minute, selectedSeconds);
|
|
228
|
+
};
|
|
229
|
+
const selectSecond = (second) => {
|
|
230
|
+
setSelectedSeconds(second);
|
|
231
|
+
updateTime(selectedHours, selectedMinutes, second);
|
|
232
|
+
};
|
|
233
|
+
const selectPeriod = (period) => {
|
|
234
|
+
setSelectedPeriod(period);
|
|
235
|
+
const { hours: hours12 } = to12HourFormat(selectedHours);
|
|
236
|
+
const hours24 = to24HourFormat(hours12, period);
|
|
237
|
+
setSelectedHours(hours24);
|
|
238
|
+
updateTime(hours24, selectedMinutes, selectedSeconds);
|
|
239
|
+
};
|
|
240
|
+
const updateTime = (hours, minutes, seconds) => {
|
|
241
|
+
if (!isTimeInRange(hours, minutes, minTime, maxTime, seconds)) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
let timeString = formatTime(hours, minutes, seconds, showSeconds);
|
|
245
|
+
if (!isRangeMode) {
|
|
246
|
+
setSingleValue(timeString);
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const index = activePart === "start" ? 0 : 1;
|
|
250
|
+
const parsedStart = parseTime(currentRangeValue[0]);
|
|
251
|
+
const parsedEnd = parseTime(currentRangeValue[1]);
|
|
252
|
+
const candidateSeconds = hours * 3600 + minutes * 60 + seconds;
|
|
253
|
+
const startSeconds = parsedStart ? parsedStart.hours * 3600 + parsedStart.minutes * 60 + parsedStart.seconds : null;
|
|
254
|
+
const endSeconds = parsedEnd ? parsedEnd.hours * 3600 + parsedEnd.minutes * 60 + parsedEnd.seconds : null;
|
|
255
|
+
if (activePart === "end" && parsedStart && startSeconds !== null) {
|
|
256
|
+
if (candidateSeconds < startSeconds) {
|
|
257
|
+
timeString = formatTime(
|
|
258
|
+
parsedStart.hours,
|
|
259
|
+
parsedStart.minutes,
|
|
260
|
+
parsedStart.seconds,
|
|
261
|
+
showSeconds
|
|
262
|
+
);
|
|
263
|
+
setSelectedHours(parsedStart.hours);
|
|
264
|
+
setSelectedMinutes(parsedStart.minutes);
|
|
265
|
+
setSelectedSeconds(parsedStart.seconds);
|
|
266
|
+
if (format === "12") {
|
|
267
|
+
const { period } = to12HourFormat(parsedStart.hours);
|
|
268
|
+
setSelectedPeriod(period);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const nextRange = [currentRangeValue[0], currentRangeValue[1]];
|
|
273
|
+
nextRange[index] = timeString;
|
|
274
|
+
if (activePart === "start" && endSeconds !== null && candidateSeconds > endSeconds) {
|
|
275
|
+
nextRange[1] = timeString;
|
|
276
|
+
}
|
|
277
|
+
setRangeValue(nextRange);
|
|
278
|
+
if (activePart === "start" && nextRange[1] === null) {
|
|
279
|
+
setActivePart("end");
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const clearTime = (event) => {
|
|
283
|
+
event.stopPropagation();
|
|
284
|
+
if (!isRangeMode) {
|
|
285
|
+
setSingleValue(null);
|
|
286
|
+
onClear?.();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
setRangeValue([null, null]);
|
|
290
|
+
onClear?.();
|
|
291
|
+
};
|
|
292
|
+
const setNow = () => {
|
|
293
|
+
const now = getCurrentTime(showSeconds);
|
|
294
|
+
const parsed = parseTime(now);
|
|
295
|
+
if (parsed) {
|
|
296
|
+
setSelectedHours(parsed.hours);
|
|
297
|
+
setSelectedMinutes(parsed.minutes);
|
|
298
|
+
setSelectedSeconds(parsed.seconds);
|
|
299
|
+
if (format === "12") {
|
|
300
|
+
const { period } = to12HourFormat(parsed.hours);
|
|
301
|
+
setSelectedPeriod(period);
|
|
302
|
+
}
|
|
303
|
+
updateTime(parsed.hours, parsed.minutes, parsed.seconds);
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const isHourDisabled = (hour) => {
|
|
307
|
+
const hours24 = format === "12" ? to24HourFormat(hour, selectedPeriod) : hour;
|
|
308
|
+
return !isTimeInRange(hours24, selectedMinutes, minTime, maxTime, selectedSeconds);
|
|
309
|
+
};
|
|
310
|
+
const isMinuteDisabled = (minute) => {
|
|
311
|
+
return !isTimeInRange(selectedHours, minute, minTime, maxTime, selectedSeconds);
|
|
312
|
+
};
|
|
313
|
+
const isSecondDisabled = (second) => {
|
|
314
|
+
return !isTimeInRange(selectedHours, selectedMinutes, minTime, maxTime, second);
|
|
315
|
+
};
|
|
316
|
+
const handleInputClick = () => {
|
|
317
|
+
togglePanel();
|
|
318
|
+
};
|
|
319
|
+
useEffect(() => {
|
|
320
|
+
const handleClickOutside = (event) => {
|
|
321
|
+
if (panelRef.current && inputWrapperRef.current && !panelRef.current.contains(event.target) && !inputWrapperRef.current.contains(event.target)) {
|
|
322
|
+
closePanel();
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
if (isOpen) {
|
|
326
|
+
document.addEventListener("click", handleClickOutside);
|
|
327
|
+
return () => {
|
|
328
|
+
document.removeEventListener("click", handleClickOutside);
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
}, [isOpen]);
|
|
332
|
+
useEffect(() => {
|
|
333
|
+
if (!isOpen) return;
|
|
334
|
+
const panel = panelRef.current;
|
|
335
|
+
if (!panel) return;
|
|
336
|
+
const focusTimer = window.setTimeout(() => {
|
|
337
|
+
const selectedHour = panel.querySelector(
|
|
338
|
+
'button[data-tiger-timepicker-unit="hour"][aria-selected="true"]:not([disabled])'
|
|
339
|
+
);
|
|
340
|
+
if (selectedHour) {
|
|
341
|
+
selectedHour.focus();
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
const firstHour = panel.querySelector(
|
|
345
|
+
'button[data-tiger-timepicker-unit="hour"]:not([disabled])'
|
|
346
|
+
);
|
|
347
|
+
firstHour?.focus();
|
|
348
|
+
}, 0);
|
|
349
|
+
return () => window.clearTimeout(focusTimer);
|
|
350
|
+
}, [isOpen, activePart]);
|
|
351
|
+
const inputClasses = getTimePickerInputClasses(size, disabled || readonly);
|
|
352
|
+
const iconButtonClasses = getTimePickerIconButtonClasses(size);
|
|
353
|
+
return {
|
|
354
|
+
panelRef,
|
|
355
|
+
inputWrapperRef,
|
|
356
|
+
inputRef,
|
|
357
|
+
isOpen,
|
|
358
|
+
activePart,
|
|
359
|
+
setActivePart,
|
|
360
|
+
isRangeMode,
|
|
361
|
+
placeholder,
|
|
362
|
+
disabled,
|
|
363
|
+
readonly,
|
|
364
|
+
required,
|
|
365
|
+
name,
|
|
366
|
+
id,
|
|
367
|
+
format,
|
|
368
|
+
showSeconds,
|
|
369
|
+
locale: mergedLocale,
|
|
370
|
+
labelsOverrides,
|
|
371
|
+
containerClasses: classNames(timePickerBaseClasses, className),
|
|
372
|
+
divProps,
|
|
373
|
+
displayValue,
|
|
374
|
+
showClearButton,
|
|
375
|
+
inputClasses,
|
|
376
|
+
iconButtonClasses,
|
|
377
|
+
labels,
|
|
378
|
+
periodLabels,
|
|
379
|
+
hoursList,
|
|
380
|
+
minutesList,
|
|
381
|
+
secondsList,
|
|
382
|
+
selectedHours,
|
|
383
|
+
selectedMinutes,
|
|
384
|
+
selectedSeconds,
|
|
385
|
+
selectedPeriod,
|
|
386
|
+
togglePanel,
|
|
387
|
+
closePanel,
|
|
388
|
+
handleInputClick,
|
|
389
|
+
clearTime,
|
|
390
|
+
setNow,
|
|
391
|
+
handlePanelKeyDown,
|
|
392
|
+
selectHour,
|
|
393
|
+
selectMinute,
|
|
394
|
+
selectSecond,
|
|
395
|
+
selectPeriod,
|
|
396
|
+
isHourDisabled,
|
|
397
|
+
isMinuteDisabled,
|
|
398
|
+
isSecondDisabled
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// src/components/TimePicker/render-mobile.tsx
|
|
403
|
+
import {
|
|
404
|
+
timePickerMobileWheelClasses,
|
|
405
|
+
timePickerMobileWheelSelectClasses,
|
|
406
|
+
to12HourFormat as to12HourFormat2,
|
|
407
|
+
padTwo
|
|
408
|
+
} from "@expcat/tigercat-core";
|
|
409
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
410
|
+
function renderTimePickerMobile(ctx) {
|
|
411
|
+
return /* @__PURE__ */ jsxs("div", { className: timePickerMobileWheelClasses, children: [
|
|
412
|
+
/* @__PURE__ */ jsx(
|
|
413
|
+
"select",
|
|
414
|
+
{
|
|
415
|
+
className: timePickerMobileWheelSelectClasses,
|
|
416
|
+
value: ctx.format === "12" ? to12HourFormat2(ctx.selectedHours).hours : ctx.selectedHours,
|
|
417
|
+
"aria-label": ctx.labels.hour,
|
|
418
|
+
onChange: (event) => ctx.selectHour(Number(event.target.value)),
|
|
419
|
+
children: ctx.hoursList.map((hour) => /* @__PURE__ */ jsx("option", { value: hour, disabled: ctx.isHourDisabled(hour), children: padTwo(hour) }, hour))
|
|
420
|
+
}
|
|
421
|
+
),
|
|
422
|
+
/* @__PURE__ */ jsx(
|
|
423
|
+
"select",
|
|
424
|
+
{
|
|
425
|
+
className: timePickerMobileWheelSelectClasses,
|
|
426
|
+
value: ctx.selectedMinutes,
|
|
427
|
+
"aria-label": ctx.labels.minute,
|
|
428
|
+
onChange: (event) => ctx.selectMinute(Number(event.target.value)),
|
|
429
|
+
children: ctx.minutesList.map((minute) => /* @__PURE__ */ jsx("option", { value: minute, disabled: ctx.isMinuteDisabled(minute), children: padTwo(minute) }, minute))
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
ctx.showSeconds && /* @__PURE__ */ jsx(
|
|
433
|
+
"select",
|
|
434
|
+
{
|
|
435
|
+
className: timePickerMobileWheelSelectClasses,
|
|
436
|
+
value: ctx.selectedSeconds,
|
|
437
|
+
"aria-label": ctx.labels.second,
|
|
438
|
+
onChange: (event) => ctx.selectSecond(Number(event.target.value)),
|
|
439
|
+
children: ctx.secondsList.map((second) => /* @__PURE__ */ jsx("option", { value: second, disabled: ctx.isSecondDisabled(second), children: padTwo(second) }, second))
|
|
440
|
+
}
|
|
441
|
+
),
|
|
442
|
+
ctx.format === "12" && /* @__PURE__ */ jsxs(
|
|
443
|
+
"select",
|
|
444
|
+
{
|
|
445
|
+
className: timePickerMobileWheelSelectClasses,
|
|
446
|
+
value: ctx.selectedPeriod,
|
|
447
|
+
"aria-label": "Period",
|
|
448
|
+
onChange: (event) => ctx.selectPeriod(event.target.value),
|
|
449
|
+
children: [
|
|
450
|
+
/* @__PURE__ */ jsx("option", { value: "AM", children: ctx.periodLabels.am }),
|
|
451
|
+
/* @__PURE__ */ jsx("option", { value: "PM", children: ctx.periodLabels.pm })
|
|
452
|
+
]
|
|
453
|
+
}
|
|
454
|
+
)
|
|
455
|
+
] });
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// src/components/TimePicker/render-desktop.tsx
|
|
459
|
+
import {
|
|
460
|
+
timePickerDesktopPanelContentClasses,
|
|
461
|
+
timePickerColumnClasses,
|
|
462
|
+
timePickerColumnHeaderClasses,
|
|
463
|
+
timePickerColumnListClasses,
|
|
464
|
+
getTimePickerItemClasses,
|
|
465
|
+
getTimePickerPeriodButtonClasses,
|
|
466
|
+
getTimePickerOptionAriaLabel,
|
|
467
|
+
to24HourFormat as to24HourFormat2,
|
|
468
|
+
padTwo as padTwo2
|
|
469
|
+
} from "@expcat/tigercat-core";
|
|
470
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
471
|
+
function renderTimePickerDesktop(ctx) {
|
|
472
|
+
return /* @__PURE__ */ jsxs2("div", { className: timePickerDesktopPanelContentClasses, children: [
|
|
473
|
+
/* @__PURE__ */ jsxs2("div", { className: timePickerColumnClasses, children: [
|
|
474
|
+
/* @__PURE__ */ jsx2("div", { className: timePickerColumnHeaderClasses, children: ctx.labels.hour }),
|
|
475
|
+
/* @__PURE__ */ jsx2("div", { className: timePickerColumnListClasses, children: ctx.hoursList.map((hour) => {
|
|
476
|
+
const hours24 = ctx.format === "12" ? to24HourFormat2(hour, ctx.selectedPeriod) : hour;
|
|
477
|
+
const isSelected = ctx.selectedHours === hours24;
|
|
478
|
+
const isDisabled = ctx.isHourDisabled(hour);
|
|
479
|
+
return /* @__PURE__ */ jsx2(
|
|
480
|
+
"button",
|
|
481
|
+
{
|
|
482
|
+
type: "button",
|
|
483
|
+
className: getTimePickerItemClasses(isSelected, isDisabled),
|
|
484
|
+
disabled: isDisabled,
|
|
485
|
+
onClick: () => ctx.selectHour(hour),
|
|
486
|
+
"data-tiger-timepicker-unit": "hour",
|
|
487
|
+
"aria-label": getTimePickerOptionAriaLabel(
|
|
488
|
+
hour,
|
|
489
|
+
"hour",
|
|
490
|
+
ctx.locale,
|
|
491
|
+
ctx.labelsOverrides
|
|
492
|
+
),
|
|
493
|
+
"aria-selected": isSelected,
|
|
494
|
+
children: padTwo2(hour)
|
|
495
|
+
},
|
|
496
|
+
hour
|
|
497
|
+
);
|
|
498
|
+
}) })
|
|
499
|
+
] }),
|
|
500
|
+
/* @__PURE__ */ jsxs2("div", { className: timePickerColumnClasses, children: [
|
|
501
|
+
/* @__PURE__ */ jsx2("div", { className: timePickerColumnHeaderClasses, children: ctx.labels.minute }),
|
|
502
|
+
/* @__PURE__ */ jsx2("div", { className: timePickerColumnListClasses, children: ctx.minutesList.map((minute) => {
|
|
503
|
+
const isSelected = ctx.selectedMinutes === minute;
|
|
504
|
+
const isDisabled = ctx.isMinuteDisabled(minute);
|
|
505
|
+
return /* @__PURE__ */ jsx2(
|
|
506
|
+
"button",
|
|
507
|
+
{
|
|
508
|
+
type: "button",
|
|
509
|
+
className: getTimePickerItemClasses(isSelected, isDisabled),
|
|
510
|
+
disabled: isDisabled,
|
|
511
|
+
onClick: () => ctx.selectMinute(minute),
|
|
512
|
+
"data-tiger-timepicker-unit": "minute",
|
|
513
|
+
"aria-label": getTimePickerOptionAriaLabel(
|
|
514
|
+
minute,
|
|
515
|
+
"minute",
|
|
516
|
+
ctx.locale,
|
|
517
|
+
ctx.labelsOverrides
|
|
518
|
+
),
|
|
519
|
+
"aria-selected": isSelected,
|
|
520
|
+
children: padTwo2(minute)
|
|
521
|
+
},
|
|
522
|
+
minute
|
|
523
|
+
);
|
|
524
|
+
}) })
|
|
525
|
+
] }),
|
|
526
|
+
ctx.showSeconds && /* @__PURE__ */ jsxs2("div", { className: timePickerColumnClasses, children: [
|
|
527
|
+
/* @__PURE__ */ jsx2("div", { className: timePickerColumnHeaderClasses, children: ctx.labels.second }),
|
|
528
|
+
/* @__PURE__ */ jsx2("div", { className: timePickerColumnListClasses, children: ctx.secondsList.map((second) => {
|
|
529
|
+
const isSelected = ctx.selectedSeconds === second;
|
|
530
|
+
const isDisabled = ctx.isSecondDisabled(second);
|
|
531
|
+
return /* @__PURE__ */ jsx2(
|
|
532
|
+
"button",
|
|
533
|
+
{
|
|
534
|
+
type: "button",
|
|
535
|
+
className: getTimePickerItemClasses(isSelected, isDisabled),
|
|
536
|
+
disabled: isDisabled,
|
|
537
|
+
onClick: () => ctx.selectSecond(second),
|
|
538
|
+
"data-tiger-timepicker-unit": "second",
|
|
539
|
+
"aria-label": getTimePickerOptionAriaLabel(
|
|
540
|
+
second,
|
|
541
|
+
"second",
|
|
542
|
+
ctx.locale,
|
|
543
|
+
ctx.labelsOverrides
|
|
544
|
+
),
|
|
545
|
+
"aria-selected": isSelected,
|
|
546
|
+
children: padTwo2(second)
|
|
547
|
+
},
|
|
548
|
+
second
|
|
549
|
+
);
|
|
550
|
+
}) })
|
|
551
|
+
] }),
|
|
552
|
+
ctx.format === "12" && /* @__PURE__ */ jsxs2("div", { className: timePickerColumnClasses, children: [
|
|
553
|
+
/* @__PURE__ */ jsx2("div", { className: timePickerColumnHeaderClasses, children: " " }),
|
|
554
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col", children: [
|
|
555
|
+
/* @__PURE__ */ jsx2(
|
|
556
|
+
"button",
|
|
557
|
+
{
|
|
558
|
+
type: "button",
|
|
559
|
+
className: getTimePickerPeriodButtonClasses(ctx.selectedPeriod === "AM"),
|
|
560
|
+
onClick: () => ctx.selectPeriod("AM"),
|
|
561
|
+
"data-tiger-timepicker-unit": "period",
|
|
562
|
+
"aria-label": ctx.periodLabels.am,
|
|
563
|
+
"aria-selected": ctx.selectedPeriod === "AM",
|
|
564
|
+
children: ctx.periodLabels.am
|
|
565
|
+
}
|
|
566
|
+
),
|
|
567
|
+
/* @__PURE__ */ jsx2(
|
|
568
|
+
"button",
|
|
569
|
+
{
|
|
570
|
+
type: "button",
|
|
571
|
+
className: getTimePickerPeriodButtonClasses(ctx.selectedPeriod === "PM"),
|
|
572
|
+
onClick: () => ctx.selectPeriod("PM"),
|
|
573
|
+
"data-tiger-timepicker-unit": "period",
|
|
574
|
+
"aria-label": ctx.periodLabels.pm,
|
|
575
|
+
"aria-selected": ctx.selectedPeriod === "PM",
|
|
576
|
+
children: ctx.periodLabels.pm
|
|
577
|
+
}
|
|
578
|
+
)
|
|
579
|
+
] })
|
|
580
|
+
] })
|
|
581
|
+
] });
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
// src/components/TimePicker/icons.tsx
|
|
585
|
+
import { icon20ViewBox } from "@expcat/tigercat-core";
|
|
586
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
587
|
+
var Icon = ({ path, className }) => /* @__PURE__ */ jsx3(
|
|
588
|
+
"svg",
|
|
589
|
+
{
|
|
590
|
+
className,
|
|
591
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
592
|
+
viewBox: icon20ViewBox,
|
|
593
|
+
fill: "currentColor",
|
|
594
|
+
children: /* @__PURE__ */ jsx3("path", { fillRule: "evenodd", d: path, clipRule: "evenodd" })
|
|
595
|
+
}
|
|
596
|
+
);
|
|
597
|
+
|
|
598
|
+
// src/components/TimePicker.tsx
|
|
599
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
600
|
+
var TimePicker = (allProps) => {
|
|
601
|
+
const ctx = useTimePickerState(allProps);
|
|
602
|
+
return /* @__PURE__ */ jsxs3("div", { className: ctx.containerClasses, ...ctx.divProps, children: [
|
|
603
|
+
/* @__PURE__ */ jsxs3("div", { ref: ctx.inputWrapperRef, className: timePickerInputWrapperClasses, children: [
|
|
604
|
+
/* @__PURE__ */ jsx4(
|
|
605
|
+
"input",
|
|
606
|
+
{
|
|
607
|
+
ref: ctx.inputRef,
|
|
608
|
+
type: "text",
|
|
609
|
+
className: ctx.inputClasses,
|
|
610
|
+
value: ctx.displayValue,
|
|
611
|
+
placeholder: ctx.placeholder,
|
|
612
|
+
disabled: ctx.disabled,
|
|
613
|
+
readOnly: true,
|
|
614
|
+
required: ctx.required,
|
|
615
|
+
name: ctx.name,
|
|
616
|
+
id: ctx.id,
|
|
617
|
+
onClick: ctx.handleInputClick,
|
|
618
|
+
"aria-label": ctx.placeholder || ctx.labels.selectTime
|
|
619
|
+
}
|
|
620
|
+
),
|
|
621
|
+
ctx.showClearButton && /* @__PURE__ */ jsx4(
|
|
622
|
+
"button",
|
|
623
|
+
{
|
|
624
|
+
type: "button",
|
|
625
|
+
className: timePickerClearButtonClasses,
|
|
626
|
+
onClick: ctx.clearTime,
|
|
627
|
+
"aria-label": ctx.labels.clear,
|
|
628
|
+
children: /* @__PURE__ */ jsx4(Icon, { path: TimePickerCloseIconPath, className: "w-4 h-4" })
|
|
629
|
+
}
|
|
630
|
+
),
|
|
631
|
+
/* @__PURE__ */ jsx4(
|
|
632
|
+
"button",
|
|
633
|
+
{
|
|
634
|
+
type: "button",
|
|
635
|
+
className: ctx.iconButtonClasses,
|
|
636
|
+
disabled: ctx.disabled || ctx.readonly,
|
|
637
|
+
onClick: ctx.togglePanel,
|
|
638
|
+
"aria-label": ctx.labels.toggle,
|
|
639
|
+
children: /* @__PURE__ */ jsx4(Icon, { path: ClockIconPath, className: "w-5 h-5" })
|
|
640
|
+
}
|
|
641
|
+
)
|
|
642
|
+
] }),
|
|
643
|
+
ctx.isOpen && /* @__PURE__ */ jsxs3(
|
|
644
|
+
"div",
|
|
645
|
+
{
|
|
646
|
+
ref: ctx.panelRef,
|
|
647
|
+
className: timePickerPanelClasses,
|
|
648
|
+
role: "dialog",
|
|
649
|
+
"aria-label": ctx.labels.dialog,
|
|
650
|
+
onKeyDown: ctx.handlePanelKeyDown,
|
|
651
|
+
children: [
|
|
652
|
+
ctx.isRangeMode && /* @__PURE__ */ jsxs3("div", { className: timePickerRangeHeaderClasses, children: [
|
|
653
|
+
/* @__PURE__ */ jsx4(
|
|
654
|
+
"button",
|
|
655
|
+
{
|
|
656
|
+
type: "button",
|
|
657
|
+
className: getTimePickerRangeTabButtonClasses(ctx.activePart === "start"),
|
|
658
|
+
onClick: () => ctx.setActivePart("start"),
|
|
659
|
+
"aria-label": ctx.labels.start,
|
|
660
|
+
"aria-selected": ctx.activePart === "start",
|
|
661
|
+
children: ctx.labels.start
|
|
662
|
+
}
|
|
663
|
+
),
|
|
664
|
+
/* @__PURE__ */ jsx4(
|
|
665
|
+
"button",
|
|
666
|
+
{
|
|
667
|
+
type: "button",
|
|
668
|
+
className: getTimePickerRangeTabButtonClasses(ctx.activePart === "end"),
|
|
669
|
+
onClick: () => ctx.setActivePart("end"),
|
|
670
|
+
"aria-label": ctx.labels.end,
|
|
671
|
+
"aria-selected": ctx.activePart === "end",
|
|
672
|
+
children: ctx.labels.end
|
|
673
|
+
}
|
|
674
|
+
)
|
|
675
|
+
] }),
|
|
676
|
+
renderTimePickerMobile(ctx),
|
|
677
|
+
renderTimePickerDesktop(ctx),
|
|
678
|
+
/* @__PURE__ */ jsxs3("div", { className: timePickerFooterClasses, children: [
|
|
679
|
+
/* @__PURE__ */ jsx4("button", { type: "button", className: timePickerFooterButtonClasses, onClick: ctx.setNow, children: ctx.labels.now }),
|
|
680
|
+
/* @__PURE__ */ jsx4(
|
|
681
|
+
"button",
|
|
682
|
+
{
|
|
683
|
+
type: "button",
|
|
684
|
+
className: timePickerFooterButtonClasses,
|
|
685
|
+
onClick: ctx.closePanel,
|
|
686
|
+
children: ctx.labels.ok
|
|
687
|
+
}
|
|
688
|
+
)
|
|
689
|
+
] })
|
|
690
|
+
]
|
|
691
|
+
}
|
|
692
|
+
)
|
|
693
|
+
] });
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
export {
|
|
697
|
+
TimePicker
|
|
698
|
+
};
|