@dev-dga/react 0.10.1 → 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 +91 -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 +11 -2
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.js +10 -1
- package/dist/components/Card/index.cjs +11 -2
- package/dist/components/Card/index.cjs.map +1 -1
- package/dist/components/Card/index.js +10 -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 +251 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1024 -406
- package/dist/index.d.ts +1024 -406
- package/dist/index.js +436 -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-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-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-QOEXXGRP.js +0 -110
- package/dist/chunk-QOEXXGRP.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-Z5XJ5S7U.cjs +0 -110
- package/dist/chunk-Z5XJ5S7U.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
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
ArrowLeft,
|
|
3
|
+
ArrowRight,
|
|
4
|
+
ChevronDown
|
|
5
|
+
} from "./chunk-FFGALWM2.js";
|
|
5
6
|
import {
|
|
6
7
|
DgaContext
|
|
7
8
|
} from "./chunk-TMXABSFE.js";
|
|
8
9
|
|
|
9
10
|
// src/internal/calendar/calendar-core.tsx
|
|
10
|
-
import { useContext, useMemo } from "react";
|
|
11
|
+
import { useContext, useMemo, useState } from "react";
|
|
11
12
|
import {
|
|
12
13
|
CalendarStateContext as AriaCalendarStateContext,
|
|
13
14
|
RangeCalendarStateContext as AriaRangeCalendarStateContext
|
|
@@ -51,8 +52,8 @@ function useCalendarChrome(calendarSystem, calendarLabels) {
|
|
|
51
52
|
[dgaLocale, calendarSystem]
|
|
52
53
|
);
|
|
53
54
|
const portalContainer = dgaCtx?.portalEl ?? dgaCtx?.rootEl ?? void 0;
|
|
54
|
-
const
|
|
55
|
-
const
|
|
55
|
+
const PrevArrow = dir === "rtl" ? ArrowRight : ArrowLeft;
|
|
56
|
+
const NextArrow = dir === "rtl" ? ArrowLeft : ArrowRight;
|
|
56
57
|
const resolvedLabels = useMemo(() => {
|
|
57
58
|
if (calendarLabels) return calendarLabels;
|
|
58
59
|
return dgaLocale.startsWith("ar") ? { gregorian: "\u0645\u064A\u0644\u0627\u062F\u064A", hijri: "\u0647\u062C\u0631\u064A" } : { gregorian: "Gregorian", hijri: "Hijri" };
|
|
@@ -70,13 +71,25 @@ function useCalendarChrome(calendarSystem, calendarLabels) {
|
|
|
70
71
|
dir,
|
|
71
72
|
locale,
|
|
72
73
|
portalContainer,
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
PrevArrow,
|
|
75
|
+
NextArrow,
|
|
75
76
|
resolvedLabels,
|
|
76
77
|
navLabels,
|
|
77
78
|
a11yLabels
|
|
78
79
|
};
|
|
79
80
|
}
|
|
81
|
+
function usePressedState() {
|
|
82
|
+
const [pressed, setPressed] = useState(false);
|
|
83
|
+
return {
|
|
84
|
+
pressed,
|
|
85
|
+
pressHandlers: {
|
|
86
|
+
onPointerDownCapture: () => setPressed(true),
|
|
87
|
+
onPointerUpCapture: () => setPressed(false),
|
|
88
|
+
onPointerCancelCapture: () => setPressed(false),
|
|
89
|
+
onPointerLeave: () => setPressed(false)
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
80
93
|
function CalendarSystemToggle({
|
|
81
94
|
value,
|
|
82
95
|
onChange,
|
|
@@ -159,17 +172,20 @@ function CalendarNavHeader({ locale, monthLabel, yearLabel }) {
|
|
|
159
172
|
children: monthNames.map((name, i) => /* @__PURE__ */ jsx("option", { value: i + 1, children: name }, i + 1))
|
|
160
173
|
}
|
|
161
174
|
),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
/* @__PURE__ */ jsxs("span", { className: "ddga-calendar__year-chip", children: [
|
|
176
|
+
/* @__PURE__ */ jsx(
|
|
177
|
+
"select",
|
|
178
|
+
{
|
|
179
|
+
"aria-label": yearLabel,
|
|
180
|
+
className: "ddga-calendar__select ddga-calendar__year-select",
|
|
181
|
+
"data-slot": "calendar-year-select",
|
|
182
|
+
value: focusedDate.year,
|
|
183
|
+
onChange: (e) => state.setFocusedDate(focusedDate.set({ year: Number(e.target.value) })),
|
|
184
|
+
children: yearOptions.map((y) => /* @__PURE__ */ jsx("option", { value: y, children: y }, y))
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: "ddga-calendar__year-chevron" })
|
|
188
|
+
] })
|
|
173
189
|
] });
|
|
174
190
|
}
|
|
175
191
|
function renderDayContent(primary, opts) {
|
|
@@ -186,8 +202,9 @@ export {
|
|
|
186
202
|
composeLocale,
|
|
187
203
|
secondaryDayNumber,
|
|
188
204
|
useCalendarChrome,
|
|
205
|
+
usePressedState,
|
|
189
206
|
CalendarSystemToggle,
|
|
190
207
|
CalendarNavHeader,
|
|
191
208
|
renderDayContent
|
|
192
209
|
};
|
|
193
|
-
//# sourceMappingURL=chunk-
|
|
210
|
+
//# sourceMappingURL=chunk-GCOBDP4W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/internal/calendar/calendar-core.tsx"],"sourcesContent":["'use client';\n\n// Shared Calendar core consumed by both DatePicker (single date) and\n// DateRangePicker (date range). Everything here is calendar-system /\n// month-year-navigation / day-rendering logic that is identical regardless of\n// whether one date or a range is being selected — extracted so the two pickers\n// stay in lockstep on Hijri handling, Latin digits, and locale composition.\n//\n// NOT exported from the public barrel. Pickers import from here directly.\n\nimport { useContext, useMemo, useState, type ReactNode } from 'react';\nimport {\n CalendarStateContext as AriaCalendarStateContext,\n RangeCalendarStateContext as AriaRangeCalendarStateContext,\n} from 'react-aria-components';\nimport {\n CalendarDate,\n GregorianCalendar,\n IslamicUmalquraCalendar,\n toCalendar,\n type DateValue,\n} from '@internationalized/date';\nimport { ArrowLeft, ArrowRight, ChevronDown } from '../icons';\nimport { DgaContext } from '../../providers/DgaContext';\n\n// ─── Types ─── //\n\nexport type CalendarSystem = 'gregorian' | 'hijri';\n\nexport interface CalendarLabels {\n gregorian: string;\n hijri: string;\n}\n\n// Locale-aware accessible names for the calendar chrome's controls. Defaulted\n// in `useCalendarChrome` (Arabic when the DGA locale is `ar`) so a screen reader\n// in an Arabic UI doesn't announce these controls in English.\nexport interface CalendarA11yLabels {\n /** Accessible name for the popover trigger button. */\n openCalendar: string;\n /** Accessible name for the Gregorian↔Hijri tablist. */\n calendarSystem: string;\n}\n\n// ─── Date ↔ CalendarDate (Gregorian) normalization ─── //\n\n// Public APIs are `Date`-based so consumers don't take a dep on\n// `@internationalized/date`. Internally everything round-trips through a\n// Gregorian `CalendarDate` so the Hijri toggle is purely a *display* concern —\n// the stored value is always the same absolute day, regardless of which\n// calendar the user was looking at when they picked it.\n\nconst GREGORIAN = new GregorianCalendar();\nconst ISLAMIC_UMALQURA = new IslamicUmalquraCalendar();\n\nexport function dateToCalendarDate(date: Date | null | undefined): CalendarDate | null {\n if (!date) return null;\n // Extract LOCAL Y/M/D, not UTC. The contract is date-only; converting\n // through UTC would shift the day across timezone boundaries.\n return new CalendarDate(date.getFullYear(), date.getMonth() + 1, date.getDate());\n}\n\nexport function calendarDateToDate(value: DateValue | null | undefined): Date | null {\n if (!value) return null;\n // Defensive: if a non-Gregorian CalendarDate ever reaches here, convert.\n // Today the contract is Gregorian-only.\n const greg =\n value.calendar.identifier === 'gregory' ? value : toCalendar(value, new GregorianCalendar());\n return new Date(greg.year, greg.month - 1, greg.day);\n}\n\n// ─── Locale composition (DGA locale + optional calendar override) ─── //\n\nexport function composeLocale(dgaLocale: string, calendar: CalendarSystem): string {\n // Promote a bare 'ar'/'en' from DgaProvider to a regional tag so react-aria\n // picks the right defaults (week start, weekday names). 'ar-SA' matches the\n // DGA target audience; 'en-US' is the conventional English default.\n const base = dgaLocale === 'ar' ? 'ar-SA' : dgaLocale === 'en' ? 'en-US' : dgaLocale;\n // DGA convention: Latin digits (0–9) at all times, regardless of calendar or\n // UI language. Without this, `ar-*` locales default to Arabic-Indic numerals\n // (٠–٩) on segments + calendar cells, which makes month/year dropdowns and\n // cross-calendar comparisons harder to read. The Unicode `-u-` extension\n // carries both calendar and numbering-system keys when both apply.\n const isArabic = base.startsWith('ar');\n if (calendar === 'hijri') {\n return isArabic ? `${base}-u-ca-islamic-umalqura-nu-latn` : `${base}-u-ca-islamic-umalqura`;\n }\n return isArabic ? `${base}-u-nu-latn` : base;\n}\n\n// ─── Secondary-calendar helper ─── //\n\nexport function secondaryDayNumber(date: DateValue, mainCalendar: CalendarSystem): number {\n const other = mainCalendar === 'hijri' ? GREGORIAN : ISLAMIC_UMALQURA;\n return toCalendar(date, other).day;\n}\n\n// ─── Shared chrome hook (locale, portal, chevrons, labels) ─── //\n\n// Consolidates the DgaContext-derived bits both pickers need: the composed\n// react-aria locale, the body-portal container (theme inheritance), the\n// direction-swapped prev/next chevrons, and locale-aware default labels.\nexport function useCalendarChrome(calendarSystem: CalendarSystem, calendarLabels?: CalendarLabels) {\n const dgaCtx = useContext(DgaContext);\n const dgaLocale = dgaCtx?.locale ?? 'en';\n const dir = dgaCtx?.dir ?? 'ltr';\n\n const locale = useMemo(\n () => composeLocale(dgaLocale, calendarSystem),\n [dgaLocale, calendarSystem],\n );\n\n // react-aria's Popover renders to a portal under <body> by default. Re-anchor\n // it under DgaProvider's body-mounted portal so data-theme, theme vars, and\n // .ddga-theme-* classes inherit into the dropdown. Falls back to <body> when\n // used standalone (no provider).\n const portalContainer = (dgaCtx?.portalEl ?? dgaCtx?.rootEl ?? undefined) as Element | undefined;\n\n // In RTL, \"previous\" sits visually on the right and points right; \"next\" sits\n // on the left and points left. Swapping the icon components (rather than\n // CSS-flipping) is robust because it doesn't rely on the portal inheriting dir.\n const PrevArrow = dir === 'rtl' ? ArrowRight : ArrowLeft;\n const NextArrow = dir === 'rtl' ? ArrowLeft : ArrowRight;\n\n const resolvedLabels = useMemo<CalendarLabels>(() => {\n if (calendarLabels) return calendarLabels;\n return dgaLocale.startsWith('ar')\n ? { gregorian: 'ميلادي', hijri: 'هجري' }\n : { gregorian: 'Gregorian', hijri: 'Hijri' };\n }, [calendarLabels, dgaLocale]);\n\n const navLabels = useMemo(\n () =>\n dgaLocale.startsWith('ar')\n ? { month: 'الشهر', year: 'السنة' }\n : { month: 'Month', year: 'Year' },\n [dgaLocale],\n );\n\n const a11yLabels = useMemo<CalendarA11yLabels>(\n () =>\n dgaLocale.startsWith('ar')\n ? { openCalendar: 'فتح التقويم', calendarSystem: 'نظام التقويم' }\n : { openCalendar: 'Open calendar', calendarSystem: 'Calendar system' },\n [dgaLocale],\n );\n\n return {\n dgaLocale,\n dir,\n locale,\n portalContainer,\n PrevArrow,\n NextArrow,\n resolvedLabels,\n navLabels,\n a11yLabels,\n };\n}\n\n// ─── Pressed state (reliable on a react-aria Group) ─── //\n\n// CSS `:active` is unreliable on the picker trigger: it's a react-aria Group of\n// DateSegments + a Button whose usePress handling (preventDefault / pointer\n// capture) makes `:active` fire inconsistently depending on where you press.\n// Track pressed in JS via CAPTURE-phase pointer events (which fire on the Group\n// before any child can swallow them) and expose it as `data-pressed`. Spread\n// `pressHandlers` onto the trigger Group; gate the CSS with `[data-pressed]`.\nexport function usePressedState() {\n const [pressed, setPressed] = useState(false);\n return {\n pressed,\n pressHandlers: {\n onPointerDownCapture: () => setPressed(true),\n onPointerUpCapture: () => setPressed(false),\n onPointerCancelCapture: () => setPressed(false),\n onPointerLeave: () => setPressed(false),\n },\n };\n}\n\n// ─── Calendar-system toggle (Gregorian ↔ Hijri) ─── //\n\ninterface CalendarSystemToggleProps {\n value: CalendarSystem;\n onChange: (next: CalendarSystem) => void;\n labels: CalendarLabels;\n /** Localized accessible name for the tablist (from `useCalendarChrome`). */\n groupLabel: string;\n}\n\nexport function CalendarSystemToggle({\n value,\n onChange,\n labels,\n groupLabel,\n}: CalendarSystemToggleProps) {\n return (\n <div\n role=\"tablist\"\n aria-label={groupLabel}\n className=\"ddga-calendar-toggle\"\n data-slot=\"calendar-toggle\"\n >\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={value === 'gregorian'}\n className=\"ddga-calendar-toggle__button\"\n data-active={value === 'gregorian' ? '' : undefined}\n onClick={() => onChange('gregorian')}\n >\n {labels.gregorian}\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={value === 'hijri'}\n className=\"ddga-calendar-toggle__button\"\n data-active={value === 'hijri' ? '' : undefined}\n onClick={() => onChange('hijri')}\n >\n {labels.hijri}\n </button>\n </div>\n );\n}\n\n// ─── Calendar nav header (month + year dropdowns) ─── //\n\n// Rendered inside <Calendar>/<RangeCalendar> so it can consume the calendar\n// state context. Both single and range calendars expose the same\n// `focusedDate`/`setFocusedDate`/`minValue`/`maxValue` surface (CalendarStateBase),\n// so we read whichever context is populated — the component is calendar-kind\n// agnostic. Hooking the state directly keeps the dropdowns in sync with the\n// prev/next buttons and keyboard navigation automatically.\ninterface CalendarNavHeaderProps {\n locale: string;\n monthLabel: string;\n yearLabel: string;\n}\n\nexport function CalendarNavHeader({ locale, monthLabel, yearLabel }: CalendarNavHeaderProps) {\n // A given subtree lives inside exactly one of these; the other is null.\n const rangeState = useContext(AriaRangeCalendarStateContext);\n const singleState = useContext(AriaCalendarStateContext);\n const state = rangeState ?? singleState;\n\n // Pull state fields with safe fallbacks so the hooks below stay unconditional\n // (rules-of-hooks). Rendering still bails when state is null.\n const focusedDate = state?.focusedDate ?? null;\n const focusedYear = focusedDate?.year ?? 0;\n const focusedCalendar = focusedDate?.calendar ?? GREGORIAN;\n const minValue = state?.minValue ?? null;\n const maxValue = state?.maxValue ?? null;\n\n // Localized month names in the active calendar. Hijri months translate\n // correctly because the locale string carries `-u-ca-islamic-umalqura`.\n const monthNames = useMemo(() => {\n if (!focusedDate) return [];\n const fmt = new Intl.DateTimeFormat(locale, { month: 'long' });\n return Array.from({ length: 12 }, (_, i) => {\n const cd = new CalendarDate(focusedCalendar, focusedYear, i + 1, 1);\n const greg = toCalendar(cd, GREGORIAN);\n const js = new Date(greg.year, greg.month - 1, greg.day);\n return fmt.format(js);\n });\n }, [locale, focusedDate, focusedCalendar, focusedYear]);\n\n // Year range. min/maxValue are in the consumer's calendar (Gregorian); convert\n // to the focused calendar's year. Defaults span 100 years back to 30 forward.\n const yearOptions = useMemo(() => {\n if (!focusedDate) return [];\n const minY = minValue ? toCalendar(minValue, focusedCalendar).year : focusedYear - 100;\n const maxY = maxValue ? toCalendar(maxValue, focusedCalendar).year : focusedYear + 30;\n const start = Math.min(minY, focusedYear);\n const end = Math.max(maxY, focusedYear);\n return Array.from({ length: end - start + 1 }, (_, i) => start + i);\n }, [focusedDate, focusedCalendar, focusedYear, minValue, maxValue]);\n\n if (!state || !focusedDate) return null;\n\n return (\n <div className=\"ddga-calendar__nav-selects\" data-slot=\"calendar-nav\">\n <select\n aria-label={monthLabel}\n className=\"ddga-calendar__select ddga-calendar__month-select\"\n data-slot=\"calendar-month-select\"\n value={focusedDate.month}\n onChange={(e) => state.setFocusedDate(focusedDate.set({ month: Number(e.target.value) }))}\n >\n {monthNames.map((name, i) => (\n <option key={i + 1} value={i + 1}>\n {name}\n </option>\n ))}\n </select>\n <span className=\"ddga-calendar__year-chip\">\n <select\n aria-label={yearLabel}\n className=\"ddga-calendar__select ddga-calendar__year-select\"\n data-slot=\"calendar-year-select\"\n value={focusedDate.year}\n onChange={(e) => state.setFocusedDate(focusedDate.set({ year: Number(e.target.value) }))}\n >\n {yearOptions.map((y) => (\n <option key={y} value={y}>\n {y}\n </option>\n ))}\n </select>\n <ChevronDown aria-hidden=\"true\" className=\"ddga-calendar__year-chevron\" />\n </span>\n </div>\n );\n}\n\n// ─── Day-cell content (primary number + optional secondary calendar number) ─── //\n\n// The visual content rendered inside a day cell, shared by both pickers. Takes\n// the already-formatted primary text (react-aria's `formattedDate`, or a bare\n// day number for the single picker's outside-month button) and stacks the other\n// calendar's day number beneath it when `showSecondary` is on.\nexport function renderDayContent(\n primary: ReactNode,\n opts: { showSecondary: boolean; date: DateValue; calendarSystem: CalendarSystem },\n): ReactNode {\n if (!opts.showSecondary) return primary;\n return (\n <>\n <span className=\"ddga-calendar__cell-primary\">{primary}</span>\n <span aria-hidden=\"true\" className=\"ddga-calendar__cell-secondary\">\n {secondaryDayNumber(opts.date, opts.calendarSystem)}\n </span>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;AAUA,SAAS,YAAY,SAAS,gBAAgC;AAC9D;AAAA,EACE,wBAAwB;AAAA,EACxB,6BAA6B;AAAA,OACxB;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAiLH,SAmIA,UA7HE,KANF;AAlJJ,IAAM,YAAY,IAAI,kBAAkB;AACxC,IAAM,mBAAmB,IAAI,wBAAwB;AAE9C,SAAS,mB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mB,KAAK,MAAM,KAAK,cAAc,GACpD;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AlertCircle,
|
|
3
|
+
Check,
|
|
4
|
+
DropdownChevron,
|
|
5
|
+
Info
|
|
6
|
+
} from "./chunk-FFGALWM2.js";
|
|
7
|
+
import {
|
|
8
|
+
FieldMessage
|
|
9
|
+
} from "./chunk-E5ZIKIGB.js";
|
|
10
|
+
import {
|
|
11
|
+
useFieldA11y
|
|
12
|
+
} from "./chunk-HN5AFDQA.js";
|
|
13
|
+
import {
|
|
14
|
+
DgaContext
|
|
15
|
+
} from "./chunk-TMXABSFE.js";
|
|
16
|
+
import {
|
|
17
|
+
cn
|
|
18
|
+
} from "./chunk-7NTT2UXP.js";
|
|
19
|
+
|
|
20
|
+
// src/components/Dropdown/Dropdown.tsx
|
|
21
|
+
import {
|
|
22
|
+
Children,
|
|
23
|
+
Fragment,
|
|
24
|
+
createContext,
|
|
25
|
+
isValidElement,
|
|
26
|
+
useCallback,
|
|
27
|
+
useContext,
|
|
28
|
+
useMemo,
|
|
29
|
+
useRef,
|
|
30
|
+
useState
|
|
31
|
+
} from "react";
|
|
32
|
+
import { Command } from "cmdk";
|
|
33
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
34
|
+
import { cva } from "class-variance-authority";
|
|
35
|
+
import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
var dropdownTriggerVariants = cva("ddga-dropdown-trigger", {
|
|
37
|
+
variants: {
|
|
38
|
+
size: {
|
|
39
|
+
md: "ddga-dropdown-trigger--md",
|
|
40
|
+
lg: "ddga-dropdown-trigger--lg"
|
|
41
|
+
},
|
|
42
|
+
variant: {
|
|
43
|
+
default: "ddga-dropdown-trigger--default",
|
|
44
|
+
"filled-lighter": "ddga-dropdown-trigger--filled-lighter",
|
|
45
|
+
"filled-darker": "ddga-dropdown-trigger--filled-darker"
|
|
46
|
+
},
|
|
47
|
+
error: {
|
|
48
|
+
true: "ddga-dropdown-trigger--error"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
size: "lg",
|
|
53
|
+
variant: "default"
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var DropdownContext = createContext(null);
|
|
57
|
+
function useDropdownContext(component) {
|
|
58
|
+
const ctx = useContext(DropdownContext);
|
|
59
|
+
if (!ctx) {
|
|
60
|
+
throw new Error(`<${component}> must be rendered inside <Dropdown>.`);
|
|
61
|
+
}
|
|
62
|
+
return ctx;
|
|
63
|
+
}
|
|
64
|
+
var toArray = (v) => v === void 0 ? [] : Array.isArray(v) ? v : [v];
|
|
65
|
+
function Dropdown(props) {
|
|
66
|
+
const {
|
|
67
|
+
multiple = false,
|
|
68
|
+
open: controlledOpen,
|
|
69
|
+
defaultOpen,
|
|
70
|
+
onOpenChange,
|
|
71
|
+
label,
|
|
72
|
+
helperText,
|
|
73
|
+
errorMessage,
|
|
74
|
+
error,
|
|
75
|
+
required,
|
|
76
|
+
disabled,
|
|
77
|
+
readOnly,
|
|
78
|
+
size,
|
|
79
|
+
variant,
|
|
80
|
+
placeholder,
|
|
81
|
+
searchable = false,
|
|
82
|
+
searchPlaceholder = "Search\u2026",
|
|
83
|
+
emptyMessage = "No results.",
|
|
84
|
+
getLabel,
|
|
85
|
+
id: externalId,
|
|
86
|
+
className,
|
|
87
|
+
children,
|
|
88
|
+
"aria-label": ariaLabel,
|
|
89
|
+
"aria-labelledby": ariaLabelledBy
|
|
90
|
+
} = props;
|
|
91
|
+
const controlledValue = "value" in props ? toArray(props.value) : void 0;
|
|
92
|
+
const isControlled = "value" in props && props.value !== void 0;
|
|
93
|
+
const [internalValue, setInternalValue] = useState(() => toArray(props.defaultValue));
|
|
94
|
+
const selected = isControlled ? controlledValue : internalValue;
|
|
95
|
+
const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);
|
|
96
|
+
const isOpenControlled = controlledOpen !== void 0;
|
|
97
|
+
const open = isOpenControlled ? controlledOpen : internalOpen;
|
|
98
|
+
const setOpen = useCallback(
|
|
99
|
+
(next) => {
|
|
100
|
+
if (readOnly || disabled) return;
|
|
101
|
+
if (!isOpenControlled) setInternalOpen(next);
|
|
102
|
+
onOpenChange?.(next);
|
|
103
|
+
},
|
|
104
|
+
[readOnly, disabled, isOpenControlled, onOpenChange]
|
|
105
|
+
);
|
|
106
|
+
const emit = useCallback(
|
|
107
|
+
(next) => {
|
|
108
|
+
if (multiple) props.onValueChange?.(next);
|
|
109
|
+
else props.onValueChange?.(next[0] ?? "");
|
|
110
|
+
},
|
|
111
|
+
[multiple, props.onValueChange]
|
|
112
|
+
);
|
|
113
|
+
const select = useCallback(
|
|
114
|
+
(val) => {
|
|
115
|
+
const next = multiple ? selected.includes(val) ? selected.filter((v) => v !== val) : [...selected, val] : [val];
|
|
116
|
+
if (!isControlled) setInternalValue(next);
|
|
117
|
+
emit(next);
|
|
118
|
+
if (!multiple) setOpen(false);
|
|
119
|
+
},
|
|
120
|
+
[multiple, selected, isControlled, emit, setOpen]
|
|
121
|
+
);
|
|
122
|
+
const isSelected = useCallback((val) => selected.includes(val), [selected]);
|
|
123
|
+
const ctx = useMemo(
|
|
124
|
+
() => ({ multiple, isSelected, select }),
|
|
125
|
+
[multiple, isSelected, select]
|
|
126
|
+
);
|
|
127
|
+
const itemLabels = useMemo(() => {
|
|
128
|
+
const map = /* @__PURE__ */ new Map();
|
|
129
|
+
const visit = (nodes) => {
|
|
130
|
+
Children.forEach(nodes, (child) => {
|
|
131
|
+
if (!isValidElement(child)) return;
|
|
132
|
+
const childProps = child.props;
|
|
133
|
+
if (typeof childProps.value === "string") map.set(childProps.value, childProps.children);
|
|
134
|
+
else if (childProps.children) visit(childProps.children);
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
visit(children);
|
|
138
|
+
return map;
|
|
139
|
+
}, [children]);
|
|
140
|
+
const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
|
|
141
|
+
name: "Dropdown",
|
|
142
|
+
id: externalId,
|
|
143
|
+
label,
|
|
144
|
+
error,
|
|
145
|
+
errorMessage,
|
|
146
|
+
helperText,
|
|
147
|
+
"aria-label": ariaLabel,
|
|
148
|
+
"aria-labelledby": ariaLabelledBy
|
|
149
|
+
});
|
|
150
|
+
const providerCtx = useContext(DgaContext);
|
|
151
|
+
const portalContainer = providerCtx?.portalEl ?? providerCtx?.rootEl ?? void 0;
|
|
152
|
+
const triggerRef = useRef(null);
|
|
153
|
+
const lastInputKeyboard = useRef(false);
|
|
154
|
+
const resolveLabel = (v) => getLabel ? getLabel(v) : itemLabels.get(v) ?? v;
|
|
155
|
+
const triggerLabel = selected.length === 0 ? null : /* @__PURE__ */ jsx(Fragment2, { children: selected.map((v, i) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
156
|
+
i > 0 ? ", " : "",
|
|
157
|
+
resolveLabel(v)
|
|
158
|
+
] }, v)) });
|
|
159
|
+
return /* @__PURE__ */ jsx(DropdownContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxs("div", { "data-slot": "dropdown-field", className: "ddga-field", children: [
|
|
160
|
+
label && /* @__PURE__ */ jsxs("label", { htmlFor: fieldId, className: "ddga-dropdown__label", children: [
|
|
161
|
+
required && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "ddga-dropdown__required", children: "*" }),
|
|
162
|
+
label
|
|
163
|
+
] }),
|
|
164
|
+
/* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open, onOpenChange: setOpen, children: [
|
|
165
|
+
/* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
166
|
+
"button",
|
|
167
|
+
{
|
|
168
|
+
ref: triggerRef,
|
|
169
|
+
type: "button",
|
|
170
|
+
...controlProps,
|
|
171
|
+
"aria-haspopup": "listbox",
|
|
172
|
+
"aria-required": required || void 0,
|
|
173
|
+
"aria-readonly": readOnly || void 0,
|
|
174
|
+
disabled,
|
|
175
|
+
"data-slot": "dropdown-trigger",
|
|
176
|
+
className: cn(dropdownTriggerVariants({ size, variant, error: hasError }), className),
|
|
177
|
+
children: [
|
|
178
|
+
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown__value", children: selected.length > 0 ? triggerLabel : /* @__PURE__ */ jsx("span", { className: "ddga-dropdown__placeholder", children: placeholder }) }),
|
|
179
|
+
/* @__PURE__ */ jsx(DropdownChevron, { "aria-hidden": "true", className: "ddga-dropdown__icon" })
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
) }),
|
|
183
|
+
/* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx(
|
|
184
|
+
PopoverPrimitive.Content,
|
|
185
|
+
{
|
|
186
|
+
"data-slot": "dropdown-content",
|
|
187
|
+
className: "ddga-dropdown-content",
|
|
188
|
+
sideOffset: 4,
|
|
189
|
+
align: "start",
|
|
190
|
+
"aria-label": ariaLabel ?? (typeof label === "string" ? label : "Options"),
|
|
191
|
+
"aria-labelledby": ariaLabelledBy,
|
|
192
|
+
style: { inlineSize: "var(--radix-popover-trigger-width)" },
|
|
193
|
+
onOpenAutoFocus: (event) => {
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
},
|
|
196
|
+
onKeyDownCapture: () => {
|
|
197
|
+
lastInputKeyboard.current = true;
|
|
198
|
+
},
|
|
199
|
+
onPointerDownCapture: () => {
|
|
200
|
+
lastInputKeyboard.current = false;
|
|
201
|
+
},
|
|
202
|
+
onCloseAutoFocus: (event) => {
|
|
203
|
+
event.preventDefault();
|
|
204
|
+
triggerRef.current?.focus({
|
|
205
|
+
focusVisible: lastInputKeyboard.current
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
children: /* @__PURE__ */ jsxs(
|
|
209
|
+
Command,
|
|
210
|
+
{
|
|
211
|
+
"data-slot": "dropdown-command",
|
|
212
|
+
className: "ddga-dropdown-command",
|
|
213
|
+
shouldFilter: searchable,
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ jsx(
|
|
216
|
+
Command.Input,
|
|
217
|
+
{
|
|
218
|
+
autoFocus: true,
|
|
219
|
+
placeholder: searchable ? searchPlaceholder : void 0,
|
|
220
|
+
"aria-label": searchable ? void 0 : "Filter options",
|
|
221
|
+
"data-slot": "dropdown-input",
|
|
222
|
+
className: searchable ? "ddga-dropdown-input" : "ddga-dropdown-input--hidden"
|
|
223
|
+
}
|
|
224
|
+
),
|
|
225
|
+
/* @__PURE__ */ jsxs(Command.List, { "data-slot": "dropdown-list", className: "ddga-dropdown-list", children: [
|
|
226
|
+
searchable && /* @__PURE__ */ jsx(Command.Empty, { "data-slot": "dropdown-empty", className: "ddga-dropdown-empty", children: emptyMessage }),
|
|
227
|
+
children
|
|
228
|
+
] })
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
}
|
|
233
|
+
) })
|
|
234
|
+
] }),
|
|
235
|
+
hasErrorMessage && /* @__PURE__ */ jsx(FieldMessage, { id: errorId, variant: "error", icon: /* @__PURE__ */ jsx(AlertCircle, { width: 16, height: 16 }), children: errorMessage }),
|
|
236
|
+
hasHelper && /* @__PURE__ */ jsx(FieldMessage, { id: helperId, variant: "helper", icon: /* @__PURE__ */ jsx(Info, { width: 16, height: 16 }), children: helperText })
|
|
237
|
+
] }) });
|
|
238
|
+
}
|
|
239
|
+
function DropdownItem({
|
|
240
|
+
value,
|
|
241
|
+
keywords,
|
|
242
|
+
disabled,
|
|
243
|
+
onSelect,
|
|
244
|
+
className,
|
|
245
|
+
children,
|
|
246
|
+
...props
|
|
247
|
+
}) {
|
|
248
|
+
const { multiple, isSelected, select } = useDropdownContext("DropdownItem");
|
|
249
|
+
const sel = isSelected(value);
|
|
250
|
+
return /* @__PURE__ */ jsxs(
|
|
251
|
+
Command.Item,
|
|
252
|
+
{
|
|
253
|
+
value,
|
|
254
|
+
keywords,
|
|
255
|
+
disabled,
|
|
256
|
+
onSelect: (v) => {
|
|
257
|
+
onSelect?.(v);
|
|
258
|
+
select(v);
|
|
259
|
+
},
|
|
260
|
+
"data-slot": "dropdown-item",
|
|
261
|
+
"data-active": sel ? "" : void 0,
|
|
262
|
+
className: cn("ddga-dropdown-item", className),
|
|
263
|
+
...props,
|
|
264
|
+
children: [
|
|
265
|
+
multiple ? /* @__PURE__ */ jsx(
|
|
266
|
+
"span",
|
|
267
|
+
{
|
|
268
|
+
className: "ddga-dropdown-item__checkbox",
|
|
269
|
+
"data-checked": sel ? "" : void 0,
|
|
270
|
+
"aria-hidden": "true",
|
|
271
|
+
children: sel ? /* @__PURE__ */ jsx(Check, {}) : null
|
|
272
|
+
}
|
|
273
|
+
) : null,
|
|
274
|
+
/* @__PURE__ */ jsx("span", { className: "ddga-dropdown-item__label", children }),
|
|
275
|
+
!multiple && sel ? /* @__PURE__ */ jsx("span", { className: "ddga-dropdown-item__check", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Check, {}) }) : null
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
function DropdownGroup({ className, heading, ...props }) {
|
|
281
|
+
return /* @__PURE__ */ jsx(
|
|
282
|
+
Command.Group,
|
|
283
|
+
{
|
|
284
|
+
heading,
|
|
285
|
+
"data-slot": "dropdown-group",
|
|
286
|
+
className: cn("ddga-dropdown-group", className),
|
|
287
|
+
...props
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
function DropdownSeparator({ className, ...props }) {
|
|
292
|
+
return /* @__PURE__ */ jsx(
|
|
293
|
+
Command.Separator,
|
|
294
|
+
{
|
|
295
|
+
"data-slot": "dropdown-separator",
|
|
296
|
+
className: cn("ddga-dropdown-separator", className),
|
|
297
|
+
...props
|
|
298
|
+
}
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export {
|
|
303
|
+
dropdownTriggerVariants,
|
|
304
|
+
Dropdown,
|
|
305
|
+
DropdownItem,
|
|
306
|
+
DropdownGroup,
|
|
307
|
+
DropdownSeparator
|
|
308
|
+
};
|
|
309
|
+
//# sourceMappingURL=chunk-GEVXV4RL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["'use client';\n\nimport {\n Children,\n Fragment,\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\nimport { Command } from 'cmdk';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Check, DropdownChevron, Info, AlertCircle } from '../../internal/icons';\nimport { useFieldA11y, FieldMessage } from '../../field';\nimport { DgaContext } from '../../providers/DgaContext';\n\n// SDGA Dropdown Input field = the Text Input field model + a trailing chevron:\n// md 32 / lg 40, three fill styles, gray-400 border, focus underline.\nconst dropdownTriggerVariants = cva('ddga-dropdown-trigger', {\n variants: {\n size: {\n md: 'ddga-dropdown-trigger--md',\n lg: 'ddga-dropdown-trigger--lg',\n },\n variant: {\n default: 'ddga-dropdown-trigger--default',\n 'filled-lighter': 'ddga-dropdown-trigger--filled-lighter',\n 'filled-darker': 'ddga-dropdown-trigger--filled-darker',\n },\n error: {\n true: 'ddga-dropdown-trigger--error',\n },\n },\n defaultVariants: {\n size: 'lg',\n variant: 'default',\n },\n});\n\ninterface DropdownContextValue {\n multiple: boolean;\n isSelected: (value: string) => boolean;\n select: (value: string) => void;\n}\n\nconst DropdownContext = createContext<DropdownContextValue | null>(null);\n\nfunction useDropdownContext(component: string): DropdownContextValue {\n const ctx = useContext(DropdownContext);\n if (!ctx) {\n throw new Error(`<${component}> must be rendered inside <Dropdown>.`);\n }\n return ctx;\n}\n\ninterface DropdownBaseProps extends VariantProps<typeof dropdownTriggerVariants> {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Visible label above the trigger. */\n label?: ReactNode;\n /** Hint shown below the trigger when there's no error. */\n helperText?: ReactNode;\n /** Message shown below the trigger when `error` is true. */\n errorMessage?: ReactNode;\n /** Marks the field invalid — sets `aria-invalid` and the error border. */\n error?: boolean;\n /** Adds the required asterisk + `aria-required`. */\n required?: boolean;\n /** Disables the trigger entirely. */\n disabled?: boolean;\n /** Shows the value but blocks opening (SDGA Read-only). */\n readOnly?: boolean;\n /** Placeholder shown when nothing is selected. */\n placeholder?: ReactNode;\n /**\n * Render the in-panel filter input (combobox behavior). Off by default — the\n * plain SDGA dropdown. A hidden focusable input is kept either way for cmdk's\n * keyboard model.\n */\n searchable?: boolean;\n /** Placeholder for the filter input when `searchable`. */\n searchPlaceholder?: string;\n /** Shown when a filter matches nothing. */\n emptyMessage?: ReactNode;\n /** Override the trigger label resolver (e.g. async-loaded options). */\n getLabel?: (value: string) => ReactNode;\n id?: string;\n className?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n /** `<DropdownItem>` (+ optional `DropdownGroup` / `DropdownSeparator`). */\n children: ReactNode;\n}\n\ninterface DropdownSingleProps extends DropdownBaseProps {\n multiple?: false;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n}\n\ninterface DropdownMultipleProps extends DropdownBaseProps {\n /** Multi-select (SDGA Multi Select): leading checkboxes; panel stays open. */\n multiple: true;\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (value: string[]) => void;\n}\n\ntype DropdownProps = DropdownSingleProps | DropdownMultipleProps;\n\ninterface DropdownItemProps extends Omit<\n React.ComponentProps<typeof Command.Item>,\n 'value' | 'onSelect'\n> {\n /** Stable value for filtering + selection. */\n value: string;\n /** Extra search terms cmdk matches against the filter input. */\n keywords?: string[];\n disabled?: boolean;\n /** Fires alongside the root's `onValueChange`. */\n onSelect?: (value: string) => void;\n}\n\ninterface DropdownGroupProps extends React.ComponentProps<typeof Command.Group> {\n heading?: ReactNode;\n}\n\ntype DropdownSeparatorProps = React.ComponentProps<typeof Command.Separator>;\n\nconst toArray = (v: string | string[] | undefined): string[] =>\n v === undefined ? [] : Array.isArray(v) ? v : [v];\n\nfunction Dropdown(props: DropdownProps) {\n const {\n multiple = false,\n open: controlledOpen,\n defaultOpen,\n onOpenChange,\n label,\n helperText,\n errorMessage,\n error,\n required,\n disabled,\n readOnly,\n size,\n variant,\n placeholder,\n searchable = false,\n searchPlaceholder = 'Search…',\n emptyMessage = 'No results.',\n getLabel,\n id: externalId,\n className,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n } = props;\n\n const controlledValue = 'value' in props ? toArray(props.value) : undefined;\n const isControlled = 'value' in props && props.value !== undefined;\n const [internalValue, setInternalValue] = useState<string[]>(() => toArray(props.defaultValue));\n const selected = isControlled ? (controlledValue as string[]) : internalValue;\n\n const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);\n const isOpenControlled = controlledOpen !== undefined;\n const open = isOpenControlled ? controlledOpen : internalOpen;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (readOnly || disabled) return;\n if (!isOpenControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [readOnly, disabled, isOpenControlled, onOpenChange],\n );\n\n const emit = useCallback(\n (next: string[]) => {\n if (multiple) (props.onValueChange as ((v: string[]) => void) | undefined)?.(next);\n else (props.onValueChange as ((v: string) => void) | undefined)?.(next[0] ?? '');\n },\n [multiple, props.onValueChange],\n );\n\n const select = useCallback(\n (val: string) => {\n const next = multiple\n ? selected.includes(val)\n ? selected.filter((v) => v !== val)\n : [...selected, val]\n : [val];\n if (!isControlled) setInternalValue(next);\n emit(next);\n if (!multiple) setOpen(false);\n },\n [multiple, selected, isControlled, emit, setOpen],\n );\n\n const isSelected = useCallback((val: string) => selected.includes(val), [selected]);\n\n const ctx = useMemo<DropdownContextValue>(\n () => ({ multiple, isSelected, select }),\n [multiple, isSelected, select],\n );\n\n // value → label map, built synchronously so the trigger renders the right\n // label on first paint (items don't mount until the panel opens).\n const itemLabels = useMemo<Map<string, ReactNode>>(() => {\n const map = new Map<string, ReactNode>();\n const visit = (nodes: ReactNode): void => {\n Children.forEach(nodes, (child) => {\n if (!isValidElement(child)) return;\n const childProps = child.props as { value?: unknown; children?: ReactNode };\n if (typeof childProps.value === 'string') map.set(childProps.value, childProps.children);\n else if (childProps.children) visit(childProps.children);\n });\n };\n visit(children);\n return map;\n }, [children]);\n\n const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } =\n useFieldA11y({\n name: 'Dropdown',\n id: externalId,\n label,\n error,\n errorMessage,\n helperText,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n });\n\n const providerCtx = useContext(DgaContext);\n const portalContainer = providerCtx?.portalEl ?? providerCtx?.rootEl ?? undefined;\n const triggerRef = useRef<HTMLButtonElement>(null);\n const lastInputKeyboard = useRef(false);\n\n const resolveLabel = (v: string): ReactNode =>\n getLabel ? getLabel(v) : (itemLabels.get(v) ?? v);\n const triggerLabel: ReactNode =\n selected.length === 0 ? null : (\n <>\n {selected.map((v, i) => (\n <Fragment key={v}>\n {i > 0 ? ', ' : ''}\n {resolveLabel(v)}\n </Fragment>\n ))}\n </>\n );\n\n return (\n <DropdownContext.Provider value={ctx}>\n <div data-slot=\"dropdown-field\" className=\"ddga-field\">\n {label && (\n <label htmlFor={fieldId} className=\"ddga-dropdown__label\">\n {required && (\n <span aria-hidden=\"true\" className=\"ddga-dropdown__required\">\n *\n </span>\n )}\n {label}\n </label>\n )}\n <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>\n <PopoverPrimitive.Trigger asChild>\n <button\n ref={triggerRef}\n type=\"button\"\n {...controlProps}\n aria-haspopup=\"listbox\"\n aria-required={required || undefined}\n aria-readonly={readOnly || undefined}\n disabled={disabled}\n data-slot=\"dropdown-trigger\"\n className={cn(dropdownTriggerVariants({ size, variant, error: hasError }), className)}\n >\n <span className=\"ddga-dropdown__value\">\n {selected.length > 0 ? (\n triggerLabel\n ) : (\n <span className=\"ddga-dropdown__placeholder\">{placeholder}</span>\n )}\n </span>\n <DropdownChevron aria-hidden=\"true\" className=\"ddga-dropdown__icon\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal container={portalContainer}>\n <PopoverPrimitive.Content\n data-slot=\"dropdown-content\"\n className=\"ddga-dropdown-content\"\n sideOffset={4}\n align=\"start\"\n aria-label={ariaLabel ?? (typeof label === 'string' ? label : 'Options')}\n aria-labelledby={ariaLabelledBy}\n style={{ inlineSize: 'var(--radix-popover-trigger-width)' }}\n onOpenAutoFocus={(event) => {\n // cmdk autofocuses its input (visible or hidden) — let it.\n event.preventDefault();\n }}\n onKeyDownCapture={() => {\n lastInputKeyboard.current = true;\n }}\n onPointerDownCapture={() => {\n lastInputKeyboard.current = false;\n }}\n onCloseAutoFocus={(event) => {\n // Radix repaints the trigger's :focus-visible ring even after a mouse\n // selection; refocus ourselves and set focusVisible from the real modality.\n event.preventDefault();\n triggerRef.current?.focus({\n focusVisible: lastInputKeyboard.current,\n } as FocusOptions);\n }}\n >\n <Command\n data-slot=\"dropdown-command\"\n className=\"ddga-dropdown-command\"\n shouldFilter={searchable}\n >\n <Command.Input\n autoFocus\n placeholder={searchable ? searchPlaceholder : undefined}\n aria-label={searchable ? undefined : 'Filter options'}\n data-slot=\"dropdown-input\"\n className={searchable ? 'ddga-dropdown-input' : 'ddga-dropdown-input--hidden'}\n />\n <Command.List data-slot=\"dropdown-list\" className=\"ddga-dropdown-list\">\n {searchable && (\n <Command.Empty data-slot=\"dropdown-empty\" className=\"ddga-dropdown-empty\">\n {emptyMessage}\n </Command.Empty>\n )}\n {children}\n </Command.List>\n </Command>\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n {hasErrorMessage && (\n <FieldMessage id={errorId} variant=\"error\" icon={<AlertCircle width={16} height={16} />}>\n {errorMessage}\n </FieldMessage>\n )}\n {hasHelper && (\n <FieldMessage id={helperId} variant=\"helper\" icon={<Info width={16} height={16} />}>\n {helperText}\n </FieldMessage>\n )}\n </div>\n </DropdownContext.Provider>\n );\n}\n\nfunction DropdownItem({\n value,\n keywords,\n disabled,\n onSelect,\n className,\n children,\n ...props\n}: DropdownItemProps) {\n const { multiple, isSelected, select } = useDropdownContext('DropdownItem');\n const sel = isSelected(value);\n\n return (\n <Command.Item\n value={value}\n keywords={keywords}\n disabled={disabled}\n onSelect={(v) => {\n onSelect?.(v);\n select(v);\n }}\n data-slot=\"dropdown-item\"\n data-active={sel ? '' : undefined}\n className={cn('ddga-dropdown-item', className)}\n {...props}\n >\n {multiple ? (\n <span\n className=\"ddga-dropdown-item__checkbox\"\n data-checked={sel ? '' : undefined}\n aria-hidden=\"true\"\n >\n {sel ? <Check /> : null}\n </span>\n ) : null}\n <span className=\"ddga-dropdown-item__label\">{children}</span>\n {!multiple && sel ? (\n <span className=\"ddga-dropdown-item__check\" aria-hidden=\"true\">\n <Check />\n </span>\n ) : null}\n </Command.Item>\n );\n}\n\nfunction DropdownGroup({ className, heading, ...props }: DropdownGroupProps) {\n return (\n <Command.Group\n heading={heading}\n data-slot=\"dropdown-group\"\n className={cn('ddga-dropdown-group', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownSeparator({ className, ...props }: DropdownSeparatorProps) {\n return (\n <Command.Separator\n data-slot=\"dropdown-separator\"\n className={cn('ddga-dropdown-separator', className)}\n {...props}\n />\n );\n}\n\nexport { Dropdown, DropdownItem, DropdownGroup, DropdownSeparator, dropdownTriggerVariants };\nexport type {\n DropdownProps,\n DropdownSingleProps,\n DropdownMultipleProps,\n DropdownItemProps,\n DropdownGroupProps,\n DropdownSeparatorProps,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,eAAe;AACxB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AK,WAAU,6BAA4B,eAAY,QACtD,8BAAC,SAAM,GACT,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,cAAc,EAAE,WAAW,SAAS,GAAG,MAAM,GAAuB;AAC3E,SACE;AAAA,IAAC,QAAQ;AAAA,IAAR;AAAA,MACC;AAAA,MACA,aAAU;AAAA,MACV,WAAW,GAAG,uBAAuB,SAAS;AAAA,MAC7C,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,MAAM,GAA2B;AAC1E,SACE;AAAA,IAAC,QAAQ;AAAA,IAAR;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,2BAA2B,SAAS;AAAA,MACjD,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["Fragment"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FieldMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E5ZIKIGB.js";
|
|
4
4
|
import {
|
|
5
5
|
useFieldA11y
|
|
6
6
|
} from "./chunk-HN5AFDQA.js";
|
|
@@ -14,16 +14,9 @@ import { cva } from "class-variance-authority";
|
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
var switchVariants = cva("ddga-switch", {
|
|
16
16
|
variants: {
|
|
17
|
-
size: {
|
|
18
|
-
sm: "ddga-switch--sm",
|
|
19
|
-
md: "ddga-switch--md"
|
|
20
|
-
},
|
|
21
17
|
error: {
|
|
22
18
|
true: "ddga-switch--error"
|
|
23
19
|
}
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
size: "md"
|
|
27
20
|
}
|
|
28
21
|
});
|
|
29
22
|
function Switch({
|
|
@@ -32,7 +25,6 @@ function Switch({
|
|
|
32
25
|
helperText,
|
|
33
26
|
errorMessage,
|
|
34
27
|
error,
|
|
35
|
-
size,
|
|
36
28
|
required,
|
|
37
29
|
className,
|
|
38
30
|
...props
|
|
@@ -56,7 +48,7 @@ function Switch({
|
|
|
56
48
|
...controlProps,
|
|
57
49
|
"data-slot": "switch",
|
|
58
50
|
required,
|
|
59
|
-
className: cn(switchVariants({
|
|
51
|
+
className: cn(switchVariants({ error: hasError }), className),
|
|
60
52
|
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "ddga-switch__thumb" })
|
|
61
53
|
}
|
|
62
54
|
),
|
|
@@ -74,4 +66,4 @@ export {
|
|
|
74
66
|
switchVariants,
|
|
75
67
|
Switch
|
|
76
68
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
69
|
+
//# sourceMappingURL=chunk-GHJEE4NW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Switch/Switch.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode } from 'react';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { useFieldA11y, FieldMessage } from '../../field';\n\nconst switchVariants = cva('ddga-switch', {\n variants: {\n error: {\n true: 'ddga-switch--error',\n },\n },\n});\n\ninterface SwitchProps\n extends\n Omit<React.ComponentProps<typeof SwitchPrimitive.Root>, 'children'>,\n VariantProps<typeof switchVariants> {\n /** Visible label, sits beside the track, associated via `htmlFor`/`id`. */\n label?: ReactNode;\n /** Hint shown below the row. Hidden while an error message is showing. */\n helperText?: ReactNode;\n /** Message shown below the row when `error` is true. */\n errorMessage?: ReactNode;\n /** Marks the field invalid: sets `aria-invalid` and error styling. */\n error?: boolean;\n}\n\nfunction Switch({\n id: externalId,\n label,\n helperText,\n errorMessage,\n error,\n required,\n className,\n ...props\n}: SwitchProps) {\n const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } =\n useFieldA11y({\n name: 'Switch',\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 return (\n <div data-slot=\"switch-field\" className=\"ddga-field\">\n <div className=\"ddga-switch-row\">\n <SwitchPrimitive.Root\n {...props}\n {...controlProps}\n data-slot=\"switch\"\n required={required}\n className={cn(switchVariants({ error: hasError }), className)}\n >\n <SwitchPrimitive.Thumb data-slot=\"switch-thumb\" className=\"ddga-switch__thumb\" />\n </SwitchPrimitive.Root>\n {label && (\n <label htmlFor={fieldId} className=\"ddga-switch__label\">\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ddga-switch__required\">\n *\n </span>\n )}\n </label>\n )}\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\nexport { Switch, switchVariants };\nexport type { SwitchProps };\n"],"mappings":";;;;;;;;;;;AAGA,SAAS,UAAU,uBAAuB;AAC1C,SAAS,WAA8B;AA0D7B,cAGA,YAHA;AAtDV,IAAM,iBAAiB,IAAI,eAAe;AAAA,EACxC,UAAU;AAAA,IACR,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AACF,CAAC;AAgBD,SAAS,OAAO;AAAA,EACd,IAAI;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAgB;AACd,QAAM,EAAE,SAAS,SAAS,UAAU,UAAU,iBAAiB,WAAW,aAAa,IACrF,aAAa;AAAA,IACX,MAAM;AAAA,IACN,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc,MAAM,YAAY;AAAA,IAChC,mBAAmB,MAAM,iBAAiB;AAAA,EAC5C,CAAC;AAEH,SACE,qBAAC,SAAI,aAAU,gBAAe,WAAU,cACtC;AAAA,yBAAC,SAAI,WAAU,mBACb;AAAA;AAAA,Q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