@dev-dga/react 0.11.0 → 0.12.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/CHANGELOG.md +81 -0
- package/dist/chunk-2I7URBEK.js +1 -0
- package/dist/chunk-2MDYDWAH.js +79 -0
- package/dist/chunk-2MDYDWAH.js.map +1 -0
- package/dist/chunk-36AIVLVG.cjs +79 -0
- package/dist/chunk-36AIVLVG.cjs.map +1 -0
- package/dist/chunk-3IEUUZKJ.cjs +1 -0
- package/dist/{chunk-G3M3XYMI.cjs.map → chunk-3IEUUZKJ.cjs.map} +1 -1
- package/dist/{chunk-AYIS62JR.cjs → chunk-3JHIEAJG.cjs} +54 -42
- package/dist/chunk-3JHIEAJG.cjs.map +1 -0
- package/dist/chunk-3UT22WQM.cjs +22 -0
- package/dist/chunk-3UT22WQM.cjs.map +1 -0
- package/dist/chunk-42MOUC3M.cjs +1 -0
- package/dist/{chunk-I44YNYI6.cjs.map → chunk-42MOUC3M.cjs.map} +1 -1
- package/dist/chunk-44S33DGQ.js +1 -0
- package/dist/chunk-4HBVLISS.js +169 -0
- package/dist/chunk-4HBVLISS.js.map +1 -0
- package/dist/chunk-4LHIVDAH.js +1 -0
- package/dist/chunk-4RCQFLSE.cjs +114 -0
- package/dist/chunk-4RCQFLSE.cjs.map +1 -0
- package/dist/chunk-4WQLBIL5.cjs +1 -0
- package/dist/{chunk-ISUDUZEG.cjs.map → chunk-4WQLBIL5.cjs.map} +1 -1
- package/dist/chunk-4WUUV44R.js +1 -0
- package/dist/chunk-4WXBRKGZ.cjs +375 -0
- package/dist/chunk-4WXBRKGZ.cjs.map +1 -0
- package/dist/chunk-54KSDBGC.js +260 -0
- package/dist/chunk-54KSDBGC.js.map +1 -0
- package/dist/chunk-55RHNN3T.js +116 -0
- package/dist/chunk-55RHNN3T.js.map +1 -0
- package/dist/chunk-5DBKWVTZ.js +1 -0
- package/dist/chunk-5GDTEDDH.js +503 -0
- package/dist/chunk-5GDTEDDH.js.map +1 -0
- package/dist/chunk-5N6CFYT6.cjs +256 -0
- package/dist/chunk-5N6CFYT6.cjs.map +1 -0
- package/dist/{chunk-UK2SFZIQ.cjs → chunk-5NENDJOM.cjs} +21 -26
- package/dist/chunk-5NENDJOM.cjs.map +1 -0
- package/dist/chunk-5X2XQMGC.js +178 -0
- package/dist/chunk-5X2XQMGC.js.map +1 -0
- package/dist/chunk-6CDZ7ZBG.js +85 -0
- package/dist/chunk-6CDZ7ZBG.js.map +1 -0
- package/dist/{chunk-KPZ5T4DW.cjs → chunk-6G2BJQZL.cjs} +3 -3
- package/dist/{chunk-KPZ5T4DW.cjs.map → chunk-6G2BJQZL.cjs.map} +1 -1
- package/dist/chunk-6HRQMDI3.js +95 -0
- package/dist/chunk-6HRQMDI3.js.map +1 -0
- package/dist/{chunk-RZEJPDIW.js → chunk-6LV62GNU.js} +5 -5
- package/dist/chunk-6LV62GNU.js.map +1 -0
- package/dist/chunk-6POW3HXX.js +73 -0
- package/dist/chunk-6POW3HXX.js.map +1 -0
- package/dist/chunk-6UFDUJZI.cjs +124 -0
- package/dist/chunk-6UFDUJZI.cjs.map +1 -0
- package/dist/chunk-7BOSIHW6.cjs +173 -0
- package/dist/chunk-7BOSIHW6.cjs.map +1 -0
- package/dist/chunk-7EEKESAA.js +167 -0
- package/dist/chunk-7EEKESAA.js.map +1 -0
- package/dist/chunk-7F24FFIV.cjs +260 -0
- package/dist/chunk-7F24FFIV.cjs.map +1 -0
- package/dist/{chunk-6BZMLKCU.cjs → chunk-7GAELGEB.cjs} +47 -20
- package/dist/chunk-7GAELGEB.cjs.map +1 -0
- package/dist/{chunk-EM55NWUF.js → chunk-7GWM7F5C.js} +46 -34
- package/dist/chunk-7GWM7F5C.js.map +1 -0
- package/dist/chunk-7PSLMVCX.js +1 -0
- package/dist/{chunk-RNOXGWKQ.cjs → chunk-A4HS7CYD.cjs} +35 -18
- package/dist/chunk-A4HS7CYD.cjs.map +1 -0
- package/dist/chunk-A6S4V3IG.cjs +1 -0
- package/dist/{chunk-IUEAUTR7.cjs.map → chunk-A6S4V3IG.cjs.map} +1 -1
- package/dist/{chunk-4T6QBG46.cjs → chunk-AJXGXUBN.cjs} +29 -17
- package/dist/chunk-AJXGXUBN.cjs.map +1 -0
- package/dist/{chunk-5EUEJU47.js → chunk-AMF37AOD.js} +21 -3
- package/dist/chunk-AMF37AOD.js.map +1 -0
- package/dist/chunk-AMYFRY7K.js +1 -0
- package/dist/chunk-ANHZT2X2.js +256 -0
- package/dist/chunk-ANHZT2X2.js.map +1 -0
- package/dist/{chunk-PKJUCI7B.js → chunk-APD5WA65.js} +2 -2
- package/dist/chunk-AVHWS36I.js +1 -0
- package/dist/chunk-AZXCLCIV.cjs +1 -0
- package/dist/chunk-AZXCLCIV.cjs.map +1 -0
- package/dist/{chunk-EXAPMLPA.cjs → chunk-BNCUXVZF.cjs} +3 -3
- package/dist/{chunk-EXAPMLPA.cjs.map → chunk-BNCUXVZF.cjs.map} +1 -1
- package/dist/{chunk-SNLIKIJP.js → chunk-BP6BOEVE.js} +2 -2
- package/dist/{chunk-4A7BAISU.js → chunk-BQZ4XAYH.js} +34 -27
- package/dist/chunk-BQZ4XAYH.js.map +1 -0
- package/dist/chunk-BYSA3YCV.cjs +309 -0
- package/dist/chunk-BYSA3YCV.cjs.map +1 -0
- package/dist/chunk-C37NYN62.cjs +1 -0
- package/dist/chunk-C37NYN62.cjs.map +1 -0
- package/dist/chunk-CNY63MC2.cjs +1 -0
- package/dist/chunk-CNY63MC2.cjs.map +1 -0
- package/dist/{chunk-NDHMY3IR.js → chunk-CUGEH7EB.js} +11 -3
- package/dist/chunk-CUGEH7EB.js.map +1 -0
- package/dist/{chunk-NUC6WJU4.cjs → chunk-CUOYBYI4.cjs} +8 -8
- package/dist/{chunk-NUC6WJU4.cjs.map → chunk-CUOYBYI4.cjs.map} +1 -1
- package/dist/chunk-CWUZ4SZN.js +1 -0
- package/dist/{chunk-QGK2KYQS.js → chunk-CYHSWWH6.js} +18 -8
- package/dist/chunk-CYHSWWH6.js.map +1 -0
- package/dist/{chunk-GMBIFJOA.cjs → chunk-DAKCNDN5.cjs} +19 -9
- package/dist/chunk-DAKCNDN5.cjs.map +1 -0
- package/dist/chunk-DI52GZLA.cjs +116 -0
- package/dist/chunk-DI52GZLA.cjs.map +1 -0
- package/dist/{chunk-4U5TTO6E.cjs → chunk-DU4YQEIM.cjs} +71 -28
- package/dist/chunk-DU4YQEIM.cjs.map +1 -0
- package/dist/chunk-DUJCV2NZ.cjs +1 -0
- package/dist/chunk-DUJCV2NZ.cjs.map +1 -0
- package/dist/{chunk-YH44Q6CI.cjs → chunk-DVKPFWP2.cjs} +7 -7
- package/dist/{chunk-YH44Q6CI.cjs.map → chunk-DVKPFWP2.cjs.map} +1 -1
- package/dist/chunk-DWCTUNFU.cjs +85 -0
- package/dist/chunk-DWCTUNFU.cjs.map +1 -0
- package/dist/chunk-E5ZIKIGB.js +22 -0
- package/dist/chunk-E5ZIKIGB.js.map +1 -0
- package/dist/chunk-EMXKYSUI.cjs +341 -0
- package/dist/chunk-EMXKYSUI.cjs.map +1 -0
- package/dist/chunk-EQINOHB6.cjs +169 -0
- package/dist/chunk-EQINOHB6.cjs.map +1 -0
- package/dist/chunk-EY5XTOWH.cjs +45 -0
- package/dist/chunk-EY5XTOWH.cjs.map +1 -0
- package/dist/chunk-EZRPCQSP.js +272 -0
- package/dist/chunk-EZRPCQSP.js.map +1 -0
- package/dist/chunk-F5YD6T5D.js +1 -0
- package/dist/chunk-FF4QNJOQ.js +149 -0
- package/dist/chunk-FF4QNJOQ.js.map +1 -0
- package/dist/chunk-FFGALWM2.js +1113 -0
- package/dist/chunk-FFGALWM2.js.map +1 -0
- package/dist/chunk-FFUNMWQV.cjs +1 -0
- package/dist/chunk-FFUNMWQV.cjs.map +1 -0
- package/dist/chunk-FO7IICMM.js +61 -0
- package/dist/chunk-FO7IICMM.js.map +1 -0
- package/dist/{chunk-CGCO7RFO.js → chunk-FPXFD5XT.js} +2 -2
- package/dist/chunk-FQZ6F7FQ.cjs +1 -0
- package/dist/chunk-FQZ6F7FQ.cjs.map +1 -0
- package/dist/{chunk-CBCUQUHI.cjs → chunk-FUFFG2UW.cjs} +38 -12
- package/dist/chunk-FUFFG2UW.cjs.map +1 -0
- package/dist/{chunk-YVQOUGWG.cjs → chunk-FV6E33FY.cjs} +25 -11
- package/dist/chunk-FV6E33FY.cjs.map +1 -0
- package/dist/chunk-G6LUBXN2.js +271 -0
- package/dist/chunk-G6LUBXN2.js.map +1 -0
- package/dist/chunk-G6ZOJVIG.cjs +271 -0
- package/dist/chunk-G6ZOJVIG.cjs.map +1 -0
- package/dist/{chunk-TT2DEREM.js → chunk-GCOBDP4W.js} +37 -20
- package/dist/chunk-GCOBDP4W.js.map +1 -0
- package/dist/chunk-GEVXV4RL.js +309 -0
- package/dist/chunk-GEVXV4RL.js.map +1 -0
- package/dist/{chunk-Y5IWUJF7.js → chunk-GHJEE4NW.js} +3 -11
- package/dist/chunk-GHJEE4NW.js.map +1 -0
- package/dist/chunk-GIHJ4J47.js +1 -0
- package/dist/{chunk-4RU33BRQ.js → chunk-GQAX2CH6.js} +20 -25
- package/dist/chunk-GQAX2CH6.js.map +1 -0
- package/dist/{chunk-NJIMQWBC.js → chunk-GS7QTYLD.js} +43 -23
- package/dist/chunk-GS7QTYLD.js.map +1 -0
- package/dist/{chunk-D4ZUV7FD.cjs → chunk-GUI2LDJZ.cjs} +5 -13
- package/dist/chunk-GUI2LDJZ.cjs.map +1 -0
- package/dist/chunk-GXF5IZEX.cjs +264 -0
- package/dist/chunk-GXF5IZEX.cjs.map +1 -0
- package/dist/{chunk-TM3FOGLK.cjs → chunk-GYUQ5TEQ.cjs} +1 -1
- package/dist/chunk-GYUQ5TEQ.cjs.map +1 -0
- package/dist/chunk-H2HKUDBZ.js +1 -0
- package/dist/chunk-H6AWWJHL.cjs +1 -0
- package/dist/chunk-H6AWWJHL.cjs.map +1 -0
- package/dist/{chunk-VSC3A6VB.cjs → chunk-H7QU5L7R.cjs} +14 -4
- package/dist/chunk-H7QU5L7R.cjs.map +1 -0
- package/dist/{chunk-WB5AEG5D.cjs → chunk-HC2H35U2.cjs} +57 -15
- package/dist/chunk-HC2H35U2.cjs.map +1 -0
- package/dist/{chunk-ZKYBLXU7.js → chunk-HMXCWHVT.js} +6 -14
- package/dist/chunk-HMXCWHVT.js.map +1 -0
- package/dist/{chunk-P2JM7CUD.cjs → chunk-HTKCQZIJ.cjs} +5 -5
- package/dist/chunk-HTKCQZIJ.cjs.map +1 -0
- package/dist/{chunk-I6BOBHO6.cjs → chunk-IFZWOLDF.cjs} +37 -12
- package/dist/chunk-IFZWOLDF.cjs.map +1 -0
- package/dist/chunk-IJ5F5RUW.cjs +1 -0
- package/dist/chunk-IJ5F5RUW.cjs.map +1 -0
- package/dist/{chunk-ATOT5N34.cjs → chunk-IM6TYL3P.cjs} +3 -3
- package/dist/{chunk-ATOT5N34.cjs.map → chunk-IM6TYL3P.cjs.map} +1 -1
- package/dist/chunk-IMW6TRMU.cjs +1 -0
- package/dist/chunk-IMW6TRMU.cjs.map +1 -0
- package/dist/{chunk-3X7ORLG5.cjs → chunk-J7XCG6SX.cjs} +4 -4
- package/dist/{chunk-3X7ORLG5.cjs.map → chunk-J7XCG6SX.cjs.map} +1 -1
- package/dist/chunk-JAMYRBHS.js +375 -0
- package/dist/chunk-JAMYRBHS.js.map +1 -0
- package/dist/{chunk-NQGCAXTW.cjs → chunk-JCOUZVG3.cjs} +26 -10
- package/dist/chunk-JCOUZVG3.cjs.map +1 -0
- package/dist/chunk-JWOG4I4P.js +130 -0
- package/dist/chunk-JWOG4I4P.js.map +1 -0
- package/dist/chunk-JXATJSBR.js +45 -0
- package/dist/chunk-JXATJSBR.js.map +1 -0
- package/dist/chunk-K27GNXBF.cjs +272 -0
- package/dist/chunk-K27GNXBF.cjs.map +1 -0
- package/dist/{chunk-3VOOMW6O.js → chunk-KDV7V5S4.js} +2 -2
- package/dist/chunk-KSEN4ESR.js +230 -0
- package/dist/chunk-KSEN4ESR.js.map +1 -0
- package/dist/chunk-LEDIOXDM.js +341 -0
- package/dist/chunk-LEDIOXDM.js.map +1 -0
- package/dist/chunk-MKQBAQIH.js +1 -0
- package/dist/chunk-MS6HASC6.js +1 -0
- package/dist/chunk-MVKIXWKJ.js +114 -0
- package/dist/chunk-MVKIXWKJ.js.map +1 -0
- package/dist/{chunk-BGS3MCQZ.cjs → chunk-NH7XLE7E.cjs} +6 -14
- package/dist/chunk-NH7XLE7E.cjs.map +1 -0
- package/dist/chunk-NJIQJHJS.js +264 -0
- package/dist/chunk-NJIQJHJS.js.map +1 -0
- package/dist/{chunk-HBAHWCBK.js → chunk-NKCBDSI2.js} +3 -3
- package/dist/chunk-NL4LM47X.cjs +178 -0
- package/dist/chunk-NL4LM47X.cjs.map +1 -0
- package/dist/chunk-NOXQQACO.js +173 -0
- package/dist/chunk-NOXQQACO.js.map +1 -0
- package/dist/{chunk-VNITXANA.js → chunk-NS4IRTKQ.js} +1 -1
- package/dist/chunk-NS4IRTKQ.js.map +1 -0
- package/dist/chunk-NT6EEI44.cjs +86 -0
- package/dist/chunk-NT6EEI44.cjs.map +1 -0
- package/dist/chunk-NVCOEKCU.js +1 -0
- package/dist/chunk-O7BBEN7E.cjs +503 -0
- package/dist/chunk-O7BBEN7E.cjs.map +1 -0
- package/dist/{chunk-BBGCS5PZ.cjs → chunk-ODNO43HV.cjs} +6 -6
- package/dist/chunk-ODNO43HV.cjs.map +1 -0
- package/dist/chunk-ORRYZCLQ.cjs +1 -0
- package/dist/chunk-ORRYZCLQ.cjs.map +1 -0
- package/dist/{chunk-MCHL23CE.js → chunk-P7XKSXHH.js} +49 -34
- package/dist/chunk-P7XKSXHH.js.map +1 -0
- package/dist/chunk-PLLUSKME.cjs +95 -0
- package/dist/chunk-PLLUSKME.cjs.map +1 -0
- package/dist/chunk-PLT3EZZ5.js +194 -0
- package/dist/chunk-PLT3EZZ5.js.map +1 -0
- package/dist/{chunk-UPIDCMZI.cjs → chunk-QCITJAK6.cjs} +74 -17
- package/dist/chunk-QCITJAK6.cjs.map +1 -0
- package/dist/chunk-QE3ZFSJK.js +55 -0
- package/dist/chunk-QE3ZFSJK.js.map +1 -0
- package/dist/chunk-QG3PLYK6.js +53 -0
- package/dist/chunk-QG3PLYK6.js.map +1 -0
- package/dist/chunk-QLV4RQVQ.cjs +230 -0
- package/dist/chunk-QLV4RQVQ.cjs.map +1 -0
- package/dist/chunk-QU32POS4.js +150 -0
- package/dist/chunk-QU32POS4.js.map +1 -0
- package/dist/{chunk-C3YKGPQM.cjs → chunk-REDX5DCT.cjs} +34 -27
- package/dist/chunk-REDX5DCT.cjs.map +1 -0
- package/dist/{chunk-CNAMOK3Z.cjs → chunk-RH3CQOEI.cjs} +4 -4
- package/dist/{chunk-CNAMOK3Z.cjs.map → chunk-RH3CQOEI.cjs.map} +1 -1
- package/dist/chunk-RQRA5CCA.js +1 -0
- package/dist/chunk-SA7NMDD5.cjs +53 -0
- package/dist/chunk-SA7NMDD5.cjs.map +1 -0
- package/dist/{chunk-WI4WQGF6.cjs → chunk-SJN37JUC.cjs} +57 -42
- package/dist/chunk-SJN37JUC.cjs.map +1 -0
- package/dist/chunk-SOQFBVCQ.cjs +73 -0
- package/dist/chunk-SOQFBVCQ.cjs.map +1 -0
- package/dist/chunk-SZE2JS36.cjs +55 -0
- package/dist/chunk-SZE2JS36.cjs.map +1 -0
- package/dist/chunk-SZMS46F5.js +124 -0
- package/dist/chunk-SZMS46F5.js.map +1 -0
- package/dist/chunk-T2E5XT7P.js +1 -0
- package/dist/{chunk-CISRE6BC.cjs → chunk-T3NVC7UU.cjs} +6 -6
- package/dist/{chunk-CISRE6BC.cjs.map → chunk-T3NVC7UU.cjs.map} +1 -1
- package/dist/{chunk-VAF6PKVY.js → chunk-TG2IDU3W.js} +2 -2
- package/dist/{chunk-SZUMMROW.js → chunk-TNIRKGXY.js} +22 -8
- package/dist/chunk-TNIRKGXY.js.map +1 -0
- package/dist/chunk-TPAVJN55.cjs +1 -0
- package/dist/chunk-TPAVJN55.cjs.map +1 -0
- package/dist/{chunk-IFEWF24B.js → chunk-TPD2GNR6.js} +3 -3
- package/dist/chunk-TPNCV7KA.js +1 -0
- package/dist/{chunk-PZWJQNCY.cjs → chunk-TYZIRV75.cjs} +19 -11
- package/dist/chunk-TYZIRV75.cjs.map +1 -0
- package/dist/chunk-U24PBXZA.cjs +130 -0
- package/dist/chunk-U24PBXZA.cjs.map +1 -0
- package/dist/chunk-U7SCEB34.js +181 -0
- package/dist/chunk-U7SCEB34.js.map +1 -0
- package/dist/{chunk-BGKYCKNM.cjs → chunk-UGQBOWHR.cjs} +6 -6
- package/dist/{chunk-BGKYCKNM.cjs.map → chunk-UGQBOWHR.cjs.map} +1 -1
- package/dist/{chunk-BS3UEJ5G.js → chunk-UV4Q3LRC.js} +28 -16
- package/dist/chunk-UV4Q3LRC.js.map +1 -0
- package/dist/chunk-VB5VOUED.js +1 -0
- package/dist/{chunk-M5ZXQ2QS.js → chunk-VEFRVKSA.js} +60 -18
- package/dist/chunk-VEFRVKSA.js.map +1 -0
- package/dist/chunk-VISVU5LS.js +41 -0
- package/dist/chunk-VISVU5LS.js.map +1 -0
- package/dist/{chunk-MQN6A3CE.js → chunk-VJV3K53D.js} +17 -9
- package/dist/chunk-VJV3K53D.js.map +1 -0
- package/dist/chunk-VMR4KVFM.cjs +1 -0
- package/dist/chunk-VMR4KVFM.cjs.map +1 -0
- package/dist/{chunk-JWUYPAFC.cjs → chunk-VN2YHNUE.cjs} +43 -23
- package/dist/chunk-VN2YHNUE.cjs.map +1 -0
- package/dist/{chunk-GVND3JE3.js → chunk-VRPFA4CN.js} +2 -2
- package/dist/chunk-VYP5GX57.cjs +167 -0
- package/dist/chunk-VYP5GX57.cjs.map +1 -0
- package/dist/{chunk-DEC2WM3G.js → chunk-WGCK6KKL.js} +36 -10
- package/dist/chunk-WGCK6KKL.js.map +1 -0
- package/dist/{chunk-66EVFQVL.js → chunk-WHKNCDTX.js} +3 -3
- package/dist/{chunk-MGZO7MBN.cjs → chunk-WOTSK33U.cjs} +23 -5
- package/dist/chunk-WOTSK33U.cjs.map +1 -0
- package/dist/{chunk-BTP7G7WR.js → chunk-WRCHASO2.js} +5 -5
- package/dist/chunk-WRCHASO2.js.map +1 -0
- package/dist/{chunk-FI65HI2H.js → chunk-WRUVDZRI.js} +49 -22
- package/dist/chunk-WRUVDZRI.js.map +1 -0
- package/dist/chunk-WUSHGDHJ.cjs +1 -0
- package/dist/chunk-WUSHGDHJ.cjs.map +1 -0
- package/dist/{chunk-XCR3TPXT.js → chunk-XB6YHZAG.js} +70 -27
- package/dist/chunk-XB6YHZAG.js.map +1 -0
- package/dist/{chunk-AV6BIQQA.js → chunk-Y2E2RLBI.js} +14 -4
- package/dist/chunk-Y2E2RLBI.js.map +1 -0
- package/dist/chunk-YCIZERNO.cjs +150 -0
- package/dist/chunk-YCIZERNO.cjs.map +1 -0
- package/dist/chunk-YD2UW3PB.js +1 -0
- package/dist/chunk-YOKOPO2W.cjs +181 -0
- package/dist/chunk-YOKOPO2W.cjs.map +1 -0
- package/dist/chunk-YS2JJ73M.cjs +1113 -0
- package/dist/chunk-YS2JJ73M.cjs.map +1 -0
- package/dist/chunk-YS3BV5KJ.cjs +41 -0
- package/dist/chunk-YS3BV5KJ.cjs.map +1 -0
- package/dist/chunk-YUW5S2BZ.cjs +1 -0
- package/dist/chunk-YUW5S2BZ.cjs.map +1 -0
- package/dist/chunk-Z2LJBEIV.cjs +149 -0
- package/dist/chunk-Z2LJBEIV.cjs.map +1 -0
- package/dist/{chunk-TTHWYBQB.cjs → chunk-Z6YQH5SZ.cjs} +11 -3
- package/dist/chunk-Z6YQH5SZ.cjs.map +1 -0
- package/dist/chunk-Z6ZCVVNU.js +86 -0
- package/dist/chunk-Z6ZCVVNU.js.map +1 -0
- package/dist/{chunk-JOJ23OD4.js → chunk-ZNDJS2W7.js} +36 -11
- package/dist/chunk-ZNDJS2W7.js.map +1 -0
- package/dist/chunk-ZNUMOJOI.cjs +1 -0
- package/dist/chunk-ZNUMOJOI.cjs.map +1 -0
- package/dist/chunk-ZYPPXGI7.cjs +1 -0
- package/dist/chunk-ZYPPXGI7.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.cjs +3 -3
- package/dist/components/Accordion/Accordion.js +2 -2
- package/dist/components/Accordion/index.cjs +3 -3
- package/dist/components/Accordion/index.js +2 -2
- package/dist/components/Avatar/Avatar.cjs +2 -2
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/Avatar/index.cjs +2 -2
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.cjs +5 -3
- package/dist/components/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +4 -2
- package/dist/components/Breadcrumb/index.cjs +5 -3
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.js +4 -2
- package/dist/components/Button/Button.cjs +3 -3
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/index.cjs +3 -3
- package/dist/components/Button/index.js +2 -2
- package/dist/components/Card/Card.cjs +9 -2
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.js +8 -1
- package/dist/components/Card/index.cjs +9 -2
- package/dist/components/Card/index.cjs.map +1 -1
- package/dist/components/Card/index.js +8 -1
- package/dist/components/Carousel/Carousel.cjs +26 -0
- package/dist/components/Carousel/Carousel.cjs.map +1 -0
- package/dist/components/Carousel/Carousel.js +26 -0
- package/dist/components/Carousel/index.cjs +26 -0
- package/dist/components/Carousel/index.cjs.map +1 -0
- package/dist/components/Carousel/index.js +26 -0
- package/dist/components/Charts/Charts.cjs +14 -0
- package/dist/components/Charts/Charts.cjs.map +1 -0
- package/dist/components/Charts/Charts.js +14 -0
- package/dist/components/Charts/index.cjs +14 -0
- package/dist/components/Charts/index.cjs.map +1 -0
- package/dist/components/Charts/index.js +14 -0
- package/dist/components/Charts/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.cjs +4 -4
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/index.cjs +4 -4
- package/dist/components/Checkbox/index.js +3 -3
- package/dist/components/Chip/Chip.cjs +11 -0
- package/dist/components/Chip/Chip.cjs.map +1 -0
- package/dist/components/Chip/Chip.js +11 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Chip/index.cjs +11 -0
- package/dist/components/Chip/index.cjs.map +1 -0
- package/dist/components/Chip/index.js +11 -0
- package/dist/components/Chip/index.js.map +1 -0
- package/dist/components/CodeSnippet/CodeSnippet.cjs +15 -0
- package/dist/components/CodeSnippet/CodeSnippet.cjs.map +1 -0
- package/dist/components/CodeSnippet/CodeSnippet.js +15 -0
- package/dist/components/CodeSnippet/CodeSnippet.js.map +1 -0
- package/dist/components/CodeSnippet/index.cjs +15 -0
- package/dist/components/CodeSnippet/index.cjs.map +1 -0
- package/dist/components/CodeSnippet/index.js +15 -0
- package/dist/components/CodeSnippet/index.js.map +1 -0
- package/dist/components/Command/Command.cjs +3 -3
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/index.cjs +3 -3
- package/dist/components/Command/index.js +2 -2
- package/dist/components/ContentSwitcher/ContentSwitcher.cjs +13 -0
- package/dist/components/ContentSwitcher/ContentSwitcher.cjs.map +1 -0
- package/dist/components/ContentSwitcher/ContentSwitcher.js +13 -0
- package/dist/components/ContentSwitcher/ContentSwitcher.js.map +1 -0
- package/dist/components/ContentSwitcher/index.cjs +13 -0
- package/dist/components/ContentSwitcher/index.cjs.map +1 -0
- package/dist/components/ContentSwitcher/index.js +13 -0
- package/dist/components/ContentSwitcher/index.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.cjs +4 -4
- package/dist/components/DatePicker/DatePicker.js +3 -3
- package/dist/components/DatePicker/index.cjs +4 -4
- package/dist/components/DatePicker/index.js +3 -3
- package/dist/components/DateRangePicker/DateRangePicker.cjs +4 -4
- package/dist/components/DateRangePicker/DateRangePicker.js +3 -3
- package/dist/components/DateRangePicker/index.cjs +4 -4
- package/dist/components/DateRangePicker/index.js +3 -3
- package/dist/components/DigitalStamp/DigitalStamp.cjs +12 -0
- package/dist/components/DigitalStamp/DigitalStamp.cjs.map +1 -0
- package/dist/components/DigitalStamp/DigitalStamp.js +12 -0
- package/dist/components/DigitalStamp/DigitalStamp.js.map +1 -0
- package/dist/components/DigitalStamp/index.cjs +12 -0
- package/dist/components/DigitalStamp/index.cjs.map +1 -0
- package/dist/components/DigitalStamp/index.js +12 -0
- package/dist/components/DigitalStamp/index.js.map +1 -0
- package/dist/components/Divider/Divider.cjs +2 -2
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Divider/index.cjs +2 -2
- package/dist/components/Divider/index.js +1 -1
- package/dist/components/Drawer/Drawer.cjs +3 -3
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/Drawer/index.cjs +3 -3
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/Dropdown/Dropdown.cjs +22 -0
- package/dist/components/Dropdown/Dropdown.cjs.map +1 -0
- package/dist/components/Dropdown/Dropdown.js +22 -0
- package/dist/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/components/Dropdown/index.cjs +22 -0
- package/dist/components/Dropdown/index.cjs.map +1 -0
- package/dist/components/Dropdown/index.js +22 -0
- package/dist/components/Dropdown/index.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.cjs +3 -3
- package/dist/components/DropdownMenu/DropdownMenu.js +2 -2
- package/dist/components/DropdownMenu/index.cjs +3 -3
- package/dist/components/DropdownMenu/index.js +2 -2
- package/dist/components/EmptyState/EmptyState.cjs +3 -3
- package/dist/components/EmptyState/EmptyState.js +2 -2
- package/dist/components/EmptyState/index.cjs +3 -3
- package/dist/components/EmptyState/index.js +2 -2
- package/dist/components/FileUpload/FileUpload.cjs +6 -8
- package/dist/components/FileUpload/FileUpload.cjs.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +5 -7
- package/dist/components/FileUpload/index.cjs +6 -8
- package/dist/components/FileUpload/index.cjs.map +1 -1
- package/dist/components/FileUpload/index.js +5 -7
- package/dist/components/Filtration/Filtration.cjs +44 -0
- package/dist/components/Filtration/Filtration.cjs.map +1 -0
- package/dist/components/Filtration/Filtration.js +44 -0
- package/dist/components/Filtration/Filtration.js.map +1 -0
- package/dist/components/Filtration/index.cjs +44 -0
- package/dist/components/Filtration/index.cjs.map +1 -0
- package/dist/components/Filtration/index.js +44 -0
- package/dist/components/Filtration/index.js.map +1 -0
- package/dist/components/FloatingButton/FloatingButton.cjs +11 -0
- package/dist/components/FloatingButton/FloatingButton.cjs.map +1 -0
- package/dist/components/FloatingButton/FloatingButton.js +11 -0
- package/dist/components/FloatingButton/FloatingButton.js.map +1 -0
- package/dist/components/FloatingButton/index.cjs +11 -0
- package/dist/components/FloatingButton/index.cjs.map +1 -0
- package/dist/components/FloatingButton/index.js +11 -0
- package/dist/components/FloatingButton/index.js.map +1 -0
- package/dist/components/InlineAlert/InlineAlert.cjs +14 -0
- package/dist/components/InlineAlert/InlineAlert.cjs.map +1 -0
- package/dist/components/InlineAlert/InlineAlert.js +14 -0
- package/dist/components/InlineAlert/InlineAlert.js.map +1 -0
- package/dist/components/InlineAlert/index.cjs +14 -0
- package/dist/components/InlineAlert/index.cjs.map +1 -0
- package/dist/components/InlineAlert/index.js +14 -0
- package/dist/components/InlineAlert/index.js.map +1 -0
- package/dist/components/InputOTP/InputOTP.cjs +3 -3
- package/dist/components/InputOTP/InputOTP.js +2 -2
- package/dist/components/InputOTP/index.cjs +3 -3
- package/dist/components/InputOTP/index.js +2 -2
- package/dist/components/Link/Link.cjs +3 -3
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Link/index.cjs +3 -3
- package/dist/components/Link/index.js +2 -2
- package/dist/components/List/List.cjs +2 -8
- package/dist/components/List/List.cjs.map +1 -1
- package/dist/components/List/List.js +1 -7
- package/dist/components/List/index.cjs +2 -8
- package/dist/components/List/index.cjs.map +1 -1
- package/dist/components/List/index.js +1 -7
- package/dist/components/Menubar/Menubar.cjs +3 -3
- package/dist/components/Menubar/Menubar.js +2 -2
- package/dist/components/Menubar/index.cjs +3 -3
- package/dist/components/Menubar/index.js +2 -2
- package/dist/components/Metric/Metric.cjs +16 -0
- package/dist/components/Metric/Metric.cjs.map +1 -0
- package/dist/components/Metric/Metric.js +16 -0
- package/dist/components/Metric/Metric.js.map +1 -0
- package/dist/components/Metric/MetricGroup.cjs +11 -0
- package/dist/components/Metric/MetricGroup.cjs.map +1 -0
- package/dist/components/Metric/MetricGroup.js +11 -0
- package/dist/components/Metric/MetricGroup.js.map +1 -0
- package/dist/components/Metric/index.cjs +22 -0
- package/dist/components/Metric/index.cjs.map +1 -0
- package/dist/components/Metric/index.js +22 -0
- package/dist/components/Metric/index.js.map +1 -0
- package/dist/components/Modal/Modal.cjs +3 -3
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/index.cjs +3 -3
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Notification/Notification.cjs +12 -0
- package/dist/components/Notification/Notification.cjs.map +1 -0
- package/dist/components/Notification/Notification.js +12 -0
- package/dist/components/Notification/Notification.js.map +1 -0
- package/dist/components/Notification/index.cjs +12 -0
- package/dist/components/Notification/index.cjs.map +1 -0
- package/dist/components/Notification/index.js +12 -0
- package/dist/components/Notification/index.js.map +1 -0
- package/dist/components/NotificationToast/NotificationToast.cjs +24 -0
- package/dist/components/NotificationToast/NotificationToast.cjs.map +1 -0
- package/dist/components/NotificationToast/NotificationToast.js +24 -0
- package/dist/components/NotificationToast/NotificationToast.js.map +1 -0
- package/dist/components/NotificationToast/index.cjs +24 -0
- package/dist/components/NotificationToast/index.cjs.map +1 -0
- package/dist/components/NotificationToast/index.js +24 -0
- package/dist/components/NotificationToast/index.js.map +1 -0
- package/dist/components/NotificationToast/toast-store.cjs +14 -0
- package/dist/components/NotificationToast/toast-store.cjs.map +1 -0
- package/dist/components/{Toast → NotificationToast}/toast-store.js +1 -1
- package/dist/components/NotificationToast/toast-store.js.map +1 -0
- package/dist/components/NumberInput/NumberInput.cjs +4 -4
- package/dist/components/NumberInput/NumberInput.js +3 -3
- package/dist/components/NumberInput/index.cjs +4 -4
- package/dist/components/NumberInput/index.js +3 -3
- package/dist/components/Pagination/Pagination.cjs +6 -3
- package/dist/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/components/Pagination/Pagination.js +5 -2
- package/dist/components/Pagination/index.cjs +7 -4
- package/dist/components/Pagination/index.cjs.map +1 -1
- package/dist/components/Pagination/index.js +8 -5
- package/dist/components/Popover/Popover.cjs +3 -3
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Popover/index.cjs +3 -3
- package/dist/components/Popover/index.js +2 -2
- package/dist/components/Progress/Progress.cjs +3 -2
- package/dist/components/Progress/Progress.cjs.map +1 -1
- package/dist/components/Progress/Progress.js +2 -1
- package/dist/components/Progress/index.cjs +3 -2
- package/dist/components/Progress/index.cjs.map +1 -1
- package/dist/components/Progress/index.js +2 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.cjs +24 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.cjs.map +1 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.js +24 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.js.map +1 -0
- package/dist/components/ProgressIndicator/index.cjs +24 -0
- package/dist/components/ProgressIndicator/index.cjs.map +1 -0
- package/dist/components/ProgressIndicator/index.js +24 -0
- package/dist/components/ProgressIndicator/index.js.map +1 -0
- package/dist/components/Quote/Quote.cjs +2 -11
- package/dist/components/Quote/Quote.cjs.map +1 -1
- package/dist/components/Quote/Quote.js +1 -10
- package/dist/components/Quote/index.cjs +2 -11
- package/dist/components/Quote/index.cjs.map +1 -1
- package/dist/components/Quote/index.js +1 -10
- package/dist/components/Radio/Radio.cjs +3 -3
- package/dist/components/Radio/Radio.js +2 -2
- package/dist/components/Radio/index.cjs +3 -3
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/Rating/Rating.cjs +4 -4
- package/dist/components/Rating/Rating.js +3 -3
- package/dist/components/Rating/index.cjs +4 -4
- package/dist/components/Rating/index.js +3 -3
- package/dist/components/SaudiRiyal/SaudiRiyal.cjs +16 -0
- package/dist/components/SaudiRiyal/SaudiRiyal.cjs.map +1 -0
- package/dist/components/SaudiRiyal/SaudiRiyal.js +16 -0
- package/dist/components/SaudiRiyal/SaudiRiyal.js.map +1 -0
- package/dist/components/SaudiRiyal/index.cjs +16 -0
- package/dist/components/SaudiRiyal/index.cjs.map +1 -0
- package/dist/components/SaudiRiyal/index.js +16 -0
- package/dist/components/SaudiRiyal/index.js.map +1 -0
- package/dist/components/SearchBox/SearchBox.cjs +8 -8
- package/dist/components/SearchBox/SearchBox.js +7 -7
- package/dist/components/SearchBox/index.cjs +8 -8
- package/dist/components/SearchBox/index.js +7 -7
- package/dist/components/Select/Select.cjs +4 -4
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/index.cjs +4 -4
- package/dist/components/Select/index.js +3 -3
- package/dist/components/Sidebar/Sidebar.cjs +4 -4
- package/dist/components/Sidebar/Sidebar.js +3 -3
- package/dist/components/Sidebar/SidebarMenu.cjs +4 -4
- package/dist/components/Sidebar/SidebarMenu.js +3 -3
- package/dist/components/Sidebar/index.cjs +7 -7
- package/dist/components/Sidebar/index.js +6 -6
- package/dist/components/Skeleton/Skeleton.cjs +2 -2
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/index.cjs +2 -2
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/SlideoutMenu/SlideoutMenu.cjs +35 -0
- package/dist/components/SlideoutMenu/SlideoutMenu.cjs.map +1 -0
- package/dist/components/SlideoutMenu/SlideoutMenu.js +35 -0
- package/dist/components/SlideoutMenu/SlideoutMenu.js.map +1 -0
- package/dist/components/SlideoutMenu/index.cjs +35 -0
- package/dist/components/SlideoutMenu/index.cjs.map +1 -0
- package/dist/components/SlideoutMenu/index.js +35 -0
- package/dist/components/SlideoutMenu/index.js.map +1 -0
- package/dist/components/Slider/Slider.cjs +3 -3
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/index.cjs +3 -3
- package/dist/components/Slider/index.js +2 -2
- package/dist/components/Spinner/Spinner.cjs +2 -2
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Spinner/index.cjs +2 -2
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/StatusTag/StatusTag.cjs +11 -0
- package/dist/components/StatusTag/StatusTag.cjs.map +1 -0
- package/dist/components/StatusTag/StatusTag.js +11 -0
- package/dist/components/StatusTag/StatusTag.js.map +1 -0
- package/dist/components/StatusTag/index.cjs +11 -0
- package/dist/components/StatusTag/index.cjs.map +1 -0
- package/dist/components/StatusTag/index.js +11 -0
- package/dist/components/StatusTag/index.js.map +1 -0
- package/dist/components/StructuredList/StructuredList.cjs +27 -0
- package/dist/components/StructuredList/StructuredList.cjs.map +1 -0
- package/dist/components/StructuredList/StructuredList.js +27 -0
- package/dist/components/StructuredList/StructuredList.js.map +1 -0
- package/dist/components/StructuredList/index.cjs +27 -0
- package/dist/components/StructuredList/index.cjs.map +1 -0
- package/dist/components/StructuredList/index.js +27 -0
- package/dist/components/StructuredList/index.js.map +1 -0
- package/dist/components/Switch/Switch.cjs +3 -3
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/index.cjs +3 -3
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/Table/Table.cjs +3 -3
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Table/index.cjs +3 -3
- package/dist/components/Table/index.js +2 -2
- package/dist/components/Tabs/Tabs.cjs +5 -2
- package/dist/components/Tabs/Tabs.cjs.map +1 -1
- package/dist/components/Tabs/Tabs.js +4 -1
- package/dist/components/Tabs/index.cjs +5 -2
- package/dist/components/Tabs/index.cjs.map +1 -1
- package/dist/components/Tabs/index.js +4 -1
- package/dist/components/Tag/Tag.cjs +12 -0
- package/dist/components/Tag/Tag.cjs.map +1 -0
- package/dist/components/Tag/Tag.js +12 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Tag/index.cjs +12 -0
- package/dist/components/Tag/index.cjs.map +1 -0
- package/dist/components/Tag/index.js +12 -0
- package/dist/components/Tag/index.js.map +1 -0
- package/dist/components/TagInput/TagInput.cjs +6 -6
- package/dist/components/TagInput/TagInput.js +5 -5
- package/dist/components/TagInput/index.cjs +6 -6
- package/dist/components/TagInput/index.js +5 -5
- package/dist/components/TextInput/TextInput.cjs +19 -0
- package/dist/components/TextInput/TextInput.cjs.map +1 -0
- package/dist/components/TextInput/TextInput.js +19 -0
- package/dist/components/TextInput/TextInput.js.map +1 -0
- package/dist/components/TextInput/index.cjs +19 -0
- package/dist/components/TextInput/index.cjs.map +1 -0
- package/dist/components/TextInput/index.js +19 -0
- package/dist/components/TextInput/index.js.map +1 -0
- package/dist/components/Textarea/Textarea.cjs +4 -3
- package/dist/components/Textarea/Textarea.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.js +3 -2
- package/dist/components/Textarea/index.cjs +4 -3
- package/dist/components/Textarea/index.cjs.map +1 -1
- package/dist/components/Textarea/index.js +3 -2
- package/dist/components/Timeline/Timeline.cjs +2 -2
- package/dist/components/Timeline/Timeline.js +1 -1
- package/dist/components/Timeline/index.cjs +2 -2
- package/dist/components/Timeline/index.js +1 -1
- package/dist/components/Toggle/Toggle.cjs +2 -8
- package/dist/components/Toggle/Toggle.cjs.map +1 -1
- package/dist/components/Toggle/Toggle.js +1 -7
- package/dist/components/Toggle/index.cjs +2 -8
- package/dist/components/Toggle/index.cjs.map +1 -1
- package/dist/components/Toggle/index.js +1 -7
- package/dist/components/Tooltip/Tooltip.cjs +4 -2
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -1
- package/dist/components/Tooltip/index.cjs +4 -2
- package/dist/components/Tooltip/index.cjs.map +1 -1
- package/dist/components/Tooltip/index.js +3 -1
- package/dist/field/FieldMessage.cjs +2 -2
- package/dist/field/FieldMessage.js +1 -1
- package/dist/field/index.cjs +2 -2
- package/dist/field/index.js +1 -1
- package/dist/index.cjs +249 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1024 -407
- package/dist/index.d.ts +1024 -407
- package/dist/index.js +434 -287
- package/dist/internal/calendar/calendar-core.cjs +5 -3
- package/dist/internal/calendar/calendar-core.cjs.map +1 -1
- package/dist/internal/calendar/calendar-core.js +6 -4
- package/dist/internal/calendar/index.cjs +5 -3
- package/dist/internal/calendar/index.cjs.map +1 -1
- package/dist/internal/calendar/index.js +6 -4
- package/dist/internal/icons/index.cjs +62 -2
- package/dist/internal/icons/index.cjs.map +1 -1
- package/dist/internal/icons/index.js +63 -3
- package/package.json +3 -3
- package/dist/chunk-23C5MSXZ.cjs +0 -86
- package/dist/chunk-23C5MSXZ.cjs.map +0 -1
- package/dist/chunk-4A7BAISU.js.map +0 -1
- package/dist/chunk-4RU33BRQ.js.map +0 -1
- package/dist/chunk-4T6QBG46.cjs.map +0 -1
- package/dist/chunk-4U5TTO6E.cjs.map +0 -1
- package/dist/chunk-5EUEJU47.js.map +0 -1
- package/dist/chunk-5MQV6PLC.js +0 -1
- package/dist/chunk-5QC5N3OO.js +0 -77
- package/dist/chunk-5QC5N3OO.js.map +0 -1
- package/dist/chunk-6BZMLKCU.cjs.map +0 -1
- package/dist/chunk-6DN3JE3P.js +0 -271
- package/dist/chunk-6DN3JE3P.js.map +0 -1
- package/dist/chunk-6ELYUHB6.js +0 -45
- package/dist/chunk-6ELYUHB6.js.map +0 -1
- package/dist/chunk-6NZXWKUE.js +0 -1
- package/dist/chunk-7QCXGMBX.js +0 -1
- package/dist/chunk-A6RVSF5V.cjs +0 -77
- package/dist/chunk-A6RVSF5V.cjs.map +0 -1
- package/dist/chunk-AM2OVOQV.cjs +0 -45
- package/dist/chunk-AM2OVOQV.cjs.map +0 -1
- package/dist/chunk-AV6BIQQA.js.map +0 -1
- package/dist/chunk-AYIS62JR.cjs.map +0 -1
- package/dist/chunk-BBGCS5PZ.cjs.map +0 -1
- package/dist/chunk-BGS3MCQZ.cjs.map +0 -1
- package/dist/chunk-BJ3CUFXY.cjs +0 -123
- package/dist/chunk-BJ3CUFXY.cjs.map +0 -1
- package/dist/chunk-BS3UEJ5G.js.map +0 -1
- package/dist/chunk-BS4PX23P.js +0 -102
- package/dist/chunk-BS4PX23P.js.map +0 -1
- package/dist/chunk-BTP7G7WR.js.map +0 -1
- package/dist/chunk-C3YKGPQM.cjs.map +0 -1
- package/dist/chunk-CBCUQUHI.cjs.map +0 -1
- package/dist/chunk-CDS4SYEQ.js +0 -456
- package/dist/chunk-CDS4SYEQ.js.map +0 -1
- package/dist/chunk-CVQFSXRR.cjs +0 -271
- package/dist/chunk-CVQFSXRR.cjs.map +0 -1
- package/dist/chunk-D4ZUV7FD.cjs.map +0 -1
- package/dist/chunk-DEC2WM3G.js.map +0 -1
- package/dist/chunk-DKRLAJZE.js +0 -45
- package/dist/chunk-DKRLAJZE.js.map +0 -1
- package/dist/chunk-DMWYQSO4.cjs +0 -100
- package/dist/chunk-DMWYQSO4.cjs.map +0 -1
- package/dist/chunk-DXY5JEC4.js +0 -137
- package/dist/chunk-DXY5JEC4.js.map +0 -1
- package/dist/chunk-E7WQI7PE.js +0 -19
- package/dist/chunk-E7WQI7PE.js.map +0 -1
- package/dist/chunk-EJHBW4AK.js +0 -100
- package/dist/chunk-EJHBW4AK.js.map +0 -1
- package/dist/chunk-EM55NWUF.js.map +0 -1
- package/dist/chunk-FEUMA5IS.cjs +0 -102
- package/dist/chunk-FEUMA5IS.cjs.map +0 -1
- package/dist/chunk-FI65HI2H.js.map +0 -1
- package/dist/chunk-G3M3XYMI.cjs +0 -1
- package/dist/chunk-GLWMKKLR.cjs +0 -109
- package/dist/chunk-GLWMKKLR.cjs.map +0 -1
- package/dist/chunk-GMBIFJOA.cjs.map +0 -1
- package/dist/chunk-GNL72FRN.js +0 -224
- package/dist/chunk-GNL72FRN.js.map +0 -1
- package/dist/chunk-I44YNYI6.cjs +0 -1
- package/dist/chunk-I6BOBHO6.cjs.map +0 -1
- package/dist/chunk-IFB53HNO.js +0 -61
- package/dist/chunk-IFB53HNO.js.map +0 -1
- package/dist/chunk-IKWD2OEN.cjs +0 -456
- package/dist/chunk-IKWD2OEN.cjs.map +0 -1
- package/dist/chunk-IQ4KQJAO.js +0 -1
- package/dist/chunk-ISUDUZEG.cjs +0 -1
- package/dist/chunk-IUEAUTR7.cjs +0 -1
- package/dist/chunk-JOJ23OD4.js.map +0 -1
- package/dist/chunk-JWUYPAFC.cjs.map +0 -1
- package/dist/chunk-K5P2VY5J.cjs +0 -140
- package/dist/chunk-K5P2VY5J.cjs.map +0 -1
- package/dist/chunk-KO5F344T.cjs +0 -1
- package/dist/chunk-KO5F344T.cjs.map +0 -1
- package/dist/chunk-KRIWNW4A.cjs +0 -131
- package/dist/chunk-KRIWNW4A.cjs.map +0 -1
- package/dist/chunk-KXO72WTH.js +0 -1
- package/dist/chunk-LDDAQLH6.js +0 -140
- package/dist/chunk-LDDAQLH6.js.map +0 -1
- package/dist/chunk-LG2IADSZ.cjs +0 -61
- package/dist/chunk-LG2IADSZ.cjs.map +0 -1
- package/dist/chunk-LQ4PCHBP.js +0 -109
- package/dist/chunk-LQ4PCHBP.js.map +0 -1
- package/dist/chunk-M5ZXQ2QS.js.map +0 -1
- package/dist/chunk-MCHL23CE.js.map +0 -1
- package/dist/chunk-MGZO7MBN.cjs.map +0 -1
- package/dist/chunk-MQN6A3CE.js.map +0 -1
- package/dist/chunk-N4FHLSNV.cjs +0 -19
- package/dist/chunk-N4FHLSNV.cjs.map +0 -1
- package/dist/chunk-NDHMY3IR.js.map +0 -1
- package/dist/chunk-NJIMQWBC.js.map +0 -1
- package/dist/chunk-NQGCAXTW.cjs.map +0 -1
- package/dist/chunk-NU3WUSG7.cjs +0 -189
- package/dist/chunk-NU3WUSG7.cjs.map +0 -1
- package/dist/chunk-O74TNSJD.cjs +0 -101
- package/dist/chunk-O74TNSJD.cjs.map +0 -1
- package/dist/chunk-OGZKNZS6.cjs +0 -111
- package/dist/chunk-OGZKNZS6.cjs.map +0 -1
- package/dist/chunk-OSUT5FH5.js +0 -1
- package/dist/chunk-P2JM7CUD.cjs.map +0 -1
- package/dist/chunk-P2K47B56.js +0 -116
- package/dist/chunk-P2K47B56.js.map +0 -1
- package/dist/chunk-PQJ5IGRQ.js +0 -123
- package/dist/chunk-PQJ5IGRQ.js.map +0 -1
- package/dist/chunk-PZWJQNCY.cjs.map +0 -1
- package/dist/chunk-QFHAVVXT.js +0 -86
- package/dist/chunk-QFHAVVXT.js.map +0 -1
- package/dist/chunk-QGK2KYQS.js.map +0 -1
- package/dist/chunk-RCR5CRZ5.js +0 -1
- package/dist/chunk-RNOXGWKQ.cjs.map +0 -1
- package/dist/chunk-RSXDPFXK.js +0 -189
- package/dist/chunk-RSXDPFXK.js.map +0 -1
- package/dist/chunk-RZEJPDIW.js.map +0 -1
- package/dist/chunk-STJDMXL7.cjs +0 -116
- package/dist/chunk-STJDMXL7.cjs.map +0 -1
- package/dist/chunk-SZUMMROW.js.map +0 -1
- package/dist/chunk-TLD67NXQ.js +0 -101
- package/dist/chunk-TLD67NXQ.js.map +0 -1
- package/dist/chunk-TM3FOGLK.cjs.map +0 -1
- package/dist/chunk-TT2DEREM.js.map +0 -1
- package/dist/chunk-TTHWYBQB.cjs.map +0 -1
- package/dist/chunk-UK2SFZIQ.cjs.map +0 -1
- package/dist/chunk-UPIDCMZI.cjs.map +0 -1
- package/dist/chunk-URC4A3GE.cjs +0 -118
- package/dist/chunk-URC4A3GE.cjs.map +0 -1
- package/dist/chunk-UXGJ6NTD.js +0 -118
- package/dist/chunk-UXGJ6NTD.js.map +0 -1
- package/dist/chunk-VBWRH4UW.cjs +0 -1
- package/dist/chunk-VBWRH4UW.cjs.map +0 -1
- package/dist/chunk-VMAJ34DC.cjs +0 -224
- package/dist/chunk-VMAJ34DC.cjs.map +0 -1
- package/dist/chunk-VNITXANA.js.map +0 -1
- package/dist/chunk-VPTWF4AK.js +0 -111
- package/dist/chunk-VPTWF4AK.js.map +0 -1
- package/dist/chunk-VSC3A6VB.cjs.map +0 -1
- package/dist/chunk-WB5AEG5D.cjs.map +0 -1
- package/dist/chunk-WI4WQGF6.cjs.map +0 -1
- package/dist/chunk-WOJUO43J.js +0 -131
- package/dist/chunk-WOJUO43J.js.map +0 -1
- package/dist/chunk-XCR3TPXT.js.map +0 -1
- package/dist/chunk-Y5IWUJF7.js.map +0 -1
- package/dist/chunk-YKKDKR6Q.cjs +0 -1
- package/dist/chunk-YKKDKR6Q.cjs.map +0 -1
- package/dist/chunk-YVQOUGWG.cjs.map +0 -1
- package/dist/chunk-ZKYBLXU7.js.map +0 -1
- package/dist/components/Alert/Alert.cjs +0 -16
- package/dist/components/Alert/Alert.cjs.map +0 -1
- package/dist/components/Alert/Alert.js +0 -16
- package/dist/components/Alert/index.cjs +0 -16
- package/dist/components/Alert/index.cjs.map +0 -1
- package/dist/components/Alert/index.js +0 -16
- package/dist/components/Badge/Badge.cjs +0 -12
- package/dist/components/Badge/Badge.cjs.map +0 -1
- package/dist/components/Badge/Badge.js +0 -12
- package/dist/components/Badge/index.cjs +0 -12
- package/dist/components/Badge/index.cjs.map +0 -1
- package/dist/components/Badge/index.js +0 -12
- package/dist/components/Combobox/Combobox.cjs +0 -24
- package/dist/components/Combobox/Combobox.cjs.map +0 -1
- package/dist/components/Combobox/Combobox.js +0 -24
- package/dist/components/Combobox/index.cjs +0 -24
- package/dist/components/Combobox/index.cjs.map +0 -1
- package/dist/components/Combobox/index.js +0 -24
- package/dist/components/Input/Input.cjs +0 -14
- package/dist/components/Input/Input.cjs.map +0 -1
- package/dist/components/Input/Input.js +0 -14
- package/dist/components/Input/index.cjs +0 -14
- package/dist/components/Input/index.cjs.map +0 -1
- package/dist/components/Input/index.js +0 -14
- package/dist/components/Stat/Stat.cjs +0 -20
- package/dist/components/Stat/Stat.cjs.map +0 -1
- package/dist/components/Stat/Stat.js +0 -20
- package/dist/components/Stat/StatGroup.cjs +0 -11
- package/dist/components/Stat/StatGroup.cjs.map +0 -1
- package/dist/components/Stat/StatGroup.js +0 -11
- package/dist/components/Stat/index.cjs +0 -26
- package/dist/components/Stat/index.cjs.map +0 -1
- package/dist/components/Stat/index.js +0 -26
- package/dist/components/Steps/Steps.cjs +0 -22
- package/dist/components/Steps/Steps.cjs.map +0 -1
- package/dist/components/Steps/Steps.js +0 -22
- package/dist/components/Steps/index.cjs +0 -22
- package/dist/components/Steps/index.cjs.map +0 -1
- package/dist/components/Steps/index.js +0 -22
- package/dist/components/Toast/Toast.cjs +0 -24
- package/dist/components/Toast/Toast.cjs.map +0 -1
- package/dist/components/Toast/Toast.js +0 -24
- package/dist/components/Toast/index.cjs +0 -24
- package/dist/components/Toast/index.cjs.map +0 -1
- package/dist/components/Toast/index.js +0 -24
- package/dist/components/Toast/toast-store.cjs +0 -14
- package/dist/components/Toast/toast-store.cjs.map +0 -1
- /package/dist/{chunk-5MQV6PLC.js.map → chunk-2I7URBEK.js.map} +0 -0
- /package/dist/{chunk-6NZXWKUE.js.map → chunk-44S33DGQ.js.map} +0 -0
- /package/dist/{chunk-7QCXGMBX.js.map → chunk-4LHIVDAH.js.map} +0 -0
- /package/dist/{chunk-IQ4KQJAO.js.map → chunk-4WUUV44R.js.map} +0 -0
- /package/dist/{chunk-KXO72WTH.js.map → chunk-5DBKWVTZ.js.map} +0 -0
- /package/dist/{chunk-OSUT5FH5.js.map → chunk-7PSLMVCX.js.map} +0 -0
- /package/dist/{chunk-RCR5CRZ5.js.map → chunk-AMYFRY7K.js.map} +0 -0
- /package/dist/{chunk-PKJUCI7B.js.map → chunk-APD5WA65.js.map} +0 -0
- /package/dist/{components/Alert/Alert.js.map → chunk-AVHWS36I.js.map} +0 -0
- /package/dist/{chunk-SNLIKIJP.js.map → chunk-BP6BOEVE.js.map} +0 -0
- /package/dist/{components/Alert/index.js.map → chunk-CWUZ4SZN.js.map} +0 -0
- /package/dist/{components/Badge/Badge.js.map → chunk-F5YD6T5D.js.map} +0 -0
- /package/dist/{chunk-CGCO7RFO.js.map → chunk-FPXFD5XT.js.map} +0 -0
- /package/dist/{components/Badge/index.js.map → chunk-GIHJ4J47.js.map} +0 -0
- /package/dist/{components/Combobox/Combobox.js.map → chunk-H2HKUDBZ.js.map} +0 -0
- /package/dist/{chunk-3VOOMW6O.js.map → chunk-KDV7V5S4.js.map} +0 -0
- /package/dist/{components/Combobox/index.js.map → chunk-MKQBAQIH.js.map} +0 -0
- /package/dist/{components/Input/Input.js.map → chunk-MS6HASC6.js.map} +0 -0
- /package/dist/{chunk-HBAHWCBK.js.map → chunk-NKCBDSI2.js.map} +0 -0
- /package/dist/{components/Input/index.js.map → chunk-NVCOEKCU.js.map} +0 -0
- /package/dist/{components/Stat/Stat.js.map → chunk-RQRA5CCA.js.map} +0 -0
- /package/dist/{components/Stat/StatGroup.js.map → chunk-T2E5XT7P.js.map} +0 -0
- /package/dist/{chunk-VAF6PKVY.js.map → chunk-TG2IDU3W.js.map} +0 -0
- /package/dist/{chunk-IFEWF24B.js.map → chunk-TPD2GNR6.js.map} +0 -0
- /package/dist/{components/Stat/index.js.map → chunk-TPNCV7KA.js.map} +0 -0
- /package/dist/{components/Steps/Steps.js.map → chunk-VB5VOUED.js.map} +0 -0
- /package/dist/{chunk-GVND3JE3.js.map → chunk-VRPFA4CN.js.map} +0 -0
- /package/dist/{chunk-66EVFQVL.js.map → chunk-WHKNCDTX.js.map} +0 -0
- /package/dist/{components/Steps/index.js.map → chunk-YD2UW3PB.js.map} +0 -0
- /package/dist/components/{Toast/Toast.js.map → Carousel/Carousel.js.map} +0 -0
- /package/dist/components/{Toast → Carousel}/index.js.map +0 -0
- /package/dist/components/{Toast/toast-store.js.map → Charts/Charts.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Radio/Radio.tsx"],"sourcesContent":["'use client';\n\nimport { useId, type ReactNode } from 'react';\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { useFieldA11y, FieldMessage } from '../../field';\n\nconst radioGroupVariants = cva('ddga-radio-group', {\n variants: {\n variant: {\n primary: '',\n neutral: 'ddga-radio-group--neutral',\n },\n orientation: {\n vertical: 'ddga-radio-group--vertical',\n horizontal: 'ddga-radio-group--horizontal',\n },\n error: {\n true: 'ddga-radio-group--error',\n },\n readOnly: {\n true: 'ddga-radio-group--readonly',\n },\n },\n defaultVariants: {\n variant: 'primary',\n orientation: 'vertical',\n },\n});\n\nconst radioVariants = cva('ddga-radio');\n\n// Selection-changing keys blocked when the group is read-only (Radix auto-selects on arrow nav).\nconst READONLY_BLOCKED_KEYS = new Set([\n ' ',\n 'Enter',\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n]);\n\ninterface RadioGroupProps\n extends\n Omit<React.ComponentProps<typeof RadioGroupPrimitive.Root>, 'children' | 'orientation'>,\n Pick<VariantProps<typeof radioGroupVariants>, 'variant' | 'orientation'> {\n /** Group label, sits above the rows. Associated to the group via aria-labelledby. */\n label?: ReactNode;\n /** Hint shown below the group. Hidden while an error message is showing. */\n helperText?: ReactNode;\n /** Message shown below the group when `error` is true (or when only `errorMessage` is set). */\n errorMessage?: ReactNode;\n /** Marks the group invalid: sets aria-invalid and applies error styling. */\n error?: boolean;\n /** Locks the group: shows the value but can't be changed; stays focusable, sets aria-readonly. */\n readOnly?: boolean;\n /** `<Radio>` children. */\n children: ReactNode;\n}\n\ninterface RadioProps extends Omit<\n React.ComponentProps<typeof RadioGroupPrimitive.Item>,\n 'children'\n> {\n /** Visible label for this radio, sits beside the circle, associated via htmlFor/id. */\n label?: ReactNode;\n}\n\nfunction RadioGroup({\n id: externalId,\n label,\n helperText,\n errorMessage,\n error,\n variant,\n orientation,\n readOnly,\n required,\n className,\n children,\n ...props\n}: RadioGroupProps) {\n const { errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps, fieldId } =\n useFieldA11y({\n name: 'RadioGroup',\n id: externalId,\n label,\n error,\n errorMessage,\n helperText,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'],\n });\n // The role=radiogroup isn't a focusable control, so associate the visible label via aria-labelledby.\n const labelId = `${fieldId}-label`;\n\n return (\n <div data-slot=\"radio-group-field\" className=\"ddga-field\">\n {label && (\n <span id={labelId} className=\"ddga-radio-group__label\">\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ddga-radio-group__required\">\n *\n </span>\n )}\n </span>\n )}\n <RadioGroupPrimitive.Root\n {...props}\n aria-invalid={controlProps['aria-invalid']}\n aria-describedby={controlProps['aria-describedby']}\n aria-labelledby={label ? labelId : props['aria-labelledby']}\n aria-readonly={readOnly || undefined}\n orientation={orientation === 'horizontal' ? 'horizontal' : 'vertical'}\n required={required}\n // Read-only blocks every selection path before Radix's handlers run (pointer + keyboard nav).\n onClickCapture={\n readOnly\n ? (event) => {\n event.preventDefault();\n event.stopPropagation();\n }\n : undefined\n }\n onKeyDownCapture={\n readOnly\n ? (event) => {\n if (READONLY_BLOCKED_KEYS.has(event.key)) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n : undefined\n }\n data-slot=\"radio-group\"\n className={cn(\n radioGroupVariants({ variant, orientation, error: hasError, readOnly }),\n className,\n )}\n >\n {children}\n </RadioGroupPrimitive.Root>\n {hasErrorMessage && (\n <FieldMessage id={errorId} variant=\"error\">\n {errorMessage}\n </FieldMessage>\n )}\n {hasHelper && (\n <FieldMessage id={helperId} variant=\"helper\">\n {helperText}\n </FieldMessage>\n )}\n </div>\n );\n}\n\nfunction Radio({ id: externalId, label, className, ...props }: RadioProps) {\n const generatedId = useId();\n const itemId = externalId ?? generatedId;\n return (\n <div className=\"ddga-radio-row\">\n <RadioGroupPrimitive.Item\n {...props}\n id={itemId}\n data-slot=\"radio\"\n className={cn(radioVariants(), className)}\n >\n {/* 32px Item = SDGA touch frame; the 24px ring is the visible control. */}\n <span className=\"ddga-radio__circle\">\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-indicator\"\n className=\"ddga-radio__indicator\"\n >\n <span className=\"ddga-radio__dot\" aria-hidden=\"true\" />\n </RadioGroupPrimitive.Indicator>\n </span>\n </RadioGroupPrimitive.Item>\n {label && (\n <label htmlFor={itemId} className=\"ddga-radio__label\">\n {label}\n </label>\n )}\n </div>\n );\n}\n\nexport { RadioGroup, Radio, radioGroupVariants, radioVariants };\nexport type { RadioGroupProps, RadioProps };\n"],"mappings":";;;;;;;;;;;AAEA,SAAS,aAA6B;AACtC,SAAS,cAAc,2BAA2B;AAClD,SAAS,WAA8B;AAgG/B,SAGI,KAHJ;AA5FR,IAAM,qBAAqB,IAAI,oBAAoB;AAAA,EACjD,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACX,UAAU;AAAA,MACV,YAAY;AAAA,IACd;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF,CAAC;AAED,IAAM,gBAAgB,IAAI,YAAY;AAGtC,IAAM,wBAAwB,oBAAI,IAAI;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AA4BD,SAAS,WAAW;AAAA,EAClB,IAAI;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,QAAM,EAAE,SAAS,UAAU,UAAU,iBAAiB,WAAW,cAAc,QAAQ,IACrF,aAAa;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E,QAAM,cAAc,MAAM;AAC1B,QAAM,SAAS,cAAc;AAC7B,SACE,qBAAC,SAAI,WAAU,kBACb;AAAA;AAAA,MAAC,oBAAoB;AAAA,MAApB;AAAA,QACE,GAAG;AAAA,QACJ,IAAI;AAAA,QACJ,aAAU;AAAA,QACV,WAAW,GAAG,cAAc,GAAG,SAAS;AAAA,QAGxC,8BAAC,UAAK,WAAU,sBACd;AAAA,UAAC,oBAAoB;AAAA,UAApB;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAEV,8BAAC,UAAK,WAAU,mBAAkB,eAAY,QAAO;AAAA;AAAA,QACvD,GACF;AAAA;AAAA,IACF;AAAA,IACC,SACC,oBAAC,WAAM,SAAS,QAAQ,WAAU,qBAC/B,iBACH;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
Tooltip,
|
|
3
3
|
TooltipContent,
|
|
4
4
|
TooltipTrigger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FF4QNJOQ.js";
|
|
6
6
|
import {
|
|
7
7
|
useSidebar
|
|
8
8
|
} from "./chunk-F7NPGAKU.js";
|
|
9
9
|
import {
|
|
10
10
|
Skeleton
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6LV62GNU.js";
|
|
12
12
|
import {
|
|
13
13
|
useDir
|
|
14
14
|
} from "./chunk-XFVRBYPC.js";
|
|
@@ -174,4 +174,4 @@ export {
|
|
|
174
174
|
sidebarMenuSubButtonVariants,
|
|
175
175
|
SidebarMenuSubButton
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=chunk-
|
|
177
|
+
//# sourceMappingURL=chunk-WHKNCDTX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkYS2JJ73Mcjs = require('./chunk-YS2JJ73M.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkV6MXOJQ4cjs = require('./chunk-V6MXOJQ4.cjs');
|
|
@@ -70,7 +70,7 @@ function BreadcrumbSeparator({ children, className, ...props }) {
|
|
|
70
70
|
"data-slot": "breadcrumb-separator",
|
|
71
71
|
className: _chunkV6MXOJQ4cjs.cn.call(void 0, "ddga-breadcrumb__separator", className),
|
|
72
72
|
...props,
|
|
73
|
-
children: _nullishCoalesce(children, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
73
|
+
children: _nullishCoalesce(children, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYS2JJ73Mcjs.ChevronRight, {})))
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
76
|
}
|
|
@@ -83,10 +83,28 @@ function BreadcrumbEllipsis({ className, ...props }) {
|
|
|
83
83
|
"data-slot": "breadcrumb-ellipsis",
|
|
84
84
|
className: _chunkV6MXOJQ4cjs.cn.call(void 0, "ddga-breadcrumb__ellipsis", className),
|
|
85
85
|
...props,
|
|
86
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
86
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYS2JJ73Mcjs.MoreHorizontal, {})
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
|
+
function BreadcrumbEllipsisTrigger({
|
|
91
|
+
className,
|
|
92
|
+
children,
|
|
93
|
+
...props
|
|
94
|
+
}) {
|
|
95
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
96
|
+
"button",
|
|
97
|
+
{
|
|
98
|
+
type: "button",
|
|
99
|
+
"aria-label": "More breadcrumbs",
|
|
100
|
+
"data-slot": "breadcrumb-ellipsis-trigger",
|
|
101
|
+
className: _chunkV6MXOJQ4cjs.cn.call(void 0, "ddga-breadcrumb__ellipsis", "ddga-breadcrumb__ellipsis-trigger", className),
|
|
102
|
+
...props,
|
|
103
|
+
children: _nullishCoalesce(children, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYS2JJ73Mcjs.MoreHorizontal, {})))
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
90
108
|
|
|
91
109
|
|
|
92
110
|
|
|
@@ -97,5 +115,5 @@ function BreadcrumbEllipsis({ className, ...props }) {
|
|
|
97
115
|
|
|
98
116
|
|
|
99
117
|
|
|
100
|
-
exports.breadcrumbVariants = breadcrumbVariants; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
101
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
exports.breadcrumbVariants = breadcrumbVariants; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.BreadcrumbEllipsisTrigger = BreadcrumbEllipsisTrigger;
|
|
119
|
+
//# sourceMappingURL=chunk-WOTSK33U.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-WOTSK33U.cjs","../src/components/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACNA,mCAAsC;AACtC,kEAAuC;AA4DnC,+CAAA;AAlDJ,IAAM,mBAAA,EAAqB,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kBAAA,6BAAA,gCAAC,EAAA,CAAA,CAAe;AAAA,IAAA;AAAA,EAClB,CAAA;AAEJ;AAEA,SAAS,yBAAA,CAA0B;AAAA,EACjC,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAmC;AAGjC,EAAA,uBACE,6BAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,QAAA;AAAA,MACL,YAAA,EAAW,kBAAA;AAAA,MACX,WAAA,EAAU,6BAAA;AAAA,MACV,SAAA,EAAW,kCAAA,2BAAG,EAA6B,mCAAA,EAAqC,SAAS,CAAA;AAAA,MACxF,GAAG,KAAA;AAAA,MAEH,QAAA,mBAAA,QAAA,0BAAY,6BAAA,gCAAC,EAAA,CAAA,CAAe;AAAA,IAAA;AAAA,EAC/B,CAAA;AAEJ;ADxDA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wZAAC","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-WOTSK33U.cjs","sourcesContent":[null,"'use client';\n\nimport { Slot as SlotPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { ChevronRight, MoreHorizontal } from '../../internal/icons';\n\n// ─── 1. Variants (cva) ─── //\n//\n// Size lives on the root; per-part visuals cascade through descendant\n// selectors (`.ddga-breadcrumb--sm .ddga-breadcrumb__link`). Same pattern\n// as Tabs/RadioGroup — one source of truth on the nav element.\n\nconst breadcrumbVariants = cva('ddga-breadcrumb', {\n variants: {\n size: {\n sm: 'ddga-breadcrumb--sm',\n md: 'ddga-breadcrumb--md',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n\ninterface BreadcrumbProps\n extends React.ComponentProps<'nav'>, VariantProps<typeof breadcrumbVariants> {}\n\ntype BreadcrumbListProps = React.ComponentProps<'ol'>;\ntype BreadcrumbItemProps = React.ComponentProps<'li'>;\n\ninterface BreadcrumbLinkProps extends React.ComponentProps<'a'> {\n /** Render as the consumer element (e.g., a router Link) via Radix Slot. */\n asChild?: boolean;\n}\n\ninterface BreadcrumbPageProps extends React.ComponentProps<'span'> {\n /** Render as the consumer element (e.g., a heading) via Radix Slot. */\n asChild?: boolean;\n}\n\ninterface BreadcrumbSeparatorProps extends React.ComponentProps<'li'> {\n /**\n * Override the default ChevronRight icon with custom content (e.g., `/`, `·`,\n * or your own SVG). The wrapper itself stays `aria-hidden` since separators\n * are decorative — the visited-state structure is conveyed via the `<ol>`\n * + `aria-current` semantics, not the separator glyph.\n */\n children?: React.ReactNode;\n}\n\ntype BreadcrumbEllipsisProps = React.ComponentProps<'span'>;\ntype BreadcrumbEllipsisTriggerProps = React.ComponentProps<'button'>;\n\n// ─── 3. Components ─── //\n\nfunction Breadcrumb({ size, className, ...props }: BreadcrumbProps) {\n // Default the accessible name to \"Breadcrumb\" so consumers don't have to\n // wire it themselves; spread `aria-label` after so they can override it\n // (e.g., for non-English UIs the consumer passes their own translation).\n return (\n <nav\n aria-label=\"Breadcrumb\"\n data-slot=\"breadcrumb\"\n className={cn(breadcrumbVariants({ size }), className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbList({ className, ...props }: BreadcrumbListProps) {\n return (\n <ol data-slot=\"breadcrumb-list\" className={cn('ddga-breadcrumb__list', className)} {...props} />\n );\n}\n\nfunction BreadcrumbItem({ className, ...props }: BreadcrumbItemProps) {\n return (\n <li data-slot=\"breadcrumb-item\" className={cn('ddga-breadcrumb__item', className)} {...props} />\n );\n}\n\nfunction BreadcrumbLink({ asChild, className, ...props }: BreadcrumbLinkProps) {\n const Comp = asChild ? SlotPrimitive.Slot : 'a';\n return (\n <Comp\n data-slot=\"breadcrumb-link\"\n className={cn('ddga-breadcrumb__link', className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbPage({ asChild, className, ...props }: BreadcrumbPageProps) {\n // `aria-current=\"page\"` marks the current location for assistive tech.\n // The element is not focusable (consumers shouldn't link to the current\n // page); spread props last so consumers can swap if a different\n // aria-current value is needed (e.g., `step` in a wizard).\n const Comp = asChild ? SlotPrimitive.Slot : 'span';\n return (\n <Comp\n aria-current=\"page\"\n data-slot=\"breadcrumb-page\"\n className={cn('ddga-breadcrumb__page', className)}\n {...props}\n />\n );\n}\n\nfunction BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorProps) {\n // Decorative — the `<ol>` + `aria-current` semantics already convey order\n // and current page. `aria-hidden` keeps screen readers from announcing\n // the glyph between every item.\n return (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n data-slot=\"breadcrumb-separator\"\n className={cn('ddga-breadcrumb__separator', className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n );\n}\n\nfunction BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps) {\n // Decorative truncation marker. For an interactive overflow menu, use\n // BreadcrumbEllipsisTrigger in a DropdownMenuTrigger instead.\n return (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n data-slot=\"breadcrumb-ellipsis\"\n className={cn('ddga-breadcrumb__ellipsis', className)}\n {...props}\n >\n <MoreHorizontal />\n </span>\n );\n}\n\nfunction BreadcrumbEllipsisTrigger({\n className,\n children,\n ...props\n}: BreadcrumbEllipsisTriggerProps) {\n // Chromeless, self-labeled icon button for the overflow menu — drop it into a\n // `DropdownMenuTrigger asChild` so consumers never hand-roll button chrome.\n return (\n <button\n type=\"button\"\n aria-label=\"More breadcrumbs\"\n data-slot=\"breadcrumb-ellipsis-trigger\"\n className={cn('ddga-breadcrumb__ellipsis', 'ddga-breadcrumb__ellipsis-trigger', className)}\n {...props}\n >\n {children ?? <MoreHorizontal />}\n </button>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n BreadcrumbEllipsisTrigger,\n breadcrumbVariants,\n};\nexport type {\n BreadcrumbProps,\n BreadcrumbListProps,\n BreadcrumbItemProps,\n BreadcrumbLinkProps,\n BreadcrumbPageProps,\n BreadcrumbSeparatorProps,\n BreadcrumbEllipsisProps,\n BreadcrumbEllipsisTriggerProps,\n};\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
Tag
|
|
3
|
+
} from "./chunk-JWOG4I4P.js";
|
|
4
4
|
import {
|
|
5
5
|
FieldMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E5ZIKIGB.js";
|
|
7
7
|
import {
|
|
8
8
|
useFieldA11y
|
|
9
9
|
} from "./chunk-HN5AFDQA.js";
|
|
@@ -164,7 +164,7 @@ function TagInput({
|
|
|
164
164
|
className: "ddga-tag-input__item",
|
|
165
165
|
role: "listitem",
|
|
166
166
|
children: /* @__PURE__ */ jsx(
|
|
167
|
-
|
|
167
|
+
Tag,
|
|
168
168
|
{
|
|
169
169
|
variant: chipVariant,
|
|
170
170
|
size: chipSize,
|
|
@@ -209,4 +209,4 @@ export {
|
|
|
209
209
|
tagInputVariants,
|
|
210
210
|
TagInput
|
|
211
211
|
};
|
|
212
|
-
//# sourceMappingURL=chunk-
|
|
212
|
+
//# sourceMappingURL=chunk-WRCHASO2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TagInput/TagInput.tsx"],"sourcesContent":["'use client';\n\nimport { useRef, useState, type ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { useFieldA11y, FieldMessage } from '../../field';\nimport { Tag, type TagProps } from '../Tag';\n\n// ─── 1. Variants (cva) ─── //\n\n// Applied to the *control* (the bordered box), not the raw <input> — the box\n// owns the border, sizing, focus ring and disabled/error styling so the chips\n// and the text input wrap inside the field. Mirrors Input's box, but the box\n// grows vertically as chips wrap (min-block-size, not a fixed height).\nconst tagInputVariants = cva('ddga-tag-input', {\n variants: {\n size: {\n sm: 'ddga-tag-input--sm',\n md: 'ddga-tag-input--md',\n lg: 'ddga-tag-input--lg',\n },\n error: {\n true: 'ddga-tag-input--error',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n\n// We own `value` / `defaultValue` (string[] tags, not strings), `onChange`\n// (fires with the tag array), and the design-system `size` variant — so they\n// are stripped from the native input props the rest are spread onto.\ntype NativeInputProps = Omit<\n React.ComponentProps<'input'>,\n 'value' | 'defaultValue' | 'onChange' | 'size'\n>;\n\ninterface TagInputProps\n extends NativeInputProps, Omit<VariantProps<typeof tagInputVariants>, 'error'> {\n /** Controlled tag list. */\n value?: string[];\n /** Uncontrolled initial tag list. */\n defaultValue?: string[];\n /** Fires with the full accepted tag set after every add/remove. */\n onChange?: (tags: string[]) => void;\n /** Visible field label, associated to the text input. */\n label?: ReactNode;\n /** Hint shown below the field. Hidden while an error message is showing. */\n helperText?: ReactNode;\n /** Message shown below the field when invalid. */\n errorMessage?: ReactNode;\n /** Marks the field invalid: sets `aria-invalid` and error styling. */\n error?: boolean;\n /** Caps the number of tags. Adds beyond the cap are no-ops. */\n max?: number;\n /** Allow the same tag more than once. Off → duplicates are rejected. */\n allowDuplicates?: boolean;\n /** Make duplicate detection case-sensitive. Default: case-insensitive. */\n caseSensitive?: boolean;\n /** Consumer gate run on each candidate tag. Return false to reject (draft kept). */\n validate?: (tag: string, tags: string[]) => boolean;\n /** Characters that commit the draft and split a paste. Newline always splits a paste. */\n delimiters?: string[];\n /** Tag variant used for the chips. */\n chipVariant?: TagProps['variant'];\n /** Accessible name for each chip's remove button. */\n removeLabel?: (tag: string) => string;\n /** Live-region text announced on add/remove (screen readers). */\n formatAnnouncement?: (tag: string, action: 'add' | 'remove') => string;\n}\n\n// ─── 3. Component ─── //\n\nfunction TagInput({\n id: externalId,\n value,\n defaultValue,\n onChange,\n label,\n helperText,\n errorMessage,\n error,\n size,\n disabled,\n required,\n placeholder,\n max,\n allowDuplicates = false,\n caseSensitive = false,\n validate,\n delimiters = [','],\n chipVariant = 'secondary',\n removeLabel = (tag) => `Remove ${tag}`,\n formatAnnouncement = (tag, action) => `${tag} ${action === 'add' ? 'added' : 'removed'}`,\n className,\n ...props\n}: TagInputProps) {\n const isControlled = value !== undefined;\n const [uncontrolledTags, setUncontrolledTags] = useState<string[]>(defaultValue ?? []);\n const tags = isControlled ? value : uncontrolledTags;\n\n const [draft, setDraft] = useState('');\n const [announcement, setAnnouncement] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } =\n useFieldA11y({\n name: 'TagInput',\n id: externalId,\n label,\n error,\n errorMessage,\n helperText,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'],\n });\n\n const commit = (next: string[]) => {\n if (!isControlled) setUncontrolledTags(next);\n onChange?.(next);\n };\n\n const norm = (t: string) => (caseSensitive ? t : t.toLowerCase());\n\n // Run raw fragments through the full accept pipeline (trim → drop-empty →\n // max cap → dedup → validate), appending the survivors. Only ever appends,\n // so the accepted set is `next.slice(current.length)`.\n const accept = (raw: string[], current: string[]): string[] => {\n let next = current;\n for (const fragment of raw) {\n const trimmed = fragment.trim();\n if (!trimmed) continue;\n if (max !== undefined && next.length >= max) break;\n if (!allowDuplicates && next.some((t) => norm(t) === norm(trimmed))) continue;\n if (validate && !validate(trimmed, next)) continue;\n next = [...next, trimmed];\n }\n return next;\n };\n\n const announceAdded = (added: string[]) => {\n if (added.length > 0) {\n setAnnouncement(added.map((t) => formatAnnouncement(t, 'add')).join(', '));\n }\n };\n\n const commitDraft = () => {\n const next = accept([draft], tags);\n if (next.length > tags.length) {\n commit(next);\n announceAdded(next.slice(tags.length));\n setDraft('');\n }\n // Rejected (dup / max / validate / empty): keep the draft so it can be fixed.\n };\n\n // Build a paste splitter from the delimiter chars + newlines. `-` is escaped\n // too (trailing in the class) so a delimiter like `-` can't form an invalid\n // character-class range (e.g. `['|','-']` → `[|-…]` would throw).\n const splitPaste = (text: string): string[] => {\n const escaped = delimiters.map((d) => d.replace(/[.*+?^${}()|[\\]\\\\-]/g, '\\\\$&'));\n const pattern = new RegExp(`[${escaped.join('')}\\\\n\\\\r]`);\n return text.split(pattern);\n };\n\n const removeTag = (index: number) => {\n const removed = tags[index];\n commit(tags.filter((_, i) => i !== index));\n setAnnouncement(formatAnnouncement(removed, 'remove'));\n inputRef.current?.focus();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (disabled) return;\n if (event.key === 'Enter') {\n // Always swallow Enter so it adds a tag instead of submitting the form.\n event.preventDefault();\n if (draft.trim()) commitDraft();\n } else if (delimiters.includes(event.key)) {\n event.preventDefault();\n if (draft.trim()) commitDraft();\n } else if (event.key === 'Backspace' && draft === '' && tags.length > 0) {\n event.preventDefault();\n removeTag(tags.length - 1);\n }\n };\n\n const handlePaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n if (disabled) return;\n const text = event.clipboardData.getData('text');\n const fragments = splitPaste(text);\n // No delimiter in the pasted text → let it type normally into the draft.\n if (fragments.length <= 1) return;\n event.preventDefault();\n const next = accept(fragments, tags);\n if (next.length > tags.length) {\n commit(next);\n announceAdded(next.slice(tags.length));\n // Clear any in-progress draft so it isn't left stranded after the paste.\n setDraft('');\n }\n };\n\n // Clicking the box chrome (not a chip button or the input) focuses the input.\n const handleBoxMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {\n const target = event.target as HTMLElement;\n if (target === inputRef.current || target.closest('button')) return;\n event.preventDefault();\n inputRef.current?.focus();\n };\n\n const chipSize: TagProps['size'] = size === 'lg' ? 'md' : 'sm';\n\n return (\n <div data-slot=\"tag-input-field\" className=\"ddga-field\">\n {label && (\n <label htmlFor={fieldId} className=\"ddga-tag-input__label\">\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ddga-tag-input__required\">\n *\n </span>\n )}\n </label>\n )}\n <div\n data-slot=\"tag-input-control\"\n className={cn(tagInputVariants({ size, error: hasError }), className)}\n data-disabled={disabled || undefined}\n onMouseDown={disabled ? undefined : handleBoxMouseDown}\n >\n {tags.length > 0 && (\n <ul data-slot=\"tag-input-list\" className=\"ddga-tag-input__list\" role=\"list\">\n {tags.map((tag, index) => (\n <li\n // Tags can repeat (allowDuplicates) so the value alone is not a\n // stable key; pair it with the index.\n key={`${tag}-${index}`}\n data-slot=\"tag-input-item\"\n className=\"ddga-tag-input__item\"\n // `display:contents` on the list/item can drop the implicit\n // list semantics in some engines; re-assert them explicitly.\n role=\"listitem\"\n >\n <Tag\n variant={chipVariant}\n size={chipSize}\n // Controlled-open: the chip never self-hides — removal flows\n // through onChange so controlled consumers stay the source of truth.\n open\n dismissible={!disabled}\n onDismiss={() => removeTag(index)}\n closeLabel={removeLabel(tag)}\n >\n {tag}\n </Tag>\n </li>\n ))}\n </ul>\n )}\n <input\n // Spread consumer props first, then our a11y contract + handlers so\n // they cannot be clobbered.\n {...props}\n {...controlProps}\n ref={inputRef}\n data-slot=\"tag-input\"\n className=\"ddga-tag-input__field\"\n type=\"text\"\n value={draft}\n disabled={disabled}\n // `aria-required` (not native `required`): the input holds the draft,\n // not the committed tags, so native `required` would block form\n // submit whenever the draft is empty even though tags exist.\n aria-required={required || undefined}\n placeholder={tags.length === 0 ? placeholder : undefined}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={handleKeyDown}\n onPaste={handlePaste}\n />\n </div>\n <div data-slot=\"tag-input-live\" className=\"ddga-sr-only\" role=\"status\" aria-live=\"polite\">\n {announcement}\n </div>\n {hasErrorMessage && (\n <FieldMessage id={errorId} variant=\"error\">\n {errorMessage}\n </FieldMessage>\n )}\n {hasHelper && (\n <FieldMessage id={helperId} variant=\"helper\">\n {helperText}\n </FieldMessage>\n )}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { TagInput, tagInputVariants };\nexport type { TagInputProps };\n"],"mappings":";;;;;;;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Q,UACjC,sBACH;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
TextInput
|
|
3
|
+
} from "./chunk-4HBVLISS.js";
|
|
4
4
|
import {
|
|
5
5
|
Button
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GQAX2CH6.js";
|
|
7
7
|
import {
|
|
8
8
|
Close,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
HelpCircleGlyph,
|
|
10
|
+
Mic,
|
|
11
|
+
SearchGlyph
|
|
12
|
+
} from "./chunk-FFGALWM2.js";
|
|
11
13
|
import {
|
|
12
14
|
cn
|
|
13
15
|
} from "./chunk-7NTT2UXP.js";
|
|
@@ -26,9 +28,15 @@ function SearchBox({
|
|
|
26
28
|
onChange,
|
|
27
29
|
onKeyDown,
|
|
28
30
|
onSearch,
|
|
31
|
+
voiceSearch = true,
|
|
32
|
+
onVoiceSearch,
|
|
29
33
|
onClear,
|
|
30
34
|
clearable = true,
|
|
31
35
|
clearLabel = "Clear search",
|
|
36
|
+
voiceLabel = "Search by voice",
|
|
37
|
+
helperIcon = /* @__PURE__ */ jsx(HelpCircleGlyph, { width: 16, height: 16, "aria-hidden": "true" }),
|
|
38
|
+
disabled,
|
|
39
|
+
readOnly,
|
|
32
40
|
className,
|
|
33
41
|
ref,
|
|
34
42
|
...rest
|
|
@@ -47,11 +55,13 @@ function SearchBox({
|
|
|
47
55
|
defaultValue != null ? String(defaultValue) : ""
|
|
48
56
|
);
|
|
49
57
|
const currentValue = isControlled ? String(value ?? "") : internal;
|
|
58
|
+
const isLocked = !!disabled || !!readOnly;
|
|
50
59
|
const handleChange = (event) => {
|
|
51
60
|
if (!isControlled) setInternal(event.target.value);
|
|
52
61
|
onChange?.(event);
|
|
53
62
|
};
|
|
54
63
|
const clear = () => {
|
|
64
|
+
if (isLocked) return;
|
|
55
65
|
const el = inputRef.current;
|
|
56
66
|
if (!el) return;
|
|
57
67
|
setNativeInputValue(el, "");
|
|
@@ -63,15 +73,40 @@ function SearchBox({
|
|
|
63
73
|
if (event.defaultPrevented) return;
|
|
64
74
|
if (event.key === "Enter") {
|
|
65
75
|
onSearch?.(currentValue);
|
|
66
|
-
} else if (event.key === "Escape" && currentValue.length > 0) {
|
|
76
|
+
} else if (event.key === "Escape" && currentValue.length > 0 && !isLocked) {
|
|
67
77
|
event.preventDefault();
|
|
68
78
|
event.stopPropagation();
|
|
69
79
|
clear();
|
|
70
80
|
}
|
|
71
81
|
};
|
|
72
|
-
const showClear = clearable && currentValue.length > 0;
|
|
82
|
+
const showClear = clearable && currentValue.length > 0 && !isLocked;
|
|
83
|
+
const showVoice = voiceSearch && !showClear;
|
|
84
|
+
const trailing = showClear ? /* @__PURE__ */ jsx(
|
|
85
|
+
Button,
|
|
86
|
+
{
|
|
87
|
+
type: "button",
|
|
88
|
+
variant: "ghost",
|
|
89
|
+
size: "icon-sm",
|
|
90
|
+
"aria-label": clearLabel,
|
|
91
|
+
"data-slot": "search-box-clear",
|
|
92
|
+
onClick: clear,
|
|
93
|
+
children: /* @__PURE__ */ jsx(Close, { "aria-hidden": "true" })
|
|
94
|
+
}
|
|
95
|
+
) : showVoice ? /* @__PURE__ */ jsx(
|
|
96
|
+
Button,
|
|
97
|
+
{
|
|
98
|
+
type: "button",
|
|
99
|
+
variant: "ghost",
|
|
100
|
+
size: "icon-sm",
|
|
101
|
+
"aria-label": voiceLabel,
|
|
102
|
+
"data-slot": "search-box-voice",
|
|
103
|
+
disabled: isLocked,
|
|
104
|
+
onClick: () => onVoiceSearch?.(currentValue),
|
|
105
|
+
children: /* @__PURE__ */ jsx(Mic, { "aria-hidden": "true" })
|
|
106
|
+
}
|
|
107
|
+
) : void 0;
|
|
73
108
|
return /* @__PURE__ */ jsx(
|
|
74
|
-
|
|
109
|
+
TextInput,
|
|
75
110
|
{
|
|
76
111
|
...rest,
|
|
77
112
|
ref: setRefs,
|
|
@@ -79,20 +114,12 @@ function SearchBox({
|
|
|
79
114
|
value: currentValue,
|
|
80
115
|
onChange: handleChange,
|
|
81
116
|
onKeyDown: handleKeyDown,
|
|
117
|
+
disabled,
|
|
118
|
+
readOnly,
|
|
119
|
+
helperIcon,
|
|
82
120
|
className: cn("ddga-search-box", className),
|
|
83
|
-
startAdornment: /* @__PURE__ */ jsx(
|
|
84
|
-
endAdornment:
|
|
85
|
-
Button,
|
|
86
|
-
{
|
|
87
|
-
type: "button",
|
|
88
|
-
variant: "ghost",
|
|
89
|
-
size: "icon-sm",
|
|
90
|
-
"aria-label": clearLabel,
|
|
91
|
-
"data-slot": "search-box-clear",
|
|
92
|
-
onClick: clear,
|
|
93
|
-
children: /* @__PURE__ */ jsx(Close, { "aria-hidden": "true" })
|
|
94
|
-
}
|
|
95
|
-
) : void 0
|
|
121
|
+
startAdornment: /* @__PURE__ */ jsx(SearchGlyph, { "data-slot": "search-box-icon", "aria-hidden": "true" }),
|
|
122
|
+
endAdornment: trailing
|
|
96
123
|
}
|
|
97
124
|
);
|
|
98
125
|
}
|
|
@@ -100,4 +127,4 @@ function SearchBox({
|
|
|
100
127
|
export {
|
|
101
128
|
SearchBox
|
|
102
129
|
};
|
|
103
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-WRUVDZRI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SearchBox/SearchBox.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useRef, useState } from 'react';\nimport { cn } from '../../utils/cn';\nimport { TextInput, type TextInputProps } from '../TextInput';\nimport { Button } from '../Button';\nimport { SearchGlyph, Close, Mic, HelpCircleGlyph } from '../../internal/icons';\n\n// SearchBox composes TextInput — it reuses TextInput's field a11y (label /\n// helper / error), state + fill styles and adornment slots — and adds the SDGA\n// Search Box chrome: a leading magnifier, the voice-search mic (SDGA's trailing\n// icon), Escape-to-clear, `onSearch`, and an off-spec clear (×). It is a form\n// control, so (like TextInput) it does NOT take `asChild`.\ninterface SearchBoxProps extends Omit<TextInputProps, 'startAdornment' | 'endAdornment' | 'type'> {\n /** Fires on Enter with the current query string. */\n onSearch?: (value: string) => void;\n /** Show the SDGA voice-search mic while the field is empty. Default `true`. */\n voiceSearch?: boolean;\n /** Fires when the voice-search mic is activated, with the current query. */\n onVoiceSearch?: (value: string) => void;\n /** Fires when the field is cleared (clear button or Escape). */\n onClear?: () => void;\n /** Show the clear (×) button while the field has a value. Default `true`. */\n clearable?: boolean;\n /** Accessible label for the clear button. Default `'Clear search'`. */\n clearLabel?: string;\n /** Accessible label for the voice-search mic. Default `'Search by voice'`. */\n voiceLabel?: string;\n}\n\n// Set the value via the native setter (bypasses React's value tracker) + dispatch `input`,\n// so clear() fires onChange identically in controlled and uncontrolled mode.\nfunction setNativeInputValue(el: HTMLInputElement, value: string) {\n const setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value')?.set;\n setter?.call(el, value);\n el.dispatchEvent(new Event('input', { bubbles: true }));\n}\n\nfunction SearchBox({\n value,\n defaultValue,\n onChange,\n onKeyDown,\n onSearch,\n voiceSearch = true,\n onVoiceSearch,\n onClear,\n clearable = true,\n clearLabel = 'Clear search',\n voiceLabel = 'Search by voice',\n helperIcon = <HelpCircleGlyph width={16} height={16} aria-hidden=\"true\" />,\n disabled,\n readOnly,\n className,\n ref,\n ...rest\n}: SearchBoxProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n // We need the input node internally (clear() refocuses it), but consumers can\n // also pass a `ref` (TextInputProps advertises it). Merge both onto one\n // callback so neither clobbers the other.\n const setRefs = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref],\n );\n\n // Internally controlled: we always feed `value` to the inner input so the\n // clear button's visibility tracks the current text in both modes.\n const isControlled = value !== undefined;\n const [internal, setInternal] = useState<string>(\n defaultValue != null ? String(defaultValue) : '',\n );\n const currentValue = isControlled ? String(value ?? '') : internal;\n\n const isLocked = !!disabled || !!readOnly;\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setInternal(event.target.value);\n onChange?.(event);\n };\n\n const clear = () => {\n if (isLocked) return;\n const el = inputRef.current;\n if (!el) return;\n setNativeInputValue(el, '');\n el.focus();\n onClear?.();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented) return;\n\n if (event.key === 'Enter') {\n onSearch?.(currentValue);\n } else if (event.key === 'Escape' && currentValue.length > 0 && !isLocked) {\n // First Escape clears the query; stop it here so a parent overlay\n // (Modal/Popover) only closes on a second, now-empty Escape.\n event.preventDefault();\n event.stopPropagation();\n clear();\n }\n };\n\n const showClear = clearable && currentValue.length > 0 && !isLocked;\n const showVoice = voiceSearch && !showClear;\n\n const trailing = showClear ? (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={clearLabel}\n data-slot=\"search-box-clear\"\n onClick={clear}\n >\n <Close aria-hidden=\"true\" />\n </Button>\n ) : showVoice ? (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={voiceLabel}\n data-slot=\"search-box-voice\"\n disabled={isLocked}\n onClick={() => onVoiceSearch?.(currentValue)}\n >\n <Mic aria-hidden=\"true\" />\n </Button>\n ) : undefined;\n\n return (\n <TextInput\n {...rest}\n ref={setRefs}\n type=\"search\"\n value={currentValue}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n helperIcon={helperIcon}\n className={cn('ddga-search-box', className)}\n startAdornment={<SearchGlyph data-slot=\"search-box-icon\" aria-hidden=\"true\" />}\n endAdornment={trailing}\n />\n );\n}\n\nexport { SearchBox };\nexport type { SearchBoxProps };\n"],"mappings":";;;;;;;;;;;;;;;;;AAEA,SAAS,aAAa,QAAQ,gBAAgB;AAgD/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/react/dist/chunk-WUSHGDHJ.cjs"],"names":[],"mappings":"AAAA","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-WUSHGDHJ.cjs"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Check,
|
|
3
3
|
ChevronRight
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FFGALWM2.js";
|
|
5
5
|
import {
|
|
6
6
|
DgaContext
|
|
7
7
|
} from "./chunk-TMXABSFE.js";
|
|
@@ -10,42 +10,85 @@ import {
|
|
|
10
10
|
} from "./chunk-7NTT2UXP.js";
|
|
11
11
|
|
|
12
12
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
13
|
-
import { useContext } from "react";
|
|
13
|
+
import { createContext, useContext, useRef } from "react";
|
|
14
14
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
15
15
|
import { cva } from "class-variance-authority";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
-
var dropdownMenuVariants = cva("ddga-dropdown-menu"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
var dropdownMenuVariants = cva("ddga-dropdown-menu");
|
|
18
|
+
function composeRefs(...refs) {
|
|
19
|
+
return (node) => {
|
|
20
|
+
for (const ref of refs) {
|
|
21
|
+
if (typeof ref === "function") ref(node);
|
|
22
|
+
else if (ref) ref.current = node;
|
|
22
23
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
});
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
var DropdownMenuTriggerRefContext = createContext(null);
|
|
28
27
|
function DropdownMenu(props) {
|
|
29
|
-
|
|
28
|
+
const triggerRef = useRef(null);
|
|
29
|
+
return /* @__PURE__ */ jsx(DropdownMenuTriggerRefContext.Provider, { value: triggerRef, children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { ...props }) });
|
|
30
30
|
}
|
|
31
|
-
function DropdownMenuTrigger(props) {
|
|
32
|
-
|
|
31
|
+
function DropdownMenuTrigger({ ref, ...props }) {
|
|
32
|
+
const triggerRef = useContext(DropdownMenuTriggerRefContext);
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
DropdownMenuPrimitive.Trigger,
|
|
35
|
+
{
|
|
36
|
+
ref: composeRefs(triggerRef ?? void 0, ref),
|
|
37
|
+
"data-slot": "dropdown-menu-trigger",
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
);
|
|
33
41
|
}
|
|
34
42
|
function DropdownMenuContent({
|
|
35
|
-
size,
|
|
36
43
|
className,
|
|
37
44
|
sideOffset = 6,
|
|
45
|
+
onCloseAutoFocus,
|
|
46
|
+
onPointerDownOutside,
|
|
47
|
+
onFocusOutside,
|
|
48
|
+
onKeyDownCapture,
|
|
49
|
+
onPointerDownCapture,
|
|
38
50
|
...props
|
|
39
51
|
}) {
|
|
40
52
|
const ctx = useContext(DgaContext);
|
|
53
|
+
const triggerRef = useContext(DropdownMenuTriggerRefContext);
|
|
41
54
|
const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? void 0;
|
|
55
|
+
const dismissedByOutside = useRef(false);
|
|
56
|
+
const lastInputKeyboard = useRef(false);
|
|
42
57
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx(
|
|
43
58
|
DropdownMenuPrimitive.Content,
|
|
44
59
|
{
|
|
45
60
|
"data-slot": "dropdown-menu-content",
|
|
46
61
|
sideOffset,
|
|
47
|
-
className: cn(dropdownMenuVariants(
|
|
48
|
-
...props
|
|
62
|
+
className: cn(dropdownMenuVariants(), className),
|
|
63
|
+
...props,
|
|
64
|
+
onKeyDownCapture: (event) => {
|
|
65
|
+
lastInputKeyboard.current = true;
|
|
66
|
+
onKeyDownCapture?.(event);
|
|
67
|
+
},
|
|
68
|
+
onPointerDownCapture: (event) => {
|
|
69
|
+
lastInputKeyboard.current = false;
|
|
70
|
+
onPointerDownCapture?.(event);
|
|
71
|
+
},
|
|
72
|
+
onPointerDownOutside: (event) => {
|
|
73
|
+
dismissedByOutside.current = true;
|
|
74
|
+
onPointerDownOutside?.(event);
|
|
75
|
+
},
|
|
76
|
+
onFocusOutside: (event) => {
|
|
77
|
+
dismissedByOutside.current = true;
|
|
78
|
+
onFocusOutside?.(event);
|
|
79
|
+
},
|
|
80
|
+
onCloseAutoFocus: (event) => {
|
|
81
|
+
onCloseAutoFocus?.(event);
|
|
82
|
+
if (event.defaultPrevented) return;
|
|
83
|
+
if (dismissedByOutside.current) {
|
|
84
|
+
dismissedByOutside.current = false;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
triggerRef?.current?.focus({
|
|
89
|
+
focusVisible: lastInputKeyboard.current
|
|
90
|
+
});
|
|
91
|
+
}
|
|
49
92
|
}
|
|
50
93
|
) });
|
|
51
94
|
}
|
|
@@ -53,7 +96,7 @@ function DropdownMenuItem({
|
|
|
53
96
|
className,
|
|
54
97
|
destructive,
|
|
55
98
|
startIcon,
|
|
56
|
-
|
|
99
|
+
trailing,
|
|
57
100
|
children,
|
|
58
101
|
...props
|
|
59
102
|
}) {
|
|
@@ -67,7 +110,7 @@ function DropdownMenuItem({
|
|
|
67
110
|
children: [
|
|
68
111
|
startIcon ? /* @__PURE__ */ jsx("span", { className: "ddga-dropdown-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
|
|
69
112
|
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-menu__label", children }),
|
|
70
|
-
|
|
113
|
+
trailing ? /* @__PURE__ */ jsx("span", { className: "ddga-dropdown-menu__trailing", children: trailing }) : null
|
|
71
114
|
]
|
|
72
115
|
}
|
|
73
116
|
);
|
|
@@ -89,8 +132,8 @@ function DropdownMenuCheckboxItem({
|
|
|
89
132
|
onSelect: handleSelect,
|
|
90
133
|
...props,
|
|
91
134
|
children: [
|
|
92
|
-
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-
|
|
93
|
-
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-
|
|
135
|
+
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-menu__label", children }),
|
|
136
|
+
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "ddga-dropdown-menu__indicator-icon" }) }) })
|
|
94
137
|
]
|
|
95
138
|
}
|
|
96
139
|
);
|
|
@@ -115,8 +158,8 @@ function DropdownMenuRadioItem({
|
|
|
115
158
|
onSelect: handleSelect,
|
|
116
159
|
...props,
|
|
117
160
|
children: [
|
|
118
|
-
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-
|
|
119
|
-
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-
|
|
161
|
+
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-menu__label", children }),
|
|
162
|
+
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "ddga-dropdown-menu__indicator-icon" }) }) })
|
|
120
163
|
]
|
|
121
164
|
}
|
|
122
165
|
);
|
|
@@ -167,14 +210,14 @@ function DropdownMenuSubTrigger({
|
|
|
167
210
|
}
|
|
168
211
|
);
|
|
169
212
|
}
|
|
170
|
-
function DropdownMenuSubContent({
|
|
213
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
171
214
|
const ctx = useContext(DgaContext);
|
|
172
215
|
const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? void 0;
|
|
173
216
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx(
|
|
174
217
|
DropdownMenuPrimitive.SubContent,
|
|
175
218
|
{
|
|
176
219
|
"data-slot": "dropdown-menu-sub-content",
|
|
177
|
-
className: cn(dropdownMenuVariants(
|
|
220
|
+
className: cn(dropdownMenuVariants(), className),
|
|
178
221
|
...props
|
|
179
222
|
}
|
|
180
223
|
) });
|
|
@@ -196,4 +239,4 @@ export {
|
|
|
196
239
|
DropdownMenuSubTrigger,
|
|
197
240
|
DropdownMenuSubContent
|
|
198
241
|
};
|
|
199
|
-
//# sourceMappingURL=chunk-
|
|
242
|
+
//# sourceMappingURL=chunk-XB6YHZAG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useRef, type ReactNode, type Ref } from 'react';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Check, ChevronRight } from '../../internal/icons';\nimport { DgaContext } from '../../providers/DgaContext';\n\nconst dropdownMenuVariants = cva('ddga-dropdown-menu');\n\ntype TriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\n\nfunction composeRefs(...refs: Array<Ref<TriggerElement> | undefined>) {\n return (node: TriggerElement | null) => {\n for (const ref of refs) {\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<TriggerElement | null>).current = node;\n }\n };\n}\n\nconst DropdownMenuTriggerRefContext =\n createContext<React.MutableRefObject<TriggerElement | null> | null>(null);\n\ntype DropdownMenuProps = React.ComponentProps<typeof DropdownMenuPrimitive.Root>;\n\nfunction DropdownMenu(props: DropdownMenuProps) {\n const triggerRef = useRef<TriggerElement | null>(null);\n return (\n <DropdownMenuTriggerRefContext.Provider value={triggerRef}>\n <DropdownMenuPrimitive.Root {...props} />\n </DropdownMenuTriggerRefContext.Provider>\n );\n}\n\ntype DropdownMenuTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>;\n\nfunction DropdownMenuTrigger({ ref, ...props }: DropdownMenuTriggerProps) {\n const triggerRef = useContext(DropdownMenuTriggerRefContext);\n return (\n <DropdownMenuPrimitive.Trigger\n ref={composeRefs(triggerRef ?? undefined, ref)}\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n );\n}\n\ntype DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenuPrimitive.Content>;\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 6,\n onCloseAutoFocus,\n onPointerDownOutside,\n onFocusOutside,\n onKeyDownCapture,\n onPointerDownCapture,\n ...props\n}: DropdownMenuContentProps) {\n // Radix Portal defaults to <body>, which doesn't inherit DgaProvider's\n // data-theme / CSS vars. Re-anchor at the provider's portal container so the\n // menu inherits theme and escapes any clipping/transform ancestor.\n const ctx = useContext(DgaContext);\n const triggerRef = useContext(DropdownMenuTriggerRefContext);\n const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? undefined;\n const dismissedByOutside = useRef(false);\n const lastInputKeyboard = useRef(false);\n\n return (\n <DropdownMenuPrimitive.Portal container={portalContainer}>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(dropdownMenuVariants(), className)}\n {...props}\n onKeyDownCapture={(event) => {\n lastInputKeyboard.current = true;\n onKeyDownCapture?.(event);\n }}\n onPointerDownCapture={(event) => {\n lastInputKeyboard.current = false;\n onPointerDownCapture?.(event);\n }}\n onPointerDownOutside={(event) => {\n dismissedByOutside.current = true;\n onPointerDownOutside?.(event);\n }}\n onFocusOutside={(event) => {\n dismissedByOutside.current = true;\n onFocusOutside?.(event);\n }}\n onCloseAutoFocus={(event) => {\n onCloseAutoFocus?.(event);\n if (event.defaultPrevented) return;\n // An outside interaction should keep focus where the user clicked.\n if (dismissedByOutside.current) {\n dismissedByOutside.current = false;\n return;\n }\n // Radix restores trigger focus with a visible ring even after a mouse\n // selection (the browser's :focus-visible heuristic carries the menu's\n // keyboard focus state). Refocus the trigger ourselves and set\n // `focusVisible` explicitly from the real input modality — keyboard ⇒\n // ring, mouse ⇒ none — while keeping WAI-ARIA focus-return.\n event.preventDefault();\n triggerRef?.current?.focus({\n focusVisible: lastInputKeyboard.current,\n } as FocusOptions);\n }}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\ntype DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n /** Style as a destructive action (red text, red hover). House extension — not in SDGA Menu. */\n destructive?: boolean;\n /** Icon rendered before the label, sized to SDGA's 24px. */\n startIcon?: ReactNode;\n /** Trailing element (SDGA \"trail\"): a counter, icon, `<Tag>`, `<Switch>`, or `<Button>`.\n * Interactive trailing content must `stopPropagation()` on its own click (or set\n * `onSelect={(e) => e.preventDefault()}` on this item) — otherwise the click bubbles\n * to the row and closes the menu. */\n trailing?: ReactNode;\n};\n\nfunction DropdownMenuItem({\n className,\n destructive,\n startIcon,\n trailing,\n children,\n ...props\n}: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-destructive={destructive ? '' : undefined}\n className={cn('ddga-dropdown-menu__item', className)}\n {...props}\n >\n {startIcon ? (\n <span className=\"ddga-dropdown-menu__icon\" aria-hidden=\"true\">\n {startIcon}\n </span>\n ) : null}\n <span className=\"ddga-dropdown-menu__label\">{children}</span>\n {trailing ? <span className=\"ddga-dropdown-menu__trailing\">{trailing}</span> : null}\n </DropdownMenuPrimitive.Item>\n );\n}\n\ntype DropdownMenuCheckboxItemProps = React.ComponentProps<\n typeof DropdownMenuPrimitive.CheckboxItem\n>;\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n onSelect,\n ...props\n}: DropdownMenuCheckboxItemProps) {\n // Keep the menu open across toggles so consumers can flip several at once.\n // A consumer-passed onSelect owns the behavior (call preventDefault to keep this).\n const handleSelect =\n onSelect ??\n ((event: Event) => {\n event.preventDefault();\n });\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn('ddga-dropdown-menu__item', 'ddga-dropdown-menu__item--checkable', className)}\n onSelect={handleSelect}\n {...props}\n >\n <span className=\"ddga-dropdown-menu__label\">{children}</span>\n <span className=\"ddga-dropdown-menu__indicator\" aria-hidden=\"true\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"ddga-dropdown-menu__indicator-icon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\ntype DropdownMenuRadioGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>;\n\nfunction DropdownMenuRadioGroup(props: DropdownMenuRadioGroupProps) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\ntype DropdownMenuRadioItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>;\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n onSelect,\n ...props\n}: DropdownMenuRadioItemProps) {\n const handleSelect =\n onSelect ??\n ((event: Event) => {\n event.preventDefault();\n });\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn('ddga-dropdown-menu__item', 'ddga-dropdown-menu__item--checkable', className)}\n onSelect={handleSelect}\n {...props}\n >\n <span className=\"ddga-dropdown-menu__label\">{children}</span>\n <span className=\"ddga-dropdown-menu__indicator\" aria-hidden=\"true\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"ddga-dropdown-menu__indicator-icon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\ntype DropdownMenuLabelProps = React.ComponentProps<typeof DropdownMenuPrimitive.Label>;\n\nfunction DropdownMenuLabel({ className, ...props }: DropdownMenuLabelProps) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n className={cn('ddga-dropdown-menu__group-label', className)}\n {...props}\n />\n );\n}\n\ntype DropdownMenuSeparatorProps = React.ComponentProps<typeof DropdownMenuPrimitive.Separator>;\n\nfunction DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('ddga-dropdown-menu__separator', className)}\n {...props}\n />\n );\n}\n\ntype DropdownMenuGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.Group>;\n\nfunction DropdownMenuGroup(props: DropdownMenuGroupProps) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\ntype DropdownMenuSubProps = React.ComponentProps<typeof DropdownMenuPrimitive.Sub>;\n\nfunction DropdownMenuSub(props: DropdownMenuSubProps) {\n return <DropdownMenuPrimitive.Sub {...props} />;\n}\n\ntype DropdownMenuSubTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n startIcon?: ReactNode;\n};\n\nfunction DropdownMenuSubTrigger({\n className,\n startIcon,\n children,\n ...props\n}: DropdownMenuSubTriggerProps) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n className={cn('ddga-dropdown-menu__item', 'ddga-dropdown-menu__item--sub', className)}\n {...props}\n >\n {startIcon ? (\n <span className=\"ddga-dropdown-menu__icon\" aria-hidden=\"true\">\n {startIcon}\n </span>\n ) : null}\n <span className=\"ddga-dropdown-menu__label\">{children}</span>\n <ChevronRight className=\"ddga-dropdown-menu__sub-chevron\" aria-hidden=\"true\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\ntype DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>;\n\nfunction DropdownMenuSubContent({ className, ...props }: DropdownMenuSubContentProps) {\n const ctx = useContext(DgaContext);\n const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? undefined;\n\n return (\n <DropdownMenuPrimitive.Portal container={portalContainer}>\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(dropdownMenuVariants(), className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n dropdownMenuVariants,\n};\nexport type {\n DropdownMenuProps,\n DropdownMenuTriggerProps,\n DropdownMenuContentProps,\n DropdownMenuItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuLabelProps,\n DropdownMenuSeparatorProps,\n DropdownMenuGroupProps,\n DropdownMenuSubProps,\n DropdownMenuSubTriggerProps,\n DropdownMenuSubContentProps,\n};\n"],"mappings":";;;;;;;;;;;;AAEA,SAAS,eAAe,YAAY,cAAwC;AAC5E,SAAS,gBAAgB,6BAA6B;AACtD,SAAS,WAAW;AA2Bd,cA0GF,YA1GE;AAtBN,IAAM,uBAAuB,IAAI,oBAAoB;AAIrD,SAAS,eAAe,MAA8C;AACpE,SAAO,CAAC,SAAgC;AACtC,eAAW,OAAO,MAAM;AACtB,UAAI,OAAO,QAAQ,WAAY,KAAI,IAAI;AAAA,eAC9B,IAAK,CAAC,IAAsD,UAAU;AAAA,IACjF;AAAA,EACF;AACF;AAEA,IAAM,gCACJ,cAAoE,IAAI;AAI1E,SAAS,aAAa,OAA0B;AAC9C,QAAM,aAAa,OAA8B,IAAI;AACrD,SACE,oBAAC,8BAA8B,UAA9B,EAAuC,OAAO,YAC7C,8BAAC,sBAAsB,MAAtB,EAA4B,GAAG,OAAO,GACzC;AAEJ;AAIA,SAAS,oBAAoB,EAAE,KAAK,GAAG,MAAM,GAA6B;AACxE,QAAM,aAAa,WAAW,6BAA6B;AAC3D,SACE;AAAA,IA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A6B,UAAS;AAAA,QACtD,oBAAC,gBAAa,WAAU,mCAAkC,eAAY,QAAO;AAAA;AAAA;AAAA,EAC/E;AAEJ;AAIA,SAAS,uBAAuB,EAAE,WAAW,GAAG,MAAM,GAAgC;AACpF,QAAM,MAAM,WAAW,UAAU;AACjC,QAAM,kBAAkB,KAAK,YAAY,KAAK,UAAU;AAExD,SACE,oBAAC,sBAAsB,QAAtB,EAA6B,WAAW,iBACvC;AAAA,IAAC,sBAAsB;AAAA,IAAtB;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,qBAAqB,GAAG,SAAS;AAAA,MAC9C,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;","names":[]}
|
|
@@ -14,7 +14,9 @@ var avatarVariants = cva("ddga-avatar", {
|
|
|
14
14
|
sm: "ddga-avatar--sm",
|
|
15
15
|
md: "ddga-avatar--md",
|
|
16
16
|
lg: "ddga-avatar--lg",
|
|
17
|
-
xl: "ddga-avatar--xl"
|
|
17
|
+
xl: "ddga-avatar--xl",
|
|
18
|
+
"2xl": "ddga-avatar--2xl",
|
|
19
|
+
"3xl": "ddga-avatar--3xl"
|
|
18
20
|
},
|
|
19
21
|
shape: {
|
|
20
22
|
circle: "ddga-avatar--circle",
|
|
@@ -85,7 +87,15 @@ function AvatarFallback({ colorScheme, className, ...props }) {
|
|
|
85
87
|
}
|
|
86
88
|
);
|
|
87
89
|
}
|
|
88
|
-
function AvatarGroup({
|
|
90
|
+
function AvatarGroup({
|
|
91
|
+
max,
|
|
92
|
+
size,
|
|
93
|
+
shape,
|
|
94
|
+
overflowLabel = (n) => `${n} more`,
|
|
95
|
+
className,
|
|
96
|
+
children,
|
|
97
|
+
...props
|
|
98
|
+
}) {
|
|
89
99
|
const all = Children.toArray(children).filter(isValidElement);
|
|
90
100
|
const visible = max !== void 0 && all.length > max ? all.slice(0, max) : all;
|
|
91
101
|
const overflow = max !== void 0 ? Math.max(0, all.length - max) : 0;
|
|
@@ -98,7 +108,7 @@ function AvatarGroup({ max, size, shape, className, children, ...props }) {
|
|
|
98
108
|
);
|
|
99
109
|
return /* @__PURE__ */ jsxs("div", { "data-slot": "avatar-group", className: cn("ddga-avatar-group", className), ...props, children: [
|
|
100
110
|
cascaded,
|
|
101
|
-
overflow > 0 ? /* @__PURE__ */ jsx(Avatar, { size, shape, "aria-label":
|
|
111
|
+
overflow > 0 ? /* @__PURE__ */ jsx(Avatar, { size, shape, "aria-label": overflowLabel(overflow), children: /* @__PURE__ */ jsxs(AvatarFallback, { children: [
|
|
102
112
|
"+",
|
|
103
113
|
overflow
|
|
104
114
|
] }) }) : null
|
|
@@ -112,4 +122,4 @@ export {
|
|
|
112
122
|
AvatarFallback,
|
|
113
123
|
AvatarGroup
|
|
114
124
|
};
|
|
115
|
-
//# sourceMappingURL=chunk-
|
|
125
|
+
//# sourceMappingURL=chunk-Y2E2RLBI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Avatar/Avatar.tsx"],"sourcesContent":["'use client';\n\nimport { Children, isValidElement, cloneElement, type ReactElement } from 'react';\nimport { Avatar as AvatarPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\n\n// ─── 1. Variants (cva) ─── //\n\nconst avatarVariants = cva('ddga-avatar', {\n variants: {\n size: {\n xs: 'ddga-avatar--xs',\n sm: 'ddga-avatar--sm',\n md: 'ddga-avatar--md',\n lg: 'ddga-avatar--lg',\n xl: 'ddga-avatar--xl',\n '2xl': 'ddga-avatar--2xl',\n '3xl': 'ddga-avatar--3xl',\n },\n shape: {\n circle: 'ddga-avatar--circle',\n square: 'ddga-avatar--square',\n },\n },\n defaultVariants: {\n size: 'md',\n shape: 'circle',\n },\n});\n\nconst fallbackVariants = cva('ddga-avatar__fallback', {\n variants: {\n colorScheme: {\n default: 'ddga-avatar__fallback--default',\n primary: 'ddga-avatar__fallback--primary',\n secondary: 'ddga-avatar__fallback--secondary',\n success: 'ddga-avatar__fallback--success',\n warning: 'ddga-avatar__fallback--warning',\n destructive: 'ddga-avatar__fallback--destructive',\n info: 'ddga-avatar__fallback--info',\n },\n },\n defaultVariants: {\n colorScheme: 'default',\n },\n});\n\ntype AvatarStatus = 'online' | 'offline' | 'busy' | 'away';\n\n// ─── 2. Types ─── //\n\ninterface AvatarProps\n extends React.ComponentProps<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {\n /**\n * Presence indicator rendered in the bottom-{end} corner. The color tracks\n * the status (online → success, busy → destructive, away → warning,\n * offline → muted). Position flips in RTL automatically via logical props.\n */\n status?: AvatarStatus;\n /**\n * Accessible label for the status indicator. Defaults to the status value\n * (e.g. \"online\"). Pass a localized string for non-English UIs.\n */\n statusLabel?: string;\n}\n\ntype AvatarImageProps = React.ComponentProps<typeof AvatarPrimitive.Image>;\n\ninterface AvatarFallbackProps\n extends\n React.ComponentProps<typeof AvatarPrimitive.Fallback>,\n VariantProps<typeof fallbackVariants> {}\n\ninterface AvatarGroupProps extends React.ComponentProps<'div'> {\n /**\n * Cap the number of visible Avatars. Excess children are collapsed into a\n * trailing \"+N\" chip. When unset, every child is rendered.\n */\n max?: number;\n /** Size cascaded to each child Avatar that doesn't already set its own size. */\n size?: VariantProps<typeof avatarVariants>['size'];\n /** Shape cascaded to each child Avatar that doesn't already set its own shape. */\n shape?: VariantProps<typeof avatarVariants>['shape'];\n /** Accessible label for the \"+N\" overflow chip. Defaults to `\"N more\"` — pass a\n * localized builder for non-English UIs. */\n overflowLabel?: (count: number) => string;\n}\n\n// ─── 3. Components ─── //\n\nfunction Avatar({ size, shape, status, statusLabel, className, children, ...props }: AvatarProps) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-status={status}\n className={cn(avatarVariants({ size, shape }), className)}\n {...props}\n >\n {children}\n {status ? (\n <span\n className={cn('ddga-avatar__status', `ddga-avatar__status--${status}`)}\n role=\"img\"\n aria-label={statusLabel ?? status}\n />\n ) : null}\n </AvatarPrimitive.Root>\n );\n}\n\nfunction AvatarImage({ className, ...props }: AvatarImageProps) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn('ddga-avatar__image', className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({ colorScheme, className, ...props }: AvatarFallbackProps) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n data-color-scheme={colorScheme ?? 'default'}\n className={cn(fallbackVariants({ colorScheme }), className)}\n {...props}\n />\n );\n}\n\nfunction AvatarGroup({\n max,\n size,\n shape,\n overflowLabel = (n) => `${n} more`,\n className,\n children,\n ...props\n}: AvatarGroupProps) {\n const all = Children.toArray(children).filter(isValidElement) as ReactElement<AvatarProps>[];\n const visible = max !== undefined && all.length > max ? all.slice(0, max) : all;\n const overflow = max !== undefined ? Math.max(0, all.length - max) : 0;\n\n // Cascade size/shape onto children that haven't set their own (parity with\n // RadioGroup → Radio). Don't clobber explicit child overrides.\n const cascaded = visible.map((child, i) =>\n cloneElement(child, {\n key: child.key ?? i,\n size: child.props.size ?? size,\n shape: child.props.shape ?? shape,\n }),\n );\n\n return (\n <div data-slot=\"avatar-group\" className={cn('ddga-avatar-group', className)} {...props}>\n {cascaded}\n {overflow > 0 ? (\n <Avatar size={size} shape={shape} aria-label={overflowLabel(overflow)}>\n <AvatarFallback>+{overflow}</AvatarFallback>\n </Avatar>\n ) : null}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Avatar, AvatarImage, AvatarFallback, AvatarGroup, avatarVariants };\nexport type { AvatarProps, AvatarImageProps, AvatarFallbackProps, AvatarGroupProps, AvatarStatus };\n"],"mappings":";;;;;AAEA,SAAS,UAAU,gBAAgB,oBAAuC;AAC1E,SAAS,UAAU,uBAAuB;AAC1C,SAAS,WAA8B;AAyFnC,SAQI,KARJ;AApFJ,IAAM,iBAAiB,IAAI,eAAe;AAAA,EACxC,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AA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