@dsfrkit/react 0.1.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/README.md +115 -0
- package/dist/artwork-B3QGyilb.d.mts +156 -0
- package/dist/artwork-B3QGyilb.d.ts +156 -0
- package/dist/artwork-CW2iQ_23.d.mts +171 -0
- package/dist/artwork-CW2iQ_23.d.ts +171 -0
- package/dist/chunk-23I7BDV6.mjs +39 -0
- package/dist/chunk-24DYKVTR.mjs +144 -0
- package/dist/chunk-2BB27XUW.mjs +65 -0
- package/dist/chunk-2BJMVHYD.mjs +137 -0
- package/dist/chunk-2EW2GCGT.mjs +137 -0
- package/dist/chunk-2HZIFFGX.mjs +144 -0
- package/dist/chunk-2LHWW7HN.mjs +114 -0
- package/dist/chunk-2LXQNL5D.mjs +113 -0
- package/dist/chunk-2NH3AUHW.mjs +79 -0
- package/dist/chunk-2PJ4EU56.mjs +203 -0
- package/dist/chunk-2QH4KMWT.mjs +8 -0
- package/dist/chunk-2RNER4KC.mjs +144 -0
- package/dist/chunk-2U3S73BF.mjs +8 -0
- package/dist/chunk-2V722J6M.mjs +8 -0
- package/dist/chunk-37CO3FHD.mjs +125 -0
- package/dist/chunk-3BTPUF5K.mjs +144 -0
- package/dist/chunk-3GBCT2U3.mjs +156 -0
- package/dist/chunk-3HHH4GMH.mjs +110 -0
- package/dist/chunk-3IMYMASJ.mjs +194 -0
- package/dist/chunk-3J555ZVB.mjs +122 -0
- package/dist/chunk-3JFXRCOL.mjs +1 -0
- package/dist/chunk-3JUY36HV.mjs +127 -0
- package/dist/chunk-3THML6BJ.mjs +22 -0
- package/dist/chunk-3VPGNSKX.mjs +834 -0
- package/dist/chunk-3YSDF6VX.mjs +221 -0
- package/dist/chunk-43XOENR2.mjs +53 -0
- package/dist/chunk-43ZFDH2Q.mjs +122 -0
- package/dist/chunk-44UGQHBU.mjs +166 -0
- package/dist/chunk-474LZSO7.mjs +122 -0
- package/dist/chunk-4KCVV4LR.mjs +156 -0
- package/dist/chunk-4LGWCPN4.mjs +92 -0
- package/dist/chunk-4LVHKND5.mjs +129 -0
- package/dist/chunk-4NU2XZIG.mjs +137 -0
- package/dist/chunk-4PA73RZ4.mjs +221 -0
- package/dist/chunk-4UBXW6O2.mjs +63 -0
- package/dist/chunk-4ZFM6M7C.mjs +127 -0
- package/dist/chunk-52BJN7DC.mjs +504 -0
- package/dist/chunk-53M2BTB5.mjs +22 -0
- package/dist/chunk-552MR22F.mjs +93 -0
- package/dist/chunk-57DNFR54.mjs +92 -0
- package/dist/chunk-5FHDLYYI.mjs +200 -0
- package/dist/chunk-5I2Y5M2K.mjs +514 -0
- package/dist/chunk-5IJLRY6P.mjs +504 -0
- package/dist/chunk-5IQADW3H.mjs +82 -0
- package/dist/chunk-5MEHDSPX.mjs +137 -0
- package/dist/chunk-5OYV672H.mjs +122 -0
- package/dist/chunk-5TQ2XLQH.mjs +91 -0
- package/dist/chunk-5WNMRXFG.mjs +137 -0
- package/dist/chunk-5ZBE6TNA.mjs +137 -0
- package/dist/chunk-5ZNBGCHW.mjs +105 -0
- package/dist/chunk-6AVQRAR3.mjs +729 -0
- package/dist/chunk-6BGCPIW7.mjs +127 -0
- package/dist/chunk-6BOEMNY4.mjs +94 -0
- package/dist/chunk-6FCPWBF2.mjs +137 -0
- package/dist/chunk-6HDE47EI.mjs +141 -0
- package/dist/chunk-6OSSG7EX.mjs +291 -0
- package/dist/chunk-6U5FC3RG.mjs +85 -0
- package/dist/chunk-6XZ4GBJ6.mjs +83 -0
- package/dist/chunk-6YGKYFPL.mjs +137 -0
- package/dist/chunk-6Z77GLN6.mjs +72 -0
- package/dist/chunk-6ZP4SKO6.mjs +144 -0
- package/dist/chunk-6ZWOOE2S.mjs +60 -0
- package/dist/chunk-762QFXXR.mjs +141 -0
- package/dist/chunk-76L74JUY.mjs +115 -0
- package/dist/chunk-76VC5YPU.mjs +113 -0
- package/dist/chunk-7BWEILU6.mjs +95 -0
- package/dist/chunk-7DGUHXUB.mjs +156 -0
- package/dist/chunk-7DTPT7EQ.mjs +220 -0
- package/dist/chunk-7FDDD5IV.mjs +203 -0
- package/dist/chunk-7H6WDKNO.mjs +141 -0
- package/dist/chunk-7KDRU2XY.mjs +145 -0
- package/dist/chunk-7QZTUZPL.mjs +137 -0
- package/dist/chunk-7REZ747L.mjs +122 -0
- package/dist/chunk-7RV4WZVM.mjs +203 -0
- package/dist/chunk-7VT2ZJBR.mjs +122 -0
- package/dist/chunk-7XPLI6X6.mjs +129 -0
- package/dist/chunk-7XYNKZWU.mjs +32 -0
- package/dist/chunk-A5OCX7PW.mjs +141 -0
- package/dist/chunk-A734PEYB.mjs +20 -0
- package/dist/chunk-ACBEJHSN.mjs +89 -0
- package/dist/chunk-ADRORWCA.mjs +95 -0
- package/dist/chunk-AGELEW5Q.mjs +121 -0
- package/dist/chunk-AGFBCPPH.mjs +78 -0
- package/dist/chunk-AHDHVUSU.mjs +105 -0
- package/dist/chunk-AKXX5JM5.mjs +122 -0
- package/dist/chunk-AM2FMPVS.mjs +299 -0
- package/dist/chunk-AMLQ6RI2.mjs +72 -0
- package/dist/chunk-ARTXTVIX.mjs +156 -0
- package/dist/chunk-ARZVIKN2.mjs +114 -0
- package/dist/chunk-ATLMREKL.mjs +117 -0
- package/dist/chunk-AVN6NSOQ.mjs +504 -0
- package/dist/chunk-AWOTVASU.mjs +82 -0
- package/dist/chunk-AZWGY2SR.mjs +101 -0
- package/dist/chunk-B5T4EO6N.mjs +122 -0
- package/dist/chunk-BDPEOSAY.mjs +80 -0
- package/dist/chunk-BHUY7ML7.mjs +95 -0
- package/dist/chunk-BMGFO5X6.mjs +127 -0
- package/dist/chunk-BRDUOWC4.mjs +385 -0
- package/dist/chunk-BRX2NAAS.mjs +52 -0
- package/dist/chunk-BTFAMY6E.mjs +65 -0
- package/dist/chunk-C4BBQTZ3.mjs +20 -0
- package/dist/chunk-CEFGBZXZ.mjs +165 -0
- package/dist/chunk-CF6SPRDA.mjs +56 -0
- package/dist/chunk-CIOYPW7H.mjs +137 -0
- package/dist/chunk-CVGHZFZK.mjs +117 -0
- package/dist/chunk-D4XAI2WD.mjs +65 -0
- package/dist/chunk-DAECVI5O.mjs +113 -0
- package/dist/chunk-DD7O3SCJ.mjs +144 -0
- package/dist/chunk-DDQTQ7Z2.mjs +172 -0
- package/dist/chunk-DGYJH7JG.mjs +259 -0
- package/dist/chunk-DLRDFCPW.mjs +60 -0
- package/dist/chunk-DN67LFQR.mjs +81 -0
- package/dist/chunk-DOXA63UH.mjs +504 -0
- package/dist/chunk-DSU6MKPW.mjs +137 -0
- package/dist/chunk-DTK5B22N.mjs +65 -0
- package/dist/chunk-DTOWE2MA.mjs +89 -0
- package/dist/chunk-DUXLKXFH.mjs +91 -0
- package/dist/chunk-DW62DTCF.mjs +87 -0
- package/dist/chunk-DWGELT6B.mjs +21 -0
- package/dist/chunk-DX4476KH.mjs +831 -0
- package/dist/chunk-E63ZEQE4.mjs +732 -0
- package/dist/chunk-EA3TIJMP.mjs +196 -0
- package/dist/chunk-EA5VCJ4G.mjs +85 -0
- package/dist/chunk-EAZ6NHW3.mjs +141 -0
- package/dist/chunk-EBDDPXU3.mjs +122 -0
- package/dist/chunk-ELEGVKVJ.mjs +122 -0
- package/dist/chunk-EX3RF7CE.mjs +294 -0
- package/dist/chunk-EXL24QAL.mjs +95 -0
- package/dist/chunk-F3W67E3Q.mjs +22 -0
- package/dist/chunk-F4A4IDZT.mjs +116 -0
- package/dist/chunk-FA7MQI6D.mjs +36 -0
- package/dist/chunk-FDFTH2OA.mjs +90 -0
- package/dist/chunk-FDRHBZZC.mjs +144 -0
- package/dist/chunk-FG3S54WT.mjs +211 -0
- package/dist/chunk-FI3PDDER.mjs +122 -0
- package/dist/chunk-FIXSMDQ7.mjs +141 -0
- package/dist/chunk-FK6JIEEN.mjs +516 -0
- package/dist/chunk-FL5D63D7.mjs +71 -0
- package/dist/chunk-FMWN44M7.mjs +92 -0
- package/dist/chunk-FNJYYQWC.mjs +60 -0
- package/dist/chunk-FNW7PJBZ.mjs +64 -0
- package/dist/chunk-FNWRRTCO.mjs +39 -0
- package/dist/chunk-FW4K4W3K.mjs +141 -0
- package/dist/chunk-GERPY3SW.mjs +63 -0
- package/dist/chunk-GKDVJ2TL.mjs +95 -0
- package/dist/chunk-GLRU4LYS.mjs +504 -0
- package/dist/chunk-GVW4A5MT.mjs +60 -0
- package/dist/chunk-GXJ5KSWO.mjs +165 -0
- package/dist/chunk-GZGPV2GH.mjs +122 -0
- package/dist/chunk-H3MN7LXP.mjs +36 -0
- package/dist/chunk-H7FFO2UX.mjs +121 -0
- package/dist/chunk-H7PNKXKX.mjs +56 -0
- package/dist/chunk-HAAWMTFK.mjs +98 -0
- package/dist/chunk-HFWOG3A4.mjs +137 -0
- package/dist/chunk-HGZHZHVX.mjs +47 -0
- package/dist/chunk-HP6JAQYJ.mjs +94 -0
- package/dist/chunk-HU4E64GQ.mjs +71 -0
- package/dist/chunk-HVKU5XVM.mjs +53 -0
- package/dist/chunk-HXQU5KQU.mjs +95 -0
- package/dist/chunk-IFYYNQ45.mjs +58 -0
- package/dist/chunk-IHMJCY2Z.mjs +87 -0
- package/dist/chunk-IHWNEZFG.mjs +36 -0
- package/dist/chunk-IM6BEVG6.mjs +71 -0
- package/dist/chunk-INM7YQKC.mjs +127 -0
- package/dist/chunk-IOD6W4YR.mjs +127 -0
- package/dist/chunk-IRDSRZ6X.mjs +62 -0
- package/dist/chunk-ITVUL6I2.mjs +98 -0
- package/dist/chunk-JAJOT3LV.mjs +87 -0
- package/dist/chunk-JAWTBRNS.mjs +122 -0
- package/dist/chunk-JR35S45U.mjs +22 -0
- package/dist/chunk-JWP5ZC5R.mjs +122 -0
- package/dist/chunk-JXBXEIER.mjs +126 -0
- package/dist/chunk-KCTGBTKI.mjs +145 -0
- package/dist/chunk-KEVX5SBT.mjs +221 -0
- package/dist/chunk-KFCM7PTR.mjs +98 -0
- package/dist/chunk-KIIWOL5Y.mjs +144 -0
- package/dist/chunk-KJ22LZMS.mjs +122 -0
- package/dist/chunk-KLJX3KQD.mjs +291 -0
- package/dist/chunk-KLMBFT3I.mjs +137 -0
- package/dist/chunk-KQPVSMIE.mjs +119 -0
- package/dist/chunk-KSK2RMP2.mjs +91 -0
- package/dist/chunk-KVVAUT3G.mjs +104 -0
- package/dist/chunk-KYKGI5BT.mjs +29 -0
- package/dist/chunk-L56KCHUI.mjs +116 -0
- package/dist/chunk-L65SLADH.mjs +137 -0
- package/dist/chunk-LASIEVVD.mjs +185 -0
- package/dist/chunk-LCTUVPNY.mjs +297 -0
- package/dist/chunk-LNHBVSNL.mjs +60 -0
- package/dist/chunk-LO5DFSJW.mjs +145 -0
- package/dist/chunk-LZRZUFF7.mjs +145 -0
- package/dist/chunk-M2LTIUBU.mjs +122 -0
- package/dist/chunk-M3KPXPDL.mjs +29 -0
- package/dist/chunk-M4PKDGE6.mjs +84 -0
- package/dist/chunk-M5SSDTTI.mjs +144 -0
- package/dist/chunk-MEJPZHAU.mjs +137 -0
- package/dist/chunk-ML7LO7IA.mjs +117 -0
- package/dist/chunk-MMILCSIS.mjs +228 -0
- package/dist/chunk-MNRZGIJQ.mjs +71 -0
- package/dist/chunk-MR6L2TFX.mjs +108 -0
- package/dist/chunk-MSNX3AR7.mjs +77 -0
- package/dist/chunk-MTLKC5UG.mjs +52 -0
- package/dist/chunk-MVEJMLQV.mjs +121 -0
- package/dist/chunk-MXMPDB4C.mjs +115 -0
- package/dist/chunk-N4RS42JQ.mjs +95 -0
- package/dist/chunk-N57TKKRF.mjs +156 -0
- package/dist/chunk-NF7PDBLJ.mjs +137 -0
- package/dist/chunk-NFEGQZI6.mjs +137 -0
- package/dist/chunk-NFXJSDUN.mjs +141 -0
- package/dist/chunk-NIWPLXZV.mjs +156 -0
- package/dist/chunk-NLA4YXGL.mjs +514 -0
- package/dist/chunk-NMLAW5NT.mjs +122 -0
- package/dist/chunk-NR66XXLN.mjs +156 -0
- package/dist/chunk-NRMIWRV6.mjs +297 -0
- package/dist/chunk-NWFMBDRM.mjs +24 -0
- package/dist/chunk-NXDYVTFV.mjs +122 -0
- package/dist/chunk-O42L54HQ.mjs +64 -0
- package/dist/chunk-O6DX3UFY.mjs +144 -0
- package/dist/chunk-O6H6FK6Y.mjs +137 -0
- package/dist/chunk-OD2MYXSX.mjs +117 -0
- package/dist/chunk-OHDAB5RA.mjs +514 -0
- package/dist/chunk-OIVUFVD4.mjs +122 -0
- package/dist/chunk-OKNSXEYQ.mjs +23 -0
- package/dist/chunk-OODDZ36D.mjs +221 -0
- package/dist/chunk-OPSBOV67.mjs +103 -0
- package/dist/chunk-OR2S4A6H.mjs +95 -0
- package/dist/chunk-OSLWGGF7.mjs +206 -0
- package/dist/chunk-OTBJ3BDC.mjs +137 -0
- package/dist/chunk-OZ37V2CL.mjs +116 -0
- package/dist/chunk-OZVAPU5J.mjs +127 -0
- package/dist/chunk-P2PN6HBO.mjs +95 -0
- package/dist/chunk-P3RTX23Z.mjs +133 -0
- package/dist/chunk-P5JZQIOK.mjs +103 -0
- package/dist/chunk-P7R26T3Z.mjs +145 -0
- package/dist/chunk-PGTGRJXX.mjs +122 -0
- package/dist/chunk-POBPYPUF.mjs +112 -0
- package/dist/chunk-PWUDSGHY.mjs +503 -0
- package/dist/chunk-PYQP4S3P.mjs +121 -0
- package/dist/chunk-Q4X44C4L.mjs +144 -0
- package/dist/chunk-QADKEWBW.mjs +91 -0
- package/dist/chunk-QEJXAPVP.mjs +193 -0
- package/dist/chunk-QEXXBZLP.mjs +137 -0
- package/dist/chunk-QFDUI4JF.mjs +137 -0
- package/dist/chunk-QIRIOLSQ.mjs +36 -0
- package/dist/chunk-QKZKXMDP.mjs +116 -0
- package/dist/chunk-QM44OKQB.mjs +110 -0
- package/dist/chunk-QUDEY3ZC.mjs +184 -0
- package/dist/chunk-QXBXBOPT.mjs +14 -0
- package/dist/chunk-R3HLKKGQ.mjs +200 -0
- package/dist/chunk-R7Q3PWPD.mjs +138 -0
- package/dist/chunk-RE55YFSX.mjs +70 -0
- package/dist/chunk-RH2JCZ3S.mjs +144 -0
- package/dist/chunk-RIHKQMJZ.mjs +71 -0
- package/dist/chunk-RLESRYZ7.mjs +141 -0
- package/dist/chunk-RN7K57U3.mjs +108 -0
- package/dist/chunk-RPZ6KAGN.mjs +156 -0
- package/dist/chunk-RSK73346.mjs +507 -0
- package/dist/chunk-RSYSJQNC.mjs +156 -0
- package/dist/chunk-RVYMEMGV.mjs +141 -0
- package/dist/chunk-RWQEGPN3.mjs +47 -0
- package/dist/chunk-RXUR5LHG.mjs +221 -0
- package/dist/chunk-RZCB3IFV.mjs +151 -0
- package/dist/chunk-RZJMZDH6.mjs +24 -0
- package/dist/chunk-S6BMBKPF.mjs +108 -0
- package/dist/chunk-S6BOOCIS.mjs +82 -0
- package/dist/chunk-S72JYZ34.mjs +205 -0
- package/dist/chunk-SAMWUGZH.mjs +200 -0
- package/dist/chunk-SF72OO5J.mjs +141 -0
- package/dist/chunk-SGES2MH4.mjs +141 -0
- package/dist/chunk-SH42XLB3.mjs +126 -0
- package/dist/chunk-SHZX3OGO.mjs +89 -0
- package/dist/chunk-SJLOQ3VX.mjs +113 -0
- package/dist/chunk-SJSM5PK5.mjs +110 -0
- package/dist/chunk-SUCVL4AR.mjs +127 -0
- package/dist/chunk-SZOFVBTZ.mjs +9 -0
- package/dist/chunk-SZPASZJ7.mjs +137 -0
- package/dist/chunk-T26S5SRN.mjs +52 -0
- package/dist/chunk-TAPPN5PM.mjs +72 -0
- package/dist/chunk-TCLGXTVU.mjs +221 -0
- package/dist/chunk-TFWWQZZK.mjs +89 -0
- package/dist/chunk-TGMDRDFD.mjs +127 -0
- package/dist/chunk-THEZTSDO.mjs +122 -0
- package/dist/chunk-TNHL4DWX.mjs +116 -0
- package/dist/chunk-TNKFYE4G.mjs +30 -0
- package/dist/chunk-TR24H7UQ.mjs +95 -0
- package/dist/chunk-TTMH3FVZ.mjs +119 -0
- package/dist/chunk-TTQCH2X2.mjs +113 -0
- package/dist/chunk-TXZDAPDU.mjs +129 -0
- package/dist/chunk-TY4VNBLX.mjs +137 -0
- package/dist/chunk-U3P6M5T4.mjs +127 -0
- package/dist/chunk-U6OTBZMO.mjs +507 -0
- package/dist/chunk-UB6RKUH5.mjs +89 -0
- package/dist/chunk-UDUTTGR5.mjs +89 -0
- package/dist/chunk-UENEQHEN.mjs +506 -0
- package/dist/chunk-UGGMZF3C.mjs +87 -0
- package/dist/chunk-UMB7ZMKX.mjs +122 -0
- package/dist/chunk-UNL4F3FH.mjs +122 -0
- package/dist/chunk-UOP3WPZG.mjs +60 -0
- package/dist/chunk-UPBRQJAU.mjs +512 -0
- package/dist/chunk-UPPVJWBO.mjs +116 -0
- package/dist/chunk-UYFHSIC7.mjs +81 -0
- package/dist/chunk-UZJQAAOZ.mjs +108 -0
- package/dist/chunk-V2JDJALG.mjs +125 -0
- package/dist/chunk-V2YC7EE6.mjs +122 -0
- package/dist/chunk-V3UXNKVL.mjs +122 -0
- package/dist/chunk-V5FP5GDQ.mjs +95 -0
- package/dist/chunk-VCHYQYFB.mjs +503 -0
- package/dist/chunk-VJEJD4DF.mjs +52 -0
- package/dist/chunk-VL4PZ5RI.mjs +113 -0
- package/dist/chunk-VNGGNO3R.mjs +32 -0
- package/dist/chunk-VNWV6LZP.mjs +38 -0
- package/dist/chunk-VOQEOCHD.mjs +511 -0
- package/dist/chunk-VW33ORR4.mjs +301 -0
- package/dist/chunk-VZ6VFS3D.mjs +109 -0
- package/dist/chunk-W3SECUBG.mjs +14 -0
- package/dist/chunk-W5OZFHOX.mjs +193 -0
- package/dist/chunk-WCSWQVFA.mjs +96 -0
- package/dist/chunk-WELBZQP2.mjs +137 -0
- package/dist/chunk-WGJWOF4K.mjs +122 -0
- package/dist/chunk-WJUBYR25.mjs +122 -0
- package/dist/chunk-WKSLZG4X.mjs +122 -0
- package/dist/chunk-WO4BCKRI.mjs +145 -0
- package/dist/chunk-WRJ47AVE.mjs +136 -0
- package/dist/chunk-WWAEK25T.mjs +92 -0
- package/dist/chunk-X3N6PDZV.mjs +71 -0
- package/dist/chunk-X437NODC.mjs +122 -0
- package/dist/chunk-X4FBB2TI.mjs +32 -0
- package/dist/chunk-XAJVDNFJ.mjs +119 -0
- package/dist/chunk-XGIDLCZI.mjs +137 -0
- package/dist/chunk-XGPUTXJT.mjs +122 -0
- package/dist/chunk-XHSCOABH.mjs +138 -0
- package/dist/chunk-XRM6FF22.mjs +61 -0
- package/dist/chunk-XTG2CB35.mjs +122 -0
- package/dist/chunk-XX22JBNI.mjs +139 -0
- package/dist/chunk-Y2W5252F.mjs +515 -0
- package/dist/chunk-Y3UMAK4V.mjs +141 -0
- package/dist/chunk-Y4M4BHVP.mjs +106 -0
- package/dist/chunk-Y5TUAI6V.mjs +127 -0
- package/dist/chunk-Y6F7EJOV.mjs +129 -0
- package/dist/chunk-YCITYGTH.mjs +20 -0
- package/dist/chunk-YD3HHOXQ.mjs +120 -0
- package/dist/chunk-YE3IUCBS.mjs +81 -0
- package/dist/chunk-YG2I4KKR.mjs +156 -0
- package/dist/chunk-YQGPAXSD.mjs +24 -0
- package/dist/chunk-YSAEDU4W.mjs +137 -0
- package/dist/chunk-YSZMXNWH.mjs +30 -0
- package/dist/chunk-YW3ZBLND.mjs +8 -0
- package/dist/chunk-YZC2FQVP.mjs +78 -0
- package/dist/chunk-Z3MPWBBS.mjs +109 -0
- package/dist/chunk-Z3NBRL3F.mjs +108 -0
- package/dist/chunk-ZF5BUSKM.mjs +122 -0
- package/dist/chunk-ZF5CW4JH.mjs +91 -0
- package/dist/chunk-ZFUAZYLA.mjs +20 -0
- package/dist/chunk-ZJ7EMTGD.mjs +83 -0
- package/dist/chunk-ZPBOEUI7.mjs +56 -0
- package/dist/chunk-ZPFY4R5H.mjs +514 -0
- package/dist/chunk-ZRUMMJPO.mjs +127 -0
- package/dist/chunk-ZTLWJFDN.mjs +110 -0
- package/dist/chunk-ZVMW2BJZ.mjs +206 -0
- package/dist/components/dashboard/index.d.mts +135 -0
- package/dist/components/dashboard/index.d.ts +135 -0
- package/dist/components/dashboard/index.js +260 -0
- package/dist/components/dashboard/index.mjs +228 -0
- package/dist/components/layout/index.d.mts +2 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/index.mjs +1 -0
- package/dist/components/navigation/index.d.mts +261 -0
- package/dist/components/navigation/index.d.ts +261 -0
- package/dist/components/navigation/index.js +552 -0
- package/dist/components/navigation/index.mjs +3 -0
- package/dist/components/ui/accordion.d.mts +37 -0
- package/dist/components/ui/accordion.d.ts +37 -0
- package/dist/components/ui/accordion.js +120 -0
- package/dist/components/ui/accordion.mjs +2 -0
- package/dist/components/ui/alert.d.mts +49 -0
- package/dist/components/ui/alert.d.ts +49 -0
- package/dist/components/ui/alert.js +149 -0
- package/dist/components/ui/alert.mjs +2 -0
- package/dist/components/ui/artwork.d.mts +2 -0
- package/dist/components/ui/artwork.d.ts +2 -0
- package/dist/components/ui/artwork.js +950 -0
- package/dist/components/ui/artwork.mjs +3 -0
- package/dist/components/ui/avatar.d.mts +36 -0
- package/dist/components/ui/avatar.d.ts +36 -0
- package/dist/components/ui/avatar.js +231 -0
- package/dist/components/ui/avatar.mjs +3 -0
- package/dist/components/ui/badge.d.mts +32 -0
- package/dist/components/ui/badge.d.ts +32 -0
- package/dist/components/ui/badge.js +119 -0
- package/dist/components/ui/badge.mjs +2 -0
- package/dist/components/ui/box.d.mts +8 -0
- package/dist/components/ui/box.d.ts +8 -0
- package/dist/components/ui/box.js +41 -0
- package/dist/components/ui/box.mjs +2 -0
- package/dist/components/ui/breadcrumb.d.mts +57 -0
- package/dist/components/ui/breadcrumb.d.ts +57 -0
- package/dist/components/ui/breadcrumb.js +162 -0
- package/dist/components/ui/breadcrumb.mjs +3 -0
- package/dist/components/ui/button-group.d.mts +54 -0
- package/dist/components/ui/button-group.d.ts +54 -0
- package/dist/components/ui/button-group.js +113 -0
- package/dist/components/ui/button-group.mjs +2 -0
- package/dist/components/ui/button.d.mts +38 -0
- package/dist/components/ui/button.d.ts +38 -0
- package/dist/components/ui/button.js +149 -0
- package/dist/components/ui/button.mjs +2 -0
- package/dist/components/ui/calendar.d.mts +15 -0
- package/dist/components/ui/calendar.d.ts +15 -0
- package/dist/components/ui/calendar.js +282 -0
- package/dist/components/ui/calendar.mjs +3 -0
- package/dist/components/ui/callout.d.mts +32 -0
- package/dist/components/ui/callout.d.ts +32 -0
- package/dist/components/ui/callout.js +93 -0
- package/dist/components/ui/callout.mjs +2 -0
- package/dist/components/ui/card.d.mts +63 -0
- package/dist/components/ui/card.d.ts +63 -0
- package/dist/components/ui/card.js +112 -0
- package/dist/components/ui/card.mjs +2 -0
- package/dist/components/ui/checkbox.d.mts +37 -0
- package/dist/components/ui/checkbox.d.ts +37 -0
- package/dist/components/ui/checkbox.js +132 -0
- package/dist/components/ui/checkbox.mjs +2 -0
- package/dist/components/ui/code.d.mts +9 -0
- package/dist/components/ui/code.d.ts +9 -0
- package/dist/components/ui/code.js +57 -0
- package/dist/components/ui/code.mjs +2 -0
- package/dist/components/ui/command.d.mts +85 -0
- package/dist/components/ui/command.d.ts +85 -0
- package/dist/components/ui/command.js +243 -0
- package/dist/components/ui/command.mjs +3 -0
- package/dist/components/ui/consent.d.mts +8 -0
- package/dist/components/ui/consent.d.ts +8 -0
- package/dist/components/ui/consent.js +68 -0
- package/dist/components/ui/consent.mjs +2 -0
- package/dist/components/ui/container.d.mts +9 -0
- package/dist/components/ui/container.d.ts +9 -0
- package/dist/components/ui/container.js +59 -0
- package/dist/components/ui/container.mjs +2 -0
- package/dist/components/ui/data-list.d.mts +13 -0
- package/dist/components/ui/data-list.d.ts +13 -0
- package/dist/components/ui/data-list.js +79 -0
- package/dist/components/ui/data-list.mjs +2 -0
- package/dist/components/ui/dropdown-menu.d.mts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.js +213 -0
- package/dist/components/ui/dropdown-menu.mjs +2 -0
- package/dist/components/ui/flex.d.mts +12 -0
- package/dist/components/ui/flex.d.ts +12 -0
- package/dist/components/ui/flex.js +79 -0
- package/dist/components/ui/flex.mjs +2 -0
- package/dist/components/ui/follow.d.mts +9 -0
- package/dist/components/ui/follow.d.ts +9 -0
- package/dist/components/ui/follow.js +63 -0
- package/dist/components/ui/follow.mjs +2 -0
- package/dist/components/ui/grid.d.mts +12 -0
- package/dist/components/ui/grid.d.ts +12 -0
- package/dist/components/ui/grid.js +92 -0
- package/dist/components/ui/grid.mjs +2 -0
- package/dist/components/ui/heading.d.mts +11 -0
- package/dist/components/ui/heading.d.ts +11 -0
- package/dist/components/ui/heading.js +63 -0
- package/dist/components/ui/heading.mjs +2 -0
- package/dist/components/ui/highlight.d.mts +27 -0
- package/dist/components/ui/highlight.d.ts +27 -0
- package/dist/components/ui/highlight.js +74 -0
- package/dist/components/ui/highlight.mjs +2 -0
- package/dist/components/ui/hover-card.d.mts +8 -0
- package/dist/components/ui/hover-card.d.ts +8 -0
- package/dist/components/ui/hover-card.js +52 -0
- package/dist/components/ui/hover-card.mjs +2 -0
- package/dist/components/ui/indicator.d.mts +32 -0
- package/dist/components/ui/indicator.d.ts +32 -0
- package/dist/components/ui/indicator.js +88 -0
- package/dist/components/ui/indicator.mjs +2 -0
- package/dist/components/ui/input-otp.d.mts +37 -0
- package/dist/components/ui/input-otp.d.ts +37 -0
- package/dist/components/ui/input-otp.js +94 -0
- package/dist/components/ui/input-otp.mjs +2 -0
- package/dist/components/ui/input.d.mts +74 -0
- package/dist/components/ui/input.d.ts +74 -0
- package/dist/components/ui/input.js +416 -0
- package/dist/components/ui/input.mjs +2 -0
- package/dist/components/ui/kbd.d.mts +8 -0
- package/dist/components/ui/kbd.d.ts +8 -0
- package/dist/components/ui/kbd.js +51 -0
- package/dist/components/ui/kbd.mjs +2 -0
- package/dist/components/ui/link.d.mts +56 -0
- package/dist/components/ui/link.d.ts +56 -0
- package/dist/components/ui/link.js +150 -0
- package/dist/components/ui/link.mjs +3 -0
- package/dist/components/ui/logo.d.mts +58 -0
- package/dist/components/ui/logo.d.ts +58 -0
- package/dist/components/ui/logo.js +225 -0
- package/dist/components/ui/logo.mjs +2 -0
- package/dist/components/ui/modal.d.mts +34 -0
- package/dist/components/ui/modal.d.ts +34 -0
- package/dist/components/ui/modal.js +153 -0
- package/dist/components/ui/modal.mjs +2 -0
- package/dist/components/ui/notice.d.mts +56 -0
- package/dist/components/ui/notice.d.ts +56 -0
- package/dist/components/ui/notice.js +126 -0
- package/dist/components/ui/notice.mjs +2 -0
- package/dist/components/ui/pagination.d.mts +100 -0
- package/dist/components/ui/pagination.d.ts +100 -0
- package/dist/components/ui/pagination.js +248 -0
- package/dist/components/ui/pagination.mjs +3 -0
- package/dist/components/ui/pictograms.d.mts +2 -0
- package/dist/components/ui/pictograms.d.ts +2 -0
- package/dist/components/ui/pictograms.js +924 -0
- package/dist/components/ui/pictograms.mjs +1 -0
- package/dist/components/ui/popover.d.mts +9 -0
- package/dist/components/ui/popover.d.ts +9 -0
- package/dist/components/ui/popover.js +54 -0
- package/dist/components/ui/popover.mjs +2 -0
- package/dist/components/ui/progress.d.mts +16 -0
- package/dist/components/ui/progress.d.ts +16 -0
- package/dist/components/ui/progress.js +99 -0
- package/dist/components/ui/progress.mjs +2 -0
- package/dist/components/ui/quote.d.mts +41 -0
- package/dist/components/ui/quote.d.ts +41 -0
- package/dist/components/ui/quote.js +91 -0
- package/dist/components/ui/quote.mjs +2 -0
- package/dist/components/ui/radio.d.mts +32 -0
- package/dist/components/ui/radio.d.ts +32 -0
- package/dist/components/ui/radio.js +111 -0
- package/dist/components/ui/radio.mjs +2 -0
- package/dist/components/ui/range.d.mts +27 -0
- package/dist/components/ui/range.d.ts +27 -0
- package/dist/components/ui/range.js +137 -0
- package/dist/components/ui/range.mjs +2 -0
- package/dist/components/ui/section.d.mts +9 -0
- package/dist/components/ui/section.d.ts +9 -0
- package/dist/components/ui/section.js +56 -0
- package/dist/components/ui/section.mjs +2 -0
- package/dist/components/ui/select.d.mts +27 -0
- package/dist/components/ui/select.d.ts +27 -0
- package/dist/components/ui/select.js +222 -0
- package/dist/components/ui/select.mjs +2 -0
- package/dist/components/ui/separator.d.mts +6 -0
- package/dist/components/ui/separator.d.ts +6 -0
- package/dist/components/ui/separator.js +49 -0
- package/dist/components/ui/separator.mjs +2 -0
- package/dist/components/ui/sheet.d.mts +29 -0
- package/dist/components/ui/sheet.d.ts +29 -0
- package/dist/components/ui/sheet.js +140 -0
- package/dist/components/ui/sheet.mjs +2 -0
- package/dist/components/ui/skeleton.d.mts +13 -0
- package/dist/components/ui/skeleton.d.ts +13 -0
- package/dist/components/ui/skeleton.js +28 -0
- package/dist/components/ui/skeleton.mjs +2 -0
- package/dist/components/ui/stepper.d.mts +36 -0
- package/dist/components/ui/stepper.d.ts +36 -0
- package/dist/components/ui/stepper.js +98 -0
- package/dist/components/ui/stepper.mjs +2 -0
- package/dist/components/ui/table.d.mts +20 -0
- package/dist/components/ui/table.d.ts +20 -0
- package/dist/components/ui/table.js +121 -0
- package/dist/components/ui/table.mjs +2 -0
- package/dist/components/ui/tabs.d.mts +18 -0
- package/dist/components/ui/tabs.d.ts +18 -0
- package/dist/components/ui/tabs.js +126 -0
- package/dist/components/ui/tabs.mjs +2 -0
- package/dist/components/ui/tag.d.mts +61 -0
- package/dist/components/ui/tag.d.ts +61 -0
- package/dist/components/ui/tag.js +328 -0
- package/dist/components/ui/tag.mjs +2 -0
- package/dist/components/ui/text.d.mts +11 -0
- package/dist/components/ui/text.d.ts +11 -0
- package/dist/components/ui/text.js +66 -0
- package/dist/components/ui/text.mjs +2 -0
- package/dist/components/ui/theme-artwork.d.mts +22 -0
- package/dist/components/ui/theme-artwork.d.ts +22 -0
- package/dist/components/ui/theme-artwork.js +158 -0
- package/dist/components/ui/theme-artwork.mjs +2 -0
- package/dist/components/ui/theme-toggle.d.mts +23 -0
- package/dist/components/ui/theme-toggle.d.ts +23 -0
- package/dist/components/ui/theme-toggle.js +567 -0
- package/dist/components/ui/theme-toggle.mjs +9 -0
- package/dist/components/ui/tile.d.mts +57 -0
- package/dist/components/ui/tile.d.ts +57 -0
- package/dist/components/ui/tile.js +248 -0
- package/dist/components/ui/tile.mjs +2 -0
- package/dist/components/ui/toast.d.mts +18 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.js +141 -0
- package/dist/components/ui/toast.mjs +2 -0
- package/dist/components/ui/toaster.d.mts +8 -0
- package/dist/components/ui/toaster.d.ts +8 -0
- package/dist/components/ui/toaster.js +263 -0
- package/dist/components/ui/toaster.mjs +4 -0
- package/dist/components/ui/toggle.d.mts +39 -0
- package/dist/components/ui/toggle.d.ts +39 -0
- package/dist/components/ui/toggle.js +156 -0
- package/dist/components/ui/toggle.mjs +2 -0
- package/dist/components/ui/tooltip.d.mts +26 -0
- package/dist/components/ui/tooltip.d.ts +26 -0
- package/dist/components/ui/tooltip.js +85 -0
- package/dist/components/ui/tooltip.mjs +2 -0
- package/dist/components/ui/translate.d.mts +36 -0
- package/dist/components/ui/translate.d.ts +36 -0
- package/dist/components/ui/translate.js +191 -0
- package/dist/components/ui/translate.mjs +2 -0
- package/dist/components/ui/upload.d.mts +37 -0
- package/dist/components/ui/upload.d.ts +37 -0
- package/dist/components/ui/upload.js +89 -0
- package/dist/components/ui/upload.mjs +2 -0
- package/dist/components/ui/use-toast.d.mts +49 -0
- package/dist/components/ui/use-toast.d.ts +49 -0
- package/dist/components/ui/use-toast.js +142 -0
- package/dist/components/ui/use-toast.mjs +1 -0
- package/dist/hooks/index.d.mts +40 -0
- package/dist/hooks/index.d.ts +40 -0
- package/dist/hooks/index.js +87 -0
- package/dist/hooks/index.mjs +2 -0
- package/dist/i18n/index.d.mts +160 -0
- package/dist/i18n/index.d.ts +160 -0
- package/dist/i18n/index.js +228 -0
- package/dist/i18n/index.mjs +191 -0
- package/dist/index.d.mts +96 -0
- package/dist/index.d.ts +96 -0
- package/dist/index.js +7183 -0
- package/dist/index.mjs +67 -0
- package/dist/primitives/index.d.mts +30 -0
- package/dist/primitives/index.d.ts +30 -0
- package/dist/primitives/index.js +48 -0
- package/dist/primitives/index.mjs +1 -0
- package/dist/providers/index.d.mts +155 -0
- package/dist/providers/index.d.ts +155 -0
- package/dist/providers/index.js +203 -0
- package/dist/providers/index.mjs +3 -0
- package/dist/theme-provider-DQSD5lrW.d.mts +82 -0
- package/dist/theme-provider-DQSD5lrW.d.ts +82 -0
- package/dist/theme-script-BIZ1PX7u.d.mts +75 -0
- package/dist/theme-script-BIZ1PX7u.d.ts +75 -0
- package/package.json +120 -0
- package/src/components/navigation/footer.tsx +173 -0
- package/src/components/navigation/header.tsx +236 -0
- package/src/components/navigation/index.ts +29 -0
- package/src/components/navigation/nav-link.tsx +135 -0
- package/src/components/navigation/navigation.tsx +336 -0
- package/src/components/navigation/skip-links.tsx +75 -0
- package/src/components/ui/accordion.test.tsx +56 -0
- package/src/components/ui/accordion.tsx +150 -0
- package/src/components/ui/alert.test.tsx +58 -0
- package/src/components/ui/alert.tsx +181 -0
- package/src/components/ui/artwork.tsx +166 -0
- package/src/components/ui/avatar.tsx +198 -0
- package/src/components/ui/badge.test.tsx +44 -0
- package/src/components/ui/badge.tsx +144 -0
- package/src/components/ui/box.tsx +17 -0
- package/src/components/ui/breadcrumb.tsx +189 -0
- package/src/components/ui/button-group.tsx +146 -0
- package/src/components/ui/button.test.tsx +56 -0
- package/src/components/ui/button.tsx +160 -0
- package/src/components/ui/calendar.tsx +159 -0
- package/src/components/ui/callout.test.tsx +36 -0
- package/src/components/ui/callout.tsx +131 -0
- package/src/components/ui/card.tsx +151 -0
- package/src/components/ui/checkbox.test.tsx +38 -0
- package/src/components/ui/checkbox.tsx +142 -0
- package/src/components/ui/code.tsx +33 -0
- package/src/components/ui/command.tsx +162 -0
- package/src/components/ui/consent.tsx +46 -0
- package/src/components/ui/container.tsx +35 -0
- package/src/components/ui/data-list.tsx +59 -0
- package/src/components/ui/dropdown-menu.tsx +226 -0
- package/src/components/ui/flex.tsx +62 -0
- package/src/components/ui/follow.tsx +52 -0
- package/src/components/ui/grid.tsx +75 -0
- package/src/components/ui/heading.tsx +42 -0
- package/src/components/ui/highlight.tsx +71 -0
- package/src/components/ui/hover-card.tsx +29 -0
- package/src/components/ui/indicator.tsx +108 -0
- package/src/components/ui/input-otp.tsx +85 -0
- package/src/components/ui/input.tsx +508 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/link.tsx +191 -0
- package/src/components/ui/logo.tsx +298 -0
- package/src/components/ui/modal.tsx +176 -0
- package/src/components/ui/notice.tsx +157 -0
- package/src/components/ui/pagination.tsx +348 -0
- package/src/components/ui/pictograms.ts +1197 -0
- package/src/components/ui/popover.tsx +33 -0
- package/src/components/ui/progress.tsx +79 -0
- package/src/components/ui/quote.tsx +132 -0
- package/src/components/ui/radio.test.tsx +48 -0
- package/src/components/ui/radio.tsx +126 -0
- package/src/components/ui/range.tsx +156 -0
- package/src/components/ui/section.tsx +32 -0
- package/src/components/ui/select.tsx +257 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +137 -0
- package/src/components/ui/skeleton.tsx +26 -0
- package/src/components/ui/stepper.tsx +124 -0
- package/src/components/ui/table.tsx +158 -0
- package/src/components/ui/tabs.tsx +118 -0
- package/src/components/ui/tag.tsx +406 -0
- package/src/components/ui/text.tsx +45 -0
- package/src/components/ui/theme-artwork.tsx +122 -0
- package/src/components/ui/theme-toggle.tsx +154 -0
- package/src/components/ui/tile.tsx +337 -0
- package/src/components/ui/toast.tsx +140 -0
- package/src/components/ui/toaster.tsx +35 -0
- package/src/components/ui/toggle.tsx +187 -0
- package/src/components/ui/tooltip.tsx +96 -0
- package/src/components/ui/translate.tsx +203 -0
- package/src/components/ui/upload.tsx +118 -0
- package/src/components/ui/use-toast.ts +185 -0
- package/src/hooks/index.ts +10 -0
- package/src/hooks/use-media-query.ts +74 -0
- package/src/hooks/use-theme.ts +5 -0
- package/src/i18n/index.ts +35 -0
- package/src/i18n/provider.tsx +82 -0
- package/src/i18n/strings.ts +196 -0
- package/src/i18n/types.ts +95 -0
- package/src/index.ts +348 -0
- package/src/lib/utils.ts +10 -0
- package/src/primitives/index.ts +8 -0
- package/src/primitives/polymorphic.tsx +52 -0
- package/src/providers/index.ts +20 -0
- package/src/providers/router-provider.tsx +99 -0
- package/src/providers/theme-provider.tsx +218 -0
- package/src/providers/theme-script.tsx +135 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { OTPInput, OTPInputContext } from 'input-otp'
|
|
4
|
+
import * as React from 'react'
|
|
5
|
+
import { cn } from '../../lib/utils'
|
|
6
|
+
|
|
7
|
+
const InputOTP = React.forwardRef<
|
|
8
|
+
React.ElementRef<typeof OTPInput>,
|
|
9
|
+
React.ComponentPropsWithoutRef<typeof OTPInput>
|
|
10
|
+
>(({ className, containerClassName, ...props }, ref) => (
|
|
11
|
+
<OTPInput
|
|
12
|
+
ref={ref}
|
|
13
|
+
containerClassName={cn(
|
|
14
|
+
'flex items-center gap-2 has-[:disabled]:opacity-50',
|
|
15
|
+
containerClassName
|
|
16
|
+
)}
|
|
17
|
+
className={cn('disabled:cursor-not-allowed', className)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
))
|
|
21
|
+
InputOTP.displayName = 'InputOTP'
|
|
22
|
+
|
|
23
|
+
const InputOTPGroup = React.forwardRef<
|
|
24
|
+
React.ElementRef<'div'>,
|
|
25
|
+
React.ComponentPropsWithoutRef<'div'>
|
|
26
|
+
>(({ className, ...props }, ref) => (
|
|
27
|
+
<div ref={ref} className={cn('flex items-center', className)} {...props} />
|
|
28
|
+
))
|
|
29
|
+
InputOTPGroup.displayName = 'InputOTPGroup'
|
|
30
|
+
|
|
31
|
+
const InputOTPSlot = React.forwardRef<
|
|
32
|
+
React.ElementRef<'div'>,
|
|
33
|
+
React.ComponentPropsWithoutRef<'div'> & { index: number }
|
|
34
|
+
>(({ index, className, ...props }, ref) => {
|
|
35
|
+
const inputOTPContext = React.useContext(OTPInputContext)
|
|
36
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn(
|
|
42
|
+
'relative flex h-10 w-10 items-center justify-center border-y border-r border-border text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',
|
|
43
|
+
isActive && 'z-10 ring-2 ring-primary ring-offset-background border-primary',
|
|
44
|
+
className
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
{char}
|
|
49
|
+
{hasFakeCaret && (
|
|
50
|
+
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
51
|
+
<div className="h-4 w-px animate-caret-blink bg-primary duration-1000" />
|
|
52
|
+
</div>
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
})
|
|
57
|
+
InputOTPSlot.displayName = 'InputOTPSlot'
|
|
58
|
+
|
|
59
|
+
const InputOTPSeparator = React.forwardRef<
|
|
60
|
+
React.ElementRef<'div'>,
|
|
61
|
+
React.ComponentPropsWithoutRef<'div'>
|
|
62
|
+
>(({ ...props }, ref) => (
|
|
63
|
+
// biome-ignore lint/a11y/useFocusableInteractive: le séparateur est décoratif, géré par la bibliothèque input-otp
|
|
64
|
+
// biome-ignore lint/a11y/useSemanticElements: role="separator" requis par l'API de la bibliothèque input-otp
|
|
65
|
+
// biome-ignore lint/a11y/useAriaPropsForRole: composant totalement décoratif
|
|
66
|
+
<div ref={ref} role="separator" {...props}>
|
|
67
|
+
<svg
|
|
68
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
69
|
+
width="24"
|
|
70
|
+
height="24"
|
|
71
|
+
viewBox="0 0 24 24"
|
|
72
|
+
fill="none"
|
|
73
|
+
stroke="currentColor"
|
|
74
|
+
strokeWidth="2"
|
|
75
|
+
strokeLinecap="round"
|
|
76
|
+
strokeLinejoin="round"
|
|
77
|
+
className="h-4 w-4"
|
|
78
|
+
>
|
|
79
|
+
<path d="M5 12h14" />
|
|
80
|
+
</svg>
|
|
81
|
+
</div>
|
|
82
|
+
))
|
|
83
|
+
InputOTPSeparator.displayName = 'InputOTPSeparator'
|
|
84
|
+
|
|
85
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot }
|
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
import { cn } from '../../lib/utils'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Variants de l'input DSFR
|
|
7
|
+
* Conforme au design system : https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/champ-de-saisie
|
|
8
|
+
*
|
|
9
|
+
* L'input DSFR a un border-radius en haut seulement et une bordure inférieure épaisse
|
|
10
|
+
*/
|
|
11
|
+
const inputVariants = cva(
|
|
12
|
+
// Base DSFR : border-radius en haut, fond adaptatif, bordure inférieure
|
|
13
|
+
'flex w-full rounded-t border-0 text-base leading-6 transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground placeholder:italic focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
// Default : fond adaptatif, bordure inférieure grise
|
|
18
|
+
default:
|
|
19
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.border-contrast)] focus:shadow-[inset_0_-2px_0_0_theme(colors.ring)]',
|
|
20
|
+
// Error : bordure inférieure rouge
|
|
21
|
+
error:
|
|
22
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.destructive.DEFAULT)] focus:shadow-[inset_0_-2px_0_0_theme(colors.destructive.DEFAULT)]',
|
|
23
|
+
// Success : bordure inférieure verte
|
|
24
|
+
success:
|
|
25
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.success.DEFAULT)] focus:shadow-[inset_0_-2px_0_0_theme(colors.success.DEFAULT)]',
|
|
26
|
+
// Info : bordure inférieure bleue
|
|
27
|
+
info:
|
|
28
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.info.DEFAULT)] focus:shadow-[inset_0_-2px_0_0_theme(colors.info.DEFAULT)]',
|
|
29
|
+
// Warning : bordure inférieure orange
|
|
30
|
+
warning:
|
|
31
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.warning.DEFAULT)] focus:shadow-[inset_0_-2px_0_0_theme(colors.warning.DEFAULT)]',
|
|
32
|
+
},
|
|
33
|
+
inputSize: {
|
|
34
|
+
// SM : hauteur 32px
|
|
35
|
+
sm: 'h-8 px-4 py-1 text-sm',
|
|
36
|
+
// MD : hauteur 40px (défaut DSFR)
|
|
37
|
+
md: 'h-10 px-4 py-2',
|
|
38
|
+
// LG : hauteur 48px
|
|
39
|
+
lg: 'h-12 px-4 py-3 text-lg',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: 'default',
|
|
44
|
+
inputSize: 'md',
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
export interface InputProps
|
|
50
|
+
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,
|
|
51
|
+
VariantProps<typeof inputVariants> {
|
|
52
|
+
label?: string
|
|
53
|
+
error?: string
|
|
54
|
+
success?: string
|
|
55
|
+
info?: string
|
|
56
|
+
warning?: string
|
|
57
|
+
hint?: string
|
|
58
|
+
/** Icône à afficher dans le champ */
|
|
59
|
+
icon?: React.ReactNode
|
|
60
|
+
/** Élément d'action (ex: bouton) à afficher dans le champ */
|
|
61
|
+
addon?: React.ReactNode
|
|
62
|
+
/** Bouton d'action à accoler au champ de saisie (supprime l'arrondi de jonction) */
|
|
63
|
+
action?: React.ReactNode
|
|
64
|
+
/** Position de l'icône ou de l'addon ('start' par défaut, 'end' inversera) */
|
|
65
|
+
position?: 'start' | 'end'
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
import { ErrorIcon, EyeIcon, EyeOffIcon, InfoIcon, SuccessIcon, WarningIcon } from '@dsfrkit/icons'
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Composant Input DSFR
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```tsx
|
|
75
|
+
* // Avec icône
|
|
76
|
+
* <Input
|
|
77
|
+
* label="Rechercher un utilisateur"
|
|
78
|
+
* icon={<SearchIcon />}
|
|
79
|
+
* position="start"
|
|
80
|
+
* />
|
|
81
|
+
*
|
|
82
|
+
* // Avec bouton d'action
|
|
83
|
+
* <Input
|
|
84
|
+
* label="Nom de domaine"
|
|
85
|
+
* addon={<Button variant="ghost">Vérifier</Button>}
|
|
86
|
+
* position="end"
|
|
87
|
+
* />
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
91
|
+
(
|
|
92
|
+
{
|
|
93
|
+
className,
|
|
94
|
+
variant,
|
|
95
|
+
inputSize,
|
|
96
|
+
label,
|
|
97
|
+
error,
|
|
98
|
+
success,
|
|
99
|
+
info,
|
|
100
|
+
warning,
|
|
101
|
+
hint,
|
|
102
|
+
icon,
|
|
103
|
+
addon,
|
|
104
|
+
action,
|
|
105
|
+
position = 'end',
|
|
106
|
+
id,
|
|
107
|
+
...props
|
|
108
|
+
},
|
|
109
|
+
ref
|
|
110
|
+
) => {
|
|
111
|
+
const generatedId = React.useId()
|
|
112
|
+
const inputId = id || generatedId
|
|
113
|
+
const inputOrGeneratedId = inputId
|
|
114
|
+
const errorId = `${inputOrGeneratedId}-error`
|
|
115
|
+
const successId = `${inputOrGeneratedId}-success`
|
|
116
|
+
const infoId = `${inputOrGeneratedId}-info`
|
|
117
|
+
const warningId = `${inputOrGeneratedId}-warning`
|
|
118
|
+
const hintId = `${inputOrGeneratedId}-hint`
|
|
119
|
+
|
|
120
|
+
// Calcul du padding nécessaire pour éviter le chevauchement du texte
|
|
121
|
+
// Padding par défaut (cva) : px-4
|
|
122
|
+
const hasElementAtStart = position === 'start' && (icon || addon)
|
|
123
|
+
const hasElementAtEnd = position === 'end' && (icon || addon)
|
|
124
|
+
|
|
125
|
+
const isError = !!error
|
|
126
|
+
const isSuccess = !!success && !isError
|
|
127
|
+
const isWarning = !!warning && !isError && !isSuccess
|
|
128
|
+
const isInfo = !!info && !isError && !isSuccess && !isWarning
|
|
129
|
+
|
|
130
|
+
const inputStateVariant = isError ? 'error' : isSuccess ? 'success' : isWarning ? 'warning' : isInfo ? 'info' : variant
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<div
|
|
134
|
+
className={cn(
|
|
135
|
+
'w-full space-y-2 relative transition-colors',
|
|
136
|
+
(isError || isSuccess || isWarning || isInfo) && 'pl-4 -ml-[18px] border-l-2',
|
|
137
|
+
isError ? 'border-l-destructive' : isSuccess ? 'border-l-success' : isWarning ? 'border-l-warning' : isInfo ? 'border-l-info' : ''
|
|
138
|
+
)}
|
|
139
|
+
>
|
|
140
|
+
{label && (
|
|
141
|
+
<label htmlFor={inputId} className="block text-sm font-medium text-foreground">
|
|
142
|
+
{label}
|
|
143
|
+
{props.required && <span className="text-error ml-1">*</span>}
|
|
144
|
+
</label>
|
|
145
|
+
)}
|
|
146
|
+
|
|
147
|
+
{hint && !isError && !isSuccess && !isWarning && !isInfo && (
|
|
148
|
+
<p id={hintId} className="text-sm text-muted-foreground">
|
|
149
|
+
{hint}
|
|
150
|
+
</p>
|
|
151
|
+
)}
|
|
152
|
+
|
|
153
|
+
<div className={cn('flex items-stretch', action ? 'flex-row' : 'flex-col')}>
|
|
154
|
+
{action && position === 'start' && (
|
|
155
|
+
<div className="flex-none [&>button]:h-full [&>button]:rounded-r-none [&>button]:border-r-0">
|
|
156
|
+
{action}
|
|
157
|
+
</div>
|
|
158
|
+
)}
|
|
159
|
+
|
|
160
|
+
<div className="relative flex items-center flex-1">
|
|
161
|
+
{hasElementAtStart && (
|
|
162
|
+
<div
|
|
163
|
+
className={cn(
|
|
164
|
+
'absolute left-3 flex h-full items-center justify-center',
|
|
165
|
+
icon ? 'pointer-events-none text-muted-foreground' : 'pointer-events-auto'
|
|
166
|
+
)}
|
|
167
|
+
>
|
|
168
|
+
{icon || addon}
|
|
169
|
+
</div>
|
|
170
|
+
)}
|
|
171
|
+
|
|
172
|
+
<input
|
|
173
|
+
id={inputId}
|
|
174
|
+
className={cn(
|
|
175
|
+
inputVariants({ variant: inputStateVariant, inputSize, className }),
|
|
176
|
+
hasElementAtStart && 'pl-10',
|
|
177
|
+
hasElementAtEnd && 'pr-10',
|
|
178
|
+
action && position === 'start' && 'rounded-tl-none',
|
|
179
|
+
action && (!position || position === 'end') && 'rounded-tr-none'
|
|
180
|
+
)}
|
|
181
|
+
ref={ref}
|
|
182
|
+
aria-invalid={isError ? 'true' : 'false'}
|
|
183
|
+
aria-describedby={
|
|
184
|
+
isError ? errorId : isSuccess ? successId : isWarning ? warningId : isInfo ? infoId : hint ? hintId : undefined
|
|
185
|
+
}
|
|
186
|
+
{...props}
|
|
187
|
+
/>
|
|
188
|
+
|
|
189
|
+
{hasElementAtEnd && (
|
|
190
|
+
<div
|
|
191
|
+
className={cn(
|
|
192
|
+
'absolute right-3 flex h-full items-center justify-center',
|
|
193
|
+
icon ? 'pointer-events-none text-muted-foreground' : 'pointer-events-auto'
|
|
194
|
+
)}
|
|
195
|
+
>
|
|
196
|
+
{icon || addon}
|
|
197
|
+
</div>
|
|
198
|
+
)}
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
{action && (!position || position === 'end') && (
|
|
202
|
+
<div className="flex-none [&>button]:h-full [&>button]:rounded-l-none [&>button]:border-l-0">
|
|
203
|
+
{action}
|
|
204
|
+
</div>
|
|
205
|
+
)}
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
{isError && (
|
|
209
|
+
<p id={errorId} className="text-sm text-error font-medium flex items-center space-x-1">
|
|
210
|
+
<ErrorIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
211
|
+
<span>{error}</span>
|
|
212
|
+
</p>
|
|
213
|
+
)}
|
|
214
|
+
|
|
215
|
+
{isSuccess && (
|
|
216
|
+
<p
|
|
217
|
+
id={successId}
|
|
218
|
+
className="text-sm text-success font-medium flex items-center space-x-1"
|
|
219
|
+
>
|
|
220
|
+
<SuccessIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
221
|
+
<span>{success}</span>
|
|
222
|
+
</p>
|
|
223
|
+
)}
|
|
224
|
+
|
|
225
|
+
{isWarning && (
|
|
226
|
+
<p
|
|
227
|
+
id={warningId}
|
|
228
|
+
className="text-sm text-warning font-medium flex items-center space-x-1"
|
|
229
|
+
>
|
|
230
|
+
<WarningIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
231
|
+
<span>{warning}</span>
|
|
232
|
+
</p>
|
|
233
|
+
)}
|
|
234
|
+
|
|
235
|
+
{isInfo && (
|
|
236
|
+
<p
|
|
237
|
+
id={infoId}
|
|
238
|
+
className="text-sm text-info font-medium flex items-center space-x-1"
|
|
239
|
+
>
|
|
240
|
+
<InfoIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
241
|
+
<span>{info}</span>
|
|
242
|
+
</p>
|
|
243
|
+
)}
|
|
244
|
+
</div>
|
|
245
|
+
)
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
Input.displayName = 'Input'
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Composant Textarea DSFR
|
|
253
|
+
* Même style que l'input avec border-radius en haut et bordure inférieure
|
|
254
|
+
*/
|
|
255
|
+
const textareaVariants = cva(
|
|
256
|
+
// Base DSFR : border-radius en haut, fond adaptatif, bordure inférieure
|
|
257
|
+
'flex min-h-[120px] w-full rounded-t border-0 text-base leading-6 transition-colors placeholder:text-muted-foreground placeholder:italic focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 resize-y',
|
|
258
|
+
{
|
|
259
|
+
variants: {
|
|
260
|
+
variant: {
|
|
261
|
+
// Default : fond adaptatif, bordure inférieure grise
|
|
262
|
+
default:
|
|
263
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.border-contrast)] focus:shadow-[inset_0_-2px_0_0_theme(colors.ring)]',
|
|
264
|
+
// Error : bordure inférieure rouge
|
|
265
|
+
error:
|
|
266
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.destructive.DEFAULT)] focus:shadow-[inset_0_-2px_0_0_theme(colors.destructive.DEFAULT)]',
|
|
267
|
+
// Success : bordure inférieure verte
|
|
268
|
+
success:
|
|
269
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.success.DEFAULT)] focus:shadow-[inset_0_-2px_0_0_theme(colors.success.DEFAULT)]',
|
|
270
|
+
// Info : bordure inférieure bleue
|
|
271
|
+
info:
|
|
272
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.info.DEFAULT)] focus:shadow-[inset_0_-2px_0_0_theme(colors.info.DEFAULT)]',
|
|
273
|
+
// Warning : bordure inférieure orange
|
|
274
|
+
warning:
|
|
275
|
+
'bg-muted text-foreground shadow-[inset_0_-2px_0_0_theme(colors.warning.DEFAULT)] focus:shadow-[inset_0_-2px_0_0_theme(colors.warning.DEFAULT)]',
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
defaultVariants: {
|
|
279
|
+
variant: 'default',
|
|
280
|
+
},
|
|
281
|
+
}
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
export interface TextareaProps
|
|
285
|
+
extends React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
|
286
|
+
VariantProps<typeof textareaVariants> {
|
|
287
|
+
label?: string
|
|
288
|
+
error?: string
|
|
289
|
+
success?: string
|
|
290
|
+
info?: string
|
|
291
|
+
warning?: string
|
|
292
|
+
hint?: string
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
296
|
+
({ className, variant, label, error, success, info, warning, hint, id, ...props }, ref) => {
|
|
297
|
+
const generatedId = React.useId()
|
|
298
|
+
const textareaId = id || generatedId
|
|
299
|
+
const inputOrGeneratedId = textareaId
|
|
300
|
+
const errorId = `${inputOrGeneratedId}-error`
|
|
301
|
+
const successId = `${inputOrGeneratedId}-success`
|
|
302
|
+
const infoId = `${inputOrGeneratedId}-info`
|
|
303
|
+
const warningId = `${inputOrGeneratedId}-warning`
|
|
304
|
+
const hintId = `${inputOrGeneratedId}-hint`
|
|
305
|
+
|
|
306
|
+
const isError = !!error
|
|
307
|
+
const isSuccess = !!success && !isError
|
|
308
|
+
const isWarning = !!warning && !isError && !isSuccess
|
|
309
|
+
const isInfo = !!info && !isError && !isSuccess && !isWarning
|
|
310
|
+
|
|
311
|
+
const inputStateVariant = isError ? 'error' : isSuccess ? 'success' : isWarning ? 'warning' : isInfo ? 'info' : variant
|
|
312
|
+
|
|
313
|
+
return (
|
|
314
|
+
<div
|
|
315
|
+
className={cn(
|
|
316
|
+
'w-full space-y-2 relative transition-colors',
|
|
317
|
+
(isError || isSuccess || isWarning || isInfo) && 'pl-4 -ml-[18px] border-l-2',
|
|
318
|
+
isError ? 'border-l-destructive' : isSuccess ? 'border-l-success' : isWarning ? 'border-l-warning' : isInfo ? 'border-l-info' : ''
|
|
319
|
+
)}
|
|
320
|
+
>
|
|
321
|
+
{label && (
|
|
322
|
+
<label htmlFor={textareaId} className="block text-sm font-medium text-foreground">
|
|
323
|
+
{label}
|
|
324
|
+
{props.required && <span className="text-error ml-1">*</span>}
|
|
325
|
+
</label>
|
|
326
|
+
)}
|
|
327
|
+
|
|
328
|
+
{hint && !isError && !isSuccess && !isWarning && !isInfo && (
|
|
329
|
+
<p id={hintId} className="text-sm text-muted-foreground">
|
|
330
|
+
{hint}
|
|
331
|
+
</p>
|
|
332
|
+
)}
|
|
333
|
+
|
|
334
|
+
<textarea
|
|
335
|
+
id={textareaId}
|
|
336
|
+
className={cn(textareaVariants({ variant: inputStateVariant, className }), 'px-4 py-2')}
|
|
337
|
+
ref={ref}
|
|
338
|
+
aria-invalid={isError ? 'true' : 'false'}
|
|
339
|
+
aria-describedby={isError ? errorId : isSuccess ? successId : isWarning ? warningId : isInfo ? infoId : hint ? hintId : undefined}
|
|
340
|
+
{...props}
|
|
341
|
+
/>
|
|
342
|
+
|
|
343
|
+
{isError && (
|
|
344
|
+
<p id={errorId} className="text-sm text-error font-medium flex items-center space-x-1">
|
|
345
|
+
<ErrorIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
346
|
+
<span>{error}</span>
|
|
347
|
+
</p>
|
|
348
|
+
)}
|
|
349
|
+
|
|
350
|
+
{isSuccess && (
|
|
351
|
+
<p
|
|
352
|
+
id={successId}
|
|
353
|
+
className="text-sm text-success font-medium flex items-center space-x-1"
|
|
354
|
+
>
|
|
355
|
+
<SuccessIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
356
|
+
<span>{success}</span>
|
|
357
|
+
</p>
|
|
358
|
+
)}
|
|
359
|
+
|
|
360
|
+
{isWarning && (
|
|
361
|
+
<p
|
|
362
|
+
id={warningId}
|
|
363
|
+
className="text-sm text-warning font-medium flex items-center space-x-1"
|
|
364
|
+
>
|
|
365
|
+
<WarningIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
366
|
+
<span>{warning}</span>
|
|
367
|
+
</p>
|
|
368
|
+
)}
|
|
369
|
+
|
|
370
|
+
{isInfo && (
|
|
371
|
+
<p
|
|
372
|
+
id={infoId}
|
|
373
|
+
className="text-sm text-info font-medium flex items-center space-x-1"
|
|
374
|
+
>
|
|
375
|
+
<InfoIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
376
|
+
<span>{info}</span>
|
|
377
|
+
</p>
|
|
378
|
+
)}
|
|
379
|
+
</div>
|
|
380
|
+
)
|
|
381
|
+
}
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
Textarea.displayName = 'Textarea'
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Composant PasswordInput DSFR
|
|
388
|
+
* Champ mot de passe avec bouton "Afficher/Masquer" intégré
|
|
389
|
+
*/
|
|
390
|
+
const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(
|
|
391
|
+
({ className, variant, inputSize, label, error, success, info, warning, hint, id, ...props }, ref) => {
|
|
392
|
+
const generatedId = React.useId()
|
|
393
|
+
const inputId = id || generatedId
|
|
394
|
+
const inputOrGeneratedId = inputId
|
|
395
|
+
const errorId = `${inputOrGeneratedId}-error`
|
|
396
|
+
const successId = `${inputOrGeneratedId}-success`
|
|
397
|
+
const infoId = `${inputOrGeneratedId}-info`
|
|
398
|
+
const warningId = `${inputOrGeneratedId}-warning`
|
|
399
|
+
const hintId = `${inputOrGeneratedId}-hint`
|
|
400
|
+
const [showPassword, setShowPassword] = React.useState(false)
|
|
401
|
+
|
|
402
|
+
const isError = !!error
|
|
403
|
+
const isSuccess = !!success && !isError
|
|
404
|
+
const isWarning = !!warning && !isError && !isSuccess
|
|
405
|
+
const isInfo = !!info && !isError && !isSuccess && !isWarning
|
|
406
|
+
|
|
407
|
+
const inputStateVariant = isError ? 'error' : isSuccess ? 'success' : isWarning ? 'warning' : isInfo ? 'info' : variant
|
|
408
|
+
|
|
409
|
+
return (
|
|
410
|
+
<div
|
|
411
|
+
className={cn(
|
|
412
|
+
'w-full space-y-2 relative transition-colors',
|
|
413
|
+
(isError || isSuccess || isWarning || isInfo) && 'pl-4 -ml-[18px] border-l-2',
|
|
414
|
+
isError ? 'border-l-destructive' : isSuccess ? 'border-l-success' : isWarning ? 'border-l-warning' : isInfo ? 'border-l-info' : ''
|
|
415
|
+
)}
|
|
416
|
+
>
|
|
417
|
+
{label && (
|
|
418
|
+
<label htmlFor={inputId} className="block text-sm font-medium text-foreground">
|
|
419
|
+
{label}
|
|
420
|
+
{props.required && <span className="text-error ml-1">*</span>}
|
|
421
|
+
</label>
|
|
422
|
+
)}
|
|
423
|
+
|
|
424
|
+
{hint && !isError && !isSuccess && !isWarning && !isInfo && (
|
|
425
|
+
<p id={hintId} className="text-sm text-muted-foreground">
|
|
426
|
+
{hint}
|
|
427
|
+
</p>
|
|
428
|
+
)}
|
|
429
|
+
|
|
430
|
+
<div className="relative">
|
|
431
|
+
<input
|
|
432
|
+
id={inputId}
|
|
433
|
+
type={showPassword ? 'text' : 'password'}
|
|
434
|
+
className={cn(
|
|
435
|
+
inputVariants({ variant: inputStateVariant, inputSize }),
|
|
436
|
+
'pr-24', // Padding for the button
|
|
437
|
+
className
|
|
438
|
+
)}
|
|
439
|
+
ref={ref}
|
|
440
|
+
aria-invalid={isError ? 'true' : 'false'}
|
|
441
|
+
aria-describedby={isError ? errorId : isSuccess ? successId : isWarning ? warningId : isInfo ? infoId : hint ? hintId : undefined}
|
|
442
|
+
{...props}
|
|
443
|
+
/>
|
|
444
|
+
<button
|
|
445
|
+
type="button"
|
|
446
|
+
className="absolute right-3 top-1/2 -translate-y-1/2 w-8 h-8 flex items-center justify-center rounded-md text-primary hover:bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
447
|
+
onClick={() => setShowPassword((prev) => !prev)}
|
|
448
|
+
aria-controls={inputId}
|
|
449
|
+
title={showPassword ? 'Masquer le mot de passe' : 'Afficher le mot de passe'}
|
|
450
|
+
>
|
|
451
|
+
<span className="sr-only">{showPassword ? 'Masquer' : 'Afficher'}</span>
|
|
452
|
+
{showPassword ? <EyeOffIcon className="w-5 h-5" /> : <EyeIcon className="w-5 h-5" />}
|
|
453
|
+
</button>
|
|
454
|
+
</div>
|
|
455
|
+
|
|
456
|
+
{isError && (
|
|
457
|
+
<p id={errorId} className="text-sm text-error font-medium flex items-center space-x-1">
|
|
458
|
+
<ErrorIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
459
|
+
<span>{error}</span>
|
|
460
|
+
</p>
|
|
461
|
+
)}
|
|
462
|
+
|
|
463
|
+
{isSuccess && (
|
|
464
|
+
<p
|
|
465
|
+
id={successId}
|
|
466
|
+
className="text-sm text-success font-medium flex items-center space-x-1"
|
|
467
|
+
>
|
|
468
|
+
<SuccessIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
469
|
+
<span>{success}</span>
|
|
470
|
+
</p>
|
|
471
|
+
)}
|
|
472
|
+
|
|
473
|
+
{isWarning && (
|
|
474
|
+
<p
|
|
475
|
+
id={warningId}
|
|
476
|
+
className="text-sm text-warning font-medium flex items-center space-x-1"
|
|
477
|
+
>
|
|
478
|
+
<WarningIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
479
|
+
<span>{warning}</span>
|
|
480
|
+
</p>
|
|
481
|
+
)}
|
|
482
|
+
|
|
483
|
+
{isInfo && (
|
|
484
|
+
<p
|
|
485
|
+
id={infoId}
|
|
486
|
+
className="text-sm text-info font-medium flex items-center space-x-1"
|
|
487
|
+
>
|
|
488
|
+
<InfoIcon className="w-4 h-4 shrink-0" aria-hidden="true" />
|
|
489
|
+
<span>{info}</span>
|
|
490
|
+
</p>
|
|
491
|
+
)}
|
|
492
|
+
</div>
|
|
493
|
+
)
|
|
494
|
+
}
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
PasswordInput.displayName = 'PasswordInput'
|
|
498
|
+
|
|
499
|
+
export { Input, inputVariants, PasswordInput, Textarea, textareaVariants }
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* @example
|
|
503
|
+
* ```tsx
|
|
504
|
+
* <Input label="Nom" placeholder="Saisissez votre nom" />
|
|
505
|
+
* <Textarea label="Message" rows={4} />
|
|
506
|
+
* <PasswordInput label="Mot de passe" />
|
|
507
|
+
* ```
|
|
508
|
+
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Slot } from '@radix-ui/react-slot'
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
import { cn } from '../../lib/utils'
|
|
4
|
+
|
|
5
|
+
export interface KbdProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
asChild?: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Kbd = React.forwardRef<HTMLElement, KbdProps>(
|
|
10
|
+
({ className, asChild = false, ...props }, ref) => {
|
|
11
|
+
const Comp = asChild ? Slot : 'kbd'
|
|
12
|
+
return (
|
|
13
|
+
<Comp
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn(
|
|
16
|
+
'pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
Kbd.displayName = 'Kbd'
|
|
25
|
+
|
|
26
|
+
export { Kbd }
|