@dev-dga/react 0.11.0 → 0.12.1
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 +87 -0
- package/README.md +8 -6
- package/dist/chunk-2I7URBEK.js +1 -0
- package/dist/chunk-2MDYDWAH.js +79 -0
- package/dist/chunk-2MDYDWAH.js.map +1 -0
- package/dist/chunk-36AIVLVG.cjs +79 -0
- package/dist/chunk-36AIVLVG.cjs.map +1 -0
- package/dist/chunk-3IEUUZKJ.cjs +1 -0
- package/dist/{chunk-G3M3XYMI.cjs.map → chunk-3IEUUZKJ.cjs.map} +1 -1
- package/dist/{chunk-AYIS62JR.cjs → chunk-3JHIEAJG.cjs} +54 -42
- package/dist/chunk-3JHIEAJG.cjs.map +1 -0
- package/dist/chunk-3UT22WQM.cjs +22 -0
- package/dist/chunk-3UT22WQM.cjs.map +1 -0
- package/dist/chunk-42MOUC3M.cjs +1 -0
- package/dist/{chunk-I44YNYI6.cjs.map → chunk-42MOUC3M.cjs.map} +1 -1
- package/dist/chunk-44S33DGQ.js +1 -0
- package/dist/chunk-4HBVLISS.js +169 -0
- package/dist/chunk-4HBVLISS.js.map +1 -0
- package/dist/chunk-4LHIVDAH.js +1 -0
- package/dist/chunk-4RCQFLSE.cjs +114 -0
- package/dist/chunk-4RCQFLSE.cjs.map +1 -0
- package/dist/chunk-4WQLBIL5.cjs +1 -0
- package/dist/{chunk-ISUDUZEG.cjs.map → chunk-4WQLBIL5.cjs.map} +1 -1
- package/dist/chunk-4WUUV44R.js +1 -0
- package/dist/chunk-4WXBRKGZ.cjs +375 -0
- package/dist/chunk-4WXBRKGZ.cjs.map +1 -0
- package/dist/chunk-54KSDBGC.js +260 -0
- package/dist/chunk-54KSDBGC.js.map +1 -0
- package/dist/chunk-55RHNN3T.js +116 -0
- package/dist/chunk-55RHNN3T.js.map +1 -0
- package/dist/chunk-5DBKWVTZ.js +1 -0
- package/dist/chunk-5GDTEDDH.js +503 -0
- package/dist/chunk-5GDTEDDH.js.map +1 -0
- package/dist/chunk-5N6CFYT6.cjs +256 -0
- package/dist/chunk-5N6CFYT6.cjs.map +1 -0
- package/dist/{chunk-UK2SFZIQ.cjs → chunk-5NENDJOM.cjs} +21 -26
- package/dist/chunk-5NENDJOM.cjs.map +1 -0
- package/dist/chunk-5X2XQMGC.js +178 -0
- package/dist/chunk-5X2XQMGC.js.map +1 -0
- package/dist/chunk-6CDZ7ZBG.js +85 -0
- package/dist/chunk-6CDZ7ZBG.js.map +1 -0
- package/dist/{chunk-KPZ5T4DW.cjs → chunk-6G2BJQZL.cjs} +3 -3
- package/dist/{chunk-KPZ5T4DW.cjs.map → chunk-6G2BJQZL.cjs.map} +1 -1
- package/dist/chunk-6HRQMDI3.js +95 -0
- package/dist/chunk-6HRQMDI3.js.map +1 -0
- package/dist/{chunk-RZEJPDIW.js → chunk-6LV62GNU.js} +5 -5
- package/dist/chunk-6LV62GNU.js.map +1 -0
- package/dist/chunk-6POW3HXX.js +73 -0
- package/dist/chunk-6POW3HXX.js.map +1 -0
- package/dist/chunk-6UFDUJZI.cjs +124 -0
- package/dist/chunk-6UFDUJZI.cjs.map +1 -0
- package/dist/chunk-7BOSIHW6.cjs +173 -0
- package/dist/chunk-7BOSIHW6.cjs.map +1 -0
- package/dist/chunk-7EEKESAA.js +167 -0
- package/dist/chunk-7EEKESAA.js.map +1 -0
- package/dist/chunk-7F24FFIV.cjs +260 -0
- package/dist/chunk-7F24FFIV.cjs.map +1 -0
- package/dist/{chunk-6BZMLKCU.cjs → chunk-7GAELGEB.cjs} +47 -20
- package/dist/chunk-7GAELGEB.cjs.map +1 -0
- package/dist/{chunk-EM55NWUF.js → chunk-7GWM7F5C.js} +46 -34
- package/dist/chunk-7GWM7F5C.js.map +1 -0
- package/dist/chunk-7PSLMVCX.js +1 -0
- package/dist/{chunk-RNOXGWKQ.cjs → chunk-A4HS7CYD.cjs} +35 -18
- package/dist/chunk-A4HS7CYD.cjs.map +1 -0
- package/dist/chunk-A6S4V3IG.cjs +1 -0
- package/dist/{chunk-IUEAUTR7.cjs.map → chunk-A6S4V3IG.cjs.map} +1 -1
- package/dist/{chunk-4T6QBG46.cjs → chunk-AJXGXUBN.cjs} +29 -17
- package/dist/chunk-AJXGXUBN.cjs.map +1 -0
- package/dist/{chunk-5EUEJU47.js → chunk-AMF37AOD.js} +21 -3
- package/dist/chunk-AMF37AOD.js.map +1 -0
- package/dist/chunk-AMYFRY7K.js +1 -0
- package/dist/chunk-ANHZT2X2.js +256 -0
- package/dist/chunk-ANHZT2X2.js.map +1 -0
- package/dist/{chunk-PKJUCI7B.js → chunk-APD5WA65.js} +2 -2
- package/dist/chunk-AVHWS36I.js +1 -0
- package/dist/chunk-AZXCLCIV.cjs +1 -0
- package/dist/chunk-AZXCLCIV.cjs.map +1 -0
- package/dist/{chunk-EXAPMLPA.cjs → chunk-BNCUXVZF.cjs} +3 -3
- package/dist/{chunk-EXAPMLPA.cjs.map → chunk-BNCUXVZF.cjs.map} +1 -1
- package/dist/{chunk-SNLIKIJP.js → chunk-BP6BOEVE.js} +2 -2
- package/dist/{chunk-4A7BAISU.js → chunk-BQZ4XAYH.js} +34 -27
- package/dist/chunk-BQZ4XAYH.js.map +1 -0
- package/dist/chunk-BYSA3YCV.cjs +309 -0
- package/dist/chunk-BYSA3YCV.cjs.map +1 -0
- package/dist/chunk-C37NYN62.cjs +1 -0
- package/dist/chunk-C37NYN62.cjs.map +1 -0
- package/dist/chunk-CNY63MC2.cjs +1 -0
- package/dist/chunk-CNY63MC2.cjs.map +1 -0
- package/dist/{chunk-NDHMY3IR.js → chunk-CUGEH7EB.js} +11 -3
- package/dist/chunk-CUGEH7EB.js.map +1 -0
- package/dist/{chunk-NUC6WJU4.cjs → chunk-CUOYBYI4.cjs} +8 -8
- package/dist/{chunk-NUC6WJU4.cjs.map → chunk-CUOYBYI4.cjs.map} +1 -1
- package/dist/chunk-CWUZ4SZN.js +1 -0
- package/dist/{chunk-QGK2KYQS.js → chunk-CYHSWWH6.js} +18 -8
- package/dist/chunk-CYHSWWH6.js.map +1 -0
- package/dist/{chunk-GMBIFJOA.cjs → chunk-DAKCNDN5.cjs} +19 -9
- package/dist/chunk-DAKCNDN5.cjs.map +1 -0
- package/dist/chunk-DI52GZLA.cjs +116 -0
- package/dist/chunk-DI52GZLA.cjs.map +1 -0
- package/dist/{chunk-4U5TTO6E.cjs → chunk-DU4YQEIM.cjs} +71 -28
- package/dist/chunk-DU4YQEIM.cjs.map +1 -0
- package/dist/chunk-DUJCV2NZ.cjs +1 -0
- package/dist/chunk-DUJCV2NZ.cjs.map +1 -0
- package/dist/{chunk-YH44Q6CI.cjs → chunk-DVKPFWP2.cjs} +7 -7
- package/dist/{chunk-YH44Q6CI.cjs.map → chunk-DVKPFWP2.cjs.map} +1 -1
- package/dist/chunk-DWCTUNFU.cjs +85 -0
- package/dist/chunk-DWCTUNFU.cjs.map +1 -0
- package/dist/chunk-E5ZIKIGB.js +22 -0
- package/dist/chunk-E5ZIKIGB.js.map +1 -0
- package/dist/chunk-EMXKYSUI.cjs +341 -0
- package/dist/chunk-EMXKYSUI.cjs.map +1 -0
- package/dist/chunk-EQINOHB6.cjs +169 -0
- package/dist/chunk-EQINOHB6.cjs.map +1 -0
- package/dist/chunk-EY5XTOWH.cjs +45 -0
- package/dist/chunk-EY5XTOWH.cjs.map +1 -0
- package/dist/chunk-EZRPCQSP.js +272 -0
- package/dist/chunk-EZRPCQSP.js.map +1 -0
- package/dist/chunk-F5YD6T5D.js +1 -0
- package/dist/chunk-FF4QNJOQ.js +149 -0
- package/dist/chunk-FF4QNJOQ.js.map +1 -0
- package/dist/chunk-FFGALWM2.js +1113 -0
- package/dist/chunk-FFGALWM2.js.map +1 -0
- package/dist/chunk-FFUNMWQV.cjs +1 -0
- package/dist/chunk-FFUNMWQV.cjs.map +1 -0
- package/dist/chunk-FO7IICMM.js +61 -0
- package/dist/chunk-FO7IICMM.js.map +1 -0
- package/dist/{chunk-CGCO7RFO.js → chunk-FPXFD5XT.js} +2 -2
- package/dist/chunk-FQZ6F7FQ.cjs +1 -0
- package/dist/chunk-FQZ6F7FQ.cjs.map +1 -0
- package/dist/{chunk-CBCUQUHI.cjs → chunk-FUFFG2UW.cjs} +38 -12
- package/dist/chunk-FUFFG2UW.cjs.map +1 -0
- package/dist/{chunk-YVQOUGWG.cjs → chunk-FV6E33FY.cjs} +25 -11
- package/dist/chunk-FV6E33FY.cjs.map +1 -0
- package/dist/chunk-G6LUBXN2.js +271 -0
- package/dist/chunk-G6LUBXN2.js.map +1 -0
- package/dist/chunk-G6ZOJVIG.cjs +271 -0
- package/dist/chunk-G6ZOJVIG.cjs.map +1 -0
- package/dist/{chunk-TT2DEREM.js → chunk-GCOBDP4W.js} +37 -20
- package/dist/chunk-GCOBDP4W.js.map +1 -0
- package/dist/chunk-GEVXV4RL.js +309 -0
- package/dist/chunk-GEVXV4RL.js.map +1 -0
- package/dist/{chunk-Y5IWUJF7.js → chunk-GHJEE4NW.js} +3 -11
- package/dist/chunk-GHJEE4NW.js.map +1 -0
- package/dist/chunk-GIHJ4J47.js +1 -0
- package/dist/{chunk-4RU33BRQ.js → chunk-GQAX2CH6.js} +20 -25
- package/dist/chunk-GQAX2CH6.js.map +1 -0
- package/dist/{chunk-NJIMQWBC.js → chunk-GS7QTYLD.js} +43 -23
- package/dist/chunk-GS7QTYLD.js.map +1 -0
- package/dist/{chunk-D4ZUV7FD.cjs → chunk-GUI2LDJZ.cjs} +5 -13
- package/dist/chunk-GUI2LDJZ.cjs.map +1 -0
- package/dist/chunk-GXF5IZEX.cjs +264 -0
- package/dist/chunk-GXF5IZEX.cjs.map +1 -0
- package/dist/{chunk-TM3FOGLK.cjs → chunk-GYUQ5TEQ.cjs} +1 -1
- package/dist/chunk-GYUQ5TEQ.cjs.map +1 -0
- package/dist/chunk-H2HKUDBZ.js +1 -0
- package/dist/chunk-H6AWWJHL.cjs +1 -0
- package/dist/chunk-H6AWWJHL.cjs.map +1 -0
- package/dist/{chunk-VSC3A6VB.cjs → chunk-H7QU5L7R.cjs} +14 -4
- package/dist/chunk-H7QU5L7R.cjs.map +1 -0
- package/dist/{chunk-WB5AEG5D.cjs → chunk-HC2H35U2.cjs} +57 -15
- package/dist/chunk-HC2H35U2.cjs.map +1 -0
- package/dist/{chunk-ZKYBLXU7.js → chunk-HMXCWHVT.js} +6 -14
- package/dist/chunk-HMXCWHVT.js.map +1 -0
- package/dist/{chunk-P2JM7CUD.cjs → chunk-HTKCQZIJ.cjs} +5 -5
- package/dist/chunk-HTKCQZIJ.cjs.map +1 -0
- package/dist/{chunk-I6BOBHO6.cjs → chunk-IFZWOLDF.cjs} +37 -12
- package/dist/chunk-IFZWOLDF.cjs.map +1 -0
- package/dist/chunk-IJ5F5RUW.cjs +1 -0
- package/dist/chunk-IJ5F5RUW.cjs.map +1 -0
- package/dist/{chunk-ATOT5N34.cjs → chunk-IM6TYL3P.cjs} +3 -3
- package/dist/{chunk-ATOT5N34.cjs.map → chunk-IM6TYL3P.cjs.map} +1 -1
- package/dist/chunk-IMW6TRMU.cjs +1 -0
- package/dist/chunk-IMW6TRMU.cjs.map +1 -0
- package/dist/{chunk-3X7ORLG5.cjs → chunk-J7XCG6SX.cjs} +4 -4
- package/dist/{chunk-3X7ORLG5.cjs.map → chunk-J7XCG6SX.cjs.map} +1 -1
- package/dist/chunk-JAMYRBHS.js +375 -0
- package/dist/chunk-JAMYRBHS.js.map +1 -0
- package/dist/{chunk-NQGCAXTW.cjs → chunk-JCOUZVG3.cjs} +26 -10
- package/dist/chunk-JCOUZVG3.cjs.map +1 -0
- package/dist/chunk-JWOG4I4P.js +130 -0
- package/dist/chunk-JWOG4I4P.js.map +1 -0
- package/dist/chunk-JXATJSBR.js +45 -0
- package/dist/chunk-JXATJSBR.js.map +1 -0
- package/dist/chunk-K27GNXBF.cjs +272 -0
- package/dist/chunk-K27GNXBF.cjs.map +1 -0
- package/dist/{chunk-3VOOMW6O.js → chunk-KDV7V5S4.js} +2 -2
- package/dist/chunk-KSEN4ESR.js +230 -0
- package/dist/chunk-KSEN4ESR.js.map +1 -0
- package/dist/chunk-LEDIOXDM.js +341 -0
- package/dist/chunk-LEDIOXDM.js.map +1 -0
- package/dist/chunk-MKQBAQIH.js +1 -0
- package/dist/chunk-MS6HASC6.js +1 -0
- package/dist/chunk-MVKIXWKJ.js +114 -0
- package/dist/chunk-MVKIXWKJ.js.map +1 -0
- package/dist/{chunk-BGS3MCQZ.cjs → chunk-NH7XLE7E.cjs} +6 -14
- package/dist/chunk-NH7XLE7E.cjs.map +1 -0
- package/dist/chunk-NJIQJHJS.js +264 -0
- package/dist/chunk-NJIQJHJS.js.map +1 -0
- package/dist/{chunk-HBAHWCBK.js → chunk-NKCBDSI2.js} +3 -3
- package/dist/chunk-NL4LM47X.cjs +178 -0
- package/dist/chunk-NL4LM47X.cjs.map +1 -0
- package/dist/chunk-NOXQQACO.js +173 -0
- package/dist/chunk-NOXQQACO.js.map +1 -0
- package/dist/{chunk-VNITXANA.js → chunk-NS4IRTKQ.js} +1 -1
- package/dist/chunk-NS4IRTKQ.js.map +1 -0
- package/dist/chunk-NT6EEI44.cjs +86 -0
- package/dist/chunk-NT6EEI44.cjs.map +1 -0
- package/dist/chunk-NVCOEKCU.js +1 -0
- package/dist/chunk-O7BBEN7E.cjs +503 -0
- package/dist/chunk-O7BBEN7E.cjs.map +1 -0
- package/dist/{chunk-BBGCS5PZ.cjs → chunk-ODNO43HV.cjs} +6 -6
- package/dist/chunk-ODNO43HV.cjs.map +1 -0
- package/dist/chunk-ORRYZCLQ.cjs +1 -0
- package/dist/chunk-ORRYZCLQ.cjs.map +1 -0
- package/dist/{chunk-MCHL23CE.js → chunk-P7XKSXHH.js} +49 -34
- package/dist/chunk-P7XKSXHH.js.map +1 -0
- package/dist/chunk-PLLUSKME.cjs +95 -0
- package/dist/chunk-PLLUSKME.cjs.map +1 -0
- package/dist/chunk-PLT3EZZ5.js +194 -0
- package/dist/chunk-PLT3EZZ5.js.map +1 -0
- package/dist/{chunk-UPIDCMZI.cjs → chunk-QCITJAK6.cjs} +74 -17
- package/dist/chunk-QCITJAK6.cjs.map +1 -0
- package/dist/chunk-QE3ZFSJK.js +55 -0
- package/dist/chunk-QE3ZFSJK.js.map +1 -0
- package/dist/chunk-QG3PLYK6.js +53 -0
- package/dist/chunk-QG3PLYK6.js.map +1 -0
- package/dist/chunk-QLV4RQVQ.cjs +230 -0
- package/dist/chunk-QLV4RQVQ.cjs.map +1 -0
- package/dist/chunk-QU32POS4.js +150 -0
- package/dist/chunk-QU32POS4.js.map +1 -0
- package/dist/{chunk-C3YKGPQM.cjs → chunk-REDX5DCT.cjs} +34 -27
- package/dist/chunk-REDX5DCT.cjs.map +1 -0
- package/dist/{chunk-CNAMOK3Z.cjs → chunk-RH3CQOEI.cjs} +4 -4
- package/dist/{chunk-CNAMOK3Z.cjs.map → chunk-RH3CQOEI.cjs.map} +1 -1
- package/dist/chunk-RQRA5CCA.js +1 -0
- package/dist/chunk-SA7NMDD5.cjs +53 -0
- package/dist/chunk-SA7NMDD5.cjs.map +1 -0
- package/dist/{chunk-WI4WQGF6.cjs → chunk-SJN37JUC.cjs} +57 -42
- package/dist/chunk-SJN37JUC.cjs.map +1 -0
- package/dist/chunk-SOQFBVCQ.cjs +73 -0
- package/dist/chunk-SOQFBVCQ.cjs.map +1 -0
- package/dist/chunk-SZE2JS36.cjs +55 -0
- package/dist/chunk-SZE2JS36.cjs.map +1 -0
- package/dist/chunk-SZMS46F5.js +124 -0
- package/dist/chunk-SZMS46F5.js.map +1 -0
- package/dist/chunk-T2E5XT7P.js +1 -0
- package/dist/{chunk-CISRE6BC.cjs → chunk-T3NVC7UU.cjs} +6 -6
- package/dist/{chunk-CISRE6BC.cjs.map → chunk-T3NVC7UU.cjs.map} +1 -1
- package/dist/{chunk-VAF6PKVY.js → chunk-TG2IDU3W.js} +2 -2
- package/dist/{chunk-SZUMMROW.js → chunk-TNIRKGXY.js} +22 -8
- package/dist/chunk-TNIRKGXY.js.map +1 -0
- package/dist/chunk-TPAVJN55.cjs +1 -0
- package/dist/chunk-TPAVJN55.cjs.map +1 -0
- package/dist/{chunk-IFEWF24B.js → chunk-TPD2GNR6.js} +3 -3
- package/dist/chunk-TPNCV7KA.js +1 -0
- package/dist/{chunk-PZWJQNCY.cjs → chunk-TYZIRV75.cjs} +19 -11
- package/dist/chunk-TYZIRV75.cjs.map +1 -0
- package/dist/chunk-U24PBXZA.cjs +130 -0
- package/dist/chunk-U24PBXZA.cjs.map +1 -0
- package/dist/chunk-U7SCEB34.js +181 -0
- package/dist/chunk-U7SCEB34.js.map +1 -0
- package/dist/{chunk-BGKYCKNM.cjs → chunk-UGQBOWHR.cjs} +6 -6
- package/dist/{chunk-BGKYCKNM.cjs.map → chunk-UGQBOWHR.cjs.map} +1 -1
- package/dist/{chunk-BS3UEJ5G.js → chunk-UV4Q3LRC.js} +28 -16
- package/dist/chunk-UV4Q3LRC.js.map +1 -0
- package/dist/chunk-VB5VOUED.js +1 -0
- package/dist/{chunk-M5ZXQ2QS.js → chunk-VEFRVKSA.js} +60 -18
- package/dist/chunk-VEFRVKSA.js.map +1 -0
- package/dist/chunk-VISVU5LS.js +41 -0
- package/dist/chunk-VISVU5LS.js.map +1 -0
- package/dist/{chunk-MQN6A3CE.js → chunk-VJV3K53D.js} +17 -9
- package/dist/chunk-VJV3K53D.js.map +1 -0
- package/dist/chunk-VMR4KVFM.cjs +1 -0
- package/dist/chunk-VMR4KVFM.cjs.map +1 -0
- package/dist/{chunk-JWUYPAFC.cjs → chunk-VN2YHNUE.cjs} +43 -23
- package/dist/chunk-VN2YHNUE.cjs.map +1 -0
- package/dist/{chunk-GVND3JE3.js → chunk-VRPFA4CN.js} +2 -2
- package/dist/chunk-VYP5GX57.cjs +167 -0
- package/dist/chunk-VYP5GX57.cjs.map +1 -0
- package/dist/{chunk-DEC2WM3G.js → chunk-WGCK6KKL.js} +36 -10
- package/dist/chunk-WGCK6KKL.js.map +1 -0
- package/dist/{chunk-66EVFQVL.js → chunk-WHKNCDTX.js} +3 -3
- package/dist/{chunk-MGZO7MBN.cjs → chunk-WOTSK33U.cjs} +23 -5
- package/dist/chunk-WOTSK33U.cjs.map +1 -0
- package/dist/{chunk-BTP7G7WR.js → chunk-WRCHASO2.js} +5 -5
- package/dist/chunk-WRCHASO2.js.map +1 -0
- package/dist/{chunk-FI65HI2H.js → chunk-WRUVDZRI.js} +49 -22
- package/dist/chunk-WRUVDZRI.js.map +1 -0
- package/dist/chunk-WUSHGDHJ.cjs +1 -0
- package/dist/chunk-WUSHGDHJ.cjs.map +1 -0
- package/dist/{chunk-XCR3TPXT.js → chunk-XB6YHZAG.js} +70 -27
- package/dist/chunk-XB6YHZAG.js.map +1 -0
- package/dist/{chunk-AV6BIQQA.js → chunk-Y2E2RLBI.js} +14 -4
- package/dist/chunk-Y2E2RLBI.js.map +1 -0
- package/dist/chunk-YCIZERNO.cjs +150 -0
- package/dist/chunk-YCIZERNO.cjs.map +1 -0
- package/dist/chunk-YD2UW3PB.js +1 -0
- package/dist/chunk-YOKOPO2W.cjs +181 -0
- package/dist/chunk-YOKOPO2W.cjs.map +1 -0
- package/dist/chunk-YS2JJ73M.cjs +1113 -0
- package/dist/chunk-YS2JJ73M.cjs.map +1 -0
- package/dist/chunk-YS3BV5KJ.cjs +41 -0
- package/dist/chunk-YS3BV5KJ.cjs.map +1 -0
- package/dist/chunk-YUW5S2BZ.cjs +1 -0
- package/dist/chunk-YUW5S2BZ.cjs.map +1 -0
- package/dist/chunk-Z2LJBEIV.cjs +149 -0
- package/dist/chunk-Z2LJBEIV.cjs.map +1 -0
- package/dist/{chunk-TTHWYBQB.cjs → chunk-Z6YQH5SZ.cjs} +11 -3
- package/dist/chunk-Z6YQH5SZ.cjs.map +1 -0
- package/dist/chunk-Z6ZCVVNU.js +86 -0
- package/dist/chunk-Z6ZCVVNU.js.map +1 -0
- package/dist/{chunk-JOJ23OD4.js → chunk-ZNDJS2W7.js} +36 -11
- package/dist/chunk-ZNDJS2W7.js.map +1 -0
- package/dist/chunk-ZNUMOJOI.cjs +1 -0
- package/dist/chunk-ZNUMOJOI.cjs.map +1 -0
- package/dist/chunk-ZYPPXGI7.cjs +1 -0
- package/dist/chunk-ZYPPXGI7.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.cjs +3 -3
- package/dist/components/Accordion/Accordion.js +2 -2
- package/dist/components/Accordion/index.cjs +3 -3
- package/dist/components/Accordion/index.js +2 -2
- package/dist/components/Avatar/Avatar.cjs +2 -2
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/Avatar/index.cjs +2 -2
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.cjs +5 -3
- package/dist/components/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +4 -2
- package/dist/components/Breadcrumb/index.cjs +5 -3
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.js +4 -2
- package/dist/components/Button/Button.cjs +3 -3
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/index.cjs +3 -3
- package/dist/components/Button/index.js +2 -2
- package/dist/components/Card/Card.cjs +9 -2
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.js +8 -1
- package/dist/components/Card/index.cjs +9 -2
- package/dist/components/Card/index.cjs.map +1 -1
- package/dist/components/Card/index.js +8 -1
- package/dist/components/Carousel/Carousel.cjs +26 -0
- package/dist/components/Carousel/Carousel.cjs.map +1 -0
- package/dist/components/Carousel/Carousel.js +26 -0
- package/dist/components/Carousel/index.cjs +26 -0
- package/dist/components/Carousel/index.cjs.map +1 -0
- package/dist/components/Carousel/index.js +26 -0
- package/dist/components/Charts/Charts.cjs +14 -0
- package/dist/components/Charts/Charts.cjs.map +1 -0
- package/dist/components/Charts/Charts.js +14 -0
- package/dist/components/Charts/index.cjs +14 -0
- package/dist/components/Charts/index.cjs.map +1 -0
- package/dist/components/Charts/index.js +14 -0
- package/dist/components/Charts/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.cjs +4 -4
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/index.cjs +4 -4
- package/dist/components/Checkbox/index.js +3 -3
- package/dist/components/Chip/Chip.cjs +11 -0
- package/dist/components/Chip/Chip.cjs.map +1 -0
- package/dist/components/Chip/Chip.js +11 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Chip/index.cjs +11 -0
- package/dist/components/Chip/index.cjs.map +1 -0
- package/dist/components/Chip/index.js +11 -0
- package/dist/components/Chip/index.js.map +1 -0
- package/dist/components/CodeSnippet/CodeSnippet.cjs +15 -0
- package/dist/components/CodeSnippet/CodeSnippet.cjs.map +1 -0
- package/dist/components/CodeSnippet/CodeSnippet.js +15 -0
- package/dist/components/CodeSnippet/CodeSnippet.js.map +1 -0
- package/dist/components/CodeSnippet/index.cjs +15 -0
- package/dist/components/CodeSnippet/index.cjs.map +1 -0
- package/dist/components/CodeSnippet/index.js +15 -0
- package/dist/components/CodeSnippet/index.js.map +1 -0
- package/dist/components/Command/Command.cjs +3 -3
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/index.cjs +3 -3
- package/dist/components/Command/index.js +2 -2
- package/dist/components/ContentSwitcher/ContentSwitcher.cjs +13 -0
- package/dist/components/ContentSwitcher/ContentSwitcher.cjs.map +1 -0
- package/dist/components/ContentSwitcher/ContentSwitcher.js +13 -0
- package/dist/components/ContentSwitcher/ContentSwitcher.js.map +1 -0
- package/dist/components/ContentSwitcher/index.cjs +13 -0
- package/dist/components/ContentSwitcher/index.cjs.map +1 -0
- package/dist/components/ContentSwitcher/index.js +13 -0
- package/dist/components/ContentSwitcher/index.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.cjs +4 -4
- package/dist/components/DatePicker/DatePicker.js +3 -3
- package/dist/components/DatePicker/index.cjs +4 -4
- package/dist/components/DatePicker/index.js +3 -3
- package/dist/components/DateRangePicker/DateRangePicker.cjs +4 -4
- package/dist/components/DateRangePicker/DateRangePicker.js +3 -3
- package/dist/components/DateRangePicker/index.cjs +4 -4
- package/dist/components/DateRangePicker/index.js +3 -3
- package/dist/components/DigitalStamp/DigitalStamp.cjs +12 -0
- package/dist/components/DigitalStamp/DigitalStamp.cjs.map +1 -0
- package/dist/components/DigitalStamp/DigitalStamp.js +12 -0
- package/dist/components/DigitalStamp/DigitalStamp.js.map +1 -0
- package/dist/components/DigitalStamp/index.cjs +12 -0
- package/dist/components/DigitalStamp/index.cjs.map +1 -0
- package/dist/components/DigitalStamp/index.js +12 -0
- package/dist/components/DigitalStamp/index.js.map +1 -0
- package/dist/components/Divider/Divider.cjs +2 -2
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Divider/index.cjs +2 -2
- package/dist/components/Divider/index.js +1 -1
- package/dist/components/Drawer/Drawer.cjs +3 -3
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/Drawer/index.cjs +3 -3
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/Dropdown/Dropdown.cjs +22 -0
- package/dist/components/Dropdown/Dropdown.cjs.map +1 -0
- package/dist/components/Dropdown/Dropdown.js +22 -0
- package/dist/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/components/Dropdown/index.cjs +22 -0
- package/dist/components/Dropdown/index.cjs.map +1 -0
- package/dist/components/Dropdown/index.js +22 -0
- package/dist/components/Dropdown/index.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.cjs +3 -3
- package/dist/components/DropdownMenu/DropdownMenu.js +2 -2
- package/dist/components/DropdownMenu/index.cjs +3 -3
- package/dist/components/DropdownMenu/index.js +2 -2
- package/dist/components/EmptyState/EmptyState.cjs +3 -3
- package/dist/components/EmptyState/EmptyState.js +2 -2
- package/dist/components/EmptyState/index.cjs +3 -3
- package/dist/components/EmptyState/index.js +2 -2
- package/dist/components/FileUpload/FileUpload.cjs +6 -8
- package/dist/components/FileUpload/FileUpload.cjs.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +5 -7
- package/dist/components/FileUpload/index.cjs +6 -8
- package/dist/components/FileUpload/index.cjs.map +1 -1
- package/dist/components/FileUpload/index.js +5 -7
- package/dist/components/Filtration/Filtration.cjs +44 -0
- package/dist/components/Filtration/Filtration.cjs.map +1 -0
- package/dist/components/Filtration/Filtration.js +44 -0
- package/dist/components/Filtration/Filtration.js.map +1 -0
- package/dist/components/Filtration/index.cjs +44 -0
- package/dist/components/Filtration/index.cjs.map +1 -0
- package/dist/components/Filtration/index.js +44 -0
- package/dist/components/Filtration/index.js.map +1 -0
- package/dist/components/FloatingButton/FloatingButton.cjs +11 -0
- package/dist/components/FloatingButton/FloatingButton.cjs.map +1 -0
- package/dist/components/FloatingButton/FloatingButton.js +11 -0
- package/dist/components/FloatingButton/FloatingButton.js.map +1 -0
- package/dist/components/FloatingButton/index.cjs +11 -0
- package/dist/components/FloatingButton/index.cjs.map +1 -0
- package/dist/components/FloatingButton/index.js +11 -0
- package/dist/components/FloatingButton/index.js.map +1 -0
- package/dist/components/InlineAlert/InlineAlert.cjs +14 -0
- package/dist/components/InlineAlert/InlineAlert.cjs.map +1 -0
- package/dist/components/InlineAlert/InlineAlert.js +14 -0
- package/dist/components/InlineAlert/InlineAlert.js.map +1 -0
- package/dist/components/InlineAlert/index.cjs +14 -0
- package/dist/components/InlineAlert/index.cjs.map +1 -0
- package/dist/components/InlineAlert/index.js +14 -0
- package/dist/components/InlineAlert/index.js.map +1 -0
- package/dist/components/InputOTP/InputOTP.cjs +3 -3
- package/dist/components/InputOTP/InputOTP.js +2 -2
- package/dist/components/InputOTP/index.cjs +3 -3
- package/dist/components/InputOTP/index.js +2 -2
- package/dist/components/Link/Link.cjs +3 -3
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Link/index.cjs +3 -3
- package/dist/components/Link/index.js +2 -2
- package/dist/components/List/List.cjs +2 -8
- package/dist/components/List/List.cjs.map +1 -1
- package/dist/components/List/List.js +1 -7
- package/dist/components/List/index.cjs +2 -8
- package/dist/components/List/index.cjs.map +1 -1
- package/dist/components/List/index.js +1 -7
- package/dist/components/Menubar/Menubar.cjs +3 -3
- package/dist/components/Menubar/Menubar.js +2 -2
- package/dist/components/Menubar/index.cjs +3 -3
- package/dist/components/Menubar/index.js +2 -2
- package/dist/components/Metric/Metric.cjs +16 -0
- package/dist/components/Metric/Metric.cjs.map +1 -0
- package/dist/components/Metric/Metric.js +16 -0
- package/dist/components/Metric/Metric.js.map +1 -0
- package/dist/components/Metric/MetricGroup.cjs +11 -0
- package/dist/components/Metric/MetricGroup.cjs.map +1 -0
- package/dist/components/Metric/MetricGroup.js +11 -0
- package/dist/components/Metric/MetricGroup.js.map +1 -0
- package/dist/components/Metric/index.cjs +22 -0
- package/dist/components/Metric/index.cjs.map +1 -0
- package/dist/components/Metric/index.js +22 -0
- package/dist/components/Metric/index.js.map +1 -0
- package/dist/components/Modal/Modal.cjs +3 -3
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/index.cjs +3 -3
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Notification/Notification.cjs +12 -0
- package/dist/components/Notification/Notification.cjs.map +1 -0
- package/dist/components/Notification/Notification.js +12 -0
- package/dist/components/Notification/Notification.js.map +1 -0
- package/dist/components/Notification/index.cjs +12 -0
- package/dist/components/Notification/index.cjs.map +1 -0
- package/dist/components/Notification/index.js +12 -0
- package/dist/components/Notification/index.js.map +1 -0
- package/dist/components/NotificationToast/NotificationToast.cjs +24 -0
- package/dist/components/NotificationToast/NotificationToast.cjs.map +1 -0
- package/dist/components/NotificationToast/NotificationToast.js +24 -0
- package/dist/components/NotificationToast/NotificationToast.js.map +1 -0
- package/dist/components/NotificationToast/index.cjs +24 -0
- package/dist/components/NotificationToast/index.cjs.map +1 -0
- package/dist/components/NotificationToast/index.js +24 -0
- package/dist/components/NotificationToast/index.js.map +1 -0
- package/dist/components/NotificationToast/toast-store.cjs +14 -0
- package/dist/components/NotificationToast/toast-store.cjs.map +1 -0
- package/dist/components/{Toast → NotificationToast}/toast-store.js +1 -1
- package/dist/components/NotificationToast/toast-store.js.map +1 -0
- package/dist/components/NumberInput/NumberInput.cjs +4 -4
- package/dist/components/NumberInput/NumberInput.js +3 -3
- package/dist/components/NumberInput/index.cjs +4 -4
- package/dist/components/NumberInput/index.js +3 -3
- package/dist/components/Pagination/Pagination.cjs +6 -3
- package/dist/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/components/Pagination/Pagination.js +5 -2
- package/dist/components/Pagination/index.cjs +7 -4
- package/dist/components/Pagination/index.cjs.map +1 -1
- package/dist/components/Pagination/index.js +8 -5
- package/dist/components/Popover/Popover.cjs +3 -3
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Popover/index.cjs +3 -3
- package/dist/components/Popover/index.js +2 -2
- package/dist/components/Progress/Progress.cjs +3 -2
- package/dist/components/Progress/Progress.cjs.map +1 -1
- package/dist/components/Progress/Progress.js +2 -1
- package/dist/components/Progress/index.cjs +3 -2
- package/dist/components/Progress/index.cjs.map +1 -1
- package/dist/components/Progress/index.js +2 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.cjs +24 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.cjs.map +1 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.js +24 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.js.map +1 -0
- package/dist/components/ProgressIndicator/index.cjs +24 -0
- package/dist/components/ProgressIndicator/index.cjs.map +1 -0
- package/dist/components/ProgressIndicator/index.js +24 -0
- package/dist/components/ProgressIndicator/index.js.map +1 -0
- package/dist/components/Quote/Quote.cjs +2 -11
- package/dist/components/Quote/Quote.cjs.map +1 -1
- package/dist/components/Quote/Quote.js +1 -10
- package/dist/components/Quote/index.cjs +2 -11
- package/dist/components/Quote/index.cjs.map +1 -1
- package/dist/components/Quote/index.js +1 -10
- package/dist/components/Radio/Radio.cjs +3 -3
- package/dist/components/Radio/Radio.js +2 -2
- package/dist/components/Radio/index.cjs +3 -3
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/Rating/Rating.cjs +4 -4
- package/dist/components/Rating/Rating.js +3 -3
- package/dist/components/Rating/index.cjs +4 -4
- package/dist/components/Rating/index.js +3 -3
- package/dist/components/SaudiRiyal/SaudiRiyal.cjs +16 -0
- package/dist/components/SaudiRiyal/SaudiRiyal.cjs.map +1 -0
- package/dist/components/SaudiRiyal/SaudiRiyal.js +16 -0
- package/dist/components/SaudiRiyal/SaudiRiyal.js.map +1 -0
- package/dist/components/SaudiRiyal/index.cjs +16 -0
- package/dist/components/SaudiRiyal/index.cjs.map +1 -0
- package/dist/components/SaudiRiyal/index.js +16 -0
- package/dist/components/SaudiRiyal/index.js.map +1 -0
- package/dist/components/SearchBox/SearchBox.cjs +8 -8
- package/dist/components/SearchBox/SearchBox.js +7 -7
- package/dist/components/SearchBox/index.cjs +8 -8
- package/dist/components/SearchBox/index.js +7 -7
- package/dist/components/Select/Select.cjs +4 -4
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/index.cjs +4 -4
- package/dist/components/Select/index.js +3 -3
- package/dist/components/Sidebar/Sidebar.cjs +4 -4
- package/dist/components/Sidebar/Sidebar.js +3 -3
- package/dist/components/Sidebar/SidebarMenu.cjs +4 -4
- package/dist/components/Sidebar/SidebarMenu.js +3 -3
- package/dist/components/Sidebar/index.cjs +7 -7
- package/dist/components/Sidebar/index.js +6 -6
- package/dist/components/Skeleton/Skeleton.cjs +2 -2
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/index.cjs +2 -2
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/SlideoutMenu/SlideoutMenu.cjs +35 -0
- package/dist/components/SlideoutMenu/SlideoutMenu.cjs.map +1 -0
- package/dist/components/SlideoutMenu/SlideoutMenu.js +35 -0
- package/dist/components/SlideoutMenu/SlideoutMenu.js.map +1 -0
- package/dist/components/SlideoutMenu/index.cjs +35 -0
- package/dist/components/SlideoutMenu/index.cjs.map +1 -0
- package/dist/components/SlideoutMenu/index.js +35 -0
- package/dist/components/SlideoutMenu/index.js.map +1 -0
- package/dist/components/Slider/Slider.cjs +3 -3
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/index.cjs +3 -3
- package/dist/components/Slider/index.js +2 -2
- package/dist/components/Spinner/Spinner.cjs +2 -2
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Spinner/index.cjs +2 -2
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/StatusTag/StatusTag.cjs +11 -0
- package/dist/components/StatusTag/StatusTag.cjs.map +1 -0
- package/dist/components/StatusTag/StatusTag.js +11 -0
- package/dist/components/StatusTag/StatusTag.js.map +1 -0
- package/dist/components/StatusTag/index.cjs +11 -0
- package/dist/components/StatusTag/index.cjs.map +1 -0
- package/dist/components/StatusTag/index.js +11 -0
- package/dist/components/StatusTag/index.js.map +1 -0
- package/dist/components/StructuredList/StructuredList.cjs +27 -0
- package/dist/components/StructuredList/StructuredList.cjs.map +1 -0
- package/dist/components/StructuredList/StructuredList.js +27 -0
- package/dist/components/StructuredList/StructuredList.js.map +1 -0
- package/dist/components/StructuredList/index.cjs +27 -0
- package/dist/components/StructuredList/index.cjs.map +1 -0
- package/dist/components/StructuredList/index.js +27 -0
- package/dist/components/StructuredList/index.js.map +1 -0
- package/dist/components/Switch/Switch.cjs +3 -3
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/index.cjs +3 -3
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/Table/Table.cjs +3 -3
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Table/index.cjs +3 -3
- package/dist/components/Table/index.js +2 -2
- package/dist/components/Tabs/Tabs.cjs +5 -2
- package/dist/components/Tabs/Tabs.cjs.map +1 -1
- package/dist/components/Tabs/Tabs.js +4 -1
- package/dist/components/Tabs/index.cjs +5 -2
- package/dist/components/Tabs/index.cjs.map +1 -1
- package/dist/components/Tabs/index.js +4 -1
- package/dist/components/Tag/Tag.cjs +12 -0
- package/dist/components/Tag/Tag.cjs.map +1 -0
- package/dist/components/Tag/Tag.js +12 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Tag/index.cjs +12 -0
- package/dist/components/Tag/index.cjs.map +1 -0
- package/dist/components/Tag/index.js +12 -0
- package/dist/components/Tag/index.js.map +1 -0
- package/dist/components/TagInput/TagInput.cjs +6 -6
- package/dist/components/TagInput/TagInput.js +5 -5
- package/dist/components/TagInput/index.cjs +6 -6
- package/dist/components/TagInput/index.js +5 -5
- package/dist/components/TextInput/TextInput.cjs +19 -0
- package/dist/components/TextInput/TextInput.cjs.map +1 -0
- package/dist/components/TextInput/TextInput.js +19 -0
- package/dist/components/TextInput/TextInput.js.map +1 -0
- package/dist/components/TextInput/index.cjs +19 -0
- package/dist/components/TextInput/index.cjs.map +1 -0
- package/dist/components/TextInput/index.js +19 -0
- package/dist/components/TextInput/index.js.map +1 -0
- package/dist/components/Textarea/Textarea.cjs +4 -3
- package/dist/components/Textarea/Textarea.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.js +3 -2
- package/dist/components/Textarea/index.cjs +4 -3
- package/dist/components/Textarea/index.cjs.map +1 -1
- package/dist/components/Textarea/index.js +3 -2
- package/dist/components/Timeline/Timeline.cjs +2 -2
- package/dist/components/Timeline/Timeline.js +1 -1
- package/dist/components/Timeline/index.cjs +2 -2
- package/dist/components/Timeline/index.js +1 -1
- package/dist/components/Toggle/Toggle.cjs +2 -8
- package/dist/components/Toggle/Toggle.cjs.map +1 -1
- package/dist/components/Toggle/Toggle.js +1 -7
- package/dist/components/Toggle/index.cjs +2 -8
- package/dist/components/Toggle/index.cjs.map +1 -1
- package/dist/components/Toggle/index.js +1 -7
- package/dist/components/Tooltip/Tooltip.cjs +4 -2
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -1
- package/dist/components/Tooltip/index.cjs +4 -2
- package/dist/components/Tooltip/index.cjs.map +1 -1
- package/dist/components/Tooltip/index.js +3 -1
- package/dist/field/FieldMessage.cjs +2 -2
- package/dist/field/FieldMessage.js +1 -1
- package/dist/field/index.cjs +2 -2
- package/dist/field/index.js +1 -1
- package/dist/index.cjs +245 -98
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1024 -407
- package/dist/index.d.ts +1024 -407
- package/dist/index.js +426 -279
- 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 +18 -9
- package/dist/chunk-23C5MSXZ.cjs +0 -86
- package/dist/chunk-23C5MSXZ.cjs.map +0 -1
- package/dist/chunk-4A7BAISU.js.map +0 -1
- package/dist/chunk-4RU33BRQ.js.map +0 -1
- package/dist/chunk-4T6QBG46.cjs.map +0 -1
- package/dist/chunk-4U5TTO6E.cjs.map +0 -1
- package/dist/chunk-5EUEJU47.js.map +0 -1
- package/dist/chunk-5MQV6PLC.js +0 -1
- package/dist/chunk-5QC5N3OO.js +0 -77
- package/dist/chunk-5QC5N3OO.js.map +0 -1
- package/dist/chunk-6BZMLKCU.cjs.map +0 -1
- package/dist/chunk-6DN3JE3P.js +0 -271
- package/dist/chunk-6DN3JE3P.js.map +0 -1
- package/dist/chunk-6ELYUHB6.js +0 -45
- package/dist/chunk-6ELYUHB6.js.map +0 -1
- package/dist/chunk-6NZXWKUE.js +0 -1
- package/dist/chunk-7QCXGMBX.js +0 -1
- package/dist/chunk-A6RVSF5V.cjs +0 -77
- package/dist/chunk-A6RVSF5V.cjs.map +0 -1
- package/dist/chunk-AM2OVOQV.cjs +0 -45
- package/dist/chunk-AM2OVOQV.cjs.map +0 -1
- package/dist/chunk-AV6BIQQA.js.map +0 -1
- package/dist/chunk-AYIS62JR.cjs.map +0 -1
- package/dist/chunk-BBGCS5PZ.cjs.map +0 -1
- package/dist/chunk-BGS3MCQZ.cjs.map +0 -1
- package/dist/chunk-BJ3CUFXY.cjs +0 -123
- package/dist/chunk-BJ3CUFXY.cjs.map +0 -1
- package/dist/chunk-BS3UEJ5G.js.map +0 -1
- package/dist/chunk-BS4PX23P.js +0 -102
- package/dist/chunk-BS4PX23P.js.map +0 -1
- package/dist/chunk-BTP7G7WR.js.map +0 -1
- package/dist/chunk-C3YKGPQM.cjs.map +0 -1
- package/dist/chunk-CBCUQUHI.cjs.map +0 -1
- package/dist/chunk-CDS4SYEQ.js +0 -456
- package/dist/chunk-CDS4SYEQ.js.map +0 -1
- package/dist/chunk-CVQFSXRR.cjs +0 -271
- package/dist/chunk-CVQFSXRR.cjs.map +0 -1
- package/dist/chunk-D4ZUV7FD.cjs.map +0 -1
- package/dist/chunk-DEC2WM3G.js.map +0 -1
- package/dist/chunk-DKRLAJZE.js +0 -45
- package/dist/chunk-DKRLAJZE.js.map +0 -1
- package/dist/chunk-DMWYQSO4.cjs +0 -100
- package/dist/chunk-DMWYQSO4.cjs.map +0 -1
- package/dist/chunk-DXY5JEC4.js +0 -137
- package/dist/chunk-DXY5JEC4.js.map +0 -1
- package/dist/chunk-E7WQI7PE.js +0 -19
- package/dist/chunk-E7WQI7PE.js.map +0 -1
- package/dist/chunk-EJHBW4AK.js +0 -100
- package/dist/chunk-EJHBW4AK.js.map +0 -1
- package/dist/chunk-EM55NWUF.js.map +0 -1
- package/dist/chunk-FEUMA5IS.cjs +0 -102
- package/dist/chunk-FEUMA5IS.cjs.map +0 -1
- package/dist/chunk-FI65HI2H.js.map +0 -1
- package/dist/chunk-G3M3XYMI.cjs +0 -1
- package/dist/chunk-GLWMKKLR.cjs +0 -109
- package/dist/chunk-GLWMKKLR.cjs.map +0 -1
- package/dist/chunk-GMBIFJOA.cjs.map +0 -1
- package/dist/chunk-GNL72FRN.js +0 -224
- package/dist/chunk-GNL72FRN.js.map +0 -1
- package/dist/chunk-I44YNYI6.cjs +0 -1
- package/dist/chunk-I6BOBHO6.cjs.map +0 -1
- package/dist/chunk-IFB53HNO.js +0 -61
- package/dist/chunk-IFB53HNO.js.map +0 -1
- package/dist/chunk-IKWD2OEN.cjs +0 -456
- package/dist/chunk-IKWD2OEN.cjs.map +0 -1
- package/dist/chunk-IQ4KQJAO.js +0 -1
- package/dist/chunk-ISUDUZEG.cjs +0 -1
- package/dist/chunk-IUEAUTR7.cjs +0 -1
- package/dist/chunk-JOJ23OD4.js.map +0 -1
- package/dist/chunk-JWUYPAFC.cjs.map +0 -1
- package/dist/chunk-K5P2VY5J.cjs +0 -140
- package/dist/chunk-K5P2VY5J.cjs.map +0 -1
- package/dist/chunk-KO5F344T.cjs +0 -1
- package/dist/chunk-KO5F344T.cjs.map +0 -1
- package/dist/chunk-KRIWNW4A.cjs +0 -131
- package/dist/chunk-KRIWNW4A.cjs.map +0 -1
- package/dist/chunk-KXO72WTH.js +0 -1
- package/dist/chunk-LDDAQLH6.js +0 -140
- package/dist/chunk-LDDAQLH6.js.map +0 -1
- package/dist/chunk-LG2IADSZ.cjs +0 -61
- package/dist/chunk-LG2IADSZ.cjs.map +0 -1
- package/dist/chunk-LQ4PCHBP.js +0 -109
- package/dist/chunk-LQ4PCHBP.js.map +0 -1
- package/dist/chunk-M5ZXQ2QS.js.map +0 -1
- package/dist/chunk-MCHL23CE.js.map +0 -1
- package/dist/chunk-MGZO7MBN.cjs.map +0 -1
- package/dist/chunk-MQN6A3CE.js.map +0 -1
- package/dist/chunk-N4FHLSNV.cjs +0 -19
- package/dist/chunk-N4FHLSNV.cjs.map +0 -1
- package/dist/chunk-NDHMY3IR.js.map +0 -1
- package/dist/chunk-NJIMQWBC.js.map +0 -1
- package/dist/chunk-NQGCAXTW.cjs.map +0 -1
- package/dist/chunk-NU3WUSG7.cjs +0 -189
- package/dist/chunk-NU3WUSG7.cjs.map +0 -1
- package/dist/chunk-O74TNSJD.cjs +0 -101
- package/dist/chunk-O74TNSJD.cjs.map +0 -1
- package/dist/chunk-OGZKNZS6.cjs +0 -111
- package/dist/chunk-OGZKNZS6.cjs.map +0 -1
- package/dist/chunk-OSUT5FH5.js +0 -1
- package/dist/chunk-P2JM7CUD.cjs.map +0 -1
- package/dist/chunk-P2K47B56.js +0 -116
- package/dist/chunk-P2K47B56.js.map +0 -1
- package/dist/chunk-PQJ5IGRQ.js +0 -123
- package/dist/chunk-PQJ5IGRQ.js.map +0 -1
- package/dist/chunk-PZWJQNCY.cjs.map +0 -1
- package/dist/chunk-QFHAVVXT.js +0 -86
- package/dist/chunk-QFHAVVXT.js.map +0 -1
- package/dist/chunk-QGK2KYQS.js.map +0 -1
- package/dist/chunk-RCR5CRZ5.js +0 -1
- package/dist/chunk-RNOXGWKQ.cjs.map +0 -1
- package/dist/chunk-RSXDPFXK.js +0 -189
- package/dist/chunk-RSXDPFXK.js.map +0 -1
- package/dist/chunk-RZEJPDIW.js.map +0 -1
- package/dist/chunk-STJDMXL7.cjs +0 -116
- package/dist/chunk-STJDMXL7.cjs.map +0 -1
- package/dist/chunk-SZUMMROW.js.map +0 -1
- package/dist/chunk-TLD67NXQ.js +0 -101
- package/dist/chunk-TLD67NXQ.js.map +0 -1
- package/dist/chunk-TM3FOGLK.cjs.map +0 -1
- package/dist/chunk-TT2DEREM.js.map +0 -1
- package/dist/chunk-TTHWYBQB.cjs.map +0 -1
- package/dist/chunk-UK2SFZIQ.cjs.map +0 -1
- package/dist/chunk-UPIDCMZI.cjs.map +0 -1
- package/dist/chunk-URC4A3GE.cjs +0 -118
- package/dist/chunk-URC4A3GE.cjs.map +0 -1
- package/dist/chunk-UXGJ6NTD.js +0 -118
- package/dist/chunk-UXGJ6NTD.js.map +0 -1
- package/dist/chunk-VBWRH4UW.cjs +0 -1
- package/dist/chunk-VBWRH4UW.cjs.map +0 -1
- package/dist/chunk-VMAJ34DC.cjs +0 -224
- package/dist/chunk-VMAJ34DC.cjs.map +0 -1
- package/dist/chunk-VNITXANA.js.map +0 -1
- package/dist/chunk-VPTWF4AK.js +0 -111
- package/dist/chunk-VPTWF4AK.js.map +0 -1
- package/dist/chunk-VSC3A6VB.cjs.map +0 -1
- package/dist/chunk-WB5AEG5D.cjs.map +0 -1
- package/dist/chunk-WI4WQGF6.cjs.map +0 -1
- package/dist/chunk-WOJUO43J.js +0 -131
- package/dist/chunk-WOJUO43J.js.map +0 -1
- package/dist/chunk-XCR3TPXT.js.map +0 -1
- package/dist/chunk-Y5IWUJF7.js.map +0 -1
- package/dist/chunk-YKKDKR6Q.cjs +0 -1
- package/dist/chunk-YKKDKR6Q.cjs.map +0 -1
- package/dist/chunk-YVQOUGWG.cjs.map +0 -1
- package/dist/chunk-ZKYBLXU7.js.map +0 -1
- package/dist/components/Alert/Alert.cjs +0 -16
- package/dist/components/Alert/Alert.cjs.map +0 -1
- package/dist/components/Alert/Alert.js +0 -16
- package/dist/components/Alert/index.cjs +0 -16
- package/dist/components/Alert/index.cjs.map +0 -1
- package/dist/components/Alert/index.js +0 -16
- package/dist/components/Badge/Badge.cjs +0 -12
- package/dist/components/Badge/Badge.cjs.map +0 -1
- package/dist/components/Badge/Badge.js +0 -12
- package/dist/components/Badge/index.cjs +0 -12
- package/dist/components/Badge/index.cjs.map +0 -1
- package/dist/components/Badge/index.js +0 -12
- package/dist/components/Combobox/Combobox.cjs +0 -24
- package/dist/components/Combobox/Combobox.cjs.map +0 -1
- package/dist/components/Combobox/Combobox.js +0 -24
- package/dist/components/Combobox/index.cjs +0 -24
- package/dist/components/Combobox/index.cjs.map +0 -1
- package/dist/components/Combobox/index.js +0 -24
- package/dist/components/Input/Input.cjs +0 -14
- package/dist/components/Input/Input.cjs.map +0 -1
- package/dist/components/Input/Input.js +0 -14
- package/dist/components/Input/index.cjs +0 -14
- package/dist/components/Input/index.cjs.map +0 -1
- package/dist/components/Input/index.js +0 -14
- package/dist/components/Stat/Stat.cjs +0 -20
- package/dist/components/Stat/Stat.cjs.map +0 -1
- package/dist/components/Stat/Stat.js +0 -20
- package/dist/components/Stat/StatGroup.cjs +0 -11
- package/dist/components/Stat/StatGroup.cjs.map +0 -1
- package/dist/components/Stat/StatGroup.js +0 -11
- package/dist/components/Stat/index.cjs +0 -26
- package/dist/components/Stat/index.cjs.map +0 -1
- package/dist/components/Stat/index.js +0 -26
- package/dist/components/Steps/Steps.cjs +0 -22
- package/dist/components/Steps/Steps.cjs.map +0 -1
- package/dist/components/Steps/Steps.js +0 -22
- package/dist/components/Steps/index.cjs +0 -22
- package/dist/components/Steps/index.cjs.map +0 -1
- package/dist/components/Steps/index.js +0 -22
- package/dist/components/Toast/Toast.cjs +0 -24
- package/dist/components/Toast/Toast.cjs.map +0 -1
- package/dist/components/Toast/Toast.js +0 -24
- package/dist/components/Toast/index.cjs +0 -24
- package/dist/components/Toast/index.cjs.map +0 -1
- package/dist/components/Toast/index.js +0 -24
- package/dist/components/Toast/toast-store.cjs +0 -14
- package/dist/components/Toast/toast-store.cjs.map +0 -1
- /package/dist/{chunk-5MQV6PLC.js.map → chunk-2I7URBEK.js.map} +0 -0
- /package/dist/{chunk-6NZXWKUE.js.map → chunk-44S33DGQ.js.map} +0 -0
- /package/dist/{chunk-7QCXGMBX.js.map → chunk-4LHIVDAH.js.map} +0 -0
- /package/dist/{chunk-IQ4KQJAO.js.map → chunk-4WUUV44R.js.map} +0 -0
- /package/dist/{chunk-KXO72WTH.js.map → chunk-5DBKWVTZ.js.map} +0 -0
- /package/dist/{chunk-OSUT5FH5.js.map → chunk-7PSLMVCX.js.map} +0 -0
- /package/dist/{chunk-RCR5CRZ5.js.map → chunk-AMYFRY7K.js.map} +0 -0
- /package/dist/{chunk-PKJUCI7B.js.map → chunk-APD5WA65.js.map} +0 -0
- /package/dist/{components/Alert/Alert.js.map → chunk-AVHWS36I.js.map} +0 -0
- /package/dist/{chunk-SNLIKIJP.js.map → chunk-BP6BOEVE.js.map} +0 -0
- /package/dist/{components/Alert/index.js.map → chunk-CWUZ4SZN.js.map} +0 -0
- /package/dist/{components/Badge/Badge.js.map → chunk-F5YD6T5D.js.map} +0 -0
- /package/dist/{chunk-CGCO7RFO.js.map → chunk-FPXFD5XT.js.map} +0 -0
- /package/dist/{components/Badge/index.js.map → chunk-GIHJ4J47.js.map} +0 -0
- /package/dist/{components/Combobox/Combobox.js.map → chunk-H2HKUDBZ.js.map} +0 -0
- /package/dist/{chunk-3VOOMW6O.js.map → chunk-KDV7V5S4.js.map} +0 -0
- /package/dist/{components/Combobox/index.js.map → chunk-MKQBAQIH.js.map} +0 -0
- /package/dist/{components/Input/Input.js.map → chunk-MS6HASC6.js.map} +0 -0
- /package/dist/{chunk-HBAHWCBK.js.map → chunk-NKCBDSI2.js.map} +0 -0
- /package/dist/{components/Input/index.js.map → chunk-NVCOEKCU.js.map} +0 -0
- /package/dist/{components/Stat/Stat.js.map → chunk-RQRA5CCA.js.map} +0 -0
- /package/dist/{components/Stat/StatGroup.js.map → chunk-T2E5XT7P.js.map} +0 -0
- /package/dist/{chunk-VAF6PKVY.js.map → chunk-TG2IDU3W.js.map} +0 -0
- /package/dist/{chunk-IFEWF24B.js.map → chunk-TPD2GNR6.js.map} +0 -0
- /package/dist/{components/Stat/index.js.map → chunk-TPNCV7KA.js.map} +0 -0
- /package/dist/{components/Steps/Steps.js.map → chunk-VB5VOUED.js.map} +0 -0
- /package/dist/{chunk-GVND3JE3.js.map → chunk-VRPFA4CN.js.map} +0 -0
- /package/dist/{chunk-66EVFQVL.js.map → chunk-WHKNCDTX.js.map} +0 -0
- /package/dist/{components/Steps/index.js.map → chunk-YD2UW3PB.js.map} +0 -0
- /package/dist/components/{Toast/Toast.js.map → Carousel/Carousel.js.map} +0 -0
- /package/dist/components/{Toast → Carousel}/index.js.map +0 -0
- /package/dist/components/{Toast/toast-store.js.map → Charts/Charts.js.map} +0 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkYS2JJ73Mcjs = require('./chunk-YS2JJ73M.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkV6MXOJQ4cjs = require('./chunk-V6MXOJQ4.cjs');
|
|
9
|
+
|
|
10
|
+
// src/components/Progress/Progress.tsx
|
|
11
|
+
var _react = require('react');
|
|
12
|
+
var _radixui = require('radix-ui');
|
|
13
|
+
var _classvarianceauthority = require('class-variance-authority');
|
|
14
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
15
|
+
var progressVariants = _classvarianceauthority.cva.call(void 0, "ddga-progress", {
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
sm: "ddga-progress--sm",
|
|
19
|
+
md: "ddga-progress--md",
|
|
20
|
+
lg: "ddga-progress--lg"
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
primary: "ddga-progress--primary",
|
|
24
|
+
neutral: "ddga-progress--neutral"
|
|
25
|
+
},
|
|
26
|
+
state: {
|
|
27
|
+
normal: "",
|
|
28
|
+
success: "ddga-progress--success",
|
|
29
|
+
error: "ddga-progress--error"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: { size: "md", variant: "primary", state: "normal" }
|
|
33
|
+
});
|
|
34
|
+
var circularProgressVariants = _classvarianceauthority.cva.call(void 0, "ddga-circular-progress", {
|
|
35
|
+
variants: {
|
|
36
|
+
size: {
|
|
37
|
+
sm: "ddga-circular-progress--sm",
|
|
38
|
+
md: "ddga-circular-progress--md",
|
|
39
|
+
lg: "ddga-circular-progress--lg",
|
|
40
|
+
xl: "ddga-circular-progress--xl",
|
|
41
|
+
"2xl": "ddga-circular-progress--2xl"
|
|
42
|
+
},
|
|
43
|
+
variant: {
|
|
44
|
+
primary: "ddga-circular-progress--primary",
|
|
45
|
+
neutral: "ddga-circular-progress--neutral"
|
|
46
|
+
},
|
|
47
|
+
state: {
|
|
48
|
+
normal: "",
|
|
49
|
+
success: "ddga-circular-progress--success",
|
|
50
|
+
error: "ddga-circular-progress--error"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: { size: "md", variant: "primary", state: "normal" }
|
|
54
|
+
});
|
|
55
|
+
function StatusBadge({ className, state }) {
|
|
56
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkV6MXOJQ4cjs.cn.call(void 0, className, `${className}--${state}`), "aria-hidden": "true", children: state === "success" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYS2JJ73Mcjs.Check, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYS2JJ73Mcjs.Close, {}) });
|
|
57
|
+
}
|
|
58
|
+
function Progress({
|
|
59
|
+
value = null,
|
|
60
|
+
max = 100,
|
|
61
|
+
size = "md",
|
|
62
|
+
variant = "primary",
|
|
63
|
+
state = "normal",
|
|
64
|
+
label,
|
|
65
|
+
required = false,
|
|
66
|
+
helperText,
|
|
67
|
+
showValue,
|
|
68
|
+
className,
|
|
69
|
+
"aria-label": ariaLabel,
|
|
70
|
+
"aria-labelledby": ariaLabelledby,
|
|
71
|
+
...props
|
|
72
|
+
}) {
|
|
73
|
+
const labelId = _react.useId.call(void 0, );
|
|
74
|
+
const isIndeterminate = value === null;
|
|
75
|
+
const isStatus = state === "success" || state === "error";
|
|
76
|
+
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / max * 100));
|
|
77
|
+
const fillPct = isStatus ? 100 : pct;
|
|
78
|
+
const showInBar = size === "lg" && !isIndeterminate && showValue !== false;
|
|
79
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "progress-root",
|
|
83
|
+
className: _chunkV6MXOJQ4cjs.cn.call(void 0, progressVariants({ size, variant, state }), className),
|
|
84
|
+
children: [
|
|
85
|
+
label != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { id: labelId, "data-slot": "progress-label", className: "ddga-progress__label", children: [
|
|
86
|
+
required && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ddga-progress__required", "aria-hidden": "true", children: "*" }),
|
|
87
|
+
label
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
90
|
+
_radixui.Progress.Root,
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "progress",
|
|
93
|
+
value: isIndeterminate ? null : value,
|
|
94
|
+
max,
|
|
95
|
+
"aria-label": label == null ? ariaLabel : void 0,
|
|
96
|
+
"aria-labelledby": label != null ? labelId : ariaLabelledby,
|
|
97
|
+
className: "ddga-progress__track",
|
|
98
|
+
...props,
|
|
99
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
100
|
+
_radixui.Progress.Indicator,
|
|
101
|
+
{
|
|
102
|
+
"data-slot": "progress-indicator",
|
|
103
|
+
className: "ddga-progress__indicator",
|
|
104
|
+
style: isIndeterminate ? void 0 : { inlineSize: `${fillPct}%` },
|
|
105
|
+
children: showInBar && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "ddga-progress__value", "data-slot": "progress-value", dir: "auto", children: [
|
|
106
|
+
Math.round(pct),
|
|
107
|
+
"%"
|
|
108
|
+
] })
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
helperText != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-slot": "progress-helper", className: "ddga-progress__helper", children: [
|
|
114
|
+
isStatus ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StatusBadge, { className: "ddga-progress__badge", state }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ddga-progress__helper-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYS2JJ73Mcjs.HelpCircle, {}) }),
|
|
115
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ddga-progress__helper-text", children: helperText })
|
|
116
|
+
] })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
var CIRCULAR_SIZES = { sm: 64, md: 80, lg: 120, xl: 160, "2xl": 200 };
|
|
122
|
+
var CIRCULAR_STROKE = { sm: 4, md: 8, lg: 10, xl: 14, "2xl": 20 };
|
|
123
|
+
var SEGMENT_GAP_FRACTION = 0.16;
|
|
124
|
+
function CircularProgress({
|
|
125
|
+
value = null,
|
|
126
|
+
max = 100,
|
|
127
|
+
size = "md",
|
|
128
|
+
variant = "primary",
|
|
129
|
+
state = "normal",
|
|
130
|
+
thickness,
|
|
131
|
+
segments,
|
|
132
|
+
showLabel = true,
|
|
133
|
+
description,
|
|
134
|
+
className,
|
|
135
|
+
...props
|
|
136
|
+
}) {
|
|
137
|
+
if (process.env.NODE_ENV === "development" && !props["aria-label"] && !props["aria-labelledby"]) {
|
|
138
|
+
console.warn(
|
|
139
|
+
"[dga/Progress] <CircularProgress> has no accessible name. Pass `aria-label` or `aria-labelledby` so screen-reader users know what the progress represents."
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
const isIndeterminate = value === null;
|
|
143
|
+
const isSegmented = typeof segments === "number" && segments >= 2;
|
|
144
|
+
const isStatus = state === "success" || state === "error";
|
|
145
|
+
const sizeKey = _nullishCoalesce(size, () => ( "md"));
|
|
146
|
+
const diameter = CIRCULAR_SIZES[sizeKey];
|
|
147
|
+
const strokeWidth = _nullishCoalesce(thickness, () => ( CIRCULAR_STROKE[sizeKey]));
|
|
148
|
+
const radius = (diameter - strokeWidth) / 2;
|
|
149
|
+
const circumference = 2 * Math.PI * radius;
|
|
150
|
+
const center = diameter / 2;
|
|
151
|
+
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / max * 100));
|
|
152
|
+
const fillPct = isStatus ? 100 : pct;
|
|
153
|
+
const dashOffset = isIndeterminate ? circumference * 0.75 : circumference * (1 - fillPct / 100);
|
|
154
|
+
const dataState = isIndeterminate ? "indeterminate" : value >= max ? "complete" : "loading";
|
|
155
|
+
const filledSegments = isSegmented && segments ? isIndeterminate ? 0 : Math.round(pct / 100 * segments) : 0;
|
|
156
|
+
const segmentEls = isSegmented && segments ? Array.from({ length: segments }, (_, i) => {
|
|
157
|
+
const segAngle = 360 / segments;
|
|
158
|
+
const gapAngle = segAngle * SEGMENT_GAP_FRACTION;
|
|
159
|
+
const segLen = circumference * ((1 - SEGMENT_GAP_FRACTION) / segments);
|
|
160
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
161
|
+
"circle",
|
|
162
|
+
{
|
|
163
|
+
className: _chunkV6MXOJQ4cjs.cn.call(void 0,
|
|
164
|
+
"ddga-circular-progress__segment",
|
|
165
|
+
i < filledSegments && "ddga-circular-progress__segment--filled"
|
|
166
|
+
),
|
|
167
|
+
cx: center,
|
|
168
|
+
cy: center,
|
|
169
|
+
r: radius,
|
|
170
|
+
fill: "none",
|
|
171
|
+
strokeWidth,
|
|
172
|
+
strokeLinecap: "butt",
|
|
173
|
+
strokeDasharray: `${segLen} ${circumference}`,
|
|
174
|
+
transform: `rotate(${-90 + i * segAngle + gapAngle / 2} ${center} ${center})`
|
|
175
|
+
},
|
|
176
|
+
i
|
|
177
|
+
);
|
|
178
|
+
}) : null;
|
|
179
|
+
const showValueLabel = !isIndeterminate && showLabel && !isStatus;
|
|
180
|
+
const valueText = isSegmented ? `${filledSegments}/${segments}` : `${Math.round(pct)}%`;
|
|
181
|
+
const showCentre = !isIndeterminate && (isStatus || showValueLabel || description != null);
|
|
182
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
"data-slot": "circular-progress",
|
|
186
|
+
"data-state": dataState,
|
|
187
|
+
"data-segmented": isSegmented ? "" : void 0,
|
|
188
|
+
role: "progressbar",
|
|
189
|
+
"aria-valuemin": 0,
|
|
190
|
+
"aria-valuemax": max,
|
|
191
|
+
"aria-valuenow": isIndeterminate ? void 0 : value,
|
|
192
|
+
className: _chunkV6MXOJQ4cjs.cn.call(void 0, circularProgressVariants({ size, variant, state }), className),
|
|
193
|
+
style: { inlineSize: diameter, blockSize: diameter },
|
|
194
|
+
...props,
|
|
195
|
+
children: [
|
|
196
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
197
|
+
"svg",
|
|
198
|
+
{
|
|
199
|
+
className: "ddga-circular-progress__svg",
|
|
200
|
+
viewBox: `0 0 ${diameter} ${diameter}`,
|
|
201
|
+
width: diameter,
|
|
202
|
+
height: diameter,
|
|
203
|
+
"aria-hidden": "true",
|
|
204
|
+
focusable: "false",
|
|
205
|
+
children: isSegmented ? segmentEls : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
206
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
207
|
+
"circle",
|
|
208
|
+
{
|
|
209
|
+
className: "ddga-circular-progress__track",
|
|
210
|
+
cx: center,
|
|
211
|
+
cy: center,
|
|
212
|
+
r: radius,
|
|
213
|
+
fill: "none",
|
|
214
|
+
strokeWidth
|
|
215
|
+
}
|
|
216
|
+
),
|
|
217
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
218
|
+
"circle",
|
|
219
|
+
{
|
|
220
|
+
className: "ddga-circular-progress__indicator",
|
|
221
|
+
cx: center,
|
|
222
|
+
cy: center,
|
|
223
|
+
r: radius,
|
|
224
|
+
fill: "none",
|
|
225
|
+
strokeWidth,
|
|
226
|
+
strokeLinecap: "round",
|
|
227
|
+
strokeDasharray: circumference,
|
|
228
|
+
strokeDashoffset: dashOffset,
|
|
229
|
+
transform: `rotate(-90 ${center} ${center})`
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
] })
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
showCentre && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "ddga-circular-progress__label", "aria-hidden": "true", children: [
|
|
236
|
+
isStatus ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
237
|
+
StatusBadge,
|
|
238
|
+
{
|
|
239
|
+
className: "ddga-circular-progress__badge",
|
|
240
|
+
state
|
|
241
|
+
}
|
|
242
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ddga-circular-progress__value", children: valueText }),
|
|
243
|
+
description != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ddga-circular-progress__text", children: description })
|
|
244
|
+
] })
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
exports.progressVariants = progressVariants; exports.circularProgressVariants = circularProgressVariants; exports.Progress = Progress; exports.CircularProgress = CircularProgress;
|
|
256
|
+
//# sourceMappingURL=chunk-5N6CFYT6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-5N6CFYT6.cjs","../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACPA,8BAAsB;AACtB,mCAA8C;AAC9C,kEAAuC;AAmDV,+CAAA;AA/C7B,IAAM,iBAAA,EAAmB,yCAAA,eAAI,EAAiB;AAAA,EAC5C,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,EAAA,EAAI,mBAAA;AAAA,MACJ,EAAA,EAAI,mBAAA;AAAA,MACJ,EAAA,EAAI;AAAA,IACN,CAAA;AAAA,IACA,OAAA,E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,EAAA;AAEmD,EAAA;AACI,EAAA;AACT,EAAA;AAGlD,EAAA;AAAC,IAAA;AAAA,IAAA;AACW,MAAA;AACE,MAAA;AACuB,MAAA;AAC9B,MAAA;AACU,MAAA;AACA,MAAA;AAC8B,MAAA;AACW,MAAA;AACL,MAAA;AAC/C,MAAA;AAEJ,MAAA;AAAA,wBAAA;AAAC,UAAA;AAAA,UAAA;AACW,YAAA;AAC0B,YAAA;AAC7B,YAAA;AACC,YAAA;AACI,YAAA;AACF,YAAA;AAKR,YAAA;AACE,8BAAA;AAAC,gBAAA;AAAA,gBAAA;AACW,kBAAA;AACN,kBAAA;AACA,kBAAA;AACD,kBAAA;AACE,kBAAA;AACL,kBAAA;AAAA,gBAAA;AACF,cAAA;AACA,8BAAA;AAAC,gBAAA;AAAA,gBAAA;AACW,kBAAA;AACN,kBAAA;AACA,kBAAA;AACD,kBAAA;AACE,kBAAA;AACL,kBAAA;AACc,kBAAA;AACG,kBAAA;AACC,kBAAA;AACuB,kBAAA;AAAA,gBAAA;AAC3C,cAAA;AACF,YAAA;AAAA,UAAA;AAEJ,QAAA;AAEkB,QAAA;AAEZ,UAAA;AAAC,YAAA;AAAA,YAAA;AACW,cAAA;AACV,cAAA;AAAA,YAAA;AAGc,UAAA;AAGV,UAAA;AAEV,QAAA;AAAA,MAAA;AAAA,IAAA;AAEJ,EAAA;AAEJ;ADzDiE;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-5N6CFYT6.cjs","sourcesContent":[null,"'use client';\n\nimport { useId } from 'react';\nimport { Progress as ProgressPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Check, Close, HelpCircle } from '../../internal/icons';\n\nconst progressVariants = cva('ddga-progress', {\n variants: {\n size: {\n sm: 'ddga-progress--sm',\n md: 'ddga-progress--md',\n lg: 'ddga-progress--lg',\n },\n variant: {\n primary: 'ddga-progress--primary',\n neutral: 'ddga-progress--neutral',\n },\n state: {\n normal: '',\n success: 'ddga-progress--success',\n error: 'ddga-progress--error',\n },\n },\n defaultVariants: { size: 'md', variant: 'primary', state: 'normal' },\n});\n\nconst circularProgressVariants = cva('ddga-circular-progress', {\n variants: {\n size: {\n sm: 'ddga-circular-progress--sm',\n md: 'ddga-circular-progress--md',\n lg: 'ddga-circular-progress--lg',\n xl: 'ddga-circular-progress--xl',\n '2xl': 'ddga-circular-progress--2xl',\n },\n variant: {\n primary: 'ddga-circular-progress--primary',\n neutral: 'ddga-circular-progress--neutral',\n },\n state: {\n normal: '',\n success: 'ddga-circular-progress--success',\n error: 'ddga-circular-progress--error',\n },\n },\n defaultVariants: { size: 'md', variant: 'primary', state: 'normal' },\n});\n\ntype ProgressState = 'normal' | 'success' | 'error';\n\nfunction StatusBadge({ className, state }: { className: string; state: 'success' | 'error' }) {\n return (\n <span className={cn(className, `${className}--${state}`)} aria-hidden=\"true\">\n {state === 'success' ? <Check /> : <Close />}\n </span>\n );\n}\n\ntype ProgressOwnProps = VariantProps<typeof progressVariants> & {\n /** Current progress. `null`/omitted renders the indeterminate slide. Clamp to `[0, max]` yourself. */\n value?: number | null;\n /** Maximum value. Defaults to 100. */\n max?: number;\n\n state?: ProgressState;\n label?: React.ReactNode;\n required?: boolean;\n helperText?: React.ReactNode;\n showValue?: boolean;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n};\n\ntype ProgressProps = ProgressOwnProps &\n Omit<React.ComponentProps<typeof ProgressPrimitive.Root>, keyof ProgressOwnProps | 'asChild'>;\n\nfunction Progress({\n value = null,\n max = 100,\n size = 'md',\n variant = 'primary',\n state = 'normal',\n label,\n required = false,\n helperText,\n showValue,\n className,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...props\n}: ProgressProps) {\n const labelId = useId();\n const isIndeterminate = value === null;\n const isStatus = state === 'success' || state === 'error';\n const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, (value / max) * 100));\n const fillPct = isStatus ? 100 : pct;\n const showInBar = size === 'lg' && !isIndeterminate && showValue !== false;\n\n return (\n <div\n data-slot=\"progress-root\"\n className={cn(progressVariants({ size, variant, state }), className)}\n >\n {label != null && (\n <span id={labelId} data-slot=\"progress-label\" className=\"ddga-progress__label\">\n {required && (\n <span className=\"ddga-progress__required\" aria-hidden=\"true\">\n *\n </span>\n )}\n {label}\n </span>\n )}\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n value={isIndeterminate ? null : value}\n max={max}\n aria-label={label == null ? ariaLabel : undefined}\n aria-labelledby={label != null ? labelId : ariaLabelledby}\n className=\"ddga-progress__track\"\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"ddga-progress__indicator\"\n style={isIndeterminate ? undefined : { inlineSize: `${fillPct}%` }}\n >\n {showInBar && (\n <span className=\"ddga-progress__value\" data-slot=\"progress-value\" dir=\"auto\">\n {Math.round(pct)}%\n </span>\n )}\n </ProgressPrimitive.Indicator>\n </ProgressPrimitive.Root>\n {helperText != null && (\n <span data-slot=\"progress-helper\" className=\"ddga-progress__helper\">\n {isStatus ? (\n <StatusBadge className=\"ddga-progress__badge\" state={state as 'success' | 'error'} />\n ) : (\n <span className=\"ddga-progress__helper-icon\" aria-hidden=\"true\">\n <HelpCircle />\n </span>\n )}\n <span className=\"ddga-progress__helper-text\">{helperText}</span>\n </span>\n )}\n </div>\n );\n}\n\ntype CircularProgressOwnProps = VariantProps<typeof circularProgressVariants> & {\n value?: number | null;\n max?: number;\n state?: ProgressState;\n thickness?: number;\n segments?: number;\n showLabel?: boolean;\n description?: React.ReactNode;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n};\n\ntype CircularProgressProps = CircularProgressOwnProps &\n Omit<React.ComponentProps<'div'>, keyof CircularProgressOwnProps>;\n\nconst CIRCULAR_SIZES = { sm: 64, md: 80, lg: 120, xl: 160, '2xl': 200 } as const;\nconst CIRCULAR_STROKE = { sm: 4, md: 8, lg: 10, xl: 14, '2xl': 20 } as const;\nconst SEGMENT_GAP_FRACTION = 0.16;\n\nfunction CircularProgress({\n value = null,\n max = 100,\n size = 'md',\n variant = 'primary',\n state = 'normal',\n thickness,\n segments,\n showLabel = true,\n description,\n className,\n ...props\n}: CircularProgressProps) {\n if (process.env.NODE_ENV === 'development' && !props['aria-label'] && !props['aria-labelledby']) {\n console.warn(\n '[dga/Progress] <CircularProgress> has no accessible name. Pass `aria-label` or ' +\n '`aria-labelledby` so screen-reader users know what the progress represents.',\n );\n }\n\n const isIndeterminate = value === null;\n const isSegmented = typeof segments === 'number' && segments >= 2;\n const isStatus = state === 'success' || state === 'error';\n const sizeKey = size ?? 'md';\n const diameter = CIRCULAR_SIZES[sizeKey];\n const strokeWidth = thickness ?? CIRCULAR_STROKE[sizeKey];\n const radius = (diameter - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const center = diameter / 2;\n\n const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, (value / max) * 100));\n const fillPct = isStatus ? 100 : pct;\n const dashOffset = isIndeterminate ? circumference * 0.75 : circumference * (1 - fillPct / 100);\n\n const dataState = isIndeterminate ? 'indeterminate' : value >= max ? 'complete' : 'loading';\n\n const filledSegments =\n isSegmented && segments ? (isIndeterminate ? 0 : Math.round((pct / 100) * segments)) : 0;\n const segmentEls =\n isSegmented && segments\n ? Array.from({ length: segments }, (_, i) => {\n const segAngle = 360 / segments;\n const gapAngle = segAngle * SEGMENT_GAP_FRACTION;\n const segLen = circumference * ((1 - SEGMENT_GAP_FRACTION) / segments);\n return (\n <circle\n key={i}\n className={cn(\n 'ddga-circular-progress__segment',\n i < filledSegments && 'ddga-circular-progress__segment--filled',\n )}\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n // Butt caps: round caps overrun the gap at small sizes.\n strokeLinecap=\"butt\"\n strokeDasharray={`${segLen} ${circumference}`}\n transform={`rotate(${-90 + i * segAngle + gapAngle / 2} ${center} ${center})`}\n />\n );\n })\n : null;\n\n const showValueLabel = !isIndeterminate && showLabel && !isStatus;\n const valueText = isSegmented ? `${filledSegments}/${segments}` : `${Math.round(pct)}%`;\n const showCentre = !isIndeterminate && (isStatus || showValueLabel || description != null);\n\n return (\n <div\n data-slot=\"circular-progress\"\n data-state={dataState}\n data-segmented={isSegmented ? '' : undefined}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={isIndeterminate ? undefined : value}\n className={cn(circularProgressVariants({ size, variant, state }), className)}\n style={{ inlineSize: diameter, blockSize: diameter }}\n {...props}\n >\n <svg\n className=\"ddga-circular-progress__svg\"\n viewBox={`0 0 ${diameter} ${diameter}`}\n width={diameter}\n height={diameter}\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {isSegmented ? (\n segmentEls\n ) : (\n <>\n <circle\n className=\"ddga-circular-progress__track\"\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n />\n <circle\n className=\"ddga-circular-progress__indicator\"\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={dashOffset}\n transform={`rotate(-90 ${center} ${center})`}\n />\n </>\n )}\n </svg>\n {showCentre && (\n <span className=\"ddga-circular-progress__label\" aria-hidden=\"true\">\n {isStatus ? (\n <StatusBadge\n className=\"ddga-circular-progress__badge\"\n state={state as 'success' | 'error'}\n />\n ) : (\n <span className=\"ddga-circular-progress__value\">{valueText}</span>\n )}\n {description != null && (\n <span className=\"ddga-circular-progress__text\">{description}</span>\n )}\n </span>\n )}\n </div>\n );\n}\n\nexport { Progress, CircularProgress, progressVariants, circularProgressVariants };\nexport type { ProgressProps, CircularProgressProps };\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJCOUZVG3cjs = require('./chunk-JCOUZVG3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkV6MXOJQ4cjs = require('./chunk-V6MXOJQ4.cjs');
|
|
@@ -15,6 +15,7 @@ var buttonVariants = _classvarianceauthority.cva.call(void 0, "ddga-button", {
|
|
|
15
15
|
variant: {
|
|
16
16
|
primary: "ddga-button--primary",
|
|
17
17
|
secondary: "ddga-button--secondary",
|
|
18
|
+
black: "ddga-button--black",
|
|
18
19
|
outline: "ddga-button--outline",
|
|
19
20
|
ghost: "ddga-button--ghost",
|
|
20
21
|
destructive: "ddga-button--destructive",
|
|
@@ -28,31 +29,25 @@ var buttonVariants = _classvarianceauthority.cva.call(void 0, "ddga-button", {
|
|
|
28
29
|
sm: "ddga-button--sm",
|
|
29
30
|
md: "ddga-button--md",
|
|
30
31
|
lg: "ddga-button--lg",
|
|
32
|
+
// Icon-only squares: 40/32/28/24 (icon-sm 28 is off-spec).
|
|
31
33
|
icon: "ddga-button--icon",
|
|
32
|
-
"icon-
|
|
34
|
+
"icon-md": "ddga-button--icon-md",
|
|
35
|
+
"icon-sm": "ddga-button--icon-sm",
|
|
36
|
+
"icon-xs": "ddga-button--icon-xs"
|
|
33
37
|
},
|
|
34
38
|
fullWidth: {
|
|
35
39
|
true: "ddga-button--full-width"
|
|
36
40
|
},
|
|
37
41
|
/**
|
|
38
|
-
* Use on dark /
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* (
|
|
42
|
-
*
|
|
42
|
+
* Use on dark / brand-colored backgrounds (DGA Platforms Code "On-color").
|
|
43
|
+
* Restyles each `variant` for a colored surface: `black`/`primary` invert to
|
|
44
|
+
* a white button; `secondary`/`outline`/`ghost` become white-on-transparent
|
|
45
|
+
* (white border for `outline`); `destructive-outline`/`destructive-ghost`
|
|
46
|
+
* switch to a light error label. The solid danger fills (`destructive`,
|
|
47
|
+
* `destructive-subtle`) keep their own contrast and are unchanged.
|
|
43
48
|
*/
|
|
44
|
-
|
|
45
|
-
true: "ddga-button--
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* Floating action button: fully-rounded + elevated. Orthogonal to `variant`
|
|
49
|
-
* (color) and `size` — pair with `size="icon"` for a circular FAB, or a text
|
|
50
|
-
* size for an extended pill FAB. Positioning (`position: fixed`, safe-area
|
|
51
|
-
* insets) is the consumer's responsibility — see the placement recipe in the
|
|
52
|
-
* stories. Keep it a modifier, not a `Fab` wrapper component.
|
|
53
|
-
*/
|
|
54
|
-
fab: {
|
|
55
|
-
true: "ddga-button--fab"
|
|
49
|
+
onColor: {
|
|
50
|
+
true: "ddga-button--on-color"
|
|
56
51
|
}
|
|
57
52
|
},
|
|
58
53
|
compoundVariants: [],
|
|
@@ -65,8 +60,7 @@ function Button({
|
|
|
65
60
|
variant,
|
|
66
61
|
size,
|
|
67
62
|
fullWidth,
|
|
68
|
-
|
|
69
|
-
fab,
|
|
63
|
+
onColor,
|
|
70
64
|
loading,
|
|
71
65
|
disabled,
|
|
72
66
|
startIcon,
|
|
@@ -78,10 +72,11 @@ function Button({
|
|
|
78
72
|
type = "button",
|
|
79
73
|
...props
|
|
80
74
|
}) {
|
|
81
|
-
|
|
75
|
+
const isIconOnly = size === "icon" || size === "icon-md" || size === "icon-sm" || size === "icon-xs";
|
|
76
|
+
if (process.env.NODE_ENV === "development" && isIconOnly) {
|
|
82
77
|
if (!props["aria-label"] && !props["aria-labelledby"]) {
|
|
83
78
|
console.warn(
|
|
84
|
-
'[@dev-dga/react] Button with an icon-only size (size="icon"
|
|
79
|
+
'[@dev-dga/react] Button with an icon-only size (size="icon", "icon-md", "icon-sm", or "icon-xs") requires an aria-label or aria-labelledby attribute for screen reader accessibility.'
|
|
85
80
|
);
|
|
86
81
|
}
|
|
87
82
|
}
|
|
@@ -96,13 +91,13 @@ function Button({
|
|
|
96
91
|
"aria-busy": loading || void 0,
|
|
97
92
|
"data-slot": "button",
|
|
98
93
|
className: _chunkV6MXOJQ4cjs.cn.call(void 0,
|
|
99
|
-
buttonVariants({ variant, size, fullWidth,
|
|
94
|
+
buttonVariants({ variant, size, fullWidth, onColor }),
|
|
100
95
|
loading && "ddga-button--loading",
|
|
101
96
|
className
|
|
102
97
|
),
|
|
103
98
|
...props,
|
|
104
99
|
children: [
|
|
105
|
-
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
100
|
+
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJCOUZVG3cjs.Spinner, { "aria-hidden": "true" }),
|
|
106
101
|
!loading && startIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkV6MXOJQ4cjs.cn.call(void 0, "ddga-button__icon", iconFlip && "ddga-icon-flip"), "aria-hidden": "true", children: startIcon }),
|
|
107
102
|
asChild ? (
|
|
108
103
|
// children IS the consumer's single element (e.g. <Link>). Slottable
|
|
@@ -120,4 +115,4 @@ function Button({
|
|
|
120
115
|
|
|
121
116
|
|
|
122
117
|
exports.buttonVariants = buttonVariants; exports.Button = Button;
|
|
123
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-5NENDJOM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-5NENDJOM.cjs","../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACLA,iBAA+B;AAC/B,mCAAsC;AACtC,kEAAuC;AAkHnC,+CAAA;AA5GJ,IAAM,eAAA,EAAiB,yCAAA,aAAI,EAAe;AAAA,EACxC,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,OAAA,EAAS,sBAAA;AAAA,MACT,SAAA,EAAW,wBAAA;AAAA,MACX,KAAA,EAAO,oBAAA;AAAA,MACP,OAAA,EAAS,sBAAA;AAAA,MACT,KAAA,EAAO,oBAAA;AAAA,MACP,WAAA,EA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EAAyB,SAAA,CAAS;AAAA,QAAA,EAAA,EAEnC,SAAA,GAAY,KAAA,GAAQ,SAAA,IAAa,GAAA,mBAAM,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAU,mBAAA,EAAqB,SAAA,CAAS,CAAA;AAAA,QAEtF,CAAC,QAAA,GAAW,QAAA,mBACX,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,kCAAA,mBAAG,EAAqB,SAAA,GAAY,gBAAgB,CAAA,EAAG,aAAA,EAAY,MAAA,EACjF,QAAA,EAAA,QAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,CAAA;AAEJ;AD9CA;AACA;AACE;AACA;AACF,iEAAC","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-5NENDJOM.cjs","sourcesContent":[null,"'use client';\n\nimport { type ReactNode } from 'react';\nimport { Slot as SlotPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Spinner } from '../Spinner';\n\n// ─── 1. Variants (cva) ─── //\n\nconst buttonVariants = cva('ddga-button', {\n variants: {\n variant: {\n primary: 'ddga-button--primary',\n secondary: 'ddga-button--secondary',\n black: 'ddga-button--black',\n outline: 'ddga-button--outline',\n ghost: 'ddga-button--ghost',\n destructive: 'ddga-button--destructive',\n // Destructive sub-variants — match the DGA library's full destructive\n // family (des-primary maps to plain `destructive` above).\n 'destructive-outline': 'ddga-button--destructive-outline',\n 'destructive-subtle': 'ddga-button--destructive-subtle',\n 'destructive-ghost': 'ddga-button--destructive-ghost',\n },\n size: {\n sm: 'ddga-button--sm',\n md: 'ddga-button--md',\n lg: 'ddga-button--lg',\n // Icon-only squares: 40/32/28/24 (icon-sm 28 is off-spec).\n icon: 'ddga-button--icon',\n 'icon-md': 'ddga-button--icon-md',\n 'icon-sm': 'ddga-button--icon-sm',\n 'icon-xs': 'ddga-button--icon-xs',\n },\n fullWidth: {\n true: 'ddga-button--full-width',\n },\n /**\n * Use on dark / brand-colored backgrounds (DGA Platforms Code \"On-color\").\n * Restyles each `variant` for a colored surface: `black`/`primary` invert to\n * a white button; `secondary`/`outline`/`ghost` become white-on-transparent\n * (white border for `outline`); `destructive-outline`/`destructive-ghost`\n * switch to a light error label. The solid danger fills (`destructive`,\n * `destructive-subtle`) keep their own contrast and are unchanged.\n */\n onColor: {\n true: 'ddga-button--on-color',\n },\n },\n compoundVariants: [],\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n\ninterface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {\n loading?: boolean;\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n /** Flip start/end icons horizontally in RTL (for chevrons, arrows, etc.) */\n iconFlip?: boolean;\n /**\n * Render as the single child element instead of a `<button>`. Lets consumers\n * compose Button with router links (`<Button asChild><Link href=\"…\">…</Link></Button>`)\n * without `<button><a>` invalid nesting.\n *\n * The `type` and native `disabled` attributes are dropped in this mode\n * (they're meaningless on non-button elements) , the disabled visual + a11y\n * state still works via `aria-disabled` + `tabIndex={-1}`. button.css\n * matches on `[aria-disabled='true']` alongside `:disabled` so the styling\n * applies on any element.\n *\n * Consumer remains responsible for preventing the underlying action when\n * disabled (e.g., calling `e.preventDefault()` in the Link's onClick),\n * since native `disabled` doesn't gate clicks on non-form-controls.\n */\n asChild?: boolean;\n}\n\n// ─── 3. Component ─── //\n\nfunction Button({\n variant,\n size,\n fullWidth,\n onColor,\n loading,\n disabled,\n startIcon,\n endIcon,\n iconFlip,\n asChild,\n className,\n children,\n type = 'button',\n ...props\n}: ButtonProps) {\n // Dev-only: warn if icon-only button has no accessible name\n const isIconOnly =\n size === 'icon' || size === 'icon-md' || size === 'icon-sm' || size === 'icon-xs';\n if (process.env.NODE_ENV === 'development' && isIconOnly) {\n if (!props['aria-label'] && !props['aria-labelledby']) {\n console.warn(\n '[@dev-dga/react] Button with an icon-only size (size=\"icon\", ' +\n '\"icon-md\", \"icon-sm\", or \"icon-xs\") requires an aria-label or ' +\n 'aria-labelledby attribute for screen reader accessibility.',\n );\n }\n }\n\n const isDisabled = disabled || loading;\n const Comp = asChild ? SlotPrimitive.Slot : 'button';\n\n return (\n <Comp\n // `type` and native `disabled` only apply to <button>. In asChild mode\n // the Slot's child could be <a>, <Link>, etc. , skip both attrs there\n // and lean on aria-disabled + tabIndex for the disabled state.\n {...(asChild ? {} : { type, disabled: isDisabled })}\n {...(asChild && isDisabled ? { tabIndex: -1 } : {})}\n // Both `disabled` and `aria-disabled` are set in button mode (native +\n // explicit ARIA signal). In asChild mode, `aria-disabled` is the only\n // disabled signal a11y consumers can read on a non-form-control.\n aria-disabled={isDisabled || undefined}\n aria-busy={loading || undefined}\n data-slot=\"button\"\n className={cn(\n buttonVariants({ variant, size, fullWidth, onColor }),\n loading && 'ddga-button--loading',\n className,\n )}\n {...props}\n >\n {loading && <Spinner aria-hidden=\"true\" />}\n {!loading && startIcon && (\n <span className={cn('ddga-button__icon', iconFlip && 'ddga-icon-flip')} aria-hidden=\"true\">\n {startIcon}\n </span>\n )}\n {asChild ? (\n // children IS the consumer's single element (e.g. <Link>). Slottable\n // marks where THAT element's original children should land , without\n // it the icons would replace the link text entirely.\n <SlotPrimitive.Slottable>{children}</SlotPrimitive.Slottable>\n ) : (\n children != null && children !== '' && <span className=\"ddga-button__text\">{children}</span>\n )}\n {!loading && endIcon && (\n <span className={cn('ddga-button__icon', iconFlip && 'ddga-icon-flip')} aria-hidden=\"true\">\n {endIcon}\n </span>\n )}\n </Comp>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n"]}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import {
|
|
2
|
+
toastStore
|
|
3
|
+
} from "./chunk-HMXCWHVT.js";
|
|
4
|
+
import {
|
|
5
|
+
AlertCircle,
|
|
6
|
+
AlertTriangle,
|
|
7
|
+
CheckCircle,
|
|
8
|
+
Close,
|
|
9
|
+
Info
|
|
10
|
+
} from "./chunk-FFGALWM2.js";
|
|
11
|
+
import {
|
|
12
|
+
cn
|
|
13
|
+
} from "./chunk-7NTT2UXP.js";
|
|
14
|
+
|
|
15
|
+
// src/components/NotificationToast/NotificationToast.tsx
|
|
16
|
+
import { useSyncExternalStore } from "react";
|
|
17
|
+
import { Toast as ToastPrimitive } from "radix-ui";
|
|
18
|
+
import { cva } from "class-variance-authority";
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var notificationToastVariants = cva("ddga-notification-toast", {
|
|
21
|
+
variants: {
|
|
22
|
+
variant: {
|
|
23
|
+
default: "ddga-notification-toast--default",
|
|
24
|
+
info: "ddga-notification-toast--info",
|
|
25
|
+
success: "ddga-notification-toast--success",
|
|
26
|
+
warning: "ddga-notification-toast--warning",
|
|
27
|
+
destructive: "ddga-notification-toast--destructive"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "default"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var notificationToastViewportVariants = cva("ddga-notification-toast-viewport", {
|
|
35
|
+
variants: {
|
|
36
|
+
position: {
|
|
37
|
+
"top-start": "ddga-notification-toast-viewport--top-start",
|
|
38
|
+
"top-center": "ddga-notification-toast-viewport--top-center",
|
|
39
|
+
"top-end": "ddga-notification-toast-viewport--top-end",
|
|
40
|
+
"bottom-start": "ddga-notification-toast-viewport--bottom-start",
|
|
41
|
+
"bottom-center": "ddga-notification-toast-viewport--bottom-center",
|
|
42
|
+
"bottom-end": "ddga-notification-toast-viewport--bottom-end"
|
|
43
|
+
},
|
|
44
|
+
containerized: {
|
|
45
|
+
true: "ddga-notification-toast-viewport--containerized"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
position: "bottom-end"
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var DEFAULT_ICONS = {
|
|
53
|
+
default: /* @__PURE__ */ jsx(Info, { "aria-hidden": "true" }),
|
|
54
|
+
info: /* @__PURE__ */ jsx(Info, { "aria-hidden": "true" }),
|
|
55
|
+
success: /* @__PURE__ */ jsx(CheckCircle, { "aria-hidden": "true" }),
|
|
56
|
+
warning: /* @__PURE__ */ jsx(AlertCircle, { "aria-hidden": "true" }),
|
|
57
|
+
destructive: /* @__PURE__ */ jsx(AlertTriangle, { "aria-hidden": "true" })
|
|
58
|
+
};
|
|
59
|
+
function NotificationToast({
|
|
60
|
+
position = "bottom-end",
|
|
61
|
+
containerized = false,
|
|
62
|
+
duration = 4e3,
|
|
63
|
+
closeButton = true,
|
|
64
|
+
closeLabel = "Dismiss",
|
|
65
|
+
hideIcon = false,
|
|
66
|
+
className,
|
|
67
|
+
swipeDirection,
|
|
68
|
+
store = toastStore
|
|
69
|
+
}) {
|
|
70
|
+
const toasts = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
71
|
+
const resolvedSwipe = swipeDirection ?? (position.startsWith("top") ? "up" : "down");
|
|
72
|
+
return /* @__PURE__ */ jsxs(
|
|
73
|
+
ToastPrimitive.Provider,
|
|
74
|
+
{
|
|
75
|
+
duration: duration === 0 ? Infinity : duration,
|
|
76
|
+
swipeDirection: resolvedSwipe,
|
|
77
|
+
children: [
|
|
78
|
+
toasts.map((t) => /* @__PURE__ */ jsx(
|
|
79
|
+
ToastItem,
|
|
80
|
+
{
|
|
81
|
+
toast: t,
|
|
82
|
+
store,
|
|
83
|
+
closeButton,
|
|
84
|
+
closeLabel,
|
|
85
|
+
hideIcon
|
|
86
|
+
},
|
|
87
|
+
t.id
|
|
88
|
+
)),
|
|
89
|
+
/* @__PURE__ */ jsx(
|
|
90
|
+
ToastPrimitive.Viewport,
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "notification-toast-viewport",
|
|
93
|
+
"data-position": position,
|
|
94
|
+
className: cn(notificationToastViewportVariants({ position, containerized }), className)
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
var altTextFor = (a) => a.altText ?? (typeof a.label === "string" ? a.label : "Action");
|
|
102
|
+
function ToastItem({ toast: t, store, closeButton, closeLabel, hideIcon }) {
|
|
103
|
+
const radixType = t.variant === "destructive" ? "foreground" : "background";
|
|
104
|
+
const icon = hideIcon ? null : DEFAULT_ICONS[t.variant];
|
|
105
|
+
const radixDuration = t.duration === 0 ? Infinity : t.duration;
|
|
106
|
+
return /* @__PURE__ */ jsxs(
|
|
107
|
+
ToastPrimitive.Root,
|
|
108
|
+
{
|
|
109
|
+
"data-slot": "notification-toast",
|
|
110
|
+
"data-variant": t.variant,
|
|
111
|
+
className: notificationToastVariants({ variant: t.variant }),
|
|
112
|
+
open: t.open,
|
|
113
|
+
type: radixType,
|
|
114
|
+
duration: radixDuration,
|
|
115
|
+
onOpenChange: (open) => {
|
|
116
|
+
if (!open) store.dismiss(t.id);
|
|
117
|
+
},
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ jsx("span", { className: "ddga-notification-toast__stripe", "aria-hidden": "true" }),
|
|
120
|
+
/* @__PURE__ */ jsxs("div", { className: "ddga-notification-toast__header", children: [
|
|
121
|
+
icon ? /* @__PURE__ */ jsx("span", { className: "ddga-notification-toast__icon", children: icon }) : null,
|
|
122
|
+
/* @__PURE__ */ jsxs("div", { className: "ddga-notification-toast__text", children: [
|
|
123
|
+
t.title ? /* @__PURE__ */ jsx(
|
|
124
|
+
ToastPrimitive.Title,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "notification-toast-title",
|
|
127
|
+
className: "ddga-notification-toast__title",
|
|
128
|
+
children: t.title
|
|
129
|
+
}
|
|
130
|
+
) : null,
|
|
131
|
+
t.description ? /* @__PURE__ */ jsx(
|
|
132
|
+
ToastPrimitive.Description,
|
|
133
|
+
{
|
|
134
|
+
"data-slot": "notification-toast-description",
|
|
135
|
+
className: "ddga-notification-toast__description",
|
|
136
|
+
children: t.description
|
|
137
|
+
}
|
|
138
|
+
) : null
|
|
139
|
+
] }),
|
|
140
|
+
closeButton ? /* @__PURE__ */ jsx(ToastPrimitive.Close, { className: "ddga-notification-toast__close", "aria-label": closeLabel, children: /* @__PURE__ */ jsx(Close, { "aria-hidden": "true" }) }) : null
|
|
141
|
+
] }),
|
|
142
|
+
t.action || t.secondaryAction ? /* @__PURE__ */ jsxs("div", { className: "ddga-notification-toast__actions", "data-slot": "notification-toast-actions", children: [
|
|
143
|
+
t.action ? /* @__PURE__ */ jsx(
|
|
144
|
+
ToastPrimitive.Action,
|
|
145
|
+
{
|
|
146
|
+
className: "ddga-notification-toast__action",
|
|
147
|
+
altText: altTextFor(t.action),
|
|
148
|
+
onClick: () => {
|
|
149
|
+
t.action?.onClick();
|
|
150
|
+
store.dismiss(t.id);
|
|
151
|
+
},
|
|
152
|
+
children: t.action.label
|
|
153
|
+
}
|
|
154
|
+
) : null,
|
|
155
|
+
t.secondaryAction ? /* @__PURE__ */ jsx(
|
|
156
|
+
ToastPrimitive.Action,
|
|
157
|
+
{
|
|
158
|
+
className: "ddga-notification-toast__action",
|
|
159
|
+
altText: altTextFor(t.secondaryAction),
|
|
160
|
+
onClick: () => {
|
|
161
|
+
t.secondaryAction?.onClick();
|
|
162
|
+
store.dismiss(t.id);
|
|
163
|
+
},
|
|
164
|
+
children: t.secondaryAction.label
|
|
165
|
+
}
|
|
166
|
+
) : null
|
|
167
|
+
] }) : null
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export {
|
|
174
|
+
notificationToastVariants,
|
|
175
|
+
notificationToastViewportVariants,
|
|
176
|
+
NotificationToast
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=chunk-5X2XQMGC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/NotificationToast/NotificationToast.tsx"],"sourcesContent":["'use client';\n\nimport { useSyncExternalStore, type ReactNode } from 'react';\nimport { Toast as ToastPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Info, AlertTriangle, AlertCircle, CheckCircle, Close } from '../../internal/icons';\nimport {\n toastStore as defaultStore,\n type ToastAction,\n type ToastData,\n type ToastStore,\n type ToastVariant,\n} from './toast-store';\n\nconst notificationToastVariants = cva('ddga-notification-toast', {\n variants: {\n variant: {\n default: 'ddga-notification-toast--default',\n info: 'ddga-notification-toast--info',\n success: 'ddga-notification-toast--success',\n warning: 'ddga-notification-toast--warning',\n destructive: 'ddga-notification-toast--destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nconst notificationToastViewportVariants = cva('ddga-notification-toast-viewport', {\n variants: {\n position: {\n 'top-start': 'ddga-notification-toast-viewport--top-start',\n 'top-center': 'ddga-notification-toast-viewport--top-center',\n 'top-end': 'ddga-notification-toast-viewport--top-end',\n 'bottom-start': 'ddga-notification-toast-viewport--bottom-start',\n 'bottom-center': 'ddga-notification-toast-viewport--bottom-center',\n 'bottom-end': 'ddga-notification-toast-viewport--bottom-end',\n },\n containerized: {\n true: 'ddga-notification-toast-viewport--containerized',\n },\n },\n defaultVariants: {\n position: 'bottom-end',\n },\n});\n\n// SDGA Notification Toast glyphs (stroke): info-circle for neutral+info,\n// alert-triangle for error, alert-circle for warning, check-circle for success.\nconst DEFAULT_ICONS: Record<ToastVariant, ReactNode> = {\n default: <Info aria-hidden=\"true\" />,\n info: <Info aria-hidden=\"true\" />,\n success: <CheckCircle aria-hidden=\"true\" />,\n warning: <AlertCircle aria-hidden=\"true\" />,\n destructive: <AlertTriangle aria-hidden=\"true\" />,\n};\n\ntype ToastPosition = NonNullable<\n VariantProps<typeof notificationToastViewportVariants>['position']\n>;\n\ninterface NotificationToastProps {\n /** Where toasts stack. Logical: start/end flip in RTL. Default `bottom-end`. */\n position?: ToastPosition;\n /**\n * Pin the viewport to a positioned ancestor (via `position: absolute`)\n * instead of the browser viewport (`position: fixed`). Set this for\n * Storybook stories, embedded widgets, and any layout where the NotificationToast\n * should stay within a parent box. Caller is responsible for placing the\n * NotificationToast inside an element with `position: relative` (or other positioned\n * containing block).\n */\n containerized?: boolean;\n /** ms; default 4000. Set 0 (or Infinity) to disable auto-dismiss globally. */\n duration?: number;\n /** Show a close (X) button on each toast. Defaults to true. */\n closeButton?: boolean;\n /** Localized label for the close button. Default `\"Dismiss\"`. */\n closeLabel?: string;\n /** Hide the default leading icon per variant. */\n hideIcon?: boolean;\n /** Extra class on the Radix Viewport. */\n className?: string;\n /** Override swipe direction. Defaults based on `position`. */\n swipeDirection?: 'up' | 'down' | 'left' | 'right';\n /**\n * The toast store this NotificationToast subscribes to. Defaults to the module-level\n * singleton so the bare `toast()` API works without setup. Pass an isolated\n * store (created via `createToastStore()` + `createToast(store)`) when you\n * need multiple independent NotificationToasts on the same page — common in\n * Storybook, docs sites, and embedded widgets.\n */\n store?: ToastStore;\n}\n\nfunction NotificationToast({\n position = 'bottom-end',\n containerized = false,\n duration = 4000,\n closeButton = true,\n closeLabel = 'Dismiss',\n hideIcon = false,\n className,\n swipeDirection,\n store = defaultStore,\n}: NotificationToastProps) {\n const toasts = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);\n\n const resolvedSwipe: 'up' | 'down' | 'left' | 'right' =\n swipeDirection ?? (position.startsWith('top') ? 'up' : 'down');\n\n return (\n <ToastPrimitive.Provider\n duration={duration === 0 ? Infinity : duration}\n swipeDirection={resolvedSwipe}\n >\n {toasts.map((t) => (\n <ToastItem\n key={t.id}\n toast={t}\n store={store}\n closeButton={closeButton}\n closeLabel={closeLabel}\n hideIcon={hideIcon}\n />\n ))}\n <ToastPrimitive.Viewport\n data-slot=\"notification-toast-viewport\"\n data-position={position}\n className={cn(notificationToastViewportVariants({ position, containerized }), className)}\n />\n </ToastPrimitive.Provider>\n );\n}\n\ninterface ToastItemProps {\n toast: ToastData;\n store: ToastStore;\n closeButton: boolean;\n closeLabel: string;\n hideIcon: boolean;\n}\n\nconst altTextFor = (a: ToastAction) =>\n a.altText ?? (typeof a.label === 'string' ? a.label : 'Action');\n\nfunction ToastItem({ toast: t, store, closeButton, closeLabel, hideIcon }: ToastItemProps) {\n // Route destructive toasts through Radix's assertive live region; the rest stay polite.\n const radixType: 'foreground' | 'background' =\n t.variant === 'destructive' ? 'foreground' : 'background';\n\n const icon = hideIcon ? null : DEFAULT_ICONS[t.variant];\n\n // Radix treats `0` as falsy (→ falls back to the provider duration), so map\n // our \"0 = no auto-dismiss\" contract to Infinity, which Radix honors.\n const radixDuration = t.duration === 0 ? Infinity : t.duration;\n\n return (\n <ToastPrimitive.Root\n data-slot=\"notification-toast\"\n data-variant={t.variant}\n className={notificationToastVariants({ variant: t.variant })}\n open={t.open}\n type={radixType}\n duration={radixDuration}\n onOpenChange={(open) => {\n if (!open) store.dismiss(t.id);\n }}\n >\n <span className=\"ddga-notification-toast__stripe\" aria-hidden=\"true\" />\n <div className=\"ddga-notification-toast__header\">\n {icon ? <span className=\"ddga-notification-toast__icon\">{icon}</span> : null}\n <div className=\"ddga-notification-toast__text\">\n {t.title ? (\n <ToastPrimitive.Title\n data-slot=\"notification-toast-title\"\n className=\"ddga-notification-toast__title\"\n >\n {t.title}\n </ToastPrimitive.Title>\n ) : null}\n {t.description ? (\n <ToastPrimitive.Description\n data-slot=\"notification-toast-description\"\n className=\"ddga-notification-toast__description\"\n >\n {t.description}\n </ToastPrimitive.Description>\n ) : null}\n </div>\n {closeButton ? (\n <ToastPrimitive.Close className=\"ddga-notification-toast__close\" aria-label={closeLabel}>\n <Close aria-hidden=\"true\" />\n </ToastPrimitive.Close>\n ) : null}\n </div>\n {t.action || t.secondaryAction ? (\n <div className=\"ddga-notification-toast__actions\" data-slot=\"notification-toast-actions\">\n {t.action ? (\n <ToastPrimitive.Action\n className=\"ddga-notification-toast__action\"\n altText={altTextFor(t.action)}\n onClick={() => {\n t.action?.onClick();\n store.dismiss(t.id);\n }}\n >\n {t.action.label}\n </ToastPrimitive.Action>\n ) : null}\n {t.secondaryAction ? (\n <ToastPrimitive.Action\n className=\"ddga-notification-toast__action\"\n altText={altTextFor(t.secondaryAction)}\n onClick={() => {\n t.secondaryAction?.onClick();\n store.dismiss(t.id);\n }}\n >\n {t.secondaryAction.label}\n </ToastPrimitive.Action>\n ) : null}\n </div>\n ) : null}\n </ToastPrimitive.Root>\n );\n}\n\nexport { NotificationToast, notificationToastVariants, notificationToastViewportVariants };\nexport { toast, toastStore, createToast, createToastStore } from './toast-store';\nexport type { NotificationToastProps, ToastPosition };\nexport type { ToastVariant, ToastData, ToastOptions, ToastAction, ToastStore } from './toast-store';\n"],"mappings":";;;;;;;;;;;;;;;AAEA,SAAS,4BAA4C;AACrD,SAAS,SAAS,sBAAsB;AACxC,SAAS,WAA8B;AAgD5B,cA8DP,YA9DO;AArCX,IAAM,4BAA4B,IAAI,2BAA2B;AAAA,EAC/D,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS;AAAA,EACX;AACF,CAAC;AAED,IAAM,oCAAoC,IAAI,oCAAoC;AAAA,EAChF,UAAU;AAAA,IACR,UAAU;AAAA,MACR,aAAa;AAAA,MACb,cAAc;AAAA,MACd,WAAW;AAAA,MACX,gBAAgB;AAAA,MAChB,iBAAiB;AAAA,MACjB,cAAc;AAAA,IAChB;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,UAAU;AAAA,EACZ;AACF,CAAC;AAID,IAAM,gBAAiD;AAAA,EACrD,SAAS,oBAAC,QAAK,eAAY,QAAO;AAAA,EAClC,MAAM,oBAAC,QAAK,eAAY,QAAO;AAAA,EAC/B,SAAS,oBAAC,eAAY,eAAY,QAAO;AAAA,E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